What is vldPersonals?

vldPersonals is a very easy to use dating/social software. It allows you to create a fully functioning & modern dating website in a matter of minutes. If You think it's too complicated - check vldPersonals!
Know more about how You can become a dating website owner

What is vldCrowd?

vldCrowd.com is the biggest unofficial community of vldPersonals owners. It is a place to share ideas and thoughts about Your dating website. It is a place to answer questions and receive answers.
Do You own a vldPersonals license? Don't hesitate and join!

Connect Today

Community members help each other to take their dating websites to the next level. Can You make your vldPersonals website better? Join and find out...

Connect With More Than 500 Dating Website Owners! Sign Up Today

How it's made: Extensions

06/02/2009 12:29 AM
583 1 2
Always wondered how vldP extensions made? What parameters you can use?
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:
 
Text

{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.
 
PHP

// 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

  • Posted on 06/05/2009 11:15 AM
If you have any questions about using extensions feel free to ask here.

db3204

  • Posted on 06/05/2009 10:37 AM
Thanks Ramil for the lesson. I will always feel inadequate when it comes to understanding extensions so this helped. Thanks

Log in to leave a comment