summaryrefslogtreecommitdiff
path: root/src/block-parser.c
AgeCommit message (Collapse)AuthorFilesLines
2015-01-26block-parser: Don't call the destroy func on NULL user_data pointerTomas Bzatek1-1/+1
2015-01-25block-parser: Enhance block_parser_register_function() with a destroy notify ↵Tomas Bzatek1-2/+18
callback
2013-02-10generators: Process image blocks through local block parsersTomas Bzatek1-21/+9
This change allows using local defines related to each item in the album or index page.
2013-02-10block-parser: Don't process conditionals when retrieving block dataTomas Bzatek1-4/+20
This allows us to retrieve unmodified block data that could be used for conditional processing later.
2012-12-24block-parser: Relaxed endif()/else() syntax for custom block functionsTomas Bzatek1-4/+30
Specifying all arguments in endif() or else() for custom block functions reduces code readability and debugging comfort. Let's be less strict and don't require them. A simple test for function name should be enough, moreover nesting is not limited by this change at all.
2012-12-24block-parser: Add support for custom block functionsTomas Bzatek1-3/+54
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-5/+5
Some of us like to have indented arguments from a function name.
2011-06-04replace-table: Link to defines table instead of copying on creationTomas Bzatek1-22/+3
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-19/+114
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.
2011-03-31block-parser: Add function to mark block as usedTomas Bzatek1-0/+17
Some blocks such as "IMG_LIST" are containers themselves and no data are retrieved from them. That way they don't ever get marked as used, resulting in constant hit in the generator loop.
2011-01-23Indentation fixesTomas Bzatek1-4/+2
2009-09-20Plug some memory leaksTomas Bzatek1-2/+4
2009-05-10Consolidate data typesTomas Bzatek1-24/+23
2009-04-11Print statistics in verbose modeTomas Bzatek1-1/+1
2009-04-04Speed up replace table by using token parserTomas Bzatek1-48/+2
2009-04-04New block parserTomas Bzatek1-0/+318