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

XF 1.3 Hiding "Post New thread" button for selected forums

Discussion in 'Styling and Customization Questions' started by sinful, Jul 12, 2014.

  1. sinful

    sinful Member

    What is the best way to the "Post New thread" button for selected forums?

  2. TerryP

    TerryP Member

    I used Usergroup permissions .
    sinful likes this.
  3. 0ptima

    0ptima Well-Known Member

    You can also do it with a template conditional.

    Edit the forum_view template

    <a href="{xen:link 'forums/create-thread', $forum}" class="callToAction"><span>{xen:phrase post_new_thread}</span></a>
    replace the above
    <xen:if is="!in_array({$forum.node_id}, array(5,7,16))">
    <a href="{xen:link 'forums/create-thread', $forum}" class="callToAction"><span>{xen:phrase post_new_thread}</span></a>

    Change the node IDs to the forums you do not want to see the button
    sbj and sinful like this.
  4. sinful

    sinful Member

    only issue with this is the "(You have insufficient privileges to post here.)" text gonna be appearing at the bottom of that forum.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Surely that is desirable?
    Otherwise members are going to wonder why the post new thread button doesn't appear.

    If I visited a site which hid the button using a conditional statement, I would report it as a bug.
  6. sinful

    sinful Member

    i created several forms that which has that forum as a destination, and added my own buttons to the forms on that forum.

    i prefer users to use the forms instead of the default new thread template.
  7. Fatih Özcan

    Fatih Özcan Active Member


    Thanks but it doesn't work for me at 1.5.5 versions. is there any changes?
  8. 0ptima

    0ptima Well-Known Member

    It should still work

    post your code

Share This Page