t2 wrote:

What's the CSS method of doing this?  I don't want to change any code.  I tried modifying the Oxygen_cs.css with the following but it didn't work:

div.isticky {
  background-image: url('http://www.clreviewboard.org/images/sticky.gif');
  background-repeat: no-repeat;
  background-position: center;
}
div.isticky span {display:none;}

That should be:


TR.isticky DIV.icon {
/* CSS Code here */
}

novasie wrote:

Hmm i have a very weird problem it says like this:

Warning: ftp_put(): hus1.se/gallery/2_1130520092.jpg: Permission denied in /hsphere/local/home/huset/hus1.se/gallery_post.php on line 287

Warning: ftp_put(): hus1.se/gallery/2_thumbs_1130520092.jpg: Permission denied in /hsphere/local/home/huset/hus1.se/gallery_post.php on line 288

but i dont get it cuz i have done chmod on the directories and the weirdest thing is that after a while 2_thumbs_1130520092.jpg pops up in the directory but cannot be shown by the gallery... very weird I must say tongue anyone who got a clue?

Seeing as you're using the FTP method of uploading images, you need to make sure that the username/password are correctly set in the admin cp / plugin settings.

Pos3idon wrote:

am I want to know how and where to enable [url]in my signatures ?

That's not really related to this topic, but you'll find it in your admin panel, under permissions.

254

(5 replies, posted in PunBB 1.2 show off)

You do not have permission to view these forums.

No, I would be fine with that (PHP v4.3.11)

256

(121 replies, posted in PunBB 1.2 discussion)

Must...have...v1.3!

Can't wait to play around with it, 'cause that extension system sure looks sweet smile

Thanks for the comment guys smile Anything on the site not working correctly (design-wise)?

258

(2 replies, posted in PunBB 1.2 show off)

Nice to see my Latenight theme in use on a new site smile

hcgtv wrote:

Nice job, a site totally running off of PunBB, who'd of thought?

Isn't there a download mod floating around?

Hehe, well, I prefer to do it that way, seeing as there will be less systems to maintain.. wink

About the download mod; Yes, I think Mediator made one, but seeing as it's very much a beta, I don't think I'll be implementing it quite yet... Anyone have any experience with it, and know how stable it is?

So, as a few of you might have noticed, I've had a few PunBB test forums up and running this year... Well, not anymore, for now my main site is finally converted from phpBB! smile
I didn't plan to make the move quite yet, but as I ran into a problem with my previous host (and loosing quite a bit of content), I moved over to a new host, and because of this, I thought I'd just convert the forum right away.
There are quite a few modifications made to the board, many of which you probably wouldn't notice right away, but they're there just the same smile

So, now I'd like to ask you, what's your judgement of the site?

Here's the URL: http://www.tasarinan.com/

261

(20 replies, posted in General discussion)

Rickard wrote:

I use FlashFXP. It's not free, but its worth every penny.

I'm with Rickard on this one. FlashFXP is by far the best FTP client you'll find. I use a combination of that, and WinSCP3.

262

(25 replies, posted in PunBB 1.2 show off)

Breaking the back button = Bad...very bad!

Looks good though.

263

(12 replies, posted in General discussion)

C's Daddy wrote:

I found this one to be very useful.

http://www.pspad.com/en/

C's Daddy

I would have to agree with that... PSPad it a fantastic editor!

pogenwurst wrote:

Ok Netfirms got back to me:

Netfirms wrote:

Thank-you for your e-mail inquiry.

PHP's gethostbyname() function will return the internal IP for your webserver (192.0.34.166).  When the actual IP for your webserver is 66.244.251.18.  Unfortunately, we will be unable to make any modifications to the server configuration at this time. We apologize for any inconvenience this may have caused.

Does anyone know how to work around this? Is there an alternative function the mod can use?

Ok, I might have a working solution for you smile In step 6 in the readme.txt, replace:

    if ($lookup != gethostbyname($lookup)):

with

    if (@fsockopen($lookup, 80) !== FALSE):

It should work, but it is slightly slower. Still, I think it's the best way to work around your problem. Let me know if it solved the problem? smile

pogenwurst wrote:

Ok Netfirms got back to me:

Netfirms wrote:

Thank-you for your e-mail inquiry.

PHP's gethostbyname() function will return the internal IP for your webserver (192.0.34.166).  When the actual IP for your webserver is 66.244.251.18.  Unfortunately, we will be unable to make any modifications to the server configuration at this time. We apologize for any inconvenience this may have caused.

Does anyone know how to work around this? Is there an alternative function the mod can use?

No, unfortunately, I don't think there is. The thing is, it needs to "ping" the remote server in some way... I'll see if I can find and alternative way, but I can't promise anything.

266

(1 replies, posted in PunBB 1.2 troubleshooting)

the check_cookie function in ./include/functions.php

267

(4 replies, posted in PunBB 1.2 troubleshooting)

FredrikK wrote:

Like this?

try replacing that code with this:

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

  Copyright (C) 2002-2005  Rickard Andersson (rickard@punbb.org)

  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']);


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

// Load the viewforum.php language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/forum.php';
require PUN_ROOT.'lang/'.$pun_user['language'].'/polls.php';

// Fetch some info about the forum
$result = $db->query('SELECT f.forum_name, f.redirect_url, f.moderators, f.num_topics, f.sort_by, fp.post_topics FROM '.$db->prefix.'forums AS f LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$id) or error('Unable to fetch forum info', __FILE__, __LINE__, $db->error());
if (!$db->num_rows($result))
    message($lang_common['Bad request']);

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

// Is this a redirect forum? In that case, redirect!
if ($cur_forum['redirect_url'] != '')
{
    header('Location: '.$cur_forum['redirect_url']);
    exit;
}

// Sort out who the moderators are and if we are currently a moderator (or an admin)
$mods_array = array();
if ($cur_forum['moderators'] != '')
    $mods_array = unserialize($cur_forum['moderators']);

$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 new topics?
if (($cur_forum['post_topics'] == '' && $pun_user['g_post_topics'] == '1') || $cur_forum['post_topics'] == '1' || $is_admmod)
    $post_link = "\t\t".'<p class="postlink conr"><a href="post.php?fid='.$id.'">'.$lang_forum['Post topic'].'</a> <BR /> <a href="poll.php?fid='.$id.'">'.$lang_polls['New poll'].'</a></p>'."\n";
else
    $post_link = '';


// Determine the topic offset (based on $_GET['p'])
$num_pages = ceil($cur_forum['num_topics'] / $pun_user['disp_topics']);

$p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p'];
$start_from = $pun_user['disp_topics'] * ($p - 1);

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


$page_title = pun_htmlspecialchars($pun_config['o_board_title'].' / '.$cur_forum['forum_name']);
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>
<?php echo $post_link ?>
        <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a> </li><li>» <?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></li></ul>
        <div class="clearer"></div>
    </div>
</div>

<div id="vf" class="blocktable">
    <h2><span><?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></span></h2>
    <div class="box">
        <div class="inbox">
            <table cellspacing="0">
            <thead>
                <tr>
                    <th class="tcl" scope="col"><?php echo $lang_common['Topic'] ?></th>
                    <th class="tc2" scope="col"><?php echo $lang_common['Replies'] ?></th>
                    <th class="tc3" scope="col"><?php echo $lang_forum['Views'] ?></th>
                    <th class="tcr" scope="col"><?php echo $lang_common['Last post'] ?></th>
                </tr>
            </thead>
            <tbody>
<?php

// Fetch list of topics to display on this page
if ($pun_user['is_guest'] || $pun_config['o_show_dot'] == '0')
{
    // Without "the dot"
    $sql = 'SELECT id, poster, subject, posted, last_post, last_post_id, last_poster, num_views, num_replies, closed, sticky, moved_to, question FROM '.$db->prefix.'topics WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
}
else
{
    // With "the dot"
    switch ($db_type)
    {
        case 'mysql':
        case 'mysqli':
            $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, t.question FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.forum_id='.$id.' GROUP BY t.id ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
            break;

        case 'sqlite':
            $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, t.question FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.id IN(SELECT id FROM '.$db->prefix.'topics WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'].') GROUP BY t.id ORDER BY t.sticky DESC, t.last_post DESC';
            break;

        default:
            $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, t.question FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.forum_id='.$id.' GROUP BY t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, t.question, p.poster_id ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
            break;

    }
}

$result = $db->query($sql) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

// If there are topics in this forum.
if ($db->num_rows($result))
{
    while ($cur_topic = $db->fetch_assoc($result))
    {
        $icon_text = $lang_common['Normal icon'];
        $item_status = '';
        $icon_type = 'icon';
        
            if ($cur_topic['moved_to'] == null)
                $last_post = '<a href="viewtopic.php?pid='.$cur_topic['last_post_id'].'#p'.$cur_topic['last_post_id'].'">'.format_time($cur_topic['last_post']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['last_poster']).'</span>';
            else
                $last_post = ' ';

        if ($cur_topic['question'] != '') {
            if ($pun_config['o_censoring'] == '1')
                $cur_topic['question'] = censor_words($cur_topic['question']);
        
        
            if ($cur_topic['moved_to'] != 0)
                $subject = $lang_forum['Moved'].': '.$lang_polls['Poll'].': <a href="viewpoll.php?id='.$cur_topic['moved_to'].'">'.pun_htmlspecialchars($cur_topic['question']).'</a><br /> <span class="byuser"><b>'.pun_htmlspecialchars($cur_topic['subject']).'</b> '.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
            else if ($cur_topic['closed'] == '0')
                $subject = $lang_polls['Poll'].': <a href="viewpoll.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['question']).'</a><br \> <span class="byuser"><b>'.pun_htmlspecialchars($cur_topic['subject']).'</b> '.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
            else
            {
                $subject = $lang_polls['Poll'].': <a href="viewpoll.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['question']).'</a><br /> <span class="byuser"><b>'.pun_htmlspecialchars($cur_topic['subject']).'</b> '.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
                $icon_text = $lang_common['Closed icon'];
                $item_status = 'iclosed';
            }
    
            if (!$pun_user['is_guest'] && $cur_topic['last_post'] > $pun_user['last_visit'] && $cur_topic['moved_to'] == null)
            {
                $icon_text .= ' '.$lang_common['New icon'];
                $item_status .= ' inew';
                $icon_type = 'icon inew';

    
                $subject = '<strong>'.$subject.'</strong>';
                $subject_new_posts = '<span class="newtext">[ <a href="viewpoll.php?id='.$cur_topic['id'].'&action=new" title="'.$lang_common['New posts info'].'">'.$lang_common['New posts'].'</a> ]</span>';
            }
            else
                $subject_new_posts = null;
    
            // Should we display the dot or not? :)
            if (!$pun_user['is_guest'] && $pun_config['o_show_dot'] == '1')
            {
                if ($cur_topic['has_posted'] == $pun_user['id'])
                    $subject = '<strong>·</strong> '.$subject;
                else
                    $subject = '  '.$subject;
            }
        } else {
            if ($cur_topic['moved_to'] != 0)
                $subject = $lang_forum['Moved'].': <a href="viewtopic.php?id='.$cur_topic['moved_to'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
            else if ($cur_topic['closed'] == '0')
                $subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
            else
            {
                $subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
                $icon_text = $lang_common['Closed icon'];
                $item_status = 'iclosed';

            }
    
            if (!$pun_user['is_guest'] && $cur_topic['last_post'] > $pun_user['last_visit'] && $cur_topic['moved_to'] == null)
            {
                $icon_text .= ' '.$lang_common['New icon'];
                $item_status .= ' inew';
                $icon_type = 'icon inew';

    
                $subject = '<strong>'.$subject.'</strong>';
                $subject_new_posts = '<span class="newtext">[ <a href="viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.$lang_common['New posts info'].'">'.$lang_common['New posts'].'</a> ]</span>';
            }
            else
                $subject_new_posts = null;
    
            // Should we display the dot or not? :)
            if (!$pun_user['is_guest'] && $pun_config['o_show_dot'] == '1')
            {
                if ($cur_topic['has_posted'] == $pun_user['id'])
                    $subject = '<strong>·</strong> '.$subject;
                else
                    $subject = '  '.$subject;
            }
        }

        if ($cur_topic['sticky'] == '1')
        {
            $subject = '<span class="stickytext">'.$lang_forum['Sticky'].': </span>'.$subject;
            $item_status .= ' isticky';
            $icon_text .= ' '.$lang_forum['Sticky'];
        }

        $num_pages_topic = ceil(($cur_topic['num_replies'] + 1) / $pun_user['disp_posts']);

        if ($num_pages_topic > 1)
        {
            if ($cur_topic['question'] != '') 
                $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewpoll.php?id='.$cur_topic['id']).' ]';
            else
                $subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewtopic.php?id='.$cur_topic['id']).' ]';
        }
        else
            $subject_multipage = null;

        // Should we show the "New posts" and/or the multipage links?
        if (!empty($subject_new_posts) || !empty($subject_multipage))
        {
            $subject .= '  '.(!empty($subject_new_posts) ? $subject_new_posts : '');
            $subject .= !empty($subject_multipage) ? ' '.$subject_multipage : '';
        }

?>
                <tr<?php if ($item_status != '') echo ' class="'.trim($item_status).'"'; ?>>
                    <td class="tcl">
                        <div class="intd">
                            <div class="<?php echo $icon_type ?>"><div class="nosize"><?php echo trim($icon_text) ?></div></div>
                            <div class="tclcon">
                                <?php echo $subject."\n" ?>
                            </div>
                        </div>
                    </td>
                    <td class="tc2"><?php echo ($cur_topic['moved_to'] == null) ? $cur_topic['num_replies'] : ' ' ?></td>
                    <td class="tc3"><?php echo ($cur_topic['moved_to'] == null) ? $cur_topic['num_views'] : ' ' ?></td>
                    <td class="tcr"><?php echo $last_post ?></td>
                </tr>
<?php

    }
}
else
{

?>
                <tr>
                    <td class="tcl" colspan="4"><?php echo $lang_forum['Empty forum'] ?></td>
                </tr>
<?php

}

?>
            </tbody>
            </table>
        </div>
    </div>
</div>

<div class="linksb">
    <div class="inbox">
        <p class="pagelink conl"><?php echo $paging_links ?></p>
<?php echo $post_link ?>
        <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a> </li><li>» <?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></li></ul>
        <div class="clearer"></div>
    </div>
</div>
<?php

$forum_id = $id;
$footer_style = 'viewforum';
require PUN_ROOT.'footer.php';

Your code was missing:

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

268

(4 replies, posted in PunBB 1.2 troubleshooting)

Could you try posting the source of your viewforum.php here?

269

(6 replies, posted in PunBB 1.2 troubleshooting)

Most likely a script timeout error. Do you have shell access to the server? If you do, you could try restoring the DB from the command line.

Ok, I've just released v1.1. Let me know if there's any additional features you'd like to see smile

pogenwurst wrote:

I sent you my phpinfo. It's been a few hours now - still blocked.

Sorry, but I really have no idea what to do in terms of this pinging stuff.

I can access your test site fine.

If it helps at all, here are the other mods to my functions.php:
Change Page Links 1.0.1 by Michael Lanman
Private Messaging System (PMS) 1.2.1 by David Djurbäck and Connorhd
Invitations 1.0.1 by Tobi Schulz - all of this is commented out
You Can See Profile! 2.0 by Krzysztof Pawelek

It shouldn't really conflict with any mod, seeing as it doesn't re-define any variables or modify any existing functions.

As I'm not to familiar with FreeBSD, perhaps someone else here could help out with this (which seems to be the cause of the problem):
http://se.php.net/manual/en/function.ge … .php#30852

Re-download the archive & install over again, or apply the fix described here: http://punbb.org/forums/viewtopic.php?pid=52463#p52463

pogenwurst wrote:

My IP should be on its way.

My host (Netfirms) uses Apache/1.3.26 (Unix) mod_perl/1.26 according to phpinfo();

I don't desire protection for every page. Just a handful. common_admin.php was simply the first of those I tested.

I was going to wait for the next version, but I got impatient. It sounds nice.

Thanks for your help.

Just sent you a reply... Didn't notice anything wrong using your IP. If you have SSH access to your host, could you try pinging your ip from the server?

If your IP was 127.0.0.1, you should ping:

1.0.0.127.sbl-xbl.spamhaus.org
(reverse IP.sbl-xbl.spamhaus.org)

If you don't get a reply, your IP isn't listed in their DB. I'm using gethostbyname to check against their servers, and that function should be supported in PHP 3, 4 & 5.

EDIT: Could you try visiting my 'test' site @ http://205.234.98.146/ ? I'm using the old version of the script there, so if the script itself is the cause of your problems, you should be blocked there as well.

pogenwurst wrote:
CodeXP wrote:

Well, what did you write in your common.php file? You should only have added spam_protect();, and *not* spam_protect('127.0.0.2');. That was only intended for testing...

Other than that, as long as your IP isn't listed at Spamhaus, you should not be blocked, no matter what.

Just spam_protect();

However, I added it to the bottom of common_admin.php, not common.php. Any possible problem there?

Hmm.. Don't see how it could, but I would recommend you to use it in common.php just to be safe. If possible, could you try e-mailing me your IP, so that I'd be able to test it? Also, what web server are you using? I've only tested this on Apache, so I'm not sure how it would behave on other servers..

You might also be interested to know that in the next version I'm working on, I've just added the option to enable/disable checking for admins/moderators, and also, an option to stop checking users after they've reached X numbers of posts. All through a new admin plugin smile

EDIT: Here's a screen of each of the new plugins.

http://img69.imageshack.us/img69/259/spamscripts7ce.th.png
http://img69.imageshack.us/img69/9616/spamsettings5jj.th.png

Well, what did you write in your common.php file? You should only have added spam_protect();, and *not* spam_protect('127.0.0.2');. That was only intended for testing...

Other than that, as long as your IP isn't listed at Spamhaus, you should not be blocked, no matter what.