Sunday, February 17th, 2008

removing blank newlines using sed.

Most people won’t find this paticularly useful, but as I’m prone to forget things:

sed -e '/^$/d'

will delete blank newlines from whatever it’s input is.

Tags: , ,

1 comment » Filed under General Life by Chris Ganderton at 21:47.

back to top

Wednesday, December 26th, 2007

Christmas, work, and a bloody massive move

So I haven’t written anything for a while because I’ve been super busy…

This is mainly because I have made a rather life changing move over to York to go and work on new things at a new company.

Suffice to say the last month or two have been pretty hard going, getting the courage up to quit my job at autotrader was pretty difficult, finding somewhere to live in York was hard going too.

Good news though; I should start studying for my SCSA soon, so expect tidbits of fun information as I figure my way through the funky new features in solaris 10 (yeah I’m a bit behind the times I guess seeings sol10 has been out for like, forever).

tootles.

Tags: , ,

Leave a comment » Filed under General Life, geek, solaris by Chris Ganderton at 23:26.

back to top

Saturday, October 27th, 2007

TanTan flickr photo gallery broken after upgrade to Wordpress 2.3

So I realised that the admin part of the Flickr Photo gallery plugin I use (which is at http://www.thefraggle.com/flickr/) was a bit broken after upgrading wordpress to v2.3.

It appeared to work with the configuration I had set previously. However, when on the options page for the plugin, it was complaining of not being able to find a standard wordpress include.

A quick google search showed me a couple of resources, that told me where I needed to make a slight alteration to the source of my flickr plugin …

in the file “/path/to/your/wordpress-install/wp-content/plugins/silaspartners/flickr/admin-options-load.php

    require_once(dirname(__FILE__).$tmpPath.'/wp-admin/admin-db.php');

needs to change to

    require_once(dirname(__FILE__).$tmpPath.'/wp-admin/includes/user.php');

Once that’s done, the plugin works a treat!

Tags: , ,

Leave a comment » Filed under General Life, Linux, geek, servers by Chris Ganderton at 19:30.

back to top

Monday, October 22nd, 2007

upgrading to wordpress 2.3

This Was quite an easy upgrade really, and prompted me to split off my different website content stuff a bit differently.

The upgrade went as expected and so far doesn’t seem to have broken anything. The big win for me though is the new native tags feature. I’d tried messing about in previous releases with the categories, but tagging really does seem a bit of a better way to do it.

It took me a few minutes of google searching and looking around codex, but managed to find the code examples on making a “tag cloud”.

Basically you need to call the following function:

	wp_tag_cloud();

At it’s most basic, you can tell it the maximum size of the text for the entities that have been tagged least, and the maximum size for entities that have been tagged the most, so I use something like follows as the code for my sidebar:

	<p id="TagCloud">
	<?php wp_tag_cloud('smallest=8&largest=25'); ?>
	</p>

I just put this into the sidebar.php file under the current theme I’m using, and hey presto, I have a tag cloud in my sidebar!

You can also do nifty things like have a tag archive, so that whenever you go to http://www.thefraggle.com/tag/photography you can see a tag cloud at the top of the page, then the listing of the articles tagged with the selected tag.

All that was involved here was creating a file called tag.php in my themes directory, then filling this with the way I wanted the page to look, basically with a call to wp_tag_cloud() and a loop to display the tagged articles:

 ...
        <h2 class="storytitle">Search Content Through Tags</h2>
        <p id="TagCloud">
                <?php wp_tag_cloud(''); ?>
        </p>
        <div style='clear: both;'></div>
        <br /><br />
        <?php if (have_posts()) : ?>
                <?php while (have_posts()) : the_post(); ?>
                <h2><a href="<?php the_permalink() ?>"
            rel="bookmark" title="Permanent Link to<?php the_title(); ?>">
            <?php the_title(); ?></a></h2>

        <div class="entry">
                <?php the_content('Read the rest of this entry »'); ?>
            </div>
        <?php endwhile; ?>
        <?php endif; ?>
...

There’s more to my paticular tag.php file, as I have formatting things to make the page match the rest of the site and it’s template, but you get the gist :)

If you want to find out more information on the tagging features that wordpress-2.3 can do, then take a look at http://codex.wordpress.org/Template_Tags/wp_tag_cloud

There don’t seem to be a huge amount of plugins yet that help you manage your tags, but there is one that seems to do pretty much everything I think I would need to. It’s called “Simple Tags” and I found it via the all knowing Wordpress Plugin Directory, http://wordpress.org/extend/plugins/simple-tags/

There’s not a huge amount to say about it, but from there you can add and delete tags, mass edit the tags for posts and find untagged posts and pages.

Overall, I’d highly suggest to anyone that if you have the time to be bothered, and don’t have any plugins that might break due to the upgrade, get your upgrade on and get wordpress up to v2.3 :D

Suggestions and other ideas welcome on what else I can do with this nifty new feature :)

Tags: ,

Leave a comment » Filed under General Life by Chris Ganderton at 18:24.

back to top

Saturday, October 20th, 2007

Flickr is my new favourite toy

Until recently I hadn’t been taking that many shots, and had just been uploading the odd photo to deviantArt. This is all good and well, but it isn’t really suited to making proper sets of images, say from a shoot at a gig, or other event.

This is when I decided to give Flickr a try. So far I have been super impressed with the ability to tag photos, store images in albums and collections together, and the huge user base also means there are lots of scripts and website applications that are available to help you make the most out of your Flickr experience!

Now, I don’t post much to wordpress because I don’t usually have anything that I feel may be read worthy, but decided to have a play about anyway with some of the worpdress plugins available that let you use your Flickr photostreams with your wordpress blog. The best one I found so far I must say is one from http://tantannoodles.com/toolkit/photo-album/ which lets you add a sidebar widget and also basically embed your Flickr photostreams into a page (see here for an example).

There were only a couple of things I needed to do (edit a couple of bits of html to make it fit in a bit more with the current style I’ve adopted for wordpress) and it does seem to look pretty smart.

Uploading images to Flickr is super easy as well, personally I use “uploadr” which you can get off their website, it lets you just drag and drop images from explorer, and then you have the option to resize images, and to create a new album to put them in as well as being able to add common tags.

Anyway, the big thing is that Flickr is awesome, tagging photos is a great way to help you organise your images and search them later for recurring themes, as are collections and albums. I do highly suggest giving it a try, you can get free accounts where you are limited to a small upload limit daily, or for a small fee you can have an unlimited upload account.

Tags: , , , ,

Leave a comment » Filed under General Life, Photography, geek by Chris Ganderton at 16:29.

back to top


Credits and stuff

Copyright © [ t h e f r a g g l e . c o m ] | Powered by WP 2.3.1. | Tree by Headsetoptions and MandarinMusing a minimal theme based on HyperBallad Back to Content