Not sure if I am posting this is the correct area or not but I sat down this weekend and figured a way to get the thumbnails to show up finally. Through google translator I saw that the one person was wanting donations for his mod. their mod looked great but overkill for what I wanted. I just wanted a thumnail to show up.
The main problem I had was that the readers that I was using wanted the direct path and not a relative one. the "./thumbnails" did not work. it had to be "
http://www.example.com/thumbnails" in order for them to see it.
I went in and modified an already mod for external thumbnails, instead of taking a chance on things messing up elsewhere, i just renamed it to another function.
You will be modifying 3 files on your site.
rss.php
includes\functions.php
your template directory\rss_item.xml
In the rss.php file
replace
'image' => get_thumbnail_code($row['image_media_file'], $row['image_thumb_file'], $row['image_id'], $row['cat_id'], format_rss_text($row['image_name']), ((isset($mode) && !empty($mode)) ? $mode : ""), 1),
with
//rss thumbnail mod
//'image' => get_thumbnail_code($row['image_media_file'], $row['image_thumb_file'], $row['image_id'], $row['cat_id'], format_rss_text($row['image_name']), ((isset($mode) && !empty($mode)) ? $mode : ""), 1),
'image' => get_thumbnail_rss_code($row['image_media_file'], $row['image_thumb_file'], $row['image_id'], $row['cat_id'], format_rss_text($row['image_name']), ((isset($mode) && !empty($mode)) ? $mode : ""), 1),
//
in the includes/functions.php
go to the end of the file
above
?>
insert
//--External thumbnails(modified for rss feed)--------------------------------
function get_thumbnail_rss_code($media_file_name, $thumb_file_name = "", $image_id, $cat_id, $image_name = "", $mode = "", $show_link = 1, $open_window = 1) {
global $site_sess, $config;
$mysite = 'http://www.example.com/gallery/';// change this to the path to your 4images gallery
if (!check_media_type($media_file_name)) {
$thumb = "<img src=\"".$mysite.ltrim(ICON_PATH,"./")."/404.gif\" border=\"0\" alt=\"\" />";
}
else {
if (!get_file_path($thumb_file_name, "thumb", $cat_id, 0, 0)) {
$file_src = $mysite.ltrim(ICON_PATH,"./")."/".get_file_extension($media_file_name).".gif";
$image_info = @getimagesize($file_src);
$width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
$thumb = "<img src=\"".$file_src."\" border=\"0\"".$width_height." alt=\"".$image_name."\" />";
}
else {
$file_src = $mysite.ltrim(get_file_path($thumb_file_name, "thumb", $cat_id, 0, 1),"./");
$image_info = @getimagesize($file_src);
$width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
$thumb = "<img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" />";
}
}
if ($show_link) {
if ($open_window) {
$thumb = "<a href=\"".$site_sess->url($mysite."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&mode=".$mode : ""))."\">".$thumb."</a>";
}
else {
$thumb = "<a href=\"".$site_sess->url($mysite."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&mode=".$mode : ""))."\">".$thumb."</a>";
}
}
return $thumb;
}
//--End external thumbnails(modified for rss feed)----------------------------
note under line 4 in the above change
put in the path to your gallery directory just as you would type it in your browserI tried using other variables from 4images but they did not seem to carry over to the readers so I just hardcoded it in the function.
in the your template folder/rss_item.xml
replace on the 5th line
<description><![CDATA[{item_description}]]></description>
with
<description><![CDATA[<table><tr><td>{item_image}</td><td>{item_description}</td></tr></table>]]></description>
I also did the mods at the top of this post so I am not sure if you need them or not.
and you are finished.
if you look at that last change you will see that you can make this as fancy as you want.
anything between the ![CDATA[ and the ]]> is passed on to the reader without any parsing.
I made mine so that it is a table with 2 cells next to each other with the thumbnail on the left and your description of the image on the right. but you can take it from there if you want more info.
this works with yahoo, google, ie7, firefox, and a few others and passes the feed validation so I think I am good.
I did find one software reader that could not display the image, just broken links, but I think it was on thier end and not mine.
if you want to see this in action...
http://www.budduke.com/gallery/rss.php?action=imagesPS: if you go to my site you will see I am using SMF forums with only one login between 4images and SMF (interested?)
It took my about 2-3 weeks to get it to work but they are using thier own database and I used some functions that someone else created for connected to thier product but when I find time I will compare all the changes I did and how hard it would be to pass the info on to everyone.