1

(3 replies, posted in PunBB 1.2 discussion)

Well, it shouldn't be too difficult to update the modifications with PunBB 1.3's extension system. I'm sure many of the authors will be updating their own, and releasing them.

quaker wrote:

quick links to edit profile fields?
pm link. etc.

Q

That seems like an alternative smile. I'll look in to it.

Okay, so right now I'm working on what's known as a "PunBB User Panel". It will be displayed as a side block on my index page. I've been thinking of different fields, and options to add to this block, but can't seem to come up with anything else. So far, it displays the login status. When logged in, it will list the username, group, and post count. It also has a "Logout" option that's currently being displayed as a button.


Here is the source code:

// START SUBST - <pun_user_panel>
if ($pun_user['g_id'] != PUN_GUEST)
{
    ob_start();
?>
    <div class="block">
        <h2><span>User Panel</span></h2>
        <div class="box">
            <div class="inbox">
                <ul>
                    <li> » Username: <span class="<?php echo $pun_user['g_title'] ?>"><a href="profile.php?id=<?php echo $pun_user['id'] ?>"><?php echo $pun_user['username'] ?></a></span></li>
                    <li> » Group: <a href="userlist.php?username=&show_group=<?php echo $pun_user['g_id'] ?>&sort_by=username&sort_dir=ASC&search=Submit"><?php echo $pun_user['g_title'] ?></a></li>
                    <li> » Posts: <a href="search.php?action=show_user&user_id=<?php echo $pun_user['id'] ?>"><?php echo $pun_user['num_posts'] ?></a></li>
                </ul>
                <br />
                <form style="text-align: center;" method="post" action="login.php?action=out&id=<?php echo $pun_user['id'] ?>"><input type="submit" value="Logout"></form>
                <br />
            </div>
        </div>
    </div>
<?php
    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace('<pun_user_panel>', $tpl_temp, $tpl_main);
    ob_end_clean();
}
else
    $tpl_main = str_replace('<pun_user_panel>', '', $tpl_main);
// END SUBST - <pun_user_panel>

As you may have noticed, this code has been modified to work with header.php. After placing this code within your header.php, you are able to call for it by using the following tag within your PunBB template files.

<pun_user_panel>

If you have any suggestions, or additions, just let me know.

Thanks, Tubby

4

(2 replies, posted in Programming)

Well, seeing as PunBB is open source, you can do anything you want with it. Yes, you can use any language to the best of your knowledge in order to modify it's source. That's the main purpose of it being OPEN source.

If you are having any trouble with modifying it to suit your needs, I'm sure other PunBB users will be more than happy to direct you to certain modifications, or maybe help with any requests that you may have.

I'm sure it's possible, but the topic of the post should be descriptive enough. Correct me if I'm wrong, but I think that's what a topic is for wink.

MattF wrote:

If you're putting it within a html section, you need to enclose it within php tags, i.e:

<?php
if ($pun_user['g_id'] == PUN_GUEST)
{
     error($lang_common['No permission']);
}
?>

Wouldn't it be more efficient to use the "message" function?

<?php
if ($pun_user['g_id'] == PUN_GUEST)
{
     message($lang_common['No permission']);
}
?>

7

(21 replies, posted in PunBB 1.2 discussion)

Are you surrounding the main content with the proper div tag? Inside of your index.tpl, check to make sure that you are surrounding <pun_main> with:

<div id="main">
    <pun_main>
</div>

Here is what my template file looks like ( To give you an example. )

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" dir="<pun_content_direction>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
<pun_head>
</head>
<body>

<div id="punwrap">
<div id="pun<pun_page>" class="pun">

<div id="brdheader" class="block">
    <div class="box">
        <div id="brdtitle" class="inbox">
            <pun_title>
            <pun_desc>
        </div>
        <pun_navlinks>
        <pun_status>
    </div>
</div>

<div id="left">
    <pun_forum_stats>
    <pun_topics>
</div>

<div id="right">
    <pun_login>
    <pun_users>
</div>

<div id="main">
    <pun_main>
</div>

<div class="clearer"></div>

<pun_users_online>

<pun_footer>

</div>
</div>

</body>
</html>

Seems quite different to me, but it could be useful. It would definitely be an interesting modification, that's for sure. Good work I'd say smile.

9

(21 replies, posted in PunBB 1.2 discussion)

Alright, take a look at your header.php file. The name of the new tpl file is supposed to be index.tpl. Be sure to rename it, and make these modificatons to your header.

In header.php

Find:

if (defined('PUN_ADMIN_CONSOLE'))
    $tpl_main = file_get_contents(PUN_ROOT.'include/template/admin.tpl');

After, add:

else if (defined('PUN_INDEX'))
    $tpl_main = file_get_contents(PUN_ROOT.'include/template/index.tpl');

Now it should call for the template file within your index.php file ( The one that has been posted ). If you run in to any problems, let me know.

10

(21 replies, posted in PunBB 1.2 discussion)

That shouldn't be too hard. Just create a seperate template file from main.tpl, and define it in your index.php file.

Two Coloums:
Place this code in base.css:

#left {
    width: 200px;
    overflow: hidden;
    float: left;
}
#main {
    margin-left: 212px;
}

Three Coloums:
Place this code in base.css:

#left {
    width: 200px;
    overflow: hidden;
    float: left;
}
#right {
    width: 200px;
    overflow: hidden;
    float: right;
}
#main {
    margin-left: 212px;
    margin-right: 212px;
}

Then, within your new template file you can use these classifications whenever you need them.

11

(21 replies, posted in PunBB 1.2 discussion)

All you had to do was ask me wink.

Here is the source to my current news system.

index.php:

<?php
define('PUN_INDEX', 1);
define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';
 
// Set the page title here
$page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / Index';
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
require PUN_ROOT.'include/parser.php';

// Load the forums.php language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/index.php';

if($pun_user['g_id'] == PUN_GUEST) {
    echo '<div class="block"><h2 class="welcome"><span>Welcome</span></h2><div class="box"><div class="inbox"><div class="welcome_message">Welcome to the forums. You are currently considered a guest. In order to gain full access to our forum features you must be logged in. Be sure to either <a href="login.php">Login</a>, or <a href="register.php">Register</a>.</div></div></div></div>';
}

// News Information
$news_limit = '3'; 
$forum_id = '1';
$order_by = 't.posted';
// Retrieve News From Database
$db_news = $db->query('SELECT t.id, t.subject, t.num_replies, t.num_views, t.forum_id, p.topic_id, p.poster, p.poster_id, p.message, p.hide_smilies, p.id AS pid, p.posted, g.g_id, g.g_title FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.posted=t.posted INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id  LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE t.forum_id='.$forum_id.' AND t.moved_to IS NULL AND f.redirect_url IS NULL ORDER BY '.$order_by.' DESC LIMIT '.$news_limit) or error('Unable to fetch the news', __FILE__, __LINE__, $db->error());



if($db->num_rows($db_news))
{
    while($news = $db->fetch_assoc($db_news))
    {
        // Set Some Variables
        $message = parse_message($news['message'], $news['hide_smilies']);
        $subject = $news['subject'];
        $poster = '<span class="'.$news['g_title'].'"><a href="profile.php?id='.$news['poster_id'].'">'.$news['poster'].'</a></span>';
        $date_posted = gmdate('F jS, Y', $news['posted']);
        $news_id = $news['id'];
        if($pun_user['g_id'] == PUN_ADMIN) {
            $news_options = '<a href="viewtopic.php?id='.$news_id.'">View Post</a> | <a href="edit.php?id='.$news['pid'].'">Edit Post</a> | <a href="delete.php?id='.$news['pid'].'">Delete Post</a>';
        }
        else  
            $news_options = '<a href="viewtopic.php?id='.$news['id'].'">View Post</a>';
            
        if($pun_user['g_id'] == PUN_ADMIN) {
            $global_news_options = '<div class="block"><div class="box"><div class="inbox" style="text-align: center;"><a href="viewforum.php?id='.$news['forum_id'].'">View All News</a> | <a href="moderate.php?fid='.$news['forum_id'].'">Moderate News</a> | <a href="post.php?fid='.$news['forum_id'].'">Post News Topic</a></div></div></div>';
        }
        else if($pun_user['g_id'] != PUN_GUEST) {
            $global_news_options = '<div class="block" id="news_global_options"><div class="box"><div class="inbox" style="text-align: center;"><a href="viewforum.php?id='.$news['forum_id'].'">View All News</a></div></div></div>';
        }
        else
            $global_news_options = '';
        
        if($pun_user['g_id'] != PUN_GUEST) {
            $news_output = '<div class="blocktable" style="margin-bottom: 12px;"><h2 class="news_subject"><span>'.$subject.'</span></h2><div class="box"><div class="inbox"><table cellspacing="0"><thead><tr><th class="tcl" id="news_header">Posted By: '.$poster.' | Date Posted: '.$date_posted.'</th></tr></thead><tbody><tr><td class="tcl"><div class="news_message">'.$message.'</div></td></tr></tbody><thead><tr><th class="tcl" id="news_footer">'.$news_options.'</th></tr></thead></table></div></div></div>';
        }
        else
            $news_output = '<div class="blocktable" style="margin-bottom: 12px;"><h2 class="news_subject"><span>'.$subject.'</span></h2><div class="box"><div class="inbox"><table cellspacing="0"><thead><tr><th class="tcl" style="text-align: center;">Posted By: '.$poster.' | Date Posted: '.$date_posted.'</th></tr></thead><tbody><tr><td class="tcl"><div class="news_message">'.$message.'</div></td></tr></tbody></table></div></div></div>';
        
        echo $news_output;
    }
    echo $global_news_options;
}

// Require the footer
require PUN_ROOT.'footer.php';

Here is the css that goes along with it.

h2.news_subject, h2.welcome, #news_header, #news_footer {
    text-align: center;
}
table div.news_message, div.welcome_message {
    padding: 4px 6px;
}
#news_global_options {
    margin-bottom: 12px;
}

Well, after taking a look at that portion of the index.php file, I have noticed that another query would need to be added. Not only that, but it already has a span classification. I think that you are better off leaving it as it is. 

Again, it is possible, but it would take some more modifying.

Well, the modification itself is nothing special, but it can be highy effective if you think about it wink. It has it's advantages.

I'm thinking about making this modification a little more official, and releasing it over at PunRes. I'm going to have to get it a little more ogranized though. I'll start with a "Read Me", and go from there smile.

So, you wish to apply this modification to a different part of your index.php?

I'm looking at your posted index.php file, and I've found the lines myself. I do not know what you mean exactly. All this modification is supposed to do is add a span classification to the user links in the online list itself. Going by what you have posted, the modification seems like it would work just fine.

Alright. take this query in your index.php:

Find:

$result = $db->query('SELECT user_id, ident FROM '.$db->prefix.'online WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());

Replace with:

$result = $db->query('SELECT o.user_id, o.ident, g.g_id, g.g_title FROM '.$db->prefix.'online AS o INNER JOIN '.$db->prefix.'users AS u ON o.user_id=u.id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE o.idle=0 ORDER BY o.ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());

Afterwards, find this line:

$users[] = "\n\t\t\t\t".'<dd><a href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';

Replace that line with:

$users[] = "\n\t\t\t\t".'<dd><span class="'.$pun_user_online['g_title'].'"><a href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a></span>';

That's all that is needed for index.php. It seems to be the same exact procedure for both the default version, and your version of index.php. The modification only affects the online query, and changes the line that outputs the online users. So, it should be safe to use just as long as you modify it correctly smile.

17

(5 replies, posted in PunBB 1.2 show off)

No, I don't mind at all wink.

The good thing about this modification is that nothing has to be added/installed in to the database. Not only that, but you are able to modify the classification via css, and it is alot easier to customize. Also, you have the ability to customize it for each seperate style sheet. Let me know how it turns out smile.

Let's start by opening up your index.php
Begin this step by finding the following line:

$result = $db->query('SELECT user_id, ident FROM '.$db->prefix.'online WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());

Replace this line with the following:

$result = $db->query('SELECT o.user_id, o.ident, g.g_id, g.g_title FROM '.$db->prefix.'online AS o INNER JOIN '.$db->prefix.'users AS u ON o.user_id=u.id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE o.idle=0 ORDER BY o.ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());

Now, find this line:

$users[] = "\n\t\t\t\t".'<dd><a href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';

Replace it with:

$users[] = "\n\t\t\t\t".'<dd><span class="'.$pun_user_online['g_title'].'"><a href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a></span>';

Okay, now open up viewtopic.php.

Find:

$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());

Replace with:

$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, g.g_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());

Next find:

$username = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.pun_htmlspecialchars($cur_post['username']).'</a>';

Replace that with:

$username = '<span class="'.$cur_post['g_title'].'"><a href="profile.php?id='.$cur_post['poster_id'].'">'.pun_htmlspecialchars($cur_post['username']).'</a></span>';

Now we move on to userlist.php

First find:

$result = $db->query('SELECT u.id, u.username, u.title, u.num_posts, u.registered, g.g_id, g.g_user_title FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '').' ORDER BY '.$sort_by.' '.$sort_dir.' LIMIT '.$start_from.', 50') or error('Unable to fetch user list', __FILE__, __LINE__, $db->error());

Replace with:

$result = $db->query('SELECT u.id, u.username, u.title, u.num_posts, u.registered, g.g_id, g.g_user_title, g.g_title FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id>1'.(!empty($where_sql) ? ' AND '.implode(' AND ', $where_sql) : '').' ORDER BY '.$sort_by.' '.$sort_dir.' LIMIT '.$start_from.', 50') or error('Unable to fetch user list', __FILE__, __LINE__, $db->error());

Next find:

<td class="tcl"><?php echo '<a href="profile.php?id='.$user_data['id'].'">'.pun_htmlspecialchars($user_data['username']).'</a>' ?></td>

Replace that with:

<td class="tcl"><?php echo '<span class="'.$user_data['g_title'].'"><a href="profile.php?id='.$user_data['id'].'">'.pun_htmlspecialchars($user_data['username']).'</a></span>' ?></td>

Open profile.php.

Find:

$result = $db->query('SELECT u.username, u.email, u.title, u.realname, u.url, u.jabber, u.icq, u.msn, u.aim, u.yahoo, u.location, u.use_avatar, u.signature, u.disp_topics, u.disp_posts, u.email_setting, u.save_pass, u.notify_with_post, u.show_smilies, u.show_img, u.show_img_sig, u.show_avatars, u.show_sig, u.timezone, u.language, u.style, u.num_posts, u.last_post, u.registered, u.registration_ip, u.admin_note, g.g_id, g.g_user_title FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());

Replace with:

$result = $db->query('SELECT u.username, u.email, u.title, u.realname, u.url, u.jabber, u.icq, u.msn, u.aim, u.yahoo, u.location, u.use_avatar, u.signature, u.disp_topics, u.disp_posts, u.email_setting, u.save_pass, u.notify_with_post, u.show_smilies, u.show_img, u.show_img_sig, u.show_avatars, u.show_sig, u.timezone, u.language, u.style, u.num_posts, u.last_post, u.registered, u.registration_ip, u.admin_note, g.g_id, g.g_user_title, g.g_title FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());

Now find:

<dd><?php echo pun_htmlspecialchars($user['username']) ?></dd>

Replace that with:

<dd><?php echo '<span class="'.$user['g_title'].'"><a href="profile.php?id='.$id.'">'.pun_htmlspecialchars($user['username']).'</a></span>' ?></dd>

Now, this is where we style the links for each of the groups smile.

Open up either your main.tpl, or a specific style sheet ( your_style.css ).

For main.tpl

Add this in between the <head> tag:

<style type="text/css">
span.Administrators a:link, span.Administrators a:visited {
    color: #ff9900;
    font-size: 12px;
}    
span.Administrators a:hover {
    color: #ff9966;
    font-size: 12px;
    text-decoration: underline;
}
span.Moderators a:link, span.Moderators a:visited {
    color: #009900;
    font-size: 12px;
}
span.Moderators a:hover {
    color: #00bb00;
    font-size: 12px;
    text-decoration: underline;
}
</style>

For the style sheet
Add this at the end of it:

span.Administrators a:link, span.Administrators a:visited {
    color: #ff9900;
    font-size: 12px;
}    
span.Administrators a:hover {
    color: #ff9966;
    font-size: 12px;
    text-decoration: underline;
}
span.Moderators a:link, span.Moderators a:visited {
    color: #009900;
    font-size: 12px;
}
span.Moderators a:hover {
    color: #00bb00;
    font-size: 12px;
    text-decoration: underline;
}

That should be all! Let me know how it works.

19

(5 replies, posted in PunBB 1.2 show off)

It isn't necessary to start a seperate query, but to call for the group title in the same query. I'll check up on the error, and thanks smile.

20

(5 replies, posted in PunBB 1.2 show off)

Currently working on a punbb forum. This is basically a test site, and in no way an actual community, but let me know what you think about the skin, or any modifications that have been made. I have implemented my own coloured usergroup modification ( The modification does not deal with the database what so ever, and is customizable through the style sheets ).

http://www.punbb.ofingo.com

I will be updating it from time to time.

21

(2 replies, posted in PunBB 1.2 discussion)

Well, I've noticed that PunBB does not update the user post count after a user's post/topic has been deleted. I'm assuming that it can be updated within the cache file? If so, could someone please let me know?

22

(0 replies, posted in PunBB 1.2 troubleshooting)

Alright, so I've been trying to color usernames according to their specific group id within the online list. I'm not too sure if I'm approaching this properly, or not, but this is how it is set up.

Here is the end portion of my forums.php file:

$num_guests = 0;
$users = array();
$result = $db->query('SELECT o.user_id, o.ident, g.g_id FROM '.$db->prefix.'online AS o INNER JOIN '.$db->prefix.'groups AS g WHERE o.idle=0 ORDER BY o.ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());

while ($pun_user_online = $db->fetch_assoc($result))
{
    if ($pun_user_online['user_id'] > 1) 
    {
        if($pun_user_online['g_id'] > PUN_MOD)
            $users[] = "\n\t\t\t\t".'<dd class="admin"><a class="username" href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
        else
            $users[] = "\n\t\t\t\t".'<dd><a class="username" href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
    }
    else
        ++$num_guests;
}
if($num_users > 0) 
{
?>
<div class="block">
    <div class="box">
        <div class="inbox">
        <?php echo "\t\t\t".'<dl id="onlinelist" class= "clearb">'."\n\t\t\t\t".'<dt><strong>Online: </strong></dt>'."\t\t\t\t".implode(',</dd> ', $users).'</dd>'."\n\t\t\t".'</dl>'."\n"; ?>
        </div>
    </div>
</div>

<?php
}

$footer_style = 'index';
require PUN_ROOT.'footer.php';

As you can see, I'm trying to assign a class to all administrators that appear in the online list. Now, my problem is that it seems to display the username four times in the online list after making these changes. I think it might have something to do with the way that I'm calling the information from the database ( The query that is set up ). Please, let me know.

23

(6 replies, posted in PunBB 1.2 show off)

Doesn't seem all that bad, but the black background doesn't really suit the site layout.

This adds the users' group titles just below their respective "user group titles".

Start by opening viewtopic.php

Find:

$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());

Replace with:

$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, g.g_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());

Find:

$user_title = get_title($cur_post);

Add below:

$user_group = $cur_post['g_title'];

Find:

<dd class="usertitle"><strong><?php echo $user_title ?></strong></dd>

Add below:

<dd><?php echo $user_group ?></dd>

Now save, and upload viewtopic.php.

Pretty basic, but I hope it helps tongue.

25

(3 replies, posted in PunBB 1.2 show off)

Well, there is nothing much to look at as of now, but once the forum is fully modified, it should come out great. I'm just advertising it now in order to let people know that it is there. I'm also accepting comments on the index page.

http://www.punbb.ofingo.com