vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Remove the Reply link when the thread is closed (https://vborg.vbsupport.ru/showthread.php?t=34326)

TECK 01-20-2002 10:00 PM

This hack will remove the Reply link and replace it with the threadclosed.gif image only.
I did this hack because i wanted to see 'Thread Closed' with no link, instead of the link 'Post A Reply' that points to a VB error message, when the thread is closed.

Update
at Jawelin's request, i enabled the posting on a Closed Thread for admins and mods only. for those of you who installed already this hack, read Post #9.

Shenlong 01-21-2002 01:26 PM

sounds good, installing now, infact, sounds excellent

Shenlong 01-21-2002 01:34 PM

BUG!!!!

it only removes the link from the top, the link on the bottom is still there. so the top table works but the bottom still has the closed link

Shenlong 01-21-2002 01:41 PM

I got it, when u DL the script, u'll see this step:

Quote:

03. Open showthread template and find the code:
code:
------------------------------------
<a href="newreply.php?s=$session[sessionhash]&action=newreply&threadid=$threadid"><img src="$replyclose" border="0" alt="Post A Reply"></a>
------------------------------------

Replace it with:
code:
------------------------------------
$replyopenclosed
------------------------------------
Simply do that twice and it will work! :D

TECK 01-22-2002 01:40 AM

the info is ok.. i think. i said in the info file this:
replace the code [...] with the variable [...]

well the code is repeated identicaly 2 times on that template page so i never thought to mention it that you have to replace it twice. ;)
anyway Shenlong said it here... so there is no need to edit the file. thanks for taking the time to evaluate it. is a very simple hack, that took me 5min to make it. it took me more to make the actual cosmetics on the template installer-remover file. :)

since i broke the ice with my first hack, please click the I INSTALLED THIS FILE button. thanks for your time, and post your comments.

Jawelin 01-28-2002 10:45 AM

Quote:

Originally posted by nakkid
This hack will remove the Reply link and replace it with the threadclosed.gif image only.
I did this hack because i wanted to see 'Thread Closed' with no link, instead of the link 'Post A Reply' that points to a VB error message, when the thread is closed.

Very interesting. But when the reader of a closed post is Admin/Mod, that link make possible to reply the message without opening and reclosing it later.
Does your hack differentiate between users this way ?

Thanks.

69-FLy-gUy 01-28-2002 11:24 PM

Ok. I went to uninstall this, and now even when a thread is closed, it shows taht it is open. it wont show the closed thread icon.. Can you help me?

Ciao

-Trips

TECK 01-31-2002 09:03 AM

Quote:

Originally posted by Jawelin Very interesting. But when the reader of a closed post is Admin/Mod, that link make possible to reply the message without opening and reclosing it later.
Does your hack differentiate between users this way ?
Thanks.

i will add the mod to the hack. check this thread tomorrow.

69-FLy-gUy, can you be more specific? to uninstall the hack, simply follow the instructions in reverse. this hack does not modify any of the VB functions.

TECK 01-31-2002 10:24 AM

ok Jawelin i updated the file.
for those of you who installed already the hack, do this:

01. open showthread.php and find the code:
PHP Code:

if ($thread[open]) {
  eval(
"\$replyopenclosed = \"".gettemplate("showthread_replyopen")."\";");
} else {
  eval(
"\$replyopenclosed = \"".gettemplate("showthread_replyclosed")."\";");


replace it with:
PHP Code:

if ($thread[open]) {
  eval(
"\$replyopenclosed = \"".gettemplate("showthread_replyopen")."\";");
} else {
  if (
ismoderator($thread[forumid],'canopenclose')) {
    eval(
"\$replyopenclosed = \"".gettemplate("showthread_replyclosedmod")."\";");
  } else {
    eval(
"\$replyopenclosed = \"".gettemplate("showthread_replyclosed")."\";");
  }


02. run one more time the tplopcl.php file to install the 3rd template.

Jawelin 01-31-2002 08:41 PM

Quote:

Originally posted by nakkid
ok Jawelin i updated the file.

Thanks. That make the difference between a professional hacker and a lonely coder!
Thanks a lot for sharing your work.
I'll install asap.


All times are GMT. The time now is 07:32 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.01071 seconds
  • Memory Usage 1,747KB
  • 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
  • (2)bbcode_php_printable
  • (4)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