Tips and advice for programmers and web developers
Here are two new plugins that you might like to try out.
First up is WP_DeliciousPost from my friend Damian
WP_DeliciousPost is a free WordPress plug-in that auto submits your post and pages to Delicious as you publish them.
Submitting your post to Delicious makes it easier for Delicious users to find under the appropriate tags, plus some blog advertising/ranking and valuation services count the number of Delicious entries into their scores so the more times you appear the better.
The second is from another blogging friend, Mark from Search-This Comment Info Tip
When you mouseover a commenter’s name you will see a tip appear displaying some information about that given commenter. 
Try them out and let me know what you think 
Bloggers like to give and win prizes. It offers some excitement for readers, content and links for the blogger, and if the prize is offered by a third party it gives them some exposure too. Darren does this a lot and to good effect, I do it very occasionally when I have something good to provide as a prize.
One question I get asked is how exactly do I select a random comment? You probably can make or find a plugin but I just use some simple SQL to read the WordPress database.
Most hosting providers offer a PHPMyAdmin tool so you can run the SQL through a simple web interface. All you need then is your post ID which can be found in your WordPress post editing screen. Hover over the Edit link for the post you want to select comments from and it will say in the status bar a URL ending in ‘post=’. The number that follows is what you need to note down.
In my example the post was numbered 356 so my query ends up as:
SELECT *
FROM `wp_comments`
WHERE `comment_post_ID` = 356
ORDER BY RAND()
LIMIT 3 ;
Rand does the job of making the results random. Limit says how many results you want, if you only have one winner then make it 1.
As I said, no doubt someone has made or will make a plugin, but being a geek I find this quite efficient enough!
I’m a little embarrassed to tell you that I have been using the phrase “New Media” without ever thinking about the definition very much. You see, “New Media” is one of those things you know when you find it, but when it comes to explaining to someone else we can stumble. Let me try now and see if you agree.
First let me describe what I believe New Media isn’t.
- It’s not just the internet or web - New Media could be a PDF, a multimedia CDROM, a DVD, a mobile application …
- It’s not just publishing, I would include applications and tools
- It’s not just something marketers ought to be interested in, New Media is valuable for education and socializing too.
The problem we have is the people who talk about New Media most tend to be marketers or people moving from traditional mass media so those are the areas with the richest discussion. Of course one of my main focuses is on New Media in business, but as I say above, some of the most innovative uses of New Media is in education.
It seems that while most of us can agree if one thing or another is New Media, we can’t always describe what it is about the thing that makes it New Media. There tends to be two things in common between New Media versus old media:
- Digital
- Interactive
Anything that is delivered digitally and can be interacted with (even pause/ffwd could be “interaction”) could be described as New Media.
Perhaps we really ought to call New Media “Digital Interactive Media”?
What do you think? How do you define it? Is the term pointless or does it still have meaning? I would live for you to share you thoughts … I could end up renaming this blog 
Recall I found out about an automatic commenter-thanking plugin I was very excited about?
It turns out that Dreamhost, my hosting company, were not quite as thrilled as I was.
Hello,
Please disable the plugin that is causing this query (otherwise I’ll have to disable your mysql table or user and I really don’t want to do that!):
# Query_time: 2 Lock_time: 0 Rows_sent: 0 Rows_examined: 2045519
use chrisgcom;
SELECT c.*, p.*
FROM wp_comments c
INNER JOIN wp_posts p ON p.ID = c.comment_post_ID
LEFT JOIN wp_cr_emailed e ON e.email = c.comment_author_email
WHERE e.email IS NULL AND c.comment_approved = ‘1′;
===
It’s not efficient enough to be running on a shared hosting server and is contributing to high loads and poor mysql performance. Here is my direct email address for confirmation (and if you have any questions):
jxxx@dreamhost.com
Thanks!
Jxxx
While the message could have been a little more helpful and friendly (would a complete technical novice have been able to work out which plugin was causing the problem?), it seems the upshot is the plugin is not coded well enough for heavily populated shared hosting to be able to cope with.
A real shame as I just heard about a great tweak to the code allowing you to send a personalised message while still getting an automatic notification.
Just goes to show that not all plugins can be used.
How to install and trial plugins safely:
- Check them out with friends and other users,
- Google for any known problems,
- Take a full backup of your blog and database
- Try the plugin for a while, monitoring for any problems,
- Contact the author to see if there is a known fix
- and always remember what order you installed them in so you can identify and remove trouble makers.
I would contact the author but I don’t want to risk Dreamhost yanking my account by trying it again.
Have you ever had plugins misbehave? What do you do? Does this sort of thing put you off trying new plugins? Let me know in the comments …
One of the most common issues with blogs that I critique is the WWW/No-WWW issue. That is where you can see the same content with both the WWW. in the URL and without. Doesn’t seem like much of a problem?
- There is a theory around SEO circles that having content available on both creates problems in search engines with either duplicate content or counting links or both.
- A growing movement is trying to remove the WWW. because it is unnecessary
- For usability concerns at the very least you want all versions to work and not throw up an error
While there are as many people who argue against this, I have 301 redirected my URLs one way or the other for a long time and found visible benefits, especially where links are concerned. The worst case scenario is where someone links to your site and the visitor gets access denied or a 404 page not found error.
Using a WordPress plugin, .htaccess, or in some cases your web hosting control panel, you can quite easily redirect from the URL you don’t use to the one you prefer. Obviously the No-WWW people would like you to redirect the WWW. version to the non-WWW version but as you can see on this particular blog, I do it the other way.
So now I have described the issue in brief … Do you WWW.?
Adam started a great thread over at the Authority Blogger Forum which I would like to open up over here; How many columns should a blog have, and why?
For myself, I switch between 2 and 3 columns. When I have advertising, such as at DSLRBlog, I have a third column to accommodate it. That said, my sidebar is getting very stuffed here on this blog so I am starting to consider a three column approach.
Rather than what we like, we have to focus on what your reader needs. As Lorelle says …
The single most important feature on your blog is the navigation. Today’s web visitor rarely enters through the front door of your blog. They come in through your posts. As important as the blog title, post title, content, and other contextual information is, if the visitor cannot move where they arrive to other places on your blog, how will they ever know of all the other wonderful things you have done here?
I also agree with Lorelle that the footer is a great additional place for navigation but shouldn’t be the only place those links are placed.
What are you going to do with the columns. Providing your content is legible and the most important navigation is above the fold, you have a lot of flexibility. As Bruce says in the thread, the type of blog matters ..
If it’s strictly opinion type blog then 2 columns, or even 1 would be fine.
Probably personal taste has as big an impact as anything in the choice.
How many columns do you like to see on a blog and why? Let me know in the comments or join in the forum discussion …
Tags: blog, design, usability
Every week I am asked how I put that download link in my RSS feed. Until to now I have had to explain that the solution requires a WordPress plugin that I hard coded. No longer!
Damian, my WordPress hacking friend, has kindly released the plugin complete with an options screen. Now anyone can do what I do with complete flexibility.
He should really have called it “What would Chris Garrett do” but I guess I shouldn’t push his kindness too far
Go over to Damian’s site for more information and the free download.
Update: Damian’s site is having issues but you can still get the plugin from WordPress
My friend Damian and I have just been moving DSLRBlog from Drupal 5 to WordPress 2 using instructions from D’Arcy Norman.
While Drupal is a fantastic platform, I had problems maintaining it. It was getting me down particularly fighting the torrent of spam being thrown at it. Keeping on top of updates, bug fixes, security patches, yada, was a pain. I am simply not interested in Drupal, whereas I do keep abreast of WordPress news.
The biggest problem we had was I didn’t want to lose rankings through the URL structure change. While WordPress can follow a very flexible URL pattern, the blog in question had changed a lot over the time it had been on Drupal and had a lot of strange URLs.
We fixed this using .htaccess to redirect the old to the new, like so:
Redirect 301 /blog/chris/old-url http://dslrblog.com/new-url
All I need to do now is add my favourite plugins, find a theme to tweak and we should be good to go
Gary has written a post about his “Group Writing Project” WordPress plugin that should be interesting to anyone involved in Wordpress hacking and plugin development. Most interesting is his description of a poorly documented Wordpress function, wp_insert_post() that ought to be very useful.
The most important thing about the plugin is the wp_insert_post() function that I use. This is used to create new posts in the blog, just by using code and by passing an array to it, containing the data necessary.
What have I been doing hacking MySQL code when I could just use this function? Thanks for the tip Gary and I hope you post more nuggets like this in future
Tags: wordpress, plugin, php, code, development, hacks, tips
Posted on June 19th, 2007 by Chris Garrett in Development
Comments Off
Send Friend
My good friend Damian has just released his first plugin and it’s a corker. It goes by the name WP_LinkIt and I think many bloggers will find it useful …
WP_LinkIt as a free simple Wordpress plugin to automatically convert text from your posts and pages into links from your blogroll. This makes it easy to add value your site but maximizing links to other sites and keeping them consistent throughout your site.
Now I can see several big uses I will find for this tool
- Without editing old posts I can link to my own articles with accurate anchor text (good SEO)
- For affiliate products I can just state the product name and have it always link to the correct affiliate, even if I change merchants - no more searching through and editing.
- Makes it easier to link to friends, for example I can add Darren to my bloroll links and always have the name link to ProBlogger
As soon as I am back from Norway I will be trying this out.
Great work Damian!
You can download the plugin for free and find instructions on his site.
Please add your feedback here in the comments or over at his blog, as he is new to this plugin writing business I am sure he will welcome any comments, good bad or ugly 