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 06-22-2002 10:00 PM

Reason for closing thread
 
We hope most of you can use it :)
Sinecure has had the idea, which i thought is something nearly everbody who has ever been a mod wanted to have for a long time :)
I have to thank sinecure for the good templates, and for finding the funny mistakes i have made *gg*

edit:
nuno, i think we can do something similar for deleted threads too :)

Ok, basicly this hack does exactly as it says. After you click the "Open/Close Thread" link you will be prompted to enter a reason for closing the thread. After you submit the reason for closing that thread, the reason will appear ABOVE the first post in that thread, in its own seperate box.

Sinecure 06-23-2002 12:52 PM

Before I say what this hack does, I want to Thank Xenon for writing ALL the PHP code for this hack. I did the template modifications for this hack, and the instructions. So Thanks SOOOOO MUCH Xenon, ur a great guy :)

w00t, my first hack, with HUGE thanks to Xenon, hes the real master mind behind this hack guys!!!

ULTIMATESSJ 06-23-2002 12:57 PM

cool, i've been waiting for something like this, i'll install now

nuno 06-23-2002 01:01 PM

Very useful hack Sinecure :)
Could you make it work for deleted threads also, with an email notification to thread posters saying why it got deleted?
TIA :)

BigJohnson 06-23-2002 01:15 PM

Holly ++++. I love this hack to death. Very Very nice hack. This is a very nice one. I installed it and it works wonders. Amazing feature guys. Simply amazing. Never stop making the cool stuff.

Brad 06-23-2002 01:53 PM

neet! :C, i installed, works great

GameCrash 06-23-2002 01:55 PM

Very nice Idea, do you think this would work on 2.0.3?

nuno 06-23-2002 01:57 PM

Quote:

Originally posted by Xenon

i think we can do something similar for deleted threads too :)

Biggie thumbs up. :bunny:

Xenon 06-23-2002 01:58 PM

yes i think it would work on 2.0.3 too

Admin 06-23-2002 01:59 PM

It would be nice (and more efficient) to have the prompt as a real Javascript promt, that pops up when you choose the Close option from the drop down.

Lesane 06-23-2002 02:38 PM

An usefull & great hack. Well done, Xenon&Sincecure.

Sinecure 06-23-2002 02:40 PM

Quote:

Originally posted by FireFly
It would be nice (and more efficient) to have the prompt as a real Javascript promt, that pops up when you choose the Close option from the drop down.
Actually that is a great idea. 1 problem though. I dont know Javascript that well, and I'm not sure about Xenon, maybe thats a possibility?

Xenon 06-23-2002 03:11 PM

Same problem, javascript is nothing i can do :)

zachb 06-23-2002 03:12 PM

Yea, javascript would be great. :)

GeorgeofCS 06-23-2002 03:23 PM

Another possibly nice feature would be to have an ability to add various reason to say a drop down list that would automatically insert the reason. For lazy people like myself and for admins to kinda make a more uniform reasons.

Vinney 06-23-2002 03:23 PM

amazing !! cheers man.

Admin 06-23-2002 03:39 PM

Quote:

Originally posted by Sinecure
Actually that is a great idea. 1 problem though. I dont know Javascript that well, and I'm not sure about Xenon, maybe thats a possibility?
Look at head_newpm template. You don't need to be a rocket scientist to figure it out. :)

TECK 06-23-2002 04:21 PM

hehe i was working on this one sinecure, since we spoked on msn.. and i had it done so it posts automatically the message the same way the dropdown does... :)

also it post the reason on the forumdisplay....
if interested let me know and i will release it. i wanted to finish some bugs and email it to you so you can release it.. to late. :p
you did it on a different way.

the only thing i have left is to delete automatically the post when you open the thread again.

is good that you use vB in your localhost... huh? ;)

Velocd 06-23-2002 04:35 PM

Release it Nakkid, I'm curious about the features of yours also....or...you could integrate your features with his, and get the deserved credit, but then we'll have a really great hack.

Vivi Ornitier 06-23-2002 06:13 PM

hmmm . . I can't run the query for some reason,

I get this result:

SQL-query :

ALTER TABLE thread ADD `closereason` VARCHAR(255) NOT NULL

MySQL said:

Duplicate column name 'closereason'

Xenon 06-23-2002 06:24 PM

seems there is already a column name closereason...

have you run that query twice?

or installed another hack which needs such a column..

Paul 06-23-2002 07:01 PM

There appears to be a slight error in the instructions for this hack:

Quote:

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

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


Replace with:
<br>
$closereason
<br>
Rather than replacing the </td></tr></table>, the $closereason should be added after that code.

Great hack, however. I'm going to attempt to alter it so that if a reason is not specified, a blank "Reason for close" box does not appear.

Paul

Xenon 06-23-2002 07:04 PM

oh, i see you're right.

damn, it would have been better if i was the person who released it, so i could change the file myself, and sinecure also can because he's the admin ;)

ok, we'll have to wait until he comes back :)

Paul 06-23-2002 07:09 PM

on second thought... it appears that the table is closed in the showthread_closed... ahhh! headache.. :: stares at tables ::

Edit: Never mind. My eyes were playing tricks with me. It is an error in the instructions ;)

Also, rather than add <br>$closethread</br>, I just put a <div></div> around the whole contents of the closethread template.

Paul

Sinecure 06-23-2002 07:13 PM

Quote:

Originally posted by LoveShack
There appears to be a slight error in the instructions for this hack:



Rather than replacing the </td></tr></table>, the $closereason should be added after that code.

Great hack, however. I'm going to attempt to alter it so that if a reason is not specified, a blank "Reason for close" box does not appear.

Paul

I was getting a weird gap when I left it there, but I retried it, and for some reason I'm not now. I updated the instructions

GameCrash 06-23-2002 08:30 PM

You should change
PHP Code:

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(
"\$closereason = \"".gettemplate("showthread_closereason")."\";");


to
PHP Code:

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


It's $closereason and not $thread[closereason] and if you don't add a reason the table will be shown, too - that doesn't look that well ;)

Xenon 06-23-2002 08:34 PM

thanx mate!

that $thread[closereason] was an old version of the code, my fault i have forgotten it

Crunch 06-23-2002 08:57 PM

nice i love it, but can someone help me please? since i added this hack i get javascript errors in the newreply page and none of the buttons work or anything. what would be causing this? please I need that stuff working again!!

Crunch 06-23-2002 09:01 PM

hmm sry for the double post but all i had to do was reupload my .js files and everything seems to be fine now..strange

N9ne 06-23-2002 09:14 PM

When someone closes the thread, and at the top it shows the reason for it, how can I make it so it says...

Thread Closed by: Username here <BR>
Reason for Closure: reason here

If anyone can do that, I would be very grateful, this is a good useful hack!

musicfreak12399 06-23-2002 10:00 PM

really like.. been waiting for this..

great hack, thanks

Paul 06-23-2002 10:00 PM

GameCrash:

Thanks so much for your changes. They work wonderfully. I agree with Tha Rock--Showing the username would be wonderful as well.

Sinecure 06-23-2002 10:03 PM

Ok I updated the instructions to incorporate that new code. Hopefully Xenon will make a modification to the code in ordere to have the Name of the person who closed it :)

Xelation 06-23-2002 11:40 PM

just installed it, no problems... Great Hack! :)

Boofo 06-24-2002 09:58 AM

Sinecure,

Everything else installed fine except the following. In showthread.php, how would I put the code:

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


JohnWoo 06-24-2002 10:23 AM

Sinecure & Xenon greate thanks. I`ll reguest this add-on here:https://vborg.vbsupport.ru/showthrea...threadid=39298 and it`s done.... Uraaa..... :)

Boofo 06-24-2002 10:49 AM

I just downloaded the new file and it has the links to vb.org's images directories in it. :)

Sinecure 06-24-2002 11:31 AM

Quote:

Originally posted by Boofo
I just downloaded the new file and it has the links to vb.org's images directories in it. :)
I just looked at it you are right. For some reason it was parsing those values in the .txt file. Thats a bug Chen, you might want to look into that one :bandit: .

I have the instructions located here:
http://www.pixeljunction.com/misc/cl...n_install.phps

Boofo 06-24-2002 11:38 AM

It's still messed up in the last part of it. :) Did you get a chance to look at the code I posted?

Sinecure 06-24-2002 11:43 AM

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.


All times are GMT. The time now is 04:45 PM.

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.01371 seconds
  • Memory Usage 1,827KB
  • 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
  • (2)bbcode_php_printable
  • (6)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
  • (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