Condition X - Conditionally Insert HTML/CSS/JS Aug 7, 2014 11:11:00 GMT -8 Peter, Chris, and 2 more like this
Post by Virgil Sovereign on Aug 7, 2014 11:11:00 GMT -8
|Condition X v1.0.1 |
Author: Virgil Sovereign
Master Plugin: Condition X v1.0.1 Release - Downloadable from the Plugin Library
|Condition Alpha v1.0.1 Release|| ||Condition Alpha.pbp (8.46 KB)|
|Condition Beta v1.0.1 Release|| ||Condition Bravo.pbp (8.46 KB)|
|Condition Charlie v1.0.1 Release|| ||Condition Charlie.pbp (8.46 KB)|
Keys Used: None
Potential uses for the plugin include:
Customizable settings in the plugin UI are:
Like all other plugins, Cond X can also be configured to run only for specific themes and/or for members of sufficient rank.
As of v1.0.1, Cond X can insert HTML content into any selectable element or group of elements rather than just headers and footers.
Cond X is cloneable in the sense that the library edition of the plugin can run alongside any or all of the "stock clone" plugins downloadable at the top of this thread. The stock clone plugins are identical to the master plugin but each retains its own settings. In this way, admins can insert multiple groups of content under multiple sets of conditions.
Presently only three clones exist (Alpha, Beta, and Charlie), hence a board may have up to four independent groups of conditional content. Additional clones will be added if the need ever arises. The plugin UI also includes optional instructions for changing the display name of Cond X (and its clones) to reflect the specific purpose of each instance.
Cond X is not an ideal plugin in all situations. Admins should consider the alternatives:
|In addition to inserting content at a common set of times (see Fig. 4), Cond X v1.0.1+ supports inserting date-specific HTML content by wrapping it in <on date="..."></on> tags. Content inside a tag will only be inserted if the current date satisfies the condition in the tag. In this way, the plugin can be configured to present different contents at different times.|
The full list of valid date parameters is provided in the plugin UI.
Some examples of date-specific HTML are:
<on date="Jan 1">
|Cond X automatically translates special HTML tags and tokens into useful values that can help to personalize content. Tokens can be entered in tag format, such as <me/>, or in parameter format, such as %me%, which is useful for parameters in tag attributes.|
The full list of supported tokens is provided in the plugin UI.
Some examples of HTML tokens are:
"<threadsubject/>" has been flagged as a sensitive topic. Please familiarize
Numerous examples of custom conditions are provided in the plugin UI. Admins that have highly specialized conditions not already covered by the plugin can make requests for "code snippets" in this thread that can be pasted into the plugin settings to realize these conditions. No plugin modification or reinstallation necessary.
Fig. 1 - The WHAT tab of the plugin UI is shown. The UI is extensively documented.
Fig. 2 - The WHO tab of the plugin UI is shown.
Fig. 3 - The WHERE tab of the plugin UI is shown.
Fig. 4 - The WHEN tab of the plugin UI is shown.
|The Proboards plugin manager provides a range of options for conditionally targeting plugins to specific groups, themes, and venues. These conditions are evaluated at the server level and avoid sending content across the internet to users who will never see it, hence they're generally preferable to client-side plugins like Cond X.|
I suspect the plugin manager may eventually reach a level of sophistication that renders Cond X totally obsolete. Until that glorious day, we'll have to make due.
Bugs and Feedback:
|Please notify me of any plugin issues in this thread and I will do my best to resolve them promptly.|
I may also consider certain feature requests if they are reasonable and won't bulk up the code too much.
Aside from that, happy X!
Update to v1.0.1
|- Added support for alternate insertion point.|
- Added support for time-specific HTML content.
- Added support for HTML tokens.
- Minor bug fixes.