Tiny Tiny RSS: Community

Changing the truncation size for the summary


#1

I need to provide an aggregated feed with the summary limited to 350 chars. By default TT-RSS limits the summary to 100 chars.
I found that the classes/handler/public.php contains the following code for both json and atom

$line[“content_preview”] = truncate_string(strip_tags($line[“content_preview”]), 100, ‘…’);

Is it safe to just change the truncate value from 100 to 350? Or are there other dependencies elsewhere?


#2

it should be safe, as long as you understand that technically you’ll be using a fork from now on


#3

Isn’t that part of the code run a plugin hook?

Yeah… HOOK_QUERY_HEADLINES and HOOK_ARTICLE_EXPORT_FEED. Writing a simple plugin would mean you wouldn’t have to make sure your fork of the code works forever.


#4

Cool, thanks a lot :smile: