; this is formatted like WIN.INI
; please: do not use comments for value lines
; settings will overwrite CP settings
width = 450
height = 350
width_zoom = 450
height_zoom = 350
col = 1
;space = 10
zoom = 1
lightbox = 0
;nocaption = 0
; 0 = no center, 1 = horizontal/vertical, 2 = horizontal, 3 = vertical
;center = 2
crop = 0
crop_zoom = 0
fx1 = 0
fx2 = 0
fx3 = 0
[TITLE]{TITLE}
[/TITLE]
[SUBTITLE]{SUBTITLE}[/SUBTITLE]
[TEXT]{TEXT}[/TEXT]
\\
===== PHP frontend_init: =====
**Datei:** template/inc_script/frontend_init/rt_cp_trigg_img_special_lof_slider.php
**Bedingung:** $phpwcms['allow_ext_init'] = 1; //(in conf.inc.php)//
\\
'))) { // 31 is CP img special Home: ID =0
$tags = array('INTERVAL','DURATION','MaxItemDisplay'); // TAGs with numerical value
$tags_spec = array('DIRECTION' => '1','AUTO' => '1','MainItemDesc' => '1'); // 0|1 TAGs with "IF... _ELSE" statement
if (!empty($data["acontent_comment"]) ) {
// Cut out a special section
preg_match('/\[CP_TRIG_WRAP_JS\](.*?)\[\/CP_TRIG_WRAP_JS\]/ism',$text, $tg_text['wrap_js']);
if ($tg_text['wrap_js'][1]) {
// Is there any content in comment
if (!empty($data["acontent_comment"]) ) {
// Catch the TAGs
// E.g. {INTERVAL:2000}{DURATION:1500}{MaxItemDisplay:4}
foreach ($tags as $value)
$tg_text['wrap_js'][1] = CP_render_cnt_template ($data["acontent_comment"], $tg_text['wrap_js'][1], $value);
// E.g. {DIRECTION:1}{AUTO:0}{MainItemDesc:1}
foreach ($tags_spec as $key=>$value)
$tg_text['wrap_js'][1] = CP_render_cnt_template ($data["acontent_comment"], $tg_text['wrap_js'][1], $key, $value);
}
// Kill all TAGs in content
// function render_cnt_template($text='', $tag='', $value='')
foreach ($tags as $value)
$tg_text['wrap_js'][1] = render_cnt_template($tg_text['wrap_js'][1], 'CPT_'.$value, 1);
foreach ($tags_spec as $key=>$value) {
$tg_text['wrap_js'][1] = preg_replace('/\[CPT_'.$key.'\](.*?)\[\/CPT_'.$key.'\]/is', '', $tg_text['wrap_js'][1]);
$tg_text['wrap_js'][1] = preg_replace('/\[CPT_'.$key.'_ELSE\](.*?)\[\/CPT_'.$key.'_ELSE\]/is', '', $tg_text['wrap_js'][1]);
}
// Insert changed JS text back into content
$text = replace_cnt_template($text, 'CP_TRIG_WRAP_JS', $tg_text['wrap_js'][1]);
}
}
}
return $text;
}
register_cp_trigger('CP_IMGSPECIAL_lof_slider');
/* ------- 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 */
?>
\\
===== CSS und JavaScript: =====
Siehe [[deutsch/phpwcms-system/artikel/contentparts/bilder-spezial/lof-slidernews]]
\\