(These are all string utility functions) |
(Copied from http://wiki.simplemachines.org/smf/index.php?title=$smcFunc/sandbox&oldid=13657) |
||
Line 1: | Line 1: | ||
<!-- Please do not remove -->__NOEDITSECTION__<!-- | <!-- Please do not remove -->__NOEDITSECTION__<!-- | ||
-->{{TOCright}} | -->{{TOCright}} | ||
These functions are used | These functions are used throught SMF code in order to deal with different versions of php, different character sets, and different databases. | ||
==String Utility Functions== | ==String Utility Functions== | ||
These functions are defined in function reloadSettings, in Load.php. Some of these functions have the same name as standard PHP functions, but were designed to deal uniformly with UTF-8 character sets, HTML entities, and differences in behavior in different versions of PHP. It is recommended that they be used instead of the functions they replace. | These functions are defined in function reloadSettings, in Load.php. Some of these functions have the same name as standard PHP functions, but were designed to deal uniformly with UTF-8 character sets, HTML entities, and differences in behavior in different versions of PHP. It is recommended that they be used instead of the functions they replace. | ||
{{#ask: [[Category:General Utility Functions]] | |||
{{#ask: [[Category:General Utility Functions]] [[SMC_internal::false]] | |||
|sort=SMC_order_position,SMC_function | |sort=SMC_order_position,SMC_function | ||
|order=ascending,ascending | |order=ascending,ascending | ||
Line 16: | Line 17: | ||
Below is a list of the database functions that currently exist in 2.0. Each of these links will direct you towards a section about that function that will help you understand what each one does, how its input is expected and if possible, the exact duplicate function for mysql. An example is provided as well for most of these, these examples come straight from the SMF Source code. | Below is a list of the database functions that currently exist in 2.0. Each of these links will direct you towards a section about that function that will help you understand what each one does, how its input is expected and if possible, the exact duplicate function for mysql. An example is provided as well for most of these, these examples come straight from the SMF Source code. | ||
Please note our [[Function database|Function Database]] now has the latest SMF 2.0 | Please note our [[Function database|Function Database]] now has detailed information on the latest SMF 2.0 functions. For each of the smcFunc entries below, you will find a corresponding function name with an 'smf_' prefix. So, for $smcFunc['db_insert'], see the function 'smf_db_insert'. | ||
{{#ask: [[Category:Database Functions]] | {{#ask: [[Category:Database Functions]][[SMC_internal::false]] | ||
|format=template | |format=template | ||
|template=smcFunc_list | |template=smcFunc_list | ||
Line 33: | Line 34: | ||
==Database Package Functions== | ==Database Package Functions== | ||
{{#ask: [[Category:Database Package Functions]] | {{#ask: [[Category:Database Package Functions]][[SMC_internal::false]] | ||
|format=template | |format=template | ||
|template=smcFunc_list | |template=smcFunc_list | ||
Line 46: | Line 47: | ||
}} | }} | ||
{{ | ==Other functions== | ||
[[ | These functions are only used internally by other $smcFunc functions, and should not be called directly. | ||
{{#ask: [[SMC_internal::true]] | |||
|format=template | |||
|template=smcFunc_list_short | |||
|introtemplate=smcFunc_list_short_header | |||
|outrotemplate=smcFunc_list_footer | |||
|sort=SMC_order_position,SMC_function | |||
|order=ascending,ascending | |||
|?SMC_function=function | |||
|?SMC_description_text=description | |||
}} |
Revision as of 13:18, 15 October 2012
These functions are used throught SMF code in order to deal with different versions of php, different character sets, and different databases.
String Utility Functions
These functions are defined in function reloadSettings, in Load.php. Some of these functions have the same name as standard PHP functions, but were designed to deal uniformly with UTF-8 character sets, HTML entities, and differences in behavior in different versions of PHP. It is recommended that they be used instead of the functions they replace.
{{#ask: SMC_internal::false |sort=SMC_order_position,SMC_function |order=ascending,ascending |format=template |template=smcFunc_ulist |?SMC_function=function }}
Database Functions
In SMF 2.0, multiple database support was introduced. This was implemented by developers as a new layer of database functions along with a new security model, which provides a fast and secure method to work across database systems. Below is a list of the database functions that currently exist in 2.0. Each of these links will direct you towards a section about that function that will help you understand what each one does, how its input is expected and if possible, the exact duplicate function for mysql. An example is provided as well for most of these, these examples come straight from the SMF Source code.
Please note our Function Database now has detailed information on the latest SMF 2.0 functions. For each of the smcFunc entries below, you will find a corresponding function name with an 'smf_' prefix. So, for $smcFunc['db_insert'], see the function 'smf_db_insert'.
{{#ask:SMC_internal::false |format=template |template=smcFunc_list |introtemplate=smcFunc_list_header |outrotemplate=smcFunc_list_footer |sort=SMC_order_position,SMC_function |order=ascending,ascending |?SMC_function=function |?SMC_usage_exm=usage |?SMC_description_text=description |?SMC_parameters=parameters }}
Database Package Functions
{{#ask:SMC_internal::false |format=template |template=smcFunc_list |introtemplate=smcFunc_list_header |outrotemplate=smcFunc_list_footer |sort=SMC_order_position,SMC_function |order=ascending,ascending |?SMC_function=function |?SMC_usage_exm=usage |?SMC_description_text=description |?SMC_parameters=parameters }}
Other functions
These functions are only used internally by other $smcFunc functions, and should not be called directly. {{#ask: SMC_internal::true |format=template |template=smcFunc_list_short |introtemplate=smcFunc_list_short_header |outrotemplate=smcFunc_list_footer |sort=SMC_order_position,SMC_function |order=ascending,ascending |?SMC_function=function |?SMC_description_text=description }}