Archive for the ‘Web Apps’ Category

Flat File Based WordPress

Friday, January 4th, 2008
Posted in Web Apps · Tags: ,

I ran into this the other day while browsing Scripts.com, which is much better than Hotscripts, because they have filters for the scripts so you can view only free ones or high ranking ones. The only problem is that it does that using POST (no bookmarkable filters) and resets your filter on each page load.

Anyway, back to the flat file based WordPress, it’s called Dayfox. This should be lighter weight and faster than regular WP, but its still in beta.

In case your not sure what flat file based means, it means they use text files to hold the data, rather than a real database like MySQL.

PunBB and Managing Hacks

Saturday, December 15th, 2007
Posted in PunBB

PunBB rolled out an update awhile back and so if you did any of my hacks you might have updated the files then re-added the hacks. However, the easiest way to deal with hacks and mods or any other code changes you do for PunBB is to look at the hdiff file (here is an example of a recent hdiff 1.2.15 to 1.2.16. This tells you all the changes made and to what files, so you can make the adjustments. If there are not too many its easier to just to copy the code changes and paste them into the files and then run the update file that comes with the Changed files only download option.

Another thing I usually like to do is put in my comments near my hacks something like this:

/*modification - mod_or_hack_name */

Then I can search for a specific hack I made or all modifications.

phpBB recently released 3.0, so you might be wondering about PunBB 1.3. It’s been in development for a long time, but from what I can tell it still won’t support polls, private messaging or subforums. I can understand them not adding private messaging, but subforums and polls would be nice in the core. But if you are feeling a little envious of phpBB 3.0 you might look at some screenshots of PunBB 1.3 that were posted about a year ago. The nice thing about not having many updates, is that you don’t have to reapply your hacks too often.

PunBB’s dev site shows the planned features for 1.3

  • New markup and CSS.
  • Unicode (UTF-8) support.
  • Improved accessibility for both Public and Administration pages.
  • Administration interface gets language file support.
  • Search engine optimized “Fancy URLs” via mod rewrite.
  • Proper extension support - Extend the functionality without touching a line of PunBB’s PHP code.
  • New topic read marking system.
  • Improved syndication - Feeds extended to include individual topics. Also feeds in the form of Atom and XML format.
  • Support for Microformats - hCard and MicroID.
  • Post moderation queue.
  • Multiple moderator groups.
  • Board search improved with MySQL Full-Text Search.
  • Per-style templates - It will be possible to have one set of templates per style.

Useful Mods, Plugins and Hacks for PunBB

Monday, September 10th, 2007
Posted in PunBB

Logicfury - Lightweight CMS
Mega Pun - PunBB with lots of mods and plugins setup for you already
Link Directory - PunBB modified into a Link Directory
Easy BBCode - Add BBcode to your forums easily, the only mod the creator of PunBB has made (all the others are made by users or other developers) I recommend to modify it so that there are spaces around the smilies so they appear properly
BB Spam Fighter - nice mod, if you don’t feel like using the hacks I’ve shown on this site

reCAPTCHA Plugin for WordPress

Monday, August 27th, 2007
Posted in Web Apps · Tags:

The reCAPTCHA plugin for WordPress is very easy to install. All you have to do is register on their site, get your keys and download the plugin. Then you just upload it, put activate it and put in your keys in WordPress. The code seems to be maintained by Carnegie Mellon University. reCAPTCHA works with JavaScript enabled or disabled, has a audio reading option and is free.
reCAPTCHA for WordPress
If you already use Akismet, this will help reduce the amount of spam you will have to moderate.

You can also change the theme that it uses, in case the default red and yellow clashes with your site.

Inside recaptcha.php look for these lines

<script type='text/javascript'>
var RecaptchaOptions = { theme : 'red', tabindex : 5 };
</script>

The only theme I know that works for sure is ‘red’ and ‘white’, they don’t seem to have a black theme yet.

PunBB Spam Prevention Part 3

Wednesday, August 15th, 2007
Posted in PunBB · Tags: ,

Since the last time I’ve noticed a few little things spammers have been doing and some things I forgot to mention. So here is Part 3 on Spam Prevention for PunBB.

Prevent Guests from Seeing Profiles
Before the following line

// Load the profile.php/register.php language file

Add this

if ($pun_user['is_guest'])
message($lang_common['No permission']);

I’ve also gotten some people that register and put their spammy sites in their signature, but its easy to disable signatures. Just put multiple line comments around the following lines in viewtopic.php

// Do signature parsing/caching
if ($cur_post['signature'] != '' && $pun_user['show_sig'] != '0')
{
if (isset($signature_cache[$cur_post['poster_id']]))
$signature = $signature_cache[$cur_post['poster_id']];
else
{
$signature = parse_signature($cur_post['signature']);
$signature_cache[$cur_post['poster_id']] = $signature;
}
}

Now it should look like this. They can still enter links in their signature from their profile page but it won’t show up on any posts.

/*
// Do signature parsing/caching
if ($cur_post['signature'] != '' && $pun_user['show_sig'] != '0')
{
if (isset($signature_cache[$cur_post['poster_id']]))
$signature = $signature_cache[$cur_post['poster_id']];
else
{
$signature = parse_signature($cur_post['signature']);
$signature_cache[$cur_post['poster_id']] = $signature;
}
}
*/

There is another field in a person’s profile for them to put in a value for their web site, so you might prevent that from showing up as well. I just turn it off in Administration -> Options and under Display and User info in posts.

Show information about the poster under the username in topic view. The information affected is location, register date, post count and the contact links (e-mail and URL).

Want to use rel="nofollow" for links? Open up include\parser.php and modify the return line of the function handle_url_tag to look like this.

return '<a href="'.$full_url.'" rel="nofollow">'.$link.'</a>';//MODIFIED

I now prevent members from registering with URLs or @ in their member name. The only way PunBB could prevent this otherwise is to use the censor feature but that isn’t a good idea since the members that prove they are real will need to be allowed to post links later on.

Open lang\English\prof_reg.php and add the following near the top

'Username spam' => 'Usernames may not look like a URL or email address. Please choose another username.',/*MODIFIED*/

Now open up register.php and after the following lines

else if ((strpos($username, '[') !== false || strpos($username, ']') !== false) && strpos($username, '\'') !== false && strpos($username, '"') !== false)
message($lang_prof_reg['Username reserved chars']);

add

else if (strpos($username, 'http://') !== false || strpos($username, 'https://') !== false || strpos($username, 'www.') !== false || strpos($username, '.com') !== false || strpos($username, '@') !== false)/*MODIFIED*/
message($lang_prof_reg['Username spam']);

That should prevent anyone from registering a spammy username.