Author Topic: large images in rss.  (Read 9899 times)

0 Members and 1 Guest are viewing this topic.

Offline leo-magic

  • Newbie
  • *
  • Posts: 40
    • View Profile
large images in rss.
« 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

Offline leo-magic

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: large images in rss.
« Reply #1 on: April 01, 2007, 11:35:18 AM »
*push*

nobody?

Léo

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: large images in rss.
« Reply #2 on: April 03, 2007, 08:53:37 AM »
I would also like to know this. Thumbnails just dont cut it nowadays
« Last Edit: April 11, 2007, 06:05:21 PM by sigma. »

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: large images in rss.
« Reply #3 on: April 11, 2007, 06:08:13 PM »
maybe this was posted in the wrong section. should be added to the RSS mod thread.

Offline leo-magic

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: large images in rss.
« Reply #4 on: June 02, 2007, 02:14:44 PM »
*push*

nobody an idea? Léo

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: large images in rss.
« Reply #5 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:
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline leo-magic

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: large images in rss.
« Reply #6 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

Offline Bugfixed

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Lavinya
Re: large images in rss.
« Reply #7 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?
<?php echo 'Hello, World!'; ?>

Offline bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
huge images in rss - große Bilder in RSS
« Reply #8 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
« Last Edit: February 01, 2010, 07:29:23 PM by bergblume »

Offline bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
Re: large images in rss.
« Reply #9 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
« Last Edit: February 02, 2010, 11:03:00 AM by bergblume »