Show entire feed title text instead of fitting in one line?

Development-related discussion, including bundled plugins
amit
Bear Rating Trainee
Bear Rating Trainee
Posts: 20
Joined: 12 Jan 2012, 13:13

Show entire feed title text instead of fitting in one line?

Postby amit » 12 Jan 2012, 13:31

(Sorry for so many posts / requests in one go..)

Some of the feeds I subscribe to put a lot of text in the feed title, causing the text to be truncated by tt-rss. I generally mouseover the text, and the entire title text is then shown in a popup. I request to have an option to show the entire title text without truncating it.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Show entire feed title text instead of fitting in one li

Postby fox » 12 Jan 2012, 14:31

Again, would be very easy to tweak in the code. :) I can provide details if you try it and have trouble finding the necessary parts.

amit
Bear Rating Trainee
Bear Rating Trainee
Posts: 20
Joined: 12 Jan 2012, 13:13

Re: Show entire feed title text instead of fitting in one li

Postby amit » 17 Feb 2012, 16:24

Thank you; details on which code to modify would help. I've tried, unsuccessfully, to do this. I'm not used to php/web programming, and I might be overlooking even basic stuff.

User avatar
gmargo
Bear Rating Disaster
Bear Rating Disaster
Posts: 62
Joined: 08 Jan 2012, 22:33
Location: Silicon Valley

Re: Show entire feed title text instead of fitting in one li

Postby gmargo » 18 Feb 2012, 00:22

In order to avoid the title truncation, edit "classes/feeds.php" and remove the "truncate_string()" function from the lines with an "RTITLE" id.

Here's a patch that should do what you want:

Code: Select all

diff --git a/classes/feeds.php b/classes/feeds.php
index 2f4870f..fff63ca 100644
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -475,7 +475,7 @@ class Feeds extends Protected_Handler {
                $reply['content'] .= "<a id=\"RTITLE-$id\"
                   href=\"" . htmlspecialchars($line["link"]) . "\"
                   onclick=\"\">" .
-                  truncate_string($line["title"], 200);
+                  $line["title"];
 
                if (get_pref($this->link, 'SHOW_CONTENT_PREVIEW')) {
                   if ($content_preview) {
@@ -569,7 +569,7 @@ class Feeds extends Protected_Handler {
                   title=\"".htmlspecialchars($line['title'])."\"
                   target=\"_blank\" href=\"".
                   htmlspecialchars($line["link"])."\">".
-                  truncate_string($line["title"], 100) .
+                  $line["title"] .
                   " $entry_author</a>";
 
                $reply['content'] .= $labels_str;

amit
Bear Rating Trainee
Bear Rating Trainee
Posts: 20
Joined: 12 Jan 2012, 13:13

Re: Show entire feed title text instead of fitting in one li

Postby amit » 20 Feb 2012, 10:35

Thank you, that works.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 3 guests