26

(22 replies, posted in Discussions)

Slavok wrote:

Some kind of check is necessary. The spam protection can be implemented like an extension.

StevenBullen wrote:

Maybe you should make it so that a user must have one single post before he can add signature.

Got it.

Any news on this?

Don't take this the wrong way but everything seems to be slow with you guys. Spam is happening and someone should be sitting down for an hour and sorting it.

27

(52 replies, posted in PunBB 1.3 additions)

Anatoly wrote:

1. Do you think PunBB needs this? Or should we better leave the current Oxygen theme by default? (Remember the power of the habit :-)

No it does not and yes you should leave Oxygen theme as the default.

I have highlighted the important bits on this paragraph about PunBB as to why a) you do not bundle themes like this and b) why changing the goal posts for punbb is not practical.

PunBB is a fast and lightweight PHP-powered discussion board. It is released under the GNU General Public License. Its primary goals are to be faster, smaller and less graphically intensive as compared to other discussion boards. PunBB has fewer features than many other discussion boards, but is generally faster and outputs smaller, semantically correct XHTML-compliant pages.

Who in charge came up with the idea to produce a new theme?

Plus you mention that someone has been taken on to help with the CSS work, could we possibly have a link to some sites this person has produced?

28

(22 replies, posted in Discussions)

When you add a extension to reduce spam can you clear out the sig's again because I can't clear a 100 sigs a day. wink

Maybe you could clear all user website links who have 0 posts at the same time. Because that is getting spammed as well.

29

(22 replies, posted in Discussions)

Slavok wrote:

Also we need some kind of checking for posts: for hidden links (via tag "color"), etc.
Signatures of users with no posts were cleared.

Yep for sure.
Cheers for the clearance. smile

30

(22 replies, posted in Discussions)

Also if you check out the last 10 users that have registered they will no doubt have spam in most of the signatures.

Plus I have noticed that people have been pinging the profile's so they get indexed on google.

Here is 2 good examples...

http://punbb.informer.com/forums/user/18929/
http://punbb.informer.com/forums/user/17324/

Can someone from admin either prune all users with no posts (bit drastic) or remove everyones sig (empty the table) so that you remove all the spam in one move.

EDIT:
Maybe you should make it so that a user must have one single post before he can add signature. Because with the 150+ users registering a day it's impossible to keep up.

31

(5 replies, posted in PunBB 1.2 troubleshooting)

Not a problem. wink

32

(5 replies, posted in PunBB 1.2 troubleshooting)

Remove

require PUN_ROOT.'include/pms/functions_navlinks2.php';

33

(5 replies, posted in PunBB 1.2 troubleshooting)

Ok the problem is with the PM mod that you installed. You went over the proper log out code.

Change this line

$links[] = '<li id="navlogout"><a href="login.php?action=out&amp;id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';

to

$links[] = '<li id="navlogout"><a href="login.php?action=out&amp;id='.$pun_user['id'].'&amp;csrf_token='.sha1($pun_user['id'].sha1(get_remote_address())).'">'.$lang_common['Logout'].'</a>';

It will occur twice by the way.

Ok the logout problem is nothing to with MY code. So if you removed the code from profile.php please put it back. wink

I sent you a PM concerning logout problem. smile

Here is updated viewtopic.php (remember will only work when not logged in as admin tongue)

<?php
/***********************************************************************

  Copyright (C) 2002-2008  PunBB

  This file is part of PunBB.

  PunBB is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published
  by the Free Software Foundation; either version 2 of the License,
  or (at your option) any later version.

  PunBB is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA

************************************************************************/


define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';


if ($pun_user['g_read_board'] == '0')
    message($lang_common['No view']);


$action = isset($_GET['action']) ? $_GET['action'] : null;
$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
$pid = isset($_GET['pid']) ? intval($_GET['pid']) : 0;
if ($id < 1 && $pid < 1)
    message($lang_common['Bad request']);

// Load the viewtopic.php language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/topic.php';
require PUN_ROOT.'lang/'.$pun_user['language'].'/reputation.php';

// If a post ID is specified we determine topic ID and page number so we can redirect to the correct message
if ($pid)
{
    $result = $db->query('SELECT topic_id FROM '.$db->prefix.'posts WHERE id='.$pid) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
    if (!$db->num_rows($result))
        message($lang_common['Bad request']);

    $id = $db->result($result);

    // Determine on what page the post is located (depending on $pun_user['disp_posts'])
    $result = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE topic_id='.$id.' ORDER BY posted') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
    $num_posts = $db->num_rows($result);

    for ($i = 0; $i < $num_posts; ++$i)
    {
        $cur_id = $db->result($result, $i);
        if ($cur_id == $pid)
            break;
    }
    ++$i;    // we started at 0

    $_GET['p'] = ceil($i / $pun_user['disp_posts']);
}

if ($pun_user['g_id'] > 2)
{
    $result = $db->query('SELECT DISTINCT reported_by FROM '.$db->prefix.'reports WHERE topic_id = '.$id.' AND zapped IS NULL') or error('Unable to fetch report info', __FILE__, __LINE__, $db->error());
    if ($db->num_rows($result) >= 3)
    {
        message('Content contained in this topic has been marked as objectionable and is awaiting staff review. Please try again later.');
    }
}
// If action=new, we redirect to the first new post (if any)
else if ($action == 'new' && !$pun_user['is_guest'])
{
    $result = $db->query('SELECT MIN(id) FROM '.$db->prefix.'posts WHERE topic_id='.$id.' AND posted>'.$pun_user['last_visit']) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
    $first_new_post_id = $db->result($result);

    if ($first_new_post_id)
        header('Location: viewtopic.php?pid='.$first_new_post_id.'#p'.$first_new_post_id);
    else    // If there is no new post, we go to the last post
        header('Location: viewtopic.php?id='.$id.'&action=last');

    exit;
}

// If action=last, we redirect to the last post
else if ($action == 'last')
{
    $result = $db->query('SELECT MAX(id) FROM '.$db->prefix.'posts WHERE topic_id='.$id) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
    $last_post_id = $db->result($result);

    if ($last_post_id)
    {
        header('Location: viewtopic.php?pid='.$last_post_id.'#p'.$last_post_id);
        exit;
    }
}


// Fetch some info about the topic
if (!$pun_user['is_guest'])
    $result = $db->query('SELECT pf.forum_name AS parent_forum, f.parent_forum_id, t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, s.user_id AS is_subscribed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'subscriptions AS s ON (t.id=s.topic_id AND s.user_id='.$pun_user['id'].') LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') LEFT JOIN '.$db->prefix.'forums AS pf ON f.parent_forum_id=pf.id WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());
else
    $result = $db->query('SELECT pf.forum_name AS parent_forum, f.parent_forum_id, t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') LEFT JOIN '.$db->prefix.'forums AS pf ON f.parent_forum_id=pf.id WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());

if (!$db->num_rows($result))
    message($lang_common['Bad request']);

$cur_topic = $db->fetch_assoc($result);

// Sort out who the moderators are and if we are currently a moderator (or an admin)
$mods_array = ($cur_topic['moderators'] != '') ? unserialize($cur_topic['moderators']) : array();
$is_admmod = ($pun_user['g_id'] == PUN_ADMIN || ($pun_user['g_id'] == PUN_MOD && array_key_exists($pun_user['username'], $mods_array))) ? true : false;

// Can we or can we not post replies?
if ($cur_topic['closed'] == '0')
{
    if (($cur_topic['post_replies'] == '' && $pun_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1' || $is_admmod)
        $post_link = '<a href="post.php?tid='.$id.'">'.$lang_topic['Post reply'].'</a>';
    else
        $post_link = '&nbsp;';
}
else
{
    $post_link = $lang_topic['Topic closed'];

    if ($is_admmod)
        $post_link .= ' / <a href="post.php?tid='.$id.'">'.$lang_topic['Post reply'].'</a>';
}


// Determine the post offset (based on $_GET['p'])
$num_pages = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']);

$p = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p'];

$start_from = $pun_user['disp_posts'] * ($p - 1);

// Generate paging links
$paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'viewtopic.php?id='.$id);


if ($pun_config['o_censoring'] == '1')
    $cur_topic['subject'] = censor_words($cur_topic['subject']);


$quickpost = false;
if ($pun_config['o_quickpost'] == '1' &&
    !$pun_user['is_guest'] &&
    ($cur_topic['post_replies'] == '1' || ($cur_topic['post_replies'] == '' && $pun_user['g_post_replies'] == '1')) &&
    ($cur_topic['closed'] == '0' || $is_admmod))
{
    $required_fields = array('req_message' => $lang_common['Message']);
    $quickpost = true;
}

if (!$pun_user['is_guest'] && $pun_config['o_subscriptions'] == '1')
{
    if ($cur_topic['is_subscribed'])
        // I apologize for the variable naming here. It's a mix of subscription and action I guess :-)
        $subscraction = '<p class="subscribelink clearb">'.$lang_topic['Is subscribed'].' - <a href="misc.php?unsubscribe='.$id.'">'.$lang_topic['Unsubscribe'].'</a></p>'."\n";
    else
        $subscraction = '<p class="subscribelink clearb"><a href="misc.php?subscribe='.$id.'">'.$lang_topic['Subscribe'].'</a></p>'."\n";
}
else
    $subscraction = '<div class="clearer"></div>'."\n";

$page_title = pun_htmlspecialchars($pun_config['o_board_title'].' / '.$cur_topic['subject']);
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';

?>
<div class="linkst">
    <div class="inbox">
        <p class="pagelink conl"><?php echo $paging_links ?></p>
        <p class="postlink conr"><?php echo $post_link ?></p>
        <?php

if($cur_topic['parent_forum'])
    echo "\t\t".'<ul><li><a href="index.php">'.$lang_common['Index'].'</a>&nbsp;</li><li>&raquo;&nbsp;<a href="viewforum.php?id='.$cur_topic['parent_forum_id'].'">'.pun_htmlspecialchars($cur_topic['parent_forum']).'</a>&nbsp;</li><li>&raquo;&nbsp;<a href="viewforum.php?id='.$cur_topic['forum_id'].'">'.pun_htmlspecialchars($cur_topic['forum_name']).'</a>&nbsp;</li><li>&raquo;&nbsp;'.pun_htmlspecialchars($cur_topic['subject']).'</li></ul>';
else
    echo "\t\t".'<ul><li><a href="index.php">'.$lang_common['Index'].'</a></li><li>&nbsp;&raquo;&nbsp;<a href="viewforum.php?id='.$cur_topic['forum_id'].'">'.pun_htmlspecialchars($cur_topic['forum_name']).'</a></li><li>&nbsp;&raquo;&nbsp;'.pun_htmlspecialchars($cur_topic['subject']).'</li></ul>';

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

<?php


require PUN_ROOT.'include/parser.php';

$bg_switch = true;    // Used for switching background color in posts
$post_count = 0;    // Keep track of post numbers

// Retrieve the posts (and their respective poster/online status)
$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, u.rep_plus AS count_rep_plus, u.rep_minus AS count_rep_minus, u.reputation_enable, 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());
while ($cur_post = $db->fetch_assoc($result))
{
    $post_count++;
    $user_avatar = '';
    $user_info = array();
    $user_contacts = array();
    $post_actions = array();
    $is_online = '';
    $signature = '';

    // If the poster is a registered user.
    if ($cur_post['poster_id'] > 1)
    {


        $username = '<a href="profile.php?id='.$cur_post['poster_id'].'">'.pun_htmlspecialchars($cur_post['username']).'</a>';
        $user_title = 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['poster_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['poster_id'].'.gif'))
                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.gif" '.$img_size[3].' alt="" />';
            else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg'))
                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg" '.$img_size[3].' alt="" />';
            else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.png'))
                $user_avatar = '<img src="'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_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['g_id'] != PUN_ADMIN)
            {
                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['poster_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>';
        }

        if ($pun_user['g_id'] < PUN_GUEST)
        {
            $user_info[] = '<dd>IP: <a href="moderate.php?get_host='.$cur_post['id'].'">'.$cur_post['poster_ip'].'</a>';

            if ($cur_post['admin_note'] != '')
                $user_info[] = '<dd>'.$lang_topic['Note'].': <strong>'.pun_htmlspecialchars($cur_post['admin_note']).'</strong>';
        }
    }
    // If the poster is a guest (or a user that has been deleted)
    else
    {
        $username = pun_htmlspecialchars($cur_post['username']);
        $user_title = get_title($cur_post);

        if ($pun_user['g_id'] < PUN_GUEST)
            $user_info[] = '<dd>IP: <a href="moderate.php?get_host='.$cur_post['id'].'">'.$cur_post['poster_ip'].'</a>';

        if ($pun_config['o_show_user_info'] == '1' && $cur_post['poster_email'] != '' && !$pun_user['is_guest'])
            $user_contacts[] = '<a href="mailto:'.$cur_post['poster_email'].'">'.$lang_common['E-mail'].'</a>';
    }

    // Generation post action array (quote, edit, delete etc.)
    if (!$is_admmod)
    {
        if (!$pun_user['is_guest'])
            $post_actions[] = '<li class="postreport"><a href="misc.php?report='.$cur_post['id'].'">'.$lang_topic['Report'].'</a>';

        if ($cur_topic['closed'] == '0')
        {
            if ($cur_post['poster_id'] == $pun_user['id'])
            {
                if ((($start_from + $post_count) == 1 && $pun_user['g_delete_topics'] == '1') || (($start_from + $post_count) > 1 && $pun_user['g_delete_posts'] == '1'))
                    $post_actions[] = '<li class="postdelete"><a href="delete.php?id='.$cur_post['id'].'">'.$lang_topic['Delete'].'</a>';
                if ($pun_user['g_edit_posts'] == '1')
                    $post_actions[] = '<li class="postedit"><a href="edit.php?id='.$cur_post['id'].'">'.$lang_topic['Edit'].'</a>';
            }

            if (($cur_topic['post_replies'] == '' && $pun_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1')
                $post_actions[] = '<li class="postquote"><a href="post.php?tid='.$id.'&amp;qid='.$cur_post['id'].'">'.$lang_topic['Quote'].'</a>';
        }
    }
    else
        $post_actions[] = '<li class="postreport"><a href="misc.php?report='.$cur_post['id'].'">'.$lang_topic['Report'].'</a>'.$lang_topic['Link separator'].'</li><li class="postdelete"><a href="delete.php?id='.$cur_post['id'].'">'.$lang_topic['Delete'].'</a>'.$lang_topic['Link separator'].'</li><li class="postedit"><a href="edit.php?id='.$cur_post['id'].'">'.$lang_topic['Edit'].'</a>'.$lang_topic['Link separator'].'</li><li class="postquote"><a href="post.php?tid='.$id.'&amp;qid='.$cur_post['id'].'">'.$lang_topic['Quote'].'</a>';


    // Switch the background color for every message.
    $bg_switch = ($bg_switch) ? $bg_switch = false : $bg_switch = true;
    $vtbg = ($bg_switch) ? ' roweven' : ' rowodd';

if($post_count == 1) $description = $cur_post['message'];

    // Perform the main parsing of the message (BBCode, smilies, censor words etc)
    $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']);

    // Do signature parsing/caching
    if ($cur_post['signature'] != '' && $pun_user['show_sig'] != '0')
    {
        if (isset($signature_cache[$cur_post['poster_id']]))
            $signature = $signature_cache[$cur_post['poster_id']];
        else
        {
            $signature = parse_signature($cur_post['signature']);
            $signature_cache[$cur_post['poster_id']] = $signature;
        }
    }

?>
<div id="p<?php echo $cur_post['id'] ?>" class="blockpost<?php echo $vtbg ?><?php if (($post_count + $start_from) == 1) echo ' firstpost'; ?>">
    <h2><span><span class="conr">#<?php echo ($start_from + $post_count) ?>&nbsp;</span><a href="viewtopic.php?pid=<?php echo $cur_post['id'].'#p'.$cur_post['id'] ?>"><?php echo format_time($cur_post['posted']) ?></a></span></h2>
    <div class="box">
        <div class="inbox">
            <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 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('&nbsp;&nbsp;', $user_contacts).'</dd>'."\n"; ?>
                </dl>
            </div>
            <div class="postright">
                <h3><?php if (($post_count + $start_from) > 1) echo ' Re: '; ?><?php echo pun_htmlspecialchars($cur_topic['subject']) ?></h3>
                <div class="postmsg">
                    <?php echo $cur_post['message']."\n" ?>
<?php if ($cur_post['edited'] != '') echo "\t\t\t\t\t".'<p class="postedit"><em>'.$lang_topic['Last edit'].' '.pun_htmlspecialchars($cur_post['edited_by']).' ('.format_time($cur_post['edited']).')</em></p>'."\n"; ?>
                </div>
<?php if ($signature != '') echo "\t\t\t\t".'<div class="postsignature"><hr />'.$signature.'</div>'."\n"; ?>
            </div>
            <div class="clearer"></div>
            <div class="postfootleft"><?php if ($cur_post['poster_id'] > 1) echo '<p>'.$is_online.'</p>'; ?></div>
            <div class="postfootright"><?php echo (count($post_actions)) ? '<ul>'.implode($lang_topic['Link separator'].'</li>', $post_actions).'</li></ul></div>'."\n" : '<div>&nbsp;</div></div>'."\n" ?>
        </div>
    </div>
</div>

<?php

if ($post_count == '1' && $adsense_config['google_adsense_enabled'] == '1' && strpos($adsense_config['google_exclude_forums'], ','.$cur_topic['forum_id'].',') === FALSE && strpos($adsense_config['google_exclude_groups'], ','.$pun_user['g_id'].',') === FALSE)
    {
?>
<div class="blockpost<?php echo $vtbg ?>">
    <h2><span><?php echo format_time($cur_post['posted']) ?></span></h2>
    <div class="box">
        <div class="inbox">
            <div class="postleft">
                <dl>
                    <dt><strong><?php echo $adsense_config['google_bot_name'] ?></strong></dt>
                    <dd class="usertitle"><?php echo $adsense_config['google_bot_tag'] ?></dd>
                </dl>
            </div>
            <div class="postright">
                <div class="postmsg">
                    <?php echo "<br /><div style=\"TEXT-ALIGN: center\">
    <script type=\"text/javascript\">
    <!--
        google_ad_client = \"".$adsense_config['google_ad_client']."\";
        google_ad_width = ".$adsense_config['google_ad_width'].";
        google_ad_height = ".$adsense_config['google_ad_height'].";
        google_ad_format = \"".$adsense_config['google_ad_format']."\";
        google_ad_channel = \"".$adsense_config['google_ad_channel']."\";
        google_ad_type = \"".$adsense_config['google_ad_type']."\";
        google_color_border = \"".$adsense_config['google_color_border']."\";
        google_color_bg = \"".$adsense_config['google_color_bg']."\";
        google_color_link = \"".$adsense_config['google_color_link']."\";
        google_color_url = \"".$adsense_config['google_color_url']."\";
        google_color_text = \"".$adsense_config['google_color_text']."\";
        google_alternate_color = \"".$adsense_config['google_alternate_color']."\";
    //-->
    </script>
    <script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"></script>
</div><br />\n" ?>
                </div>
            </div>
            <div class="clearer"></div>
        </div>
    </div>
</div>
<?php
    }
}

?>
<div class="postlinksb">
    <div class="inbox">
        <p class="postlink conr"><?php echo $post_link ?></p>
        <p class="pagelink conl"><?php echo $paging_links ?></p>
        <?php

if($cur_topic['parent_forum'])
    echo "\t\t".'<ul><li><a href="index.php">'.$lang_common['Index'].'</a>&nbsp;</li><li>&raquo;&nbsp;<a href="viewforum.php?id='.$cur_topic['parent_forum_id'].'">'.pun_htmlspecialchars($cur_topic['parent_forum']).'</a>&nbsp;</li><li>&raquo;&nbsp;<a href="viewforum.php?id='.$cur_topic['forum_id'].'">'.pun_htmlspecialchars($cur_topic['forum_name']).'</a>&nbsp;</li><li>&raquo;&nbsp;'.pun_htmlspecialchars($cur_topic['subject']).'</li></ul>';
else
    echo "\t\t".'<ul><li><a href="index.php">'.$lang_common['Index'].'</a></li><li>&nbsp;&raquo;&nbsp;<a href="viewforum.php?id='.$cur_topic['forum_id'].'">'.pun_htmlspecialchars($cur_topic['forum_name']).'</a></li><li>&nbsp;&raquo;&nbsp;'.pun_htmlspecialchars($cur_topic['subject']).'</li></ul>';

?>
        <?php echo $subscraction ?>
    </div>
</div>

<?php

// Display quick post if enabled
if ($quickpost)
{

?>
<div class="blockform">
    <h2><span><?php echo $lang_topic['Quick post'] ?></span></h2>
    <div class="box">
        <form id="post" method="post" name="qpost" action="post.php?tid=<?php echo $id ?>" onsubmit="this.submit.disabled=true;if(process_form(this)){return true;}else{this.submit.disabled=false;return false;}">
            <div class="inform">
                <fieldset>
                    <legend><?php echo $lang_common['Write message legend'] ?></legend>
                    <div class="infldset txtarea">
                        <input type="hidden" name="form_sent" value="1" />
                        <input type="hidden" name="form_user" value="<?php echo (!$pun_user['is_guest']) ? pun_htmlspecialchars($pun_user['username']) : 'Guest'; ?>" />
<?php require PUN_ROOT.'mod_modern_bbcode.php'; ?>
                        <label><textarea name="req_message" rows="7" cols="75" tabindex="1"></textarea></label>
                        <ul class="bblinks">
                            <li><a href="help.php#bbcode" onclick="window.open(this.href); return false;"><?php echo $lang_common['BBCode'] ?></a>: <?php echo ($pun_config['p_message_bbcode'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
                            <li><a href="help.php#img" onclick="window.open(this.href); return false;"><?php echo $lang_common['img tag'] ?></a>: <?php echo ($pun_config['p_message_img_tag'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
                            <li><a href="help.php#smilies" onclick="window.open(this.href); return false;"><?php echo $lang_common['Smilies'] ?></a>: <?php echo ($pun_config['o_smilies'] == '1') ? $lang_common['on'] : $lang_common['off']; ?></li>
                        </ul>
                    </div>
                </fieldset>
            </div>
            <p><input type="submit" name="submit" tabindex="2" value="<?php echo $lang_common['Submit'] ?>" accesskey="s" /></p>
        </form>
    </div>
</div>
<?php

}

// Increment "num_views" for topic
$low_prio = ($db_type == 'mysql') ? 'LOW_PRIORITY ' : '';
$db->query('UPDATE '.$low_prio.$db->prefix.'topics SET num_views=num_views+1 WHERE id='.$id) or error('Unable to update topic', __FILE__, __LINE__, $db->error());

$forum_id = $cur_topic['forum_id'];
$footer_style = 'viewtopic';
require PUN_ROOT.'footer.php';

35

(30 replies, posted in PunBB 1.2 troubleshooting)

Yes it did. tongue

Plus now got to the bottom of why no one could help you. this is the code you have for the menu... it is not produced by PunBB.

<p style="text-align: right; padding-right: 20px; padding-top: 5px;"><a href="index.php">Index</a> &nbsp;&nbsp; // &nbsp;&nbsp; <a href="userlist.php">Brukerliste</a> &nbsp;&nbsp; // &nbsp;&nbsp; <a href="search.php">Søk</a> &nbsp;&nbsp;// &nbsp;&nbsp; <a href="bank.php">Bank</a> &nbsp;&nbsp; // &nbsp;&nbsp; <a href="donate.php">Donér</a> &nbsp;&nbsp; // &nbsp;&nbsp; <a href="lottery.php">Lotteri</a> &nbsp;&nbsp; </p>

So I would advise going to who created your site and finding where the above code is stored.

Plus I would not change back any of my recommended changes because it fixes links on certain pages in your site.

36

(30 replies, posted in PunBB 1.2 troubleshooting)

I have sent you a PM.

In what way did it not work? I have tested this on fresh PunBB and it works fine. wink

Style has nothing to do with what your requesting.

Avatar has not been modified so will always show. wink

Can you post this bit of code from viewtopic.php...
From

if ($pun_config['o_show_user_info'] == '1' && $cur_post['g_id'] != PUN_ADMIN)

down to here

}

        if ($pun_user['g_id'] < PUN_GUEST)

I will then modify it to fit your requirements. Also do you want E-Mail and Website to be shown?

MCommunity wrote:
StevenBullen wrote:

Plus you said you wanted ALL information removed underneath admin profile on viewtopic.php?

yes i want all infomation removed..only show avatar and pm.

Avatar and PM is information. tongue
Give me two ticks.

I'm afraid that will be user error because the code being changed has nothing to do with logging out.
When did you last try and log out?

What is the problem code works fine with me? Have you logged out of admin to test it?

Plus you said you wanted ALL information removed underneath admin profile on viewtopic.php?


"its is working but how to show only username, avatar and pm in admin post.all information hidden including repu point and ip."
You say two things in the same line. I want this but want all information hidden?

41

(30 replies, posted in PunBB 1.2 troubleshooting)

@darc
Not a problem

@Slavok
Off-topic - Why did you not move this to the correct forum?

Request 1
Open viewtopic.php and find

if ($pun_config['o_show_user_info'] == '1')

and change it to

if ($pun_config['o_show_user_info'] == '1' && $cur_post['g_id'] != PUN_ADMIN)

Request 2
Open profile.php and find (About line 909)

$user = $db->fetch_assoc($result);

add the following to the next line

if ($pun_user['g_id'] != PUN_ADMIN && $user['g_id'] == PUN_ADMIN)
    redirect('index.php', 'Sorry no access to admin profile!');

Any problems give me a shout as I have not tested it. wink

Does it not make more sense to make it so admin users are not linked, then they cannot click on them in the first place?

EDIT: yeah it makes more sense your way because the users will be linked everywhere and it would mean more changing of code than the 2 lines in profile.php wink

Yep... Go to forums/style/imports/indiequebec_cs.css

Change this

/* 1.3 Main headers and navigation bar background and text colour */

.pun H2, #brdmenu {COLOR: #FFF; background-image: url(../../img/smilies/ground3.gif);}

to this

/* 1.3 Main headers and navigation bar background and text colour */

/* Main Menu At Top */
#brdmenu {COLOR: #FFF; background-image: url(../../img/smilies/ground3.gif);}

/* Left Menu */
.pun #left H2 {COLOR: #FFF; background-image: url(../../img/smilies/ground3.gif);}

/* Right Menu */
.pun #main H2 {COLOR: #FFF; background-image: url(../../img/smilies/ground3.gif);}

Of course you will need to create new images and change the filenames wink

You still having problems with this? If so PM me the web address and will take a look.

Just to clarify.

1. You want just the username to show for admin users on viewtopic.php?

2. Would it be easier so admin users are not linked?

47

(30 replies, posted in PunBB 1.2 troubleshooting)

In functions.php change

    // Index and Userlist should always be displayed
    $links[] = '<li id="navindex"><a href="index.php">'.$lang_common['Index'].'</a>';
    $links[] = '<li id="navuserlist"><a href="userlist.php">'.$lang_common['User list'].'</a>';

to

    // Index and Userlist should always be displayed
    $links[] = '<li id="navindex"><a href="index.php">'.$lang_common['Index'].'</a>';
    $links[] = '<li id="navforum"><a href="forum.php">'.$lang_common['Forum'].'</a>';
    $links[] = '<li id="navuserlist"><a href="userlist.php">'.$lang_common['User list'].'</a>';

Then go to lang/English/common.php and find

// Stuff for the navigator (top of every page)
'Index'                    =>    'Index',

and replace with

// Stuff for the navigator (top of every page)
'Index'                    =>    'Index',
'Forum'                    =>    'Forum',

That should do as required... but be warned that doing this will make some things not work right. wink

You will need to change all the following files: delete.php, edit.php, moderate.php, post.php, viewforum.php, viewtopic.php,

<a href="index.php"><?php echo $lang_common['Index'] ?>

to this

<a href="forum.php"><?php echo $lang_common['Forum'] ?>

And also change the following file: header.php

if (in_array(basename($_SERVER['PHP_SELF']), array('index.php', 'search.php')))

to this

if (in_array(basename($_SERVER['PHP_SELF']), array('forum.php', 'search.php')))

Any trouble let me know. wink

48

(22 replies, posted in Discussions)

Seriously why do you guys let this forum over-run with sig spam? Please do something about it!

For starters add nofollow to all external links, this will stop the initial people who have a general idea how spam works.
Then if it carries on remove the ability to add a sig or website url when you have less than 10 posts.

Edit:
Spam prepare to die!

49

(19 replies, posted in PunBB 1.3 discussion)

It died a long time ago.

Garciat wrote:

@8k84:

If you really are a developer, looking at the PHP should be enough - it's self-explanatory. I mean, PunBB doesn't use quantum physics to deliver posts to your browser.

This statement shows that you dont have a clue what the PunBB community was before Informer come along and ruined a good thing.

50

(11 replies, posted in PunBB.NET discussion)

Can someone from Informer comment on this? "in other words the code works but the site is created in a very very bad way. "

Either agree or disagree?