4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: leo-magic on February 23, 2007, 09:28:52 PM
-
Hi
In the rss.php, the link to the photo goes to the thumbnail. How can I do it, that the link goes to the large image?
Thank you! Léo
-
*push*
nobody?
Léo
-
I would also like to know this. Thumbnails just dont cut it nowadays
-
maybe this was posted in the wrong section. should be added to the RSS mod thread.
-
*push*
nobody an idea? Léo
-
... large images in RSS-Feed ... :roll:
... a RSS-Feed is for information about your website and is not a second website ... :wink:
-
With iPhoto you have the possibility to load images (rss-feed) in the application... and this were better with big images...
Léo
-
i need large images for "media rss" .
example:
...
....
<enclosure url="http://demo.4homepages.de/data/media/9/Tulpe2.jpg" length="10413" type="image/jpeg" />
...
....
or
..
...
<photo:imgsrc>
http://demo.4homepages.de/data/media/9/Tulpe2.jpg
</photo:imgsrc>
<photo:thumbnail>
http://demo.4homepages.de/data/thumbnails/9/Tulpe2.jpg
</photo:thumbnail>
..
...
how to i can make add this codes to 4homeges rss system?
-
... large images in RSS-Feed ... :roll:
... a RSS-Feed is for information about your website and is not a second website ... :wink:
I also want to use the original big (huge) images (or best resized to a predefined size) in my rss-feed. Can you please help me?? (große Bilder in rss-feed)
although it is not convenient to use the large images instead of thumbnails in rss I would be lucky to have a solution for this request.
I suppose that rss.php and functions.php have to be adapted in some kind of way related to this post => http://www.4homepages.de/forum/index.php?topic=19647.msg120609#msg120609
can you help?
thank you, bergblume
-
ok solved,
in rss.php replace this lin
'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),
with
'image' => get_thumbnail_rss_code($row['image_media_file'], $row['image_media_file'], $row['image_id'], $row['cat_id'], format_rss_text($row['image_name']), ((isset($mode) && !empty($mode)) ? $mode : ""), 1,0),
and in includes/functions.php insert before ?>
//--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.YOURDOMAIN.com/';// 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($media_file_name, "media", $cat_id, 0, 1),"./");
$image_info = @getimagesize($file_src);
$width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
$width = $image_info[0];
$height = $image_info[1];
$dimension = 650;
$ratio = $width / $height;
if ($ratio > 1) {
$new_width = $dimension;
$new_height = floor(($dimension/$width) * $height);
}else {
$new_width = floor(($dimension/$height) * $width);
$new_height = $dimension;
}
$thumb = "<img src=\"".$file_src."\" border=\"".$config['image_border']."\" width=\"".$new_width."\" height=\"".$new_height."\" alt=\"".$image_name."\" />";
}
}
if ($show_link) {
if ($open_window) {
$thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&mode=".$mode : ""))."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".$thumb."</a>";
}
else {
$thumb = "<a href=\"".$file_src."\" rel=\"lightbox\">".$thumb."</a>";
}
}
return $thumb;
}
//--End external thumbnails(modified for rss feed)----------------------------
Please pay attention to adapt this line with your URL to your 4images installation
$mysite = 'http://www.YOURDOMAIN.com/';// change this to the path to your 4images gallery
in this line $dimension = 650;
you can adapt the preferred width of your images in your rss-feed