(2 replies, posted in PunBB 1.3 troubleshooting)

For the functions add_topic, add_post, add_user... When call from post.php and register.php the post_info or user_info arrays are defined inside the function call. Perhaps it would be better to define the arrays outside of the function call, and place a hook after doing so, so extension writers can modify or add to the arrays before they are sent to the function...just a thought


(5 replies, posted in PunBB 1.3 troubleshooting)

Sorry I did mean viewforum, and I now that you bring it up, I understand...For some reason I was thinking that header.php is executed before other code, obviously I'm an idiot...Thanks


(5 replies, posted in PunBB 1.3 troubleshooting)

Really I'm just wondering if I'm the only one experiencing this issue


(5 replies, posted in PunBB 1.3 troubleshooting)

Just a quick post, I'm not sure if I'm the only one or whats going on but if I put this line

$result = $db->query('SELECT t.subject,t.id,p.message FROM '.$db->prefix.'topics as t LEFT JOIN '.$db->prefix.'posts as p ON (p.topic_id=t.id) WHERE t.forum_id=1 ORDER By t.posted DESC LIMIT 1') or error(__FILE__, __LINE__);

in header.php on line 235 right under ($hook = get_hook('hd_alert')) ? eval($hook) : null;

viewtopic.php...well lets just say it stops functioning correctly.

I'm not really sure what the issue is but hopefully I'm not the only one

This is a clean forum install...


(151 replies, posted in PunBB 1.3 extensions)

vt_post_header_load - Line 249 viewtopic.php after "require PUN_ROOT.'header.php';" - ESSENTIAL - Poll mod, all the content for the poll to be displayed needs to be put immediatly after the header, as is convention on every modification ever written.

hd_announcement - Line 255 header.php after "// END SUBST - <!-- pun_alert -->" - RECOMMENDED - There is a hook for just about every other template type, why not annoucements?

vf_row_loop - Line 215 viewforum.php before "++$pun_page['item_count'];" - QUESTIONABLE - In viewforum the post row loop has no hook inside the loop. I realize loops are not exactly the best play for hooks, but its requires a lot of parsing later on if are not able to change post attributes 'on the fly'

Edit: Sorry Smartys


(0 replies, posted in Feature requests)

I've noticed that there isn't really a lot of repetitive code in punbb, however there is one thing that sticks out, as being in (almost) every file, but not being a function.

$is_admmod = ($pun_user['g_id'] == PUN_ADMIN || ($pun_user['g_moderator'] == '1' && array_key_exists($pun_user['username'], $mods_array))) ? true : false;

This would work much better for modifications (and hooks) if this was put into a function.


is_admmod($user,$mods_array) {
 return ($$user['g_id'] == PUN_ADMIN || ($$user['g_moderator'] == '1' && array_key_exists($$user['username'], $mods_array))) ? true : false;


is_admmod($user,$mods_array) {
 $is_admmod = ($$user['g_id'] == PUN_ADMIN || ($$user['g_moderator'] == '1' && array_key_exists($$user['username'], $mods_array))) ? true : false;
($hook = get_hook('fn_adnmod')) ? eval($hook) : null;

return $is_admmod;


//Some generic file (post.php, moderator.php, etc)
$mods_array = ($cur_posting['moderators'] != '') ? unserialize($cur_posting['moderators']) : array();
$is_admmod = is_admmod($pun_user,$mods_array);


or Extra Boxes has similar functionality. http://www.punres.org/desc.php?pid=57 should be the link

Erm, if you have any bugs please email them to me. As far as I know the mod should work correctly with current version of punbb, It may require minor changes but not many. As for refering to code that doesn't exist thats _highly_ unlikely. All my mods are coded on clean versions of punbb then packaged, so there is no way I would reference code that doesn't exist, unless I am adding compatability with another of my mods.


(15 replies, posted in PunBB 1.2 discussion)

Funny how this stuff happens... Anyways PHP officially announced PHP4 EOL today, so maybe punbb should just take the leap and discontinue support for PHP4 (remove the ported functions and version checks for said function)...

It appears to be working for me :\


(12 replies, posted in Programming)

I would assume that your include file is not getting included. In the footer try adding an isset for $clock_array and verifying that the data is actually there.

The problem with this is type of human check, is that it only lasts until someone finds the list of questions. The simple questions that would be asked is going to be a finite number, so at some point they are going to start repeating, it would be very easy to gather the list of questions and answers and then automate the input :\


(4 replies, posted in PunBB 1.2 troubleshooting)

A better solution ;P


    $server_load = 'Not available';

replace with

    $server_load = 'Not available';
    // Certain webhosts have modified shells which are some how corrupting the $db error buffer (I think), this should clear dat out. This is a hack
    if (!in_array(PHP_OS, array('WINNT', 'WIN32')))
        $db->query('SELECT 1');


    $server_load = 'Not available';
    // Certain webhosts have modified shells which are some how corrupting the $db error buffer (I think), this should clear dat out. This is a hack
    $db->query('SELECT 1');

depending on how many clock cycles vs queries you want to waste wink


(29 replies, posted in Programming)

Rickard wrote:

That's funny. I was going to mention Azureus as an app that is such a resource hog, it is virtually unusable. The fact that its UI suffers from a bad case of "programmers art" doesn't help. I mean, come on, look at this.

Hmm... I dunno then, Azureus runs as fast as any other torrent application on my xp pro machine, which is 4 years old. I'm not exactly sure why it is so bad for you, oh well. I still prefer java.


(29 replies, posted in Programming)

Rickard wrote:
Mediator wrote:

Unfortunatly java did it first, and better. Java's libraries actually make sense and don't look like they have been organized by a group of retarded monkies. :\, Anything .NET can do java can reproduce faster, and more efficiently. You still cannot find a truely cross-platform JIT for .NET, whether you think mono works or not.

I agree to some degree, but the fact remains, I have yet to encounter a Java application that doesn't feel sluggish or consumes lots and lots of memory. The fact that the UI never really matches the operating system on which it is running doesn't help. Java works fine for server applications, but it's not quite there when it comes to desktop apps.

Well swing and swt both use the local operating sytems system calls to render its widgets. As for slow UI's a lot falls into the hands of the developer (as it is for any language). Take Azureus for example its UI runs at the same pace as any other windows application, because it was developed right

zaher wrote:

There is a old reason for not Choosing Java
- Java not support RTL languages (my Arabic) Delphi do it.
.NET is from Microsoft and it is the best supporting multi languages special for Arabs

- My customer like .NET system (Ask them why), because it is the new thing from Microsoft nothing else, so i have plan to make scripts or code for 2 languages (.NET and MONO) and provide it to my customer as .NET application.

Java supports locals better than .NET does. Swing can easily load arabic language packs.


(29 replies, posted in Programming)

MadHatter wrote:

because they brought in anders hejlsberg (the creator of Delphi) to create it for them.  .NET is actually something they did right IMO.  using mono you can develop for nix and windows.  If I'm not mistaken, gnome is using mono for their development (I could be wrong about this one though).

.net lets you create language extensions for it so that you can write .net apps in python, C#, vb, C++, perl, fortran, and a ton of other languages.  the cool thing about this is, that it allows you to use the php framework, and .net framework however you wish.

being able to write a file saying:

using ( StreamWriter sw = new StreamWriter("foo.txt") ) {

as opposed to:

$fh = fopen("text", "a");
fwrite($fh, "blah");

is just one of the ways that they've taken what we've all been doing since the 60's and made it easier to write, override, and manipulate.

Unfortunatly java did it first, and better. Java's libraries actually make sense and don't look like they have been organized by a group of retarded monkies. :\, Anything .NET can do java can reproduce faster, and more efficiently. You still cannot find a truely cross-platform JIT for .NET, whether you think mono works or not.

Jansson wrote:
Paul wrote:

I would say that extensions certainly would be.

The only real problem with the licence is the phrase "work based on the program". The definition is so vague that that it would need to be interpreted by the Courts. What is clear though is that anything that could be described as software, which an extension would be, is within the definition.

I don't think the question here is what the software is based on. Because he isn't doing a PunBB fork or anything. But modifications require a GPL licensed software to run, therefor he have to release them as GPL as well. This also goes for future extensions. They can be compared to what is referred to as "plugins" in the GPL.

I am not entirly sure that is true, Take for example UnrealIRCd which is released under the GPL. Coders create "modules" which are essentially the same thing as plugins/extensions and sell them all the time :\

Technically unless I copy or distribute portions of punbb with the mods, I don't believe I have to release them under GPL since, really I'm just giving instructions to modify punbb, and my own code...

I am strongly considering setting up some sort of of system that will let people pay a one time fixed fee $5-$10 usd that would give them the ability to obtain and download certain mods that I create in the future, that would not be avaliable anywhere else.

This would include a shop mod, and EasyPoll 2.0 (Demo Here:, as well as many other future mods

The idea being that you pay a small fee one time and end up getting several mods which would be exclusive to people who have paid the fee. This also means, however, that the mods released to the people who have paid the fee, would never be openly released the public.

I am just curious about everyones thoughts on the issue

Also I am currently taking suggestions for the next version of easy poll which can be currently tried here If you would like to create a poll or vote you will need to quickly register an account


(12 replies, posted in Programming)

Erm...You don't have to release any mods under GPL...as long as you do not use any portion of the punbb source code. Because of the way punbb modding works all you are doing is either releasing your own code, or releasing instructions as to modify gpled code...

Think about it like this...every time someone tells you how to modify some code for punbb on this forum...their post is not gpled...so why would your readme file etc be?


(3 replies, posted in PunBB 1.2 discussion)

Giving users the ability to delete their own accounts is generally a bad idea.

For example if a user's account is compromised, the person who has stolen the account could delete the account which is quite ireversible other than restoring from backups...

Although I suppose if you had a copy of the account created whenever a user deleted it, it wouldn't be that bad...I don't remember but Posts and Topics created by the user might be deleted too when a user is removed.


(6 replies, posted in Programming)

Well all browsers handle html based on tags... <!-- --> is a tag... /* */ or // are not....

I hope to be able to do the following:

Poll [Unless Connorhd wants it]
Header Annoucements
Extra Boxes [If still relevent]
Color usergroups
Forum Annoucements
FULL Admin and Moderator Logging
Download mod
Global Moderators
Guest Read
Image Verification for Registration [Accessibility fixed (Audio?)]
Image Verifation for posts
Sub Forums
Shop Mod
Cash mod [If gary doesn't redo his]

And I am undecided about:
User Ratings
Custom Register/Profile Fields
various other shit

Obviously not all at once

Also, I am [hoping] to make most, if not all, of my stuff more Web 2.0 "kewl"



(15 replies, posted in General discussion)

Since I am to lazy to download this newest version, can some one please tell if the made it so the menu bar (when enabled) is at the top instead of the middle of the bloody button set?

Ah yes, well I am no longer able to aford hosting. My suggestion would be to test on an unused set of forums, or ask for someone's forums who has the mod installed.