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 (;

Advertisements

4 thoughts on “Latest iStockphoto Images Plugin

  1. Hi Christine…the plugin looks like exactly what I was wanting to do…but I can’t get it to work on my server. I get the following error message:

    Parse error: parse error, unexpected T_STRING in /home/jball65/public_html/wp-content/plugins/latestistockimages.php on line 55

    and then I have to go and delete the file so I can get back in to my admin panel.

    I opened the file in Dreamweaver and it looks like the code breaks down somewhere in this section:

    $loc = strpos($contents, “”, $loc)+6;

    echo substr($contents, $loc, $end-$loc);

    $loc = strpos($contents, “

  2. whoops….I guess I can’t copy and paste code to this comment thing…it didn’t show all of it. LOL!

    Anyway…around lines 53, 54, 55…in that area…

  3. Would you be able to email me the plugin file that you’re using? My email address is christine at neato dot co dot nz

    (I can’t see anything in the version that is on my server; but sometimes the gremlins get in and corrupt bits and pieces…)

Comments are closed.