'smarty' Tag

  • Mar
    15
    2009

    How to: Close .tpl access with .htaccess

    The index.php in the template directory only protects you if someone enters the root of a particular directory. However if they know the exact file name they are looking for, it is very possible that the contents of the file will be output into the browser. Particularly for Smarty .tpl files.
    I only thought about this [More...]

  • Mar
    15
    2009

    WHMCS How to: Only display affiliates link to active affiliates

    First find the header.tpl file in your templates folder.
    Now go down to the clientarealinks paragraph and find the line that looks like :

    Code:
    <a href=”affiliates.php”><img src=”images/affiliates.gif” border=”0″ hspace=”5″ alt=”" />{$LANG.affiliatestitle}</a>

    Now replace that line with the following code

    Code:
    {* Check for active affiliate *}
    {php}
    extract($this->_tpl_vars);
    $query = ‘SELECT count(*) as count FROM tblaffiliates WHERE clientid = ‘.$clientsdetails['userid'];
    $result = mysql_query ($query);
    $data [More...]

  • Oct
    17
    2006

    How to: Setting up MySQL recordset as array to be parsed by Smarty

    Here is an example of how to setup your MySQL queries so that they can easily be passed into and parsed by Smarty.
    The result set will be a multidimensional array. The first dimension of the array is numeric and represents each row of your result set. The second dimension of the array is an associative [More...]

  • May
    31
    2006

    How to: Create a site through one index.php controller file

    Here is a simple example to demonstrate an easily maintainable way of setting page loading based on the current URL. It holds all of your available pages in an associative array .. This could easily be pulled from a database.
    I have also included template code to generate a simple menu for you.. You could of [More...]

  • Apr
    28
    2006

    Hack popup_init to include it’s javascript only once per page

    I have just started using the overlib/popup plugin to add some basic help text on my site.. With my current system, templates are not aware of each other, and as a result I need to use the popup_init in multiple places to ensure that the overlib.js is included.
    Unfortunately with the current init plugin, this results [More...]

 
© 2008 - 2012 — All Rights Reserved — Ideamesh, Inc. 22 queries. 0.262 seconds.