X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=doc%2Fsmarty3-templates.md;h=599e3597e7554baf2e3c53dc3b3f262e6165832d;hb=26acf3d78e7dc6e12f35e8e5a86f14fd446322a8;hp=5c096d2c2d700cb920084909bcfd5fa3dcfab531;hpb=c22920edba4f80fee2d828a9fe265a9cb702e81c;p=friendica.git diff --git a/doc/smarty3-templates.md b/doc/smarty3-templates.md index 5c096d2c2d..599e3597e7 100644 --- a/doc/smarty3-templates.md +++ b/doc/smarty3-templates.md @@ -20,10 +20,10 @@ Templates that are only used by addons shall be placed in the directory. -To render a template use the function *get_markup_template* to load the template and *replace_macros* to replace the macros/variables in the just loaded template file. +To render a template use the function *getMarkupTemplate* to load the template and *replaceMacros* to replace the macros/variables in the just loaded template file. - $tpl = get_markup_template('install_settings.tpl'); - $o .= replace_macros($tpl, array( ... )); + $tpl = Renderer::getMarkupTemplate('install_settings.tpl'); + $o .= Renderer::replaceMacros($tpl, array( ... )); the array consists of an association of an identifier and the value for that identifier, i.e. @@ -39,7 +39,7 @@ They are initialized with an array of data, depending on the tyle of the field. All of these take an array holding the values, e.g. for a one line text input field, which is required and should be used to type email addesses use something along the lines of: - '$adminmail' => array('adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.'), 'required', '', 'email'), + '$adminmail' => array('adminmail', L10n::t('Site administrator email address'), $adminmail, L10n::t('Your account email address must match this in order to use the web admin panel.'), 'required', '', 'email'), To evaluate the input value, you can then use the $_POST array, more precisely the $_POST['adminemail'] variable.