diff --git a/docs/en/designers/chapter-debugging-console.xml b/docs/en/designers/chapter-debugging-console.xml index 4d8a2241..598aa2ce 100644 --- a/docs/en/designers/chapter-debugging-console.xml +++ b/docs/en/designers/chapter-debugging-console.xml @@ -8,36 +8,41 @@ included templates, assigned variables and config - file variables - for the current invocation of the template. A template named "debug.tpl" is - included with the distribution of Smarty which controls the formatting of - the console. Set - $debugging to true in Smarty, and if needed set - $debug_tpl - to the template resource path for debug.tpl (this is in - SMARTY_DIR by - default.) When you load the page, a javascript console window should pop up + file variables for the current invocation of the template. A template file + named debug.tpl is included with the distribution of + Smarty which controls the formatting of the console. + + + Set $debugging + to &true; in Smarty, and if needed set + $debug_tpl to the template resource path to + debug.tpl (this is in + SMARTY_DIR by default). + When you load the page, a Javascript console window will pop up and give you the names of all the included templates and assigned variables - for the current page. To see the available variables for a particular - templates, see the {debug} - template function. To disable the debugging console, set - $debugging to - false. You can also temporarily turn on the debugging console by putting - SMARTY_DEBUG in the URL if you enable this option with $debugging_ctrl. + for the current page. + To see the available variables for a particular + template, see the + {debug} template function. + To disable the debugging console, set + $debugging to + &false;. You can also temporarily turn on the debugging console by putting + SMARTY_DEBUG in the URL if you enable this option with + $debugging_ctrl + . Technical Note The debugging console does not work when you use the - fetch() - API, only when using - display(). + fetch() + API, only when using + display(). It is a set of javascript statements added to the very bottom of the generated template. If you do not like javascript, - you can edit the debug.tpl template to format the output however you like. - Debug data is not cached and debug.tpl info is not included in the output of - the debug console. + you can edit the debug.tpl template to format the output + however you like. Debug data is not cached and debug.tpl + info is not included in the output of the debug console. @@ -49,9 +54,10 @@ See also troubleshooting, - $error_reporting + + $error_reporting and - trigger_error(). + trigger_error(). diff --git a/docs/en/designers/language-basic-syntax/language-syntax-comments.xml b/docs/en/designers/language-basic-syntax/language-syntax-comments.xml index dc286994..9bdffe9f 100644 --- a/docs/en/designers/language-basic-syntax/language-syntax-comments.xml +++ b/docs/en/designers/language-basic-syntax/language-syntax-comments.xml @@ -6,9 +6,9 @@ Template comments are surrounded by asterisks, and that is surrounded by the delimiter - tags like so: {* this is a comment *} + tags like so: {* this is a comment *} Smarty comments are NOT displayed in the final output of the template, - unlike <!-- HTML comments --> + unlike <!-- HTML comments --> these are useful for making internal notes in the templates which no one will see ;-) diff --git a/docs/en/designers/language-custom-functions/language-function-html-image.xml b/docs/en/designers/language-custom-functions/language-function-html-image.xml index 7590dfea..67449a52 100644 --- a/docs/en/designers/language-custom-functions/language-function-html-image.xml +++ b/docs/en/designers/language-custom-functions/language-function-html-image.xml @@ -5,7 +5,7 @@ {html_image} is a custom function - that generates a HTML <img> tag. + that generates an HTML <img> tag. The height and width are automatically calculated from the image file if they are not supplied. @@ -92,8 +92,8 @@ href is the href value to link the image to. - If link is supplied, an <a href="LINKVALUE"><a> tag is placed - around the image tag. + If link is supplied, an <a href="LINKVALUE"><a> + tag is placed around the image tag. @@ -104,7 +104,7 @@ All parameters that are not in the list above are printed as - name/value-pairs inside the created <img> tag. + name/value-pairs inside the created <img> tag. diff --git a/docs/en/designers/language-custom-functions/language-function-html-options.xml b/docs/en/designers/language-custom-functions/language-function-html-options.xml index fb916afc..4b10dcd4 100644 --- a/docs/en/designers/language-custom-functions/language-function-html-options.xml +++ b/docs/en/designers/language-custom-functions/language-function-html-options.xml @@ -5,7 +5,7 @@ {html_options} is a custom function - that creates a html <select><option> group + that creates the html <select><option> group with the assigned data. It takes care of which item(s) are selected by default as well. @@ -32,35 +32,35 @@ array Yes, unless using options attribute n/a - an array of values for dropdown + An array of values for dropdown output array Yes, unless using options attribute n/a - an array of output for dropdown + An array of output for dropdown selected string/array No empty - the selected option element(s) + The selected option element(s) options associative array Yes, unless using values and output n/a - an associative array of values and output + An associative array of values and output name string No empty - name of select group + Name of select group @@ -76,18 +76,19 @@ If the optional name attribute is given, the - <select></select> tags are created, - otherwise ONLY the <option>'s list are generated. + <select></select> tags are created, + otherwise ONLY the <option> list is generated. - If a given value is an array, it will treat it as an html <optgroup>, - and display the groups. Recursion is supported with <optgroup>. + If a given value is an array, it will treat it as an html + <optgroup>, and display the groups. + Recursion is supported with <optgroup>. - All parameters that are not in the list above are printed as - name/value-pairs inside the <select> tag. They are ignored if + All parameters that are not in the list above are printed as name/value-pairs + inside the <select> tag. They are ignored if the optional name is not given. @@ -114,7 +115,7 @@ $smarty->assign('mySelect', 9904); The following template will generate a drop-down list. Note the presence of the name attribute - which creates the <select> tags. + which creates the <select> tags. assign('mySelect', 9904); -Dropdown with seperate arrays for ouptut. +Dropdown with seperate arrays for <varname>values</varname> and +<varname>ouptut</varname> assign('customer_id', 92); ]]> - The above arrays would be output with the following template. - Note the sneaky use of the php + The above arrays would be output with the following template + (note the use of the php count() function as a modifier - to set the select size. + to set the select size). assign('contact',$db->getRow($sql)); ]]> -Where a template could be as follows. Note the use of the truncate modifier. +Where a template could be as follows. Note the use of the +truncate +modifier. assign('fav', 7); ?> ]]> - With the template would be - + The script above and the following template assign('fav', 7); - Output of the above example would be: + would output: {html_radios} is a custom function - that creates html radio button group. - It takes care of which item is selected by default as well. + that creates a HTML radio button group. + It also takes care of which item is selected by default as well. @@ -32,49 +32,49 @@ string No radio - name of radio list + Name of radio list values array Yes, unless using options attribute n/a - an array of values for radio buttons + An array of values for radio buttons output array Yes, unless using options attribute n/a - an array of output for radio buttons + An array of output for radio buttons selected string No empty - the selected radio element + The selected radio element options associative array Yes, unless using values and output n/a - an associative array of values and output + An associative array of values and output separator string No empty - string of text to separate each radio item + String of text to separate each radio item assign string No empty - assign radio tags to an array instead of output + Assign radio tags to an array instead of output @@ -92,8 +92,9 @@ - All parameters that are not in the list above are printed as - name/value-pairs inside each of the created <input>-tags. + All parameters that are not in the list above are output as + name/value-pairs inside each of the created + <input>-tags. diff --git a/docs/en/designers/language-custom-functions/language-function-html-select-date.xml b/docs/en/designers/language-custom-functions/language-function-html-select-date.xml index 83f7e0a6..e184e9d9 100644 --- a/docs/en/designers/language-custom-functions/language-function-html-select-date.xml +++ b/docs/en/designers/language-custom-functions/language-function-html-select-date.xml @@ -8,7 +8,8 @@ that creates date dropdowns. It can display any or all of year, month, and day. All parameters that are not in the list below are printed as - name/value-pairs inside the <select> tags of day, month and year. + name/value-pairs inside the <select> tags + of day, month and year. @@ -33,21 +34,21 @@ string No Date_ - what to prefix the var name with + What to prefix the var name with time - timestamp/YYYY-MM-DD + timestamp/ YYYY-MM-DD No current time in unix timestamp or YYYY-MM-DD format - what date/time to use + What date/time to use start_year string No current year - the first year in the dropdown, either + The first year in the dropdown, either year number, or relative to current year (+/- N) @@ -55,7 +56,7 @@ string No same as start_year - the last year in the dropdown, either + The last year in the dropdown, either year number, or relative to current year (+/- N) @@ -63,56 +64,56 @@ boolean No &true; - whether to display days or not + Whether to display days or not display_months boolean No &true; - whether to display months or not + Whether to display months or not display_years boolean No &true; - whether to display years or not + Whether to display years or not month_format string No %B - what format the month should be in (strftime) + What format the month should be in (strftime) day_format string No %02d - what format the day output should be in (sprintf) + What format the day output should be in (sprintf) day_value_format string No %d - what format the day value should be in (sprintf) + What format the day value should be in (sprintf) year_as_text boolean No &false; - whether or not to display the year as text + Whether or not to display the year as text reverse_years boolean No &false; - display years in reverse order + Display years in reverse order field_array @@ -120,7 +121,7 @@ No null - if a name is given, the select boxes will be drawn + If a name is given, the select boxes will be drawn such that the results will be returned to PHP in the form of name[Day], name[Year], name[Month]. @@ -130,70 +131,70 @@ string No null - adds size attribute to select tag if given + Adds size attribute to select tag if given month_size string No null - adds size attribute to select tag if given + Adds size attribute to select tag if given year_size string No null - adds size attribute to select tag if given + Adds size attribute to select tag if given all_extra string No null - adds extra attributes to all select/input tags if given + Adds extra attributes to all select/input tags if given day_extra string No null - adds extra attributes to select/input tags if given + Adds extra attributes to select/input tags if given month_extra string No null - adds extra attributes to select/input tags if given + Adds extra attributes to select/input tags if given year_extra string No null - adds extra attributes to select/input tags if given + Adds extra attributes to select/input tags if given field_order string No MDY - the order in which to display the fields + The order in which to display the fields field_separator string No \n - string printed between different fields + String printed between different fields month_value_format string No %m - strftime format of the month values, default is + strftime() format of the month values, default is %m for month numbers. @@ -233,9 +234,9 @@ - There's an useful php function on the + There is an useful php function on the date tips page for converting - {html_select_date} values to a timestamp. + {html_select_date} form values to a timestamp. @@ -277,7 +278,7 @@ ]]> @@ -288,8 +289,8 @@ diff --git a/docs/en/designers/language-custom-functions/language-function-html-select-time.xml b/docs/en/designers/language-custom-functions/language-function-html-select-time.xml index 8b6c2097..8458abec 100644 --- a/docs/en/designers/language-custom-functions/language-function-html-select-time.xml +++ b/docs/en/designers/language-custom-functions/language-function-html-select-time.xml @@ -10,8 +10,8 @@ The time attribute can have different formats. - It can be a unique timestamp, a string of the format YYYYMMDDHHMMSS - or a string that is parseable by php's + It can be a unique timestamp, a string of the format + YYYYMMDDHHMMSS or a string that is parseable by PHP's strtotime(). diff --git a/docs/en/designers/language-custom-functions/language-function-html-table.xml b/docs/en/designers/language-custom-functions/language-function-html-table.xml index b8c05d7b..e2430a05 100644 --- a/docs/en/designers/language-custom-functions/language-function-html-table.xml +++ b/docs/en/designers/language-custom-functions/language-function-html-table.xml @@ -5,7 +5,7 @@ {html_table} is a custom function - that dumps an array of data into an HTML table. + that dumps an array of data into an HTML <table>. @@ -30,7 +30,7 @@ array Yes n/a - array of data to loop through + Array of data to loop through cols @@ -38,7 +38,7 @@ No 3 - number of columns in the table or a comma-separated list of column heading + Number of columns in the table or a comma-separated list of column heading names or an array of column heading names.if the cols-attribute is empty, but rows are given, then the number of cols is computed by the number of rows and the number of elements to display to be just enough cols to @@ -53,7 +53,7 @@ No empty - number of rows in the table. if the rows-attribute is empty, but + Number of rows in the table. if the rows-attribute is empty, but cols are given, then the number of rows is computed by the number of cols and the number of elements to display to be just enough rows to display all elements. @@ -65,7 +65,7 @@ No cols - direction of consecutive elements in the loop-array to be + Direction of consecutive elements in the loop-array to be rendered. cols means elements are displayed col-by-col. rows means elements are displayed row-by-row. @@ -76,44 +76,46 @@ string No empty - - text to be used for the caption element of the table. - + Text to be used for the <caption> + element of the table table_attr string No border="1" - attributes for table tag + Attributes for <table> tag th_attr string No empty - attributes for th tag (arrays are cycled) + Attributes for <th> tag + (arrays are cycled) tr_attr string No empty - attributes for tr tag (arrays are cycled) + attributes for <tr> tag + (arrays are cycled) td_attr string No empty - attributes for td tag (arrays are cycled) + Attributes for <td> tag + (arrays are cycled) trailpad string No &nbsp; - value to pad the trailing cells on last row with (if any) + Value to pad the trailing cells on last row with (if any) hdir @@ -121,7 +123,7 @@ No right - direction of each row to be rendered. possible values: + Direction of each row to be rendered. possible values: right (left-to-right), and left (right-to-left) @@ -132,7 +134,7 @@ No down - direction of each column to be rendered. possible values: + Direction of each column to be rendered. possible values: down (top-to-bottom), up (bottom-to-top) @@ -150,7 +152,8 @@ The table_attr, tr_attr and td_attr values determine the attributes given - to the <table>, <tr> and <td> tags. + to the <table>, <tr> + and <td> tags. @@ -169,8 +172,8 @@ assign('data',array(1,2,3,4,5,6,7,8,9)); -$smarty->assign('tr',array('bgcolor="#eeeeee"','bgcolor="#dddddd"')); +$smarty->assign( 'data', array(1,2,3,4,5,6,7,8,9) ); +$smarty->assign( 'tr', array('bgcolor="#eeeeee"','bgcolor="#dddddd"') ); $smarty->display('index.tpl'); ?> ]]> diff --git a/docs/en/designers/language-custom-functions/language-function-mailto.xml b/docs/en/designers/language-custom-functions/language-function-mailto.xml index b4e65b3d..272272d7 100644 --- a/docs/en/designers/language-custom-functions/language-function-mailto.xml +++ b/docs/en/designers/language-custom-functions/language-function-mailto.xml @@ -3,9 +3,9 @@ {mailto} - {mailto} automates the creation of mailto: links - and optionally encodes them. Encoding e-mails makes it more difficult for - web spiders to lift e-mail addresses off of a site. + {mailto} automates the creation of a mailto: + anchor links and optionally encodes them. Encoding emails makes it more + difficult for web spiders to lift email addresses off of a site. Technical Note @@ -117,7 +117,7 @@ {mailto address="me@example.com" encode="javascript"} {mailto address="me@example.com" encode="hex"} @@ -134,9 +134,9 @@ {mailto address="me@example.com" encode="javascript_charcode"} ]]> @@ -145,8 +145,8 @@ See also escape, {textformat} - and the - obfuscating email addresses page. + and + obfuscating email addresses.