Seiten-Navigation Navigation 0.2 1 1072628978 1072628978 1 Bietet Links zur ersten, letzten, vorigen und nächsten Seite des aktuellen Ordners - sowie einen Link zu einem Anker. (Sven777b) <?php //Schriftart 1 $mip_form['1']['desc'] = $mod_lang['gen_font']." Links"; $mip_form['1']['cat'] = 'app_css'; $mip_form['1']['output_cat'] = 'option'; $mip_form['1']['cms_var'] = 'MOD_VAR[1]'; $mip_form['1']['cms_val'] = $dedi_mod['value']['1']; $mip_form['1']['cms_val_default'] = ''; //Schriftart 2 $mip_form['2']['desc'] = $mod_lang['gen_font']." {font}"; $mip_form['2']['cat'] = 'app_css'; $mip_form['2']['output_cat'] = 'option'; $mip_form['2']['cms_var'] = 'MOD_VAR[2]'; $mip_form['2']['cms_val'] = $dedi_mod['value']['2']; $mip_form['2']['cms_val_default'] = 'Navigation-Seiten'; //Anker oben $mip_form['3']['cat'] = 'txt'; $mip_form['3']['type'] = ''; $mip_form['3']['desc'] = 'Ankername oben <small>(für Link "top")</small>'; $mip_form['3']['cms_var'] = 'MOD_VAR[3]'; $mip_form['3']['cms_val'] = $dedi_mod['value']['3']; $mip_form['3']['cms_val_default'] = '#top'; //Sortierung Name/Erstellungsdatum/Änderungsdatum/Besucherzahl $mip_form['4']['desc'] = 'Seiten sortieren nach'; $mip_form['4']['cat'] = 'option'; $mip_form['4']['cms_var'] = 'MOD_VAR[4]'; $mip_form['4']['cms_val'] = $dedi_mod['value']['4']; $mip_form['4']['option_desc']['0'] = 'Standard (wie backend)'; $mip_form['4']['option_desc']['1'] = 'Name'; $mip_form['4']['option_desc']['2'] = 'Erstellungsdatum'; $mip_form['4']['option_desc']['3'] = 'Änderungsdatum'; $mip_form['4']['option_desc']['4'] = 'Besucherzahl'; $mip_form['4']['option_val']['0'] = 'sortindex'; $mip_form['4']['option_val']['1'] = 'name'; $mip_form['4']['option_val']['2'] = 'created'; $mip_form['4']['option_val']['3'] = 'lastmodified'; $mip_form['4']['option_val']['4'] = 'visited'; //aufsteigend-absteigend $mip_form['5']['cat'] = 'radio'; $mip_form['5']['cms_var'] = 'MOD_VAR[5]'; $mip_form['5']['cms_val'] = $dedi_mod['value']['5']; $mip_form['5']['cms_val_default'] = 'SORT_ASC'; $mip_form['5']['option_desc']['0'] = 'aufsteigend'; $mip_form['5']['option_val']['0'] = 'SORT_ASC'; $mip_form['5']['option_desc']['1'] = 'absteigend'; $mip_form['5']['option_val']['1'] = 'SORT_DESC'; //Basis-Template $mip_form['10']['cat'] = 'txtarea'; $mip_form['10']['type'] = 'long'; $mip_form['10']['rows'] = '3'; $mip_form['10']['desc'] = 'Basistemplate<br><small>{first [linktext]},{prev [linktext]},{top [linktext]},{next [linktext]},{last [linktext]},{font}</small>'; $mip_form['10']['cms_var'] = 'MOD_VAR[10]'; $mip_form['10']['cms_val'] = $dedi_mod['value']['10']; $mip_form['10']['cms_val_default'] = '<table class="{font}" width="100%"><tr><td width="20%" align="left">{first [erste Seite]}</td><td width="20%" align="left">{prev [vorige Seite]}</td><td width="20%" align="center">{top [nach oben]}</td><td width="20%" align="right">{next [n&auml;chste Seite]}</td><td width="20%" align="right">{last [letzte Seite]}</td></tr></table>'; mip_formsp($mip_form['1']); mip_formsp($mip_form['2']); mip_formsp($mip_form['3']); mip_formsp($mip_form['4']); mip_formsp($mip_form['5']); echo "<br>"; mip_formsp($mip_form['10']); unset($mip_form); ?> <DEDIPHP> //Seiten dieses Ordners einlesen $mod['sidelist'] = array(); $mod['sortarray'] = array(); foreach(array_keys($con_side) as $a){ if(((isset($dedi_side['view']) && $perm->have_perm($a, 'side')) || ($con_side[$a]['online'] && $con_side[$a]['online'] != '0')) && $con_side[$a]['idcat'] == $idcat){ array_push($mod['sidelist'],$a); if("MOD_VALUE[4]" == 'name'){$mod['sortit'] = strtolower($con_side[$a]['name']);} else {$mod['sortit'] = $con_side[$a]['MOD_VALUE[4]'];}; array_push($mod['sortarray'], $mod['sortit']); }; }; array_multisort($mod['sortarray'], MOD_VALUE[5], $mod['sidelist'], MOD_VALUE[5]); for($b = 0; $b<=count($mod['sidelist']); $b++){ if($mod['sidelist'][$b] == $idcatside){ $mod['pos'] = $b; break; } }; if($mod['pos'] == 0){ $mod['first'] = ""; $mod['prev'] = ""; } else { $mod['first'] = $con_side[$mod['sidelist'][0]]['link']; $mod['prev'] = $con_side[$mod['sidelist'][($mod['pos']-1)]]['link']; } if($idcatside == end($mod['sidelist']) ){ $mod['last'] = ""; $mod['next'] = ""; } else { $mod['last'] = $con_side[end($mod['sidelist'])]['link']; $mod['next'] = $con_side[$mod['sidelist'][($mod['pos']+1)]]['link']; } $mod['tpl'] = "MOD_VALUE[10]"; $mod['tpl'] = str_replace("{font}","MOD_VALUE[2]",$mod['tpl']); foreach(array("first","prev","next","last") as $a){ if($mod[$a] != ""){ $mod['tpl'] = preg_replace("/\{$a\s?\[([^\]]+)\]\}/i",'<a href="'.$mod[$a].'" class="MOD_VALUE[1]">\\1</a>',$mod['tpl']); } else { $mod['tpl'] = preg_replace("/\{$a\s?\[([^\]]+)\]\}/i",' ',$mod['tpl']); }; }; $mod['tpl'] = preg_replace("/\{top\s?\[([^\]]+)\]\}/i",'<a href="MOD_VALUE[3]" class="MOD_VALUE[1]">\\1</a>',$mod['tpl']); echo $mod['tpl']; unset($a); unset($b); unset($mod); </DEDIPHP>