Jump to content
InvisionCommunity.de - Der Deutsche Invision Community Support
Sign in to follow this  
nO-FaCe

code erweitern

Recommended Posts

ich möchte einen centerblock erweitern, für letzte beiträge aus dem forum. was mich stört ist, das das so angezeigt wird

neues thema | von wem | von wann

ich hätte das aber gerne so

neues thema | von wem | von wann | Antw. von

jetzt denke ich mir, das ich die author_id aus dem ibf_posts brauche und einbauen muss. da liegt das problem ich weiß nicht wie

kann mir einer von euch helfen ?

hier der code wo das rein soll

$content = "";



 $limit = 10;

 $taglio = 20;


 $DB->query("SELECT id, read_perms FROM ibf_forums");

 while( $f = $DB->fetch_row() ) {

  if ( $std->check_perms($f['read_perms']) != TRUE ) {

         $bad[] = $f['id'];

        } else {

         $good[] = $f['id'];

        }

       }


  if ( count($bad) > 0 ) {

     $qe = " AND forum_id NOT IN(".implode(',', $bad ).") ";

    }


  $DB->query("SELECT tid, title, posts, starter_id as member_id, starter_name as member_name, last_post as post_date, views

              FROM ibf_topics

              WHERE state!='closed' AND approved=1 AND (moved_to IS NULL or moved_to='') $qe

              ORDER BY last_post DESC LIMIT 0,$limit");


  while ( $post = $DB->fetch_row() ) {

 $post['title'] = strip_tags($post['title']);

 $post['title'] = str_replace( "!" , "!" , $post['title'] );

 $post['title'] = str_replace( """, "\"", $post['title'] );

  if (strlen($post['title']) > $taglio) {

   $post['title'] = substr( $post['title'],0,($taglio - 3) ) . "...";

   $post['title'] = preg_replace( '/&(#(\d+;?)?)?(\.\.\.)?$/', '...',$post['title'] );

  }


        $tid = $post['tid'];

 $title = $post['title'];

 $mid = $post['member_id'];

 $mname = $post['member_name'];


         

       global $mklib;

 $date = $this->get_date($post['post_date'],"SHORT");


$content .= "

<tr><td width=\"60%\" id=\"tdblock\">

    <a class=\"uno\" href='{$ibforums->base_url}showtopic=$tid&view=getlastpost'>$title</a>

</td>

<td id='tdglobal'>

     <a class=\"uno\" href='{$ibforums->base_url}showuser=$mid'>{$this->lang ['from']}: $mname <td></a >{$this->lang ['in_date']}:</a >$date</td>

</td>

</tr>

";

}


       unset($good);

       unset($bad);

       unset($ge);

       unset($post);

       unset($title);

       unset($mname);

       unset($date);



?>

bitte helft mir mal ;)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×