Hapless band of staff and regulars

Archive for the Web Design category

Saturday 24th May 2008

LibDemVoice Down

Someone forgot to check the meter and it seems that LibDemVoice is currently down because we’ve run out of bandwidth.
As soon as the guy in a field in Scotland pays for some more, it’ll be down until further notice.
UPDATED: site now back up.

Saturday 17th May 2008

Ooops, blogger posts go missing on LibDemBlogs

Sorry for all you Blogger bloggers. I upgraded my webserver to PHP5 and didn’t notice that one of the scripts used in LibDemBlogs no longer worked. What this meant was that the site thought all your posts were made on the 1st Jan 1970 and so didn’t bother to display them.
I’ve now found the offending piece of code and hopefully everything should be back to normal by now.
I did wonder why it was so quite on the site, but I just assumed that everyone was in Crewe or Henley.

Saturday 10th May 2008

Youtube and embedding correctly

For some reason when you select the embed option in Youtube the code they provide includes <embed> tags. However these are big no-no’s in HTML. Youtube also have empty <param> tags, which should really end with />. On top of that I’ve still yet to work out why Youtube insist on having the video at 425×355 pixels, when clearly the resolution is only 320 pixels wide. Thus creating a rather blocky video as it is badly upscaled. So instead here is the “easy” way to embed Youtube videos.

Take your original code from Youtube:
<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/yVjzd320gew&hl=en"></param>
<param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/yVjzd320gew&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>

take note of what is in bold and replace with:
<object type="application/x-shockwave-flash" data="http://www.youtube.com/v/yVjzd320gew&hl=en" width="320" height="267"><param name="movie" value="http://www.youtube.com/v/yVjzd320gew&hl=en" /><param name="FlashVars" value="playerMode=embedded" /><param name="wmode" value="transparent" /></object>

making sure that the bold bits in the original are in the new bit of code.

Hopefully no errors on a HTML validator now

Code tweaked from this post.

Sunday 9th March 2008

Twitter fun

This weekend I have been mostly playing about with Twitter.

First I created a CNPS (Consecutive Number Plate Spotting) TwitterBot. The bot watches for @ and d messages to it, it then adds the plates to my database. Anyone with a Twitter account AND and Artesea account can get it to work, just visit the mashup page here for more info.

Next I managed to exceed the weekly allowance for tweets to my mobile. Think it was something to do with a large number of followers at Conference.

And just now I’ve installed a New Post -> Twitter plugin. This one seems to be one of the best as it’s run from my webserver (doesn’t require frequent polling of the rss feed), and it has the option to enable/disable tweets for draft, edits or new posts, so unlike other who have similar plugins you should only get a tweet from my blog when I hit Publish.

Monday 7th January 2008

What the € was that?

No, not Mark’s post from earlier, but the random Euro signs which have appear across LibDemBlogs today.
There seems to be a character set issue between my server and everyone’s RSS feeds, so when people used fancy curly quotes they just appeared as garbage.

The true problem will need to be fixed, however for the time being, I’ve just got a find and replace script instead.

Tuesday 1st January 2008

LibDemBlogs Number Crunching (2007)

With LibDemBlogs now in it’s forth year, I thought I would display some stats.

We started the year displaying 108 bloggers, and today we have 168.

The most popular blogs were:

  1. Liberal Democrat Voice (5,284)
  2. James Graham (1,523)
  3. Jonathan Calder (1,410)
  4. Jonathan Wallace (1,364)
  5. Paul Walter (1,136)
  6. Nich Starling (977)
  7. Linda Jack (749)
  8. Duncan Borrowman (741)
  9. Jonathan Fryer (644)
  10. Andy Mayer (573)

Most popular posts:

  1. Sajjad Karim defects to Tories (124) - LibDemVoice
  2. Team Clegg: in full scale meltdown? (110) - James Graham
  3. Is Sajjid Karim as big a scumbag as he is being made out to be? (108) - Nich Starling
  4. The verdict on Huhne and Clegg’s fuzzy polls (106) - James Graham
  5. Lib Dem leadership update (100) - Steve Webb
  6. Take it down, Chris (99) - James Graham
  7. Nick Clegg up close (98) - Paul Walter
  8. Shock candidate for Lib Dem leader (97) - Jonathan Calder
  9. A new banner for Team Huhne (97) - Nich Starling
  10. Huhne’s campaign turns negative (96) - Anders Hanson

The most popular days to blog:

  1. 18th December (136) - Clegg wins, Steve Webb not real
  2. 15th October (102) - Ming quits
  3. 18th November (102) - Calamity Clegg-gate
  4. 20th November (102) - Some disks go missing
  5. 26th November (101) - Saj Karim defects

Days which had high posts to blogs ratios:

  1. 18th December (0.8395) - Clegg wins
  2. 10th May (0.7500) - Blair finally goes
  3. 24th January (0.7170) - Campbell “Troops home by October”
  4. 15th October (0.7034) - Ming quits
  5. 21st March (0.6967) - Browns last budget

The quietest days:

  1. 25th December (20) - See, even bloggers have lives
  2. 26th December (20)
  3. 2nd June (23)
  4. 8th April (24)
  5. 25th August (24)

Browsers:

  1. Internet Explorer - 68.50%
  2. Firefox - 24.35%
  3. Safari - 3.85%
  4. Opera -2.20%
  5. Mozilla - 0.66%

Page stats:

  • Visits: 148,760
  • Unique Visitors: 25,591
  • Page Views: 310,321
  • New visits: 16.78%
  • Visits to the mobile version of the site: 4,267 (1.38%)

Whilst most of the search referalls were variations of Lib/Liberal/Dem/Democrats/Blogs some which caught my eye were

Some caveats, only the most recent 10 posts per blogger are shown on LibDemBlogs, so some archive pages might not contain all the posts on that day. The most popular blog is counted by the number of click-throughs to the main URL of a blog, it is excluding all links direct to blog posts. The most popular posts only count those clicked directly on the title of the post on LibDemBlogs, excluded is any links followed via the RSS feed, or people who clicked on the authors name.

Happy 2008!

YouGov

Friday 16th November 2007

Limited internet access

Our old broadband seems to have been finally cut off, so it looks like I’m going to be without for nearly a month whilst we wait for TalkTalk to set us up. I can get my phone to act as a modem (and if I’m luckly I can steal Heather’s which has HSPDA), but please be patient if you have any LibDemBlogs/LibDemVoice technical requirements.

My-Symbian

Saturday 10th November 2007

Shared servers

There is a problem having your website hosted on a shared server, which is that you really need to trust your webhost. So I was rather shocked today when installing phpMyAdmin that without configuring the config.inc.php file I was able to login to the mySQL database.
Not only that but I could see the names of every table on my server. Now this has happened before, but any attempts to view these tables resulted in errors, but this time I was able to view any table, read all the content and even edit a random persons blog post (don’t worry, I undid the changes).
Of any security issue this was a big one, I could have gained access to a large number of wordpress blogs, and if I looked I’m sure I could have found a forum with usernames, emails and md5 hashes of passwords.
However I’m not out for “hacking”, so I contacted my webhost and shortly after as password was added to the mysql root.

DataFlame

Friday 9th November 2007

New Gmail Problems

Gmail LogoIt’s seems that Gmail has gone through some small changes, extra divs showing background ajax commands, my email address inside the <title> tags, whilst writing emails the Firefox status/loading bar flashes like a disco and some other stuff.
I know it’s changed as I’ve got an Older Version link, however on the What’s New page I can’t see anything and the same goes for the blog.
The problem, I’ve now had Firefox crash on my three times (over two machines) when I’ve clicked on the Spam link (not everytime), and for some reason it doesn’t want to remember that I don’t want this new version. I can’t see anything great about it, and whilst they don’t want to tell me whats new why would I.
Maybe it’s time to downgrade to a UK version?

Friday 9th November 2007

Hide from all except admin

I wanted to put a WP-Admin link on my blog, but one which only showed to me whilst I was logged in.
So hunting through the WordPress Codex I tried to find something like is_admin(), but couldn’t find it. Then going through all the PHP files I found this function current_user_can(capability) which returns true or false if the logged in user can do that capability. Next I had to work out a capability which only admin could do, but a quick look at the source code showed that it should be possible to enter an integer which related to a level.
So finally I have this on my blog:
<?php if(current_user_can(10)) { ?><a href="/wp-admin/">WP-Admin</a><?php } ?>