if I understanded correctly your PM, you gave me link to the pure punbb installation (without any extensions). Unfortunately the error still occurs. Not good, not good... I made some tests, and I noticed, that the error appears only when posting new message - editing is working perfectly fine.

post.php - post / preview => error
edit.php - post / preview => no problems...

In this case.... i have no idea, what is going on, maybe some freaky server settings (like mod_rewrite)? Let's try to change the name of the file from post.php to something else like "pretty_name.php", and you need also to correct the values in include/url/Defaut/forum_urls.php - change each line that contains "post.php" to "pretty_name.php". Now, when you will try to add new post, you will be redirected to page pretty_name.php instead of post.php.

If this doesn't help, then maybe there is really some problems in the source code hmm There is no extensions, so it must be something inside post.php. Let's concentrate on preview - this operation is shorter, so there is less places where the error can hide smile

in the lines 345 - 382 there is following code fragment:

// If preview selected and there are no errors
if (isset($_POST['preview']) && empty($errors))
.... // here was some code that I cutted out

try to delete this fragment from file, and check if error dissapears after pressing preview button? If yes, you can restore this code piece by piece and check, what line is causing the problem.

Tell us what were the results of the hints I gave you, then I will continue.


I am 99% sure, that an extension is causing the problem. Try to deactivate them one by one, and figure out which one it is. Start with extensions that have something to do with bbcodes - checking links accessability, limiting links in post, etc. It is also possible, that separate extensions are working properly, but some of them are not compatibile together. You have to do reasearch on your own.

When you find the problematic extension, we may try to fix it. Until then, there is not much we can do.


(6 replies, posted in Feature requests)

Love Crowd wrote:

I'm looking for a multi-quote extension for PunBB 1.4.2.
There used to be an extension called pun_quote for version 1.3, but it was never updated for version 1.4.

You can create wrote:

very nested

quotes wrote:

in punbb 1.4.2

I don't know what are you looking for. pun_quote adds link "quote" on the right, bottom of each post. This feature is build in into the punbb 1.4.2. You are right, that they are not taking you back to the source post, but "multi-quoting" is working... or you had something else in mind than nested quotes?

I know this topic is rather old, but... I have done this, and it was quite simple smile

I installed punbb normally, in the administration panel I changed the default style to something else (in my case it was Urban). Then I changed user settings from Oxygen to that style. After that I deleted Oxygen directory ^_^ I am not experiencing any problems, all extensions are working correctly.

There is only one important thing you have to remember - when deleting a style, users shouldn't have it set in the profile settings!


(2 replies, posted in PunBB 1.4 troubleshooting)

I am sure, you have already found it, but just in case I will explain this to you.

You have to make modifications in login.php, directly above the hook 'li_login_pre_redirect'. Your code should looks like that:

        $expire = ($save_pass) ? time() + 1209600 : time() + $forum_config['o_timeout_visit'];
        forum_setcookie($cookie_name, base64_encode($user_id.'|'.$form_password_hash.'|'.$expire.'|'.sha1($salt.$form_password_hash.forum_hash($expire, $salt))), $expire);

        $_POST['redirect_url'] = 'https://google.com/'; /* <-- THIS LINE I HAVE ADDED */
        ($hook = get_hook('li_login_pre_redirect')) ? eval($hook) : null;
        redirect(forum_htmlencode($_POST['redirect_url']).((substr_count($_POST['redirect_url'], '?') == 1) ? '&amp;' : '?').'login=1', $lang_login['Login redirect']);

If you want to redirect to the main page of your domain, you should use "/" as address. fe. $_POST['redirect_url'] = '/'; After redirecting the parameter "login=1" will be attached, but this doesn't disturb in anything.



(23 replies, posted in PunBB 1.4 additions)

I have made some changes in this extension. Now users can change their colors in shoutbox.

how to put chat on top?

I have made new version of this extension. Now you can set position of shoutbox in administration panel (top or bottom).

but never work, Always do not write on file.txt but write on db and also read messages from db.

I see no sens in that, what you are trying to achive. Text files are very slow, after several months the file will be enormous big and causing performance problems. Memory tables in database are much more efficient. The changes I have discussed above creates something like log files - to archive the conversation.


(26 replies, posted in PunBB 1.4 additions)

I have finished working on extension, which adds subforums functionality. I was relaying on extension made by putnik - he does a great work (respect), but unfortunately it wasn't working properly on my forum 1.4.2 - and I was afraid that it will damage my database. I have downloaded also the extension made by prokop, but when I saw his changes and his code my eyes started to cry hmm In the end I have decided to make my own extension, and I am presenting it to you:

om_subforums 0.0.4 (current): om_subforums-0.0.4.zip

The file structure I have left the same as in putnik extension - it was clean, fast, just good - everything else is I have changed. I have made an assuption, that only one level of nesting is allowed - this let me make much simplier, less complicated extension than putnik. I have also tested my extension with many scenarios - fe. changing category of parent forum, changing parent, deleting parent forum, removing category, etc.

Maybe someone will find this extension useful.

http://dev.poldrag.katowice.pl/distfile … forum0.png
http://dev.poldrag.katowice.pl/distfile … forum1.png
http://dev.poldrag.katowice.pl/distfile … forum2.png
http://dev.poldrag.katowice.pl/distfile … forum3.png

change log:

v.0.0.4 - 2014-09-16
- support for php 5.5 and postgres

- support for new posts notifications
- more hooks

- source code reorganizetion (functions.php instead subforums.class.php)
- fix for quickjump forum list

- assigning parent forum
- display mode (show on main page, show above topics)



(23 replies, posted in PunBB 1.4 additions)

The esiest way to save discussions in txt file, is to modify a json.php file. Just add this one line next to inserting new entry to database:

file_put_contents ("/tmp/shoutbox.txt", date("Y-m-d h:i", time())." $username: $message\n", FILE_APPEND);

It should look like this:

// new message
if (isset($_GET['message']) && $forum_user['id'] != 1) {

        $message = forum_htmlencode($_GET['message']);
        $username = forum_htmlencode($forum_user['username']);

        // insert new message with current time
        if( (strlen($message) > 0) && (strlen($message) <= MAX_MESSAGE_LENGTH) )
                $query = array(
                        'INSERT'        => 'poster, date, message',
                        'INTO'          => 'om_shoutbox',
                        'VALUES'        => '\''.$forum_db->escape($username).'\', '.time().', \''.$forum_db->escape($message).'\''
                $forum_db->query_build($query) or error(__FILE__, __LINE__);
                file_put_contents ("/tmp/shoutbox.txt", date("Y-m-d h:i", time())." $username: $message\n", FILE_APPEND);

        echo json_encode(array('status'=>true));

        // clean up after posting the message
        $time_before = time()-MAX_MESSAGE_OLD;
        $query = array(
                'DELETE'        => 'om_shoutbox',
                'WHERE'         => 'date <= '.$time_before
        $forum_db->query_build($query) or error(__FILE__, __LINE__);

Of course you may change the path to txt file, but remember that you need write permission to the file you pointed.


(0 replies, posted in PunBB 1.4 additions)

The counter that shows the time left to an important event. It is completly based on script by Keith Wood. Requires jquery 1.6.2 or above.

Download 0.0.2 (current): om_countdown-0.0.2.zip

Note: Support Oxygen and Urban. See README file before adding new translation. In description an administrator may put some html code.


I have been testing on 5.4.8 and 5.2.14 - still no error. Maybe it depends on php configuration? Maybe an extension overwrites $lang_post array or something. Gezz, how did you cause this error...

Unfortunately I cannot help you, unless I will be able to reproduce this problem on my own computer. I have downloaded the newest punbb source code from github repository, created new database (fresh install) and there is no space character. I have repeated everyting with 1.4.2 tar.bz2 archive and still nothing.

Maybe an extension, causes the problem? Try to disable all of them...

You have to tell me exacly what version of punbb are you running and what version of php are you using. I noticed that the same problem is in this official forum, then maybe someone from staff may help you.

There are 2 places, where it can be:


/* line 537 */       <div class="frm-buttons">
                <span class="submit primary"><input type="submit" name="submit_button" value="<?php echo ($tid) ? $lang_post['Submit reply'] : $lang_post['Submit topic'] ?>!!HERE!!" /></span>
                <span class="submit"><input type="submit" name="preview" value="<?php echo ($tid) ? $lang_post['Preview reply'] : $lang_post['Preview topic'] ?>" /></span>


/* line 42 */ 'Submit topic'            =>    'Submit topic!!HERE!!', // For submit button

But on my copy of punbb forum (version 1.4.2) everything is OK.

There is very nice debuging tool for websites called  firebug - it is a plugin for firefox browser and looks like this. It allows you to analize html structure, manipulate css styles on the fly, and even debug java script. This is how I found what causes the problem.

There is one unnecessairly space character (probably) in the post.php file. But it is weird - in my copy of punbb everything is alright.

In punbb 1.4.* it is possible to merge topics from viewforum page (click on Moderate forum, then Merge button). I think this is functionality you are looking for.

Sort topics alphabetically in the forum view.

Download: om_sort_by-



(23 replies, posted in PunBB 1.4 additions)


Shoutbox - allows user to talk in chat-like window.

om_shoutbox 0.0.5 (current): om_shoutbox-0.0.5.zip

0.0.5 - 2014-09-16
integration with om_warnings (blocking access to shoutbox)
compability with postgres

0.0.4 - 2013-11-24
configurable by admin: decode smilies in messages, guests can view shoutbox.
added ref="nofollow" to links

0.0.3 - 2013-10-11
Don't check session when refreshing the messages. Starting session each 3 seconds slows down the server.

0.0.2 - 2013-09-06
added some settings in administration panel
users may chenge their color in profile settings

0.0.1 - 2013-04-13
simple extension, allow posts messages, decodes bold tag and url links

The source code is very simple, everyone should be able to make changes in it smile

Some screenshost:
http://dev.poldrag.katowice.pl/distfile … utbox1.png
http://dev.poldrag.katowice.pl/distfile … utbox2.png

This extension is obsolete, you shouldn't use it. If you want to create a new topic in another forum use functions that are build into punbb 1.4.2: 1) split posts, 2) move topic.

You may also be intrested in om_move_posts, which works exacly the same as pun_move_posts, but keeps the post ids unchanged.

om_move_posts: http://svn.poldrag.katowice.pl/listing. … name=punbb

----------------[ obsolete ]----------------
Move posts into a new topic (pun_move_posts)

I needed to move some posts into new topic (the author of the first moved post becomes the author of the topic). I have made some changes in the extension pun_move_posts, hopefully someone will find it useful.

Here is the patch: pun_move_posts.patch
Patched plugin: pun_move_posts-1.1.4.zip