vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Mini-Hack: Quick Reply does not show in Closed Thread even for Moderators (https://vborg.vbsupport.ru/showthread.php?t=59924)

Erwin 01-08-2004 10:00 PM

Mini-Hack: Quick Reply does not show in Closed Thread even for Moderators
 
Quick Reply does not show in Closed Thread even to Mods (Mini-Hack)

I found it annoying that even though staff close threads, the Quick Reply still shows up for staff because staff can always reply to closed threads. This caused staff to keep posting because some staff miss the fact that the thread is closed.

This is a mini-hack to make the Quick Reply not show up for everyone when a thread is closed. Staff can still reply by clicking on the "Closed" button.

A quick mod to showthread.php:

Find:

PHP Code:

($thread['open'] OR can_moderate($threadinfo['forumid'], 'canopenclose')) 

Change to:

PHP Code:

($thread['open']) 

Done! :)

Remember, when changing code WITHIN a query, don't add comments around the change. That would cause a parse error. ;)

corsacrazy 01-08-2004 11:01 PM

this certainly is a mini hack nice work mate shud come in handy

FleaBag 01-09-2004 02:20 PM

I second that, will definitely come in handy.

poetic 01-09-2004 05:44 PM

Very nice.. I did this with an if statement, but you way makes much more sense.

Hoffi 01-09-2004 11:19 PM

This Hack could win be the smallest-Hack award. :D

But the use is much bigger. Thanks.

Sebastian 03-01-2004 10:28 PM

you can do this without hacking.

in showthread template find:

Code:

$quickreply
replace with:

Code:

<if condition="$thread['open']">$quickreply</if>

Ig@r 03-02-2004 04:16 AM

Quote:

I found it annoying that even though staff close threads, the Quick Reply still shows up
Me too. :)

Thanks for the hack.

Sebastian, I would like to thank you as well. Template modification is easier :)

NexVision 03-02-2004 06:17 AM

anyway to make it show for admins and mods

Erwin 03-02-2004 09:10 AM

Quote:

Originally Posted by Sebastian
you can do this without hacking.

in showthread template find:

Code:

$quickreply
replace with:

Code:

<if condition="$thread['open']">$quickreply</if>

True - but believe it or not, I prefer file hacking now to template hacking because I find it easier to compare files when upgrading than to revert templates and remodify them. :)

Beermonster 03-02-2004 05:52 PM

nice :) thanks


All times are GMT. The time now is 02:59 AM.

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.02322 seconds
  • Memory Usage 1,738KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete