1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

"Share this Page" to top how to?

Discussion in 'Styling and Customization Questions' started by bogus, May 30, 2011.

  1. bogus

    bogus Guest

    Hi there. I would like to get "Share This Page" to the top of a Thread instead of having it to the bottom.
    Position should be directly under

    Thread Title
    Discussion in 'Title' started by Nick, Date

    I have tried a few things but i always destroy the template ;)
    Thanks for your help
     
    Webby likes this.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Move the share page code to between the xen:raw and the hook in the thread_view template.

    Code:
    {xen:raw $threadStatusHtml}
    
    <xen:include template="share_page">
    <xen:set var="$url">{xen:link 'canonical:threads', $thread}</xen:set>
    </xen:include>
    
    <xen:hook name="thread_view_pagenav_before" params="{xen:array 'thread={$thread}'}" />
     
    Webby and Barbossa like this.
  3. bogus

    bogus Guest

    Thank You ;)

    Edit: Looks like i have to add the share_page Template code into the thread_view Template, cause there is this "gap" Probably because of the share_page divs?

    Unbenannt.jpg
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    The thread_view template is the correct one.

    The gap you refer to is for pagination.
    Check a thread with multiple pages and you will see how it looks.
     
  5. bogus

    bogus Guest

    Ahh. I see. Thanks a lot ;)
     
  6. Barbossa

    Barbossa Active Member

    How can I exclude this one from few nods? I mean I got specific some forums threads that I don't want let my user to share this.
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

  8. Barbossa

    Barbossa Active Member

  9. Brogan

    Brogan XenForo Moderator Staff Member

    <xen:if is="!in_array({$forum.node_id}, array(x, y, z))">
     
  10. Barbossa

    Barbossa Active Member

    It worked, thanks. :D

    I was doing <xen:if is!="in_array({$forum.node_id}, array(x, y, z))">

     
  11. Webby

    Webby Member

    Copy brogans exact code and paste it in between:

    {xen:raw $threadStatusHtml}

    Code

    <xen:hook name="thread_view_pagenav_before" params="{xen:array 'thread={$thread}'}" />

    Simple as that.
     

Share This Page