Recent topic, last posted message page Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
3 posters

    Recent topic, last posted message page

    curious_koala
    curious_koala
    New Member


    Posts : 4
    Reputation : 1
    Language : english

    Recent topic, last posted message page Empty Recent topic, last posted message page

    Post by curious_koala February 21st 2018, 12:59 pm

    Technical Details


    Forum version : #phpBB2
    Position : Founder
    Concerned browser(s) : Google Chrome
    Screenshot of problem : http://www.kephost.com/images/2018/02/21/question.png
    Who the problem concerns : All members
    When the problem appeared : Always been like this, I just want to know if it is possible to solve this somehow.
    Forum link : http://0r1g1n4lt34m4rr0w.bestforumonline.com

    Description of problem

    Hey!

    So.. Many people complain about this thing that on the recent topic portal, when you click on the topic's name that a person is posted in it usually throws you to the last page. I use the "recent first" setting in my forums, so the last post that an user creates is on the first page, on the very top.

    So, what I want to know that is it possible to solve that both ways it would throw the user the the very first page to the top, because it can be a little confusing.

    Refering to the screenshot..
    1. The Recent Topics portal. When you click on the topics name and it has multiple pages it throws you to the last. So for example, you have three pages and it throws you on the third one. But the newest message is on the top of the first page. I wish the change this in a way so that when I click on the topic's name it drops me to the first page just like it does with clicking the topic's title on the main forum (2. framed on the screenshot)

    So basically I want them to throw the user on the same page, whatever way they choose to go to the newest post.

    Thank you in advance,

    Koala
    curious_koala
    curious_koala
    New Member


    Posts : 4
    Reputation : 1
    Language : english

    Recent topic, last posted message page Empty Re: Recent topic, last posted message page

    Post by curious_koala February 26th 2018, 11:48 pm

    Anyone?
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19212
    Reputation : 1998
    Language : fluent in dork / mumbojumbo & English haha

    Recent topic, last posted message page Empty Re: Recent topic, last posted message page

    Post by Ape February 27th 2018, 12:19 am

    sadly this can't be changed sorry



    Recent topic, last posted message page Left1212Recent topic, last posted message page Center11Recent topic, last posted message page Right112
    Recent topic, last posted message page Ape_b110
    Recent topic, last posted message page Ape1010
    Wecoc
    Wecoc
    Forumember


    Male Posts : 144
    Reputation : 111
    Language : Catalan, Spanish, English

    Recent topic, last posted message page Empty Re: Recent topic, last posted message page

    Post by Wecoc March 2nd 2018, 8:18 pm

    Go to the template Portal > mod_recent_topics

    If you are using the scroll version search this (line 13)

    Code:
    <a href="{scrolling_row.recent_topic_row.U_TITLE}"

    and edit it with this:

    Code:
    <a id="recent_link" href="{scrolling_row.recent_topic_row.U_TITLE}"

    If you are using the non-scroll version search this (line 40)

    Code:
    <a href="{classical_row.recent_topic_row.U_TITLE}"

    and edit it with this:

    Code:
    <a id="recent_link" href="{classical_row.recent_topic_row.U_TITLE}"

    I just inserted this in both, inside the a tag to identify the links later: id="recent_link"

    I didn't put the entire line because the forum replaces some special characters.



    After doing that you will have to insert this javascript.
    Name: Recent topics
    Placement: In all pages

    Code:
    /* Recent topics feature - Go to first post instead of the last one */

    $(function() {
      $('a#recent_link').filter(function() {
        var href = this.getAttribute("href");
        this.setAttribute("href", href.replace(/#(\d*)/, ''));
      });
    });

    Hope it works Wink