Tiny Tiny RSS: Community

Adjust excerpt length for generated feed/s?


n00b question: aside from excerpt length being governed by individual feed supplier/s,
can I adjust how much of served excerpts is displayed in generated feed/s? I’ve seen Feeds having author fields exceeding the 245 char length limit and wonder if I can just change the value for excerpt someplace? (so that preview cards show a little more additional information on posts if available from the feed)

Thank you, as always. :slight_smile: LX


i think this is configurable via a plugin hook, so you’ll need to write a simple plugin (and enable it) to adjust this.


thank you, @fox;
is there any documentation to get me going in the right direction?
I’ve never done this before :confused:

[add / edit:] because, uh … https://git.tt-rss.org/fox/tt-rss/wiki/MakingPlugins [/edit]


so I dove into feeds.php and tried to blunt my way thru :stuck_out_tongue: changing

$line[“content_preview”] = "— " . truncate_string(strip_tags($line[“content”]), 500);

			foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) {
				$line = $p->hook_query_headlines($line, 500, false);

			if (get_pref('SHOW_CONTENT_PREVIEW')) {
				$content_preview =  $line["content_preview"];

the 2 occurences of '250 to ‘500’ - but without effect :confused:


I’m wondering why such a basic preference is not available on the settings / backend?


#nevermind, did some more digging and found the change to be made; in
.\classes\handler\public.php anyone facing the same problem as me can change the value ‘100’ in the line

			$line["content_preview"] = sanitize(truncate_string(strip_tags($line["content"]), 100, ' ...'));

to whatever they find a better fit.

Perhaps someone other than myself (because I don’t know how to do that) can add the information how to put that into a form that will survive updates. But for me + for now, this will do.