Why not just change the other calls to echos? Are there that many?
3,426 2007-04-18 20:51
Re: Masthead shows up above DOCTYPE declaration (7 replies, posted in PunBB 1.2 troubleshooting)
3,427 2007-04-18 20:50
Re: Users online with pictures, newest 5 users with pictures (28 replies, posted in PunBB 1.2 modifications, plugins and integrations)
I'll do it without joining the users table
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 2007-04-18 20:38
Re: Can't restore from backup (6 replies, posted in PunBB 1.2 troubleshooting)
How did you create this backup?
3,429 2007-04-18 16:42
Re: Banning TLD's, like .ru? (30 replies, posted in PunBB 1.2 discussion)
That's because you have the parameter order for strstr mixed up
But here's a better way:
replace
strstr('.ru',$email)
with
substr($email, -3) === '.ru'
3,430 2007-04-18 16:36
Re: Can I make the "online now" list show Avatars instead of names? (2 replies, posted in PunBB 1.2 modifications, plugins and integrations)
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 2007-04-18 10:33
Re: Permissions (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 2007-04-18 10:32
Re: move mesages (1 replies, posted in PunBB 1.2 troubleshooting)
As an admin/moderator, look at the bottom left hand corner of your screen
3,433 2007-04-18 10:31
Re: Masthead shows up above DOCTYPE declaration (7 replies, posted in PunBB 1.2 troubleshooting)
Yeah, you can't have it both ways without a change in the way you call it elsewhere
<body id="wordpress">
<?php echo display_nav(); ?>
<div id="page">
3,434 2007-04-17 16:12
Re: JavaScript-problem (Nifty Corners) (10 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Moved to Modifications
3,435 2007-04-17 10:29
Re: how to do that [Latest Topics] (9 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Moved to Troubleshooting
3,436 2007-04-17 02:10
Re: Masthead shows up above DOCTYPE declaration (7 replies, posted in PunBB 1.2 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
3,437 2007-04-16 21:38
Re: How do I make a forum category read only by all "Members" (7 replies, posted in PunBB 1.2 troubleshooting)
Ah: yes, closing all topics in a forum would have that effect
3,438 2007-04-16 21:21
Re: QUERIES (39 replies, posted in PunBB 1.2 troubleshooting)
We would need to see the code
3,439 2007-04-16 21:13
Re: when a forum has some "moved" topics, the oldest topics are not shown (5 replies, posted in PunBB 1.2 bug reports)
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());
3,440 2007-04-16 16:33
Re: Cryptic Registration/Notification Emails (7 replies, posted in PunBB 1.2 troubleshooting)
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)
3,441 2007-04-16 16:32
Re: Can't log in with IE, firefox is fine... (4 replies, posted in PunBB 1.2 troubleshooting)
3,442 2007-04-16 10:23
Re: Where to begin!? (8 replies, posted in PunBB 1.2 modifications, plugins and integrations)
I'm confused, it looks like you haven't put any of your header/footer in main.tpl
3,443 2007-04-16 10:21
Re: Masthead shows up above DOCTYPE declaration (7 replies, posted in PunBB 1.2 troubleshooting)
Is display_nav echoing the results instead of storing them as a string?
3,444 2007-04-16 10:20
Re: HELP! Old Posts Dropping Into Abyss / Expiring Then Coming Back !?! (2 replies, posted in PunBB 1.2 troubleshooting)
http://punbb.org/forums/viewtopic.php?id=13185
I did think we had fixed that, but I guess we haven't
3,445 2007-04-16 02:03
Re: QUERIES (39 replies, posted in PunBB 1.2 troubleshooting)
But yeah, try upgrading the mod first and see if that addresses some of the issues
3,446 2007-04-16 01:38
Re: Wordpress plugin to post to PunBB (42 replies, posted in PunBB 1.2 modifications, plugins and integrations)
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
3,447 2007-04-15 20:18
Re: Contact Form (6 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Sure: send me an email or find me in #punbb on Quakenet
3,448 2007-04-15 20:17
Re: time storage and formatting (11 replies, posted in PunBB 1.2 discussion)
OK, so I managed to confuse myself
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
Sorry for the confusion
Edit: And as I said, in 1.3 PunBB will use gmdate, which means we won't have to correct for the server timezone
3,449 2007-04-15 19:40
Re: Where to begin!? (8 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Sure
3,450 2007-04-15 19:38
Re: time storage and formatting (11 replies, posted in PunBB 1.2 discussion)
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