Kitz Forum

Announcements => Site & Forum Discussion => Topic started by: Weaver on January 22, 2018, 11:14:12 PM

Title: Feasibility - date order / reverse chronological listing of posts
Post by: Weaver on January 22, 2018, 11:14:12 PM
[I'm convinced I have mentioned this before, please do accept my apologies - pain and drugs again.]

Feature request - Is the following feasible? I do understand our leader and team have enough to do.

I’d love to have a really fast way of toggling reversing the chronological order in which posts in a thread are displayed. Normally I have things set to ‘show most recent post at the top’. I sometimes want to go to an old thread and read from the beginning, so I want to read that thread in normal chronological order, but to achieve that means digging around in settings making the change, saving it, getting back to where I was because I forgot to open a second window, and then later going back into settings a second time to put things back.

Is there some trick I could use myself?

Is the forum's engine up to allowing any customisation so as to add a readily accessible UI element? (If our dev gods are feeling really bored.)
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: Westie on January 22, 2018, 11:44:30 PM
This may not work for you; but it works for me using Safari on an iPad:

I have saved the 'Look & Layout page' of my profile as a favourite. When I get to a thread that I want to change the order of, I
1. Open a new browser tab (which automatically shows the favourites)
2. Select the "Profile" page saved previously and select the order I want the thread displayed as
3. Select the previous tab, showing the thread I'm interested in
4. Hit the "reload" thingy, and voila!  ;D

When I've done with that thread I select the "Profile" tab and revert to previous settings.

It might be rather inelegant, but it works for me!
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: kitz on January 23, 2018, 12:10:18 AM
Unfortunately whilst there is a quick toggle for thread view, there isn't any option for posts within a thread and that is set within the user's profiles preferences.

SMF is basically software that interacts with the database and I am restricted to what is there is the CORE.   You can make cosmetic changes such as themes fairly easily, but that's more to do with colours and images.    Whilst it is not impossible to change anything you want within the core, problems arise when security updates and patches are released and they won't install to certain modified code.   I've been burnt before with this several times thinking I was clever by making highly adaptive customisation.   It took a long time to sort and I ended up having to reinstall a fresh brand new version from scratch and import the old database.  I vowed never to do that again.   Even more recently I got caught out with an approved SMF mod that stopped a security patch despite it being packaged. 

So whilst I could tell porkies and say its impossible, instead I shall tell the truth which is that it is possible, but it would mean manual coding in parts of code where I wouldn't even begin to know where to look (it contains massive amounts of code)  and then after I'd done that, there would be the strong probability it would affect any future updates, because they wont install if it detects any changes in the CORE code.

-----

I tend to have newest post as last set.   That way its easy to read the whole thread chronologically if you want..  but by default clicking on the 'new' button will always take you to the first unread post if there are any new additions to the thread.
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: Weaver on January 23, 2018, 12:19:28 AM
> but by default clicking on the 'new' button will always take you to the first unread post if there are any new additions to the thread.

I'm being dense here Kitz? (just taken three different types of pills.)
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: banger on January 23, 2018, 02:45:12 AM
New button on Thread title on thread list. Does that help?
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: kitz on January 23, 2018, 02:48:09 AM
It looks like this (https://forum.kitz.co.uk/Themes/KitzBlue/images/english/new.gif)
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: jelv on January 23, 2018, 08:42:02 AM
I've never under stood why anyone would want to use the reverse date order option! It only works sensibly if there has only been ONE new reply since you last visited the topic. If there is more than one you have to scroll down to find the first unread post and then read back up the topic. If there's more than a page worth of new replies you have to go to the next page(s) and then read backwards. If any of the replies take up the full screen you are scrolling up and down - all in all an absolute pain!

Using the (https://forum.kitz.co.uk/Themes/KitzBlue/images/english/new.gif) link beside the topic title as the others suggested works perfectly in all circumstances (any number of posts over any number of pages) and you always are just reading down the screen.
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: jelv on January 23, 2018, 08:53:59 AM
Kitz: It's not uncommon for people to have not found the new button functionality (I have it at the back of my mind that I may have told you about it on the PUG forums many, many, many years ago).

If there a simple way which doesn't mess anything up or cause upgrade issues you could add the following to the top of all forum pages listing topics (or all pages if that is too difficult) - maybe outside the forum container?

Quote
Click (https://forum.kitz.co.uk/Themes/KitzBlue/images/english/new.gif) to go to first unread post in a topic (logged in users only)
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: d2d4j on January 23, 2018, 09:26:50 AM
Hi

Sorry slightly off topic but you could try Tapatalk

I use this and in most part, I like it and prefer it over accessing from a browser

You can instantly see any new post, follow threads etc

If you click into a thread, you can either go back/forward 1 page or goto start of thread/end of thread with a single touch

I use the free version which displays ads periodically but not an issue to me

I hope you don’t mind me putting Tapatalk forward

Many thanks

John
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: Weaver on January 23, 2018, 09:34:33 AM
Ah! I never new that was a link or a button. It's a clickable link? I just thought it was an annotation - a marker meaning that there is new stuff to be seen in the the thread.

All these years and it has never occurred to me to click on it because to me it doesn't look like a link (and 'new' isn't a verb).

I think I will probably just forget about reverse chronological order altogether now I know about this. Many thanks for that excellent guidance!
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: jelv on January 23, 2018, 10:42:15 AM
Ah! I never new that was a link or a button.

I only found it by accident. There's a lot of links on many websites that is not immediately obvious they are links (e.g. the breadcrumbs on these forums, or the heading on a quoted post), you only find them by wandering the mouse over them and seeing when the cursor changes shape.
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: jelv on January 23, 2018, 11:22:13 AM
@Kitz

I'd bet that Weaver wasn't the only person who didn't realise new was a link. I wonder if in addition to my suggestion above a simple change of the image to add a little arrow may help.
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: Westie on January 23, 2018, 12:03:20 PM
Ah! I never new that was a link or a button.

Neither did I!  :blush:

... the breadcrumbs on these forums

What are these?

Quote
you only find them by wandering the mouse over them and seeing when the cursor changes shape.

Since I use an iPad, this facility is not available to me.  :no:
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: Ronski on January 23, 2018, 01:21:59 PM
I didn't realise that the new icon was a link either.
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: jelv on January 23, 2018, 02:36:45 PM
... the breadcrumbs on these forums

What are these?

See attached (the last takes you to the first post in the topic).

https://en.wikipedia.org/wiki/Breadcrumb_(navigation) (https://en.wikipedia.org/wiki/Breadcrumb_(navigation))

[Moderator edited to fix the broken link.]
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: Westie on January 23, 2018, 02:58:08 PM
Thanks, @jelv.

I've been using them for navigation for ages, but didn't know they had a name. Doh!
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: jelv on January 23, 2018, 03:35:53 PM
Would the attached help?
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: jelv on January 23, 2018, 03:43:50 PM
Also, I notice there is no alt or title on the new images so nothing pops up on mouse-over - can that be done without consequences?
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: Black Sheep on January 23, 2018, 06:29:05 PM
I also wasn't aware that the 'new' wording was actually a link, and have voted as such in your poll.
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: jelv on January 23, 2018, 06:34:06 PM
@Weaver

I suspect a number of people are grateful to you for raising this topic as they will have leant a more efficient way of using the forums as a consequence!
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: kitz on January 23, 2018, 07:35:29 PM
Would the attached help?

Cheers has to be a transparent gif, but Ive sorted that and uploaded new image.   I wasn't sure if it would accept a different size, but it appears to be OK with it.   
Browser refresh should show the new 'new'.

Atm I don't see anyway that I can easily change anything.   This isn't specific to this forum and applies to all SMF forums. 
I too had noticed the lack of an alt tag earlier..    but this appears to be exactly the same on the main SMF forum.   I have asked if it can be added as a feature request - link (https://www.simplemachines.org/community/index.php?topic=558514.0)
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: Weaver on January 23, 2018, 09:51:36 PM
It's a difficult question, that of how a user decides if a ui object is clickable or not.

On some systems there is no such thing as ‘hovering over a link with a mouse’, because there is no mouse. And if not then there is no opportunity to use mouse cursor icon shape changing as a visual hint technique to indicate what happens if the user clicks on something.
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: jelv on January 23, 2018, 10:57:30 PM
Just had an idea.

Is the "Total time logged in: " in a file you can alter with minimal consequences? If so could you prefix it with

Quote
Click (https://forum.kitz.co.uk/Themes/KitzBlue/images/english/new.gif) to go to first unread post in a topic (logged in users only)

and a line feed?
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: kitz on January 24, 2018, 01:48:25 PM
I honestly don't know Jelv.

There's circa 100 php files that make up the Core.    These then all link to language files.   eg it doesnt just say in the code print "Blah Blah" each item will have a specific item name which then pulls up something or other depending upon which language.

The Core is massive containing millions of lines of code.   I think the suggested section will be somewhere within Profile-View.php which is just one page of many in the core [see below].   It may not even be there.   I don't know enough about the inner workings of basically what is a massive software program and I don't know what I'm doing.

Whilst I do understand what you guys are getting at and I fully agree that its not clear what the NEW button is and does, this exists within the actual software.   It is only because it is open source that practically anything is able to be modified if you have the knowledge to do so, but you then have to be prepared to manually modify any security updates too.   

I'm not trying to be awkward by saying no, but this really is something I don't want to do because it involves core files.   Trying to think of a simple way to explain it.    Its like any program,  the user can change things like display, default fonts, or perhaps even which buttons appear or colour of the ribbon bar.    But this is something deeper inside the program depending upon code that is normally not available.   However in this instance it is available because its open source.    Its kind of like me adding a new function to MS Word or getting your browser to do something different.   Its down to the devs to do that.   Yes there are some guys who are capable of doing this too and thats what 'mod packages' are about, but even before they are released they have to be approved by SMF to make sure they dont break anything and are packaged correctly.

Atm even several official mods are broken and wont work after security updates.  I use Stop Spammer and that stopped me being able to do an important security update before xmas. In the end I had to uninstall it and run with reduced spam protection for a few weeks until that was fixed.. and quite a bit of my time and even so its a botch fix.  There's also another official mod I would really like to use, but that too wont work after the last security update because it affects core files.

I didn't dismiss it out of hand at first and I did spend a couple of hours looking into it to see if there was an easy solution, but sorry guys I'm not touching anything to do with the Core files.


---
Edited to remove attachment
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: Westie on January 24, 2018, 03:55:39 PM
I think that's a wise decision, kitz.

When a program contains code like
Code: [Select]
// Let's use a generic list to get all the current warnings, and use the issue warnings grab-a-granny thing who knows what might be lurking in it's hidden depths?  :D  ;)
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: jelv on January 24, 2018, 11:20:17 PM
I've downloaded and set up a basic SMF installation. Finding the file(s) that would need modifying was a doddle.

Themes\default\language\index.english.php has the string:
Code: [Select]
$txt['totalTimeLogged1'] = 'Total time logged in: ';
It is used in Themes\core\index.template.php (search for totalTimeLogged1):
Code: [Select]
    // If the user is logged in, display stuff like their name, new messages, etc.
    if ($context['user']['is_logged'])
    {
        echo '
                <ul class="reset">
                    <li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
                    <li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

        // Is the forum in maintenance mode?
        if ($context['in_maintenance'] && $context['user']['is_admin'])
            echo '
                    <li class="notice">', $txt['maintain_mode_on'], '</li>';

        // Are there any members waiting for approval?
        if (!empty($context['unapproved_members']))
            echo '
                    <li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=admin;area=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';

        // Show the total time logged in?
        if (!empty($context['user']['total_time_logged_in']))
        {
            echo '
                    <li>', $txt['totalTimeLogged1'];

            // If days is just zero, don't bother to show it.
            if ($context['user']['total_time_logged_in']['days'] > 0)
                echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

            // Same with hours - only show it if it's above zero.
            if ($context['user']['total_time_logged_in']['hours'] > 0)
                echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

            // But, let's always show minutes - Time wasted here: 0 minutes.
            echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '
                    </li>';
        }

        if (!empty($context['open_mod_reports']) && $context['show_open_reports'])
            echo '
                    <li><a href="', $scripturl, '?action=moderate;area=reports">', sprintf($txt['mod_reports_waiting'], $context['open_mod_reports']), '</a></li>';
        echo '
                </ul>';
    }

Contrary to what I suggested I'm thinking it might be easier to insert a line in the second file immediately after
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';


I'll have a go in the next day or so and if it works let you have the URL to have a look and give you the code. If it just comes down to inserting a single line it would be easy to take it out before you attempt any upgrade/patch and then re-add it after which would reduce the risks.

Edit: It wouldn't need the "(logged in users only)" as the bit I'm suggesting adding to is only displayed for logged in users.
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: jelv on January 25, 2018, 12:29:21 AM
Something like the attached screen shot fit the bill?

To do this I removed the '; from the end of the first line and added the second.

Code: [Select]
                    <li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
                    <li>Click <img src="', $settings['lang_images_url'], '/new.gif"> to go to first unread post in a topic</li>';

If you like I'd be happy if you sent me KitzBlue to check it works with your theme.
Title: Re: Feasibility - date order / reverse chronological listing of posts
Post by: Weaver on January 25, 2018, 01:09:28 AM
I completely appreciate Kitz' point about making trouble for yourself when updates keep overwriting customisation work you have done and the cost of repeatedly reintegrating patches of your own mounts up and up and up, and there's also the risk of things breaking because your patch is now incompatible with the new core code.

I did this for a living for sixteen years, working on operating systems and associated bits for seven years so I do know.

Is there any easily and safely customisable place where a note could be parked that advertises the valuable ‘new’ feature? And without looking a mess and setting a horrid _precedent_ too. I have no idea where and it's a psychology question, I never notice good things, I’m the absolute worst user for remaining in the dark about feature-availability.