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.

TECK 02-02-2002 11:35 PM

Jawelin, ty for your nice words. if anyone else install it, please let me know what you think about it.

Jawelin 02-11-2002 02:34 PM

Thank. I installed your hack without problems and works.

Just a tip, if I can: I saw your script installed all three templates as 'default' ones, never modified (as they where original).
Just few days ago, I made the upgrade from 2.2.1 to 2.2.2 and realized that all the default (i.e. NEVER changed) templates are overwritten by the upgrade script, unlike the modified templates that are mantained.

If true, hope this could help you.
Thnx

TECK 02-12-2002 06:48 AM

my installer uses the same mechanism as VB installer(upgrader). the string:
PHP Code:

DELETE FROM template WHERE title='".addslashes($title)."' AND templatesetid=-

makes it to be removed by any install(upgrade), so this is normal.
i have only one file with all the custom templates i made. when i upgrade or install, i simply run my installer, so all templates are updated in 5sec. ;)
i hope this info is useful to you.

Jawelin 02-12-2002 07:56 AM

Thanks.
Just for info, how this file is made/built with ?
Bye

E 04-04-2002 10:24 AM

but i like it theway it is so i can still reply too closed threads

TECK 04-05-2002 12:49 AM

if you are admin or mod, you can still reply to closed threads.

Boofo 04-22-2002 11:23 PM

Thsi may sound stupid to all of you, but when you mouseover the closedthread image it still says post a reply. Is there any where to change that? Also, after I installed this (which works great by the way!) now my reply and closedthread images are on the left side above the time. What did I miss?

Heineken77 07-16-2002 08:34 PM

Beauty :) Thanks!

FleaBag 07-16-2002 11:31 PM

Thanks Nakkid, cool hack. Running on 2.2.8! :D

TECK 07-17-2002 08:31 AM

Quote:

Originally posted by Boofo
Thsi may sound stupid to all of you, but when you mouseover the closedthread image it still says post a reply. Is there any where to change that? Also, after I installed this (which works great by the way!) now my reply and closedthread images are on the left side above the time. What did I miss?
just because ur an admin or mod. login with a regular user to see what is happening. and you missed to edit you html code corectly.

Chris M 10-29-2002 10:08 PM

Gamer:mad: - https://vborg.vbsupport.ru/showthrea...&postid=316171

Satan

DrkFusion 10-29-2002 10:09 PM

Also please edit your post before. Maybe a variety in posting a message may be good, instead of 20 posts with the same things.

Thanks


All times are GMT. The time now is 04:22 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.01305 seconds
  • Memory Usage 1,768KB
  • 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_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (22)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