The Latest Photo for Pixelpost 3 (for PP 1.6) - Test page - © Piotr GeoS Galas 2007

This site presents how to show the latest image on your site.

Probably you are wondering how it works?
This is how its done:
1) It takes RSS feed from site (looking for it at URL which you give) as document with needed data. Im using for it advAJAX lib (an advAJAX 2.0 RC2) oryginally written by Ɓukasz Lach - http://anakin.us/
2) It parses RSS feed where are all the latest images and takes first from them (the newest one).
3) It looks within document for element with ID equel to:

showImageHere
and puts there:
<img src="URLtoImage1" border="0"/><br/><br/><img src="URLtoImage2" border="0"/>...

Now you are thinking "Coooooool but how to do the same at my Pixelpost???".
Solution is easy. All what you need is:
1) Copy this files to your site (click on it using right button of mouse and use option called "Save As"):

advajax.js
lib.js
rss.php (download it and save as rss.php)
2) Using FTP upload this files to some dir at your blog's web accout (i.e. to ftp://yourdomain.com/pixelpost_dir/latestphoto/)
3) Copy this code to your template file (i.e. image_template.html):
<script type="text/javascript" src="pixelpost_dir/latestphoto/advajax.js"></script>
<script type="text/javascript" src="pixelpost_dir/latestphoto/lib.js"></script>
4) Remember to change paths to above files if you are using other then this which I gave here.
5) Put this to above template file in place where you want to show image:
<div id="showImageHere"></div>
6) Inside lib.js set the numer of images which you want to show and if there should be thumbnails or full size images. By default it is set to:
showImages = 5;	// Number of images to show
showThumbnail = 1;	// Set it to 1 for thumbnails or to 0 for full size image
7) Inside rss.php set URL of feed and cache period. By default it is set to:
$time2expire = 3600;	// minimal period is secs after which RSS feed will be refreshed (bt it needs hit of page visitor)
$rss_url = 'http://piotrgalas.com/projects/latestPhoto3/libeco.nl.rss.feed.xml';	//address of feed
8) Remember that rss.php needs correct rights to create 2 new files (CHMOD 755 on dir with this script should be enough at the most servers).

If you have any questions then you can find contact date here.

This is the result of working script: