Post New Thread

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.
 
Admin CP -> Appearance -> Templates -> forum_view

Add the red code:

Rich (BB 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.
 
Oh, there are two instances in that template. Here is the other one:

Rich (BB 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>
 
Top Bottom