Technology Tales

Adventures in consumer and enterprise technology

TOPIC: WORDPRESS

Tidying dynamic URL’s

15th June 2007

A few years back, I came across a very nice article discussing how you would make a dynamic URL more palatable to a search engine, and I made good use of its content for my online photo gallery. The premise was that URL's that look like that below are no help to search engines indexing a website. Though this is received wisdom in some quarters, it doesn't seem to have done much to stall the rise of WordPress as a blogging platform.

http://www.mywebsite.com/serversidescript.php?id=394

That said, WordPress does offer a friendlier URL display option too, which you can see in use on this blog; they look a little like the example URL that you see below, and the approach is equally valid for both Perl and PHP. Since I have been using the same approach for the Perl scripts powering my online phone gallery, now want to apply the same thinking to a gallery written in PHP:

http://www.mywebsite.com/serversidescript.pl/id/394

The way that both expressions work is that a web server will chop pieces from a URL until it reaches a physical file. For a query URL, the extra information after the question mark is retained in its QUERY_STRING variable, while extraneous directory path information is passed in the variable PATH_INFO. For both Perl and PHP, these are extracted from the entries in an array; for Perl, this array is called is $ENV and $_SERVER is the PHP equivalent. Thus, $ENV{QUERY_STRING} and $_SERVER{'QUERY_STRING'} traps what comes after the ? while $ENV{PATH_INFO} and $_SERVER{'PATH_INFO'} picks up the extra information following the file name (/id/394/ in the example). From there on, the usual rules apply regarding cleaning of any input but changing from one to another should be too arduous.

A penchant for strange decisions?

14th June 2007

WordPress.com has retired its Feed Stats feature. While there might have been problems with it for some, I do find it a strange decision not to spend some time on it. After all, given the existence of Google Reader and its kind, I wouldn't be surprised to learn that more people read blogs with RSS readers than by going to the sites themselves. In fact, I peruse blogs more often with Google Reader than by visiting the websites themselves. It's enough to make me wonder if I could use Feedburner with this blog.

To follow on from this, I am beginning to wonder if that Automattic, the people behind WordPress.com, seems to be a quirky company that makes decisions that are questioned by its customers. After all, they did remove the post preview functionality from blog post editing screens, and that has generated numerous comments. On self-hosted WordPress, you can add a plug-in to correct this, but that option is not open to WordPress.com users. The answer that I got to a theme change request earlier this year adds to the impression, as does seeing a company having staff apparently work from home all over the world.

Automattic seems an unconventional beast alright; could that lead to their undoing? Though it is king of the hill with blogging world for now, there is nothing to say that will last forever.

Google Analytics

25th May 2007

Furthering my excursions into things related to Google, I have been giving Google Analytics a whirl for my hillwalking and photo gallery website. Aside from the fact that it is updated once a day, it could have enabled me to eject WordPress plug-ins like Popularity Contest and FireStats getting the chop. As it happens, I also have a Google Analytics plugin installed, but a little editing of the blog template that I have developed would get rid of that too.

That’s enough about WordPress plug-ins; let’s return to Google Analytics. It has all the usual stuff: who’s visiting, from where are they coming, what are they using to see your site, etc. In addition, it captures if they are coming back, how long they are staying on the site and how deep they are going. Bounce rate is another term that features heavily: it is when a user only goes to one page and then leaves. With a blog, this unfortunately seems to come out as a high figure and that is ironic given that the blog was meant to promote the online photo gallery; it has very much taken on a life all of its own. There’s more to the information from Google Analytics, and it’s all useful stuff, of which I plan to make good use to improve how my site works.

Going overboard on blog plug-ins and widgets?

24th May 2007

This whole Web 2.0 thing is producing an embarrassment of riches for those wanting to share their thoughts on the web without having to go to the effort of developing their own websites from scratch. A decade ago, Geocities was pioneering the idea of web communities but, without the infrastructure and tools that we enjoy today, it and its kind were ahead of their time.

In these blogging days, life is a lot simpler, which means that temptations exist. Temptations like those caused by garish animated GIF’s in the late nineties, a lame attempt to spice up otherwise dull websites. Returning to the present, it is plug-ins and widgets that could convey the excess.

With WordPress, the plug-ins are more “behind-the-scenes” sorts of affairs, but it is so easy to accumulate several for stopping comment spam and keeping an eye on web traffic, to name just two applications, and so on that you need to be careful that a bag of nails does not result. In fact, I am now considering the rationalisation of what I have got while the number remains in single figures.

WordPress 2.2 adds widgets to the list of temptations; while WordPress.com already has these, the number is small, and you can be sure that that will explode now that self-hosted WordPress blogs get the functionality. The trouble with these widgets is that you need to be adept with CSS so as not to end up with an eyesore akin to those seen a decade ago, though theme authors can help with this. I am not activating widgets on my hillwalking blog because I have many other (better?) things to be doing.

Another thought on widgets: the tag cloud widget previously held in captivity at WordPress.com surely must now find itself in the wild, a worrying prospect given how rubbish they can appear. However, Jakob Nielsen et al. shouldn’t get too concerned, as trends that go too far scar the memory and preclude their return. Just consider those animated GIF’s…

What are we like?

22nd May 2007

Over the history of the internet, I have seen halcyon online dreams turn sour, with the world of Web 2.0 suffering the same lurch. It was only in the mid-nineties that the web was considered a levelling platform and a place for interaction and sharing. It also was a lot safer than it is today, an ironic observation given how e-commerce has taken off until you realise the financial gain from scams like phishing. Human nature does have a habit of spoiling things and the result is the number of patches that Windows has needed over the years, that and the expansion of security software from being all about antivirus packages to the inclusion of anti-spam, anti-spyware and firewall applications.

You would think that the above would have all but killed off the optimism that abounded in the late nineties, only for it to resurface again with the explosion of the blogosphere and, of course, there is Second Life. But there are signs of slippage even in this brave new world: comment spam has become a scourge for blogs, though the likes of Akismet and the WordPress Bad Behaviour plug-in see off most of it for me.

Then, there remains flaming on web forums. In fact, what has prompted this post is my observation of the transformation of a friendly forum thread into a hostile exchange. It started out as a communication regarding the welfare of someone who needed to retire from the annual Rab TGO Challenge with a high fever. Everything was going well until someone poked a hole in another poster's grammar, yet it was the mention of fitness that really turned things sour, especially when someone’s admission of a 20-a-day smoking habit drew the ire from a fitness fanatic. While it was all unnecessary, it shows how people can mess up with technology: to realise those optimistic dreams that I mentioned earlier, we have to change to make it happen. For now, I suppose that we’ll have to live in hope…

WordPress 2.2

17th May 2007

WordPress 2.2 made its debut yesterday and, after a spot of cautious testing, I upgraded my hillwalking blog to use it. The reason for the testing was that self-hosted WordPress blogs can now have what WordPress.com blogs have had for a while: built-in widget capability. It was this that upped my level of caution, but the changes weren't as drastic as I had feared: you need to amend your theme for widgets to be supported, and not having done this causes no untoward effects. Making themes widget compatible is something that Automattic describe in a helpful article on their website. Other than this, WordPress 2.2 doesn't cause much upheaval and, apart from pieces of JavaScript snagging on occasions in Firefox, all seems well. I am still sitting on the fence as regards those widgets, though...

WordPress.com and user registration

1st May 2007

While I don’t know whether it’s me or not, I seem to remember there being a Register link on the Meta widget that you see here. Anyway, its absence prompted me to go doing a spot of fiddling to (re)introduce it. My motivation for doing this is my preference for allowing only registered users to post comments so that I don’t encounter too much comment spam.

Speaking of widget functionality, it did take me longer than it should for me to work out how to configure widgets; the button in the widget with lines in it does the trick. Once this twigged, I built a register widget from a text one so that you can get an account with the WordPress.com empire and use it for blogging or commenting as you choose. Registering here allows comment posting on any WordPress.com blog.

Speaking of widgets, the latest WordPress.com ones allow bloggers like me to use tag clouds and even convert archive and category lists to drop down menus. I am not sure about tag clouds but making a dropdown menu of the monthly archives certainly took my fancy, as you can see here.

Oracle SQL Developer and MySQL

17th April 2007

Because of my work, I recently have had a bit of exposure to Oracle SQL Developer, which I have been using as part of application development and testing activities. For further investigation, I decided to have a copy at home for further perusal (it's a free download) and it was with some interest that I found out that it could access MySQL databases. To accomplish this, you need Connector/J for MySQL so that communication can occur between the two. Though you quickly notice the differences in feature sets between Oracle and MySQL, it seems a good tool for exploring MySQL data tables and issuing queries.

Oracle SQL Developer

Open source CMS options

18th March 2007

After reading an article in the latest issue of PC Plus, I got curious about the world of content management systems again. I went over to OpenSourceCMS to sample the CMS demos that they have got on there. Mambo and Joomla! (I wish they dropped that exclamation mark; it messes up automated grammar checking) are fully fledged CMS’s and look impressive too, though how they would fit into my online presence is something of an open question. Since I spied that PHP-Nuke uses themes, that is an attraction; I am already used to that mindset thanks to WordPress. While Drupal is seemingly less slick than the others, that could be an attraction in itself; it does offer themes but no rich text editing is available.

Though all of the above are built on top of PHP/MySQL, I ignored them for some reason when I last looked at open-source content management systems. That does seem a strange thing to do, but this was a while ago and the moderate cost of adding database functionality to my website was not something that I was willing to pay, though I have done so since for HennessyBlog.

Therefore, I ended up seeing what Plone (built on Zope and using the Python programming language) could do. What I was had in mind at the time was a replacement for Perl-powered photo gallery, and a CMS was never going to fit the bill; it still doesn’t. In any case, Plone left me with the impression that it was an all or nothing affair when I like coexistence of website components on a single server. Things may have changed since then, so giving it another go remains an option.

Now that I have decided to have a look at Drupal, the emphasis this time is not on using it as a photo gallery platform; if I wanted that, I’d go with the API for something like Flickr or Zooomr. This time, the emphasis on using a CMS to manage the visitor information directories on my website. It does coexist with the other website components, including WordPress and the aforementioned bespoke built photo gallery. Interestingly, Drupal does offer blogging functionality if I wanted it.

Set up involved a spot of work with MySQL before moving onto other things:

mysql -u adminuserid -p /* logging in*/
create database drupal; /*creating new database*/
grant ALL on drupal.* to adminuser identified by “**********”; /* granting access to new database */
quit; /* exiting */

Because it is easier to see what’s going on (not wrong, hopefully), I prefer command line working with MySQL. For some reason, Drupal comes only in tar.gz archives, so I extracted this into the web server directory and opened up the site in Firefox. Installation only requires the set-up of database access and is soon completed. A few things turned up in the status report that needed attention: cron, this can be run manually; activation of PHP Unicode and GD library (PHP’s gd_info function is a real help in testing this) extensions, editing of php.ini to remove commenting semicolons activated them and restarting Apache made them available; having a place to store uploads, the directory called files got created.

Since then, I have set about bending it to my will, not always an easy thing to do with software. The first thing to do was to give it a static home page. By default, Drupal places tasters for any nominated pages and stories on its home page and shows configuration instructions until you allow some content to filter through. However, adding the Front Page module allows you to override this behaviour and have something more static. It was an entry on Kehan’s Blog that set me heading in the right direction.

The next steps were to persuade the thing to allow external links to exist in menus (though patches exist, I have yet to learn how to apply them other than finding the nefarious piece of code and replacing, a considerable challenge that makes me wonder if there is not a better way to do it: with a module, perhaps?) and carry on the theme editing until it ties in with the rest of my site. Then, I’ll make the decision whether to replace my current workflow (Perl-powered pre-processing of XML into PHP/XHTML using XSLT and the Saxon parser followed by FTP upload to the web server) with this one. The automation of the former argues in its favour. We’ll see how things pan out…

The scurge of comment spam

7th March 2007

My other blog is experiencing what feels like a deluge of comment spam. All that I can say is thank goodness for Askimet. And that is with visitors having to subscribe in order to post comments. It seems that a way has been found around that. I did have a spurious user with obdolbin.com as their website address and got rid of them but the flow still continues. Blogger does seem to have a way around this: entering the letters from an image to stop bots from doing their thing. Maybe we'll see WordPress doing the same?

Update: It seems that the torrent has now slowed to a trickle. Maybe getting rid of the spurious user has worked after all and it just took a while for the effect to kick in.

  • The content, images, and materials on this website are protected by copyright law and may not be reproduced, distributed, transmitted, displayed, or published in any form without the prior written permission of the copyright holder. All trademarks, logos, and brand names mentioned on this website are the property of their respective owners. Unauthorised use or duplication of these materials may violate copyright, trademark and other applicable laws, and could result in criminal or civil penalties.

  • All comments on this website are moderated and should contribute meaningfully to the discussion. We welcome diverse viewpoints expressed respectfully, but reserve the right to remove any comments containing hate speech, profanity, personal attacks, spam, promotional content or other inappropriate material without notice. Please note that comment moderation may take up to 24 hours, and that repeatedly violating these guidelines may result in being banned from future participation.

  • By submitting a comment, you grant us the right to publish and edit it as needed, whilst retaining your ownership of the content. Your email address will never be published or shared, though it is required for moderation purposes.