Creating a mobile "last post" link

  • I'm bringing this from another thread for the sake of neatness. I want to add a permanent button/link to the mobile thread list in order to go to the last post.


    I'm trying to insert this link into the threadlist template...


    The options thus far to turn the "last post time" into a link, and to replace:


    <li class="messageGroupLastPostTimeMobile">{@$thread->lastPostTime|time}</li>


    With this:


    <li class="messageGroupLastPostTimeMobile"><a href="{link application='wbb' controller='Thread' object=$thread}action=lastPost{/link}"><strong>{@$thread->lastPostTime|time}</strong></a></li>


    However, it doesn't actually work as the entire cell itself is a link/button and that takes priority. :/


    A suggestion from this thread is to add this to the css:

    Which brings back a mini avatar to click on. A bit cluttered and not ideal, but it almost works.


    HOWEVER. The problem here is that the cell is no longer a button, but it still gets and stays highlighted when it's clicked, thus causing a little confusion - it also affects the "recent activity" section of the dashboard by doing the same.


    So, can anyone help me to integrate the two ideas above and help me to make a "go to last post" button that works for mobile view? :)

    Edited 4 times, last by Moonclamp ().

  • Moonclamp

    Changed the title of the thread from “Mobile view "last post" link” to “Creating a mobile "last post" link”.
  • Hi,


    the cell is no longer a button because you added this code :


    Code
    .mobileLinkShadow
    { display :none;
    }

    Remove this, it should work :)

  • I'm not sure to understand, can you send us a link with screenshot to uderstand ?

    If your CSS code affects others parts, you should be more precise in your CSS code, to be sure it affects only the part or page you want.

    For exemple instead of adding this :

    Code
    .badge
    {display : none
    }

    Add this :

    Code
    .wbbCategory .wbbBoardNode1 .wbbBoardMain .badge
    {display : none
    }
  • Hi,


    the cell is no longer a button because you added this code :


    Code
    .mobileLinkShadow
    { display :none;
    }

    Remove this, it should work :)

    Let me try to explain more.


    I don't want it to be a button, and (in mobile view) I also want it to stop highlighting when I click it.

  • That's not it.


    I'm going to go back to the start.


    Stage one - in mobile view, to turn the "last post time" into a link:


    Open/Copy template "threadlist"

    Find:

    <li class="messageGroupLastPostTimeMobile">{@$thread->lastPostTime|time}</li>
    Replace with:

    <li class="messageGroupLastPostTimeMobile"><a href="{link application='wbb' controller='Thread' object=$thread}action=lastPost{/link}"><strong>{@$thread->lastPostTime|time}</strong></a></li>


    Theoretically this turns the timestamp into a link. However...


    Stage Two


    In mobile view the cells are buttons and clicking the cell goes to the start of the thread -- so I have to remove all that functionality (including the colour change) or I cannot click the link in stage one.