The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

#latest Thread Links

ZekZek Registered User regular
An annoyance I've been having since the new forums were launched is the way the main topic link works when you click on a thread. It links to a #latest URL that takes you to the first unread post in that thread. That's fine and good, but the problem is that this is a dynamic link - when you hit refresh, it checks again for the first unread post and takes you there, often taking you to a different page when you weren't done reading the first one. Would it be possible to make the links instead point directly to the post that was newest at the time, and if you refresh it still goes to that post?

Posts

  • IcyLiquidIcyLiquid Two Steaks Montreal, QuebecAdministrator, Vanilla Staff vanilla
    It wouldn't, actually, because then we'd have to load that data in advance of rendering the thread link. We would always be loading your "how much have I read" data on every thread list and the forums would shit the bed.

    Sorry :/

  • ZekZek Registered User regular
    edited June 2013
    Well, I'm not sure how much control you guys have but wouldn't it be possible to do a redirect on the backend? i.e. when the server receives a request to the #latest URL it does a redirect to the literal comment so that's the address the user has in their URL bar.

    (that said it seems to me that we already have that data in the thread list since it knows the # of new posts there are)

    Zek on
  • IcyLiquidIcyLiquid Two Steaks Montreal, QuebecAdministrator, Vanilla Staff vanilla
    Which would mean that every page load is 2 page loads.

  • ronyaronya Arrrrrf. the ivory tower's basementRegistered User regular
    wouldn't it just be a judicious url_rewrite

    aRkpc.gif
  • TubeTube Registered User admin
    You can probably trust the guy that coded the forums on how the forums work.

  • EndEnd Registered User regular
    edited June 2013
    dang, I really hated the back/forward button being broken.

    Doing a redirect sounded like the "correct" way to fix it, but if that's not in the cards, maybe there is another way, such as using a bit of javascript? It's a new html5 feature, so obviously it wouldn't work for every browser.

    As a proof of concept, I wrote a little user script. Under chrome, it seems to hold up against the small amount of testing I've thrown against it.

    Edit: first version didn't like single page threads, updated link

    End on
    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpg
  • ZekZek Registered User regular
    End wrote: »
    dang, I really hated the back/forward button being broken.

    Doing a redirect sounded like the "correct" way to fix it, but if that's not in the cards, maybe there is another way, such as using a bit of javascript? It's a new html5 feature, so obviously it wouldn't work for every browser.

    As a proof of concept, I wrote a little user script. Under chrome, it seems to hold up against the small amount of testing I've thrown against it.

    Edit: first version didn't like single page threads, updated link

    I think that's definitely a workable solution. If nothing else you could just use JS to erase the #latest which is better than nothing. I may take a stab at it later today.

  • EndEnd Registered User regular
    edited June 2013
    the #latest just takes you to the comment on the page, so removing that won't change where end up on a different page if you revisit

    (also did you not see the link where I did implement it?)

    End on
    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpg
  • ZekZek Registered User regular
    I meant for the single page thing, didn't see you fixed it. As usual JS is rad, thanks for that.

  • EndEnd Registered User regular
    oh, right

    Yeah, a proper implementation would probably have an easier time determining the "real url". Having nothing better that I can see, I pull the url from the page buttons on the top/bottom or if those don't exist, assume we're on the first page.

    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpg
  • ASimPersonASimPerson Cold... ... and hard.Registered User regular
    Just tried this with GreaseMonkey and Firefox 22, looking good so far.

Sign In or Register to comment.