Addon for New Thread Button?

MapleOne

Well-known member
I know I can do a template edit but is there an addon I am missing to add a New Thread Button in Thread View?

I find myself reading a thread thinking, I have a great idea for a new thread and then I have to click back to forums or the main index.

I'm always encouraging members to create new threads so having this button properly placed would be a nice feature to have.

I currently have this code

Code:
<xf:if is="$xf.visitor.canCreateThread() OR $xf.visitor.canCreateThreadPreReg()">
        <xf:button href="{{ link('forums/create-thread') }}" class="button--cta" icon="write" overlay="true" rel="nofollow">
            {{ phrase('post_thread') }}
        </xf:button>
    </xf:if>

Not 100% sure where to place it in THREAD_VIEW to get it to look like a stock Xenforo location.

A little help for placement please

That said, having an addon would be great
 
Last edited:
I got it done with a final template edit, figured it out by myself in case someone needs it...

In THREAD_VIEW find...

Code:
<xf:if is="!$thread.isSearchEngineIndexable()">
    <xf:head option="metaNoindex"><meta name="robots" content="noindex" /></xf:head>
</xf:if>

Underneath place...

Code:
<xf:pageaction>
    <xf:if is="$xf.visitor.canCreateThread() OR $xf.visitor.canCreateThreadPreReg()">
        <xf:button href="{{ link('forums/create-thread') }}" class="button--cta" icon="write" overlay="true" rel="nofollow">
            {{ phrase('post_thread') }}
        </xf:button>
    </xf:if>
</xf:pageaction>


All done, you now have a New Thread button in Thread View
 
I got it done with a final template edit, figured it out by myself in case someone needs it...

In THREAD_VIEW find...

Code:
<xf:if is="!$thread.isSearchEngineIndexable()">
    <xf:head option="metaNoindex"><meta name="robots" content="noindex" /></xf:head>
</xf:if>

Underneath place...

Code:
<xf:pageaction>
    <xf:if is="$xf.visitor.canCreateThread() OR $xf.visitor.canCreateThreadPreReg()">
        <xf:button href="{{ link('forums/create-thread') }}" class="button--cta" icon="write" overlay="true" rel="nofollow">
            {{ phrase('post_thread') }}
        </xf:button>
    </xf:if>
</xf:pageaction>


All done, you now have a New Thread button in Thread View
I just finished up a quick addon for this.
1760301595906.webp
Going to release in a bit.
 
You just need to verify your XenForo license. Or it hasn't moved you to the right group yet.

Thank you, just did that and it worked

It's a nice addon but technically the button is in the wrong spot, with my code it is properly placed.

Look at Xenforo here for proper placement

Notice below the New Thread button is in line with the title

Screenshot (73).webp
 
Thank you, just did that and it worked

It's a nice addon but technically the button is in the wrong spot, with my code it is properly placed.

Look at Xenforo here for proper placement

Notice below the New Thread button is in line with the title

View attachment 328493
It is in the wrong spot for you or others. I rather have it where it is in the addon. But I was thinking of adding some options for placement.

EDIT: Was thinking if you have a long thread, it maybe nice to have it down on the bottom as well.
 
It is in the wrong spot for you or others.

It is in the wrong spot consistent in where Xenforo places it in category view, here here as an example:

So if one wanted to keep the button as how it would be placed on the stock Xenforo skin then it would be placed in Thread View similar to Category View

Yes, of course as your addon you can place it where you like and anyone reading here can decide to use my code above for my preferred placement or your addon which is also excellent.
 
Back
Top Bottom