Okay here's a working Badbehavior module for Drupal 6.x (using the current bad-behavior 2.0.13) based completely on the work done by Eaton and luperry upgrading the 4.7 version to 5.x (so thank them, not me - this port was easy!)
Don't bother trying to upgrade from the previous version, I didn't bother writing any upgrade code - I mean, why bother? The logs are of no interest particularly and that's all you'd be upgrading... Just start from scratch again.
...Install instructions are the same as usual, download Bad Behavior and unzip it. Then move the bad-behavior folder from the unzipped folder ('Bad-Behavior' if memory serves me correct) into the module/badbehavior folder so you end up with;
modules/badbehavior;
LICENSE.txt
README.txt
bad-behavior/ (folder)
badbehavior.info
badbehavior.install
badbehavior.module
modules/badbehavior/bad-behavior;
admin.inc.php
banned.inc.php
...etc...
...all the rest of the bad behavior files...
Pobster
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | badbehavior.zip | 3.8 KB | pobster |
| #2 | badbehavior_1.zip | 3.59 KB | pobster |
| badbehavior.zip | 3.27 KB | pobster |
Comments
Comment #1
pobster commentededit: Use the release below instead. No sense in filling up this thread with old releases...
Pobster
Comment #2
pobster commentedAlso... If you're particularly bothered about uninstall hooks removing entries from your variable table, change the uninstall hook in badbehavior.install to;
Apologies, didn't think to put it in the code before... Not that it really matters I guess! Just for neatness!
Pobster
PS. I've also included a nice hook_requirements to check that badbehavior/bad-behavior actually exists and that it contains at least core.inc.php and version.inc.php and removed the watchdog error message from hook_init (as the requirements hook negates it) and finally, I've removed the unnecessary admin/modules#description from hook_help.
Comment #3
pobster commentedOkay I changed the code from hook_init to hook_boot, so now badbahavior is called on *every* page request regardless of whether it's cached or not. Sorry didn't think about doing this before as I don't use page caching myself...
Tested and working...
Pobster
Comment #4
wilco commentedI'll review this module and then roll a release into the CVS.
Comment #5
wilco commentedI've gone through it and created a RC for this patch.
Closing this ticket.
Comment #6
pobster commentedAh my bad, forgot about this http://drupal.org/node/140311
Sorry!
Pobster
PS. Thanks for the credit in the README! ;o)
Comment #7
wilco commentedHey Pobster,
Glad to give props to our peeps!
I'm reviewing the code you posted versus what exists in the module. Am I missing something, I can't seem to see any difference between them. Can you help shed some light on this?
-wilco
Comment #8
wilco commentedComment #9
pobster commentedHiya!
In Drupal 6.x the t() calls are unnecessary in title and description for hook_menu items. The items are automatically passed through t() now - that was the only change though! :o)
Thanks,
Pobster
Comment #10
wilco commentedWow! Can't believe I missed that one. Good one.
Thanks.
-wil
Comment #11
wilco commentedRolled up a new release.
Enjoy.
This ticket is now closed.