summaryrefslogtreecommitdiff
path: root/src/replace-table.c
AgeCommit message (Collapse)AuthorFilesLines
2012-12-24block-parser: Add support for custom block functionsTomas Bzatek1-27/+56
Similar to replace-table custom functions, this brings an ability to register custom block functions that can be called from templates with variable arguments. The syntax is as follows: <!-- $(if (function_name(arg1, "arg2", 'arg3'))) --> ... <!-- $(endif (function_name(arg1, "arg2", 'arg3'))) --> An optional exclamation mark before the function name reverts the result (negates) the predicate. This allows template flexibility with respect to the currently processed image.
2012-04-16block-parser: Allow indented token argumentsTomas Bzatek1-1/+19
Some of us like to have indented arguments from a function name.
2012-04-15replace-table: Add support for custom functionsTomas Bzatek1-0/+148
This adds a support for custom (registered) functions that can be called from templates with specified arguments. The syntax is as follows: <!-- $(function_name(arg1, "arg2", 'arg3')) --> Arguments are separated by a comma and can be quoted (recommended). Quoted arguments are allowed to contain a comma as well as another quote when escaped with a backslash. To call a function with no arguments just do "function_name()". Functions are supposed to be registered before actual data are parsed and are called back from within the parser cycle.
2011-06-04replace-table: Add forgotten fileTomas Bzatek1-0/+1
And also bring back glib/gprintf.h include for g_vasprintf().
2011-06-04replace-table: Link to defines table instead of copying on creationTomas Bzatek1-24/+65
This allows actual defines to be used without explicit update. Also brings the benefit of placing empty string when define is not defined.
2011-06-04Introduce conditional systemTomas Bzatek1-6/+40
This is very basic scripting support - simple value retrieval and block conditionals. Defines could be either static from theme setup or programatically added during page generation.
2009-05-10Consolidate data typesTomas Bzatek1-12/+12
2009-04-04Speed up replace table by using token parserTomas Bzatek1-39/+104
2009-04-04New block parserTomas Bzatek1-0/+163