This is very easy to do with CyberSEO Suite. Simple place the following code into the
"PHP Code <?php .. ?>" box on the feed setting page and apply the changes:
Code:
$post ['guid'] = base64_encode ( $post ['link'] );
$thumb = str_replace ( basename ( $post ['link'] ), "", $post ['link'] ) . "pics/" . rand ( 10, 16 ) . ".jpg";
$post ['post_excerpt'] = "<p align=\"center\"><a href\"" . $post ['link'] . "\"><img style=\"max-width:100%\" src=\"" . $thumb . "\"></a><p>" . $post ['post_excerpt'];
The XML feed you gave above is intended for TGP sites, but not for blogs (it doesn't contain nor picture, nor even GUID which is a must for any RSS feed).
If you open any gallery from that feed (e.g.
http://galleries.tease-pics.com/1469....php?id=856489), you will see that each one has exactly 16 pictures which have named as 01.jpg...16.jpg and stored in the "/pics" sub-directory of the gallery path.
Here is an express explanation on what exactly each particular line of the php code above does:
Line 1: Creates
GUID of the post depending on the gallery URL.
Line 2: Picks the random image on the given gallery (in range 10.jpg..16.jpg) - hope it will be a bit hotter than first 9 ones
Line 3: Inserts that random picture into your post right above the text description and link it to the actual gallery with your affiliate code. Don't worry about the picture size, because it will be scaled to fit your WordPress theme.
That's it
Please let me know if this worked well for you.
P.S. If you want to insert into your post only a small thumbnail instead of a full-sized picture, simple change the second line of code as show below.
$thumb = str_replace ( basename ( $post ['link'] ), "", $post ['link'] ) . "images/" . rand ( 10, 16 ) . ".jpg";