MyBB Community Forums

Full Version: Limit RSS output?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
By default, MyBB's RSS feed outputs the full content of the post.

How can I make it so it only outputs the first let's say 15 or 20 characters? Similar to what WordPress does with it's feeds.
in syndication.php
find
$thread['message'] = $parser->parse_message($thread['message'], $parser_options);
add after it
if(my_strlen($thread['message']) > 60){
			$thread['message'] = my_substr($thread['message'], 0, 60);
		}

change 60 to suit your needs (Note: I didn't test it)
That worked, thanks.

One more quick question, how can I make it so that it displays a ... after the post gets cut off. So for example for something like "Hi my name is Steve" once it gets cut off, it should look like "Hi my name is..." instead of "Hi my name is"

Thanks again.
if(my_strlen($thread['message']) > 60){
            $thread['message'] = my_substr($thread['message'], 0, 60).'...';
        } 
Thanks, that worked great Smile