1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

A jump-to-top button in the postbit.

Discussion in 'Add-on Requests [Archive]' started by anotheralias, Oct 6, 2010.

  1. anotheralias

    anotheralias Well-Known Member

    A top button to the left of all the other right-side buttons, or in the center. (Just not the far left.)

    If someone would kindly just post the code and where it goes relative to the other code, I'd be very grateful. :)

    (Eventually, I mean - I can't figure out a good way to say "at your leisure, if you care to do it.")
    Beth likes this.
  2. ChrisStatzer

    ChrisStatzer New Member

    This should work for you if I understood your request.

    In the provided template editor, edit the template "post":

    	<a href="{xen:link threads/post-permalink, $thread, 'post={$post}'}" class="item muted postNumber" title="{xen:phrase permalink}">#{xen:calc '{$post.position} + 1'}</a>
            /* insert begin */
            <span class="item">
            <a href="{xen:link threads, $thread}#top"> Top</a>
            /* insert end */
           <xen:if is="{$post.canLike}">
    Insert the lines noted in the code. Note the page already has a #top anchor so thats all.

    Even if thats not exactly what you want, you should be able to wrangle the positioning fairly easy.

    Topper and anotheralias like this.
  3. anotheralias

    anotheralias Well-Known Member

    Thank you so much! It is very appreciated. :)
  4. ChrisStatzer

    ChrisStatzer New Member

    I'm glad I could help, wasn't too sure it was what you wanted.
    anotheralias likes this.
  5. anotheralias

    anotheralias Well-Known Member

    Yep, just a simple go-to-top, and the only way I knew how to do it was with code that's about ten years old, or 100 years old in Internet Time. :)

Share This Page