User Defined Tags
Deprecated: Creation of dynamic property CMS_Smarty_Template::$compiled is deprecated in /home/.sites/78/site4192458/web/lib/smarty/sysplugins/smarty_internal_template.php on line 640 Deprecated: Creation of dynamic property CMS_Smarty_Template::$compiler is deprecated in /home/.sites/78/site4192458/web/lib/smarty/sysplugins/smarty_internal_template.php on line 640 Deprecated: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /home/.sites/78/site4192458/web/lib/smarty/sysplugins/smarty_internal_templatelexer.php on line 310 Deprecated: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /home/.sites/78/site4192458/web/lib/smarty/sysplugins/smarty_internal_templatelexer.php on line 310 Deprecated: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /home/.sites/78/site4192458/web/lib/smarty/sysplugins/smarty_internal_templatelexer.php on line 937 Deprecated: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /home/.sites/78/site4192458/web/lib/smarty/sysplugins/smarty_internal_templatelexer.php on line 937 Deprecated: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /home/.sites/78/site4192458/web/lib/smarty/sysplugins/smarty_internal_templatelexer.php on line 310 Deprecated: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /home/.sites/78/site4192458/web/lib/smarty/sysplugins/smarty_internal_templatelexer.php on line 310 Deprecated: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /home/.sites/78/site4192458/web/lib/smarty/sysplugins/smarty_internal_templatelexer.php on line 447 Deprecated: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /home/.sites/78/site4192458/web/lib/smarty/sysplugins/smarty_internal_templatelexer.php on line 310 Deprecated: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /home/.sites/78/site4192458/web/lib/smarty/sysplugins/smarty_internal_templatelexer.php on line 310 Deprecated: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /home/.sites/78/site4192458/web/lib/smarty/sysplugins/smarty_internal_templatelexer.php on line 937 Deprecated: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /home/.sites/78/site4192458/web/lib/smarty/sysplugins/smarty_internal_templatelexer.php on line 937 Deprecated: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated in /home/.sites/78/site4192458/web/lib/smarty/sysplugins/smarty_internal_templatelexer.php on line 310 Deprecated: Function strftime() is deprecated in /home/.sites/78/site4192458/web/lib/smarty/sysplugins/smarty_internal_runtime_codeframe.php on line 44One of the little known features of CMS Made Simple is the User Defined tag. Basically, this allows you to write PHP code inside the Admin Panel. Use the 'Add User Defined Tag' button in Extension » User Defined Tags in the Admin Panel, write some code, and then insert into a template or page with {newpluginname}. Simple!
As an example, I've put together a one line plugin/tag that will show your current User Agent information (which browser you're using). The output is right here: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com).
If you're not looking at the source, all that is in the page is {user_agent}. To see how this code works, edit the user_agent tag in the Extensions » User Defined Tags page of the admin.
This is a VERY powerful feature if used right. Remember, user defined tags do not get cached, therefore, scripts to rotate ad banners and such will work just fine. Note also that tag code has to be written without opening < ? php and ending ? > tags.
Vorherige Seite: Tags in the core