Programming and general geekiness.

Posts tagged ‘wordpress’

New Theme

After having used the WordPress Freshy theme for about eight months I’ve made the decision to change to the Spectrum theme. Here’s what my blog used to look like:

And here is what it now looks like:

How to blog nicely

Somebody I know of (I say of because I know who they are and I’ve problem met them once or twice) has set up a blog and then spammed everyone they know with links to it. They seem to do ten or more blog posts a day and they are bragging about having over 3000 hits (hits, not unique visitors).  Most of the blog posts are relatively bad quality and seem to be about a load of rubbish.

A lot of people don’t really think about what they type when they are blogging. Some people use blogs a little like Twitter and just type into their keyboard. This is not how blog posts should be written. Blogging is a finer art than tweeting because you have significantly more space to work with. A blog post should be detailed, concise and maintain perfect spelling and grammar throughout. It really amazes me how few people will actually read through their blog posts before posting.

Having a bad name for a blog with bad blog post names isn’t great either. Blog names should be easy to remember. I like to think that ‘Thomas’ Interesting Blog’ and ‘Programming Thomas’ are both incredibly easy to remember because they both have my name in them and you can’t really have many variations on them.

Naming blog posts badly is really irritating. In the printed media having a snappy title is important because it will encourage people to read the article but on blogs it is important to name your article with exactly what is in it. Having a pun generally doesn’t work because it will confuse your audience, but more importantly it will confuse Google because Google’s search bots won’t be able to identify the content as easily.

I don’t like the new WordPress menu

WordPress is an absolutely fantastic blogging platform and it makes it incredibly easy to write new blog posts. They’ve recently added some new features that allow bloggers to drag and drop files from their computer to make it easier to insert media into posts. They’ve also changed the menu on the left hand side and completely messed it up.

Yesterday I was able to have the Dashboard and Post menus open at the same time so I could quickly switch between New Post and Site Stats. This is probably something that a lot of WordPress users do but the new menu only allows for one open at a time, but you now hover over the main menu to see its sub menu. Which I find irritating.

Leave your thoughts in the comments if you are a WordPress blogger.

Like a boss

And this is my 226th.

Stats

I’ve just realized October has been my awesomest month by 25% so far on this blog.

Post to a WordPress blog from PHP

I have spent most of the afternoon trying to work out how you can post to WordPress blogs from PHP (because I want to include the option in the next version of DumbCMS), and I finally managed to mix and match a few other functions to get it working. This could probably be a lot more streamlined, but it works, so I’m happy:

function wordpress($title,$body,$url,$username,$password,$category,$tags='',$encoding='UTF-8') {
    $title = htmlentities($title,ENT_NOQUOTES,$encoding);
    $keywords = htmlentities($keywords,ENT_NOQUOTES,$encoding);

    $content = array(
        'title'=>$title,
        'description'=>$body,
        'mt_allow_comments'=>0,  // 1 to allow comments
        'mt_allow_pings'=>0,  // 1 to allow trackbacks
        'post_type'=>'post',
        'mt_keywords'=>$tags,
        'categories'=>array($category)
    );
    $params = array(0,$username,$password,$content,true);
    $request = xmlrpc_encode_request('metaWeblog.newPost',$params);

	$paramsToSend = array('http' => array('method' => 'POST', 'content' => $request));
	$ctx = stream_context_create($paramsToSend);
	$fp = @fopen($url . "xmlrpc.php", 'rb', false, $ctx);
	if (!$fp) throw new Exception("Problem with $url, $php_errormsg");
	$response = @stream_get_contents($fp);
	if ($response === false) throw new Exception("Problem reading data from $url, $php_errormsg");
}

I’ve designed this so that you can call it as follows:

wordpress("Title of post", "Content of post", "Full URL of blog", "username", "password", "Categories", "Tags");

This all works really well, provided you supply information correctly. You’ll need to separate categories and tags with commas. Please leave comments below if you have any problems.

WordPress Stats in the week of September 26th, 2010

I was just browsing WordPress.com global stats and found this rather interesting graph showing the number of posts per week:

It basically shows that there were around seven million more posts than usual in a week. This definitely seemed unusual. When I looked back on that week on Wikipedia I couldn’t find any major news events that would have created such a big surge in posts. It simply didn’t make sense. So then I did a Google News search for ‘wordpress’ of the week of September 26th 2010, and it turns out that during that week Microsoft killed its Live Spaces blogging platform, and forced all its users to go to WordPress.com instead. That explains the sudden surge in posts.

WordPress stats

A lot of viewers of my blog will probably not realize how much information it collects about them. Everyday I am able to find out what searches got people to my blog, which websites people got to it from (generally Google+, some spam one and YouTube) and which websites they go onto afterwards. I can also see daily views and other fascinating breakdowns – it can be especially useful to see which posts are successful (as a result of this there is definitely going to be another Cleverbot talking to Cleverbot, or maybe another bot, post), but from all the statistics the search terms are the most hilarious. Here are my favorites:

  • Push Amy but only when she tells you to
  • Apple store down
  • ajcuivd289
  • Jedi Jim Apprentive
  • Put Hitler in the Cupboard
  • Chuck Norris
Or at least those are my favorites from the rather dull list of a few hundred…

Why I switched from Blogger to WordPress

Around six months ago I permanently moved from Blogger* to WordPress. I think I had something like thomaslittleblog.blogspot.com (it matched my channel at the time). I had many reasons for the switch, mostly because I was interested in using a new tool, but also because I had heard more praise for WordPress. Here is a comparison of the two:

Where WordPress is best

  • UI - WordPress definitely has a far nice design to the administrator section and comes with much nicer templates by default. The Dashboard takes up the full width of my screen (on any resolution) and the editor is fantastic, offering a ‘Full Screen UI’, which allows me to write without distraction – providing Gmail, Google Reader or Google+ aren’t flashing at me!
  • Editor - In some ways the Blogger editor is probably a little better as it is more centered towards HTML and the Blogger platform, however the WordPress editor is a lot easier to use and allows for far more complex blog posts.
  • Graphs - WordPress has an absolutely fantastic graphing system for statistics, but it isn’t as complex as Blogger’s
  • Getting people to my blog - For some peculiar reason results for WordPress.com blogs tend to appear higher in search results, and so more people actually go on my blog. Despite the fact the quality of my writing has improved, WordPress seems to be better at getting people there – the Global Tags feature probably also helps. Having said this, WordPress won’t do it all for you and you do need to use social networks and good writing skills too. One of the main reasons people ever got to my Blogger blog was through the ‘Next Blog’ (which took them to a random blog) button.

Where Blogger is best

  • Statistical Logging - Whilst WordPress kindly logs almost everything, Blogger does log everything – and I mean everything. It has a Stats system that it is probably based off of Google Analytics. I can see hour by hour reports of people coming to my blog (compared to day by day with WordPress), which can be hugely useful sometimes.
  • Ease of use - Blogger probably makes it easier to set up and manage a blog, but I don’t like the UI as much. The main reason it is so easy is probably because it links in quite well with users’ Google Accounts, so it is simple for Gmail users to quickly make a blog.
Both are, of course, very good blogging platforms, but I prefer WordPress, which is probably why you are on WordPress.com and not anywhere else.
*Yes, I do know that it’s proper name is Blogspot, but I’ve always gone to blogger.com, so that is the one of the grown to know.
Follow

Get every new post delivered to your Inbox.