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

XF 1.4 Change text on Post New Thread button?

DaveL

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

DaveL

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

Russ

Well-known member
#4
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} **
 

DaveL

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

clove28

Active member
#6
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!