Why not just change the other calls to echos? Are there that many? wink

I'll do it without joining the users table wink

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());

    while ($pun_user_online = $db->fetch_assoc($result))
    {
        if ($pun_user_online['user_id'] > 1)
            $users[] = "\n\t\t\t\t".'<dd><a href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
        else
            ++$num_guests;
    }

REPLACE WITH

    $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());

    while ($pun_user_online = $db->fetch_assoc($result))
    {
        if ($pun_user_online['user_id'] > 1)
        {
            if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$pun_user_online['user_id'].'.gif'))
                $users[] = "\n\t\t\t\t".'<dd><a title="'.pun_htmlspecialchars($pun_user_online['ident']).'" href="profile.php?id='.$pun_user_online['user_id'].'"><img src="'.$pun_config['o_avatars_dir'].'/'.$pun_user_online['user_id'].'.gif" '.$img_size[3].' alt="" /></a>';
            else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$pun_user_online['user_id'].'.jpg'))
                $users[] = "\n\t\t\t\t".'<dd><a title="'.pun_htmlspecialchars($pun_user_online['ident']).'" href="profile.php?id='.$pun_user_online['user_id'].'"><img src="'.$pun_config['o_avatars_dir'].'/'.$pun_user_online['user_id'].'.jpg" '.$img_size[3].' alt="" /></a>';
            else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$pun_user_online['user_id'].'.png'))
                $users[] = "\n\t\t\t\t".'<dd><a title="'.pun_htmlspecialchars($pun_user_online['ident']).'" href="profile.php?id='.$pun_user_online['user_id'].'"><img src="'.$pun_config['o_avatars_dir'].'/'.$pun_user_online['user_id'].'.png" '.$img_size[3].' alt="" /></a>';
            else
                $users[] = "\n\t\t\t\t".'<dd><a href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
        }
        else
            ++$num_guests;
    }

3,428

(6 replies, posted in PunBB 1.2 troubleshooting)

How did you create this backup?

3,429

(30 replies, posted in PunBB 1.2 discussion)

That's because you have the parameter order for strstr mixed up wink
But here's a better way:
replace

strstr('.ru',$email)

with

substr($email, -3) === '.ru'

You would need to join the users table into the query, I think someone has tried this already (try searching for it)
Moved to Modifications

3,431

(1 replies, posted in PunBB 1.2 discussion)

Moderators can be given the ability to ban, edit user profiles, etc
PunBB 1.2 does not allow there to be multiple moderator groups: 1.3 will (although you'll need an extension to control permissions to the point of controlling editing/deleting)

3,432

(1 replies, posted in PunBB 1.2 troubleshooting)

As an admin/moderator, look at the bottom left hand corner of your screen

Yeah, you can't have it both ways without a change in the way you call it elsewhere tongue

<body id="wordpress">
<?php echo display_nav(); ?>
<div id="page">

Moved to Modifications

Moved to Troubleshooting

Yeah, that's the issue: the function isn't returning a string, it's just outputting HTML (not storing it anywhere)
replace your function with this:

    function display_nav() {
        return '<div id="masthead">
        <div id="logo"><img src="/site/public/images/logo.gif" /></div>
        <ul id="nav">
             <li id="t-contact"><a href="/site/contact">Contact</a></li>
            <li id="t-forum"><a href="/site/forum">Forum</a></li>
            <li id="t-blog"><a href="/site/blog">Blog</a></li>
            <li id="t-home"><a href="/site/">Home</a></li>
        </ul>
        </div>';
    } // end of display_head function

Ah: yes, closing all topics in a forum would have that effect wink

3,438

(39 replies, posted in PunBB 1.2 troubleshooting)

We would need to see the code

1. Looking at the SVN history, it doesn't appear that a fix was applied.
2. It should resolve the issue
3. I can't promise that this will be the fix, but this is the easiest way:
FIND

$result = $db->query('SELECT COUNT(id), SUM(num_replies) FROM '.$db->prefix.'topics WHERE moved_to IS NULL AND forum_id='.$forum_id) or error('Unable to fetch forum topic count', __FILE__, __LINE__, $db->error());

REPLACE WITH

$result = $db->query('SELECT COUNT(id), SUM(num_replies) FROM '.$db->prefix.'topics WHERE forum_id='.$forum_id) or error('Unable to fetch forum topic count', __FILE__, __LINE__, $db->error());

It's base64 encoded, I couldn't tell you why

User 'Tobias Lampe' registered in the forums at http://www.semverteilung.vwl.uni-muenchen.de/forum

User profile: http://www.semverteilung.vwl.uni-muench … e.php?id=4

--
Forum Mailer
(Do not reply to this message)

http://punbb.org/docs/faq.html#faq2_5

I'm confused, it looks like you haven't put any of your header/footer in main.tpl hmm

Is display_nav echoing the results instead of storing them as a string?

http://punbb.org/forums/viewtopic.php?id=13185
I did think we had fixed that, but I guess we haven't hmm

3,445

(39 replies, posted in PunBB 1.2 troubleshooting)

But yeah, try upgrading the mod first and see if that addresses some of the issues wink

theCurtis wrote:

I've integrated the code but the message gets truncated in the forum post for some reason. Is that a limitation set somewhere? If so, I can't seem to find it.

If your posts are really long (long enough to overflow a TEXT field, which is 65535 charcaters), you might have to change the column to a MEDIUMTEXT

Sure: send me an email or find me in #punbb on Quakenet smile

3,448

(11 replies, posted in PunBB 1.2 discussion)

OK, so I managed to confuse myself big_smile
time() and UNIX_TIMESTAMP() both return GMT/UTC values. date() and FROM_UNIXTIME() take unix timestamps and return a date/time based on the current location of the server. The reason PunBB needs to adjust is to correct for the corrections that date() will make.

Picture it like this:
The timestamp in the database is 1176666741, my timezone is set to -4, the server's timezone is +5 (we'll assume PunBB has that set as well)
We add ((user timezone - server timezone) * 3600), or ((-4 - 5) * 3600), or -32400 seconds.
We call the date function, which adds (server timezone * 3600), or (5 * 3600), or 18000 seconds.
That leaves us with a change of -14400 seconds, or (-4 * 3600).

I hate timezones with a passion tongue
Sorry for the confusion smile

Edit: And as I said, in 1.3 PunBB will use gmdate, which means we won't have to correct for the server timezone tongue

Sure smile

3,450

(11 replies, posted in PunBB 1.2 discussion)

lucasreddinger wrote:

but mysql's UNIX_TIMESTAMP() doesn't depend on the server locale?

Right, it takes the timezone information it knows and corrects for it so the timestamp is GMT/UTC. Of course, using something like from_unixtime() on it will return a value that isn't GMT/UTC