All pastes #259977 Raw Edit

Anonymous

public html v1 · immutable
#259977 ·published 2006-11-27 22:24 UTC
rendered paste body
<HTML><HEAD><TITLE>Smarty - the compiling PHP template engine</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINKREL="NEXT"TITLE="Preface"HREF="preface.html"><METAHTTP-EQUIV="Content-type"CONTENT="text/html; charset=ISO-8859-1"></HEAD><BODYCLASS="book"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="BOOK"><ANAME="manual"></A><DIVCLASS="TITLEPAGE"><H1CLASS="title"><ANAME="bookinfo"></A>Smarty - the compiling PHP template engine</H1><DIVCLASS="author">Monte Ohrt &#60;monte at ohrt dot com&#62;</DIV><DIVCLASS="author">Andrei Zmievski &#60;andrei@php.net&#62;</DIV><PCLASS="pubdate">2006-11-20<BR></P><PCLASS="copyright">Copyright &copy; 2001-2005 New Digital Group, Inc.</P><HR></DIV><DIVCLASS="TOC"><DL><DT><B>Table of Contents</B></DT><DT><AHREF="preface.html">Preface</A></DT><DT>I. <AHREF="getting.started.html">Getting Started</A></DT><DD><DL><DT>1. <AHREF="what.is.smarty.html">What is Smarty?</A></DT><DT>2. <AHREF="installation.html">Installation</A></DT><DD><DL><DT><AHREF="installation.html#installation.requirements">Requirements</A></DT><DT><AHREF="installing.smarty.basic.html">Basic Installation</A></DT><DT><AHREF="installing.smarty.extended.html">Extended Setup</A></DT></DL></DD></DL></DD><DT>II. <AHREF="smarty.for.designers.html">Smarty For Template Designers</A></DT><DD><DL><DT>3. <AHREF="language.basic.syntax.html">Basic Syntax</A></DT><DD><DL><DT><AHREF="language.basic.syntax.html#language.syntax.comments">Comments</A></DT><DT><AHREF="language.syntax.variables.html">Variables</A></DT><DT><AHREF="language.syntax.functions.html">Functions</A></DT><DT><AHREF="language.syntax.attributes.html">Attributes</A></DT><DT><AHREF="language.syntax.quotes.html">Embedding Vars in Double Quotes</A></DT><DT><AHREF="language.math.html">Math</A></DT><DT><AHREF="language.escaping.html">Escaping Smarty Parsing</A></DT></DL></DD><DT>4. <AHREF="language.variables.html">Variables</A></DT><DD><DL><DT><AHREF="language.variables.html#language.assigned.variables">Variables assigned from PHP</A></DT><DT><AHREF="language.config.variables.html">Variables loaded from config files</A></DT><DT><AHREF="language.variables.smarty.html">{$smarty} reserved variable</A></DT></DL></DD><DT>5. <AHREF="language.modifiers.html">Variable Modifiers</A></DT><DD><DL><DT><AHREF="language.modifiers.html#language.modifier.capitalize">capitalize</A></DT><DT><AHREF="language.modifier.cat.html">cat</A></DT><DT><AHREF="language.modifier.count.characters.html">count_characters</A></DT><DT><AHREF="language.modifier.count.paragraphs.html">count_paragraphs</A></DT><DT><AHREF="language.modifier.count.sentences.html">count_sentences</A></DT><DT><AHREF="language.modifier.count.words.html">count_words</A></DT><DT><AHREF="language.modifier.date.format.html">date_format</A></DT><DT><AHREF="language.modifier.default.html">default</A></DT><DT><AHREF="language.modifier.escape.html">escape</A></DT><DT><AHREF="language.modifier.indent.html">indent</A></DT><DT><AHREF="language.modifier.lower.html">lower</A></DT><DT><AHREF="language.modifier.nl2br.html">nl2br</A></DT><DT><AHREF="language.modifier.regex.replace.html">regex_replace</A></DT><DT><AHREF="language.modifier.replace.html">replace</A></DT><DT><AHREF="language.modifier.spacify.html">spacify</A></DT><DT><AHREF="language.modifier.string.format.html">string_format</A></DT><DT><AHREF="language.modifier.strip.html">strip</A></DT><DT><AHREF="language.modifier.strip.tags.html">strip_tags</A></DT><DT><AHREF="language.modifier.truncate.html">truncate</A></DT><DT><AHREF="language.modifier.upper.html">upper</A></DT><DT><AHREF="language.modifier.wordwrap.html">wordwrap</A></DT></DL></DD><DT>6. <AHREF="language.combining.modifiers.html">Combining Modifiers</A></DT><DT>7. <AHREF="language.builtin.functions.html">Built-in Functions</A></DT><DD><DL><DT><AHREF="language.builtin.functions.html#language.function.capture">{capture}</A></DT><DT><AHREF="language.function.config.load.html">{config_load}</A></DT><DT><AHREF="language.function.foreach.html">{foreach},{foreachelse}</A></DT><DT><AHREF="language.function.if.html">{if},{elseif},{else}</A></DT><DT><AHREF="language.function.include.html">{include}</A></DT><DT><AHREF="language.function.include.php.html">{include_php}</A></DT><DT><AHREF="language.function.insert.html">{insert}</A></DT><DT><AHREF="language.function.ldelim.html">{ldelim},{rdelim}</A></DT><DT><AHREF="language.function.literal.html">{literal}</A></DT><DT><AHREF="language.function.php.html">{php}</A></DT><DT><AHREF="language.function.section.html">{section},{sectionelse}</A></DT><DT><AHREF="language.function.strip.html">{strip}</A></DT></DL></DD><DT>8. <AHREF="language.custom.functions.html">Custom Functions</A></DT><DD><DL><DT><AHREF="language.custom.functions.html#language.function.assign">{assign}</A></DT><DT><AHREF="language.function.counter.html">{counter}</A></DT><DT><AHREF="language.function.cycle.html">{cycle}</A></DT><DT><AHREF="language.function.debug.html">{debug}</A></DT><DT><AHREF="language.function.eval.html">{eval}</A></DT><DT><AHREF="language.function.fetch.html">{fetch}</A></DT><DT><AHREF="language.function.html.checkboxes.html">{html_checkboxes}</A></DT><DT><AHREF="language.function.html.image.html">{html_image}</A></DT><DT><AHREF="language.function.html.options.html">{html_options}</A></DT><DT><AHREF="language.function.html.radios.html">{html_radios}</A></DT><DT><AHREF="language.function.html.select.date.html">{html_select_date}</A></DT><DT><AHREF="language.function.html.select.time.html">{html_select_time}</A></DT><DT><AHREF="language.function.html.table.html">{html_table}</A></DT><DT><AHREF="language.function.mailto.html">{mailto}</A></DT><DT><AHREF="language.function.math.html">{math}</A></DT><DT><AHREF="language.function.popup.html">{popup}</A></DT><DT><AHREF="language.function.popup.init.html">{popup_init}</A></DT><DT><AHREF="language.function.textformat.html">{textformat}</A></DT></DL></DD><DT>9. <AHREF="config.files.html">Config Files</A></DT><DT>10. <AHREF="chapter.debugging.console.html">Debugging Console</A></DT></DL></DD><DT>III. <AHREF="smarty.for.programmers.html">Smarty For Programmers</A></DT><DD><DL><DT>11. <AHREF="smarty.constants.html">Constants</A></DT><DD><DL><DT><AHREF="smarty.constants.html#constant.smarty.dir">SMARTY_DIR</A></DT><DT><AHREF="constant.smarty.core.dir.html">SMARTY_CORE_DIR</A></DT></DL></DD><DT>12. <AHREF="api.variables.html">Smarty Class Variables</A></DT><DD><DL><DT><AHREF="api.variables.html#variable.template.dir">$template_dir</A></DT><DT><AHREF="variable.compile.dir.html">$compile_dir</A></DT><DT><AHREF="variable.config.dir.html">$config_dir</A></DT><DT><AHREF="variable.plugins.dir.html">$plugins_dir</A></DT><DT><AHREF="variable.debugging.html">$debugging</A></DT><DT><AHREF="variable.debug.tpl.html">$debug_tpl</A></DT><DT><AHREF="variable.debugging.ctrl.html">$debugging_ctrl</A></DT><DT><AHREF="variable.autoload.filters.html">$autoload_filters</A></DT><DT><AHREF="variable.compile.check.html">$compile_check</A></DT><DT><AHREF="variable.force.compile.html">$force_compile</A></DT><DT><AHREF="variable.caching.html">$caching</A></DT><DT><AHREF="variable.cache.dir.html">$cache_dir</A></DT><DT><AHREF="variable.cache.lifetime.html">$cache_lifetime</A></DT><DT><AHREF="variable.cache.handler.func.html">$cache_handler_func</A></DT><DT><AHREF="variable.cache.modified.check.html">$cache_modified_check</A></DT><DT><AHREF="variable.config.overwrite.html">$config_overwrite</A></DT><DT><AHREF="variable.config.booleanize.html">$config_booleanize</A></DT><DT><AHREF="variable.config.read.hidden.html">$config_read_hidden</A></DT><DT><AHREF="variable.config.fix.newlines.html">$config_fix_newlines</A></DT><DT><AHREF="variable.default.template.handler.func.html">$default_template_handler_func</A></DT><DT><AHREF="variable.php.handling.html">$php_handling</A></DT><DT><AHREF="variable.security.html">$security</A></DT><DT><AHREF="variable.secure.dir.html">$secure_dir</A></DT><DT><AHREF="variable.security.settings.html">$security_settings</A></DT><DT><AHREF="variable.trusted.dir.html">$trusted_dir</A></DT><DT><AHREF="variable.left.delimiter.html">$left_delimiter</A></DT><DT><AHREF="variable.right.delimiter.html">$right_delimiter</A></DT><DT><AHREF="variable.compiler.class.html">$compiler_class</A></DT><DT><AHREF="variable.request.vars.order.html">$request_vars_order</A></DT><DT><AHREF="variable.request.use.auto.globals.html">$request_use_auto_globals</A></DT><DT><AHREF="variable.error.reporting.html">$error_reporting</A></DT><DT><AHREF="variable.compile.id.html">$compile_id</A></DT><DT><AHREF="variable.use.sub.dirs.html">$use_sub_dirs</A></DT><DT><AHREF="variable.default.modifiers.html">$default_modifiers</A></DT><DT><AHREF="variable.default.resource.type.html">$default_resource_type</A></DT></DL></DD><DT>13. <AHREF="api.functions.html">Smarty Class Methods()</A></DT><DD><DL><DT><AHREF="api.append.html">append()</A>&nbsp;--&nbsp;append an element to an assigned array</DT><DT><AHREF="api.append.by.ref.html">append_by_ref()</A>&nbsp;--&nbsp;append values  by reference</DT><DT><AHREF="api.assign.html">assign()</A>&nbsp;--&nbsp;assign values to the templates</DT><DT><AHREF="api.assign.by.ref.html">assign_by_ref()</A>&nbsp;--&nbsp;assign values by reference</DT><DT><AHREF="api.clear.all.assign.html">clear_all_assign()</A>&nbsp;--&nbsp;clears the values of all assigned variables</DT><DT><AHREF="api.clear.all.cache.html">clear_all_cache()</A>&nbsp;--&nbsp;clears the entire template cache</DT><DT><AHREF="api.clear.assign.html">clear_assign()</A>&nbsp;--&nbsp;clears the value of an assigned variable</DT><DT><AHREF="api.clear.cache.html">clear_cache()</A>&nbsp;--&nbsp;clears the cache for a specific template</DT><DT><AHREF="api.clear.compiled.tpl.html">clear_compiled_tpl()</A>&nbsp;--&nbsp;clears the compiled version of the specified template resource</DT><DT><AHREF="api.clear.config.html">clear_config()</A>&nbsp;--&nbsp;clears assigned config variables</DT><DT><AHREF="api.config.load.html">config_load()</A>&nbsp;--&nbsp; loads config file  data and assigns it to the template</DT><DT><AHREF="api.display.html">display()</A>&nbsp;--&nbsp;displays the template</DT><DT><AHREF="api.fetch.html">fetch()</A>&nbsp;--&nbsp;returns the template output</DT><DT><AHREF="api.get.config.vars.html">get_config_vars()</A>&nbsp;--&nbsp;returns the given loaded config variable value</DT><DT><AHREF="api.get.registered.object.html">get_registered_object()</A>&nbsp;--&nbsp;returns a reference to a registered object</DT><DT><AHREF="api.get.template.vars.html">get_template_vars()</A>&nbsp;--&nbsp;returns  assigned variable value(s)</DT><DT><AHREF="api.is.cached.html">is_cached()</A>&nbsp;--&nbsp;returns true if there is a valid cache for this template</DT><DT><AHREF="api.load.filter.html">load_filter()</A>&nbsp;--&nbsp;load a filter plugin</DT><DT><AHREF="api.register.block.html">register_block()</A>&nbsp;--&nbsp;dynamically register block functions plugins</DT><DT><AHREF="api.register.compiler.function.html">register_compiler_function()</A>&nbsp;--&nbsp;dynamically register a compiler function plugin</DT><DT><AHREF="api.register.function.html">register_function()</A>&nbsp;--&nbsp;dynamically register template function plugins</DT><DT><AHREF="api.register.modifier.html">register_modifier()</A>&nbsp;--&nbsp;dynamically register modifier plugin</DT><DT><AHREF="api.register.object.html">register_object()</A>&nbsp;--&nbsp;register an object for use in the templates</DT><DT><AHREF="api.register.outputfilter.html">register_outputfilter()</A>&nbsp;--&nbsp;dynamically register outputfilters</DT><DT><AHREF="api.register.postfilter.html">register_postfilter()</A>&nbsp;--&nbsp;dynamically register postfilters</DT><DT><AHREF="api.register.prefilter.html">register_prefilter()</A>&nbsp;--&nbsp;dynamically register prefilters</DT><DT><AHREF="api.register.resource.html">register_resource()</A>&nbsp;--&nbsp;dynamically register resources</DT><DT><AHREF="api.trigger.error.html">trigger_error()</A>&nbsp;--&nbsp;output an error message</DT><DT><AHREF="api.template.exists.html">template_exists()</A>&nbsp;--&nbsp;checks whether the specified template exists</DT><DT><AHREF="api.unregister.block.html">unregister_block()</A>&nbsp;--&nbsp;dynamically unregister block function plugins</DT><DT><AHREF="api.unregister.compiler.function.html">unregister_compiler_function()</A>&nbsp;--&nbsp;dynamically unregister a compiler function</DT><DT><AHREF="api.unregister.function.html">unregister_function</A>&nbsp;--&nbsp;dynamically unregister template function plugin</DT><DT><AHREF="api.unregister.modifier.html">unregister_modifier()</A>&nbsp;--&nbsp;dynamically unregister modifier plugin</DT><DT><AHREF="api.unregister.object.html">unregister_object()</A>&nbsp;--&nbsp;dynamically unregister an object</DT><DT><AHREF="api.unregister.outputfilter.html">unregister_outputfilter()</A>&nbsp;--&nbsp;dynamically unregister an output filter</DT><DT><AHREF="api.unregister.postfilter.html">unregister_postfilter()</A>&nbsp;--&nbsp;dynamically unregister a postfilter</DT><DT><AHREF="api.unregister.prefilter.html">unregister_prefilter()</A>&nbsp;--&nbsp;dynamically unregister a prefilter</DT><DT><AHREF="api.unregister.resource.html">unregister_resource()</A>&nbsp;--&nbsp;dynamically unregister a resource plugin</DT></DL></DD><DT>14. <AHREF="caching.html">Caching</A></DT><DD><DL><DT><AHREF="caching.html#caching.setting.up">Setting Up Caching</A></DT><DT><AHREF="caching.multiple.caches.html">Multiple Caches Per Page</A></DT><DT><AHREF="caching.groups.html">Cache Groups</A></DT><DT><AHREF="caching.cacheable.html">Controlling Cacheability of Plugins' Output</A></DT></DL></DD><DT>15. <AHREF="advanced.features.html">Advanced Features</A></DT><DD><DL><DT><AHREF="advanced.features.html#advanced.features.objects">Objects</A></DT><DT><AHREF="advanced.features.prefilters.html">Prefilters</A></DT><DT><AHREF="advanced.features.postfilters.html">Postfilters</A></DT><DT><AHREF="advanced.features.outputfilters.html">Output Filters</A></DT><DT><AHREF="section.template.cache.handler.func.html">Cache Handler Function</A></DT><DT><AHREF="template.resources.html">Resources</A></DT></DL></DD><DT>16. <AHREF="plugins.html">Extending Smarty With Plugins</A></DT><DD><DL><DT><AHREF="plugins.html#plugins.howto">How Plugins Work</A></DT><DT><AHREF="plugins.naming.conventions.html">Naming Conventions</A></DT><DT><AHREF="plugins.writing.html">Writing Plugins</A></DT><DT><AHREF="plugins.functions.html">Template Functions</A></DT><DT><AHREF="plugins.modifiers.html">Modifiers</A></DT><DT><AHREF="plugins.block.functions.html">Block Functions</A></DT><DT><AHREF="plugins.compiler.functions.html">Compiler Functions</A></DT><DT><AHREF="plugins.prefilters.postfilters.html">Prefilters/Postfilters</A></DT><DT><AHREF="plugins.outputfilters.html">Output Filters</A></DT><DT><AHREF="plugins.resources.html">Resources</A></DT><DT><AHREF="plugins.inserts.html">Inserts</A></DT></DL></DD></DL></DD><DT>IV. <AHREF="appendixes.html">Appendixes</A></DT><DD><DL><DT>17. <AHREF="troubleshooting.html">Troubleshooting</A></DT><DD><DL><DT><AHREF="troubleshooting.html#smarty.php.errors">Smarty/PHP errors</A></DT></DL></DD><DT>18. <AHREF="tips.html">Tips &#38; Tricks</A></DT><DD><DL><DT><AHREF="tips.html#tips.blank.var.handling">Blank Variable Handling</A></DT><DT><AHREF="tips.default.var.handling.html">Default Variable Handling</A></DT><DT><AHREF="tips.passing.vars.html">Passing variable title to header template</A></DT><DT><AHREF="tips.dates.html">Dates</A></DT><DT><AHREF="tips.wap.html">WAP/WML</A></DT><DT><AHREF="tips.componentized.templates.html">Componentized Templates</A></DT><DT><AHREF="tips.obfuscating.email.html">Obfuscating E-mail Addresses</A></DT></DL></DD><DT>19. <AHREF="resources.html">Resources</A></DT><DT>20. <AHREF="bugs.html">BUGS</A></DT></DL></DD></DL></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">&nbsp;</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top">&nbsp;</TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="preface.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">&nbsp;</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top">&nbsp;</TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Preface</TD></TR></TABLE></DIV></BODY></HTML>