1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MG 1.1 How to show thumbnail in rss feed?

Discussion in 'Media Gallery Support' started by dotpro, Dec 25, 2015.

  1. dotpro

    dotpro Active Member

    Hi,

    I am trying to figure out how to show thumbnail only in the rss feed? Currently, media rss feed shows full images and often the picture is extremely large.

    thanks
     
    51463 likes this.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    There is no option to do that.
     
  3. dotpro

    dotpro Active Member

    Wow, why not? Is this something hard to implement or just an oversight? So everyone is fine with the large, slow loading, hi-res images in rss feeds? Even an 8 year old photopost has that...

    users/websites syndicate rss feeds > people see THUMBNAIL > they click and end up on your site. That is the whole point. If user is able to see the full high res image without visiting the site, what good is that? Same reason you show excerpts/summary in article rss feeds, etc. instead of 1000 word article.

    I think being able to show thumbnails and number of thumbnails/items in rss feeds would go a long away in making the rss feeds more useful for website owners and users because right now its a headache.
     
    51463 likes this.
  4. Chris D

    Chris D XenForo Developer Staff Member

    It is what it is, and has been for several years without complaint - when PhotoPost was only 6! :)

    Suggestions can be made in the Suggestions forum and an add on developer may well be able to implement this rather easily.
     
  5. batpool52!

    batpool52! Well-Known Member

    it is quite easy to see a thumbnail in that location. Open template xengallery_rss_content
    PHP:
    {xen:link 'canonical:xengallery/full'$media'd={$media.last_edit_date}'}
    replace with
    PHP:
    {$media.thumbnailUrl}
     
    Chris D likes this.
  6. dotpro

    dotpro Active Member

    Thanks.
    I tried that already, it doesn't display the image then, shows this in sourcecode:
    PHP:
    src="data/xengallery/67/67478-e8d90c3fed0042235744ce6df84a7971.jpg"
     
  7. batpool52!

    batpool52! Well-Known Member

    That is correct.
     
  8. dotpro

    dotpro Active Member

    but it doesn't show the thumbnail image. Its missing the domain in the data/xengallery/ url.
     
  9. batpool52!

    batpool52! Well-Known Member

    Try reading your site's rss feed in firefox.
     
  10. Chris D

    Chris D XenForo Developer Staff Member

    The correct solution would be:

    Code:
    {xen:helper fullurl, $media.thumbnailUrl, true}
    You have to consider that an RSS feed will invariably be read externally, therefore an absolute URL is required.
     
    dotpro and batpool52! like this.
  11. dotpro

    dotpro Active Member

    This works, thank you so much!
     
  12. dotpro

    dotpro Active Member

    It seems there is something different in how content is parsed in the feeds. For years I've used this to display/parse the feeds to show thumbnails only on a webpage (wordpress), just part of the code (magpie rss parser):

    PHP:
    <?php
      
       $url 
    'http://www.myWebSite.com/photos/rssfeed.php?type=rss2' ;
      
       
    $rss fetch_rss($url);
       if (
    $rss) {
           foreach (
    $items as $item ) {

             echo 
    "<li>{$item['description']}</li>";
           }
           echo 
    '</ul>';
         } else {
           echo 
    'There are currently no latest pictures...';
         }
       } else {
         echo 
    '<strong>RSS Error:</strong> The RSS Feed is currently unavailable, please try again in few minutes.' $rss->ERROR '<br / ><br />' ;
       }
    ?>
    echo "<li>{$item['description']}</li>";

    Pulls the pics out of the rss feed and display with link. With xenforo feeds, I've tried replacing that with <p> and also <content:encoded> but no pics show up when parsing with rss parser. The feed does show thumbnails/pics in feedburner or just firefox but not when displaying on a website.
     
    Last edited: Dec 26, 2015

Share This Page