ilch Forum » Ilch Clan 1.1 » Fehlersuche und Probleme » Ilch 1.1 und die alten Module...

Geschlossen
  1. #1
    User Pic
    Karnickel Mitglied
    Registriert seit
    30.04.2006
    Beiträge
    261
    Beitragswertungen
    0 Beitragspunkte
    So, jetzt schreibe ich auch mal hier rein, nach dem mir hier schon sehr geholfen wurde. (danke daher ^^)
    Als ich die neue Version draugezogen hatte und ich einige Module anpassen wollte, viel mir auf, dass das Forum unter anderem sehr "schlicht" ist.
    Es gibt ja dieses schöne "Forum_tuned". Die passt aber leider nicht für 1.1 und ich hab hier schon gesucht, aber es will sich nix finden lassen. (Sonst such ich erst imma was, also nicht denken, dass ich zu faul bin.)
    Ich hab auch schonn versucht die "Forum_tuned" Datei zu verändern, das klappt auch alles. Doch der Button "online"/"offline" geht irgendwie nichit richtig.
    Link:
    externer Link

    Ich hoffe ihr versteht was ich meine. (Im Forum ist beim Post in der Mitte der Button ob der User online ist. Der geht nicht)

    Hier ist die Datei um die es geht: (include/contents/forum/show_posts)

    <?php 
    #   Copyright by: Manuel
    #   Support: www.ilch.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&auml;ge zeigen';
    $hmenu  = $extented_forum_menu.'<a class="smalfont" href="index.php?forum">Forum</a><b> &raquo; </b><a class="smalfont" href="index.php?forum-showcat-'.$aktForumRow['cid'].'">'.$aktForumRow['kat'].'</a><b> &raquo; </b><a class="smalfont" href="index.php?forum-showtopics-'.$fid.'">'.$aktForumRow['name'].'</a><b> &raquo; </b>';
    $hmenu .= $aktTopicRow['name'].$extented_forum_menu_sufix;
    $design = new design ( $title , $hmenu, 1, 'forum/index.htm' );
    $design->header();
    
    
    # Topic Hits werden eins hochgesetzt.
    db_query('UPDATE `prefix_topics` SET hit = hit + 1 WHERE id = "'.$tid.'"');
    
    # 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 ) {
      $antworten = '<b>[ <a href="index.php?forum-newpost-'.$tid.'">'.$lang['answer'].'</a> ]</b>';
    }
    
    $class = 'Cmite';
    
    $tpl = new tpl ( 'forum/showpost' );
    $ar = array (
      'SITELINK' => $MPL,
      'tid' => $tid,
    	'ANTWORTEN' => $antworten,
    	'TOPICNAME' => $aktTopicRow['name']
    );
    $tpl->set_ar_out($ar,0);
    $i = $anfang +1;
    $erg = db_query("SELECT 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' );
    	
    	# define some vars.
    	$row['sig'] = ( empty($row['sig']) ? '' : '<br /><hr style="width: 50%;" align="left">'.bbcode($row['sig']) );
    	$row['TID'] = $tid;
    	$row['class'] = $class;
    	$row['date'] = date ('d.m.Y - H:i:s', $row['time'] );
    	$row['delete'] = '';
    	$row['change'] = '';
    	$row['avatar'] = (file_exists($row['avatar'])?'<br /><br /><img src="'.$row['avatar'].'" alt="User Pic" border="0" /><br />':'');
      $row['rang']   = userrang ($row['posts'],$row['erstid']);
      $row['posts']  = ($row['posts']?'<br />Posts: '.$row['posts']:'');
    	$row['txt']    = (isset($_GET['such']) ? markword(bbcode ($row['txt']),$_GET['such']) : bbcode ($row['txt']) );
    	$row['i']      = $i;
      $row['page']   = $page;
      
    	if ( $row['erstid'] != '' ) {
    		  $user_row = db_fetch_assoc(db_query("SELECT posts,regist FROM prefix_user WHERE id = ".$row['erstid']));
    		$row['erst'] = '<a href="index.php?user&amp;um=6&amp;uid='.$row['erstid'].'"><b>'.$row['erst'].'</b></a>';
    		$posts = $user_row['posts'];
    		$row['posts'] = '<br />Posts: '.$user_row['posts'];
    		
    		if ( $posts == '' ) { $row['posts'] = '<br>Nicht registriert';}
    		
    		
    		
    		#Ranking Balken
    		#Grafiken definieren
    		$rand_l = '<img src="include/images/icons/ranking/rank_left.jpg" width="8" height="17" alt="" border="0">';
    		$rand_r = '<img src="include/images/icons/ranking/rank_right.jpg" width="8" height="17" alt="" border="0">';
    		$rank_grey = '<img src="include/images/icons/ranking/rank_grey.jpg" width="8" height="17" alt="" border="0">';
    		$rank_02 = '<img src="include/images/icons/ranking/rank_02.jpg" width="8" height="17" alt="" border="0">';
    		$rank_03 = '<img src="include/images/icons/ranking/rank_03.jpg" width="8" height="17" alt="" border="0">';
    		$rank_04 = '<img src="include/images/icons/ranking/rank_04.jpg" width="8" height="17" alt="" border="0">';
    		$rank_05 = '<img src="include/images/icons/ranking/rank_05.jpg" width="8" height="17" alt="" border="0">';
    		$rank_06 = '<img src="include/images/icons/ranking/rank_06.jpg" width="8" height="17" alt="" border="0">';
    		$rank_07 = '<img src="include/images/icons/ranking/rank_07.jpg" width="8" height="17" alt="" border="0">';
    		$rank_08 = '<img src="include/images/icons/ranking/rank_08.jpg" width="8" height="17" alt="" border="0">';
    		$rank_09 = '<img src="include/images/icons/ranking/rank_09.jpg" width="8" height="17" alt="" border="0">';
    		$rank_10 = '<img src="include/images/icons/ranking/rank_10.jpg" width="8" height="17" alt="" border="0">';
    		
    		#Bezugnehmen auf das Ranking des users
    		if ( $posts != '' ) {
    		$row['rang'] = '<br>';
    		if ($user_row['posts'] <= '9') { $row['rang'] .= $rand_l.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rand_r; }
    		elseif ($user_row['posts'] <= '24') { $row['rang'] .= $rand_l.$rank_02.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rand_r; }
    		elseif ($user_row['posts'] <= '49') { $row['rang'] .= $rand_l.$rank_02.$rank_03.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rand_r; }
    		elseif ($user_row['posts'] <= '84') { $row['rang'] .= $rand_l.$rank_02.$rank_03.$rank_04.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rand_r; }
    		elseif ($user_row['posts'] <= '124') { $row['rang'] .= $rand_l.$rank_02.$rank_03.$rank_04.$rank_05.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rand_r; }
    		elseif ($user_row['posts'] <= '179') { $row['rang'] .= $rand_l.$rank_02.$rank_03.$rank_04.$rank_05.$rank_06.$rank_grey.$rank_grey.$rank_grey.$rank_grey.$rand_r; }
    		elseif ($user_row['posts'] <= '244') { $row['rang'] .= $rand_l.$rank_02.$rank_03.$rank_04.$rank_05.$rank_06.$rank_07.$rank_grey.$rank_grey.$rank_grey.$rand_r; }
    		elseif ($user_row['posts'] <= '299') { $row['rang'] .= $rand_l.$rank_02.$rank_03.$rank_04.$rank_05.$rank_06.$rank_07.$rank_08.$rank_grey.$rank_grey.$rand_r; }
    		elseif ($user_row['posts'] <= '344') { $row['rang'] .= $rand_l.$rank_02.$rank_03.$rank_04.$rank_05.$rank_06.$rank_07.$rank_08.$rank_09.$rank_grey.$rand_r; }
    		elseif ($user_row['posts'] <= '399') { $row['rang'] .= $rand_l.$rank_02.$rank_03.$rank_04.$rank_05.$rank_06.$rank_07.$rank_08.$rank_09.$rank_10.$rand_r; }
    		}
    		
    		else {$row['rang'] .= ""; }
    		
    		#Wenn der User registriert ist wird folgendes ausgelesen
    		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['date'] .= '&nbsp;<img src="include/images/icons/uonline.gif" border="0">'; }
    		else { 
    		$row['date'] .= '&nbsp;<img src="include/images/icons/uoffline.gif" border="0">'; }
    		
    		#Male or Female		
    		$abf1 = "SELECT * FROM prefix_userfields where uid = ".$row['erstid']." and fid = 9";
    		$erg1 = db_query($abf1);
    		$gender = db_fetch_object($erg1);
    
    		if ($gender->val == "männlich" ){
    		$row['erst'] .= '&nbsp;<img src="include/images/icons/male.gif" border="0">';
    		}
    		elseif ($gender->val == "weiblich" ){
    		$row['erst'] .= '&nbsp;<img src="include/images/icons/female.gif" border="0">';
    		}
    		
    		
    		
    		#Priv Message
    		$row['erst'] .= "<br><br><a href='index.php?forum-privmsg-new&empfid=".$row['erstid']."'><img src='include/images/icons/privmsg.gif' border='0' alt='Private Nachricht an den User senden'></a>";
    		
    		#Messenger Daten werden ausgelesen		
    		$abf1 = "SELECT * FROM prefix_userfields where uid = ".$row['erstid']." and fid = 7";
    		$erg1 = db_query($abf1);
    		$icqnr = db_fetch_object($erg1);
    
    		if (is_numeric($icqnr->val) ){
    		$row['erst'] .= '&nbsp;<a href="http://www.icq.com/whitepages/cmd.php?uin='.$icqnr->val.'&action=add"><img src="include/images/icons/icqblume.gif" alt="User in ICQ Liste hinzufuegen" border="0"></a>';
    		}
    		
    		#Email 
    		$row['erst'] .= "&nbsp;<a href='index.php?user&um=4&uID=".$row['erstid']."'><img src='include/images/icons/email.gif' border='0' alt='eMail an den User schicken'></a>";
    		
    		#Website des Users
    		$abf1 = "SELECT * FROM prefix_userfields where uid = ".$row['erstid']." and fid = 4";
    		$erg1 = db_query($abf1);
    		$uwebsite = db_fetch_object($erg1);
    
    		if ($uwebsite->val <> "" ){
    		$row['erst'] .= '&nbsp;<a href="'.$uwebsite->val.'" target="_blank"><img src="include/images/icons/uwebsite.gif" border="0" alt="Website des Users besuchen"></a>';
    		}
    		
    		}
    		
    		#User Details
    		if ( $posts != '' ) {
    		$abf1 = 'SELECT * FROM prefix_user where id = '.$row["erstid"];
    		$erg1 = db_query($abf1);
    		$user = db_fetch_object($erg1);
    		$bf1 = "SELECT * FROM prefix_userfields where uid = ".$row['erstid']." and fid = 1";
    		$rg1 = db_query($bf1);
    		$userfield = db_fetch_object($rg1);
    		
    		$zeit = date('d. M Y',$user->regist);
    		
    		$row['details'] = "<br><br>Dabei seit: ".$zeit."<br>";
    		if ($userfield->val != '') {
    		$row['details'] .= "Kommt aus: ".$userfield->val."<br>";
    		}
    		
    		}
    		else {
    		$row['details'] = "";}
    		
    		#
    		#Edit Ende
    		##################################
    
    		# profilefields
    		$sig = @db_result(db_query("SELECT val FROM prefix_userfields WHERE uid = ".$row['erstid']." AND fid = 5"),0);
    		if (!empty($sig)) { $row['sig'] = '<br /><hr size="1" width="100" align="left">'.bbcode($sig); }
    		$avatar = @db_result(db_query("SELECT val FROM prefix_userfields WHERE uid = ".$row['erstid']." AND fid = 6"),0);
    		if (!empty($avatar)) { $row['avatar'] = '<br /><br /><img src="'.$avatar.'" alt="User Pic" border="0" /><br />'; }
    	}
    	
    	
             if(empty($points)){
    	$points=0;
    	}
    	$rang=$posts+$points;
    	//$row['rang'] = rangbildforum ($rang);
    	if ($forum_rights['mods'] == TRUE AND $i>1) {
    	  $row['delete'] = '<a href="index.php?forum-delpost-'.$tid.'-'.$row['id'].'">'.$lang['delete'].'</a>';
    	}
    	if ( $forum_rights['reply'] == TRUE AND loggedin() ) {
    	  $row['change'] = '&nbsp;<a href="index.php?forum-editpost-'.$tid.'-'.$row['id'].'">'.$lang['change'].'</a>';
    	}
    	$tpl->set_ar_out($row,1);
      
      $i++;
    }
    
    $tpl->set_ar_out( array ( 'SITELINK' => $MPL, 'ANTWORTEN' => $antworten ) , 2 );
    
    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();
    ?>

    Danke für die Hilfe!
    0 Mitglieder finden den Beitrag gut.
  2. #2
    User Pic
    Karnickel Mitglied
    Registriert seit
    30.04.2006
    Beiträge
    261
    Beitragswertungen
    0 Beitragspunkte
    mhh, so langsam weiß ich nicht, wie lage ich noch warten soll. zunge
    Aber dann werde ich halt noch länger warten, vielleicht weiß jemand ja Rat.
    Karnickel
    0 Mitglieder finden den Beitrag gut.
  3. #3
    User Pic
    Panicsheep Hall Of Fame
    Registriert seit
    24.08.2004
    Beiträge
    10.192
    Beitragswertungen
    16 Beitragspunkte
    Ich bin noch nicht up2date was die Variablennamen angeht, aber hast du die in der abfrage schon berücksichtigt bzw. an 1.1 angepasst?

    Das hier ist der Code den ich meine
    $abf1 = "SELECT * FROM prefix_online where uid = ".$row['erstid'];
            $erg1 = db_query($abf1);
            $status = db_fetch_object($erg1);
            if ($status->uid == $row['erstid']) {
            $row['date'] .= '&nbsp;<img src="include/images/icons/uonline.gif" border="0">'; }
            else { 
            $row['date'] .= '&nbsp;<img src="include/images/icons/uoffline.gif" border="0">'; }
    Omnia bona erunt
    0 Mitglieder finden den Beitrag gut.
Geschlossen

Zurück zu Fehlersuche und Probleme

Optionen: Bei einer Antwort zu diesem Thema eine eMail erhalten