RSS and image thumbnails

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
dom97
Regular
Posts: 20
Joined: Sun Feb 18, 2007 9:59 pm

RSS and image thumbnails

Post by dom97 »

I would like to have my image thumbnails not to be clickable or viewable to a larger image in the RSS feeds. Anybody have the code to change this? Just be able to view thumbnails in RSS and not the full image.
Would like the RSS user to go directly to the Entry on the blog when clicking on the title of the entry in the RSS.

Thanks
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: RSS and image thumbnails

Post by garvinhicking »

Hi!

That's not so easy. You would need to write a plugin or smarty function call that strips image links (by it's HTML) for the RSS feeds.

What you can do is to strip all RSS feed body text, so that the RSS readers will only get your headlines and need to go to the blog.

For that, edit your feed_*.tpl template files (copy them over from templates/default/ to your custom template directory, if yours doesn't have them). Then edit each of these files and remove those parts:

(feed_0.91.tpl, feed_1.0.tpl)

Code: Select all

    <description>
        {$entry.feed_body|@escape} {$entry.feed_ext|@escape}
    </description>
(feed_2.0.tpl)

Code: Select all

    <content:encoded>
    {$entry.feed_body|@escape} {$entry.feed_ext|@escape}
    </content:encoded>
(feed_atom0.3.tpl, feed_atom1.0.tpl)

Code: Select all

            <div xmlns="http://www.w3.org/1999/xhtml">
                {$entry.feed_body} {$entry.feed_ext}
            </div>
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply