$smcFunc From Online Manual

Revision as of 12:09, 16 October 2013 by Andershz (talk | contribs) (Added info about db_extend('packages'))
Jump to: navigation, search

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

The below functions only exist when using db_extend('packages');. By Default this is automatically called in the Package Manager, but not when using SSI. {{#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 }}



Advertisement: