{{indexmenu_n>100}} ====== CP-Class if (FE-User) ====== **Defines a class for the CP when a FE user ([[english/phpwcms-system/article/contentparts/frontend-login]]) is logged on.**\\ -> ##%%
...
%%## ===== Description: ===== In this case, all CPs to be parsed without exception. The trigger simply looks for whether \\ (%%"$data['acontent_granted'] == true"%%) //(so the switch %%"[x] for logged-in frontend users only "%% is set)// \\ and defines a class to the respective CP output. \\ ---- Docu: -- \\ Forum: http://forum.phpwcms.org/viewtopic.php?f=4&t=21284 **Author:** K.Heermann (flip-flop) http://planmatrix.de \\ **CMS Version:** >= 1.3x \\ **Version:** V1.0 //(07.04.2011)// \\ **Condition:** -> [[http://www.phpwcms-docu.de/conf_inc_php_en.phtml|/config/phpwcms/conf.inc.php]] \\ * $phpwcms['allow_ext_init'] = 1; ---- \\ \\ ===== PHP: ===== File: **/template/inc_script/frontend_init/cp_trig_cp_logged_in_fe_user.php** '.LF.$text.LF.''; } return $text; } register_cp_trigger('CLASS_for_logged_in_user'); /* ------- and the next one function CP_Other_CP($text, & $data) { if($data['acontent_type'] == XX) { // XX is CP Other CP $text = custom processing ; } return $text; } register_cp_trigger('CP_Other_CP'); ---------- and so on */ ?> \\ **Short form:** '.LF.$text.LF.'': $text; } register_cp_trigger('CLASS_for_logged_in_user'); ?> \\