View Full Version : hide post reply button in certain forums
btappan
09-26-2004, 02:06 AM
How can i hide the post reply button (the one above left of my username) in certain forums that I specify? can i either A. specify the forum ID's that i DO want it in or B. specify the forum ID's that I DON'T want it in? Like an If forumd ID =1,2,3,4,5,6 etc etc. then show button type of thing. can someone help me with this? what would the code look like?
Johnny
09-26-2004, 04:04 PM
i dont quit understand what you are trying to say, do you want to hide both the post reply buttons or do you just want to get rid the one above your username or just hide it?
if you just want to hide it in then in SHOWTHREAD template.
look for:
<if condition="$show['largereplybutton']">
replace with:
<if condition="$show['largereplybutton'] and (in_array($forumid, array (X,Y,Z)))">
just replace x,y,z with the forum ID(s) on where you only want the post reply to show
btappan
09-26-2004, 07:32 PM
exactly! that was just what I was wanting to do. Thanks "johnny" for the help!
Johnny
09-26-2004, 08:56 PM
yep, you welcome :)
there is much more easyer way to make it :
ill sujest you my way :
ALTER TABLE `forum` ADD `showreply` SMALLINT( 6 ) NOT NULL DEAFULT 1;
open admincp/forum.php
Find :
'allowratings' => 1,
'countposts' => 1,
Below Add :
'showreply' => 1,
Find :
print_yes_no_row($vbphrase['show_forum_on_forum_jump'], 'options[showonforumjump]', $forum['showonforumjump']);
Below Add :
print_table_header('Reply Options');
print_yes_no_row('Show Reply button on this forum?', 'forum[showreply]', $forum['showreply']);
edit showthread templte :
Find :
<if condition="$show['largereplybutton']">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$LASTPOSTID"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
<else />
<td class="smallfont"> </td>
</if>
Before Add :
<if condition="$forum['showreply']">
After Add :
</if>
i think thats all, and you can edit forum via admin cp and to decide which forums will have reply button or not without handle codes every time you want to change it
hope its helps MiZ.
Noiz Pollution
09-27-2004, 06:36 PM
Cool, a template mod and a code hack version, you gonna release that miz? I'm sure a lot of people would like to see it but won't because it's in the request forum and some people don't even bother looking here unless they want something themselves.
Cheers,
Robert
Johnny
09-27-2004, 07:01 PM
the one i showed with conditions you can use it for basicly anything in the templates, but the one u showed miz i like what you put together, im gonna use that. especially for the enhacned design im putting together for my site that needs certain things on in certain forums and certain things off on another.
Cool, a template mod and a code hack version, you gonna release that miz? I'm sure a lot of people would like to see it but won't because it's in the request forum and some people don't even bother looking here unless they want something themselves.
Cheers,
Robert
here we go mate
https://vborg.vbsupport.ru/showthread.php?t=70139
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.