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

How To Remove Post New Thread Button

Discussion in 'Styling and Customization Questions' started by presidentYT, Feb 27, 2013.

  1. presidentYT

    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..
     
  2. DBA

    DBA Well-Known Member

    Why don't just remove the permission to post new threads to this forum?

    Applications > Node Tree > Permissions
     
    DFI likes this.
  3. DFI

    DFI Active Member

    ^^

    Simple and easy solution
     
  4. presidentYT

    presidentYT Member

    That doesn't work.. when you do that it also prevents the events from posting in there.. so the permissions have to be set so people can post in there..
     
  5. Neil E.

    Neil E. Active Member

    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.
     
    presidentYT likes this.
  6. high1976

    high1976 Active Member

    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}">
     
    presidentYT likes this.
  7. presidentYT

    presidentYT Member

    Thanks you guys.. i will try this now..
     
  8. presidentYT

    presidentYT Member

    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..
     
  9. high1976

    high1976 Active Member

    ...edited the post above to include some more of the surrounded text. Guess you are missing a final </xen:if>
     
  10. presidentYT

    presidentYT Member

    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
     

Share This Page