Friday, November 18 2005 @ 09:40 AM EST
Contributed by: tomw
Views: 3,158
I recently tried to view the log file on a site that gets a lot of comment spam and the log file viewer bombed. I looked at the log file and saw that it was 7MB in size. So I modified the Log viewer to check the size of the log file and resize it to 100Kb (the size is configurable) so it could be viewed. I have included the file below if you are interested.
Wednesday, November 09 2005 @ 02:57 PM EST
Contributed by: tomw
Views: 3,649
After looking at whats needed for making What's Related editable, I decided to not make a plugin and instead just hack the core files. It ended up with only two small changes to the core files and a new file to edit the what's related entries.
What the changes do is add a link to the What's Related block for story editors entitled "Edit What's Related". The change for this is added to article.php.
Edit the story editor so that if the related block has something in it, then nothing is changed. If its empty then it is filled normally. This requires one addition/change to story.php.
Created a new admin file called related.php which is the editor for the What's Related entries.
The only change in functionality is that once the what's related links are created they are not refreshed on an edit.
Here is what I have done for those who are interested:
I created a little Spam-X action module that adds the IP of spammers to the Ban Plugin list thus blocking them from the site.
To use it just copy the code below and save it to a file called Ban.Action.class.php in your spam-x directory. Then add 256 to the Spam-x action variable.
This is aimed at those spammers who like to post hundreds of spams. The first will get caught and the rest of the attempts will result in a blank page.
Wednesday, January 12 2005 @ 03:05 PM EST
Contributed by: tomw
Views: 3,820
I found on some sites, no matter what I did the calendar was crawled by some search engines. I solved this problem by replacing the calendar.php in the standard geeklog install with this: