vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   hide post reply button in certain forums (https://vborg.vbsupport.ru/showthread.php?t=69878)

btappan 09-26-2004 02:06 AM

hide post reply button in certain forums
 
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:
PHP Code:

<if condition="$show['largereplybutton']"

replace with:
PHP Code:

<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 :)

miz 09-27-2004 03:20 PM

there is much more easyer way to make it :
ill sujest you my way :


Code:

ALTER TABLE `forum` ADD `showreply` SMALLINT( 6 ) NOT NULL DEAFULT 1;
open admincp/forum.php




Code:

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 :
Code:


Find :
<if condition="$show['largereplybutton']">
                <td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;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">&nbsp;</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.

miz 10-03-2004 05:44 PM

Quote:

Originally Posted by 662C
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


All times are GMT. The time now is 07:09 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01153 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete