Maybe a few commonly used extensions could be "officially supported" now that the dev team has such an abundance of members?

Oh, great. smile

In the PunBB source there are code lines that wrap maybe 5 times on my display and that makes it very difficult to apply line-based patches to the source code since there will almost always be a conflict if I have made the slightest modification, even if the previous changes actually are compatible with the patch I'm trying to apply. It is also very difficult to spot exactly what the differences are when I run diff -u on the vanilla tree against my tree, to see what changes I have introduced. Furthermore it is quite difficult read lines of that length, for example SQL queries that are logically split up into several lines are always much easier to read, and it follows that it also is much easier to edit lines that are split up, since you more easily comprehend what's going on.

I'm sure that you have strong feelings for your current coding style, but combined with the fact that the patches and modifications to PunBB are line-based it makes the current situation very unsatisfying. Is there any chance that the coding style may be reconsidered for 1.3? If not, I think you should to consider some better way of distributing patches for PunBB, that does not as easily introduce conflicts when applied.

I had the same problem. Registration mails ended up in the spam folder in hotmail. Changing the administrator e-mail address and thus the From: field of the mails being sent out to contain an email adress with the same host/domain as the forum was running on instead of a gmail adress solved the problem for some reason.

Hi

Thanks for this mod! I have modified the mod for my forum so that all the images are displayed inline at max resolution 800x600 using GD directly to scale the images (I removed php thumb stuff). Also I allow posting of images in the quickpost. All images are saved as JPEG with GD at 75% quality so they take up 80-100 kb at most. Then they are saved under a unique filename determined by the CRC32 of the data.

Have a look at the result here

http://enhjulingsfolket.se/viewtopic.php?id=611

I can provide the changes to the mod if anyone is interested.

There seems to be a problem when I try to post several large images at the same time, the input form is just discarded and I am redirected to an empty thread again resulting in an empty post.php with empty forms so I have to start all over with the post again..

OK, thanks.

Why hasn't a fix been included in the current punbb?

If the transactions don't prevent this sort of race condition I can see where other problems easily could emerge, although not as often.

I have noticed that some users can get logged in twice. This causes messages from that particular user to be displayed twice.

I think the problem may be that you we do a query to get online status, check the online status and then update the database. This would cause a race condition if it isn't done atomically. Hm.. is this the case or would the begin/commit enclosing prevent that?

I am using postgresql and latest punbb.

EDIT: Hm.. after some more checking it seems like the transactions really should prevent race conditions, but I can't see how a users could get inserted twice into the online table otherwise..

8

(45 replies, posted in News)

I was thinking of a global variable of some kind.

9

(45 replies, posted in News)

celso wrote:

Since I only downloaded the patch, I didn't get that particular file. I have to download the full package and extract that file.

As it is now the version information is always out of date with my punbb installation since I just use the patch and usually don't bother with 12_to_12?_update.php although is kind of annoying at times when I forget what version I'm running and what the next patch to install would be.

Having the version tag in the source code since it is the source code the version reflects, or having version tag both in the source code and in the database so you could check that they match makes sense, but only having it in the database does not make much sense to me.

10

(71 replies, posted in News)

Rickard wrote:

That's odd. Must be a cache problem or something.

Line 860 in functions.php should look like this:

<meta http-equiv="refresh" content="<?php echo $pun_config['o_redirect_delay'] ?>;URL=<?php echo str_replace(array('<', '>', '"'), array('<', '>', '"'), $destination_url) ?>" />

I'm afraid you forgot to update the hdiff and the patch to reflect these changes.

If you view the profile for another user it displays the language for the current user.

Possible fix: at line 1150 change

                                if ($pun_user['language'] == $temp)

to

                                if ($user['language'] == $temp)

and insert u.language into

$result = $db->query('SELECT u.username, u.email, u.title, u.realname, u.url, u.jabber, u.icq, u.msn, u.aim, u.yahoo, u.location, u.use_avatar, u.signature, u.disp_topics, u.disp_posts, u.email_setting, u.save_pass, u.notify_with_post, u.show_smilies, u.show_img, u.show_img_sig, u.show_avatars, u.show_sig, u.timezone, u.style, u.num_posts, u.last_post, u.registered, u.registration_ip, u.admin_note, g.g_id, g.g_user_title FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());

12

(36 replies, posted in General discussion)

I like CGI:IRC but you need permission to execute CGI-scripts on your server. CGI:IRC is written in Perl and the interface is very clean.

PHP:IRC also seems like a good idea but I don't think it's as stable and nice as CGI:IRC (yet).

OK, another issue is that the userlist is sorted case sensitive in postgres whereas it is sorted case insensitive with mysql. But that's just kind of annoying.

It can be solved by using a new key in the query that you order by, for example

UPPER(u.username) AS usernamekey

Is there a better way?

If you use postgres a user may currently have registered a user kalle but a new user may still register the user Kalle since postgres is case sensitive. This will cause login problems.

I changed the code to use ILIKE instead of = below the comment "Check that the username (or a too similar username) is not already" at line 128 in register.php.

Are there any other problems that may surface since postgres is case sensitive? Maybe we could solve those at the same time?

Ulf

Thanks for the mod!

May I ask for a unified diff (diff -urN) against 1.2.5?

That note to the right of the zip-file with the modified files, does it say that those files are the result of applying this mod on against a clean 1.2.5? If so, I suppose I could generate the diff myself..

I've been playing around with the CSS a bit to make it look slightly more PunBB-friendly. Hm.. maybe I'll post that tomorrow if it turns out well.

Regarding UTF-8, I think the only clean option is to convert your PunBB-database to UTF-8. In case you use some language files, these will have to be converted to UTF-8 as well. Then lang_encoding and lang_multibyte will have to be set appropriately in the language files of PunBB.

I'm not sure what side effects I may experience when I turn PunBB into using UTF-8 though..

I have disabled user info in the posts on my forum since they make the forum view somewhat less bloated. However when a guest posts I'd like to see the e-mail address that the guest has filled in, but it doesn't seem to be possible. So I propose a change:

$username = pun_htmlspecialchars($cur_post['username']);

to

                if ($pun_config['o_show_user_info'] != '1' && $cur_post['poster_email'] != '' && !$pun_user['is_guest'])
                        $username = '<a href="mailto:'.$cur_post['poster_email'].'">'.pun_htmlspecialchars($cur_post['username']).'</a>';
                else
                        $username = pun_htmlspecialchars($cur_post['username']);

in viewtopic.php at line 258.

In admin_groups.php

$result = $db->query('SELECT 1 FROM '.$db->prefix.'groups WHERE g_title=\''.$db->escape($title).'\' && g_id!='.$_POST['group_id']) or error('Unable to check group title collision', __FILE__, __LINE__, $db->error());

I suggest replacing && with AND since && does not seem to work in postgres

Thanks.

I'd prefer if it was case insensitive since it has confused our users. I'm sure a lot of people who use PunBB on a mysql database and have a funny casing in their username would be unable to login if you changed it to be case sensitive. I changed the username matching to use ILIKE instead of the equal sign. Maybe that's a postgres specific operator though.

It makes people confused since they expect to be able to login as "rickard" even though they have registered as "Rickard".

If you think it should be case sensitive then maybe I should rename this bug report to "Mysql is not case sensitive" since I can login here as "uLPH".

Anyway. The point is that PunBB acts differently on postgres than on mysql.

Yes, WHERE in postgres is case sensitive. This complicates the login procedure and this is why people could not login to my forum!

$result = $db->query('SELECT id, group_id, password, save_pass FROM '.$db->prefix.'users WHERE username=\''.$db->escape($form_username).'\'')

Fails.

Try using ILIKE.

23

(2 replies, posted in PunBB 1.2 show off)

Our page:

http://enhjulingsfolket.se/

I have designed a custom front page and the forum index has been eliminated, with some PHP hacks.

The page currently looks awful in IE, suggestions would be appreciated. Maybe I could try using IE7 from http://dean.edwards.name/IE7/ and see if that works better.. Has anyone used this with PunBB? In particular i use full aplha PNG, max-width and width. Maybe there is something else that IE misses, the logo also had the wrong size in IE when I checked. Try making the page smaller, and the columns will end up on top of each other. hmm

Logging in did not work in IE6 when I tried it either, any ideas why? Maybe I could enable P3P. I'm not using any funny domain redirection or anything, enhjulingsfolket.se is an A record pointing at the server.

It feels like waste of time to support a broken browser... mad

24

(1 replies, posted in PunBB 1.2 bug reports)

PunBB does not check that the pun_include statement is inside brackets. If you leave out the brackets, the loop will continue indefinitely. In footer.php, line 143, I suggest you change the code from

while (preg_match('<pun_include "(.*?)">', $tpl_main, $cur_include))
{ 
        ob_start();
        include PUN_ROOT.$cur_include[1];
        $tpl_temp = ob_get_contents();
        $tpl_main = str_replace('<'.$cur_include[0].'>', $tpl_temp, $tpl_main);
    ob_end_clean();
}

to

while (preg_match('/<pun_include "(.*?)">/', $tpl_main, $cur_include))
{ 
        ob_start();
        include PUN_ROOT.$cur_include[1];
        $tpl_temp = ob_get_contents();
        $tpl_main = str_replace($cur_include[0], $tpl_temp, $tpl_main);
    ob_end_clean();
}

I hope I didn't get it wrong now again wink

Sorry. I wasn't paying attention to what the code was trying to do. That query goes through. Thanks.