| Author |
Message |
Mark
|
Posted: February 19, 2007 10:02 AM |
|
|
Blog Janitor is a plugin for Movable Type that preforms various clean-up tasks. In version 1.0, Blog Janitor can perform the following tasks:
- Close comments on old entries.
- Delete duplicate comments and trackbacks
Blog Janitor does his work automatically, you don't need to edit your templates. Just tell Blog Janitor the tasks you want him to perform (by adjusting the plugin settings), and he will go to work periodically (using the scheduled tasks feature of MT 3.3+).
Here are some details on his current skills:
Close Comments and Trackbacks on Old Entries
One technique for reducing blog spam is to close comments (disable commenting) and trackbacks on entries that are older than a certain number of days. This can be a tedious process to do manually, if you remember to do it. Blog Janitor can take care of this job for you. Simply enable Close Comments in the plugin settings for a blog, and tell Blog Janitor the number of days he should wait before closing comments on an entry. That's all you have to do, Blog Janitor will routinely check for old entries and close comments on them for you.
Delete Duplicate Comments and Trackbacks
Duplicate comments and trackbacks can happen in a number of ways. For example, a commenter may hit the submit button twice, thinking that the comment did not get posted the first time. Another common occurence is duplicate junk comments and trackbacks -- since spammer often post identical spam messages, your Junk folders may be full of duplicates. Blog Janitor is skilled a scanning your recent comments and trackbacks for duplicates. If you give him the order (by enabling duplicate checking in plugin Settings), he look for recent duplicates and delete them. Just tell him how many recent items to scan, and he will go to work every hour looking for recent duplicates. (Note: there is no "undo" when Blog Janitor deletes items, but he does leave a message in the Activity Log notifying you of which items he has deleted).
Settings
The Settings is where you give Blog Janitor his orders. Go to the blog you want, then choose Settings, then the Plugins tab, and then click on Setting for Blog Janitor. The settings look like this:

Requirements
Instructions
- Download the zip file and expand it.
- Upload the contents of the 'plugins' directory in to the 'plugins' directory of you MT installation (usually /cgi-bin/mt/plugins/)
- Adjust the settings as described above
Notes:
- If you have a large number if entries in your blog, Blog Janitor will not close comments on every old entry the first time he goes to work. He gets tired if he tries to close comments on too many entries at a time, and his union contract states that he doesn't have to close comments on more than 100 entries each hour. (Okay, the real reason is to save your MT from excess load that might slow things down) Since Blog Janitor works on up to 100 entries each hour, it may take some time before he gets 'caught up'. For example, if you have 2400 entries on your blog, it will take about 24 hours for Blog Janitor to go through all the old entries and close comments and trackbacks.
- Blog Janitor punches his time clock when he starts and finishes a task. For each task, he posts a message to the Activity Log that explains what task was completed, and how many seconds it took him to complete. If you are concerned about system load, keep an eye on the Log to see how hard he is working.
Get Blog Janitor
Blog Janitor is free for personal use:
(Blog Janitor for Personal Use)
Downloads: 171
Commercial Use: $97
If you buy a commercial license, you will get priority for future features, and an advanced version of Blog Janitor that enables you to give Blog Janitor orders on a system-wide basis (so you can adjust the settings in once place for all blogs on the system).
As always, comments and suggestions are welcome - please reply to this entry.
|
|
 |
TJ
Posts: 1
Reply: 1
|
Posted: February 27, 2007 2:34 PM |
|
|
Nice to see a great idea revisited for MT 3+ users. I have BlogJanitor installed but have not noticed any entries in the activity log for closing comments. Is there a way to verify Blog Janitor is working correctly? |
|
 |
Gary
Posts: 5
Reply: 2
|
Posted: March 2, 2007 11:23 PM |
|
|
I like the plugin, but have a feature request: would it be possible to have an exempt feature for specific entries? I'm using an entry as my contact form versus formmail or email link (both of which, no matter how secure a formmail script i've used I get harvested). Thinking the comment feature is a safer (x email spam) way for a contact feature, but Blog Janitor will at some point keep closing that entry. |
|
 |
Mark Carey
Posts: 150
Reply: 3
|
Posted: March 3, 2007 7:11 AM |
|
|
Interesting suggestion, Gary. I will have that some thought, as implementing that might be tricky.
FYI, another option for a contact form is my Entry Post plugin. In additon to letting visitors post entries, you can also configure it as a contact form, and it works great. It never publishes email address. See example here. |
|
 |
Gary
Posts: 5
Reply: 4
|
Posted: March 17, 2007 1:45 AM |
|
|
Thanks, Mark. Entry Post plugin looks like it would work well for the contact form idea + have other value.
I looked through the description and the only question I have is whether the notification email is buried in the form via a hidden input field, of it's somewhere off-page in the scripts. ? |
|
 |
Mark Carey
Posts: 150
Reply: 5
|
Posted: March 17, 2007 4:46 PM |
|
|
Gary,
The notification email is never hidden in the form -- never "on-page". You can set a notification email address in the plugin settings, OR specify an author_id in a hidden form field, and the email will get sent to the email address of that author (as set in their MT user profile). The latter option is useful for multi-author blogs, and you want visitors to contact a specific author. |
|
 |
Kelly
Posts: 4
Reply: 6
|
Posted: April 8, 2007 2:24 AM |
|
|
Mark, this is a great plugin! I'm just starting to use it and have run into an issue. The following error comes up about 10 times in each of my 15-minutely cron logs.
Use of uninitialized value in string eq at (path to MT)/plugins/BlogJanitor/BlogJanitor.pl line 82.
Any idea what could be causing this? My activity log says that BJ is checking duplicates just fine, but the duplicate check/deletion times correspond closely to the times of my cron outputs.
Also, BJ has left many of my old entries' comments and trackbacks open even though I've set it to close them 45 days after publication. Is there any way for me to force BJ to close comments, or to otherwise check that it's doing this appropriately/correctly?
Many thanks for your great work on this essential plugin. |
|
 |
Kelly
Posts: 4
Reply: 7
|
Posted: April 8, 2007 2:26 AM |
|
|
Forgot to add - I only have 200 entries on my blog, so I don't think that the janitor is getting tired from closing so many entries at once.
Thanks!!! |
|
 |
Mark Carey
Posts: 44
Reply: 8
|
Posted: April 10, 2007 7:53 AM |
|
|
Hi Kelly,
Regarding the first issee (uninitialized value), that sounds like a warning, and not an error. Meaning, its probably still working as desired. That said, I would like to avoid such warnings. Question: how many trackbacks do you have in the blog(s) in question?
Regarding comments are trackbacks not be closed on "some" of your older entries, that does seem odd. Is there any pattern to what gets closed at what doesn't? For example, are they in a certain date-range, or does it seem random? I tried about 25 entries from your site, from 2003, 2004, and 2005, and the comments are closed on all of them. |
|
 |
Kelly
Posts: 4
Reply: 9
|
Posted: April 15, 2007 8:52 PM |
|
|
Hi Mark - thanks for your response; sorry to be tardy in my reply.
It now seems like the closure of comments and trackbacks on old entries is working as planned - I tried numerous entries from as recently as February 2007 and they're closed. Yay! I initially thought they weren't closing because I kept getting trackback spam on 2006 entries which should have been closed.
The site has 5 valid trackbacks. I last received trackback spam (which wasn't deleted by BJ as it wasn't a duplicate) on an entry from 2005 which says that it is still accepting comments and trackbacks, sigh. Maybe I was incorrect in my above assumption that all old entries have been closed.
My activity log says that BJ is doing lots of duplicate checking, and deleting a fair amount of my trackback spam, but I have not seen it close comments or trackbacks since it was first installed. Even disabling and re-enabling the comment & TB closure feature didn't cause it to go out and close the old stuff like that entry above.
What else can I do to help you figure out this cron-generated warning? The cron reports are still coming regularly, all with the same warning about the string eq. |
|
 |
Mark Carey
Posts: 44
Reply: 10
|
Posted: April 16, 2007 12:10 PM |
|
|
Hi Kelly,
I should have been more specific in my first question: how many trackbacks do you have total, including junk trackbacks?
I just sent a test trackback to the entry you linked -- did it go through?
I have another question: prior to using Blog Janitor, did you manually turn off comments on any entries? If so, is there any chance that you might have turned off comments but left trackbacks enabled for some/all of those cases? If so, you may have run into a rare exception in the way Blog Janitor works. When Blog Janitor looks for entries to close, he only looks at entries that have comments enabled. As such, if there are any entries that already have closed comments but enabled trackbacks (a rare case, but possible), then trackbacks on those entries wouldn't get closed. |
|
 |
Kelly
Posts: 4
Reply: 11
|
Posted: April 16, 2007 4:20 PM |
|
|
Hi Mark,
At the moment I have 5 valid, 1 unpublished (yours from earlier today), and 47 junk trackbacks. I cleared the junk out a couple of weeks ago before installing Blog Janitor.
I think my older-entry-open-trackback problem does partially come from having comments already closed but Trackbacks left open. I've tried in the past to use the MT-close "plugin" to close comments and trackbacks en masse manually. However my MT says that the entry in question (link in my last response) has both comments and trackbacks open even though I don't see a comment box on the entry's page. Puzzling.
The warning in my cron logs is (hopefully!) a separate issue; can we do anything about that?
Many thanks for your time! |
|
 |
Andy
Posts: 1
Reply: 12
|
Posted: May 30, 2007 2:22 PM |
|
|
I'm on a windows server so I can't do cron jobs - is there a way that I could start it manually every once in a while? |
|
 |
Mark Carey
Posts: 150
Reply: 13
|
Posted: May 31, 2007 1:01 PM |
|
|
Andy, you don't need cron jobs to use this plugin.
Blog Janitor gets triggers with Movable Type's "scheduled tasks". A cron job is one way to trigger scheduled tasks, but there are two others:
1) When your MT received a JUNK comment or trackback, it will trigger scheduled task automatically.
2) When an "Activity Feed" is requested,it will trigger scheduled task automatically.
The second option can be used to manually activate Blog Janitor. For example, if you are on the "Comments" screen in MT, click on the "Comments Feed" link near the top right. This will display an "activity feed", and behind the scenes, Blog Janitor will get to work. However if you get JUNK comments regularly, you won't even need to trigger things manually. |
|
 |
JeffPff
Posts: no
Reply: 14
|
Posted: August 10, 2007 11:15 AM |
|
|
Very useful program. But for some reason blog janitor stopped closing comments after ~12 hrs, and I noticed only those entries which were created this year have comments closed. All entries as old as 4 years prior still have comments enabled.
I upgraded to movabletype 3.34(i think) at the start of this year. Is it possible blog janitor simply doesn't target entries created in older movable type versions? |
|
 |
 |