Feature #2251
Configurable macros
Start date:
09 Oct 2013
Due date:
12 Oct 2013
% Done:
100%
Description
The syntax of a macro is:
{{name(argument1,option1=value1,argument2) Some text }}
A macro gets implemented using API in a plugin. But unless the macro requires some server-side calculations it should be possible to build it runtime though...
For example, a user can define the code:
<blockquote class="twitter-tweet"><p><...></p>— <{full_name}> (@<{username}>) <a href="https://twitter.com/twitterapi/status/<{status}>"><{date}></a></blockquote> <script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
Where:
<{option}>
– option by name<[1]>
– argument by number (starting from 1)<...>
– text
And then use:
{{tweet(full_name=Twitter API,username=twitterapi,status=133640144317198338,date=November 7 2011) Search API will now always return "real" Twitter user IDs. The with_twitter_user_id parameter is no longer necessary. An era has ended. }}
Disclaimer: This is just an example.
Associated revisions
Custom Wiki macros (#2251)
History
#1 Updated by Andriy Lesyuk about 11 years ago
Thinking about this icon.
#2 Updated by Andriy Lesyuk about 11 years ago
- Assignee set to Andriy Lesyuk
- Target version set to 1.0.0b
- % Done changed from 0 to 70
- External issue set to #2854, #5171
#3 Updated by Andriy Lesyuk about 11 years ago
- Due date set to 12 Oct 2013
- Status changed from Open to Closed
- % Done changed from 70 to 100