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

Add-on Rename "Post new thread" by forum

Discussion in 'Resource and Add-on Requests' started by kezako, Jan 9, 2014.

  1. kezako

    kezako Active Member

    Hi all

    Is there an existing add-on that we can rename "Post new thread" button for a specific forums ?
    Example : for a classified forum, i can set "Post a new classifieds" or for business directory forum i can set "Add your company"

    Thank you !
     
  2. Russ

    Russ Well-Known Member


    This can be achieved via template edit + conditionals if you want.

    We do it on pixelexit.com, we have a support tickets area where it's set to say "Create a new support ticket" just in that node.

    Template:
    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>
    
    Replace with something like:
    Code:
    <xen:if is="{$canPostThread}">
       <xen:set var="$newDiscussionButton"><a href="{xen:link 'forums/create-thread', $forum}" class="callToAction"><span><xen:if is="{$forum.node_id} == 40">Create a new Support Ticket<xen:else />{xen:phrase post_new_thread}</xen:if></span></a></xen:set>
       <xen:if is="!{$renderedNodes}">
         <xen:topctrl>{xen:raw $newDiscussionButton}</xen:topctrl>
       </xen:if>
    </xen:if>
    
    In my scenario only node 40(support ticket area) would show that text.


    Sorry to intrude on your thread, figured you might appreciate an easy fix for it :)
     
    IPF and kezako like this.
  3. kezako

    kezako Active Member

    Thank you very much. work great !
     
  4. jauburn

    jauburn Well-Known Member

    I saw an add-on for this but can't find it now. Anyone?
     
  5. jauburn

    jauburn Well-Known Member

Share This Page