sinful Member Jul 12, 2014 #1 What is the best way to the "Post New thread" button for selected forums? Thanks!
0ptima Well-known member Jul 12, 2014 #3 You can also do it with a template conditional. Edit the forum_view template find Code: <a href="{xen:link 'forums/create-thread', $forum}" class="callToAction"><span>{xen:phrase post_new_thread}</span></a> replace the above Code: <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> </xen:if> Change the node IDs to the forums you do not want to see the button Code: array(5,7,16) Upvote 0 Downvote
You can also do it with a template conditional. Edit the forum_view template find Code: <a href="{xen:link 'forums/create-thread', $forum}" class="callToAction"><span>{xen:phrase post_new_thread}</span></a> replace the above Code: <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> </xen:if> Change the node IDs to the forums you do not want to see the button Code: array(5,7,16)
sinful Member Sep 8, 2014 #4 TerryP said: I used Usergroup permissions . Click to expand... only issue with this is the "(You have insufficient privileges to post here.)" text gonna be appearing at the bottom of that forum. Upvote 0 Downvote
TerryP said: I used Usergroup permissions . Click to expand... only issue with this is the "(You have insufficient privileges to post here.)" text gonna be appearing at the bottom of that forum.
P Paul B XenForo moderator Staff member Sep 8, 2014 #5 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. Upvote 0 Downvote
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.
sinful Member Sep 8, 2014 #6 Brogan said: 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. Click to expand... 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. Upvote 0 Downvote
Brogan said: 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. Click to expand... 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.
alfaNova Well-known member Feb 26, 2016 #7 @0ptima Thanks but it doesn't work for me at 1.5.5 versions. is there any changes? Upvote 0 Downvote
0ptima Well-known member Feb 27, 2016 #8 Fatih Özcan said: @0ptima Thanks but it doesn't work for me at 1.5.5 versions. is there any changes? Click to expand... It should still work post your code Upvote 0 Downvote
Fatih Özcan said: @0ptima Thanks but it doesn't work for me at 1.5.5 versions. is there any changes? Click to expand... It should still work post your code