How To Remove Post New Thread Button

presidentYT

Member
I was able to remove the top option from a specific node by removing the top bread crumb, but i was unable to remove the bottom one (post new thread button) once i removed the bottom breadcrumbs..

Now if you are wondering why I would want to move the ability to post a new thread in this node.. let me explain... I'm using Events.. and when you post an event.. That Node is assigned to have the event post go in there.. But with events.. once you add it you now get to options.. Create an event button and post button.. I rather just have the Create An event button.. which i was able to add once i removed the top bread crumb by utilizing the html function on the node... In that node I just want people to have the ability to post "events" and not post..
And so far I've gotten it to work, i just need to remove the bottom .. Create a post button if this is possible..
 
So you just want the button to disappear? Inspect it with firebug to find out the class name. Add that class into extra with a "display: none". Just be sure you have the class specific enough if you only want it gone from one page (.thread_view .submitUnit .button instead of .submitUnit .button).*

If you can locate which template contains the button, you could do a TMS edit to "delete" the button.

* edited to add: you could need something like .node.level_1 to get specific enough.
 
check template forum_view for $newDiscussionButton. This is an example for a changed button in node-ID 74
Code:
<xen:container var="$bodyClasses">{xen:helper nodeClasses, $nodeBreadCrumbs, $forum}</xen:container>
<xen:container var="$searchBar.forum"><xen:include template="search_bar_forum_only" /></xen:container>
 
<xen:if is="{$canPostThread}">
<xen:if is="{$forum.node_id} == 74">
    <xen:set var="$newDiscussionButton"><a href="{xen:link 'forms/mp1-bug-report.1/respond', $forum}" class="callToAction"><span>{xen:phrase post_new_bugreport}</span></a></xen:set>
        <xen:if is="!{$renderedNodes}">
            <xen:topctrl>{xen:raw $newDiscussionButton}</xen:topctrl>
        </xen:if>
<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 is="!{$renderedNodes}">
            <xen:topctrl>{xen:raw $newDiscussionButton}</xen:topctrl>
        </xen:if>
</xen:if>
</xen:if>
 
<xen:if is="{$showPostedNotice}">
 
check template forum_view for $newDiscussionButton. This is an example for a changed button in node-ID 74
Code:
<xen:if is="{$canPostThread}">
<xen:if is="{$forum.node_id} == 74">
    <xen:set var="$newDiscussionButton"><a href="{xen:link 'forms/bug-report.1/respond', $forum}" class="callToAction"><span>{xen:phrase post_new_bugreport}</span></a></xen:set>
        <xen:if is="!{$renderedNodes}">
            <xen:topctrl>{xen:raw $newDiscussionButton}</xen:topctrl>
        </xen:if>
<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 is="!{$renderedNodes}">
            <xen:topctrl>{xen:raw $newDiscussionButton}</xen:topctrl>
        </xen:if>
</xen:if>

I tried using this method.. i kept getitng a message that xen not closed or something like that.. I change to the right node and of course i changed the xen link and what not..
 
I actually decided to just remove it for all pages and just keep the top one. in case anyone is curious..
i went into forum_view
i searched for Discussion... i skipped over the one that was
Code:
<xen:set var="$newDiscussionButton"><a href="{xen:link 'forums/create-thread', $forum}" class="callToAction"><span>{xen:phrase post_new_thread}</span></a></xen:set>

and removed the bottom one
 
Back
Top Bottom