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

Move "Post New Thread" Button

Discussion in 'XenForo Questions and Support' started by =MGN=RedEagle, Apr 6, 2011.

  1. =MGN=RedEagle

    =MGN=RedEagle Well-Known Member

    Hey guys, I would like to move the "Post New Thread" button to below the forum title. Can someone give me a few tips?
     
  2. Russ

    Russ Well-Known Member

    Like the same position when there's sub-categories?

    http://xenforo.com/community/forums/bugs/

    No sub cats it's right of the breadcrumb, with sub cats it would be in that location which I linked.
     
  3. =MGN=RedEagle

    =MGN=RedEagle Well-Known Member

    Ya, kinda there but on the left. :)
     
  4. Russ

    Russ Well-Known Member

    Open forum_view

    Remove:
    Code:
    <xen:if is="{$canPostThread}">
    <xen:set var="$newDiscussionButton"><a href="{xen:link 'forums/create-thread', $forum}" class="callToAction"><span>{xen:phrase post_new_thread}</span></a></xen:set>
    <xen:if is="!{$renderedNodes}">
    <xen:topctrl>{xen:raw $newDiscussionButton}</xen:topctrl>
    </xen:if>
    </xen:if>
    
    Find:
    Code:
    <xen:if is="{$renderedNodes}">
    <xen:include template="ad_forum_view_above_node_list" />
    <xen:include template="node_list" />
    </xen:if>
    
    Add after:
    Code:
    <div class="linkGroup">
    <xen:if is="{$canPostThread}">
    <a href="{xen:link 'forums/create-thread', $forum}" class="callToAction"><span>{xen:phrase post_new_thread}</span></a>
    <xen:elseif is="{$visitor.user_id}" />
    ({xen:phrase no_permission_to_post})
    <xen:else />
    <label for="LoginControl"><a href="{xen:link login}" class="concealed">({xen:phrase log_in_or_sign_up_to_post})</a></label>
    </xen:if>
    </div>
    
    Last to make the bottom button align to the left too:
    Find:
    Code:
    <div class="pageNavLinkGroup">
    <div class="linkGroup" style="float:left;">
    <xen:if is="{$canPostThread}">
    
    In the <div class="linkGroup">
    Replace it with:
    Code:
    <div class="linkGroup" style="float:left;">
    
     
    =MGN=RedEagle likes this.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Moved to general support.

    For future reference, the development forums are related to working with the code.
    Questions related to template edits or style changes go in general support.
     
  6. =MGN=RedEagle

    =MGN=RedEagle Well-Known Member

    Awesome stuff! Thanks so much Russ! @Brogan, Noted ;)
     
  7. =MGN=RedEagle

    =MGN=RedEagle Well-Known Member

    Nice! It works!
     
  8. kforo

    kforo Active Member

    for those of you who've done the above, would you be willing to post a screenshot of what it looks like implemented?
     
  9. jauburn

    jauburn Well-Known Member

    I'd like to see it as well.
     
  10. =MGN=RedEagle

    =MGN=RedEagle Well-Known Member

    Sorry guys, I closed down that forum as it was test forum. My conclusion from the test: XF is awesome.
     
  11. Claudio

    Claudio Well-Known Member

    Could you please update the code for XF 1.4?
     

Share This Page