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)
-   -   Reason for closing thread (https://vborg.vbsupport.ru/showthread.php?t=40190)

Xenon 07-16-2002 05:41 PM

Then it should look as seen on the screenshots.
It works as it should here, and seems no other has the problem you have, so i think you have made a little mistake in your templates

Schorsch 07-16-2002 09:47 PM

something in your installation.txt was wrong Xenon...

I changed the following in SHOWTHREAD Template:

Code:

<br>
$thread[closereason]
<br>

into:

Code:

<br>
$closereason
<br>

and now it works great :)

cu
Schorsch

Xenon 07-17-2002 08:51 AM

????

are you sure your showthread.php has this lines in it?
PHP Code:

if ($thread[open]) { 
  
$replyclose="{replyimage}"
  
$thread[closereason]=""
} else { 
  
$replyclose="{closedthreadimage}"
  if (
trim($thread[closereason])) { 
  
$thread[closereason]=bbcodeparse2($thread[closereason],0,1,1,1); 
  eval(
"\$thread[closereason] = \"".gettemplate("showthread_closereason")."\";"); 
  } else { 
    
$thread[closereason] = ""
  } 


because if you don't have this lines exactly like i posted here, you don't have installed the latest version, and then it's logical that you have to use other variables (because in the old version the variable was called $closereason ;))

Boofo 07-17-2002 09:10 AM

Here's the code you re-did for me because of the hack I have installed. Will this still work with your changes? This doesn't look the same in some areas as the new code. Just wanted to make sure after your last message. :)

PHP Code:

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



Xenon 07-17-2002 10:04 AM

yes it'll work.

the new code doesn't have strong codechanges, just a variable name has changed:
just replace all $closereason with $threadinfo[closereason] in this part of your code and in showthread template and you have the actualst version ;)

Boofo 07-17-2002 11:36 AM

I think you measn to replace it with "$thread[closereason]" not "threadinfo[closereason]", right? :)

Also, I am really confused here. In the third line, you have $closereason but in lines 7 and 8 you have $thread[closereason]. Shouldn't that second line be $thread[closereason], also? Or am I missing the point again? :) I'm just going by what you told me to replace in that last message.

PHP Code:

if ($thread[open]) { 
  
$replyclose="https://vborg.vbsupport.ru/images/reply.gif"
  
$closereason=""
} else { 
  
$replyclose="https://vborg.vbsupport.ru/images/threadclosed.gif"
  if (
trim($thread[closereason])) { 
  
$thread[closereason]=bbcodeparse2($thread[closereason],0,1,1,1); 
  eval(
"\$thread[closereason] = \"".gettemplate("showthread_closereason")."\";"); 
  } else { 
    
$thread[closereason] = ""
  } 



Quote:

Originally posted by Xenon
yes it'll work.

the new code doesn't have strong codechanges, just a variable name has changed:
just replace all $closereason with $threadinfo[closereason] in this part of your code and in showthread template and you have the actualst version ;)


Xenon 07-17-2002 11:13 PM

yes, i meant $thread[closereason], sorry seems to be a bit confused these days ;)

hmm i don't have $closereason in my file any more, you are correct it should also be $thread[closereason].
but it is here at my last file version ;)

Boofo 07-18-2002 12:31 AM

You might want to check that file in post #4 again then. It still has the following in it (on line 3 of the replace part and a couple of other spots in the file). (And I did clean my cache :))

PHP Code:

Step 2Edit Showthread.php   (1 Modification)
----------------------------------------------
Find:
if (
$thread[open]) { 
  
$replyclose="{replyimage}"
} else { 
  
$replyclose="{closedthreadimage}"



Replace with
if (
$thread[open]) { 
  
$replyclose="{replyimage}"
  
$closereason=""
} else { 
  
$replyclose="{closedthreadimage}"
  if (
trim($thread[closereason])) { 
  
$thread[closereason]=bbcodeparse2($thread[closereason],0,1,1,1); 
  eval(
"\$thread[closereason] = \"".gettemplate("showthread_closereason")."\";"); 
  } else { 
    
$thread[closereason] = ""
  } 


Quote:

Originally posted by Xenon
yes, i meant $thread[closereason], sorry seems to be a bit confused these days ;)

hmm i don't have $closereason in my file any more, you are correct it should also be $thread[closereason].
but it is here at my last file version ;)


TaP 07-18-2002 02:34 AM

i got every thing working right but i just wana know how to include date and time in message

PsYc 07-20-2002 10:27 AM

after re.open a closed thread the close reason still appeared at the top of the thread without the box around


problem fixed thanks Xenon :)


All times are GMT. The time now is 07:34 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.01278 seconds
  • Memory Usage 1,766KB
  • 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_code_printable
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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