4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: leo-magic on February 23, 2007, 09:28:52 PM

Title: large images in rss.
Post 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
Title: Re: large images in rss.
Post by: leo-magic on April 01, 2007, 11:35:18 AM
*push*

nobody?

Léo
Title: Re: large images in rss.
Post by: sigma. on April 03, 2007, 08:53:37 AM
I would also like to know this. Thumbnails just dont cut it nowadays
Title: Re: large images in rss.
Post by: sigma. on April 11, 2007, 06:08:13 PM
maybe this was posted in the wrong section. should be added to the RSS mod thread.
Title: Re: large images in rss.
Post by: leo-magic on June 02, 2007, 02:14:44 PM
*push*

nobody an idea? Léo
Title: Re: large images in rss.
Post by: mawenzi on June 02, 2007, 02:32:18 PM
... large images in RSS-Feed ...  :roll:
... a RSS-Feed is for information about your website and is not a second website ...  :wink:
Title: Re: large images in rss.
Post by: leo-magic on June 02, 2007, 02:38:15 PM
With iPhoto you have the possibility to load images (rss-feed) in the application... and this were better with big images...

Léo
Title: Re: large images in rss.
Post by: Murat on December 12, 2008, 03:00:37 PM
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?
Title: huge images in rss - große Bilder in RSS
Post by: bergblume on January 30, 2010, 12:18:30 PM
... 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
Title: Re: large images in rss.
Post by: bergblume on February 01, 2010, 05:54:26 PM
ok solved,

in rss.php replace this lin
Code: [Select]
'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

Code: [Select]
'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 ?>
Code: [Select]
//--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)) ? "&amp;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
Code: [Select]
  $mysite = 'http://www.YOURDOMAIN.com/';// change this to the path to your 4images gallery
in this line 
Code: [Select]
$dimension = 650;  you can adapt the preferred width of your images in your rss-feed