Download this file and upload it into your punbb directory on your server

http://www.ic-gallery.com/stuff/tz.js

Then modify your main.tpl to include the file - add this in between <head> and </head>

<script type="text/javascript" src="tz.js"></script>

Then save this code as timezone.php and upload that into your punbb directory on your server

<?php

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

$timezone = $_GET['timezone'];

if (!is_numeric($timezone)) die('Invalid timezone');
if ($pun_user['id'] < 2) die('Not logged in');

$db->query("UPDATE {$db->prefix}users SET timezone = '$timezone' WHERE id = '{$pun_user['id']}' LIMIT 1");

echo $db->affected_rows();

That will check the timezone of visitors once per session and update the timezone in their profile where required. You can of course comment out or remove the alert() if you wish.

Test the latest versions of the bridging system files from cvs:

http://cvs.sourceforge.net/viewcvs.py/* … 12.inc.php
http://cvs.sourceforge.net/viewcvs.py/* … se.inc.php

Just overwrite your existing files with these.

28

(10 replies, posted in Programming)

Authorizqtion is usually spelled without the q.

I'll install myself a punbb and make sure it's all working smoothly for 1.4.3

The issues with usermgr.php, the user galleries and the first letters bug are fixed for 1.4.3, due out fairly soon. There are fixes posted on the coppermine board, but they are general bridge issues, so a search for punbb specifically would not have found them.

CPG 1.4.1 beta released today

http://coppermine.sourceforge.net/board … ic=19374.0

Look in login.php

redirect('index.php', $lang_login['Logout redirect']);

and change index.php to be somewhere else.

The delete query should be of the form

DELETE FROM table WHERE field = value

34

(3 replies, posted in PunBB 1.2 bug reports)

Looks like the script needs short tags enabled. Either enable short tags in your php.ini and restart the server process or change occurencies of <? to <?php in the migrator.

liquidblaze wrote:

PunBB reported: Unable to fetch newest registered user
Database reported: Got error 124 from table handler (Errno: 1030)

MySQL error code 124: Wrong index given to function

Maybe dropping and recreating the indexes on the user table could help.

You'd need GD support to make the image, it doesn't require PHP5.

The command is

php send.php "%s"

The %s is the track title, and you can get that parameter from inside the php script using $argv[1]

Edit: ewww, coldplay sad

XMMS has a plugin called "Song Change" that runs a command you specify when the song changes. I set it to the command

php send.php "%s"

the script base64 encodes the title to keep the special chars, and calls a file on the server with ?song=whatever that decodes and writes it to a text file. The file song.php makes the graphic when called.

$im = imagecreatetruecolor(600, 30);
$bg = imagecolorallocate($im, 255, 255, 255);
imagecolortransparent($im, $gb);
$textcolor = imagecolorallocate($im, 0, 0, 255);
$song = file_get_contents('song.txt');
$song = $song ? $song : '[Offline]';
imagestring($im, 5, 0, 0, "Now playing: $song", $textcolor);
header("Content-type: image/png");
imagepng($im);

You need to be running php locally to use this method of course , but I'm sure there are other ways,

39

(8 replies, posted in General discussion)

It's great fun, I just made a script to hide punbb posts by a specified user. It's set by default to automatically ignore everything I say smile A real timesaver.

install me

Anyone who objects to Greasemonkey being used on their site needs to take time to consider the nature of the Internet.

There is no approximate date, but it should be fairly soon.

Fairly easy to accomplish with xmms, don't know about media player.

http://www.ic-gallery.com/stuff/song.php

Wait for the 1.4 release and integrate, then cpg and punbb will share the same user database. That's exactly what the integration does.

I don't what you mean, the user details are the only thing that gets 'integrated'.

It won't be available as a package until it is released.

Coppermine 1.4 will be released soon, that supports punbb 1.2.5. It's in anon CVS over at sf.net if you want to grab it for testing.

46

(27 replies, posted in Feature requests)

Won't that give lastmod times in the future for servers running in the eastern hemisphere since you use the local time, but claim it to be GMT ?

Also it should be H:i:s, not G:i:s. smile

47

(2 replies, posted in PunBB 1.2 troubleshooting)

Administration -> Options -> E-mail.

48

(13 replies, posted in PunBB 1.2 discussion)

You can't 'protect' cookies, they are completely out of your control. The only way someone can impersonate another user by editing the cookie is if they discovered the user's password hash. You can't just change the id stored in the cookie and become someone else, not in punbb at any rate.

49

(4 replies, posted in PunBB 1.2 modifications, plugins and integrations)

Perfect smile

50

(4 replies, posted in PunBB 1.2 modifications, plugins and integrations)

Very nice, just 2 issues for me smile

I had to change the diff command from -ru5 to -rU5 and it isn't telling me any filenames, maybe I am using a different version of diff to you.

diff (GNU diffutils) 2.8.1
ruby 1.8.2 (2004-12-25) [i386-linux]