Ich hab da mal wieder ein kleines Problem!
Ich hab mir aus News und Topnews eine neue Kategorie zusammengebastelt...
Die Templates und Contents dupliziert, umgeschrieben und wieder hochgeladen und die Datenbank erweitert.
Und auch sehr viel angepasst.
Nun hatte ich alles soweit fertig.
Die Inhalte hatte ich auch eingefügt.
Das sollten eigentlich 24 Artikel sein...wovon jetzt aber nur 5 angezeigt werden.
Ich weiß auch dass das mit dem Limit zusammenhängt was man im Adminbereich unter Konfiguration einstellen kann.
Wenn ich also auf 24 einstelle sehe ich alle...
Ich möchte diesen Limit aber nutzen.
Dort steht ja pro Seite...
Ich vermisse jetzt eigentlich nur die kleinen Seitenzahlen unten in der Seite...
Kann vll jemand von den Profis mal über die Dateien schaun?!
Bitte?
Oder einen Hinweis geben wie ich das berichtigen kann...
content/topeuk.php:
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); $title = $allgAr['title'].' :: Eule und Kauz'; $hmenu = 'Eule und Kauz<br /><br />'; $design = new design ( $title , $hmenu ); $design->header(); $limit = $allgAr['Nlimit']; //Topeuk ausgeben @readfile('include/contents/selfbp/selfp/TOPeuk.php'); echo '<br />'; $tpl = new tpl ( 'euk.htm' ); $abf = "SELECT a.euk_title as title, a.euk_id as id, DATE_FORMAT(a.euk_time,'%d. %m. %Y') as datum, DATE_FORMAT(a.euk_time,'%W') as dayofweek, a.euk_text as text, b.name as username FROM prefix_euk as a LEFT JOIN prefix_user as b ON a.user_id = b.id ORDER BY euk_time DESC LIMIT ".$limit; $erg = db_query($abf); while ($row = db_fetch_assoc($erg)) { $k0m = db_query("SELECT COUNT(ID) FROM `prefix_koms` WHERE uid = ".$row['id']." AND cat = 'EUK'"); $row['kom'] = db_result($k0m,0); $row['datum'] = $lang[$row['dayofweek']].' '.$row['datum']; if ( strpos ( $row['text'] , '[PREVIEWENDE]' ) !== FALSE ) { $a = explode('[PREVIEWENDE]' , $row['text']); $row['text'] = $a[0]; $row['readwholeeuk'] = '» <a href="index.php?euk-'.$row['id'].'">'.$lang['readwholeeuk'].'</a> «'; } else { $row['readwholeeuk'] = ''; } $tpl->set_ar_out($row,0); } $tpl->set_out('SITELINK', $MPL,1); unset($tpl); $design->footer(); ?>
content/euk.php
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); $title = $allgAr['title'].' :: Eule und Kauz'; $hmenu = 'Eule und Kauz'; $design = new design ( $title , $hmenu ); $abf = 'SELECT * FROM prefix_user WHERE id = "'.$uid.'"'; $erg = db_query($abf); $row = db_fetch_assoc($erg); $avatar = ''; if ( file_exists($row['avatar'])) { $avatar = '<img src="'.$row['avatar'].'" border="0">'; } if ( !is_numeric($menu->get(1)) ) { if($menu->get(1) == 'rss' || $menu->get(1) == 'atom') { #ob_clean(); $feed_type = $menu->get(1); $abf = "SELECT MAX(euk_time) AS last_update FROM prefix_euk"; $erg = db_query($abf); $row = db_fetch_assoc($erg); $last_update = str_replace(' ', 'T', $row['last_update']) . 'Z'; $abf = "SELECT a.euk_title as title, a.euk_id as id,"; $abf .= ($feed_type == 'atom') ? 'a.euk_time as datum,' : "DATE_FORMAT(a.euk_time,'%a, %e %b %y %H:%i:%s') as datum,"; $abf .= "a.euk_text as text, b.name as username FROM prefix_euk as a LEFT JOIN prefix_user as b ON a.user_id = b.id ORDER BY euk_time DESC LIMIT 50"; $erg = db_query($abf); $tpl = new tpl( 'euk_'.$menu->get(1).'.htm' ); header('Content-type: application/' . $menu->get(1) . '+xml'); $tpl->set_ar_out(array('FEEDTITLE' => $allgAr['title'], 'UPDATED' => $last_update), 0); while ($row = db_fetch_assoc($erg)) { if($feed_type == 'atom') { $row['datum'] = str_replace(' ', 'T', $row['datum']) . 'Z'; } $text = stripslashes($row['text']); $a = explode('[PREVIEWENDE]', $text); $tpl->set_ar_out(array('TITLE' => $row['title'], 'TXT' => $row['text'], 'LINK' => 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']). '/index.php?euk-' . $row['id'], 'AUTHOR' => $row['username'], 'DATE' => $row['datum'], 'AVATA' => $avatar ), 1); } $tpl->out(2); exit; } else { $design->header(); $limit = $allgAr['Nlimit']; $page = ( $menu->getA(1) == 'p' ? $menu->getE(1) : 1 ); $anfang = ($page - 1) * $limit; $tpl = new tpl ( 'euk.htm' ); $abf = "SELECT a.euk_title as title, a.euk_id as id, DATE_FORMAT(a.euk_time,'%d. %m. %Y') as datum, DATE_FORMAT(a.euk_time,'%W') as dayofweek, a.euk_text as text, b.name as username FROM prefix_euk as a LEFT JOIN prefix_user as b ON a.user_id = b.id ORDER BY euk_time DESC LIMIT ".$anfang.",".$limit; #echo '<pre>'.$abf.'</pre>'; $erg = db_query($abf); while ($row = db_fetch_assoc($erg)) { $k0m = db_query("SELECT COUNT(ID) FROM `prefix_koms` WHERE uid = ".$row['id']." AND cat = 'EUK'"); $row['kom'] = db_result($k0m,0); $row['datum'] = $lang[$row['dayofweek']].' '.$row['datum']; if ( strpos ( $row['text'] , '[PREVIEWENDE]' ) !== FALSE ) { $a = explode('[PREVIEWENDE]' , $row['text']); $row['text'] = $a[0]; } $text = stripslashes($row['text']); $row['text'] = $text; $tpl->set_ar_out($row,0); } $tpl->set_out('SITELINK', $MPL,1); unset($tpl); } } else { $design->header(); $nid = escape($menu->get(1), 'integer'); $row = db_fetch_object(db_query("SELECT * FROM `prefix_euk` WHERE euk_id = '".$nid."'")); if ( has_right(array($row->euk_recht)) ) { $komsOK = true; $textToShow = $row->euk_text; $textToShow = str_replace('[PREVIEWENDE]','',$textToShow); $textToShow = stripslashes($textToShow); // $textToShow = bbcode($row->euk_text); //$textToShow = str_replace('[PREVIEWENDE]','',$textToShow); if ( !empty($such) ) { $textToShow = markword($textToShow,$such); } $tpl = new tpl ( 'euk.htm' ); $ar = array ( 'TEXT' => $textToShow, 'NID' => $nid, 'ANTISPAM' => (loggedin()?'':get_antispam ('eukkom', 0)), 'uname' => $_SESSION['authname'], 'NAME' => $row->euk_title ); $tpl->set_ar_out($ar, 2 ); } $tpl->out(5); } $design->footer(); ?>
template/euk.htm
<b><a href="index.php?euk-{id}">{title}</a></b> <br /> <br /> {EXPLODE} <br /> <br /><center>{SITELINK}</center> {EXPLODE} <!-- Mehr lesen --> <table class="border" width="100%" cellpadding="5" cellspacing="1" border="0"> <tr class="Chead"> <th height="25"><b>{NAME}</b></th> </tr> <tr> <td class="Cnorm"> {TEXT} <br style="clear:both; " /> <p></p> <a href="index.php?topeuk"><b>«</b> {_lang_back}</a> </td> </tr> </table>
betroffene Homepage: ob-mitte.pytalhost.com/index.php?topeuk