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

Move subforums to bottom of Forum Display

Discussion in 'XenForo Questions and Support' started by Andy.N, Apr 3, 2011.

  1. Andy.N

    Andy.N Well-Known Member

    In one of my forum, i have about a dozen and growing subforum.
    I like to move the subforums to the bottom so members don't have to scroll down to see the thread

    http://www.quantnet.com/forum/forums/quant-education.25/

    I have asked similar question in the past and the solution would result in the New Thread button moving with the subforum block as well.

    is there anyway I can keep the New Thread button on top, to the right of the top breadcrumb?
     
  2. Russ

    Russ Well-Known Member

    Somewhat of a dirty edit Andy so save your template before making these changes to test it out.

    Open forum_view:

    Replace:
    Code:
    <xen:if is="{$renderedNodes}">
        <xen:include template="ad_forum_view_above_node_list" />
        <xen:include template="node_list" />
    </xen:if>
    
    With:
    Code:
    <xen:if is="{$renderedNodes}">
        <xen:if is="{$newDiscussionButton}"><div style="text-align: right;">{xen:raw $newDiscussionButton}</div></xen:if>
    </xen:if>
    
    Then Replace:
    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>
    
    With:
    Code:
    <xen:if is="{$renderedNodes}">
        <xen:include template="ad_forum_view_above_node_list" />
        <xen:include template="node_list" />
            <xen:else />
        <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>
    </xen:if>
    
     
    Renegade and Andy.N like this.
  3. Russ

    Russ Well-Known Member

    Actually anytime there is sub categories the new tab isn't next to the breadcrumb just noticed*
     
  4. Andy.N

    Andy.N Well-Known Member

    Yes. Would be nice if it does.
    Your fix works, Russ. Is anyway we can move the second "New Thread" button from the bottom to the top of the subforum, right after the threads.
     
  5. Russ

    Russ Well-Known Member

    Hey Andy, for that, again save the template before adjusting however open node_list

    Replace
    Code:
    <xen:if hascontent="true">
    <fieldset>
        <ol class="nodeList sectionMain" id="forums">
        <xen:contentcheck>
            <xen:foreach loop="$renderedNodes" value="$node">{xen:raw $node}</xen:foreach>
        </xen:contentcheck>
        </ol>
        
        <xen:if is="{$newDiscussionButton}"><div class="nodeListNewDiscussionButton">{xen:raw $newDiscussionButton}</div></xen:if>
    </fieldset>
    </xen:if>
    
    With:

    Code:
    
    <xen:if hascontent="true">
    <fieldset>
        <xen:if is="{$newDiscussionButton}"><div class="nodeListNewDiscussionButton">{xen:raw $newDiscussionButton}</div></xen:if>    <ol class="nodeList sectionMain" id="forums">
        <xen:contentcheck>
            <xen:foreach loop="$renderedNodes" value="$node">{xen:raw $node}</xen:foreach>
        </xen:contentcheck>
        </ol>
       
    </fieldset>
    </xen:if>
    
     
  6. Russ

    Russ Well-Known Member

    Andy I've updated my second post, noticed there was a tiny bit of information missing, I added some conditional statements which you'll want to apply so it will load to the original state if there's no sub categories.
     
  7. Russ

    Russ Well-Known Member

    To get the new thread button next to the breadcrumb even with sub categories:

    Find:
    Code:
    <xen:if is="{$renderedNodes}">
        <xen:if is="{$newDiscussionButton}"><div style="text-align: right;">{xen:raw $newDiscussionButton}</div></xen:if>
    </xen:if>
    
    Replace with:
    Code:
    <xen:if is="{$renderedNodes}">
          <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:topctrl>{xen:raw $newDiscussionButton}</xen:topctrl>
    </xen:if>
    
     
    Andy.N likes this.
  8. Andy.N

    Andy.N Well-Known Member

    Russ,
    I reverted my forum_view template and redo as in your #2 and #5 posts. I totally ignore #6 as I believe you have it on #2.
    You can see again how it looks on the link in my #1 post.
     
  9. Russ

    Russ Well-Known Member

    Registered and looking good Andy, unless I'm missing something(I did get like 3 hours of sleep last night :coffee:
     
  10. Andy.N

    Andy.N Well-Known Member

    I just did what you post in #7 after posting my #8 so I think we are all done now.
    Thanks for helping, Russ and signing up as well. My site is open so people should only register if they want to post something.

    And look forward to installing your mobile style. ;)
     
    Russ likes this.
  11. Renegade

    Renegade Well-Known Member

    Thanks for the edits. Looks the way it should be. :)
     
    Russ likes this.

Share This Page