thanks for that qie - Daniel Vijge is to be thanked for the base for this mod. i am going to update it when i get back to my home in a number of weeks i hope (no regular computer access for the moment were i am).

planed additions are:
- Checking usernames (that of guests, maybe also regular users when registering) for forbidden words
- Option for minimum number of characters in posts (i.e. to stop users posting very short replies - forum spamming to increase post count etc)
- Checking of email addresses (like URLs at the moment) in posts

Plus some other minor improvements. If there is anything else that would be good to add please say so and i will try and add it when the time comes.


(114 replies, posted in Programming)



(2 replies, posted in PunBB 1.2 discussion)

PunBB är den bästa PHP forum som finns!


(89 replies, posted in PunBB 1.2 discussion)

i also agree, but at the same time PunBB is standards compliant - XHTML, CSS, accessible, etc and these are some of the great things about PunBB, so to introduce something like CAPTCHA would only break this which is quite bad in my opinion.

a text equivilant like "What is 5 + 3?" (random numbers) would be a good idea as a basic defence, but then, as mentioned earlier, if this becomes standard to PunBB, then bots will be programmed to defeat this which brings us back to square one. a mod i made, mentioned earlier (based on the Forbidden word spam blocker mod by Daniel Vijge), addresses the issue differently but the problem with this mod is that it must be customised by the administrator to each forum and a "one size fits all" is not going to work (except maybe for limiting URLs and post sizes for new users/guests).

Akismet, as previously mentioned does a great job but the downside with this is the forum administrator is relying on a 3rd party which may not suit a lot of people who like simplicity and total control, and who therefore chose PunBB in the first place.

perhaps integrating like you mentioned sirena, a few solutions, like CAPTCHA, "What is 5 + 3?" etc into PunBB but having them off by default would give new forum administrators the easy option to turn them on at their will. having them on by default though i do not think is a good idea as PunBB is simple and standards focused, and adding too much and breaking the standards would not be good.

try Comment Control 2.0.0 - i think it does at least some of what you are asking.


(89 replies, posted in PunBB 1.2 discussion)

try BB Spam Fighter, very small changes to your forum needed and should stop a lot of spam bots without affecting accessibility (if configured right).

a very good alternative is Akismet for PunBB which is accessiblity friendly, however checks are performed by relying on a 3rd party which may not suit.

EDIT - if you want to stop them at registration and so use CAPTCHA (not reccommended for accessibility), try something like Registration Verification Code, an accessibility friendly alternative is a sortof "What is 2 + 2?" check, but while accessible, it is easy for spambots to be reconfigured to work this out.


(1 replies, posted in PunBB 1.2 discussion)

cool. pity it is not a standard and is only for Yahoo! (currently) however.

the navigation bar that appears all over the place for example would be nice to not be indexed using this making the unique content stand out more.

EDIT - could also be used to make PunBB a less of a target for spammers, i.e. guests and users with less than # posts (say 3 posts) have all their posts wrapped in this tag so that they are not indexed. if this tag was a standard i'd implement it into the BB Spam Fighter mod which does these simple user checks already.

not being standard is quite annoying, but well done to Yahoo! for bringing it out, hopefully this or something similar will eventually become a standard.

haven't checked the first 2 files but straight away:

, missing after

'Edit redirect'            =>    'Post updated. Redirecting …'

should have said to add in a , there to that if adding at the end.

if that doesn't do it i will look at the other 2 files but as there is only 1 change in both (and the same change) it can't be much wrong.

yes the content, you can put each code within "code" BBCode tags.

can you post all the changed files here so i can take a look at the problem?

btw, here are a few useful tips to stop spam bots which find your forum via Google or another search engine is to:
- Disallow register.php, login.php, post.php (if you allow guest posting) etc in your robots.txt
- Check your logs for keywords that look like they are coming from spammers and either remove these keywords or put the pages in robots.txt disallow.

i have found the following in my logs for search phrases and they all clearly are to do with only registering or posting on a forum (therefore very likely a spammer / spam bot):
- "register rickard passwords can be between 4 and 16 characters"
- "topic review intitle post a reply -confirmation -code"
- "message intitle post a reply -confirmation -code 7"

Papillon wrote:

Is there a way to prevent bot registering in forums at the first place? To stop the cause before curing the effects.

there is CAPTCHA etc that can be used for that but these kind of registration checks (while good at stopping a lot of spam) are now less spammer proof than before and also, more importantly, are not accessibilty friendly and even user friendly.

no implementation is 100% effective and spammers learn how to defeat the checks over time.

i do have a small idea (not a perfect solution but a step in the right direction) for this though thanks to your suggestion smile i may add it to a future release - whenever i get the time and depending on how simple or complicated i make it.

Papillon wrote:
sirena wrote:

What are the words that work best against the most common forms of forum spam people are getting? Is it the usual pharm stuff?

I wanted to ask the same question, but I thought that maybe they got a spam fighter in here as well, so these phrases won't make it to be posted.
Most of the spam I had before was about many urls, so at this first stage I limited the url number per post.

well i have found that multiple URLs is one of the most common forms of bulletin board spam hence this feature but with regards to spam words, i can publish a list here (mine is over 100 words), however if i publish a list of words, spammers could change their words they use from the list if they see it. every forum can get different kinds of spam as well too, so a spam word for one forum may be an ok word for another.

an example of this is a forum to do with financial information allowing a financial word or phrase while a forum to do with gaming would classify this word as spam (at least for guests and users with few posts).

my list was made due to my forum receiving a lot of spam in the last weeks and now i haven't had any for many days.

Papillon wrote:

++ Just noticed. Something went wrong with posting. When I click on post a reply, I get a blank page. ++

Edit: I uninstalled everything, and then installed the mod back, and I get the same problem again with posting.
Does that have anything to do with me pasting what's in "step 11" at the end of lang/[Lang]/post.php ?

Edit: 3rd try! Not working sad

that could be my fault in the readme, apologies if that is so.

For step 11, if you pasted the code at the end of lang/[Lang]/post.php then remove the last ,

like below:

'Remove spam word'    => 'This is a protection against spam bots. Delete the word %s from your post.',
'Remove spam phrase'    => 'This is a protection against spam bots. Delete the phrase %s from your post.',
'Remove URL amount'    => 'This is a protection against spam bots. Reduce the number of URLs in your post to %s.',
'Remove char amount'    => 'This is a protection against spam bots. Reduce the number of characters in your post to %s.'


should work then

tack så mycket Bezon!

no comments?


(5 replies, posted in General discussion)

yep, very easy to block URLs - just enter 0 for URL # in the admin area. Setting it to 1 or 2 can be good also as most spammers post many URLs rather than just 1 - all up to you as to how you want to handle them.


(5 replies, posted in General discussion)

ok, yeah bots seem get around registering very easily that to me allowing guest posting is the same as registering.

if you try out that mod let me know, is your forum in English or another language? i have a list of 30 or so very frequently used spam words / phrases which spammers have used on my forum, since adding these words and configuring restrictions on guests and members with few posts or registered recently the amount of spam has been reduced drastically. reducing the URL amount and message size for these spammers also goes a long way in reducing the problem i believe as most new members or guest posters don't post really long messages and also don't post 20 or so URLs in their first posts lol.


(5 replies, posted in General discussion)

do you allow guest posting? also have you tried any spam preventing mods yet?

CAPTCHA etc are good but they are not accessibility friendly. i created an anti-spam mod just yesterday (based off Daniel Vijge's Forbidden word spam blocker 1.0.1 mod but enhanced a fair bit), is called BB Spam Fighter - let me know if it works for you, needs to be customised though, but i think that is a bonus as every forum is setup different and may receive different types of spam.


(16 replies, posted in General discussion)

Quake & UT

Based off Daniel Vijge's Forbidden word spam blocker 1.0.1 mod but a lot of extra options added, as his mod, while very good, was quite basic as it blocked spam words for every user and could not be customised in the Admin area except for adding or removing words.

Many thanks to Daniel's mod for providing the base for this as I was using his originally to prevent spam on my forum but came across problems as spammers posted many URLs, long posts, etc  which this mod aims to address a little.

Let me know what you think.

EDIT - screenshots:

Administration area:

Errors that poster sees:

##        Mod title:  BB Spam Fighter
##      Mod version:  1.0.0
##   Works on PunBB:  1.2.14
##     Release date:  2007-04-22
##           Author:  naitkris (
##      Description:  Based on the Forbidden word spam blocker mod by Daniel
##                    Vijge ( This mod adds extra options for
##                    administrators in controlling spam.
##                    As with the Forbidden word spam blocker mod, this mod
##                    restricts posting of certain words and phrases, but
##                    improves this by:
##                    - Performing a spam check only on posts by users in
##                      certain groups, as well as:
##                       - If the user has less than # posts
##                       - If the user is registered for less than # days
##                    - Restrict the max # of URLs posted in a message for these
##                      users
##                    - Restrict the max # of characters in a message for these
##                      users
##                    If the message is detected as spam, a warning is then
##                    displayed telling the user the word or phrase to remove,
##                    to reduce the # of URLs, and/or to reduce the # of
##                    characters in the message.
##   Affected files:  post.php
##                    edit.php
##                    lang/[Lang]/post.php
##       Affects DB:  Yes
##            Notes:  1) To configure the mod, go to the Administration section
##                       and click on 'BB Spam Fighter'.
##                    2) Under Options heading, choose the groups to apply the
##                       mod to.
##                    3) Enter values (optional) for users within this group.
##                    4) Under Forbidden words heading, add spam words and/or
##                       phrases.
##                    4) Be careful what words and/or phrases you block. For
##                       example, if you block 'foo', users can't post message
##                       containing 'foobar'.
##                    5) Spam words and/or phrases that should be blocked are
##                       cached in cache_spamwords.php in the cache folder.
##                       However this file is only created each time the Add
##                       button is clicked. When you upgrade PunBB to a newer
##                       version for example, all cache files are deleted,
##                       including cache_spamwords.php. Clicking on Add will
##                       regenerate the cache file even if no word or phrase is
##                       entered.
##       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.

Download here

good job Smartys - Sub Forum Mod updated to version

Updated to - fix by Smartys so that square to show new posts for logged in user now lights up when posts are made in sub forums.

Sub Forum Mod
                     Fixed by Smartys:
                      in version
                       - Square to show new posts for logged in user now lights up when posts are made in sub forums
                     Fixed in version
                       - Re-fixed topic and post counts & last post link due to invalid variable brought in from earlier version
                     Fixed by naitkris:
                      in version 1.0.9
                       - Sub forums now display in order of 'disp_position' on Index as set in Admin CP
                     Fixed by twohawks:
                      in version 1.0.8
                       - Option to set sub forums view for 'inline' or 'multi-line' listing on Index
                       - Option to hide the sub forums listed at top when viewing parent forum
                     Fixed by naitkris:
                      in version 1.0.8
                       - Added Index view from nico_somb's version and modified to work here (was seperate version before)
                     Fixed by binjured:
                      in version 1.0.7
                       - Optimised code on index.php so query isn't run for every forum processed
                     Fixed by naitkris:
                      in version 1.0.7
                       - Fixed "Moderated by" when viewing parent forum of multiple sub-forums with/without moderators
                      in version 1.0.6
                       - Fixed items in the quickjump so sub forums are indented (like fix in 1.0.4 by NeoTall for search)
                     Fixed by Timpa:
                      in version 1.0.5
                       - Correctly sorting subforums
                       - Now showing last post as it should
                     Fixed by NeoTall (Rus):
                      in version 1.0.4
                       - Fixed items in combobox "Select where to search"
                      in version 1.0.3
                       - Fixed search in SubForum when using "Non-MultiByted" language
                      in version 1.0.2
                       - Correctly displaying Last Post, Last Poster and Last Posted Time
                       - Correctly displaying Total Topics and Total Posts
                      in version 1.0.1
                       - Correctly creating Last Post link
                       - Correctly displaying word "Topics" on SubForum header

You will need to re-generate your quickjump cache after applying this mod for the quickjump to indent. The Clear Cache administration plugin can do this for you easily and is available from the PunBB Downloads page.

All credit to nico_somb for the Index view code as it is just taken from his version and modified a tiny bit to work with this one.

Sub Forum Mod is copyright of pabb.

Rod wrote:

stop with this false argument please : the JS = 23 ko ... not the end of the world. In this case, embed a youtube video is bad for people who have 28 kps connexion, isn't it ? is in fact 56KB uncompressed (ca. 21KB if compressed).

now, if you are calling 57.9KB or even 21KB "not the end of the world", well for someone on 56k, that is still 4 to 11 seconds just for the JS to load for this which is way too long. and remember PunBB is about being lighweight not heavy like phpBB, vBullettin etc!

requires loading tons of JS though, slows down forum for those on slower connections or some distance from the webserver.


(2 replies, posted in PunBB 1.2 show off)

nice integration!