How to summarise posts in serendipity rss feeds (part 2)


Trackbacks

No Trackbacks

Comments
Display comments as (Linear | Threaded)

*Can't seem to get this to work, everytime I post the .rss page to the server I am getting an error "Invalid at the top level of the document. Error processing resource", can you tell what I might be doing wrong. Currently I am going to http://www.golfetail.com/cblog/feeds/index.rss1 taking that content, making the changes above and then saving as a .rss file and posting it on the server. That is when the error occurs. Can you help?
Abdussamad Abdurrazzaq
1.1
*You're not supposed to modify the s9y generated .rss file but the .tpl feed files in your cblog/templates/default folder. Please refer to part one of my post:

http://abdussamad.com/archives/88-How-to-summarise-posts-in-serendipity-rss-feeds.html

Alternatively you can just download the whole set of .tpl feed files linked in the last paragraph of this post and place them in your default templates folder.
*Thanks for your response, that cleared things up for me. I have it working using your code. Is it possible to truncate the content to less the 250 characters? I changed 250 to 100 in the code, but that did not work, do I need to do something else?
Abdussamad Abdurrazzaq
*It should work if you made the change in all the files. You should replace this:

{$entry.feed_body|@strip_tags|@truncate:250:false}

with this:

{$entry.feed_body|@strip_tags|@truncate:100:false}
*Okay, I realized that it was pulling content from the postsummary. I removed the postsummary content and now all the feed is showing is the name of the blog. Any ideas?
Abdussamad Abdurrazzaq
2.1
*The postsummary field has to be *completely * empty. That means not even a single space or new line character. So check it again.
*Thank you so much...I did have a space in the post summary and would have never figured that out. Another quick question, what is the best way to manipulate the blog font to match the font on your page?
Abdussamad Abdurrazzaq
*You will have to edit the styles.css file in your chosen theme's folder. You could try setting the body font:

body
{
font-family:verdana,sans serif !important;
}

IF that does not work you'll have to set the font for each of the page elements individually. For ex: the blog post body:

.serendipity_entry_body
{
font-family:verdana,sans serif !important;
}

Add Comment


Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

You can use [geshi lang=lang_name [,ln={y|n}]][/lang] tags to embed source code snippets
Gravatar/Favatar supported