Jac Content Variables Plugin

Plugin Name:phileJacContentVariables
Version:0.5
Description:Add custom variables in your content before it is parsed.
Last Update:2013/10/21
Author:jacmgr
Comments: See Comment Section Tags:

Add custom variables in your content before it is parsed. . An official addon already exists; however, i needed a little more features. Primarily escaping the display of the variable names.

Escapeing Meta Tags

The changes i made could easily be incorporated into the phile official plugin if someone wants to do that.

Compared to official plugin, I did not implement the $this->settings['open_tag'] and $this->settings['close_tag']. My version always assumes you are using %.

Added Feature: You can escape the variable names so they appear in documentation and code blocks. The escape character is \.

So this Content

The **%title%** is a very interesting page by **%author%** and was last updated on **%revisiondate%** ...

Results in substituted final content as normal phile:

The Jac Content Variables Plugin is a very interesting page by jacmgr and was written on 1382338800 ...

And this Content with escapes

The **\%title%** is a very interesting page by **\%author% and was last updated on **\%revisiondate%** ...

Results in no substitution of the variables:

The %title% is a very interesting page by %author% and was last updated on %revisiondate% ...