XF 1.3 'Post new thread' button

KVMG

Member
On a forum, the button appears both at the top (to the right of the breadcrumbs) and at the bottom of the thread list as well. Excellent.

On a page listing sub-forums, however (http://hc.kvmgalore.com/index.php?forums/ASK/) the button appears only at the bottom of the list.

How can I have the 'Post new thread' button also appear at the top of this page (to the right of the breadcrumbs)?
 
Duplicate what is in the forum_view template on the default style on your style (if it's a custom?), specifically the topctrl section?

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>
 
My style is not custom - I'm using the Default Style.

This is just a quick test but you could try this:

forum_view

Find:
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>


Remove the conditional:

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:topctrl>{xen:raw $newDiscussionButton}</xen:topctrl>
</xen:if>

Then it'll have two buttons(original location and the breadcrumb)

add to extra.css:

Code:
.nodeListNewDiscussionButton
{
   display: none;
}

There's probably a better way of doing it, and honestly my way could have an adverse effect however it appears to be working fine.
 
Back
Top Bottom