I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Feature #2251

Configurable macros

Added by Andriy Lesyuk about 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
09 Oct 2013
Due date:
12 Oct 2013
% Done:

100%

External issue:

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>&mdash; <{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

Revision 56 (diff)
Added by Andriy Lesyuk about 11 years ago

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

Also available in: Atom PDF

Terms of use | Privacy policy