Preview length

Request new functionality here
justauser
Bear Rating Master
Bear Rating Master
Posts: 133
Joined: 23 Mar 2013, 20:37

Preview length

Postby justauser » 28 Apr 2013, 20:04

In the latest pull I see that you've changed the preview length to 200 characters. For me this is too much as I read in the 3 column mode. I suspect for folks reading in the top/bottom split it isn't as big of an issue and they may prefer the extra preview. this is very much a "matter of taste" and unfortunately can't be really fixed in css. can I suggest that this be moved to a preference instead of a hard coded value.

I know that changing it is easy, but changing it in the code means having to check make such a change after pulls. As another option, how about moving this to the config.php?

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

Re: Preview length

Postby fox » 28 Apr 2013, 20:34

Yes, let's add three preferences for each of the modes. Sounds like an excellent idea.

Bonus points for the config.php mention. You win a bear.

Edit: you should be able to modify excertps using the appropriate handler, why not use that. You can even add a preference or ten.

justauser
Bear Rating Master
Bear Rating Master
Posts: 133
Joined: 23 Mar 2013, 20:37

Re: Preview length

Postby justauser » 01 May 2013, 22:20

Long time programmer, new to PHP, but I will try that.

I guess I don't understand why such preferences, which are very much matters of taste, can't be extracted into some easy place for users to mod without having to write code. It *is* your app, so you can do what you like, but my thought is that you can get less annoying requests if all of this user tuning can be easily changed with a caveat to users that you will only address bugs when *all* settings are at defaults. Of course, I know that users will change these settings and still send you the bug, no matter what you say, so maybe burying these actually reduces the number of annoying bugs/feature reports you get.

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

Re: Preview length

Postby fox » 01 May 2013, 23:26

As a long time programmer you should be capable of understanding that too much preferences makes the application unusable for everyone except for aspergers suffering hardcore tweakers. Unless you are a shitty programmer who considers applications like titanium backup have actually workable UX.

Unfortunately for the aforementioned tweakers I'm not making terrible software littered with endless knobs. If you want something like that, consider using something else. If anything, in the future while plugin system is further enhanced the amount of options in tt-rss core will be reduced, not increased. At least, that is the goal.

There will be no "registry", no advanced configuration database, no shit like that. The defaults for cosmetic stuff might obviously get adjusted, but that's about it.

Also, I have posted on this very subject multiple times. If you ever searched or read anything before generating more and more pointless posts here you would have been aware of this. Consider this an official warning. Either your posting style drastically changes or you will leave.

User avatar
blainemono
Gaping Anus of Eternity
Gaping Anus of Eternity
Posts: 246
Joined: 05 Jun 2009, 18:13

Re: Preview length

Postby blainemono » 01 May 2013, 23:33

fox wrote:I'm not making terrible software littered with endless knobs.


that's what this forum is for amirite

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

Re: Preview length

Postby fox » 02 May 2013, 01:42

The sheer amount of knobs is hard to argue against.

atrus
Bear Rating Trainee
Bear Rating Trainee
Posts: 17
Joined: 19 Apr 2013, 20:03

Re: Preview length

Postby atrus » 02 May 2013, 02:17

Having arbitrary hard-coded constants sprinkled through the code base isn't exactly clean either. If they have to live somewhere, a "config" file of some kind isn't all that bad idea.

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

Re: Preview length

Postby fox » 02 May 2013, 09:23

Almost everything that might need to be changed can actually be overridden using config.php if you know the constant name, it's only the purely cosmetic stuff like this and a few timer values that are not accessible because it's not worth it.

Most of the constants are not advertised because it's usually the stupid people who are the tweakers, so they would fuck thing up horribly and then come here crying because it doesn't work anymore. Which is why there's no "advanced config.php" or something like that, because that would be the first place for a tweaker to fuck up. Because they are power users, you see.

Android ecosystem is a great example of this in action. Fuckwit tweakers changing stuff they don't understand while other retards blindly follow them because of the placebo effect: every android forum ever essentially.

>If they have to live somewhere, a "config" file of some kind isn't all that bad idea.

You can only stuff so much in config.php before it becomes a byzantine mess nobody will ever read through because it's too large and boring. Which is why only relatively important stuff is configurable there.

justauser
Bear Rating Master
Bear Rating Master
Posts: 133
Joined: 23 Mar 2013, 20:37

Re: Preview length

Postby justauser » 03 May 2013, 15:59

thanks for the reply. I am not sure why my previous post pissed you off as I was just trying to discuss/understand. I had searched and I didn't see anything about this issue of config files and options that you feel so strongly about.

justauser
Bear Rating Master
Bear Rating Master
Posts: 133
Joined: 23 Mar 2013, 20:37

Re: Preview length

Postby justauser » 09 May 2013, 00:04

I am trying, as you suggested, to create a plugin to format the preview as I wish. It seems to me that in feeds.php at line 414 (pulled the AM), which is:

Code: Select all

if (!get_pref('COMBINED_DISPLAY_MODE')) {


no handler is called at all, and I would have expected to see something like:

Code: Select all

foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_RENDER_ARTICLE) as $p) {


and before this part of the code, at 353, you've already done this:

Code: Select all

if (get_pref('SHOW_CONTENT_PREVIEW')) {
               $content_preview = truncate_string(strip_tags($line["content_preview"]),
                  250);
            }


so if the handler was in this first part of the if I couldn't do anything to affect the preview display. In the other part of the if, you call HOOK_RENDER_ARTICLE_CDM plugins, but when you generate content you use this:

Code: Select all

$reply['content'] .= "<span $excerpt_hidden
                  id=\"CEXC-$id\" class=\"cdmExcerpt\"> - $content_preview</span>";


which is set above and not what the plugin might set as line["content_preview"]

I am still trying to understand the structure so I might have missed a bunch and any help is appreciated.


Return to “Feature requests”

Who is online

Users browsing this forum: No registered users and 4 guests