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

XF 1.3 'Post new thread' button

#1
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)?
 

Tracy Perry

Well-known member
#2
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>
 

Russ

Well-known member
#4
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.
 
#6
I've implemented this and it appears to do the job.

I haven't come across any adverse effects yet.

Thanks!!!