1

(67 replies, posted in News)

AHHHHHHHHHH!! Upgrade Pun or evacuate Houston!!!!

OK, so the upgrade took 10 minutes and won't affect our evacuation one bit. Nice work Rickard.

ps...yes, I really am in Houston and yes, we really are about to leave. Have a read for regular updates on how we're doing. smile

2

(33 replies, posted in News)

With all the mods on my board I decided to go the manual update route and changed the files using the hdiff. Took me maybe 15 mins to edit the files, upload and run the update script. That compares with a 1.2.5 --> 1.2.6 update time in the HOURS when I upgraded and then re-modded the board.

Thanks for the update, and MANY thanks for the hdiff! smile

OK, fixed it myself. The problem is in the instructions there's a couple of typos. A line of code (at Step 18) is currently:

<?php if (eregi('msie', $_SERVER['HTTP_USER_AGENT'])) echo '    windows.onlaod = function() {'."\n"; ?>

and another at Step 20 is:

<?php if (eregi('msie', $_SERVER['HTTP_USER_AGENT'])) echo '    windows.onload = function() {'."\n"; ?>

They should both be:

<?php if (eregi('msie', $_SERVER['HTTP_USER_AGENT'])) echo '    window.onload = function() {'."\n"; ?>

Fixed it for me anyway. smile

I get a javascript error in IE (it works great in Firefox btw:

Line: 97
Char: 2
Error: 'windows' is undefined
Code: 0
URL: http://myurl.com/profile.php?section=personal&id=5

Any suggestions? "Don't use IE" isn't good enough because my members are (generally speaking) a non-technical bunch using whatever they feel comfortable with.

I'll set up a dev forum to test this soon. I've removed the user stat mod from my live forum for now and won't reactivate it until the problem is solved.

By the way, the error I'm getting is the red error box from this post, which is why the mod is uninstalled. People have been assuming the whole forum is down when they visit (they haven't clicked refresh).

No it doesn't. Sorry, I missed the closing bracket in my code post above. Corrected code as follows:

            // Update the online list
// MOD USERSTATS CHANGE
            if (!$pun_user['logged'])  {
                $db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
                $db->query('INSERT INTO'.$db->prefix.'statuser (user_id, user_ip) VALUES('.$pun_user['id'].','.$db->escape(get_remote_address()).')') or error('Unable to insert into user statistics', __FILE__, __LINE__, $db->error());
                }
// END MOD USERSTATS CHANGE
            else
            {
                // Special case: We've timed out, but no other user has browsed the forums since we timed out
                if ($pun_user['logged'] < ($now-$pun_config['o_timeout_visit']))
                {
                    // MOD: MARK TOPICS AS READ - 1 LINE MODIFIED CODE FOLLOWS
                    $db->query('UPDATE '.$db->prefix.'users SET last_visit='.$pun_user['logged'].', read_topics=NULL WHERE id='.$pun_user['id']) or error('Unable to update user visit data', __FILE__, __LINE__, $db->error());
                    $pun_user['last_visit'] = $pun_user['logged'];
                }
// MOD USERSTATS CHANGE
            if ($pun_user['idle'] == 1)  {
                $db->query('INSERT INTO '.$db->prefix.'statuser (user_id, user_ip) VALUES('.$pun_user['id'].',"'.$db->escape(get_remote_address()).'")') or error('Could not insert into statistics', __FILE__, __LINE__, $db->error());
                }
// END MOD USERSTATS CHANGE
                $idle_sql = ($pun_user['idle'] == '1') ? ', idle=0' : '';
                $db->query('UPDATE '.$db->prefix.'online SET logged='.$now.$idle_sql.' WHERE user_id='.$pun_user['id']) or error('Unable to update online list', __FILE__, __LINE__, $db->error());
            }

ok, I'm getting the same error Ataxy was, and have slightly different code:

// Update the online list
// MOD USERSTATS CHANGE
            if (!$pun_user['logged'])  {
                $db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
                $db->query('INSERT INTO'.$db->prefix.'statuser (user_id, user_ip) VALUES('.$pun_user['id'].','.$db->escape(get_remote_address()).')') or error('Unable to insert into user statistics', __FILE__, __LINE__, $db->error());
                }
// END MOD USERSTATS CHANGE
                else
            {
                // Special case: We've timed out, but no other user has browsed the forums since we timed out
                if ($pun_user['logged'] < ($now-$pun_config['o_timeout_visit']))
                {
// MOD: MARK TOPICS AS READ - 1 LINE MODIFIED CODE FOLLOWS
                    $db->query('UPDATE '.$db->prefix.'users SET last_visit='.$pun_user['logged'].', read_topics=NULL WHERE id='.$pun_user['id']) or error('Unable to update user visit data', __FILE__, __LINE__, $db->error());
                    $pun_user['last_visit'] = $pun_user['logged'];
                }
// MOD USERSTATS CHANGE
            if ($pun_user['idle'] == 1)  {
                $db->query('INSERT INTO '.$db->prefix.'statuser (user_id, user_ip) VALUES('.$pun_user['id'].',"'.$db->escape(get_remote_address()).'")') or error('Could not insert into statistics', __FILE__, __LINE__, $db->error());
                }
// END MOD USERSTATS CHANGE

As you can see, in amongst the Userstat mods I have a mod for Mark Topics as Read. Now, my PHP-fu is weak, so can anyone tell at a glance what may be the problem here?

Mucho thanks!

8

(51 replies, posted in Feature requests)

shii wrote:

There's an anonymous forum in Japan that gets 2 million posts per day, and all identification is done by post number.

So I have to ask: Why not find out what software they're using and use that? As it stands, PunBB out of the box is obviously not for you.

9

(21 replies, posted in General discussion)

<del> is perfectly valid XHTML and serves the same function (ie, it allows strike-through text to be displayed). Its default CSS behaviour is text-decoration:strike-through, though that can obviously be changed via CSS. Hope that helps.

ps...My Javascript-Fu is weak...:(

One quick request: 26Kb is a bit heavy, so off I went to http://dean.edwards.name/packer/ to pack it up. Sure enough, it packed to 6Kb. Unfortunately it didn't work, because Packer needs everything terminated properly. Would it be possible for you to go through the code and terminate as per the requirements for the packer, so we can have a much lighter-weight (and very cool) addon? smile

12

(4 replies, posted in PunBB 1.2 bug reports)

Sure. Done.

13

(4 replies, posted in PunBB 1.2 bug reports)

Nope. No User Title is in place for the Members group

14

(4 replies, posted in PunBB 1.2 bug reports)

When we ran 1.1.5 we had a user ranking system already in place. Pretty standard stuff:

Lurker - 0 posts
Newcomer - 2 posts
Member - 10 Posts
etc

Now we've upgraded to 1.2 and the rankings are no longer working properly. Everyone who isn't either an admin or a moderator is displayed as a Lurker, no matter how many posts they have. Any idea what's going on?

15

(11 replies, posted in PunBB 1.2 discussion)

Connorhd wrote:

i definatly don't like this

I realise this isn't something that appeals to - or is required by - everyone. In fact, in plenty of cases it might very well be detrimental to the forum. However, for our forum it could be detrimental not to have a feature/mod like this.

The information that will be posted on our forum is invaluable to everyone, and that info should be there for as long as the site is available, benefiting everyone - old and new visitors. I could justify my request all day, but you probably see my point, even if for your own forum(s) it's an unnecessary addition.

16

(11 replies, posted in PunBB 1.2 discussion)

Connorhd wrote:

if you do add it i would aks that you can edit your post instantly if another post has not yet been made, most of my edits are because i typed something wrong

If my understanding is correct (and it may very well not be), nothing would change for someone who wanted to edit their post because of a typo, as long as that edit was made within 15 minutes (for example), regardless of whether or not replies have been posted. Once 15 minutes are up, the post becomes uneditable to any ordinary user, and only a moderator/admin can edit it.

That's what I'd like to see, not stopping "typo edit", but stopping "history changing".

Paul's example of posting code and then editing is is valid - so I suppose the question becomes, could the time-limited option be just that - an option within the control panel, as below:

Users can edit their own posts? Yes/No
Time limit for editing (Zero for unlimited)

17

(11 replies, posted in PunBB 1.2 discussion)

Rickard wrote:

you would have to edit the script edit.php and at the top, check if the post was made more then X minutes ago and in that case, just display a no permission message (or something)

OK, you're talking to a PHP idiot. Before I go off and lose myself in a million PHP websites and FAQs, could I just ask, "How?" smile Sorry to be annoying...

18

(11 replies, posted in PunBB 1.2 discussion)

Rickard, thanks. I assume the edit subject is slated for the 1.2 release, so if you were to extend it to posts, it would also be in that release? In the meantime (assuming 1.2 won't be out tomorrow...it won't right?) is there an easy way to hack this functionality somehow?

Not that I'm impatient, I just want my users to know exactly what they can and cannot do right off the bat, so to speak.

Many thanks

I'm not really sure whether this is a feature request, or a mod request, so I'll post it in the PunBB discussions forum instead. :)

What I'm wondering is if it would be possible to implement a time-limit on users being able to edit their own posts? I'm thinking something like 15 minutes, and then the post can only be edited by a moderator/admin.

The reason for the request is simply a desire to see history not being changed on a forum. When a discussion occurs and one member throws his/her toys out of the pram, I've seen it happen that that user will purposefully delete his/her own posts (before leaving, swearing they'll "never return") in every thread they've ever contributed to, therefore making the thread far more difficult to decipher for every subsequent visitor.

(I should point out this has never happened on my forum - I just want to prevent it from occurring at all!)

My wife and I are starting out with an expat/repat forum that will contain useful and important information - information that we'd like to be available for all subsequent visitors, for the life of the site. I'm all for users editing their posts, but I think putting a time limit on it is a reasonable way of maintaining a thread's coherency.

I'm no PHP wizard, so any baby-steps anyone could provide would be great (I'm an XHTML/CSS guy).

Thanks for a great forum product! I stumbled across it when out looking for something less bloated than The Usual Suspects (vB, phpBB, and IPB) and won't be looking back anytime soon!