1 (edited by SoraCross 2007-01-24 14:08)

Topic: show topic AND link to profile!!

i modified this from the show topic mod here: http://wiki.punres.org/Last_post%27s_su … orum_index
edit your index.php and find:

// If there is a last_post/last_poster.
    if ($cur_forum['last_post'] != '')
        $last_post = '<a href="viewtopic.php?pid='.$cur_forum['last_post_id'].'#p'.$cur_forum['last_post_id'].'">'.format_time($cur_forum['last_post']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).'</span>';
    else
        $last_post = ' ';

and replace with:

// If there is a last_post/last_poster.
    if ($cur_forum['last_post'] != '') {
        $idmT = (isset($idmComp)) ? ' title="'.$idmComp.'"' : ''; 
        
        $result2 = $db->query('SELECT users.id FROM '.$db->prefix.'users, '.$db->prefix.'forums WHERE users.username=forums.last_poster') or error('Unable to fetch user id info', __FILE__, __LINE__, $db->error());
       $poster_id = $db->result($result2);
        
        $last_post = format_time($cur_forum['last_post']).'<br />in: <a href="viewtopic.php?pid='.$cur_forum['last_post_id'].'#p'.$cur_forum['last_post_id'].'"'.$idmT.'><em>'.$idm.'</em></a><br /><span class="byuser">'.$lang_common['by'].' <a href="profile.php?id='.$poster_id.'">'.pun_htmlspecialchars($cur_forum['last_poster']).'</a>';'</span>';
    } else
           $last_post = ' ';

and now you got the topic on the index AND a link to the profile of the one who posted last in it! enjoy =^.^=

Re: show topic AND link to profile!!

Code blocks, please.

Re: show topic AND link to profile!!

how do i do that? o.o;;

Re: show topic AND link to profile!!

http://punbb.org/forums/help.php#bbcode