Ryan Brotherton | Web Development and more.

Archive for May 2009

May/09

26

PHPBB3: Delete spam users and posts

One particular forum that I administrate recently had a problem with an influx of spam users and posts.  We needed a solution but until I could come up with one we needed a quick way to get rid of the trash they were posting on our public forums, so I wrote this script.  

The script accepts a username as input, and it will remove every trace of that user from the PHPBB database.  It deletes their username, bans their username and IP Address, removes any posts and/or topics created by them, and corrects the ‘last post by’ on each forum by removing them.

Feel free to use this script if you like, but be aware it’s very dangerous as it’s directly editing the PHPBB3 database tables.  The only configuration you need to supply is the database name, hostname, and auth credentials.  The script also assumes you used the default table prefix (phpbb_) when installing.

Code: http://ryanbrotherton.pastebin.com/f2dd5c4a3

No tags

May/09

26

JavaScript: Image Carousel

One day I found myself in need of an image carousel, but instead of grabbing a pre-made script I decided to write my own.  Why re-invent the wheel you ask?  Because I like to learn and I love JavaScript, I don’t get to write custom JavaScript nearly enough.  Also, to better understand how this particular wheel works.  I want to re-write this eventually  to remove the dependency on Scriptaculous.

I shouldn’t have to say this but if you want to use it, you’re free to use it for any purpose.

Dependencies: Scriptaculous – For the fading effect.

Code: http://ryanbrotherton.pastebin.com/f1cc2203c

No tags

Theme Design by devolux.nh2.me