Archive for the ‘WordPress’ Category

Blog problems (once again)

Saturday, August 25th, 2007

As some of you may have noticed my blog has been decidedly offline for a week or so. Today I was sitting with the server and finally found the culprit. The problem is the with the Textile 2 (improved) plugin that I use (and usually love) on both my own site, as well as Susan’s and my mom’s.

I am still missing the plugin upgrade on my mom’s site (I can’t remember the admin password), but once I do it they should all work again.

Sorry for the downtime, but I have a few articles in the pipeline that should tidy you over within the weekend. I will also run with the default theme for wordpress until I make a new theme (which could take a while). I discovered how many plugins I was using in my theme and thought it was time to clean out.

Wordpress upgrade and Akismet

Sunday, June 25th, 2006

In my previous post I complained of all the comment spam I received. The deluge yesterday was the last straw and I upgrade wordpress today. Along with the upgrade I got a Wordpress API key and activated the Akismet plugin.

Several of my “online” friends have spoken well of Akismet, and funnily enough, the first comment since my Wordpress upgrade was a recommendation for Akismet. Although his comment came too late, I want to thank Eby for taking the time to write a few lines.

Along with my upgrade to Wordpress 2.0.3 I also moved my site from www.jonas.rabbe.com to jonas.rabbe.com along with the no-www plugin by PhotoMatt. No more WWW on my site.

I also moved Susan’s site from Movable Type to Wordpress. I still haven’t designed a theme for her, but I hope she’ll like Wordpress as much as I do. With her move came 143 comments, how many of those are comment spam I don’t know, at least Wordpress is easier for deleting comments than Movable Type 2.66. And as a final gesture I deleted the last traces of Movable Type from our web server.

Update: Now I’ve had Akismet running for about a week, and I have had no comment spam. Of course, I pretty much haven’t had any comments either. To tell you the truth, it’s a bit worrying. I’ve been used to getting several hundred comments spams over a weekend, and not even getting any in the Akismet spam queue is a little weird. I don’t know if it’s because I haven’t received any comments, or if they have just been deleted silently, correct me if I’m wronge, but I don’t think Akismet does that.

Oopsdate: I turned off the auto moderate plugin, but forgot to remove the function call from the theme. In that simple way I made it impossible for anyone to comment on my site explaining why I didn’t receive any at all. Thanks to Joen for spotting that.

Final update: Removing the function call did the trick, at least I’ve received plenty of comment spam since last night. And one even came through Akismet… tsk. tsk. tsk…

Comment spam, en masse

Sunday, June 25th, 2006

Comment spam has, unfortunately, been a part of blogging for me pretty much from the start. It was the reason I changed the wordpress with it’s easier comment administration interface.

Lately however, it has become extreme. Yesterday I received 541 pieces of comment spam! If that is not extreme I don’t know what is, especially for a site with maybe 100-200 unique hits a day, the majorite of whom are viewing one page.

The high number of comment spam has also highlighted another problem. I have all new comments (from people who haven’t commented before) go into the moderation queue where I then delete them before they turn up on my page. Loading a page with 515 comments (I had deleted some during the day yesterday) takes a looooooooong time. In fact it takes so long that the Textile 2 plugin I use for formatting my entries and comments times out… I actually have to turn off the plugin to delete all the comment spam.

I guess it’s about time I start thinking about upgrading Wordpress and looking into comment spam plugins.

Your Comments Plugin

Saturday, November 12th, 2005

One time on flickr I was looking at the “Photos you’ve commented on” feature, and thought, wouldn’t it be great if we had that on our blogs? Then we could follow the discussions we’re taken part in.

If you are not familiar with this feature, it’s a list of a number of photos you’ve commented on with newer responses shown too. I took a little screenshot for clarification purposes.

For each photo the title is shown – for example Worst ad ever! – along with the total number of comments and the number of comments since your latest. Unless you’re over the threshold the first comment shown is your own, followed by the newer comments.

My idea was to include it in the sidebar, but including the comment text as flickr does would be a little to extreme. I simply include the name of the author of the newer comments.

I’ve included a limit, if there are more new comments than this limit, only the newest within the limit are shown (with an elipsis in front). By default the limit is 6 comments. The limit on the number of posts to show comments from is 5 by default. These are the same default limits as Brian Meidell’s Latest Comments plugin. In general the resulting html has taken a page from Brian’s plugin. This plugin also incooperates the comment temperature feature as seen in Brian’s Latest Comments. The implementation of that feature is courtesy of Brian.

Plugin will be available shortly, just have to clean up a bit and document it.

*Update:* There is a bug in the plugin where the listing of the comments is borked. I thought I had the SQL figured out, but I guess I’ll have to revisit it. I’ve taken the link down until I’ve fixed it.

Update: Error has been fixed, get it here: Your Comments and place the extracted php file in the plugins folder of your wordpress blog.

(more…)

Super Archives Plugin for WordPress

Sunday, May 8th, 2005

Comments have been closed as the plugin has not been updated almost forever. I would refer people to the Extended Live Archive which is the Super Archives with extra features.

As I mentioned earlier I had problems with javascripts interfering with each other while loading. While I sorted out my problems with regards to the javascript, the reason why I was playing around with javascripts has already been leaked, and by none other than Michael Heilemann of Binary Bonsai. Since this is inspired by his ideas I guess it’s only fair.

Introduction overwith, I hereby give you: The Engineered Boulderer’s Super Archives Plugin to WordPress

For a demonstration, head over to Michael’s archives page, I am going to put it on my archives page, but it requires a minor redesign before I do.

IMPORTANT The javascript functions in my script have been tested, however, if there are other function set to run when the body loads, and they have problems then the super archive Will Not Run. The process of debugging javascripts is arduous work as they simply fail silently, because of this I do not have time to perform technical support on other people’s javascripts. That said, if Michael could get Super Archives to run on the B with the combination of javascripts he uses, then you can too.

I have included some documentation below, and in the plugin package.

Changelog

Version 1.6.2: Fixed a bug where draft posts in a month would make it show up in the list of months, thanks for the heads up Matthew. Requires a rebuild of the cache (edit a post or post a comment to rebuild).

Version 1.6.1: Fixed a regression which would prevent the php script from reading the settings and cache.

Introduced a more robust Javascript method of attaching events to the loading of the window.

Version 1.6: Fetches the character set from the blog to show international characters correctly.

New functionality for truncating post titles, see documentation below or with the plugin.

Version 1.5.2: Added a missing " in the description. Check the result from each use of document.getElementById() so as to not call null objects.

Version 1.5.1: Put a more stringent check on the FAT object for the Fade Anything Technique.

Version 1.5: Fixed bug where moderated comments were counted. Also, made sure cache was updated for new comments, and post deletions, and pingbacks, etc.

Updated cache structure so the cache can update (for example due to a new comment) while people are browsing the archives without requiring a reload (the plugin should automatically update your cache if you are using an old version).

Included new functionality, see the documentation included below or with the plugin.

Version 1.2: Implements support for Internet Explorer. Many thanks to Chris Boulton for his solution which worked wonders.

Version 1.1: Fixed a bug in the javascript (simple typo, oops).

System Requirements

  • Wordpress 1.5 or later
  • PHP 4.3.0 or later
(more…)

Word Count Plugin for WordPress

Friday, May 6th, 2005

Inspired by Chris’ discovery of odd behavior in the wp-word-count plugin I set out to create a version which would not be cheated by occurrences of the word “img” in an entry. I am a coder and web-developer myself and could see myself writing snippets of HTML in my posts.

The solution I found was to run the relevant filters on the content, after I get it back from the database. Using the function apply_filters I was left with a chunk of real HTML. I could strip the tags of this HTML to count the words, and search the HTML for occurences of the <img ... /> tag by searching for the string “<img”.

So there you have it: The Engineered Boulderer’s Word Count Plugin.

Changelog

Version 1.1: Does not count wordpress included smilies as images. Added an argument to allow the plugin to count smilies as images.

Version 1.2: Corrected a bug in the implementation of version 1.1

Documentation

The template function the plugin provides is teb_word_count(display) which accepts two arguments.

display
(boolean) sets whether the function should display the number of words and images, or if it should return them.

  • true (default)
  • false

count_smilies
(boolean) set whether smilies should be counted as images. If false, the plugin will simply disregard smilies (neither count them as text, nor images).

  • true
  • false (default)

Disclaimer: This plugin has been tested to work on my test blog and here, but it could break in real life. If you see any problems with my implementation be sure to let me know.

Live Comment Preview

Thursday, May 5th, 2005

I have now implemented live comment preview on the comment form. The preview is the same (Real) Live Textile Preview as seen on Binary Bonsai and described in one of Joen’s amazing articles.

The (Real) Live Textile Preview is not a plugin such as several of the other preview solutions, rather it is a number of javascripts and php scripts. The javascripts attach a function to the “key pressed” event of the comment field. Every time a key is pressed the text is passed to the php scripts through the magic of XMLHttpRequest (or AJAX) and returned as HTML. This returned batch of HTML is then shown to the user in the preview box.

This solution is a little more complex that the pure javascript or even simpler WordPress plugins. However, it has the clear advantage of being correct Textile. One simple example is links, if you write a link as the last part of a sentence, the period will in the javascript solutions be counted as part of the link, the (Real) Live Textile Preview shows this correctly. Having used Textile since I started using MovableType, this is a big plus for me.

As Joen pointed out, however, there are also disadvantages to this solution. Each keypress has the potential of sending a request to you server, if many people write comments at the same time, this can become a real burden. To be realistic though, the number of comments I receive are very small and the added load to the server will probably only serve to get it a bit more in shape.

I’ll run with it as is for now, try out my comments and tell me what you think.