Latest iStockphoto Images Plugin: round 2!

Quick Overview
This is a quick-and-dirty plugin that will grab images from iStockphoto “recently approved” feeds, and put them on the page.

Installation
1. Download this file unzip, and place the php file in /wp-content/plugins/latestistockimages.php in your wordpress folder.
2. Go to the plugins page in the admin system. Click the “Activate” link for this plugin.
3. In your theme, include a call to one (or both!) of the template tags.

Template Tags
There are two functions available for including in templates.
<?php all_latest_istock_images(maximages [, imagesonly]) ?>
If maximages is left blank, then all of the images from the feed will be included.
If imagesonly is true, then the images will display without the descriptions. Each image is wrapped in <div class=”istockimage”> tags, to make it a little easier to use CSS to style the images. If you’re using this parameter, you’ll need to specify maximages.

<?php my_latest_istock_images(userid, maximages [, imagesonly]) ?>
The userid is the numerical user id of the feed to retrieve (In the Control Panel on the iStockphoto site, if you look at the URL given for your RSS feed; this is the number at the end. There is probably an easier way of finding the id, but I’m not sure what it is.)
If maximages is left blank, then all of the images from the feed will be included.
If imagesonly is true, then the images will display without the descriptions. Each image is wrapped in <div class=”istockimage”> tags, to make it a little easier to use CSS to style the images. If you’re using this parameter, you’ll need to specify maximages.

Examples
<?php all_latest_istock_images() ?> displays all of the images (currently 10) from the RSS feed of all recently approved images.

<?php all_latest_istock_images(3) ?> or <?php all_latest_istock_images(3, false) ?> displays the three most recently approved images with their descriptions; from the RSS feed of all recently approved images.

<?php all_latest_istock_images(10,true) ?> displays images only for the ten most recently approved images from the RSS feed of all recently approved images.

<?php my_latest_istock_images("183642") ?> displays all of the images (currently 10) from the RSS feed of my recently approved images (Remember to replace my ID with your ID to display your images instead)

<?php my_latest_istock_images("183642", 3) ?> or <?php my_latest_istock_images("183642", 3, false) ?>displays the three most recently approved images from the RSS feed of my recently approved images (Remember to replace my ID with your ID to display your images instead)

<?php my_latest_istock_images("183642", 10, true) ?> displays images for the ten most recently approved images from the RSS feed of my recently approved images (Remember to replace my ID with your ID to display your images instead)

The Output…
If the descriptions are included:


Baldy-headed lady, with a crazy look in her eye.

Shot on a dark-blue background, which has a bit of a texture.


A cluster of orange seaweed found on a beach.


A rockpool, full of algae. This is on the coast near the red rocks in Wellington

And for images only:

Lastly..
If you have any questions, leave a comment here and I’ll see how I can help (:
Oh yeah! My iStockphoto portfolio lives here: http://www.istockphoto.com/file_search.php?action=file&userID=183642. Go buy a million photos, so that one day I might make it to the threshold where I can cash out (;

Ultimate Tag Warrior 2.8.1

OMG! New Version!

– Fixes the bug where an error was displaying in the tag box for new posts
– Automagically included Technorati and local tags are now wrapped in tags. Technorati tags use the CSS class named “technoratitags” and local tags use the CSS class “localtags”
– You can view the union of tags! If you go to /tags/tag1|tag2|…|tagn then the tag page will display the union of those tags. At this stage, you can have either a tag intersection or a tag union; you can’t mix the operators up.
– There’s a new formatting string, “andcommalist” that will display a comma list of tags, along with a link to the intersection page (when appropriate – either from viewing a tag page with a single tag, or viewing the tag page for an intersection of tags)

– There are also new custom formatting placeholders!
-%intersectionurl% that displays the url for the current set of tags and the tag being rendered.
-%unionurl% that displays the url for the current union of tags, along with the tag being rendered.
-%intersectionicon% that displays the intersection url with a little icon (intersection icon).
-%unionicon% that displays the union url with a little icon (union icon).
-%intersectionlink% that displays the intersection url as a link, with a + as the link text
-%unionlink% that displays the union url as a link, with a | as the link text

download | more here

Ultimate Tag Warrior 2.8

Ultimate Tag Warrior 2.8! Free to a good home!

– Tag entry bits are now comma separated instead of space separated (Tags that contain spaces will have underscores magically added for now, though*)
– There are synonyms for tags!

I should explain the synonym thing (:

Basically, there are tags; and there are synonyms. Each are special in their own ways. A tag is the really-real version of a keyword. A synonym is a fake-tag that pretends to be a tag. A synonym can be associated with a tag via the Manage Tags page. A synonym can have more than one tag (although its behaviour is ill-defined at the moment: I haven’t done any specific handling of it yet; but you aren’t prevented from using a synonym for two tags); but if a synonym is already a tag, then sorry kiddo, it can’t be a synonym as well.

Example: If I have a… “photography” tag, and assign “photo” and “photograph” as synonyms; if I go to http://www.neato.co.nz/tags/photo, then the same posts display as if I was to go to http://www.neato.co.nz/tags/photography. Further, if I go to http://www.neato.co.nz/tags/photo+monkey, then I’ll see posts tagged with both photography and monkey (unless monkey is also a synonym, in which case I’ll see posts tagged with photography and whatever the underlying tag for monkey is).

This is just phase one of synonyms, which basically allows defining synonyms (via the Manage Tags page), and using the synonyms for pages that are requested. Phase two, will see more ways of including synonyms on pages..

The start page is here | Download here

* People who know more PHP than me: is there a way of getting $_GET values which still have the + signs and %20’s intact? I can see a way of wrangling it out of the query string; but I’d really rather avoid doing that since there are lots of ways for it to go wrong

Ultimate Tag Warrior 2.7.7

Whee. ‘Nother release!

  • I fixed the bug with related tags
  • I’ve added a new template tag, UTW_AddTagToCurrentPost($format=””) that renders a textbox for adding a tag to the current post (it needs to go inside the wordpress loop; If a named format is specfied, the contents of the page element with the id “tags-{post id}” will be replaced with the list of tags for the post, in the format specified)
  • I’ve added a few more bits for formatting
    • In custom formatting strings, %intersectionicon% draws a cute little icon, and links to the current tag(s) and the tag being rendered. (This only makes sense for tags that are displayed on a tag page rather than the index or single pages)*
    • %icons% will render a set of icons (currently Technorati, Flickr, Del.icio.us, Wikipedia, RSS, intersection).
    • For named formats, “iconlist” renders a link to the tag followed by the set of icons
    • “htmllisticons” renders <li> tags, containing the icons followed by a link to the tag
    • “commalisticons” renders a link to the tag followed by the set of icons with a comma between tags

download here | get started here

* Adding the url as a custom formatting option seems so obvious now.. I’ll add one for the next release.

Latest iStockphoto Images Plugin

Quick Overview
This is a quick-and-dirty plugin that will grab images from iStockphoto “recently approved” feeds, and put them on the page.

Installation
1. Copy this file to /wp-content/plugins/latestistockimages.php in your wordpress folder.
2. Go to the plugins page in the admin system. Click the “Activate” link for this plugin.
3. In your theme, include a call to one (or both!) of the template tags.

Template Tags
There are two functions available for including in templates.
<?php all_latest_istock_images(maximages) ?>
If maximages is left blank, then all of the images from the feed will be included.

<?php my_latest_istock_images(userid, maximages) ?>
The userid is the numerical user id of the feed to retrieve (In the Control Panel on the iStockphoto site, if you look at the URL given for your RSS feed; this is the number at the end. There is probably an easier way of finding the id, but I’m not sure what it is.)
If maximages is left blank, then all of the images from the feed will be included.

Examples
<?php all_latest_istock_images() ?> displays all of the images (currently 10) from the RSS feed of all recently approved images.

<?php all_latest_istock_images(3) ?> displays the three most recently approved images from the RSS feed of all recently approved images.

<?php my_latest_istock_images("183642") ?> displays all of the images (currently 10) from the RSS feed of my recently approved images (Remember to replace my ID with your ID to display your images instead)

<?php my_latest_istock_images("183642", 3) ?> displays the three most recently approved images from the RSS feed of my recently approved images (Remember to replace my ID with your ID to display your images instead)

The Output…


Baldy-headed lady, with a crazy look in her eye.

Shot on a dark-blue background, which has a bit of a texture.


A cluster of orange seaweed found on a beach.


A rockpool, full of algae. This is on the coast near the red rocks in Wellington

Lastly..
If you have any questions, leave a comment here and I’ll see how I can help (:
Oh yeah! My iStockphoto portfolio lives here: http://www.istockphoto.com/file_search.php?action=file&userID=183642. Go buy a million photos, so that one day I might make it to the threshold where I can cash out (;

The Great Plateau

Yeurgh! I keep sitting down to work on UTW, but I have a nasty case of programmers block (it’s always so much easier when there are paying clients.. with requirements.. and deadlines.. and the crushing obligation of earning ones salary..)

There are loose ends which I need to deal with:
– The help+documentation side of things
– Writing a hasTags() function for checking whether a post has assigned tags
– Look into alternate ways of calculating tag clouds
– The sorting of tags alphabetically (Err. *shrug* (: )
– Wrangling the superajax format / adding a seperate ajax-add-tags template tag / Change + into “view the intersection
– Heck! Have a convenient means for viewing tag intersections (:
– Allow spaces in tags, for real instead of a workaround

And there are secret plans grander things which seem like fun things to do, which I shouldn’t start until I get the loose ends tied.

So anyway… two things:

1. Are there any other loose ends / things that I’ve forgotten?
2. How are the keyword suggestions? (If you’re using them, that is..)

The Getting Started page

My brain! My poor brain!

I’ve spent part of my evening putting together something resembling a getting started/overview/help type page here (the old page that was there, is now here). There’s still a ton of scope for adding more examples, particularly when it comes to customising; but, people who have used the plugin, are there any glaring omissions or things which I should be adding to the FAQ bit?