dieses Modul für mein Forum.
Ich habe die Standart Rang-Grafiken ersetzt durch die von einen anderen Modul.
Bis hier her keine Probleme.
Nun habe ich die content datei show_posts.php bearbeitet und an meine Ränge angepasst.
Auch im Adminmenü habe ich die Ränge angepasst.
Aber trotzdem steht bei einen Beitrag darunter "Next Level bei 5 Posts" egal wie viele man neue Posts schreibt diese Anzeige bleibt immer bei "Next Level bei 5 Posts".
Hier mal der Code:
<?php # Copyright by: Manuel Staechele # Support: www.ilch.de # Forenmod by Malte Wiatrowski alias "IRvD" - Vorlage von Benjamin Rau & matthias-schlich.de defined ('main') or die ( 'no direct access' ); # check ob ein fehler aufgetreten ist. check_forum_failure($forum_failure); # toipc als gelesen markieren $_SESSION['forumSEE'][$fid][$tid] = time(); $title = $allgAr['title'].' :: Forum :: '.$aktTopicRow['name'].' :: Beiträge zeigen'; $hmenu = $extented_forum_menu.'<a class="smalfont" href="index.php?forum">Forum</a><b> » </b>'.aktForumCats($aktForumRow['kat']).'<b> » </b><a class="smalfont" href="index.php?forum-showtopics-'.$fid.'">'.$aktForumRow['name'].'</a><b> » </b>'; $hmenu .= $aktTopicRow['name'].$extented_forum_menu_sufix; $design = new design ( $title , $hmenu, 1); $design->header(); # Topic Hits werden eins hochgesetzt. db_query('UPDATE `prefix_topics` SET hit = hit + 1 WHERE id = "'.$tid.'"'); $erg = db_query("SELECT fid FROM `prefix_posts` WHERE tid = ".$tid); $row = db_fetch_assoc($erg); $newth = '<a href="index.php?forum-newtopic-'.$row['fid'].'"><img src="include/images/forum/newth.png" border="0"></a>'; # mehrere seiten fals gefordert $limit = $allgAr['Fpanz']; // Limit $page = ($menu->getA(3) == 'p' ? $menu->getE(3) : 1 ); $MPL = db_make_sites ($page , "WHERE tid = ".$tid , $limit , 'index.php?forum-showposts-'.$tid , 'posts' ); $anfang = ($page - 1) * $limit; $antworten = ''; if (($aktTopicRow['stat'] == 1 AND $forum_rights['reply'] == TRUE) OR ($_SESSION['authright'] <= '-7' OR $forum_rights['mods'] == TRUE)) { $antworten = '<a href="index.php?forum-newpost-'.$tid.'"><img src="include/images/forum/antw.png" border="0"></a>'; } $class = 'Cmite'; $tpl = new tpl ( 'forum/showpost' ); $ar = array ( 'SITELINK' => $MPL, 'tid' => $tid, 'ANTWORTEN' => $antworten, 'TOPICNAME' => $aktTopicRow['name'], 'HMENU' => $hmenu, 'NEWTH' => $newth ); $tpl->set_ar_out($ar,0); $i = $anfang +1; $ges_ar = array ('wurstegal', 'maennlich', 'weiblich'); ################################## #Forenmod by Malte Wiatrowski - Vorlage von Benjamin Rau & matthias-schlich.de #Posts $erg = db_query("SELECT geschlecht, prefix_posts.id,txt,time,erstid,erst,sig,avatar,posts FROM `prefix_posts` LEFT JOIN prefix_user ON prefix_posts.erstid = prefix_user.id WHERE tid = ".$tid." ORDER BY time LIMIT ".$anfang.",".$limit); while($row = db_fetch_assoc($erg)) { $class = ( $class == 'Cnorm' ? 'Cmite' : 'Cnorm' ); $monatsnamen = array( '','Januar','Februar','März', 'April','Mai','Juni', 'Juli','August','September', 'Oktober','November','Dezember'); $month_current = $monatsnamen [gmdate('n')]; # define some vars. $row['sig'] = ( empty($row['sig']) ? '' : '<br /><hr style="width: 80%;" align="left">'.bbcode($row['sig']) ); $row['TID'] = $tid; $row['class'] = $class; $row['date'] = date('d', $row['time']).'. '.$monatsnamen [gmdate('n', $row['time'])].' '.date('Y - H:i', $row['time']); $row['delete'] = ''; $row['change'] = ''; $row['erst'] = forum_farbname($row['erst']); if (file_exists($row['avatar'])) { $row['avatar'] = '<br /><img src="'.$row['avatar'].'" alt="User Pic" border="0" style="max-width:130px; max-height:180px;" /><br />'; } elseif ($allgAr['forum_default_avatar']) { $row['avatar'] = '<br /><img src="include/images/avatars/'.$ges_ar[$row['geschlecht']].'.jpg" alt="User Pic" border="0" /><br />'; } else { $row['avatar'] = ''; } $row['rang2'] = userrang ($row['posts'],$row['erstid']); $row['txt'] = (isset($_GET['such']) ? markword(bbcode ($row['txt']),$_GET['such']) : bbcode ($row['txt']) ); $row['i'] = $i; if ( $row['erstid'] != '' ) { $user_row = db_fetch_assoc(db_query("SELECT posts,regist FROM prefix_user WHERE id = ".$row['erstid'])); $posts = $row['posts']; $row['posts'] = '<font style="font-weight:bold">Beiträge:</font> '.$row['posts'].'<br />'; if ( $posts == '' ) { $row['posts'] = '<br>Nicht registriert';} #Ranking Balken #Grafiken definieren $rank_0 = '<img src="include/images/rangs/Level_1.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>0</b> Posts</span><br>'; $rank_1 = '<img src="include/images/rangs/Level_1.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>1</b> Posts</span><br>'; $rank_2 = '<img src="include/images/rangs/Level_2.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>5</b> Posts</span><br>'; $rank_3 = '<img src="include/images/rangs/Level_3.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>25</b> Posts</span><br>'; $rank_4 = '<img src="include/images/rangs/Level_4.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>50</b> Posts</span><br>'; $rank_5 = '<img src="include/images/rangs/Level_5.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>75</b> Posts</span><br>'; $rank_6 = '<img src="include/images/rangs/Level_6.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>100</b> Posts</span><br>'; $rank_7 = '<img src="include/images/rangs/Level_7.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>150</b> Posts</span><br>'; $rank_8 = '<img src="include/images/rangs/Level_8.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>200</b> Posts</span><br>'; $rank_9 = '<img src="include/images/rangs/Level_9.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>250</b> Posts</span><br>'; $rank_10 = '<img src="include/images/rangs/Level_10.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>300</b> Posts</span><br>'; $rank_11 = '<img src="include/images/rangs/Level_11.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>350</b> Posts</span><br>'; $rank_12 = '<img src="include/images/rangs/Level_12.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>400</b> Posts</span><br>'; $rank_13 = '<img src="include/images/rangs/Level_13.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>425</b> Posts</span><br>'; $rank_14 = '<img src="include/images/rangs/Level_14.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>450</b> Posts</span><br>'; $rank_15 = '<img src="include/images/rangs/Level_15.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>475</b> Posts</span><br>'; $rank_16 = '<img src="include/images/rangs/Level_16.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>500</b> Posts</span><br>'; $rank_17 = '<img src="include/images/rangs/Level_17.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>550</b> Posts</span><br>'; $rank_18 = '<img src="include/images/rangs/Level_18.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>600</b> Posts</span><br>'; $rank_19 = '<img src="include/images/rangs/Level_19.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>650</b> Posts</span><br>'; $rank_20 = '<img src="include/images/rangs/Level_20.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>700</b> Posts</span><br>'; $rank_21 = '<img src="include/images/rangs/Level_21.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>750</b> Posts</span><br>'; $rank_22 = '<img src="include/images/rangs/Level_22.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>800</b> Posts</span><br>'; $rank_23 = '<img src="include/images/rangs/Level_23.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>850</b> Posts</span><br>'; $rank_24 = '<img src="include/images/rangs/Level_24.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>900</b> Posts</span><br>'; $rank_25 = '<img src="include/images/rangs/Level_25.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>950</b> Posts</span><br>'; $rank_26 = '<img src="include/images/rangs/Level_26.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>1000</b> Posts</span><br>'; $rank_27 = '<img src="include/images/rangs/Level_27.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>1260</b> Posts</span><br>'; $rank_28 = '<img src="include/images/rangs/Level_28.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>1300</b> Posts</span><br>'; $rank_29 = '<img src="include/images/rangs/Level_29.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>1600</b> Posts</span><br>'; $rank_30 = '<img src="iinclude/images/rangs/Level_30.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>2000</b> Posts</span><br>'; $rank_31 = '<img src="include/images/rangs/Level_31.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>3500</b> Posts</span><br>'; $rank_32 = '<img src="include/images/rangs/Level_32.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>4000</b> Posts</span><br>'; $rank_33 = '<img src="include/images/rangs/Level_33.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>4500</b> Posts</span><br>'; $rank_34 = '<img src="include/images/rangs/Level_34.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>5000</b> Posts</span><br>'; $rank_35 = '<img src="include/images/rangs/Level_35.png" alt="" border="0"><br><span class="smalfont">Next Level bei <b>10000</b> Posts</span><br>'; #Bezugnehmen auf das Ranking des users if ( $row['posts'] != '' ) { $row['rang'] = $rank_name.'<br>'; if ($posts <= '0') { $row['rang'] .= $rank_0; } elseif ($posts <= '0') { $row['rang'] .= $rank_1; } elseif ($posts <= '24') { $row['rang'] .= $rank_2; } elseif ($posts <= '49') { $row['rang'] .= $rank_3; } elseif ($posts <= '74') { $row['rang'] .= $rank_4; } elseif ($posts <= '99') { $row['rang'] .= $rank_5; } elseif ($posts <= '149') { $row['rang'] .= $rank_6; } elseif ($posts <= '199') { $row['rang'] .= $rank_7; } elseif ($posts <= '249') { $row['rang'] .= $rank_8; } elseif ($posts <= '299') { $row['rang'] .= $rank_9; } elseif ($posts <= '349') { $row['rang'] .= $rank_10; } elseif ($posts <= '399') { $row['rang'] .= $rank_11; } elseif ($posts <= '424') { $row['rang'] .= $rank_12; } elseif ($posts <= '449') { $row['rang'] .= $rank_13; } elseif ($posts <= '474') { $row['rang'] .= $rank_14; } elseif ($posts <= '499') { $row['rang'] .= $rank_15; } elseif ($posts <= '549') { $row['rang'] .= $rank_16; } elseif ($posts <= '599') { $row['rang'] .= $rank_17; } elseif ($posts <= '649') { $row['rang'] .= $rank_18; } elseif ($posts <= '699') { $row['rang'] .= $rank_19; } elseif ($posts <= '749') { $row['rang'] .= $rank_20; } elseif ($posts <= '799') { $row['rang'] .= $rank_21; } elseif ($posts <= '849') { $row['rang'] .= $rank_22; } elseif ($posts <= '899') { $row['rang'] .= $rank_23; } elseif ($posts <= '949') { $row['rang'] .= $rank_24; } elseif ($posts <= '999') { $row['rang'] .= $rank_25; } elseif ($posts <= '1149') { $row['rang'] .= $rank_26; } elseif ($posts <= '1299') { $row['rang'] .= $rank_27; } elseif ($posts <= '1599') { $row['rang'] .= $rank_28; } elseif ($posts <= '1999') { $row['rang'] .= $rank_29; } elseif ($posts <= '3499') { $row['rang'] .= $rank_30; } elseif ($posts <= '3999') { $row['rang'] .= $rank_31; } elseif ($posts <= '4499') { $row['rang'] .= $rank_32; } elseif ($posts <= '4999') { $row['rang'] .= $rank_33; } elseif ($posts <= '9999') { $row['rang'] .= $rank_34; } } else {$row['rang'] .= ""; } } #User Details if ( $posts != '' ) { $abf1 = 'SELECT * FROM prefix_user where id = '.$row["erstid"]; $erg1 = db_query($abf1); $user = db_fetch_object($erg1); $zeit = date('d.m.Y',$user->regist); $llogin = date('d.m.Y - H:i',$user->llogin); $ort = $user->wohnort; $www = $user->homepage; $email = $user->opt_mail; $pm = $user->opt_pm; $land = $user->staat; #Flagge if ($land != '') {$row['land'] = '<img src="include/images/flags/'.$land.'" >';} else{$row['land'] = '';} #Dabei seit $row['details'] = "<span class=\"info\">Dabei seit:</span> ".$zeit."<br>"; #Wohnort if ($ort != ''){$row['details'] .= "<span class=\"info\">Wohnort:</span> ".$ort."<br>";} #Homepage if ($www != ''){$row['www'] = '<a href="'.$www.'" target="_blank"><img src="include/images/forum/www.png" border="0" alt="Website des Users besuchen"></a>';} else{$row['www'] = '';} #Letzter Login $row['details'] .= "<span class=\"info\">Letzter Login:<br></span> ".$llogin."<br>"; #PM if ($pm == '1'){ $row['pm'] = "<a href='?forum-privmsg-new=0&empfid=".$row['erstid']."'><img src='include/images/forum/pm.png' border='0' alt='Private Nachricht an den User senden'></a>"; }else{$row['pm'] = '';} #email if ($email == '1'){ $row['email'] = "<a href='?user-mail-".$row['erstid']."'><img src='include/images/forum/email.png' border='0' alt='E-Mail an den User senden'></a>"; }else{$row['email'] = '';} } else { $row['details'] = ""; $row['land'] = ''; $row['pm'] = ''; $row['email'] = ''; $row['www'] = ''; } if ( $posts != '' ) { #User Online o Offline $abf1 = "SELECT * FROM prefix_online where uid = ".$row['erstid']; $erg1 = db_query($abf1); $status = db_fetch_object($erg1); if ($status->uid == $row['erstid']) { $row['online'] = ' <img src="include/images/forum/uonline.png" border="0">'; } else { $row['online'] = ' <img src="include/images/forum/uoffline.png" border="0">'; } } else {$row['online'] = '';} # #Edit Ende ################################## $row['page'] = $page; if ( $row['posts'] != 0 ) { $row['erst'] = '<a href="index.php?user-details-'.$row['erstid'].'"><b>'.forum_farbname($row['erst']).'</b></a>'; } elseif ( $row['erstid'] == 0 ) { $row['rang'] = 'gelöschter User'; } if ($forum_rights['mods'] == TRUE AND $i>1) { $row['delete'] = '<a class="forum" href="index.php?forum-delpost-'.$tid.'-'.$row['id'].'"><img src="include/images/forum/showpost/delete.png" width="16" height="16" alt="delete" align="absmiddle" title="löschen"/> löschen</a>'; } if ( $forum_rights['reply'] == TRUE AND loggedin() ) { $row['change'] = ' <a class="forum" href="index.php?forum-editpost-'.$tid.'-'.$row['id'].'"><img src="include/images/forum/showpost/change.png" width="16" height="16" alt="change" align="absmiddle" title="ändern"/> ändern</a>'; } $row['posts'] = ($row['posts']?'<br />'.$row['posts']:'').'<br />'; $tpl->set_ar_out($row,1); $i++; } $tpl->set_ar_out( array ( 'SITELINK' => $MPL, 'ANTWORTEN' => $antworten ) , 2 ); // anfang qpost if (loggedin()) { $dppk_time = time(); $time = time(); if (!isset($_SESSION['klicktime'])) { $_SESSION['klicktime'] = 0; } $topic = ''; $txt = ''; $xnn = ''; if (isset($_POST['txt_qp'])) { $txt = trim(escape($_POST['txt_qp'], 'textarea')); } $tpl = new tpl ('forum/qpost'); $ar = array ( 'txt_qp' => escape_for_fields(unescape($txt)), 'tid' => $tid, ); $tpl->set_ar_out($ar,1); if (($_SESSION['klicktime'] + 150) > $dppk_time OR empty($txt) OR !empty($_POST['priview']) OR (empty($_POST['Gname']) AND !loggedin())) { } else { # save qpost $_SESSION['klicktime'] = $dppk_time; $design = new design ( $title , $hmenu, 1); $design->header(); if (loggedin()) { $uid = $_SESSION['authid']; $erst = escape($_SESSION['authname'],'string'); db_query("UPDATE `prefix_user` set posts = posts+1 WHERE id = ".$uid); } else { $erst = $xnn; $uid = 0; } db_query ("INSERT INTO `prefix_posts` (tid,fid,erst,erstid,time,txt) VALUES ( ".$tid.", ".$fid.", '".$erst."', ".$uid.", ".$time.", '".$txt."')"); $pid = db_last_id(); db_query("UPDATE `prefix_topics` SET last_post_id = ".$pid.", rep = rep + 1 WHERE id = ".$tid); db_query("UPDATE `prefix_forums` SET posts = posts + 1, last_post_id = ".$pid." WHERE id = ".$fid ); $page = ceil ( ($aktTopicRow['rep']+1) / $allgAr['Fpanz'] ); # topic als gelesen markieren $_SESSION['forumSEE'][$fid][$tid] = time(); wd ( array ( $lang['backtotopic'] => 'index.php?forum-showposts-'.$tid.'-p'.$page.'#'.$pid, $lang['backtotopicoverview'] => 'index.php?forum-showtopics-'.$fid ) , $lang['createpostsuccessful'] , 3 ); } } $tpl = new tpl ( 'forum/showpost' ); // end qpost if (loggedin()) { if ($menu->get(3) == 'topicalert') { if (1 == db_result(db_query("SELECT COUNT(*) FROM prefix_topic_alerts WHERE uid = ".$_SESSION['authid']." AND tid = ".$tid),0)) { db_query("DELETE FROM prefix_topic_alerts WHERE uid = ".$_SESSION['authid']." AND tid = ".$tid); } else { db_query("INSERT INTO prefix_topic_alerts (tid,uid) VALUES (".$tid.", ".$_SESSION['authid'].")"); } } echo 'Optionen:'; if (1 == db_result(db_query("SELECT COUNT(*) FROM prefix_topic_alerts WHERE uid = ".$_SESSION['authid']." AND tid = ".$tid),0)) { echo '<br />- <a href="index.php?forum-showposts-'.$tid.'-topicalert">'.$lang['nomailonreply'].'</a><br />'; } else { echo '<br />- <a href="index.php?forum-showposts-'.$tid.'-topicalert">'.$lang['mailonreply'].'</a><br />'; } } if ( $forum_rights['mods'] == TRUE ) { $tpl->set ( 'status', ($aktTopicRow['stat'] == 1 ? $lang['close'] : $lang['open'] ) ); $tpl->set ( 'festnorm', ($aktTopicRow['art'] == 0 ? $lang['fixedtopic'] : $lang['normaltopic'] ) ); $tpl->set('tid',$tid); $tpl->out(3); } $design->footer(); ?>
Ich hoffe ihr könnt mir helfen .
Lg.SoX
verwendete ilch Version: 1.1 P
betroffene Homepage: externer Link