Smarty Template Guide


Stockbox Photo®Gallery Software version 4.00 and above utilizes the smarty template engine for its gallery templates. All smarty gallery templates are located in the tpl folder and its modules directories. You should have prior working knowledge of the Smarty Template Engine before attempting to modify any of these templates. It is recommended that you make a backup of the tpl folder before editing any of the Smarty templates, so that the original files can easily be replaced should problems occur. Please note that requests to modify the smarty templates, or the resolution of issues caused by changes to the smarty templates are not covered by standard support.

  • template_type:
     There are three types of templates that you need to be aware of:
     
    1. Any file that begins with "admin_" is used by the admin control panel. These templates should NOT be edited.
    2. Any file that begins with "cb_" is used by the photographers section. These templates may be edited with care. Make a backup before editing, so that you can re-upload the original if you experience issues after editing.
    3. Any file that begins with "user_" is used by public and private galleries. You can change the gallery layout by editing the smarty templates, but you must know how the Smarty engine works before doing so. These templates may be edited with care. Make a backup before editing, so that you can re-upload the original if you experience issues after editing.
       
  • module_name_prefix: This is the first two letters of the module name. You can determine the page's module_name_prefix by the module variable in this page's URL's query string. e.g. If the URL is http://www.yourdomain.com/your_folder/private_gallery.php?module=media&pId=101&start=0, then the module variable is media, so the module_name_prefix will be "me".
    Note: If there are two or more modules that have a similar name to the first module name, then the module_name_prefix name will add a  letter for each similar module name. e.g. The modules list have two module names that are similar to each other, they are company and config modules, so the module_name_prefix for company is co and the module_name_prefix for config is con.
     
  • pId: Similar to the module_name_prefix, the pId can also be found in the URL query string. If there is no pId in the query string, the default value of 100 will be used.
     
  • template_name: The last template_name prefix will only be used if the three prefixes before it coincide .e.g. the tpl\english\media_manager folder have more than one user_me_102 file, so first file will be user_me_102.tpl, the second will be user_me_102_download_link.tpl and so on.

The template name structure: <template_type>_<module_name_prefix>_<pId>_<template_name>.tpl.

template_type = user
module_name_prefix = me
pId = 102
template_name = download_link

Therefore the corresponding Smarty template is tpl/english/media_manager/user_me_102_download_link.tpl

Basic Template Guide

 
Home Page (Ent. Version) Category Page New Additions Page & Most Popular Page Media Detail Page
Lightbox Page Products Page Subscription - Confirmation Page CD Collections - Confirmation Page
Customer Login Page Customer "My Account" page Shopping Cart page if the payment method is PPP Checkout Confirmation page if the payment method is PPP
Guest Checkout Confirmation Page if the payment method is PPP Shopping Cart page if the payment method is Duration or Credit Subscription Shopping Cart page if the payment method is Package Subscription Checkout Confirmation page if the payment method is Credit, Duration or Package Subscription
Offline Form Page News Page News Detail Page Portfolio Page
Search Result Page Advanced Search Page CD Collections Page Private Gallery Login Page
About Us Page Contact Us Page Order Info Page Photographer Section
Affiliate Section      
     
 

 

Content Copyright © 2003 - 2012  Stockbox Photo®Gallery Software
www.stockboxphoto.com. All rights reserved