Difference between revisions of "Sidebox and popup window structures"

From Zen Cart(tm) Wiki
Jump to: navigation, search
m (Reverted edits by Torke (Talk); changed back to last version by Rowan)
Line 1: Line 1:
{{Template:menuBarCustomising}}
 
  
{{warningBox|Required knowledge|''Before proceeding you must understand the '''[[Customisation - Templates|template system]]'''''.}}
 
 
 
'''"<" and ">" are used to indicate that you should replace what's inside them with whatever appropriate.'''
 
 
 
== Sideboxes File Structure ==
 
<dl>
 
<dt><code>includes/extra_datafiles/filenames_<sidebox_name>.php</code></dt>
 
<dd>Filenames etc, if needed.</dd>
 
<dt><code>includes/languages/<current language>/extra_definitions/<sidebox_name>.php</code></dt>
 
<dd>Language definitions for sidebox content.</dd>
 
<dt><code>includes/languages/<current template>/<current language>.php</code></dt>
 
<dd>Only if the defines you want to change are part of <current language>.php.</dd>
 
<dt><code>includes/modules/sideboxes/<current template>/<sidebox_name>.php</code></dt>
 
<dd>Defines the content of the sidebox, via program flow commands.</dd>
 
<dt><code>includes/templates/<current template>/sideboxes/tpl_<sidebox_name>.php</code></dt>
 
<dd>Assembles the content from the module plus any extras needed.</dd>
 
</dl>
 
 
== Popup Window File Structure ==
 
 
<dl>
 
<dt><code>includes/languages/<current language>/<current template>/popup_<windowname>.php</code></dt>
 
<dd>Definitions</dd>
 
<dt><code>includes/modules/pages/popup_<windowname>/header_php.php</code></dt>
 
<dd>intelligence processing</dd>
 
<dt><code>includes/modules/pages/popup_<windowname>/jscript_main.php</code></dt>
 
<dd>javascript code for function resize(), used to resize a popup window (works best on IMG's, not text)</dd>
 
<dt><code>includes/modules/pages/popup_<windowname>/on_load_main.js</code></dt>
 
<dd>onload action for body tag IF the resize above is used</dd>
 
<dt><code>includes/templates/<current template>/popup_<windowname>/tpl_main_page.php</code></dt>
 
<dd>display driver to remove left/right/top/bottom boxes</dd>
 
<dt><code>includes/templates/<current template>/templates/tpl_popup_<windowname>_default.php</code></dt>
 
<dd>template - actual HTML</dd>
 
<dt><code>includes/extra_datafiles/<custom_filenames>.php</code></dt>
 
<dd>define the popup_<windowname> filename</dd>
 
</dl>
 
 
==== The Following Pages Contain JavaScript Links ====
 
<dl>
 
<dt><code>includes/modules/pages/<page name>/jscript_main.php</code></dt>
 
<dd>javascript code for function popupWindow() with height/width parameters for a popup window</dd>
 
<dt><code>includes/modules/pages/<page name>/main_template_vars_<xxxxxxxx>.php</code></dt>
 
<dd>(use for images) contains a href javascript::popup(url) command</dd>
 
<dt><code>includes/templates/<current template>/templates/tpl_<xxxxxxxx>_default.php</code></dt>
 
<dd>contains the javascript::popup(url) command in a href</dd>
 
</dl>
 
 
{{infoBox|Javascript resize|Note that if javascript function resize() is used on a page, it will override the parameters set as default in function popupWindow().}}
 

Revision as of 00:36, 5 December 2007