XF 1.4 Change text on Post New Thread button?

DaveL

Well-known member
Is it possible or is there a modification available that will you allow you to change the next on the 'Post New Thread' button in selected forums?
 
Ok,
Ive managed to change the top "Post New Thread" button in a selected forum using a conditional, however im struggling with the bottom one.

This is the code im using to change the top "Post New Thread"

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>
<xen:if is="{$forum.node_id} == 35">
<xen:if is="{$canPostThread}">
    <xen:set var="$newDiscussionButton"><a href="{xen:link 'forums/create-thread', $forum}" class="callToAction"><span>{xen:phrase post_launch_thread}</span></a></xen:set>
    <xen:if is="!{$renderedNodes}">
        <xen:topctrl>{xen:raw $newDiscussionButton}</xen:topctrl>
    </xen:if>
</xen:if>
</xen:if>

Can anyone advise where I would add my conditional into the code below for the bottom button? Ive tried a variety of ways but not having much luck!

Code:
<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}" />
            <span class="element">({xen:phrase no_permission_to_post})</span>
        <xen:else />
            <label for="LoginControl"><a href="{xen:link login}" class="<xen:if is="@xb_login_overlay OR @xb_alt_login">OverlayTrigger </xen:if>concealed element">({xen:phrase log_in_or_sign_up_to_post})</a></label>
        </xen:if>
       
    </div>
 
We do it on our site, in support tickets it's "Create new ticket" others it's the regular:

template: forum_view
Find:
Code:
{xen:phrase post_new_thread}

Replace with:
Code:
<xen:if is="{$forum.node_id} == 2">Create new ticket<xen:else />{xen:phrase post_new_thread}</xen:if>

Do it on both instances of the {xen:phrase post_new_thread} **
 
We do it on our site, in support tickets it's "Create new ticket" others it's the regular:

template: forum_view
Find:
Code:
{xen:phrase post_new_thread}

Replace with:
Code:
<xen:if is="{$forum.node_id} == 2">Create new ticket<xen:else />{xen:phrase post_new_thread}</xen:if>

Do it on both instances of the {xen:phrase post_new_thread} **

Thanks Russ, that looks a lot easier and tidier!
 
We do it on our site, in support tickets it's "Create new ticket" others it's the regular:

template: forum_view
Find:
Code:
{xen:phrase post_new_thread}

Replace with:
Code:
<xen:if is="{$forum.node_id} == 2">Create new ticket<xen:else />{xen:phrase post_new_thread}</xen:if>

Do it on both instances of the {xen:phrase post_new_thread} **

Hi Russ,

How to make this change for all the forums? Thanks!
 
Anyone know how to add this to the submit "Post Thread" line? I'm on XF2 BTW.

Here's what I have and it's not working...
Code:
<xf:submitrow submit="<xf:if is='{$forum.node_id} == 116'>Create Ticket<xf:else />{{ phrase('post_thread') }}</xf:if>" icon="write" sticky="true">
 
Back
Top Bottom