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)

Boofo 06-24-2002 11:47 AM

Yes, it is another hack (although I'm not sure which one :)). Any help would be greatly appreciated.

Quote:

Originally posted by Sinecure
Well judging by looking at that it seems you either have a hack installed, or maybe an older version of vBulletin, I'm leaning more towards a hack installed.

Maybe Xenon would know how to intergrate that code you have there, with the code neccesary to run this hack.


Sinecure 06-24-2002 12:10 PM

Quote:

Originally posted by FireFly

Look at head_newpm template. You don't need to be a rocket scientist to figure it out. :)

What are you implying Chen? That I'm not a rocket Scientist?

JohnWoo 06-24-2002 12:27 PM

Oh... can someone add a little action for this hack.

When i click in Admin Options -> Edit thread, i can edit Reason for closing thread

10x a lot... sorry for my english ;)

Sinecure 06-24-2002 01:04 PM

Quote:

Originally posted by JohnWoo
Oh... can someone add a little action for this hack.

When i click in Admin Options -> Edit thread, i can edit Reason for closing thread

10x a lot... sorry for my english ;)

I'm not 100% sure what you are asking. Are you asking to have a place to edit the reason for closing? If you want to edit it, you coudl simply just open the thread, and then close it again :)

Boofo 06-24-2002 01:14 PM

I think he's asking for an option in the amin cp. :)

Quote:

Originally posted by Sinecure


I'm not 100% sure what you are asking. Are you asking to have a place to edit the reason for closing? If you want to edit it, you coudl simply just open the thread, and then close it again :)


JohnWoo 06-24-2002 01:46 PM

>I'm not 100% sure what you are asking. Are you asking to have a place to edit the reason for closing? If you want to edit it, you coudl simply just open the thread, and then close it again

Yes, u right, but it`s not good idea that mods open and then close thread again with new reason. Maybe u try to do this

>I think he's asking for an option in the amin cp.

Nope. Not in admin cp. Mods dosen`t have permission to login into admin CP.

Lesane 06-24-2002 02:12 PM

A Suggestion:

You say this in the instructions:

PHP Code:

---------------------------------------------------- 
Step 6Modifying the SHOWTHREAD Template 
---------------------------------------------------- 

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


After thatADD
<
br
$closereason 
<br

If there is no reason then you have 2 <br>, means 2 new empty lines. It's better to put those 2 <br> in the showthread_closereason template.

And here is a little addon wich also displays the user that closed that thread:

Execute this query:

PHP Code:

ALTER TABLE thread ADD `whoVARCHAR(255NOT NULL

Open root/postings.php and find:

PHP Code:

$closereason=" closereason='".addslashes($reason)."', "

Change it to:

PHP Code:

$closereason=" closereason='".addslashes($reason)."',who='".addslashes($bbuserinfo[username])."', "

Then open the template: showthread_closereason

Find:
PHP Code:

$thread[closereason

Add after it:
PHP Code:

By$thread[who

Done. :)

Xenon 06-24-2002 03:17 PM

@Lesane: Thank you, so i don't have to write it ;)
but i would change it to that:

[sql]ALTER TABLE thread ADD `whoclosed` VARCHAR(255) NOT NULL;[/sql]
PHP Code:

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

then use By: $thread[whoclosed]

@Sinecure: you can update the install file *gg*
It grows faster and faster as i thought of ;)


Quote:

Originally posted by Boofo
Code:

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

in what I already have here (and can it be done)?

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")."\";");
  }
}


use this:
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 06-24-2002 04:40 PM

Quote:

Originally posted by JohnWoo
Oh... can someone add a little action for this hack.

When i click in Admin Options -> Edit thread, i can edit Reason for closing thread

10x a lot... sorry for my english ;)

Well let's see what we can do :)

optional add to the hack:

edit template threads_editthread
after
Code:

<tr>
        <td bgcolor="{firstaltcolor}" width="73%"><normalfont><b>Moderator Notes / Thread Summary:</b></normalfont></td>
        <td bgcolor="{firstaltcolor}" width="27%"><normalfont><input type="text" class="bginput" name="notes" value="$threadinfo[notes]" size="50" maxlength="250"></normalfont></td>
</tr>

add this code:
Code:

<tr>
        <td bgcolor="{firstaltcolor}" width="73%"><normalfont><b>Close Reason:</b></normalfont></td>
        <td bgcolor="{firstaltcolor}" width="27%"><normalfont><input type="text" class="bginput" name="closereason" value="$threadinfo[closereason]" size="50" maxlength="255"></normalfont></td>
</tr>

then open postings.php
find this line in editthread section:
PHP Code:

$DB_site->query("UPDATE thread SET visible='$visible',open='$open',title='".addslashes(htmlspecialchars($title))."',iconid='".addslashes($iconid)."',notes='".addslashes($notes)."' WHERE threadid='$threadid'"); 

replace it with:
PHP Code:

$DB_site->query("UPDATE thread SET visible='$visible',open='$open',title='".addslashes(htmlspecialchars($title))."',iconid='".addslashes($iconid)."',notes='".addslashes($notes)."',closereason='".addslashes($closereason)."' WHERE threadid='$threadid'"); 

i haven't tested it, but it should do what ya want :)

JohnWoo 06-24-2002 06:38 PM

2Xenon:
Ohh... greate thanks... i go to test this addon....

JohnWoo 06-24-2002 06:46 PM

Wow.... it`s work
Greate thanks Xenon

Boofo 06-24-2002 06:54 PM

Xenon,

Thanks for the fix. Works great! So does the editing addon. :)

Lesane,

Thanks for the Closed By: addon. I made a slight modification, but it works great!

Reason for Thread being Closed by (Boofo): testing the thread closed reason box

Excellent work guys! You, too, Sinecure!

Xenon 06-24-2002 08:31 PM

np :)

ahh, very good, i like it when my code works ;)

JohnWoo 06-25-2002 12:51 PM

Can someone help me... I look into my cod, and see that i have install other hack that can`t work with this hack :(

It is Remove the Reply link when the thread is closed (by nakkid).

PHP Code:

01. Open showthread.php and find the code:
code:
------------------------------------
if (
$thread[open]) {
  
$replyclose="{replyimage}";
} else {
  
$replyclose="{closedthreadimage}";
}
------------------------------------

Replace it with:
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")."\";");
  }
}
------------------------------------ 

and this hack have:

PHP Code:

----------------------------------------------
Step 2Edit Showthread.php   (1 Modification)
----------------------------------------------
Find:
if (
$thread[open]) {
  
$replyclose="https://vborg.vbsupport.ru/images/reply.gif";
} else {
  
$replyclose="https://vborg.vbsupport.ru/images/threadclosed.gif";
}


Replace with:
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(
"\$closereason = \"".gettemplate("showthread_closereason")."\";");
  } else {
    
$closereason "";
  }



What I should make that both worked hacks

PS. now i have this part of cod in showthread.php

PHP Code:

// Remove the Reply link when the thread is closed
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")."\";");
  }
}
//  Remove the Reply link when the thread is closed 


JohnWoo 06-25-2002 12:51 PM

Can someone help me... I look into my cod, and see that i have install other hack that can`t work with this hack :(

It is Remove the Reply link when the thread is closed (by nakkid).

PHP Code:

01. Open showthread.php and find the code:
code:
------------------------------------
if (
$thread[open]) {
  
$replyclose="{replyimage}";
} else {
  
$replyclose="{closedthreadimage}";
}
------------------------------------

Replace it with:
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")."\";");
  }
}
------------------------------------ 

and this hack have:

PHP Code:

----------------------------------------------
Step 2Edit Showthread.php   (1 Modification)
----------------------------------------------
Find:
if (
$thread[open]) {
  
$replyclose="https://vborg.vbsupport.ru/images/reply.gif";
} else {
  
$replyclose="https://vborg.vbsupport.ru/images/threadclosed.gif";
}


Replace with:
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(
"\$closereason = \"".gettemplate("showthread_closereason")."\";");
  } else {
    
$closereason "";
  }



What I should make that both worked hacks

PS. now i have this part of cod in showthread.php

PHP Code:

// Remove the Reply link when the thread is closed
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")."\";");
  }
}
//  Remove the Reply link when the thread is closed 


Xenon 06-25-2002 01:26 PM

double post ;)

read the thread again, i have told boofo what to do, he has installed the same

Smoothie 06-25-2002 05:27 PM

I noticed in the new templates you need to create that colors are specified, what would need to be changed so that it followed the site colors?

Schorsch 07-15-2002 02:49 AM

thanks for the hack :)

Boofo 07-15-2002 03:06 AM

Did someone just delete a cross-posted message in here concerning vbmicrostats or am I seeing things? :)

Schorsch 07-15-2002 03:14 AM

the colors are hardcodet, could u change this ?

thx,
Schorsch

Schorsch 07-15-2002 03:17 AM

Quote:

Originally posted by Boofo
Did someone just delete a cross-posted message in here concerning vbmicrostats or am I seeing things? :)
you are right that was me, sorry about that :laugh: :banana:

Boofo 07-15-2002 03:32 AM

Thank you. I was afraid I was going to have to start taking the medication again. :)

Quote:

Originally posted by Schorsch


you are right that was me, sorry about that :laugh: :banana:


Xenon 07-15-2002 03:07 PM

have uploaded a new version in my first post (4th post in thread)

file is now zipped, so the replacements should be correct :)

Boofo 07-15-2002 03:30 PM

It still shows the following and the date of the text file is 07-06-2002. And I DID clean my cache first. :) (I am using the diable tags so you will see what it actually is). BTW: What did you change that we need to re-do?

[disable]----------------------------------------------
Step 2: Edit Showthread.php (1 Modification)
----------------------------------------------
Find:
if ($thread[open]) {
$replyclose="https://vborg.vbsupport.ru/images/reply.gif";
} else {
$replyclose="https://vborg.vbsupport.ru/images/threadclosed.gif";
}


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

Quote:

Originally posted by Xenon
have uploaded a new version in my first post (4th post in thread)

file is now zipped, so the replacements should be correct :)


Xenon 07-15-2002 03:49 PM

lool, yes you're right

i have just corrected the templatesection, not the php-code section ;)

thanx for pointing out, now it should be ok ;)

Boofo 07-15-2002 03:52 PM

But what did you change that we need to re-do? Is there a simple upgrade we can make instead of doing it all again? :)

Quote:

Originally posted by Xenon
lool, yes you're right

i have just corrected the templatesection, not the php-code section ;)

thanx for pointing out, now it should be ok ;)


Xenon 07-15-2002 03:59 PM

nothing really changed, it's just because some of the replacementvars became parsed in the old code, so i have uploaded the correct installfile in the zip.

there were no codechanges or something like that, so if you have corrected the colors yourself, you don't need to upgrade anything ;)

i have just done so, because schorsch and smothie said so ;)

habedere schorsch, kimst aus bayern? ;)

TaP 07-15-2002 11:53 PM

i was wondering if there was any way to have pre set messages?

also can you use date time and user names in this?

Schorsch 07-16-2002 01:56 AM

can somebody help me ???

on my board it looks completley different than in the screenshot of the first post.

how can I change that so it looks like in the screenshot of sinecure ????

thanks,
Schorsch

@Xenon: ja bin aus Bayern (naehe Nuernberg), zur zeit wohne ich aber in USA (New Jersey) :bunny:

TaP 07-16-2002 02:09 AM

Schorsch... can you help me with my above post?

TaP 07-16-2002 03:21 AM

how i would make

PHP Code:

  $closereason=" closereason='".addslashes($reason)."',who='".addslashes($bbuserinfo[username]).', "; 

display the time and date when i do $thread[date] or $thread[time] ???

thanks for your time

Xenon 07-16-2002 10:28 AM

@schorsch: hmm, seems i have made a small version incompatibility:
find
PHP Code:

eval("\$closereason = \"".gettemplate("showthread_closereason")."\";"); 
  } else { 
    
$closereason ""
  } 

and replace it with
PHP Code:

eval("\$thread[closereason] = \"".gettemplate("showthread_closereason")."\";"); 
  } else { 
    
$thread[closereason] = ""
  } 

that should do the trick.

oh, ein bayer in amiland :)
i bin aus der n?he vo regensburg

@tap: in your enterreason template you find this line:
<textarea name="reason" rows="6" cols="45" wrap="virtual" tabindex="2">$threadinfo[closereason]</textarea>
replace the $threadinfo[closereason] with whatever you want as a standart reason...

yes you can also do the other parst, but you have to add extra fields to your thread-table called whoclosed (or something like that) and for example when closed

Boofo 07-16-2002 10:58 AM

Exactly how would we go about doing this, kind sir? :)

Quote:

Originally posted by Xenon
yes you can also do the other parst, but you have to add extra fields to your thread-table called whoclosed (or something like that) and for example when closed

Xenon 07-16-2002 11:07 AM

hmm, very much to explain ;)

i think i'll include into next version ok?

Boofo 07-16-2002 11:21 AM

Sounds good. When will that be? :)

Xenon 07-16-2002 11:28 AM

*gg*
i don't exactly know, have to talk to sinecure before, and i have a lot of work here this days, but i think till next week is possible :)

Boofo 07-16-2002 11:42 AM

Great! I wasn't trying to pressure you, I was just curious. :)

BTW: What does *gg* mean?

Schorsch 07-16-2002 02:47 PM

Quote:

Originally posted by Xenon
@schorsch: hmm, seems i have made a small version incompatibility:
find
PHP Code:

eval("\$closereason = \"".gettemplate("showthread_closereason")."\";"); 
  } else { 
    
$closereason ""
  } 

and replace it with
PHP Code:

eval("\$thread[closereason] = \"".gettemplate("showthread_closereason")."\";"); 
  } else { 
    
$thread[closereason] = ""
  } 

that should do the trick.

I can't find the above code ??!! where can I find it ?

thanks,
Schorsch

Xenon 07-16-2002 05:15 PM

it was in the old installation file i posted

if you download the newest one and do every step correct it'll also work ;)

boofo: *gg* = nice doublegrin ^^

Schorsch 07-16-2002 05:32 PM

I made the changes after your new file ( THIS one )!

what else could be the error ??

thanks,
Schorsch


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.01550 seconds
  • Memory Usage 1,917KB
  • 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
  • (21)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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