Lightly Seared On The Reality Grill

Random expat geekery from The Low Countries

Browsing Posts in Web

I’ve just installed the Comment Reply Notification WordPress plugin and am about to have a play around with it. So I’m not really about to start talking to myself in the comments, I’m testing.

Honest.

Updated

The Comment Reply Notification plugin appears to be a bit broken, so now I am looking at the Subscribe to Comments plugin.

And yes, I have deleted some of the test comments

flattr this!

I am a heavy user of RSS and my primary means of following news, blogs, social networks and pretty much everything else is Liferea. As desktop readers go, it is an excellent application and one that I have come to depend on. The only problem is that it is a desktop application and, as I become more mobile, keeping track of feeds across multiple devices has become more of a bind.

However, Liferea can be integrated with Google Reader, and I have spent the past couple of days playing around with this. I’m impressed. I can still use Liferea on my primary PC and switch to the chocolate flavoured web interface elsewhere.

There is an additional bonus, which you will notice if you take a look at the sidebar. Below the RSS, Twitter and Facebook icons is a Quick Links box. These links are shared directly from the Reader. I’m not sure how much I will use it, but it could turn out to be a handy way of saving interesting links.

We shall see.

Updated (28/10/10)

The Quick Links box is gone. It was a nice idea, but I really don’t need yet another link-sharing platform.

flattr this!

Often, when I start looking for a WordPress plugin to achieve something I find that the functionality I need – or much of it – is already included in the core code. The WordPress Gallery is a case in point.

So here’s the requirement: I want to add several pictures to a post, automatically formatted into a thumbnails gallery allowing visitors to click on the thumbnails to see the full size images. This can be achieved with no additional functionality at all. All you need to do is upload the pictures into an existing post using the Add An Image button.

The point to remember here is that, when you upload each image, you do not want to Insert Into Post. Use the Save All Changes button instead. This will add the image to your gallery – you can see the image count rise at the to of the Add an Image Window.

As soon as you have added two or more pictures, WordPress will start displaying Gallery Settings every time you upload an image. These settings are reasonably self-explanatory. If, once all your images are uploaded, you click on the Insert Gallery button you will see the following shortcode in your post:

[gallery]

And the result looks like this:

There are several options you can use, described here, and by default clicking on an image will take you to the permalink page for that image – essentially the full sized image but surrounded with the styling used across your blog.

You can, however, go a stage further and add a Lightbox. The one I have found to work most nicely is the jQuery Lightbox For Native Galleries which has a demo-page here. This displays the images in a pop-up without leaving the post and… It’s just a bit prettier.

flattr this!

A month after deciding to merge all of the sections of Pulpmovies onto a single platform, the deed is done. Much of it went pretty well although I did encounter some glitches along the way.

The parts of the process that relied on WordPress functionality (exporting the blogs and importing them into the new site) went remarkably well and, by reorganising the categories beforehand I had very little to do once everything was merged.

It did take significantly longer than expected for two reasons. Firstly, I hadn’t fully taken account of the sheer number of files that needed to be deleted. More significant, however, was that my hosting provider enforces a maximum upload size of 8MB which I could find no way around. Since several of the exported blogs came in at a lot bigger than this, I had to chop them up in order to upload them. Cutting the files down to size wasn’t difficult, but Gedit was probably not the best tool to use in this instance.

One thing I did notice, however, is that the exported files include all comments – including those marked as spam. This undoubtedly is what sent some of the file sizes through the roof and, if I was ever to try something like this again, I think it would probably be wise to delete all the spam comments from the blog before exporting it.

But that’s for the future.

I went with an off-the-peg theme in the end although I have started tinkering with it and will need to make some more changes before I am completely happy. But for now, I shall have some dinner and treat myself to a well deserved beer.

flattr this!

With WordPress, merging blogs is easy but things get a little more interesting if you only want to merge a selection of categories from the old blog with the new. Here’s a way to do it.

First of all, you need to create a temporary user in WordPress to which the posts can be assigned. You can use whatever name you like, but the name I used was xfer.

Then we need to start hacking the database with whatever your preferred SQL client happens to be. The table prefix in the scripts below is wp_ yours may be different.

-- Script 1
-- Identify the ID for the xfer user
-- Make a note of this, you'll need it later.
SELECT *
FROM wp_users
WHERE user_login = 'xfer';

-- Script 2
-- Identify your categories to be assigned.
-- For each of the categories you want to assign, make a note of the term_id
select * from wp_terms;

-- Script 3
-- Sanity check. This script will list the posts that you are about to reassign
-- You don't need to run it...
-- but I like to know what I'm about to change before I make the change
-- The (60, 42, 44, 36, 63) is the list of term_ids for the categories to reassign,
-- from Script 2
select *
from wp_terms a
join wp_term_taxonomy b on a.term_id=b.term_id
join wp_term_relationships c on b.term_taxonomy_id=c.term_taxonomy_id
join wp_posts d on c.object_id=d.ID
where a.term_id in (60, 42, 44, 36, 63)
and post_status='publish';

-- Script 4
-- Change the author for the posts in the selected categories
-- The 86 is the ID for the xfer user.
-- Use whatever value you retrieved from Script 1
-- The (60, 42, 44, 36, 63) is the list of term_ids for the categories to reassign,
-- from Script 2
update wp_posts
set post_author=86
where ID in
(select c.object_id
from wp_terms a
join wp_term_taxonomy b on a.term_id=b.term_id
join wp_term_relationships c on b.term_taxonomy_id=c.term_taxonomy_id
where a.term_id in (60, 42, 44, 36, 63))
and post_status='publish';

Once this is done, you can go back into WordPress and export just the posts assigned to user xfer.

flattr this!

Themes

No comments

Yes, I am playing around with WordPress themes again. None is ideal – as yet – but the process is giving me a fair bit of food for thought.

flattr this!

I mentioned earlier that I was planning to merge the various blogs that make up the current Pulpmovies site and, as a first step and test of the process, I have now merged the (semi-hidden) personal blog from that site with this one. Successfully.

It turns out to be a remarkably easy process although there are a couple of steps that I took to make things easier.

Firstly, before I did anything, I recategorised the posts from the old blog so that they matched the structure of the new one. This seems to have worked and has saved me much tinkering in the new blog.

Secondly, the photos. I downloaded these to a local folder and then uploaded them to the new site, retaining ther folder structure. Which leads me to…

Thirdly, I used a find and replace on the export file to change the src attribute on the img tags so that all of the tags pointed to the correct place.

I still need to do a bit of tinkering but, as far as the essentials are concerned, everything is here and in place.

Now I just need to repeat the process for the rest of the site. Fun, fun, fun.

flattr this!

How could I resist this? Friends of Laphroaig is a social network for those of us who enjoy a decent dram. The network includes all the usual things as well as a shop which not only does discounts but also ships to other EU countries (this is important to me). I joined, obviously, and they sent me a rather nice certificate of land ownership which entitles me to demand a dram when we visit the distillery. And we will.

certificate of land ownership

flattr this!

I mentioned earlier that some changes were on the way over at Pulpmovies. The first step was to build a new theme and this is what I have spent most of today playing around with.

I started with the Stardust theme being used here, changed the graphics somewhat, and added some additional code to cope with the Reviews metadata and I have finally reached a point where I am reasonably happy. I’m sure I will need to do a bit of tweaking but here’s a sneak peek at the upcoming new look for Pulpmovies.

This is what the main page will look like

This is a very stripped down review page, The important thing here is that the stars and information are included.

flattr this!

Over the past ten years, Pulpmovies has grown and changed several times. Originally, the site contained reviews for whatever I happened to be watching, all of which were hand-carved from raw HTML. As time progressed, I put together a rudimentary content management system for the site before abandoning this in favour of a WordPress driven solution. However, because of the organic way in which the site has grown, this has been implemented as multiple instances of WordPress strapped together with a bit of SQL. This approach works, but it has left me having to spend much more time keeping the software up to date than I would like. So it’s time for a change.

I am planning to convert the site so that it runs on a single instance of WordPress. I did take a look around to see what other content management systems were out there but I’m not really doing enough with the site to justify a bigger or more complex solution.

I have a pretty clear idea of how I want the site to look, although I still need to build a theme that will achieve this.

The WordPress database itself looks pretty simple, so merging the instances into a single one should be pretty straightforward. This is, however, somthing that will need a fair bit of testing to make sure that everything works.

And then I will need to decide what to do about the forum…

Of course, doing all this will need to be fitted in with everything else I get up to in my own time so don’t expect any sudden changes. But it won’t be too long before Pulpmovies is running on a vanilla implementation of WordPress, and I will be able to spend a lot less time upgrading software and blacklisting spammers.

The Varga girls are staying, though.

flattr this!