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

Post New Thread

Discussion in 'XenForo Questions and Support' started by FearGrump, Apr 7, 2012.

  1. FearGrump

    FearGrump Member

    Hi,

    I am wondering how I can edit the "Post New Thread" URL for one specific forum. It would be used with SimpleForms.

    Thanks in advance.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> forum_view

    Add the red code:

    Code:
    <xen:if is="{$canPostThread}">
    <xen:if is="{$forum.node_id} == 23">
    	<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:else />
    	<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>
    	<xen:if is="!{$renderedNodes}">
    		<xen:topctrl>{xen:raw $newDiscussionButton}</xen:topctrl>
    	</xen:if>
    </xen:if>
    
    You need to specify the node_id and the new link.
     
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Oh, there are two instances in that template. Here is the other one:

    Code:
    <div class="pageNavLinkGroup">
    	<div class="linkGroup">
    		<xen:if is="{$canPostThread}">
    		<xen:if is="{$forum.node_id} == 23">
    			<a href="{xen:link 'forums/create-thread', $forum}" class="callToAction"><span>{xen:phrase post_new_thread}</span></a>
    		<xen:else />
    			<a href="{xen:link 'forums/create-thread', $forum}" class="callToAction"><span>{xen:phrase post_new_thread}</span></a>
    		</xen:if>
    		<xen:elseif is="{$visitor.user_id}" />
    			({xen:phrase no_permission_to_post})
    		<xen:else />
    			<label for="LoginControl"><a href="{xen:link login}" class="concealed">({xen:phrase log_in_or_sign_up_to_post})</a></label>
    		</xen:if>
    	</div>
    	<div class="linkGroup"{xen:if '!{$ignoredNames}', ' style="display: none"'}><a href="javascript:" class="muted jsOnly DisplayIgnoredContent Tooltip" title="{xen:phrase show_hidden_content_by_x, "names={xen:helper implode, $ignoredNames, ', '}"}">{xen:phrase show_ignored_content}</a></div>
    	
    	<xen:pagenav link="forums" linkdata="{$forum}" linkparams="{$pageNavParams}" page="{$page}" perpage="{$threadsPerPage}" total="{$totalThreads}" />
    </div>
    
     

Share This Page