Category Archives: Development

I’m often wanting to create quick and useful links to Wikipedia. Obviously, you could add a link manually each time, but wouldn’t an automated system be so much better?

Well, crack open your functions.php file within your theme folder and added the following code…

add_shortcode('wikilink','add_wikilink');
function add_wikilink($paras="",$content="") {
    return '<a href="http://en.wikipedia.org/wiki/'.str_replace(" ","_",$content).'" title="Look up '.$content.' on Wikipedia" title="Look up '.$content.' on Wikipedia" target="_blank" rel="notarget">'.$content.'</a>';
}

Then, simply add the shortcode [wikilink] around any word/words that you wish to look up on Wikipedia.

For example….

The [wikilink]HTC Hero[/wikilink] runs the [wikilink]Android operating system[/wikilink].

This would then produce the following output…

The HTC Hero runs the Android operating system.

The links open in new windows (i.e. target=_blank) and I’ve set rel=nofollow – obviously you can change the above code to modify any of this.

Only 2 days after releasing version 1.8 of Simple Social Bookmarks, version 2 is out!

Almost completely re-written, version 2 is a lot more efficient and is easier for me to maintain. And, more importantly for the user, there’s a plethora of new Social Bookmarking sites included.

One thing to note for existing users – the “basic” default set of social sites has changed, so if you haven’t specified which ones you wish to appear, you might find that your list changes after installation.

If there any sites not included that you’d like to see added, let me know!

Apologies if the site appears to be going up and down “like a bride’s nightie”.

I’m testing some new plugin code and for reasons that currently totally baffle me, it keeps hanging and causing the site to crash as a result.

Ho hum.

For those sharp enough to have viewed the site over the last 20 minutes, or subscribe to my feed, you might have seen a number of test posts.

You see, I posted earlier today and the resultant feed had the social links missing from the end. Not only that, but any of the feeds that contain that post no longer display in Firefox. Weird. Look at the source behind it, though, and it looks fine.

My assumption is that it’s the Simple Social Bookmarks plugin, which changed around the time this still worked. So I installed the previous version and it started working again.

So, I did some tinkering and it still didn’t work. Now, I have the previous version back installed and it still doesn’t work. No matter what I do, I can’t get the chuffing bookmarks to appear in my feed. Grrrr.

Expect more test posts. And banging of head against wall.

Today I have updated Simple Facebook Link and Simple Social Bookmarks.

In both cases, I have added the ability to pass an API key, user name or password to the URL shortening service.

Simple Social Bookmarks also has new default options and user specific icons are now stored in the theme folder, rather than the plugin folder1. If you have used either of these options, please review the instructions for potential changes that you’ll need to make.

  1. this is because automatic plugin updates were removing these folders []

Top
%d bloggers like this: