Druckversion System 1.0 1 1066927900 1085515653 1 Das Modul ermöglicht es einzelne Container auszuwählen und deren Inhalte innerhalb eines eigenen Templates ohne Verwendung des erstellten Layouts asszugeben. <?php //configmode $mip_form['13']['desc'] = 'Konfigurationsmodus'; $mip_form['13']['cat'] = 'option'; $mip_form['13']['size'] = '1'; $mip_form['13']['option_desc'][] = 'Normal'; $mip_form['13']['option_val'][] = ''; $mip_form['13']['option_desc'][] = 'Erweitert'; $mip_form['13']['option_val'][] = 'advanced'; $mip_form['13']['option_desc'][] = 'Ausgeblendet'; $mip_form['13']['option_val'][] = 'hidden'; $mip_form['13']['cms_var'] = 'MOD_VAR[13]'; $mip_form['13']['cms_val'] = $dedi_mod['value']['13']; $mip_form['13']['flag'] = 'reload'; mip_formsp($mip_form['13']);//configmode $mip_form['hide_in_standard_mode'] = array(1,2); //hidden config if($dedi_mod['value']['13'] == 'hidden'){ foreach($dedi_mod['value'] AS $ke=>$va){ if($ke != '13'){ ?> <input name="MOD_VAR[<?php echo $ke; ?>]" type="hidden" value="<?php echo htmlentities($va);?>"> <?php } } } //simple and advanced config else if($dedi_mod['value']['13'] == '' || $dedi_mod['value']['13'] == 'advanced'){ // Container auswählen $config['number'] = 0; $mip_form['0']['desc'] = 'Container, welche angezeigt werden sollen: '; $mip_form['0']['cat'] = 'option'; $mip_form['0']['size'] = '5'; $mip_form['0']['cms_var'] = 'MOD_VAR[0]'; $mip_form['0']['cms_val'] = $dedi_mod['value']['0']; foreach ($list['id'] as $config['value']) { $config['_container_name'] = !empty($list[$config['value']]['title']) ? $list[$config['value']]['title'] : $config['value'].'&nbsp;'.$dedi_lang['tpl_container']; $mip_form['0']['option_desc'][$config['number']] = $config['_container_name']; $mip_form['0']['option_val'][$config['number']] = $config['value']; $config['number'] = $config['number']+1; } $mip_form['0']['flag'] = 'multiple'; // Template $mip_form['1']['desc'] = 'Block für Druckversionlayout<br> <small>Mögliche Blockvariablen:<br> angezeigte Container: {head}, {inhalt}</small>'; $mip_form['1']['cat'] = 'txtarea'; $mip_form['1']['rows'] = '6'; $mip_form['1']['type'] = 'long'; $mip_form['1']['cms_var'] = 'MOD_VAR[1]'; $mip_form['1']['cms_val'] = $dedi_mod['value']['1']; $mip_form['1']['cms_val_default'] = '<html> <head> {head} </head> <body> {inhalt} </body> </html>'; // Template $mip_form['2']['desc'] = 'Block für Druckversionlinks<br> <small>Mögliche Blockvariablen: Url zur Druckversion: {url}, Idcatside der aktuellen Seite: {idcatside}</small>'; $mip_form['2']['cat'] = 'txtarea'; $mip_form['2']['rows'] = '6'; $mip_form['2']['type'] = 'long'; $mip_form['2']['cms_var'] = 'MOD_VAR[2]'; $mip_form['2']['cms_val'] = $dedi_mod['value']['2']; $mip_form['2']['cms_val_default'] = '<a href="{url}" target="_blank">Druckversion</a>'; //if simple mode if($dedi_mod['value']['13'] == ''){ foreach ($mip_form['hide_in_standard_mode'] AS $ke=>$va){ $mip_form[$va]['cat'] = 'hidden'; } } mip_formsp($mip_form['0']); mip_formsp($mip_form['1']); mip_formsp($mip_form['2']); } unset($mip_form, $config); ?> <DEDIPHP> if(${'mod'.$dedi_mod['container']['id'].'_'.$dedi_mod['modul']['id']} == 'print') { // Druckversionsausgabe <?PHP $mod['tpl_copy'] = $dedi_mod['value']['1']; // {head} ersetzen while ($mod['tpl_pos'] = strpos (' '.$mod['tpl_copy'], '{head}')) $mod['tpl_copy'] = substr_replace ($mod['tpl_copy'], '$print_head', $mod['tpl_pos']-1, 6); // {inhalt} ersetzen while ($mod['tpl_pos'] = strpos (' '.$mod['tpl_copy'], '{inhalt}')) $mod['tpl_copy'] = substr_replace ($mod['tpl_copy'], '$print_area', $mod['tpl_pos']-1, 8); ?> $mod['manipulate_output'] = '$print_cont = explode(\',\', \'<?PHP echo $dedi_mod['value']['0']; ?>\');'; $mod['manipulate_output'] .= '$print_area = \'\';'; $mod['manipulate_output'] .= 'if (is_array($print_cont)) {'; $mod['manipulate_output'] .= ' foreach ($print_cont as $cont_nr) {'; $mod['manipulate_output'] .= ' $start = strpos($output, "<!--START $cont_nr//-->");'; $mod['manipulate_output'] .= ' $ende = strpos($output, "<!--END $cont_nr//-->");'; $mod['manipulate_output'] .= ' $ende = $ende - $start;'; $mod['manipulate_output'] .= ' $print_area .= substr($output, $start, $ende);'; $mod['manipulate_output'] .= ' }'; $mod['manipulate_output'] .= '}'; $mod['manipulate_output'] .= '$start = strpos($output, "<!--START head//-->");'; $mod['manipulate_output'] .= '$ende = strpos($output, "<!--END head//-->");'; $mod['manipulate_output'] .= '$ende = $ende - $start;'; $mod['manipulate_output'] .= '$print_head .= substr($output, $start, $ende);'; $mod['manipulate_output'] .= '$output = "<?PHP echo addslashes($mod['tpl_copy']); ?>";'; $cfg_client['manipulate_output'] = $mod['manipulate_output'].$cfg_client['manipulate_output']; } else { // Druckversions Link $mod['tpl_link'] = str_replace('{url}', $con_side[$idcatside]['link'].'&mod'.$dedi_mod['container']['id'].'_'.$dedi_mod['modul']['id'].'=print', "MOD_VALUE[2]"); $mod['tpl_link'] = str_replace('{idcatside}', $idcatside, $mod['tpl_link']); echo $mod['tpl_link']; } unset($mod); </DEDIPHP> mod:88953b0f14170e8ce929064e618b2ff7:a326d6b6