#1191 - Custom comcode tags with tempcode

Identifier #1191
Issue type Feature request or suggestion
Title Custom comcode tags with tempcode
Status Completed
Handling member Chris Graham
Addon General / Uncategorised
Description This is a simple example tag for showing reminders/advice to walkers, based on the month, with a given highlighter colour, and a name for the walking location...



Comcode tag:
walking_reminders

Title:
Walking reminders

Description:
Show a walking reminder, tailored to the month.

Parameters:
color=red

Replacement text:
{+START,IF,{$EQ,{$FROM_TIMESTAMP,%b},Nov,Dec,Jan}}
Pack your <span style="color: {COLOR}">gloves</span>, a <span style="color: {COLOR}">hat</span>, and a thick <span style="color: {COLOR}">coat</span>. It'll be cold on the {CONTENT}.
{+END}
{+START,IF,{$EQ,{$FROM_TIMESTAMP,%b},Feb,Mar,Apr}}
Be careful of the <span style="color: {COLOR}">wildlife</span> It's breeding season on {CONTENT}.
{+END}
{+START,IF,{$EQ,{$FROM_TIMESTAMP,%b},May,Jun,Jul}}
Bring plenty of <span style="color: {COLOR}">water</span>, it may be very hot on the {CONTENT}.
{+END}
{+START,IF,{$EQ,{$FROM_TIMESTAMP,%b},Aug,Sep,Oct}}
Wear good <span style="color: {COLOR}">shoes</span>, it may be slippy on the {CONTENT}.
{+END}

Example:
[walking_reminders color="red"][/walking_reminders]

(checkboxes as defaults)
Steps to reproduce

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated