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)

kreftt 10-26-2002 12:21 AM

what about having it clean out the values for closereason and whoclosed when reopening the thread asthis info is redundant then anyway?

like, in postings.php replace:

PHP Code:

$closereason=" closereason='".addslashes($reason)."',whoclosed='".addslashes($bbuserinfo[username])."', ";
} else {
$closereason=""

with:

PHP Code:

$closereason=" closereason='".addslashes($reason)."',whoclosed='".addslashes($bbuserinfo[username])."', ";
} else {
$closereason=" closereason='',whoclosed='', "

imho this should stop interfering of the hacks as this opening rotine should be called by the other hack too...

kreftt

kreftt 10-26-2002 01:24 AM

if you are running TECK's Quick Reply Box (with Close/Open thread switch) hack, you will need to do additional edits of this hack.

you have pasted this:

PHP Code:

        if ($threadinfo[open]) {
          
$threadinfo[open]=0;
          
$action='closed';
        } else {
          
$threadinfo[open]=1;
          
$action='opened';
        }

        
$threadinfo[notes]="Thread $action by $bbuserinfo[username] on ".vbdate($dateformat." ".$timeformat,time()).". $threadinfo[notes]";
        
$DB_site->query("UPDATE thread SET open=$threadinfo[open],notes='".addslashes($threadinfo[notes])."' WHERE threadid='$threadid'"); 

2 times in newreply.php and 1 time in editpost.php during the installation of TECK's hack.

if you replace now all three occurences with this:

PHP Code:

        if ($threadinfo[open]) {
          
$threadinfo[open]=0;
          
$action='closed';
        } else {
          
$threadinfo[open]=1;
          
$action='opened';
        }
if(
$threadinfo[open]==0) {
$closereason=" closereason='".addslashes($reason)."',whoclosed='".addslashes($bbuserinfo[username])."', ";
} else {
$closereason=" closereason='',whoclosed='', ";
}
        
$threadinfo[notes]="Thread $action by $bbuserinfo[username] on ".vbdate($dateformat." ".$timeformat,time()).". $threadinfo[notes]";
        
$DB_site->query("UPDATE thread SET ".$closereason."  open=$threadinfo[open],notes='".addslashes($threadinfo[notes])."' WHERE threadid='$threadid'"); 

the both hacks should be working together. at least they do for me now. afaik you dont need to edit something in the fileedits to newthread.php

kreftt

nemesis01 11-11-2002 12:51 PM

Sorry to bring this back up, just installed it and am getting this error:

Parse error: parse error in /home/virtual/site2/fst/var/www/html/vb/postings.php on line 53

And that line is:

PHP Code:

eval("standardredirect(\"".gettemplate("redirect_openclose")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");"); 

Any idea's? :ermm:

Xenon 11-11-2002 02:08 PM

well, perhaps you've forgotten a ; a line before...

this line seems correct, and works here ;)

nemesis01 11-11-2002 02:16 PM

Bummer, cant figure it out. Might another hack be the problem? Interfering with it I mean.....

Xenon 11-11-2002 02:26 PM

it shouldn't...

can you post 5 lines above and under this one line?

nemesis01 11-11-2002 02:30 PM

My bad, fixed it after 2 hours staring at the same 2 lines. Problem was an extra '"); had been added for some reason to the line above.

Thanks for your time anywayz.;)

Courage 01-02-2003 03:49 PM

I run 2.2.8 and after i closed & reopened a thread the reason still appears.

This is what I've done:

In postings.php search for:

PHP Code:

$closereason=""

Replace with:

PHP Code:


$closereason
=" closereason='', "

Thanks to krefft

https://vborg.vbsupport.ru/showthrea...162#post314162

ethics 01-04-2003 07:00 PM

Any ideas as to why the reason will not show? I have the quick reply hack applied but didn't see the code that others mentioned.

drumsy 01-06-2003 09:03 PM

Well, after using information from many posts here, I've finally gotten this to work perfectly! :) Thanks everyone!

MartynJ 02-26-2003 04:52 PM

This doesn't work on 2.2.9 - which is a shame, the hack is quality. Any plans for a fix?

Xenon 02-26-2003 05:18 PM

hmm it works for me and i'm using 229 currently..

Courage 05-20-2003 11:00 PM

i'm using 2.3.0

I managed to make this work :D

Download the instructions, but you will get in trouble in postings.php

so:

in postings.php
find:
PHP Code:

if ($HTTP_POST_VARS['action'] == 'openclosethread' OR ($action == 'openclosethread' AND $s == $session['dbsessionhash'])) { 

Replace with:
PHP Code:

if ($HTTP_POST_VARS['action'] == 'openclosethread' OR ($action == 'openclosethread' AND $s == $session['dbsessionhash'] && $reasonentered!=1)) { 

Modifying the SHOWTHREAD Template

Find:
Code:

<!-- End content area table (CREATED IN HEADER!!) --> 
        </td>
</tr>
</table>

After that, ADD:

Code:

<br>
$closereason
<br>


ap0c 06-01-2003 12:13 AM

Quote:

05-20-03 at 08:00 PM Courage said this in Post #173
i'm using 2.3.0

I managed to make this work :D

Download the instructions, but you will get in trouble in postings.php

so:

in postings.php
find:
PHP Code:

if ($HTTP_POST_VARS['action'] == 'openclosethread' OR ($action == 'openclosethread' AND $s == $session['dbsessionhash'])) { 

Replace with:
PHP Code:

if ($HTTP_POST_VARS['action'] == 'openclosethread' OR ($action == 'openclosethread' AND $s == $session['dbsessionhash'] && $reasonentered!=1)) { 

Modifying the SHOWTHREAD Template

Find:
Code:

<!-- End content area table (CREATED IN HEADER!!) --> 
        </td>
</tr>
</table>

After that, ADD:

Code:

<br>
$closereason
<br>


tried both of these, but the reason doesnt show up in the thread.
I can add the reason, click the button, the thread is closed, but the reason it's closed doesnt show up

Reoplex 06-16-2003 07:53 PM

k, same problem. I did everything that i had to do.

when i try to move a thread, it moves it, but it never asks me for a reason.

Xenon 06-16-2003 08:00 PM

this hack is for closing threads, not moving them.

i think moving would be somehow equal to do, but it's not the same, and not included in this hack

JonP 06-18-2003 02:56 AM

Thanks.


All times are GMT. The time now is 04:17 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.01509 seconds
  • Memory Usage 1,798KB
  • 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
  • (11)bbcode_php_printable
  • (1)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
  • (17)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