{{indexmenu_n>100}} ====== CP-Class if (FE-User) ====== **Legt eine Klasse um den CP, wenn ein FE-User ([[deutsch/phpwcms-system/artikel/contentparts/froentend-login]]) angemeldet ist.**\\ -> ##%%
...
%%## ===== Beschreibung: ===== In diesem Fall werden alle CPs ohne Ausnahme geparst. Der Trigger schaut einfach nach ob \\ (%%"$data['acontent_granted'] == true"%%) //(also der Schalter %%"[x] nur für angemeldete Frontend Benutzer"%% im CP gesetzt)// \\ und legt eine Klasse um die jeweilige CP-Ausgabe. \\ ---- Docu: -- \\ Forum: http://forum.phpwcms.org/viewtopic.php?f=4&t=21284 **Autor:** K.Heermann (flip-flop) http://planmatrix.de \\ **CMS Version:** >= 1.3x \\ **Version:** V1.0 //(07.04.2011)// \\ **Bedingung:** -> [[http://www.phpwcms-docu.de/confincphp_de.phtml|/config/phpwcms/conf.inc.php]] \\ * $phpwcms['allow_ext_init'] = 1; ---- \\ \\ ===== PHP: ===== Datei: **/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 */ ?> \\ **Kurzform:** '.LF.$text.LF.'': $text; } register_cp_trigger('CLASS_for_logged_in_user'); ?> \\