I'm going to explain it right now.
Every time vldPersonals template parser generates template it's searching for {extension_name:}.
Extension files located at /includes/ext/ folder. Most of them can get parameter values following after colon:
{extension_name:limit=6,orderby='postdate'}
In this case we calling extension with name 'extension_name' and giving it to parameters 'limit' with value 6, and 'orderby' with value 'postdate'.
If you wonder what else parameters that extension can use just open file ext.extension_name.php and look at lines containing $params['param_name']. Get ready to a PHP lesson for dummy : ) I'm going to show you few examples you may see in many extensions.
// number of results
$limit = isset($params['limit']) && $params['limit'] ? intval($params['limit']) : 6;
Translation of this shortened php 'if else' statement:
isset($params['limit'])
IF there was 'limit' parameter passed with extension call.
&& $params['limit']
AND passed parameter has value (not empty).
?
THEN
intval($params['limit'])
return integer value of parameter 'limit'
: 6
ELSE 6;
Since we have cool bbcode parser with GeSHi code highlighting here you can click at php functions to get more details.
Similar to intval() for integer type variables (numbers), they use trim() for trimming out spaces before and after string type variables.
Any questions?
Writing of this post was inspired by Dan the great vldPersonals forum contributor.





Comments
radioact
db3204
Log in to leave a comment