Opening links inside WordPress comments in a new window

A project I’m working on requires all links to external sites to open in a new browser window or tab. This is easy enough for regular content, but I’ll have to figure out a way to add a target-attribute to links inside comments left by readers. WordPress automatically transforms URLs into links, but does not add this attribute. Unfortunately, many of the solutions I found a less than ideal. Somehow, the same piece of code keeps turning up in Google. Most search results are a variation of the following snippet (from Cats Who Code).

function autoblank($text) {
	$return = str_replace('<a', '<a target="_blank"', $text);
	return $return;
}
add_filter('the_content', 'autoblank');

This will simply replace every occurrence of <a with <a target="_blank". There are two problems with this approach.
More Opening links inside WordPress comments in a new window

Roy | April 2, 2015 | English,Programming | Comments (0)
Tags: , ,

Logo design: Salgueiro Timber Products

salgueiro

Last week, I was asked to design a logo for a shop set up by a friend’s brother. Salgueiro (“willow” in Portugese) designs and sells beautiful one-off wooden furniture items through Facebook (for now). The logo needed to be monochrome, as it will be used to create a branding iron/stamp.

I went with the wonderful Bigshot One font, designed by Gesine Todt, and added a growth rings effect inside its capital S. The whole letter is essentially one shape – inspired by historical branding irons – except for the innermost ring, which is a “knot” in the wood.

Both the client and I are quite pleased with the end result. What do you think?

Roy | March 17, 2015 | Design,English | Comments (0)
Tags:

Replacing a healthy hard drive in a QNAP NAS

QNAP-TS-212P

Yesterday, one of my NAS devices emailed me, informing me that one of its drives had failed. I have two “entry level” 2-bay QNAP NASes, both with two disks in a redundant RAID1 setup. They’re set up to synchronise over the internet daily, so my files are stored safely in two physical locations. This way, all of my important data is stored on a total of four hard drives. Or rather – at the moment – three.

Both the drives in my TS-210 were getting old, so it wasn’t really a surprise that one of them acted up. After I got the email, I logged into the NAS’s admin interface and rebooted it. Sure enough, the second drive re-appeared, and seemed fine. But I wanted to replace it anyway. With the help of QNAP’s excellent support forum, I found the correct way to replace a “suspect” drive that appears to work properly. It involves just a couple of steps,and they’re all very easy to do.
More Replacing a healthy hard drive in a QNAP NAS

Roy | March 5, 2015 | English,Gadgets | Comments (2)
Tags: , , , ,

Windows’ biggest problem may be its out-of-the-box experience

windows-crosshairs

Being the computing enthusiast that I am, I’ve always loved trying different operating systems. I think it’s essential to not “bury” yourself in a single ecosystem. I’ve owned and/or used computers running Apple II OS, AmigaOS, DOS, BeOS, MacOS, OSX, Windows (3.11 through 8) and various flavors of Linux. And while it’s easy to hate Windows, I find it to be quite stable nowadays, and certainly not the worst OS out there. What is incredibly bad about Microsoft’s offering though is its out-of-the-box experience.
More Windows’ biggest problem may be its out-of-the-box experience

29,788,871 dots, 1929 baffles, one hell of a ceiling

delft-1

Yesterday, I was invited to visit the new railway station in Delft, which is currently under construction. This new building by Mecanoo architects features a spectacular curved ceiling, constructed out of 1,929 so-called “baffles”. Both side of these elements are covered by a 7700 m2 city map depicting Delft in the year 1876. This map was converted to a pattern of nearly 30 million “delft’s blauw” (blue) dots using software written specifically for the project by Hjalmar Snoep. The ceiling print itself was designed by my friend Martijn Geerdes.
More 29,788,871 dots, 1929 baffles, one hell of a ceiling

Roy | December 18, 2014 | English | Comments (0)
Tags: ,

WordPress plugin: RT Bypass Sparkling Front Page Template

Sparkling is a popuplar free WordPress theme on wordpress.org right now. It’s nice an clean, and I recently recommended it to a client. The one thing both my client and I didn’t really like about the theme is how it handles static front pages. There’s a specific template file for them with a full-width layout, that also hides the page’s title. This is probably great for some users, but my client preferred to keep the sidebar and display the page’s title.

To work around this in a way that didn’t require a child theme or modyfications to the original theme, I wrote a little plugin. All it does is call the regular page template instead of front-page.php, when a page is set as the front page.

If you’re using Sparkling, and would like to try the plugin, you can download it from Github. The plugin will work for other themes as well, but I’ve not tested this.

RT Bypass Sparkling Front Page Template

New WordPress plugin: RT Hide Posts Page Editor

banner-promo

I love WordPress. It’s the easiest Content Management System to use, and it’s also very easy to develop for. Out of the box, WordPress is so intuitive that most of my clients require little to no training in order to use their new website. But there’s one thing that I find hard to explain to novice users. The concept of a “posts page”.
More New WordPress plugin: RT Hide Posts Page Editor

A fifth of the web now runs on Freedom

SAMSUNG CSC

Last weekend, at WordCamp Europe in Sofia, Siobhan McKeown gave an excellent talk about the fundamental principles that underpin WordPress. For me, the most essential one is freedom. Being an open source Content Management System, WordPress is both “free as in beer” and “free as in speech”. And while the former has probably been a big factor in WordPress’s amazing growth, it’s the latter that we should all really be thankful for.
More A fifth of the web now runs on Freedom

Roy | October 1, 2014 | English,WordPress | Comments (0)
Tags: , ,

Lenovo Yoga 2 13 first impressions

lenovo-laptop-convertible-yoga-2-13-inch-black-back-side-14

Two weeks ago, I finally bought myself a new laptop. The Lenovo Yoga 2 was the first ultrabook to offer all the specs I wanted at a (very) reasonable price. It’s taken me a while to properly set it up, but the Yoga is now ready to replace my trusty old Asus UL30A. The Lenovo has some pros and cons, so I thought I’d write about them.
More Lenovo Yoga 2 13 first impressions

Roy | September 16, 2014 | English,Gadgets | Comments (10)
Tags: , , , , , , , ,

Stream internet radio to your Rocki wireless music player

rocki_deep_purpleA while ago, I backed the Rocki Kickstarter project. I think the idea of a “Chromecast for music” is great, and I love how it adds Sonos-like capabilities to – for example – your old 70’s receiver. But while the hardware is really nice (colorful, small, stable), support for many online music services is currently still in the works.

While browsing the Rocki forums, I found that playing internet radio streams – while not currently an option in the official Rocki app – is actually quite straightforward. That’s why I created a little web page that makes it easy to send the correct API call to the player. My office mate and I have been using it for a couple of weeks now, and it works.
More Stream internet radio to your Rocki wireless music player

Roy | August 12, 2014 | English,Gadgets | Comments (0)
Tags: ,