Edgewall Software

Changes between Version 188 and Version 189 of MacroBazaar


Ignore:
Timestamp:
Dec 14, 2006, 7:21:09 PM (17 years ago)
Author:
Christian Boos
Comment:

Updated AutoNav plugin as examples for single file plugins that can be installed in the plugins folder and used as a replacement for the now deprecated old style macros (those installed in wiki-macros)

Legend:

Unmodified
Added
Removed
Modified
  • MacroBazaar

    v188 v189  
    1010'''Another Note:''' '' [http://trac-hacks.org Trac Hacks] provides free '''Trac + Subversion''' hosting for Trac macros, patches, plugins,  etc.'''
    1111
    12 '''Installing a macro'''
     12'''Installing a macro ''(old style "HDF" macros)'' '''
    1313 1. Download the ''<macro>.py'' file.
    14  1. Save it to your `projenv/wiki-macros` directory
     14 1. Save it to your '''`projenv/wiki-macros`''' directory
    1515 1. Restart your web server
    16  1. Open a Wiki page and add the macro text to test the macro (usually something like {{{[[Macro]]}}} or {{{[[Macro(argument1, argument2)]}}}
     16 1. Open a Wiki page and add the macro text to test the macro (usually something like `[[Macro]]` or `[[Macro(argument1, argument2)]`
     17
     18Note that this kind of macros is still supported in Trac [milestone:0.10], but deprecated. You should start developing and using macros as plugins implementing the `IWikiMacroProvider` interface, or, even simpler, inheriting from the `trac.wiki.macros.WikiMacroBase` class.
     19
     20'''Installing a macro ''(new style macros)'' '''
     21
     22This follows the same rules as installing a plugin, see TracPlugins.
     23
     24But usually, macros are simple enough so that they can be developed as ''single file plugins''. In that case, the installation is simpler, and much similar to the above:
     25 1. Download the ''<macro>.py'' file.
     26 1. Save it to your '''`projenv/plugins`''' directory
     27 1. Restart your web server
     28 1. Open a Wiki page and add the macro text to test the macro (usually something like `[[Macro]]` or `[[Macro(argument1, argument2)]`
     29
     30Example for such macros are provided below:
     31 - [#AutoNav AutoNav]
     32 - ...
     33
     34
    1735
    1836You can '''edit the macro''' by using any text editor and editing the ''trac.db/wiki-macros/<macro>.py'' file. Make the appropriate changes, restart the web server you are using, and the changes should appear.
     
    157175
    158176''Question:'' Is there a chance to integrate the macro in the wiki menu like Title Index? Would be very appretiated.
     177
    159178=== !AutoNav ===
    160179Derived from !BackLinks. All references to the page where the macro is and all arguments supplied is sorted and looked up for references.
     
    170189}}}
    171190Add the Names "MyPage", "AndThisPageToo" and "WithThisPage" with the list of references to this page.
    172 ''Download:'' [attachment:AutoNav.2.py]
    173 [[BR]]''By:'' Anders Jansson <anders dot jansson at kastanj dot net>
    174 
    175 Fixed a small bug in the page enumeration.
    176 ''Download:'' [attachment:AutoNav.3.py]
    177 [[BR]]''By:'' anonymous
    178 
    179 Reimplemented !AutoNav as plugin for upcoming Trac 0.11 (#3958)
    180 ''Download'' [attachment:ticket:3958:AutoNavPlugin.tar.bz2 AutoNavPlugin.tar.bz2]
    181 [[BR]]''By:'' Andrew Stromnov <stromnov at gmail dot com>
     191
     192''By:'' Anders Jansson <anders dot jansson at kastanj dot net>
     193
     194Reimplemented !AutoNav as plugin for upcoming Trac 0.11 (#3958) [[br]]
     195''Download:'' [attachment:autonav-trac-0.10.py autonav-trac-0.10.py] [attachment:autonav-trac-0.11.py autonav-trac-0.11.py] [[br]]
     196''Installation:'' place in your TracEnvironment, in the `plugins` subfolder.
     197''By:'' Andrew Stromnov <stromnov at gmail dot com>, cboos
    182198
    183199=== !SubWiki ===