haben neulich mal eine eigene Startseite ("Start-Modul der Seite") gebastelt und im Admin-Menü als solche eingetragen. Leider funktionieren seitdem diverse NewsExtended Funktionen wie -add und -archiv nicht mehr, es wird dann einfach die Startseite aufgerufen. Setze ich die Startseite zurück auf News.php funktioniert alles wie gehabt?
Ich verstehe nicht, wie die Tatsache, dass man nichts außer eben die Startseite ändert, zum Nicht-Funktionieren dieser Funktionen führen kann.
Kennt einer das Problem?
Hier die main.php (=Startseite)
<?php defined ('main') or die ( 'no direct access' ); require_once ('include/includes/func/pointsys.php'); function getGroupRights(){ $ret = 0; foreach ($_SESSION['authgrp'] as $id => $bool){ $ret = $ret | pow(2, $id); } return $ret; } function news_find_kat ($kat) { $katpfad = 'include/images/news/'; $katjpg = $katpfad . $kat . '.jpg'; $katgif = $katpfad . $kat . '.gif'; $katpng = $katpfad . $kat . '.png'; if (file_exists($katjpg)) { $pfadzumBild = $katjpg; } elseif (file_exists ($katgif)) { $pfadzumBild = $katgif; } elseif (file_exists ($katpng)) { $pfadzumBild = $katpng; } if (!empty($pfadzumBild)) { $kategorie = '<img style="" src="' . $pfadzumBild . '" alt="' . $kat . '">'; } else { $kategorie = '<b>' . $kat . '</b><br /><br />'; } return ($kategorie); } $tpl = new tpl ( 'main.htm', 0 ); ######################################################### # EINSTELLUNGEN # ######################################################### # Wie viele Einträge sollen Angezeigt werden ? $xlastforum = '10'; # letzte Posts $xlastregist = '10'; # letzte Anmeldungen $xlastnews = '10'; # letzte News $xwholenews = '2'; # news, die komplett angezeigt werden # Welche HintergrundFarben soll die Tabelle haben ? $titelbgcolor = '#0099FF'; # Titel-Hintergrund $tablebgcolor = '#FFFFFF'; # Tabellen-Hintergrund ######################################################### # AB HIER NICHTS MEHR ÄNDERN # ######################################################### # Allgemeine Einstellungen $titelbgcolor = ''; $tablebgcolor = ''; $showteams = ''; $teambannerbreite = 0; $showlastreg = ''; $showgames = ''; $showlastpost = ''; $lastnews = ''; $zeile = ''; $topnews = ''; $title = $allgAr['title'].' :: Main :: '; $hmenu = 'Main'; $design = new design ( $title , $hmenu, 1); $design->header(); $time = time(); $one_day = 86400; $one_hour = 3600; $one_minute = 60; ######################################################### # Team Symbole für den Ticker auslesen $teamanzahl = 0; $teambildwidth = 200; $teambildheight = 50; $teamsquery = "SELECT id, img FROM prefix_groups ORDER by id"; $teamsres = @db_query($teamsquery); while ($teamsrow = db_fetch_assoc($teamsres)) { if ( $teamsrow['img'] != '0' ) { $teamanzahl = $teamanzahl + 1; //$showteams .= '<a href="index.php?teams-show-'.$teamsrow['id'].'"><img src="http://www.fusion-multigaming.de/ilch/'.$teamsrow['img'].'" width="'.$teambildwidth.'" height="'.$teambildheight.'" ></a>'; $showteams .= '<a href="index.php?teams-show-'.$teamsrow['id'].'"><img src="http://www.fusion-multigaming.de/ilch/'.$teamsrow['img'].'" width="'.$teambildwidth.'" height="'.$teambildheight.'" title="'.$teamsrow['img'].'" alt="'.$teamsrow['img'].'" border="0" ></a>'; } } $teambannerbreite = $teamanzahl * $teambildwidth; ######################################################### # Zuletzt registriert $lastregquery = "SELECT * FROM prefix_user WHERE recht = -4 OR recht = -5 ORDER BY rechtchanged DESC LIMIT ".$xlastregist; $registres = @db_query($lastregquery); while ($regrow = db_fetch_assoc($registres)) { //Wie lange schon? $timeagosec = round($time - $regrow['rechtchanged']); $timeagomin = round($timeagosec / 60); $timeagohrs = round($timeagomin / 60); $timeagoday = round($timeagohrs / 24); if ($timeagosec > $one_day) { $showlastreg_ = $timeagoday.' Tagen'; } elseif ($timeagosec > $one_hour) { $showlastreg_ = $timeagohrs.' Stunden'; } elseif ($timeagosec > $one_minute) { $showlastreg_ = $timeagomin.' Minuten'; } else { $showlastreg_ = 'wenigen Sekunden'; } //Was ist er, Trial oder Member? if ( $regrow['recht'] == -4 ) { $usertitel = 'Trialmember'; } else if ( $regrow['recht'] == -5 ) { $usertitel = 'Member'; } //$showlastreg .= '» <a href="index.php?user-details-'.$regrow['id'].'">'.$regrow['name'].'</a><br><span class="smalfont">'.$usertitel.' seit '.$showlastreg_.'</span><br><br>'; //$showgames .= getteams($regrow['id']).'<br><br>'; $zeile .= '<tr><td width="30%" valign="top">» <a href="index.php?user-details-'.$regrow['id'].'">'.$regrow['name'].'</a><br><span class="smalfont">'.$usertitel.' seit '.$showlastreg_.'</span></td><td width="20%" valign="top">'.getteams($regrow['id']).'</td>!SUCH'; } ######################################################### # letzte Postings //Sucht die letzten Posts raus $forumquery = "SELECT b.id as fid, a.name as titel, a.id as id, c.id AS firstnew, d.name as author, c.time as time FROM prefix_topics a LEFT JOIN prefix_forums b ON b.id = a.fid LEFT JOIN prefix_posts c ON c.id = a.last_post_id LEFT JOIN prefix_user d ON c.erstid = d.id LEFT JOIN prefix_groupusers vg ON vg.uid = ".$_SESSION['authid']." AND vg.gid = b.view LEFT JOIN prefix_groupusers rg ON rg.uid = ".$_SESSION['authid']." AND rg.gid = b.reply LEFT JOIN prefix_groupusers sg ON sg.uid = ".$_SESSION['authid']." AND sg.gid = b.start WHERE ((".$_SESSION['authright']." <= b.view AND b.view < 1) OR (".$_SESSION['authright']." <= b.reply AND b.reply < 1) OR (".$_SESSION['authright']." <= b.start AND b.start < 1) OR vg.fid IS NOT NULL OR rg.fid IS NOT NULL OR sg.fid IS NOT NULL OR -9 >= ".$_SESSION['authright'].") GROUP BY b.id,a.id, a.name ORDER BY c.time DESC LIMIT 0,".$xlastforum; $forumres = @db_query($forumquery); while ($forumrow = db_fetch_assoc($forumres)) { //Datum des Posts $forumrow['date'] = date('d.m.y - H:i',$forumrow['time']); //Finde ersten nicht gelesenen $x = time() - (3600 * 24 * 360); $new = db_query("SELECT MIN(id) as id, erst as name, time FROM prefix_posts WHERE tid = '".$forumrow['id']."' AND time >= ". $x ." AND time >= ".$_SESSION['lastlogin']." GROUP BY id ORDER by time ASC"); $firstnew = db_fetch_assoc($new); //Setze Variablen richtig (auf den ersten nicht gelesen) if ( $firstnew != '') { $forumrow['firstnew'] = $firstnew['id']; $forumrow['author'] = $firstnew['name']; $forumrow['date'] = date('d.m.y - H:i',$firstnew['time']); } //Berechnet die Seite auf der der Post steht $forumrow['postsbefore'] = db_count_query('SELECT COUNT(id) FROM prefix_posts WHERE tid = '.$forumrow['id'].' AND id < '.$forumrow['firstnew']); $forumrow['page'] = ceil(($forumrow['postsbefore']+1)/$allgAr['Fpanz']); $startpos = strpos ($zeile, '!SUCH'); //Entscheidet ob der Post schon gelesen wurde, oder nicht und formatiert ihn entsprechend. $forumrow['ctime'] = db_result(db_query("SELECT MAX(time) FROM prefix_posts WHERE tid = ".$forumrow['id']),0,0); if ( forum_get_ordner($forumrow['ctime'],$forumrow['id'],$forumrow['fid']) == 'nord' ) { //nicht gelesen //$showlastpost .= '» <b><a href="?forum-showposts-'.$forumrow['id'].'-p'.$forumrow['page'].'#'.$forumrow['firstnew'].'" title="'.$forumrow['date'].'">'.((strlen($forumrow['titel'])<50) ? $forumrow['titel'] : substr($forumrow['titel'],0,48).'...').'</a></b><br /><span class="smalfont"> von '.$forumrow['author'].' ( '.$forumrow['date'].' )</span><br><br>'; $zeile = substr_replace($zeile, '<td width="50%" valign="top">» <a href="?forum-showposts-'.$forumrow['id'].'-p'.$forumrow['page'].'#'.$forumrow['firstnew'].'"> <font color="#FF0000"><b>'.((strlen($forumrow['titel'])<50) ? $forumrow['titel'] : substr($forumrow['titel'],0,48).'...').'</b></font></a><br /><span class="smalfont"> von '.$forumrow['author'].' ( '.$forumrow['date'].' )</span></td></tr>', $startpos, 5 ); } else { //gelesen //$showlastpost .= '» <a href="?forum-showposts-'.$forumrow['id'].'-p'.$forumrow['page'].'#'.$forumrow['firstnew'].'" title="'.$forumrow['date'].'">'.((strlen($forumrow['titel'])<50) ? $forumrow['titel'] : substr($forumrow['titel'],0,48).'...').'</a><br /><span class="smalfont"> von '.$forumrow['author'].' ( '.$forumrow['date'].' )</span><br><br>'; $zeile = substr_replace($zeile, '<td width="50%" valign="top">» <a href="?forum-showposts-'.$forumrow['id'].'-p'.$forumrow['page'].'#'.$forumrow['firstnew'].'">'.((strlen($forumrow['titel'])<50) ? $forumrow['titel'] : substr($forumrow['titel'],0,48).'...').'</a><br /><span class="smalfont"> von '.$forumrow['author'].' ( '.$forumrow['date'].' )</span></td></tr>', $startpos, 5 ); } } ######################################################### # News // Topnews ausgeben ##################################### $tn_id = intval(@db_result($news_opts = db_query("SELECT v1, v2 FROM prefix_allg WHERE k = 'news' LIMIT 1"), 0, 0)); $tn_koms = @db_result($news_opts, 0, 1); $tn_sql = db_query("SELECT news_title, news_text, news_kat, news_recht, news_groups, html FROM prefix_news WHERE news_id = $tn_id AND `show` > 0 AND `show` <= UNIX_TIMESTAMP() AND (endtime IS NULL OR endtime > UNIX_TIMESTAMP())"); if (db_num_rows($tn_sql) > 0) { $tn_r = db_fetch_object($tn_sql); $dontShow = false; if ((pow(2, abs($_SESSION['authright'])) | $tn_r->news_recht) != $tn_r->news_recht) { $dontShow = true; } if ($dontShow) { foreach($_SESSION['authgrp'] as $id => $bool) { if ($bool and (pow(2, abs($id)) | $tn_r->news_groups) == $tn_r->news_groups) { $dontShow = false; break; } } } if (!$dontShow) { $topnews .= '<div style="border:2px dashed red; padding: 5px; padding-bottom: 15px;"><h3 style="color:red;">'.$tn_r->news_title.'</h3>'; //Forumverlinkung für die News (Datenbankabfrage der TopicID $anf2 = db_query("SELECT tid from `prefix_news_forum` where nid = '".$tn_id."'"); $rtid2 = db_fetch_object($anf2); $anf3 = db_query("SELECT rep from `prefix_topics` where id = '".$rtid2->tid."'"); $rrep = db_fetch_object($anf3); $readwholenews = ''; if (strpos ($tn_r->news_text , '[PREVIEWENDE]') !== false) { $a = explode('[PREVIEWENDE]' , $tn_r->news_text); $tn_r->news_text = $a[0]; if ( $rtid2->tid != '' && $rrep->rep != '' ) { $readwholenews = '<a href="index.php?forum-showposts-' . $rtid2->tid . '" alt="mehr lesen" title="mehr lesen"><img src="include/images/icons/news/more.gif" alt="mehr lesen" border="0"></a>'; } else { $readwholenews = '<a href="index.php?news-' . $tn_id . '" alt="mehr lesen" title="mehr lesen"><img src="include/images/icons/news/more.gif" alt="mehr lesen" border="0"></a>'; } } else { $readwholenews = ''; } $topnews .= bbcode($tn_r->news_text).'<br /><div align="right">'.$readwholenews.'</div><br />'; $newskom = ''; //Kommentare if ( $rtid2->tid != '' && $rrep->rep != '' ) { //Finde ersten nicht gelesenen $x = time() - (3600 * 24 * 360); $firstnew = db_result(db_query("SELECT MIN(id) as id FROM prefix_posts WHERE tid = '".$rtid2->tid."' AND time >= ". $x ." AND time >= ".$_SESSION['lastlogin']),0); //Setze Variablen richtig (auf den ersten nicht gelesen) if ( $firstnew == '') { $firstnew = db_result(db_query("SELECT last_post_id FROM prefix_topics WHERE id = '".$rtid2->tid."'"),0); } //Berechnet die Seite auf der der Post steht $postsbefore = db_count_query('SELECT COUNT(id) FROM prefix_posts WHERE tid = '.$rtid2->tid.' AND id < '.$firstnew); $page = ceil(($postsbefore+1)/$allgAr['Fpanz']); $newskom = $tn_koms == '1' ? '<br /><a href="index.php?forum-showposts-' . $rtid2->tid .'-p'.$page.'#'.$firstnew. '">' . $rrep->rep . ' ' . $lang['comments'] . ' </a>' : ''; } else { $newskom = $tn_koms == '1' ? '<br /><a href="index.php?news-' . $tn_id . '">' . db_count_query("SELECT COUNT(id) FROM prefix_koms WHERE uid = $tn_id AND cat = 'NEWS'") . ' ' . $lang['comments'] . ' </a>' : ''; } $topnews .= $newskom.'</div><br />'; } } //Normale News ########################################## $news_kat = $katmpl = ''; $groups = getGroupRights(); $abf = "SELECT a.news_title as title, a.news_id as id, DATE_FORMAT(a.news_time,'%d. %m. %Y - %H:%i Uhr') as datum, DATE_FORMAT(a.news_time,'%W') as dayofweek, a.news_kat as kate, a.news_text as text, b.name as username, c.name as editorname, a.html, a.edit_time, a.klicks, b.id as uid FROM prefix_news as a LEFT JOIN prefix_user as b ON a.user_id = b.id LEFT JOIN prefix_user as c ON a.editor_id = c.id WHERE (((" . pow(2, abs($_SESSION['authright'])) . " | a.news_recht) = a.news_recht) OR (a.news_groups != 0 AND ((a.news_groups ^ $groups) != (a.news_groups | $groups)))) AND ".$not."$news_kat a.`show` > 0 AND a.`show` <= UNIX_TIMESTAMP() AND news_id != $tn_id AND a.`archiv` != 1 AND (a.endtime IS NULL OR a.endtime > UNIX_TIMESTAMP()) ORDER BY a.news_time DESC LIMIT " . $xlastnews; $erg = db_query($abf); $newscounter = 1; while ($row = db_fetch_assoc($erg)) { //Forumverlinkung für die News (Datenbankabfrage der TopicID $anf4 = db_query("SELECT tid from `prefix_news_forum` where nid = '".$row['id']."'"); $rtid4 = db_fetch_object($anf4); $anf5 = db_query("SELECT rep from `prefix_topics` where id = '".$rtid4->tid."'"); $rrep2 = db_fetch_object($anf5); //Kategorie und Datum bearbeiten $row['kate'] = news_find_kat($row['kate']); $row['datum'] = $lang[$row['dayofweek']] . ' ' . $row['datum']; //Forum oder News verlinken if ( $rtid4->tid != '' && $rrep2->rep != '' ) { $row['title'] = '<strong><a class="news_header" href="index.php?forum-showposts-'.$rtid4->tid.'">'.$row['title'].'</a></strong>'; //ein oder mehr Kommentare $row['kom'] = $rrep2->rep; if ( $row['kom'] == 1 ) { $einodermehr = 'Kommentar'; } else { $einodermehr = $lang['comments']; } //Finde ersten nicht gelesenen $x = time() - (3600 * 24 * 360); $firstnew = db_result(db_query("SELECT MIN(id) as id FROM prefix_posts WHERE tid = '".$rtid4->tid."' AND time >= ". $x ." AND time >= ".$_SESSION['lastlogin']),0); //Setze Variablen richtig (auf den ersten nicht gelesen) if ( $firstnew == '') { $firstnew = db_result(db_query("SELECT last_post_id FROM prefix_topics WHERE id = '".$rtid4->tid."'"),0); } //Berechnet die Seite auf der der Post steht $postsbefore = db_count_query('SELECT COUNT(id) FROM prefix_posts WHERE tid = '.$rtid4->tid.' AND id < '.$firstnew); $page = ceil(($postsbefore+1)/$allgAr['Fpanz']); $row['komlink'] = '<a href="index.php?forum-showposts-'.$rtid4->tid.'-p'.$page.'#'.$firstnew.'">'.$row['kom'].' '.$einodermehr.'</a>'; } else { $row['title'] = '<strong><a class="news_header" href="index.php?news-'.$row['id'].'">'.$row['title'].'</a></strong>'; $k0m = db_query("SELECT COUNT(ID) FROM `prefix_koms` WHERE uid = " . $row['id'] . " AND cat = 'NEWS'"); $row['kom'] = db_result($k0m, 0); if ( $row['kom'] == 1 ) { $einodermehr = 'Kommentar'; } else { $einodermehr = $lang['comments']; } $row['komlink'] = '<a href="index.php?news-'.$row['id'].'">'.$row['kom'].' '.$einodermehr. '</a>'; } if (strpos ($row['text'] , '[PREVIEWENDE]') !== false) { $a = explode('[PREVIEWENDE]' , $row['text']); $row['text'] = $a[0]; if ( $rtid4->tid != '' && $rrep2->rep != '' ) { $row['readwholenews'] = '<a href="index.php?forum-showposts-' . $rtid4->tid . '" alt="mehr lesen" title="mehr lesen"><img src="include/images/icons/news/more.gif" alt="mehr lesen" border="0"></a>'; } else { $row['readwholenews'] = '<a href="index.php?news-' . $row['id'] . '" alt="mehr lesen" title="mehr lesen"><img src="include/images/icons/news/more.gif" alt="mehr lesen" border="0"></a>'; } } else { $row['readwholenews'] = ''; } if (!$row['html']) { $row['text'] = bbcode($row['text']); } $lastnews .= ' <div> <hr style="height: 0px; border: dotted #a9f543 0px; border-top-width: 1px; " /> </div> <div style="float:right; width:30%; text-align:right; ">'.$row['kate'].'</div> <div style="float:left; width:70%; padding-top:1px; "> <table width="100%" border="0" align="center" cellpadding="1" cellspacing="0" class="cbg1"> <tr> <td>'.$row['title'].'<br /> <font class="smalfont">'.$row['datum'].' - '.$lang['from'].' <a href="index.php?user-details-'.$row['uid'].'">'.$row['username'].'</a></font><br /></td> </tr> </table> </div><br style="clear:both; " /> '; if ( $newscounter <= $xwholenews ) { $lastnews .= ' <hr style="height: 0px; border: dotted #a9f543 0px; border-top-width: 1px; " /> <div> <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td colspan="2">'.$row['text'].'</td> </tr> <tr> <td width="50%">'.$row['komlink'].'</td> <td width="50%"> <div align="right">'.$row['readwholenews'].'</div> </td> </tr> </table> </div> <br /> <br /> '; } $newscounter = $newscounter + 1; } if ( $newscounter <= $xwholenews ) { $lastnews .= '<hr style="height: 0px; border: dotted #a9f543 0px; border-top-width: 1px; " />'; } ######################################################### # Template erstellen # ######################################################### $tpl->set('titelfarbe', $titelbgcolor); $tpl->set('tabellefarbe', $tablebgcolor); $tpl->set('teams', $showteams); $tpl->set('teambanner', $teambannerbreite); $tpl->set('zeile', $zeile); $tpl->set('topnews', $topnews); $tpl->set('lastnews', $lastnews); $tpl->out(0); $design->footer(); ?>
Schönes Wochenede!
Randfee
verwendete ilchClan Version: 1.1 M
betroffene Homepage: externer Link
Zuletzt modifiziert von randfee am 19.06.2010 - 19:18:35