Single Category RSS feed in WordPress

rssiconSo now having installed WordPress, it turns out that it is infinitely customisable! Oh joy… more to learn about!

The task was to be able to build a single category RSS feed that people can subscribe to if they so chose, rather than have to subscribe to all categories, or all comments. In the theme I am using the sidebar holds the category list and it was here that the code had to go.

The issue was to find the category ID and the category name and only show the link to the RSS *if* the user had opted to view all posts in a single category.

It turns out that WordPress has done most of the hard work for us, in that the functions to get the ID and name are already created. All that had to happen was to find those arguments, wrap them in an ‘If’ tag and post them to the sidebar. Once again, some gentle reading of the Woprdpress documentation got me half way there and able to manually write the code for each category… but it needed automating. And once more, Alex Blanc stepped up to the plate…

To cut a very long story short, here’s the code, entered as a list item in the sidebar.php file for the theme:

<?php if (get_query_var('cat')) { ?>
<li>
<a xhref="/wp-rss2.php?cat=<?php echo get_query_var('cat'); ?>"><?php echo single_cat_title(); ?> (RSS)</a>
</li>
<?php } ?>

This then writes the title of the category in the sidebar as an RSS link, and ensures that only that category’s posts are included in that particular feed. You can see from the code that the link is using RSS2, so you can probably amend this to be any other flavour of feed that you wish.

DVD Studio Pro Scripts

I have been authoring DVDs using DVD Studio Pro for quite a while now, and despite many other systems being available, I really find ‘DVDSP’ a joy to use. It is especially easy to use, and if you combine it with the power of a tool like DVD After Edit then you really can do just about all you need to do.

Of course, if gets a bit geeky… but hey! I like that!

So over the years I have been helping and advising others on how to use DVDSP, and I have collected together quite a range of scripts, tutorials and tips to help create DVDs. I have purchased ‘dvdstudiopro.co.uk‘ as a domain name and am currently working on making this a decent place to go and get help, download sample projects and tutorial files and also request specific scripts.

Writing scripts is becoming an increasingly important aspect of setting up DVD navigation. Yes… you *can* get by for years without touching the script editing, but you are missing a trick if you overlook this tool. I have written scripts for others on a commercial basis more times than I care to remember, and am always happy to undertake a project for a fee. Let me know if you’d like some help!

As soon as dvdstudiopro.co.uk is up and running, I’ll be back to let you know. Watch this space!

PHP import or export to CSV

This post seems to have been lost in the move from Drupal to WordPress, so here it is again:

A while ago now I was working on the designmyschool.net website and one of the functions we had to build was the ability for a user to upload accounts in bulk – typically the data would come form a school management system, which meant it would be best to use CSV file formats.

At the time I researched into what tools were available to help with this task, and found only one suitable for a novice PHP coder such as myself – Interakt’s ‘CSV Import/Export extension for Dreamweaver.

The trouble was that I didn’t fully understand it all back then and in truth probably still don’t. However, I have now had a chance to use the other Interakt extensions and really like the way they make complex tasks much, much easier.
Just my luck then… the CSV extension has been pulled! Adobe’s acquisition of Interakt bodes well in so many ways, but sadly it means I couldn’t purchase the extension to test it out. Instead of the wide range of extensions, Interakt are now bundling just one set into a single product – MXKollection. The other extensions may well appear in a future version of Dreamweaver, but there are no guarantees.
So I happened upon an Italian website called Felixone. A quick read through and a short email later I had requested a new extension gets built!
And here it is:
http://www.felixone.it/extensions/prod/mxiecsven.asp

I don’t yet know how this works, but it looks very, very good to me. For €28 it has to be worth a chance! I think I can now confidently complete that part of the admin tools for designmyschool… we do have the csv uploading working well, but we could use a csv download of the results. Sigh… it never ends…