Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Change order of comments (forum jumps to bottom)

Ok ive played to death with this great forum, i wanted a nice looking clean forum to use on a site of mine.
im no stranger to this kind of stuff as im a web developer, But one thing is bugging me i cant fid lol.
Why when the forum loads does it jump to the bottom of the page. Id like it to stay at the top.
I notice this on several themes and showcase sites.
thanks

Comments

  • Options
    422422 Developer MVP

    jumps to last read comment look at the # after the url, which represents the comment id

    There was an error rendering this rich post.

  • Options

    Yes got that but it dont solve the issue, It not a big deal its just i wanted it to jump to top thats all

  • Options
    scotty68scotty68 New
    edited March 2013

    thanks

  • Options
    ShadowdareShadowdare r_j MVP
    edited March 2013

    This isn't a fix, but it's a workaround. You can add this code somewhere in your theme:

    <script type="text/javascript">
    if (location.hash) {
        window.scrollTo(0, 0);
    
        setTimeout(function() {
            window.scrollTo(0, 0);
        }, 1);
    }
    </script>
    

    This will cause the page to jump back to the top after it loads.

    Add Pages to Vanilla with the Basic Pages app

  • Options

    Thanks ill give it a go

  • Options
    peregrineperegrine MVP
    edited March 2013

    if you don't want to go the last item, this will take the hashtag off of it completely and just go to the page, which since you reversed the comments with most recent on top is probably what you want.

    $Configuration['Vanilla']['Comments']['AutoOffset'] = FALSE;


    if you use Shadowdare's approach --

    if your forum is embedded you may need to modify shadowdare's jquery. I use both of these just in case of embed.

    parent.window.scrollTo(0, 0);
    window.scrollTo(0, 0);
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    ok got it now thanks guys

  • Options
    peregrineperegrine MVP
    edited March 2013

    to belabor the point.

    @422 has a nice little uparrow slider in a few of his themes

    @phreak also has a nice navigational arrow on his theme.

    and pagenavigtor plugin has the scrollto built into it.

    And for my opinion - there seems no need for comment reverse sorting because since the added the hash tags to go directly to the last unread message assuming
    $Configuration['Vanilla']['Comments']['AutoOffset'] is not in your config.php

    there seems no need for it - but that is a user preference thing

    which solution did you end up using?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    to be honest i tried em all and none worked, its not an issue i noticed its only on forums home page is ok. ill plod on with it. its just me im a geek and like to pull things apart lol. i liked this forum because i wanted a nice clean layout. for my fibromyalgia forum. i use ipb as a rule for my heaveir sites but there clutered. this is ideal for what i need.

Sign In or Register to comment.