(8 replies, posted in PunBB 1.2 troubleshooting)


The array is populated with the details of the user, taken from the user, groups and online tables (i think).

you could simply add a print_r($pun_user); somewhere to print out everything it contains if you need to know exactly.


(10 replies, posted in General discussion)

pogenwurst wrote:
Reines wrote:

I really don't see the point in more "rs" communities, they are always the corrupt and run by people simply looking for power.

Sorry to stray off topic, but what exactly is an "rs" community?

www.runescape.com is an mmorpg, mainly played at 12-16 year olds. The communities around tend to be based on version 1 of the game, which is almost dead and consists of people trying prove they are better than others then stealing their items because the more expensive items you have the better you are.

(I used to own an rs community but got fed up and left it)


(8 replies, posted in PunBB 1.2 troubleshooting)

you can change

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


if ($pun_user['is_guest'] === true)
    message($lang_common['No view']);

then no guests can view it.


(10 replies, posted in General discussion)

I really don't see the point in more "rs" communities, they are always the corrupt and run by people simply looking for power.

Anyway, what do you need help with? PunBB related matters, or making an actual site, or what?


(8 replies, posted in PunBB 1.2 troubleshooting)

The simple skeleton of a punbb page looks like:


define('PUN_ROOT', './');

require PUN_ROOT.'include/common.php';

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

// your page code goes here



This will check they are logged in (assuming your boards require guests to be logged in), and only output your code you add (eg. no punbb headers or footer etc).

If you wish a punbb intergrated page with punbb styles and headers etc you can use:


define('PUN_ROOT', './');

require PUN_ROOT.'include/common.php';

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

$page_title = pun_htmlspecialchars($pun_config['o_board_title'].' / My Intergrated Page');

require PUN_ROOT.'header.php';

// your page code goes here

require PUN_ROOT.'footer.php';



(13 replies, posted in PunBB 1.2 bug reports)

Is that a clean install of admin_options.php, or have you edited it?


(13 replies, posted in PunBB 1.2 bug reports)

Odis wrote:

I like Reines idea. Can someone elaborate on regex more? and does anyone know if it works with punbb?

Taking a look at the censor function, no punbb doesn't support regex censors just now. I assume this is because if it did then all censors would need to be regex, and alot of people have trouble with it. If you wish to change it so punbb will allow you to add regex censors (keep in mind this would require all your censors to be regex compatable) then you can simply open include/functions.php and find

            $search_for[$i] = '/\b('.str_replace('\*', '\w*?', preg_quote($search_for[$i], '/')).')\b/i';

and replace with

            $search_for[$i] = '/\b('.str_replace('\*', '\w*?', $search_for[$i]).')\b/i';

If you need help with using regex's, there is a good tutorial here: http://weblogtoolscollection.com/regex/regex.php

I'll assume English isn't your first language, and restrain myself from flaming.

Anyway the mod you are after can be found [here].


(5 replies, posted in General discussion)

Why are you using 1.2.4? Thats asking to be "hacked".


(2 replies, posted in Programming)

You could set a timeout on the stream, obviously it is not ideal, but as far as im aware there isn't a way to check if there is data to be read or not.

http://uk.php.net/manual/en/function.st … imeout.php


(13 replies, posted in PunBB 1.2 bug reports)

you could solve catching f.u.c.k or f-u-c-k etc using a regex such as f[.-]?u[.-]?c[.-]?k, however im not sure if punbb censoring supports regex, or it would need to be hard coded in (in which case it would be more work).

You cannot simply be hacked because a file in writeable, fix whatever part of your site they exploited and you won't have any problems.


(4 replies, posted in PunBB 1.2 troubleshooting)

If you use firefox you can view cookies and only delete the appropriate one, instead of clearing the lot.


(4 replies, posted in PunBB 1.2 troubleshooting)

Clear your cookies.

StevenBullen wrote:


You still doing these?

His last reply was around 2 months ago, so i'd assume not.

Mark wrote:

go to http://www.reinet.co.uk
in his announcement box, he has made it so when he posts in a certain forum it goes there aswell.

This is by no means a mod, but the basic procedure is remove the existing announcement stuff (except references within the template files). Then change header.php to include something along the lines of:

// START SUBST - <pun_announcement>
if ($pun_config['o_announcement_board'] != '-1' && $pun_user['g_read_board'] != '0')

<div id="announce" class="block">
    <h2><span><?php echo $lang_common['Announcement'] ?></span></h2>
    <div class="box">
        <div class="inbox">
    $result = $db->query('SELECT t.id, t.subject, t.closed, p.poster, p.poster_id, p.message, p.hide_smilies, p.posted, u.group_id AS g_id, g.g_title FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'posts AS p ON p.topic_id=t.id AND p.posted=t.posted INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE t.moved_to IS NULL AND t.forum_id='.$pun_config['o_announcement_board'].' ORDER BY t.posted DESC LIMIT 1') or error('Unable to fetch announcement', __FILE__, __LINE__, $db->error());

    $announcement = $db->fetch_assoc($result);
    if ($pun_config['o_censoring'] == '1')
        $announcement['subject'] = censor_words($announcement['subject']);
        $announcement['message'] = censor_words($announcement['message']);
    $announcement['poster'] = '<span class="'.strtolower(str_replace(' ', '', $announcement['g_title'])).'"><a href="'.PUN_ROOT.'profile.php?id='.$announcement['poster_id'].'" class="username"><strong>'.pun_htmlspecialchars($announcement['poster']).'</strong></a></span>';
    $announcement['message'] = parse_message($announcement['message'], $announcement['hide_smilies']);
    $announcement['closed'] = $announcement['closed'] != '1' ? '<a href="'.PUN_ROOT.'view'.($announcement['question'] != '' ? 'poll' : 'topic').'.php?id='.$announcement['id'].'">View Comments</a>' : '';
    echo '<div class="center"><strong>'.pun_htmlspecialchars($announcement['subject']).'</strong> - Posted By '.$announcement['poster'].' ('.format_time($announcement['posted']).') '.$announcement['closed'].'</div><br/>'."\n".$announcement['message'].'<br/>'."\n";


    $tpl_temp = trim(ob_get_contents());
    $tpl_main = str_replace('<pun_announcement>', $tpl_temp, $tpl_main);
    $tpl_main = str_replace('<pun_announcement>', '', $tpl_main);
// END SUBST - <pun_announcement>

As you can see this will require a config value 'o_announcement_board', containing the forum_id of the board to export the announcement from, or -1 to turn it off.

Hope that helps.


(7 replies, posted in PunBB 1.2 discussion)

PunBB Migration Tool

The PunBB Migration Tool is a utility for migrating to PunBB from a series of other forum software. It works by converting the database from the source forum into a PunBB database. The migration tool has been developed by David Djurbäck (a.k.a. Chacmool). In it's current version, the tool supports conversion from the following forum/CMS software:

    * Invision Power Board 1.3
    * Invision Power Board 2.0
    * MiniBB 1.7d
    * phpBB 2.0
    * PHPNuke 7.4
    * vBulletin 3.0.0
    * YabbSE 1.5.5
    * SMF 1.0.5
    * SimpleBoard 1.7d
    * PHP-Fusion

*  PunBB Migration Tool 1.4.0 - Updated 2005-09-30.

As far as security goes, PunBB 1.2.10 has no known exploits for it, and if any appear im sure they will be patched and a new version + change log released within a couple days.


(16 replies, posted in Feature requests)

It could easily replace the ICQ field, i haven't ran into anyone that uses ICQ for months.

below that add

$links[] = '<li id="navirc"><a href="irc://irc.stealingyour.info/stolennet">IRC</a>';

to add a normal link, or

if (!$pun_user['is_guest'])
    $links[] = '<li id="navirc"><a href="irc://irc.stealingyour.info/stolennet">IRC</a>';

to add a link only visible to members.

There is a time limit in the user group setup, after this time limit has passes they cannot edit the subject.


(7 replies, posted in PunBB 1.2 discussion)

One big pro is punbb has a very helpful community and an active development team, meaning if you have problems or need help with any modification, you can almost always get what you need here.

Guests use user_id 1, so no you cannot change it.

##        Mod title:  Simple Gallery
##      Mod version:  1.0
##   Works on PunBB:  1.2.*
##     Release date:  13/01/06
##           Author:  Reines
##      Description:  Adds a very simply gallery with minimal configuration to your site.
##       Affects DB:  No
##   Affected files:  None
##            Notes:  Install a link to this gallery using the extra menu items in the admin panel.
##       DISCLAIMER:  Please note that 'mods' are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.

Very simple mod, the gallery root should probably be stored in the database not hard coded, but it didn't seem worth the effort since its such a basic mod.



(6 replies, posted in Programming)



(19 replies, posted in PunBB 1.2 show off)

I Recently passed ownership my old punbb site (http://reinet.co.uk) over to a friend. It was ranked 4th on PunBBig for posts/topics, and 1st for topic & post growth. I replaced this site with a new one (http://www.stealingyour.info), mainly based around programming, computer graphics, but with a fairly large gaming and general discussion area too. It has been up for around 9 days now, and already has:

Board Stats wrote:

Members: 1190
Total topics: 1466
Total posts: 19535

so im hoping it will grow into another large and active site.

Below is a list of modifications i have made, bold indicates not finished or things still to do.

Mods Made wrote:

- Skins
  - Light
  - Dark (i suck at css so haven't got around to it yet)
- PMs
- Ability to choose link target
- Polls
- Image verification
  - Install GD library
  - Verification on registration
- Group colours & Info
  - admin colour
  - mod colour
  - user group info
- Edit Messaging Profile
  - irc
  - google-talk
  - remove jabber
- Anti referer URL tags
- Adverts
  - Affiliates
  - Google adverts
  - Paypal donate
- Post author in seperate column
- Portal
  - navigation
  - statistics
  - announcements
  - affiliates
- IP => Country lookup
- Ban logs
- Code Syntax colouring (mod i used has bugs in it, need fixing when i get time)
  - cpp
  - java
  - php
  - ini
  - apache
  - mysql
  - vbnet
  - pascal
  - mirc
  - tcl
- Remove censoring
- Remove announcement
  - server listings
  - java chat applet
- RSS announcement feeds
- Downloads
  - downloads plugin
  - ability to limit users bandwidth usage
  - anti-leech
  - descriptions of downloads (haven't got around to finishing yet)

Some of these are based off mods found here/punres and edited/rewritten to suit my needs, and others i made myself.

Any feedback/comments would be nice (:

URL: http://www.stealingyour.info

Edit: Yes im aware it isn't 100% valid XHTML ): I will try sort that at some point, but it isn't my strong point.


(45 replies, posted in News)

Thanks, upgrade wasn't a problem at all.

livatlantis wrote:

This is amazing! I never thought updating would be so easy... Rickard, I must say, PunBB is awesome! So fast, customizable and... easy. I'm sure this is a easy update, but I'm proud: http://www.powerofmetal.net/forum/ wink


Nice skin (: