<? $stats['last_user']['id'] ?>

should be

<?php echo $stats['last_user']['id'] ?>

The link in the original post?

3,828

(10 replies, posted in PunBB 1.2 troubleshooting)

codelearn: If it's not too much trouble, could you run the following PHP script

<?php
exec('uptime')

and report back what the output was? It should help us figured out why admin_index.php is failing for your host smile

Most likely not, since this becomes too intensive for forums rather quickly (ie: if you have 100 posts per day, you'll be sent 100 emails)

3,830

(10 replies, posted in PunBB 1.2 troubleshooting)

Having never used the mod, I can't say for certain: post in the release topic at Punres?

3,831

(6 replies, posted in PunBB 1.2 troubleshooting)

guardian34 wrote:

That file needs to be in the include/user folder.

The file or a symlink to it

t.subject, t.question t.last_post,

You're missing a comma wink

TFD wrote:

I was thinking it changed in the fall by itself. Am I wrong?

PunBB does not do anything related to DST wink

3,834

(13 replies, posted in PunBB 1.2 troubleshooting)

It obviously failed the first time: you'll need to either undo all of the changes from install_mod.php and run it again or make all the changes that have not yet been made

Closed: we're not taking bug reports for 1.3 quite yet wink
The query_builder is missing for a reason: it's just being tested right now
I just corrected the install.php issue though, thanks smile

3,836

(13 replies, posted in PunBB 1.2 troubleshooting)

grudon66 wrote:

An error was encountered
File: /var/www/hotserv.dk/users/pokemonfireforum1/include/pms/header_new_messages.php
Line: 6

PunBB reported: Unable to check for new messages

Database reported: Table '19872.foo_messages' doesn't exist (Errno: 1146)  Help! What is the problem? Should i remove that stays in line 6?

You posted this in the wrong topic: you need to run install_mod.php for the mod

TFD wrote:

US has two time changes per year where we move the clocks forward or back. In this case the correct time is moved forward 1 hour. So when I use the CST time zone it was showing 10AM as the time on my posts when it is really 11AM.

Yes, I'm aware: I live in the US tongue
Even if I didn't, a lot of countries have similar systems.

elbekko wrote:

I thought Daylight Saving was already implemented. Or maybe that's in 1.3.

In 1.3 there is a box for users to check. If the box is checked, time is moved an hour ahead. If not, it's just the normal timezone offset.

Now then, it seems like an explanation of 1.2's date/time system and 1.3's date/time system is in order smile

1.2:
You have a setting called server timezone. Basically, you find your server's GMT offset and set it: that way, all times for users should start out at GMT.
Each user has an individual time setting. That would be the user's offset from GMT. During DST, the user has to change their offset by one hour (since that is what DST is).
So, if my server's local time is GMT -8, you set GMT -8 as the server timezone. If I live on the East Coast (GMT -5) I set GMT -5. During DST, I move that to GMT -4 (GMT doesn't have DST).

1.3:
PHP functions are used to get time from the server at GMT. Therefore, server timezone disappears and is replaced by a new option, which is the default timezone for guests.
Each user still has their time setting, but they can check a box when DST happens for them which will act as if they had modified their offset.
So, if my server's local time is GMT -8 but I want guests to have GMT -5, I set the default timezone to GMT -5. As a user, I check/uncheck a box to deal with DST

Does that clear things up? Or did I just confuse people more? wink

Edit: Just to summarize, since there really isn't a good way (at least that I know of) to automatically detect DST given a certain timezone (since different countries, etc have different rules), PunBB relies on the user to change it themselves.

3,838

(13 replies, posted in PunBB 1.2 troubleshooting)

Enable debug mode and paste the full error

What time change?

// Load the template
if (defined('PUN_ADMIN_CONSOLE'))
    $tpl_main = file_get_contents(PUN_ROOT.'include/template/admin.tpl');
else if (defined('PUN_HELP'))
else if (defined('PUN_PORTAL'))
    $tpl_main = file_get_contents(PUN_ROOT.'include/template/PunPortal.tpl');
    $tpl_main = file_get_contents(PUN_ROOT.'include/template/help.tpl');
else
    $tpl_main = file_get_contents(PUN_ROOT.'include/template/main.tpl');

should be

// Load the template
if (defined('PUN_ADMIN_CONSOLE'))
    $tpl_main = file_get_contents(PUN_ROOT.'include/template/admin.tpl');
else if (defined('PUN_PORTAL'))
    $tpl_main = file_get_contents(PUN_ROOT.'include/template/PunPortal.tpl');
else if (defined('PUN_HELP'))
    $tpl_main = file_get_contents(PUN_ROOT.'include/template/help.tpl');
else
    $tpl_main = file_get_contents(PUN_ROOT.'include/template/main.tpl');

3,841

(10 replies, posted in PunBB 1.2 troubleshooting)

Wow, that worked?
OK, I'll just make sure we figure out why this is for 1.3 tongue

3,842

(4 replies, posted in Programming)

I'm not exactly sure what you want to do wink
PHP is a server-side language, Javascript is a client-side language. You couldn't really include PHP code in your Javascript when it's passed to the user because they would have no way to interpret it. Do you want to dynamically generate bits of Javascript?

3,843

(3 replies, posted in PunBB 1.2 troubleshooting)

         else if ($pun_config['p_message_all_caps'] == '0' && strtoupper($message) == $message && $pun_user['g_id'] > PUN_MOD)
             $message = ucwords(strtolower($message));

That's taken from post.php: the code looks OK to me

lie2815 wrote:

...
I know that would force me to modify config.php (pretty heavy!). But did anybody already write something like that? I want to make it so that, depending on from where from my website you come to the forum, you use a different database or at least another prefix (that would hold the changes down)?

Yes, it is possible: as Mark pointed out, that's the basis behind all the multi forum hosting sites

Just comparing your stylesheets, I noticed you didn't have a <![endif]--> at the end in the PunBB style
Oh, and moved to Integration

Yes, you can redistribute your own version provided you retain the original copyright

3,847

(10 replies, posted in PunBB 1.2 troubleshooting)

That's odd: I'm curious though, since that makes me think the underlying problem isn't with the queries.
Try undoing all of those changes and doing the following:

FIND

// Get the server load averages (if possible)
if (@file_exists('/proc/loadavg') && is_readable('/proc/loadavg'))
{
    // We use @ just in case
    $fh = @fopen('/proc/loadavg', 'r');
    $load_averages = @fread($fh, 64);
    @fclose($fh);

    $load_averages = @explode(' ', $load_averages);
    $server_load = isset($load_averages[2]) ? $load_averages[0].' '.$load_averages[1].' '.$load_averages[2] : 'Not available';
}
else if (!in_array(PHP_OS, array('WINNT', 'WIN32')) && preg_match('/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/i', @exec('uptime'), $load_averages))
    $server_load = $load_averages[1].' '.$load_averages[2].' '.$load_averages[3];
else
    $server_load = 'Not available';

REPLACE WITH

$server_load = 'Not available';

3,848

(14 replies, posted in PunBB 1.2 troubleshooting)

Adding .lnk doesn't magically make stuff happen.
If you create a symlink called my_header.php which links to /home/user/whatever/path/my_header.php, you only have one copy of the files but you can use the header in PunBB as my_header.php (because the symlink file called my_header.php exists and calling that file simply calls the real file)

3,849

(20 replies, posted in PunBB 1.2 troubleshooting)

Please take the time to read the blog post I linked to and understand that changing the LANGUAGE PACKS does not change the CONTENTS OF POSTS in your forum.

3,850

(14 replies, posted in PunBB 1.2 troubleshooting)

alicia_3107 wrote:
Smartys wrote:

I'm a little confused: pun_include has existed for all of 1.2 and the include/user directory rule has been in place since 1.2.6 (which was released in July 2005).
Plus, it's documented in the FAQ:
http://punbb.org/docs/faq.html#faq3_4

Il the version 1.1.x it worked differently. We could include any other path (It was better for me). Right now I'm DUPLICATING several many commun files. It is not practical. I suggest to let user include any php file from any path ...

That functionality was removed due to security concerns.
However, you can just use symbolic links to have the files in the right location without duplicating them