(24 replies, posted in PunBB 1.2 troubleshooting)

Well,  Since you've been running for a year,I'm assuming this is a version 1.2.x.

If your forum is working, you surely have a database of some sort.  Open your config.php file, which is in your forum root, and look for the $db_type, which should be the first line.  This is the database you are using, and you should see all your connecting information there.

The issue you have with the forum redirect is the same issue you have where you manually had to change a cache_config.php.  The base url of the forum needs to be changed.

To do this, you need to go into your database. (depending on which database you have will determine how you can do this).  you need to go into your config table and find the row o_base_url and change it to match your new url.  You would then likely want to delete the files in  your cache folder and you'll be all set.


(1 replies, posted in PunBB 1.2 troubleshooting)

There is an option  under forum options in admin for  "Sort Topics By".  The default is Last Post, but you can change it to Topic Start

Are you using version 1.2.x ?  It appears so.  Otherwise (if you are using 1.3) you should use the query builder.

$fid is the forum id in which the topic is created.

Assuming it is 1.2.x, any new topic will be new because the default unread mark behavior of 1.2 is unexpected.  It is based on the time of the topic compared to the last visit time so it is really a new topic mark not an unread mark.  If you never want them to be new, maybe you could update the person's last login time.  Not sure you really want to do this.  There is an extension on punres for better unread marks.

yeah, http://www.campidiot.com  is another one which has removed the copyright.


(11 replies, posted in PunBB 1.3 extensions)

instead of writing the html directly, add it to $alert_items

$alert_items[] = '<p class="first-alert"> Where does this output??</p>';


(10 replies, posted in PunBB 1.2 troubleshooting)

winmerge is a pretty good one


(4 replies, posted in General discussion)


update posts set topic_id=<your_car_topic_id> where id=<post_to_move_post_id>

Edit: you'll also want to edit the last_post,posted,last_poster columns on the topic record to match the post and increaset the num_replies by 1


(4 replies, posted in PunBB 1.2 troubleshooting)

you can put


in  each of the appropriate input boxes.  It works on IE and Firefox, but I don't think its standard for those who care about valid xhtml and no guarantee it works in other browsers


(4 replies, posted in Feature requests)


the "by author" in the topic column is default punbb behavior.  If you applied a mod to add that author column, it must've had instructions on removing that code from that page, so you'll want to find that in the mod instructions.  Or if you coded it yourself, you'll have to play with the code in the <span class="byuser"> sections.

modereatepoll is used for the links on the viewpoll page for "delete multiple posts", "move topic", "close topic", "stick topic" which are only visible to the admin / moderator, so you don't need to do anything during the install with it, just copy it to the root.  There is an admin page plugin which lets you choose the maximum number of poll answers you can have.  it is just one file plugins folder.

I did this on 1.2.15, but it appears that it works with anything after 1.2.3

resolved:  http://fluxbb.org/forums/post/3596/#p3596

are you sure you don't have more than 1 topics table (for example if you are using a prefix it would be prefixtopics table not topics?  There's not much else that message would mean.

Don't give up, though.  It took me 6 or 7 tries to get that mod to work, and finally did.

nick23 wrote:


I've recently attempted to use the easy poll mod (v1.1.3). I'm running punbb 1.2.12. I've edited the install_mod file to include this version number.

Basically, upload the install_mod.php file and run it, only to get the following error:

File: /var/www/html/board/install_mod.php
Line: 22

PunBB reported: Unable to add columns to table

Database reported: Duplicate column name 'question' (Errno: 1060)

Now, in the past, I attempted to add an other mod (possibly the + version of Easy Poll). Didnt quite work, with some of my pages not displaying. I removed and replaced the files with the originals.

Having gone back for a re-attempt, this time with the v.1.1.3 version, having had the above error, I was advised to remove any legacy tables from the sql database which I did. The error still appears.

Any ideas if its possible to somehow tidy this up and get the mod installed?


this looks like you already have that column "question" in your table from your previous attempt.  You should either drop the column and re-run the install, or remove that column from the create statement in the install script.


(2 replies, posted in PunBB 1.2 discussion)

There's one at punres.  Why not continue to use that?


(4 replies, posted in PunBB 1.2 troubleshooting)

You don't want to do that in the lang file.  YOu'll probably just want to change the line in index.php

if ($pun_user['g_read_board'] == '0')
    message($lang_common['No view']);


if ($pun_user['g_read_board'] == '0')

and then create a simple noviewpage.php something like

define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';
// Load the index.php language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/index.php';

$page_title = pun_htmlspecialchars($pun_config['o_board_title']);
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php'
<your divs from above>
$footer_style = 'index';
require PUN_ROOT.'footer.php';

Edit: forgot the header.


(4 replies, posted in PunBB 1.2 troubleshooting)


(for example if you use english it is lang/English/common.php)

look for the 'No View' entry and change the text value.


(4 replies, posted in PunBB 1.2 troubleshooting)

Open post.php


// If the posting user is logged in, increment his/her post count
        if (!$pun_user['is_guest'])
            $low_prio = ($db_type == 'mysql') ? 'LOW_PRIORITY ' : '';
            $db->query('UPDATE '.$low_prio.$db->prefix.'users SET num_posts=num_posts+1, last_post='.$now.' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error());

Replace with

$my_fid=4;   // Replace this with your forum id number

    $myresult = $db->query('select t.forum_id from '.$db->prefix.' posts p inner join '.$db->prefix.'topics t on p.topic_id = t.id where p.id='.$new_pid);
   $fid = $db->result($myresult);
// If the posting user is logged in, increment his/her post count
        if (!$pun_user['is_guest'] && $fid != $my_fid)
            $low_prio = ($db_type == 'mysql') ? 'LOW_PRIORITY ' : '';
            $db->query('UPDATE '.$low_prio.$db->prefix.'users SET num_posts=num_posts+1, last_post='.$now.' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error());

Be sure to use your forum id on the first line


(59 replies, posted in General discussion)

What sort of shocks and amazes me is that there has not been any response from the informer people.  Not that we would believe them, but I would have expected by now that one of the new developers would have posted a "do not fear, nothing will change or here's our new plan " sort of message to try to encourage the community to not switch.    So why wouldn't we?


(2 replies, posted in PunBB 1.2 troubleshooting)

In userlist.php find (near the top about line 30):

if ($pun_user['g_read_board'] == '0')
    message($lang_common['No view']);

change to

if ($pun_user['g_read_board'] == '0' || $pun_user['is_guest'])
    message($lang_common['No view']);

or install this mod:



(2 replies, posted in PunBB 1.2 discussion)

You'll want to use one of the domains for master login, and make use of the shared db table.

for example, if example.com is your master login, when a user goes to example2.com:

1) if their  example2.com cookie is set, all done
2) if not, check your shared table to see if your token/timestamp from example.com has been written within the last x amount of time you want login valid for (30 minutes, 10 minutes, or later you can make this rolling time if you want).  if so write the example2.com cookie, all set.
3) if not, redirect to example.com auth page.   If the example.com cookie is already set, write a token/timestamp in your shared table. redirect back to example2.com, and it will be handled by step 2.
4) if example.com cookie is not set, show the login page.  if valid login, set example.com cookie and token/timestamp in your db and redirect back to example2.com and it will be handled by step2.

If they log in to example.com, all you have to do is set the example.com cookie and token/timestamp.

This way nothing is sent in the querystring that can be spoofed, so you are taking advantage of the security of the cookie and validating against the db instead.  you'll only need to pass the redirection page, which you were probably doing to a login page anyway, and eventually both cookies get set if needed.

Edit: I used example.com and example1.com interchangeably.


(14 replies, posted in Programming)

lie2815 wrote:

oh I understand now. It's not always only a decimal... but sometimes something lik 2.00x5.04 or whatever...

Thats weird data.  What would you want that to sort by?  The cast will cast that as 2.00. not sure what the multisort would do.


(14 replies, posted in Programming)

Any reason you can't cast the column in the order by clause?

order by cast(size_decimal as decimal)

so you'd have:

$result = $db->query('SELECT id, size_inches, size_decimal, normal_lbs, 144inch_lbs FROM '.$db->prefix.'sizes WHERE alloy_id='.$id.' ORDER BY cast(size_decimal as decimal) ASC') or error('Unable to fetch size information', __FILE__, __LINE__, $db->error());
Papillon wrote:

The info about the cheating is in the post of matt1298. I deleted the account of that member, and thus his scores, so the link above won't show anything anymore. After I banned him, he actually registered with another similar account today.
I appreciate all your feedback on the matter. And I also would love to know if there is anything to be done to stop the cheating.

You'd have to do something like:

On the arcade_play.php page, generate a new uniquekey for the user/game combo.  Save this key to a table.  Pass the key to the game similar to how the game name is passed, and then modify each game to pass this back to the newscore.php and mod newscore.php to compare the key to the one in the table.   A lot of effort (particularly modifying the games) that may not be worth the trouble unless you are having a tourney for cash based on these game score.  smile

Edit: Nevermind, this wouldn't work either, because they could probably scrape the uniquekey off the page where it's passed as a param to the game.