diff --git a/docs/en/appendixes/tips.xml b/docs/en/appendixes/tips.xml index 4158e5fe..a6942e55 100644 --- a/docs/en/appendixes/tips.xml +++ b/docs/en/appendixes/tips.xml @@ -9,7 +9,7 @@ There may be times when you want to print a default value for an empty variable instead of printing nothing, such as printing " " so that - table backgrounds work properly. Many would use an {if} statement to + table backgrounds work properly. Many would use an {if} statement to handle this, but there is a shorthand way with Smarty, using the default variable modifier. @@ -32,6 +32,7 @@ ]]> + See also default and Default Variable Handling @@ -54,6 +55,7 @@ ]]> + See also default and Blank Variable Handling Passing variable title to header template @@ -123,7 +125,7 @@ footer.tpl As of Smarty 1.4.0, you can pass dates to Smarty as unix - timestamps, mysql timestamps, or any date parsable by strtotime(). + timestamps, mysql timestamps, or any date parsable by strtotime(). @@ -163,7 +165,7 @@ Jan 4, 2001 - When using {html_select_date} in a template, The programmer will most + When using {html_select_date} in a template, The programmer will most likely want to convert the output from the form back into timestamp format. Here is a function to help you with that. @@ -267,7 +269,7 @@ function insert_header($params) Traditionally, programming templates into your applications goes as follows: First, you accumulate your variables within your PHP application, (maybe with database queries.) Then, you instantiate your - Smarty object, assign the variables and display the template. So lets + Smarty object, assign the variables and display the template. So lets say for example we have a stock ticker on our template. We would collect the stock data in our application, then assign these variables in the template and display it. Now wouldn't it be nice if you could @@ -315,6 +317,7 @@ Stock Name: {$ticker.name} Stock Price: {$ticker.price} ]]> + See also {include_php}, {include} and {php} Obfuscating E-mail Addresses @@ -343,6 +346,7 @@ Send inquiries to e-mail collector to decode these values, but not likely. + See also escape \ No newline at end of file +--> diff --git a/docs/en/designers/language-builtin-functions/language-function-include.xml b/docs/en/designers/language-builtin-functions/language-function-include.xml index 9273990a..92d70d28 100644 --- a/docs/en/designers/language-builtin-functions/language-function-include.xml +++ b/docs/en/designers/language-builtin-functions/language-function-include.xml @@ -84,7 +84,7 @@ Use the syntax for template resources to - include files outside of the $template_dir directory. + include files outside of the $template_dir directory. function include template resource examples @@ -101,6 +101,7 @@ {* include from template resource named "db" *} {include file="db:header.tpl"} +See also {include_php}, {php} Template Resources and Componentized Templates - - html_select_date - - - - - - - - - - Attribute Name - Type - Required - Default - Description - - - - - prefix - string - No - Date_ - what to prefix the var name with - - - time - timestamp/YYYY-MM-DD - No - current time in unix timestamp or YYYY-MM-DD - format - what date/time to use - - - start_year - string - No - current year - the first year in the dropdown, either - year number, or relative to current year (+/- N) - - - end_year - string - No - same as start_year - the last year in the dropdown, either - year number, or relative to current year (+/- N) - - - display_days - boolean - No - true - whether to display days or not - - - display_months - boolean - No - true - whether to display months or not - - - display_years - boolean - No - true - whether to display years or not - - - month_format - string - No - %B - what format the month should be in (strftime) - - - day_format - string - No - %02d - what format the day output should be in (sprintf) - - - day_value_format - string - No - %d - what format the day value should be in (sprintf) - - - year_as_text - boolean - No - false - whether or not to display the year as text - - - reverse_years - boolean - No - false - display years in reverse order - - - field_array - string - No - null - - 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]. - - - - day_size - string - No - null - adds size attribute to select tag if given - - - month_size - string - No - null - adds size attribute to select tag if given - - - year_size - string - No - null - adds size attribute to select tag if given - - - all_extra - string - No - null - adds extra attributes to all select/input tags if - given - - - day_extra - string - No - null - adds extra attributes to select/input tags if - given - - - month_extra - string - No - null - adds extra attributes to select/input tags if - given - - - year_extra - string - No - null - adds extra attributes to select/input tags if - given - - - field_order - string - No - MDY - the order in which to display the fields - - - field_separator - string - No - \n - string printed between different fields - - - month_value_format - string - No - %m - strftime format of the month values, default is - %m for month numbers. - - - year_empty - string - No - null - If supplied then the first element of the year's select-box has this - value as it's label and "" as it's value. This is useful to make the - select-box read "Please select a year" for example. - - Note that you can use values like "-MM-DD" as time-attribute to indicate - an unselected year. - - - month_empty - string - No - null - If supplied then the first element of the month's select-box has this - value as it's label and "" as it's value. . - Note that you can use values like "YYYY--DD" as time-attribute to indicate - an unselected month. - - - day_empty - string - No - null - If supplied then the first element of the day's select-box has this - value as it's label and "" as it's value. - Note that you can use values like "YYYY-MM-" as time-attribute to indicate - an unselected day. - - - - - - html_select_date is a custom function that creates date dropdowns - for you. It can display any or all of year, month, and day. - - -html_select_date - + + html_select_date + + + + + + + + + + Attribute Name + Type + Required + Default + Description + + + + + prefix + string + No + Date_ + what to prefix the var name with + + + time + timestamp/YYYY-MM-DD + No + current time in unix timestamp or YYYY-MM-DD format + what date/time to use + + + start_year + string + No + current year + the first year in the dropdown, either + year number, or relative to current year (+/- N) + + + end_year + string + No + same as start_year + the last year in the dropdown, either + year number, or relative to current year (+/- N) + + + display_days + boolean + No + true + whether to display days or not + + + display_months + boolean + No + true + whether to display months or not + + + display_years + boolean + No + true + whether to display years or not + + + month_format + string + No + %B + what format the month should be in (strftime) + + + day_format + string + No + %02d + what format the day output should be in (sprintf) + + + day_value_format + string + No + %d + what format the day value should be in (sprintf) + + + year_as_text + boolean + No + false + whether or not to display the year as text + + + reverse_years + boolean + No + false + display years in reverse order + + + field_array + string + No + null + + 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]. + + + + day_size + string + No + null + adds size attribute to select tag if given + + + month_size + string + No + null + adds size attribute to select tag if given + + + year_size + string + No + null + adds size attribute to select tag if given + + + all_extra + string + No + null + adds extra attributes to all select/input tags if given + + + day_extra + string + No + null + adds extra attributes to select/input tags if given + + + month_extra + string + No + null + adds extra attributes to select/input tags if given + + + year_extra + string + No + null + adds extra attributes to select/input tags if given + + + field_order + string + No + MDY + the order in which to display the fields + + + field_separator + string + No + \n + string printed between different fields + + + month_value_format + string + No + %m + strftime format of the month values, default is + %m for month numbers. + + + year_empty + string + No + null + If supplied then the first element of the year's select-box has this + value as it's label and "" as it's value. This is useful to make the + select-box read "Please select a year" for example. + Note that you can use values like "-MM-DD" as time-attribute to indicate + an unselected year. + + + month_empty + string + No + null + If supplied then the first element of the month's select-box has this + value as it's label and "" as it's value. . + Note that you can use values like "YYYY--DD" as time-attribute to indicate + an unselected month. + + + day_empty + string + No + null + If supplied then the first element of the day's select-box has this + value as it's label and "" as it's value. + Note that you can use values like "YYYY-MM-" as time-attribute to indicate + an unselected day. + + + + + + html_select_date is a custom function that creates date dropdowns + for you. It can display any or all of year, month, and day. + + + html_select_date + - - -This will output: - - + + + This will output: + + @@ -294,21 +288,21 @@ This will output: ]]> - - + + - -html_select_date - + + html_select_date + - - -This will output: (current year is 2000) - - + + + This will output: (current year is 2000) + + @@ -334,9 +328,16 @@ This will output: (current year is 2000) ]]> - - + + + + See also html_select_time, + date_format, + $smarty.now + and date tips. + + \ No newline at end of file +--> diff --git a/docs/en/designers/language-modifiers/language-modifier-count-characters.xml b/docs/en/designers/language-modifiers/language-modifier-count-characters.xml index 21205731..84240ea6 100644 --- a/docs/en/designers/language-modifiers/language-modifier-count-characters.xml +++ b/docs/en/designers/language-modifiers/language-modifier-count-characters.xml @@ -67,8 +67,8 @@ Cold Wave Linked to Temperatures. ]]> - See also count_paragraphs - count_sentences + See also count_paragraphs, + count_sentences and count_words diff --git a/docs/en/designers/language-modifiers/language-modifier-count-paragraphs.xml b/docs/en/designers/language-modifiers/language-modifier-count-paragraphs.xml index 0ca6235c..8c3a095a 100644 --- a/docs/en/designers/language-modifiers/language-modifier-count-paragraphs.xml +++ b/docs/en/designers/language-modifiers/language-modifier-count-paragraphs.xml @@ -38,8 +38,8 @@ Man is Fatally Slain. Death Causes Loneliness, Feeling of Isolation. ]]> - See also count_characters - count_sentences + See also count_characters, + count_sentences and count_words diff --git a/docs/en/designers/language-modifiers/language-modifier-count-sentences.xml b/docs/en/designers/language-modifiers/language-modifier-count-sentences.xml index f86692b0..7c0460c1 100644 --- a/docs/en/designers/language-modifiers/language-modifier-count-sentences.xml +++ b/docs/en/designers/language-modifiers/language-modifier-count-sentences.xml @@ -37,8 +37,8 @@ Two Soviet Ships Collide - One Dies. Enraged Cow Injures Farmer with Axe. ]]> - See also count_characters - count_paragraphs + See also count_characters, + count_paragraphs and count_words diff --git a/docs/en/designers/language-modifiers/language-modifier-count-words.xml b/docs/en/designers/language-modifiers/language-modifier-count-words.xml index 1610ff30..402f6153 100644 --- a/docs/en/designers/language-modifiers/language-modifier-count-words.xml +++ b/docs/en/designers/language-modifiers/language-modifier-count-words.xml @@ -37,8 +37,8 @@ Dealers Will Hear Car Talk at Noon. ]]> - See also count_characters - count_paragraphs + See also count_characters, + count_paragraphs and count_sentences diff --git a/docs/en/designers/language-modifiers/language-modifier-date-format.xml b/docs/en/designers/language-modifiers/language-modifier-date-format.xml index eed6af9b..1cdffffa 100644 --- a/docs/en/designers/language-modifiers/language-modifier-date-format.xml +++ b/docs/en/designers/language-modifiers/language-modifier-date-format.xml @@ -37,9 +37,9 @@ - This formats a date and time into the given strftime() format. + This formats a date and time into the given strftime() format. Dates can be passed to Smarty as unix timestamps, mysql timestamps - or any string made up of month day year (parsable by strtotime). + or any string made up of month day year (parsable by strtotime). Designers can then use date_format to have complete control of the formatting of the date. If the date passed to date_format is empty and a second parameter is passed, that will be used as the date to @@ -211,6 +211,7 @@ Monday, February 5, 2001 + See also $smarty.now, {html_select_date} and date tips - {$smarty} reserved variable + {$smarty} reserved variables The reserved {$smarty} variable can be used to access several special template variables. The full list of them follows. @@ -56,7 +56,7 @@ The current timestamp can be accessed with {$smarty.now}. The number reflects the number of seconds passed since the so-called Epoch (January 1, 1970) and can be passed directly to - date_format modifier for display purposes. + date_format modifier for display purposes. using {$smarty.now} @@ -137,6 +137,7 @@ This variable is used for printing the right-delimiter value literally. See also {ldelim},{rdelim}. + See also Variables and Config Variables