Tag Archives: wordpress

How to remove MyBlogLog tracking code from WordPress

Have you used MyBlogLog in the past to track readers of your WordPress blog? You probably either used a plugin to do the tracking, or perhaps a short snippet of code added to your theme. Although it’s preferable to use the plugin approach, sometimes adding the code was necessary in the past to avoid incompatibilities with other plugins.

Now that Yahoo’s MyBlogLog is no more, you should disable the tracking, no matter which approach you used. If you don’t, your WordPress site is likely to slow down alarmingly, driving away readers. Note that since the tracking code is not normally included in admin pages, the poor performance may only be apparent when viewing the blog, not when using the dashboard.

If you used a plugin, uninstalling the MyBlogLog tracking plugin in the normal way through the dashboard should be straightforward.

If your WordPress site used the code approach to MyBlogLog tracking, you will need to manually edit the theme files to remove the code. Here’s what I did to remove the tracking code:

  1. Take a backup of your site :-)
  2. In the dashboard, click on Appearance > Editor in the left sidebar
  3. Choose the Header file (header.php) in the list of files in the right sidebar
  4. Scroll down until you find the tag. Just below that you will probably see the tracking code as highlighted in the sample below:
  5. Delete the highlighted text – ie all the text between and including the script tags. (Note that the id code will be different from that shown. Also, the code may have been inserted in a different file – if you can’t find it in header.php, you will need to browse the theme files to find it.)
  6. When you are confident you have made an accurate edit without deleting any other code, save your changes.

Disclaimer: since every site is different, I make no guarantee that this will work for your site. This is what worked for me. Remember that manually editing theme files is risky, so make sure you have a back up first and be very careful if you are not familiar with this process!

The iPad in education

Wordpress on iPod - edit postIn an earlier post I discussed how Apple’s software development efforts seem very focused on consumption of media.

I’m interested in learning which incorporates producing information (not just consuming it) and which makes effective use of Web 2.0 tools to publish, not just to read. Given the iPad currently appears to have pretty much the same features as an oversized iPod Touch, the software limitations are likely to parallel those of the iPod. These include:

  • The only multitasking available seems to be that music can be played in the background while you use other apps. So moving content from one app to another is clumsy. Given the size of the iPod, this is not such a big deal. But if I purchased the much bigger iPad, I’d expect it to be more suitable for productive work such as editing web-based content.
  • Many web-based systems use WYSIWYG editors for creating and editing content. These are not available using the current iPod OS, so editing is restricted to plain text – unless you can use markup. This affects all kinds of web-based systems used in education: Moodle, PBWorks, Blackboard, Mediawiki, etc. In a wiki you can use wiki markup to get around this, otherwise you’ll need to use HTML. Either way, this will be seen as a big step backward by many educators and learners!

There are many apps which allow the user to access content as consumer but few apps which allow authoring. One that I really like is the WordPress blogging app which allows me to create and edit posts and pages and manage comments. Like WordPress, it’s simple, straightforward and effective. But notice from the screenshot above (on an iPod Touch) that the editor shows only source code (HTML). Now I work in that mode most of the time anyway, but I know many of the teachers I work with would see the loss of the WYSIWYG editor as a return to the dark ages!

Since the iPad is not yet available, my comments are merely predictions based on the current technology. I hope I’m wrong, but I suspect the first iPads will not solve these problems. My advice to teachers: if you are using Web 2.0 tools or an LMS such as Moodle, you may not find a shiny new iPad is a suitable platform for creating and editing content. Unless of course you are prepared to learn some markup!

Customising the WordPress greeting

brueghel-tower-of-babelOne thing that seems to bother quite a few WordPress users who live out here on the fringes of the civilised world is the greeting in the headers of admin pages: for some reason, ‘Howdy, Paul Left’ seems out of place. Apparently, the greeting is justified because WordPress creator Matt Mullenweg is from Texas. It’s never bothered me too much, but it does seem to bother some users. Perhaps it’s tied up with the sense of annoyance that many users feel in relation to the dominance of English on the web. Certainly, educational users of WordPress (such as teachers incorporating blogging into their courses) might want to customise the software to include a greeting more culturally familiar to their students.

The trouble is, the greeting cannot be changed in the settings as it’s hard-coded into the WordPress source code. It used to be fairly easy to change this text by editing the code, but a couple of versions ago the File Editor was removed from WordPress, along with the ability to edit WordPress code from the admin page. As far as I know the only way to do this now is to edit the code using FTP. If you need to do this, you’ll need FTP access to the WordPress server. These steps work with Fetch on a Mac, but should apply pretty well to other platforms and FTP clients:

  1. Using the FTP client, go to the folder ‘wp-admin’ and locate the file ‘admin-header.php’
  2. To be safe, take a copy of this file by downloading it (‘get’) and saving to your hard disk.
  3. Right-click on the file name and choose ‘Edit’. This should download the file and open it in a text-editor
  4. Find the text ‘Howdy’ and replace it with the desired greeting. For example, here in New Zealand I changed the greeting to ‘Kia ora’. In WordPress 2.7.1 this should be in line 108.
  5. Do not change any other text in the file, just that one word! If you make a mistake, use undo to put it back the way it was, and do not save it back to the server unless you are absolutely sure you have made the correct change.
  6. Try reloading the admin page – hopefully you will see your new greeting. If not, and you’re not sure how to fix it, you will have to undo what you’ve done. This is where the backup of the file you downloaded in step 2 will be handy :-)

By the way, there’s no easy way to include non-English characters using this method: while WordPress can display text such as Καλή μέρα in a post, it can’t easily be included in the source code. There are ways to include such characters but that’s beyond the scope of this post.

Disclaimer: this worked for me, but editing source code is risky and a mistake can render your site unusable. Please be careful – I accept no responsibility for anything going wrong!

Image: Brueghel’s Tower of Babel

WordPress 2.7.1 an improved tool for teachers and writers

Wordpress logo

Like many education bloggers, I tend to write less frequent posts but have a lot of drafts that I am working on. It often takes some time to fully develop the ideas in these posts so they are ready to publish. So managing my draft posts is important to me.

I also use WordPress in my professional development activities with teachers, helping them to use it as a tool for their own reflective practice as well as explore how they might use it on their own teaching. They too need to be able to manage drafts effectively and easily.

However, using the old WordPress dashboard interface (up to version 2.6) to access your drafts was a little clunky. And when working with teachers, I found the interface to be non-intuitive and a barrier to their effective use.

The new version puts a list of recent drafts right onto the dashboard page – this is a great improvement for anyone like me who has lots of draft posts on the go at once. And it will remove a barrier for teachers learning to use a WordPress blog as part of their own professional development or in their courses. It’s a simple change but a significant improvement.

A few other changes I’ve noted:

  • Earlier versions had a problem with the dashboard ‘External links’ block – any changes to the configuration were not properly saved. I’m pleased to see this is now fixed.
  • The Flash-based image uploader tool no longer works as expected on Mac running Firefox. When the image is uploaded, the ‘insert into post’ button does not work the first time round. The fix is to use the browser uploader tool, or insert a new image in two stages: ‘insert into post’ seems to work fine with images that have previously been uploaded.
  • Because the dashboard screen layout is slightly different, older plugins that write text to admin screens need a little tweaking to display correctly. For example, I had to change my Scottish Proverbs plugin slightly – luckily, the version of the Hello Dolly plugin distributed with WordPress 2.7.1 provides a clear guide to exactly what needs to be changed!

All up, WordPress 2.7.1 is a ‘must-have’ release and incorporates a much more user-friendly dashboard interface. It’s an excellent example of how effective the open-source approach can be in developing great software tools.

Blogging advice from the 17th century

I recently put together a simple WordPress plugin whose main purpose was to entertain me while I was staring at my dashboard with writer’s block. The plugin (based on the familiar Hello Dolly) incorporates over 800 Scottish proverbs from a collection dating from 1663, and displays a random proverb on admin screens. While I’m still scratching my head over the meanings of some of the proverbs, I’ve found that others provide valuable words of wisdom for bloggers:

Fidlers, dogs and flies, come to the feast uncalled
This clearly refers to spammers, who will find your blog even though you think you’re writing on esoteric topics with limited readership.

It goes in at one ear, and out at the other
What ever you say, some readers will only see what they want to see.

He that speaks the things he should not, hears the things he would not
Inflammatory posts attract inflammatory comments.

Fair words brake never bane, foul words many ane
When posting or commenting, be positive about others and choose your words carefully: try to present criticism in a supportive and collegial manner.

Patience perforce
New bloggers, you won’t change the world (or get Technorati authority) overnight.

Oft counting makes good friends
Check your logs and stats daily – you’ll soon find out who your friends are.

Ye ride a bootlesse errand
Depressing? Yes – but it reflects how we may feel when we’ve finished reading the logs (see above)

All things helps quoth the Wran, when she pisht in the Sea
Take your pick, this could mean either:

  • Have hope – if what you write reaches only a handful of readers, it’s still a contribution to the world of ideas and higher thought
  • If you think you’re making a difference, you’re deluded.

Of course, the proverbs are not channeling some 17th century blogger: they’re just a great example of how such truisms can mean anything we want them to. And, perhaps, how many seemingly new ideas are just old ideas rephrased.

Image: Heures de Maréchal de Boucicaut (detail) C. 1410