Topic: Installed PM Mod- Works Great, but...

Ive installed some other mods such as cash mod & reputation mod. These both display info next to the username on a post.

With the PM mod, it uses the same layout when you are viewing your sent messages. The only thing is that when viewing a sent message, next to the username it does not show any of the stats for the mods I installed. Where do I enter that code in?

Thanks

1,000 Free Ad Impressions On My punBB Forum

Re: Installed PM Mod- Works Great, but...

It should be similar to the process you took to install the mods in viewtopic.php; see if you can adapt the instructions for the message view page.

Looking for a certain modification for your forum? Please take a look here before posting.

3 (edited by tryadmin 2007-05-24 17:29)

Re: Installed PM Mod- Works Great, but...

Thanks for your reply. I was trying that last night, but the processes on message_list.php look pretty different than those on viewtopic.php.

Here is viewtopic.php (just the way I want it):

<div class="postleft">
                <dl>
                    <dt><strong><?php echo $username ?></strong></dt>
                    <dd class="usertitle"><strong><?php echo $user_title ?></strong></dd>
<dd class="usertitle"><?php echo $rank_pips ?></dd>
                    <dd class="postavatar"><?php echo $user_avatar ?></dd>
<?php if (count($user_info)) echo "\t\t\t\t\t".implode('</dd>'."\n\t\t\t\t\t", $user_info).'</dd>'."\n"; ?>
<?php require(PUN_ROOT.'include/reputation/rep_viewtopic.php'); ?>
<?php if (count($user_contacts)) echo "\t\t\t\t\t".'<dd class="usercontacts">'.implode('  ', $user_contacts).'</dd>'."\n"; ?>
                </dl>
            </div>

Here is what I have in message_list.php, which is missing pips, credits and reputation:

    if ($cur_post['id'] > 0)
    {
        $username = '<a href="profile.php?id='.$cur_post['id'].'">'.pun_htmlspecialchars($cur_post['username']).'</a>';
        $cur_post['username'] = $cur_post['username'];
        $user_ = get_title($cur_post);
        
        if ($pun_config['o_censoring'] == '1')
            $user_title = censor_words($user_title);
        
        // Format the online indicator
        $is_online = ($cur_post['is_online'] == $cur_post['id']) ? '<strong>'.$lang_topic['Online'].'</strong>' : $lang_topic['Offline'];

        if ($pun_config['o_avatars'] == '1' && $cur_post['use_avatar'] == '1' && $pun_user['show_avatars'] != '0')
        {
            if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['id'].'.gif'))
                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['id'].'.gif" '.$img_size[3].' alt="" />';
            else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['id'].'.jpg'))
                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['id'].'.jpg" '.$img_size[3].' alt="" />';
            else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['id'].'.png'))
                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['id'].'.png" '.$img_size[3].' alt="" />';
        }
        else
            $user_avatar = '';

            // We only show location, register date, post count and the contact links if "Show user info" is enabled
        if ($pun_config['o_show_user_info'] == '1')
        {
            if ($cur_post['location'] != '')
            {
                if ($pun_config['o_censoring'] == '1')
                    $cur_post['location'] = censor_words($cur_post['location']);

                $user_info[] = '<dd>'.$lang_topic['From'].': '.pun_htmlspecialchars($cur_post['location']);
            }

            $user_info[] = '<dd>'.$lang_common['Registered'].': '.date($pun_config['o_date_format'], $cur_post['registered']);

            if ($pun_config['o_show_post_count'] == '1' || $pun_user['g_id'] < PUN_GUEST)
                $user_info[] = '<dd>'.$lang_common['Posts'].': '.$cur_post['num_posts'];

            // Now let's deal with the contact links (E-mail and URL)
            if (($cur_post['email_setting'] == '0' && !$pun_user['is_guest']) || $pun_user['g_id'] < PUN_GUEST)
                $user_contacts[] = '<a href="mailto:'.$cur_post['email'].'">'.$lang_common['E-mail'].'</a>';
            else if ($cur_post['email_setting'] == '1' && !$pun_user['is_guest'])
                $user_contacts[] = '<a href="misc.php?email='.$cur_post['id'].'">'.$lang_common['E-mail'].'</a>';
            require(PUN_ROOT.'include/pms/viewtopic_PM-link.php');
            if ($cur_post['url'] != '')
                $user_contacts[] = '<a href="'.pun_htmlspecialchars($cur_post['url']).'">'.$lang_topic['Website'].'</a>';
        }

As you can see, they are quite different. Any suggestions would be greatly appreciated. Thanks.

1,000 Free Ad Impressions On My punBB Forum

Re: Installed PM Mod- Works Great, but...

Because you're looking in the wrong spot. wink

From message_list.php:

<div class="postleft">
                    <dl>
                        <dt><strong><?php echo $username ?></strong></dt>
                        <dd class="usertitle"><strong><?php echo $user_title ?></strong></dd>
                        <dd class="postavatar"><?php if (isset($user_avatar)) echo $user_avatar ?></dd>
    <?php if (isset($user_info)) if (count($user_info)) echo "\t\t\t\t\t".implode('</dd>'."\n\t\t\t\t\t", $user_info).'</dd>'."\n"; ?>
    <?php if (isset($user_contacts)) if (count($user_contacts)) echo "\t\t\t\t\t".'<dd class="usercontacts">'.implode('  ', $user_contacts).'</dd>'."\n"; ?>
                    </dl>
                </div>
Looking for a certain modification for your forum? Please take a look here before posting.

Re: Installed PM Mod- Works Great, but...

aha! Ill give that a run around the block tonight. Thanks!

1,000 Free Ad Impressions On My punBB Forum