= The Macro Bazaar = [[PageOutline(2-3, Categories, pullout)]] Looking for fresh macro goodness for your Trac installation? Have you written a clever macro you're dying to share with the world? This is the place. The macro bazaar is for sharing information about user-developer macros, links to source code and requests. '''Note:''' ''Please state your name, email, and version of Trac your macro is developed for.'' '''Another Note:''' '' [http://trac-hacks.swapoff.org Trac Hacks] provides free '''Trac + Subversion''' hosting for Trac macros, patches, plugins, etc.''' '''Installing a macro''' 1. Download the ''.py'' file. 1. Save it to your `projenv/wiki-macros` directory 1. Restart your web server 1. Open a Wiki page and add the macro text to test the macro (usually something like {{{[[Macro]]}}} or {{{[[Macro(argument1, argument2)]}}} You can '''edit the macro''' by using any text editor and editing the ''trac.db/wiki-macros/.py'' file. Make the appropriate changes, restart the web server you are using, and the changes should appear. '''To delete the macro''', just delete all the macro files in the ''trac.db/wiki-macros'' directory (that have the form ''.*''). == Examples == === !HelloWorld === A simple example macro. Distributed with Trac. [[BR]]''Download:'' source:trunk/wiki-macros/HelloWorld.py [[BR]]''By:'' TracTeam -- ''Ver:'' >0.5.2 [wiki:MacroBazaar#Categories (categories)] ---- == Includes == === include === Inserts the output of an external URL. Example: {{{ [[include(http://www.example.com/)]] }}} [[BR]]''Download:'' http://randomfoo.net/code/trac/include.py [[BR]]''By:'' lhl -- ''Ver:'' 0.7.1 Replacement that also handles the [wiki:MacroBazaar#WikFile WikiFile] macro below. Docs are inside the module @ the top. [[BR]]''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/Include.2.py [[BR]]''By:'' csawyer@yumaed.org -- ''Ver:'' 0.8 === !WikiInclude === Inserts the contents of another wiki page. It expands arguments in the page in the form {{N}}. Example: {{{ [[WikiInclude(Foo)]] [[WikiInclude(Foo|Argument1|Argument2..|ArgumentN)]] }}} ''Version:'' >= 0.8 [[BR]]'''Based on !WikiInclude, I've created the sucessor [http://dev.ufsoft.org/TracWikiTemplates TracWikiTemplates Plugin] - [mailto:ufsATufsoftDOTorg s0undt3ch]''' [[BR]]''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/WikiInclude.py [[BR]]''By:'' Vegard Eriksen zyp at jvnv dot net === !WikiFile === Inserts the output of an URL/file as wiki file. The file can be written in trac syntax and the macro will convert it to html. The macro looks at the suffix of the file and tries to interpret it according to that syntax, html will be intrepreted as html rst will be interpreted Restructured Text cpp as c++ etc So you can have a file on the filesystem that is written with trac syntax or restructured text and display it within the wiki. The advantage is that you can use version control on file. The disadvantage is that you cant click page history and see the history of the page. You can also not edit the file within the Wiki which takes away alot of the advantages of a Wiki. But within a company it might be ok. Example: {{{ [[WikiFile(http://www.example.com/myfile.rst)]] }}} ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/WikiFile.py ''By:'' Toni Brkic toni.brkic at switchcore.com -- ''Required ver'' patch for #801 must be implemented === !MimeInclude === Inserts the output of an external URL, with an optional MIMEtype argument for rendering mode and colorization. See the examples in code docstring. Enjoy! [[BR]]''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/MimeInclude.py [[BR]]''By:'' Carlo C8E Miron -- ''Ver:'' >= 0.8.1 (tested on Debian versions 0.8.1-2 until 0.8.4-1) [wiki:MacroBazaar#Categories (categories)] ---- == Site Navigation == === !BackLinks === First stab at a macro that displays all wiki pages linking to a specified page name. Usage: {{{ [[BackLinks(pagename)]] }}} I'd really like it to default to displaying backlinks to the current page when a page name isn't supplied, but, um, I have no idea how to do that. Suggestions greatly appreciated. [[BR]] ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/BackLinks.py [[BR]]''By:'' Dan Hon -- ''Ver.'' >= 0.7.1 Dan, here's an idea. {{{ thispage = hdf.getValue('wiki.page_name', '') }}} ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/BackLinks.2.py patches the wikimacro to default to display backlinks to the current page if a page name is not specified. [[BR]]''By:'' Muness Alrubaie -- ''Ver.'' >= 0.8 Well, both those seem to have a bug: they will list pages for which at least one version linked to thispage, rather than just the latest version. So here's a fixed macro. ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/BackLinks3.py patches the wikimacro to display only pages where the latest version links to the specified or current page. [[BR]] ''By:'' Andrew Durdin -- ''Ver.'' >= 0.8 [[BR]] Well, both those seem to have a bug: they will list pages for which at least one version linked to thispage, rather than just the latest version. So here's a fixed macro. ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/BackLinks.3.py based on Andrew's fix displays only pages where the latest version explicitly links (i.e. no CamelCase, only {{{ [wiki:... ...]}}} links) to the specified or current page. [[BR]] ''By:'' Muness Alrubaie -- ''Ver.'' >= 0.8 [[BR]] ''Notes:'' An outstanding issue with these macros is that it incorrectly registers links from pages where their titles appear like !CamelCase (i.e. not a link) or where the name (not a TracLink-style name) is used legitimately in a different context (e.g. a page named 'History' would show backlinks to any other pages with the word 'History' in them). ''Question:'' Is there a chance to integrate the macro in the wiki menu like Title Index? Would be very appretiated. === !AutoNav === Derived from !BackLinks. All references to the page where the macro is and all arguments supplied is sorted and looked up for references. ''Example:'' {{{ [[AutoNav()]] }}} Behaves as !BackLinks above and gets all the references to this page in a list. [[BR]]''Example:'' {{{ [[AutoNav(MyPage, AndThisPageToo, WithThisPage)]] }}} Add the Names "MyPage", "AndThisPageToo" and "WithThisPage" with the list of references to this page. ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/AutoNav.2.py [[BR]]''By:'' Anders Jansson === !SubWiki === Derived from TitleIndex. Returns a list of sub-wiki entries. A sub-wiki page is a page that is is deeper in the hierarchy than the current page. e.g. if the current page is People, this will return a list of all wiki entries that start with "People/" ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/SubWiki.py [[BR]]''Version:'' >= 0.8 [[BR]]''By:'' Muness Alrubaie A different version that lists the contents of the line specified in the second parameter next to the the link. [[BR]]''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/SubWiki.2.py [[BR]]''By:'' csawyer@yumaed.org -- ''Ver:'' 0.8 A different version that lists the contents of the first heading element next to the link. The second parameter specifies the number of levels to display. Based on the version by csawyer@yumaed.org. [[BR]]''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/SubWiki.3.py [[BR]]''By:'' muness@gmail.com -- ''Ver:'' 0.8 === !ParentWiki === Inserts a link to the "parent" wiki entry. This only applies to wikis that have a "/" in their name indicating hierarchy. e.g. an entry named Java/Introduction will have a parent of Java. All other wiki entries have a parent of WikiStart. ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/ParentWiki.py [[BR]]''Version:'' >= 0.8 [[BR]]''By:'' Muness Alrubaie === !RelLink === Creates a link relative to the current page. Examples: ![[RelLink(deeper1)]] ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/RelLink.py [[BR]]''Version:'' >= 0.8? [[BR]]''By:'' Thomas Richter tr+tracweb@ariva.de === !ShowPath === Show the path to the specified wiki or the current wiki if none is specified. This is similar to the directory names at the top of the TracBrowser. This applies mainly to hierarchical wiki entries. e.g. the path to a {{{Book/Chapter/Section/Subsection}}} would be {{{WikiStart/Book/Chapter/Section/Subsection}}} (all but the current would be linked). ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/ShowPath.py [[BR]]''Version:'' >= 0.8 [[BR]]''By:'' Muness Alrubaie Note: If this strikes you as something you want to hack into Trac (rather than calling it on every page) use [http://trac-hacks.swapoff.org/wiki/TracShowPathPatch TracShowPathPatch]. === Redirect === It is sometimes useful to create alias names for wiki pages (or tickets or other trac objects. This can be accomplished using the "redirect" macro. ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/redirect.py ''Usage:'' E.g., on page !RequestForRedirect use ![[redirect(ticket:976)]] to create an alias wiki name for ticket #976. ''Note:'' the argument to the redirect macro must be in general form of TracLinks (item:id). ''Note:'' to edit a page that contains a redirect macro, you must type its URL directly into your browser's location bar and append the string '?edit=true' to it. ''Version:'' >= 0.8 [[BR]]''By:'' Bernhard Haumacher === !TracNav === {{{ #!html }}} The !TracNav macro implements a fully customizable navigation bar for the Trac wiki engine (a replacement for the pure static !TracGuideToc macro). The contents of the navigation bar is a wiki page itself and can be edited like any other wiki page through the web interface. The navigation bar supports hierarchical ordering of topics. Further information and a life example can be found at the [http://svn.ipd.uka.de/trac/javaparty/wiki/TracNav TracNav home page]. Updated version 2005-03-25: Improved look & feel, more robust parser for table of contents pages, improved page preview handling. [[BR]]''Download:'' [http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/TracNav.2.py TracNav.py] [[BR]]''By:'' Bernhard Haumacher (haui at haumacher.de), ''Version:'' = 0.8.x Updated version 2005-11-01: Updated for Trac 0.9. [[BR]]''Download:'' [http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/TracNav.3.py TracNav.py], [http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/tracnav.css tracnav.css] [[BR]]''By:'' Thomas Moschny (moschny at ipd.uni-karlsruhe.de), ''Version:'' >= 0.9 === Tags === Tagging, - implemented as a set of macros, - allows non-hierarchical organization of wiki entries like gmail and del.icio.us and more is available.[[BR]] These allow for a much more flexible means to organize your wiki content.[[BR]]Further information, examples and installation instructions are available at the [http://dev.muness.textdriven.com/trac.cgi/wiki/tags Tags for Trac] homepage. [[BR]]''Version:'' >= 0.8 [[BR]]''By:'' Muness Alrubaie === TOC === This macro adds the ability to create table of contents on any set of pages. If a page is not specified, the current page and version is used. The table of contents is automatically generated from headings in the page. Usage: Table of contents for the current page and version: {{{ [[TOC]] }}} Table of contents for multiple pages: {{{ [[TOC(WikiStart, WikiFormatting)]] }}} ''Download:'' http://trac-hacks.swapoff.org/wiki/TocMacro [[BR]]''By:'' Alec Thomas [[BR]]''Version:'' >= 0.7.1 (requires patch available at http://trac-hacks.swapoff.org/wiki/AnchorPatch) ''23/05/05'': Michel Jouvin has added a {{{titleindex}}} argument which generates one line summaries for each page. He also modified the default behaviour to exclude the top-level heading, only displaying sub-headings. You can override this by explicitly including a page name. These changes have been integrated into trunk at the URL below. === ref === With the [[http://trac-hacks.swapoff.org/wiki/AnchorPatch anchor patch]] applied, ref() allows you to easily reference sections in the current page. Usage: {{{ Go back to the list of [[ref(Categories)]]. }}} generates the following: {{{ Go back to the list of Categories. }}} ''Download:'' http://trac-hacks.swapoff.org/wiki/RefMacro [[BR]]''By:'' Alec Thomas [wiki:MacroBazaar#Categories (categories)] ---- == Time & Date == === Timestamp === Inserts current date and time. Distributed with Trac. [[BR]]''Download:'' source:trunk/wiki-macros/Timestamp.py [[BR]]''By:'' TracTeam -- ''Ver:'' >0.5.2 === !DateOffset === Returns the date referred to as follows: * First arg is the offset, i.e. the date to start from * Second arg is the multiplier to multiply the count by (e.g. 7 for a week) * Third arg is the count (i.e. the number of additions to make). So, for example: * {{{ [[DateOffset(2005/01/05,7,0)]] }}} returns Wed Jan 05 * {{{ [[DateOffset(2005/01/05,7,4)]] }}} returns Wed Feb 02 You can also configure the input and output date formats. (See http://python.org/doc/2.3.4/lib/module-time.html). e.g.: * {{{ [[DateOffset(01/05/2005,7,0,%m/%d/%Y,%A %B %d)]] }}} returns Wednesday January 05 Please email me fixes and excuse any obvious errors: I've never written any python before this. ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/DateOffset.py [[BR]]''Version:'' >= 0.8 [[BR]]''By:'' Muness Alrubaie === !LastModified === Shows the last modification date of the specified page, or the page the macro appears in if not specified. An optional argument, {{{ delta }}}, can be given to show the time elapsed since the last modification. The output is placed in span with a title that gives the exact modification date and the author of the change. See [http://chimp.acm.uiuc.edu/cgi-bin/trac.cgi/wiki/CustomMacros examples] or [http://severinghaus.org/projects/bfgff/LastModified.py download] it! ''Usage:'' {{{ [[LastModified]] [[LastModified(delta)]] [[LastModified(MacroBazaar)]] [[LastModified(MacroBazaar,delta)]] }}} ''Download:'' http://severinghaus.org/projects/bfgff/LastModified.py [[BR]]''Version:'' >= 0.7 [[BR]]''By:'' Steven N. Severinghaus === !WikiCalendar === Renders a calendar of links to date-based wiki pages. Its primary use is for maintaining a calendar of meeting minutes, but it can be used in any situation where the wiki page name is based on the date. It is designed to work well with the [wiki:MacroBazaar#Blog Blog] macro, so if a previous month is selected from the Blog, the calendar will display the selected month. ''Download:'' See TracHacks [http://trac-hacks.swapoff.org/wiki/WikiCalendarMacro WikiCalendarMacro] page. [[BR]]''Version:'' >= 0.8 [[BR]]''By:'' Matthew Good ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/WikiCalendar.3.py [[br]] Added navigation links (for previous/next month) to the calendar caption. [[BR]]''Version:'' >= 0.8 [[BR]]''By:'' Jan Finell [wiki:MacroBazaar#Categories (categories)] ---- == Miscellaneous == === !TracChart === http://www.piedcow.com/archives/2005/03/inspired_to_cre.html Simple* Chart Stylesheet. A simple stylesheet and chart generator based on Digital Media Minute XML/SWF Charts. [[BR]]''By:'' The Pied Cow -- ''Ver:'' >0.8.0 === Debbug === Link to the [http://bugs.debian.org Debian BTS]; either a package's bug page or a specific bug. Example usage: {{{ [[Debbug(123456)]] [[Debbug(trac)]] }}} ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/Debbug.py [[BR]]''By:'' Joe Wreschnig -- ''Ver:'' >= 0.5.2 === Javadoc === Creates links to Javadoc pages based on a package or fully-qualified class name. Example usage: {{{ [[javadoc(java.lang)]] [[javadoc(java.lang.String)]] [[javadoc(java.lang.String, Text for link)]] }}} See source for customizing the available Javadoc URLs. ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/javadoc.py [[BR]]''By:'' Matthew Good -- ''Ver:'' >=0.7.1 [wiki:MacroBazaar#Categories (categories)] ---- == Uncategorized == === Download Stats === This macro shows webalizer statistics from one or more patterns. You have to give the webalizer html files path as first argument followed by one or more patterns using | (pipe) as delimiter. Usage: {{{ [[downloadStats(|||...|)]] }}} Example: {{{ [[downloadStats(/var/www/webalizer/|sarge-i386-1.raw|debian-br-cdd_1.0pre5.iso)]] }}} ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/downloadStats.py [[BR]]''By:'' Tiago Bortoletto Vaz [[BR]]''Ver.'' >= 0.7.1 === !UserChanges === Trivial change of the RecentChanges macro that only displays the recently changed pages for a specified user. Usage: {{{ [[UserChange(username)]] or [[UserChange(username, # of last modified pages to display)]] }}} ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/UserChanges.py [[BR]]''By:'' David Mohr -- ''Ver.'' >= 0.7.1 === !TracPoll === This macro adds ''polls'' to Trac. Any number of polls can be added to a page and polls are unique to each project. The pickled state of the poll is stored in {{{polldir}}} (set at the top of the plugin). No locking is performed. Usage: {{{ [[Poll(Title for poll; Option 1 for poll; Option 2 for poll; etc.)]] }}} ''Download:'' http://trac-hacks.swapoff.org/wiki/PollMacro [[BR]]''By:'' Alec Thomas -- ''Ver.'' >= 0.7.1 === !AddComment === Adds a textarea to TracWiki pages allowing for quick ''comments'' to be added in a standard format. The comments are fully integrated into the Wiki, incrementing the version number and adding a log comment. ''Download:'' http://trac-hacks.swapoff.org/wiki/AddCommentMacro [[BR]]''By:'' Alec Thomas [[BR]]''Version:'' >= 0.8 and >= [1688] === !SvnFiles === This macro autogenerates a list of clickable file links referring to files in a given directory of the repository whose names match a given regular expression. We needed this for a page giving an overall view of project progress for a project broken up into a shallow hierarchy, combined with ReTickets (below) it autogenerates an overview wiki page. ''Please don't laugh at the code, I've been playing with trac for 2 days and had never touched python before writing these two...'' ''Usage'' {{{ [[SvnFiles(directory,regexp)]] }}} All arguments are needed, god alone knows what happens if you leave them out. ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/SvnFiles.py ''Version:'' 0.8 ''By:'' Simon Stapleton === !ReTickets === This macro autogenerates a list of clickable ticket links (link number and person assigned) referring to tickets whose summaries match a given regular expression. We needed this for a page giving an overall view of project progress for a project broken up into a shallow hierarchy, combined with SvnFiles (above) it autogenerates an overview wiki page. As an added bonus, hovering over the links gives the summary and description of the ticket. ''Usage'' {{{ [[ReTickets(regexp)]] }}} ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/ReTickets.py ''Version:'' 0.8 ''By:'' Simon Stapleton === Search === Build a search URL for the supplied argument or just a link to a search engine if no args are present. Set to use google. Edit the macro to modify the engine(/url). ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/Search.py [[BR]]''Version:'' >= 0.8 [[BR]]''By:'' Muness Alrubaie === !TracSearch === Builds a link to search for a supplied argument in any or all of the wiki, changesets, and tickets. ''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/TracSearch.py [[BR]]''Version:'' >= 0.8 [[BR]]''By:'' Andrew Durdin === Blog === A simple blog macro which renders matched wiki pages on one page. Only one month's wiki pages are shown at once. Usage example: {{{ [[Blog(blog/%)]] [[Blog(2004%,blog/%)]] }}} Note: if you're using macro redirect and AddComment, you may need to modify these macros to disable them by: {{{ if hdf.getValue('macro.blog.rendering', '0') == '1': # workaround: if this wiki is rendering via macro Blog, don't redirect! out.write('
Warning: redirection disabled in Blog mode.
') return out.getvalue() }}} [[BR]]Download: http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/Blog.py [[BR]]By: Walter Wong [[BR]]Version: >=0.8 === Acronym === Add support for HTML acronyms. Usage example: {{{ [[acronym(HTML, Hypertext Markup Language)]] }}} [[BR]]Download: http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/acronym.py [[BR]]By: Justin Palmer [[BR]]Version: >=0.8 === !FootNote === Automatically collates and generates foot-notes. Usage example: {{{ Some text [[FootNote(This is a footnote)]] This foot-note refers to the first[[FootNote(1)]]. ... Listing the foot-notes in this page: [[FootNote]] }}} Multiple sets of foot-notes can be generated and existing foot-notes referred to by index. The latest version coalesces identical foot-note text into a single foot-note. ''Download:'' http://trac-hacks.swapoff.org/wiki/FootNoteMacro [[BR]]''By:'' Alec Thomas [[BR]]''Version:'' >= 0.8 === Image === Display image of attachment or repository file onto any wiki/ticket document. Example {{{ Take image from same page: [[Image(photo.jpg)]] # simple [[Image(photo.jpg,120px)]] # as specified size [[Image(photo.jpg,right)]] # place image in right of page Or from other place: [[Image(OtherPage/foo.bmp)]] # from OtherPage [[Image(wiki/OtherPage/foo.bmp)]] # same above [[Image(ticket/36/boo.jpg)]] # from ticket:36 [[Image(file/images/bee.jpg)]] # from repository }}} See heading comment of source file for more detail. [[BR]]''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/Image.2.py [[BR]]''By:'' Shun-ichi Goto [[BR]]''Version:'' >= 0.8 [[BR]]''Download:'' [http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/Image.3.py Image.3.py] [[BR]]''Version'': >= [1688] === !TicketBox === Display list of ticket numbers in a box on the right side of the page. The purpose of this macro is show related tickets compactly. You can specify ticket number or report number which would be expanded as ticket numbers. Tickets will be displayed as sorted and uniq'ed. Example: {{{ [[TicketBox(#1,#7,#31)]] ... list of tickets [[TicketBox(1,7,31)]] ... '#' char can be omitted [[TicketBox({1})]] ... expand report result as ticket list [[TicketBox([report:1])]] ... alternate format of report [[TicketBox([report:9?name=val])]] ... report with dynamic variable [[TicketBox({1),#50,{2},100)]] ... convination of above [[TicketBox(500pt,{1})]] ... with box width as 50 point [[TicketBox(200px,{1})]] ... with box width as 200 pixel [[TicketBox(25%,{1})]] ... with box width as 25% [[TicketBox('Different Title',#1,#2)]] ... Use different title [[TicketBox("Other Title",#1,#2)]] ... likewise }}} [wiki:TracReports#AdvancedReportsDynamicVariables Dynamic Variables] is supported for report. Variables can be specified like {{{[report:9?PRIORITY=high&COMPONENT=ui]}}}. Of course, the special variable '{{{$USER}}}' is available. [[BR]]''Download:'' http://trac-hacks.swapoff.org/wiki/TicketBoxMacro [[BR]]''By:'' Shun-ichi Goto [[BR]]''Version:'' >= 0.8 (also 0.9pre) [[BR]]''Revised:'' 2005/07/09 === !NotImplemented === The !NotImplemented macro is a simple text output macro for system documentation. It outputs a simple block that states a feature is not implemented and optionally includes a ticket or milestone (or any other wiki content) reference point. Examples: {{{ [[NotImplemented]] }}} {{{ [[NotImplemented(ticket:177)]] }}} and {{{ [[NotImplemented(ticket:177 and ticket:179)]] }}} will output (with the correct wiki links replaced): {{{ #!html
Currently Not Implemented: This feature is planned but is not yet implemented. Please see ticket:177 and ticket:179 for details.
}}} [[BR]]''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/NotImplemented.py [[BR]]''Author:'' ebrown@esolvere.com [[BR]]''Version:'' Tested on 0.9pre === !ChooseTemplate === Allow Trac to support templates for wiki-pages Example: {{{ [[ChooseTemplate]] [[ChooseTemplate(templates)]] }}} The argument has to point to a wikipage whose subpages are the templates. If no argumnent is given, a default argument of "WikiTemplates" is assumed. [[BR]]''Download:'' http://projects.edgewall.com/trac/attachment/wiki/MacroBazaar/ChooseTemplate.1.py [[BR]]''Author:'' spamfaenger at gmx.de [[BR]]''Version:'' Tested on 0.9b2 ''Add your macro here ...'' [wiki:MacroBazaar#Categories (categories)] ---- == Requests == ''Requests, comments, etc go here.'' * Something like pararaph numbers in http://www.blueoxen.org/tools/purplewiki/ helps with documentation authoring. * Request: Extend the !TicketBox macro so that it can display tickets returned by a ticket report as well. Example: {{{[[TicketBox({1},5)]]}}} would show tickets returned by report 1 and ticket no. 5 as well * Good idea. I've implemented and attached. See above. (gotoh) * Request: Extend the !TicketBox macro so that it can display tickets returned by a ticket report using dynamic variables. Example: {{{[[TicketBox(200px,'Active Tickets',[report:11?COMPONENT=name])]]}}} * Ok, implemented. See above. (gotoh) * Request: Binding of the [http://www.nv-l.org/twiki/bin/view/Plugins/TWikiDrawPlugin TWikiDraw] to Trac. Example: drawing:foo * Request: [wiki:MacroBazaar#WikiInclude WikiInclude] doesn't check if user has WIKI_VIEW privilege. This could be considered a security hole, if a user uses wiki formatting in a ticket. * Request: In !ReTickets I'd like to be able to grab tickets including one or more (with regexps even) keywords listed in it, rather then using the summary. Perhaps as an option or new Macro? * Request: In !LastModified or !DateOffset it would be cool to be able to put references to pages, source, changeset, roadmap instead of date only. That way i could display in my user pages a lot of usefull informations (days left before milestone, not modified since, commited since, and so on, ...) * Request: Would be cool to have a [http://www.captcha.net/ captcha] system on a macro like {{{[[captcha(some_email@example.com)]]}}} * Request: It would be cool to have a macro that could include a file in the project repository: {{{[[includeP('trunk/project/main.cpp')]]}}} or, even cooler, part of the file: {{{[[includeLines('trunk/project/main.cpp',from=10,to=5)]]}}} Or the part of a file enclosed by a tag. For example, let trunk/foo.cpp be: {{{ #!cpp ... void a(); //tag1 void b() { ... } //tag1 ... }}} one could write {{{ See for example method "b" in file foo.cpp: [[includetag('trunk/foo.cpp', 'tag1')]] }}} [wiki:MacroBazaar#Categories (categories)] ---- See also: WikiMacros, ProcessorBazaar