View Full Version : Reason for closing thread
Xenon
06-22-2002, 10:00 PM
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 (https://vborg.vbsupport.ru/member.php?s=&action=getinfo&userid=202) 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
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.
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?
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
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
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. :)
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..
There appears to be a slight error in the instructions for this hack:
----------------------------------------------------
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 :)
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
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 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 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
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
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:
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)?
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/showthread.php?s=&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
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/closereason_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.
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.
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
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
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. :)
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:
----------------------------------------------------
Step 6: Modifying the SHOWTHREAD Template
----------------------------------------------------
Find:
<!-- End content area table (CREATED IN HEADER!!) -->
</td>
</tr>
</table>
After that, ADD:
<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:
ALTER TABLE thread ADD `who` VARCHAR(255) NOT NULL;
Open root/postings.php and find:
$closereason=" closereason='".addslashes($reason)."', ";
Change it to:
$closereason=" closereason='".addslashes($reason)."',who='".addslashes($bbuserinfo[username])."', ";
Then open the template: showthread_closereason
Find:
$thread[closereason]
Add after it:
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:
ALTER TABLE thread ADD `whoclosed` VARCHAR(255) NOT NULL;
$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 ;)
Originally posted by Boofo
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)?
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:
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
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<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:
<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:
$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:
$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).
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:
----------------------------------------------
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";
$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
// 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).
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:
----------------------------------------------
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";
$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
// 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
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. :)
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?
----------------------------------------------
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")."\";");
}
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? :)
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? ;)
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:
Schorsch... can you help me with my above post?
how i would make
$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 eval("\$closereason = \"".gettemplate("showthread_closereason")."\";");
} else {
$closereason = "";
}
and replace it with 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? :)
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
Originally posted by Xenon
@schorsch: hmm, seems i have made a small version incompatibility:
find eval("\$closereason = \"".gettemplate("showthread_closereason")."\";");
} else {
$closereason = "";
}
and replace it with 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 (https://vborg.vbsupport.ru/showthread.php?postid=264907#post264907) )!
what else could be the error ??
thanks,
Schorsch
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:
<br>
$thread[closereason]
<br>
into:
<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?
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. :)
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.
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] = "";
}
}
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 :))
Step 2: Edit 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] = "";
}
}
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 ;)
i got every thing working right but i just wana know how to include date and time in message
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 :)
Xenon
07-20-2002, 11:40 AM
have fixed the problem per icq :)
@all: be sure you have installed the newest version before posting small problems
if you have just one $closereason in your showthread.php its an old version and PsYc's bug can occur
if you have just $thread[closereason] in your showthread.php then it's the newest one ;)
brauner
08-03-2002, 11:09 PM
Hallo
Beim öffnen des Threads verschwindet zwar der Rahmen aber nicht der eingegebene Text.
Wo liegt der Fehler?
Gruß
brauner
Xenon
08-03-2002, 11:27 PM
sh mein obiges posting, in deinen templates darf kein $closereason mehr drinnen sein, nur noch ein $thread[closereason]
brauner
08-03-2002, 11:57 PM
Meinst Du in dieser Zeile hier?
<textarea name="reason" rows="6" cols="45" wrap="virtual" tabindex="2">$threadinfo[closereason]</textarea>
Woanders kann ich nichts mehr finden.
<<<voll hilflos ist>>>
PS: Englisch klappt bei mir fast nur mit einem ?bersetzer daher habe ich obiges nicht ganz verstanden,sorry.
Hier mal die ?bersetzung:
@all: seien Sie sicher, da? Sie die neueste Version vor bekanntgebenden kleinen Problemen angebracht haben, wenn Sie gerade ein in $$closereason Ihrem seinem showthread.php eine alte Version haben und Wanze PsYcs auftreten kann, wenn Sie gerade ] $$thread[closereason in Ihrem showthread.php haben, dann, das es das neueste ist :knockedout: :rolleyes:
Xenon
08-04-2002, 12:03 AM
in deiner showthread.php muss das sein: if (trim($thread[closereason])) {
$thread[closereason]=bbcodeparse2($thread[closereason],0,1,1,1);
eval("\$thread[closereason] = \"".gettemplate("showthread_closereason")."\";");
} else {
$thread[closereason] = "";
}
das template showthread_closereason
muss $thread[closereason] enthalten
und das template showthread muss ebenfalls $thread[closereason] enthalten, und kein $closereason
brauner
08-04-2002, 12:15 AM
Du wirst es nicht glauben aber ich habe nochmal nachgeschaut und es ist alles so wie du sagtest.
Was mache ich denn nun?
h???lfe
brauner
08-04-2002, 12:43 AM
http://www.crazypalace.info/upload/test Kopie2.gif
Falls mir einer nicht glaubt *fg*
Oben der geschlossene Thread ==>alles in Ordnung
Unten der ge?ffnete Thread ==> Nicht so toll :-((
Xenon
08-04-2002, 09:24 AM
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] = "";
}
}
also wenn du genau diesen code da in deiner showthread.php hast, dann w?re es unm?glich, dass du das ergebnis hast das du hast ^^
beachte genau die obere if-abfrage: Wenn thread offen dann $thread[closereason]=""
....
wenn da ein $closereason="" oder garnix dergelichen steht isses falsch ;)
brauner
08-04-2002, 10:01 AM
Das habe ich zweimal in meiner postings.php
if ($s!=$session['dbsessionhash']) {
K?nnte es daran liegen? Und welchen muss ich gegen
if ($s!=$session['dbsessionhash'] && $reasonentered!=1) {
tauschen?
Xenon
08-04-2002, 10:05 AM
du musst nur die zweile in der openclose section austauschen.
und nein daran liegts nicht, es kann nur in der showthread.php oder zugehörigen templates liegen
brauner
08-04-2002, 10:25 AM
Habe einfach alle nochmal gemacht und jetzt geht es <<<hüppel_im_Kreis_herum>>>
Was anderes.
Kann man das so machen, das wenn man keinen Grund angibt, ein vordefinierter Text da steht?
Xenon
08-04-2002, 10:32 AM
ja kann man
in der postings.php
finde das:if($threadinfo[open]==0) {
$closereason=" closereason='".addslashes($reason)."', ";
} else {
$closereason="";
}
und ersetze es zb mit dem:
if($threadinfo[open]==0) {
if (trim($reason)!="") $closereason=" closereason='".addslashes($reason)."', ";
else $closereason=" closereason='Wurde wegen Spam von ".$bbuserinfo[username]." geschlossen!', ";
} else {
$closereason="";
}
oder eben ?hnliches
ach ja stell solche fragen zu erweiterungen besser in englisch, damit andre auch was davon haben ;)
brauner
08-04-2002, 10:34 AM
DAnke Dir.
In Englisch?!
Dann versteht es gar keiner mehr ;-))
brauner
08-04-2002, 11:28 AM
und ersetze es zb mit dem:
PHP:
if($threadinfo[open]==0) {
if (trim($closereason)=="") $closereason=" closereason='".addslashes($reason)."', ";
else $closereason="Wurde wegen Spam von ".$bbuserinfo[username]." geschlossen!";
} else {
$closereason="";
}
oder eben ?hnliches
No then nothing at all does not come
[Nein dann kommt gar nichts]
Xenon
08-04-2002, 11:35 AM
yeah sorry was my fault, i have edited my post above, now it should work ;)
brauner
08-04-2002, 11:48 AM
Sorry, no goes not yet
[Nein geht immer noch nicht]
Xenon
08-04-2002, 11:56 AM
hab zu wenig geschlafen ^^
jetzt sollts gehen (zumindest auf meinem testserver gings nu)
brauner
08-04-2002, 12:04 PM
Öhhhhhhm, leider nein.
Wenn ich jetzt was reinschreibe, erscheint der vordefinierte Text.
Lasse ich das Feld leer kommt nichts
Ist mir jetzt echt schon Peinlich.
Xenon
08-04-2002, 12:08 PM
ersetze das == mit einem !=, hab ich in meinem post schon gemacht, daran lag ja der fehler
brauner
08-04-2002, 12:16 PM
Super das war es.
Sagst mir nur nocg wie ich die Uhrzeit wann geschlossen wurde da rein bringe und ich lade Dich zum Kaffee ein
<<<<mal_doll_knuddelt>>>
Xenon
08-04-2002, 12:21 PM
ersetze das $bbuserinfo[username] mit dem da:
$bbuserinfo[username]." um ".vbdate($timeformat,time())
das sollte gehn ;)
ich nehme dann einmal schwarzen kaffe ^^
brauner
08-04-2002, 12:40 PM
So Kaffee ist fertig
Komm schnell her :-)
Noch ne Frage erlaubt?
Jetzt steht die Zeit aber nur drinne wenn ich keinen Grund angebe.
Kann das geändert werden, das die Zeit und wer geschlossen hat, auch drinne steht wenn ich selber Text eingebe?
Ach ja und anstatt die Uhrzeit leiber das Datum
<<<<mhhhhhhh, zum Kaffee gibt es Maulwurfkuchen von der Tochter>>>
Echt nett von Dir das mit dem Support
Boofo
08-04-2002, 12:49 PM
Come on, guys, can we do it in English? :) Maybe we can learn something from waht is going on. :)
Xenon
08-04-2002, 12:55 PM
Hehe, sorry boofo, most of the last text was off topic ;)
before
he asked about a standart reason if you don't enter one...
@brauner: naja das uhrzeit und wer auch dasteht wenn man was eingibt wollte ich mal machen, bin aber noch nicht dazugekommen... (kannste aber immer in den threadeigenschaften (edit thread) nachsehn
yes, just change $timeformat to $dateformat." ".$timeformat and you've date and time closed ;)
Boofo
08-04-2002, 01:02 PM
No problem on the non-English. I tried to folllow it, but got lost a long way back in the converstaion. I was hopng you guys would switch to English sooner or later. :)
How do you add the date and time closed? I must have missed that. :)
Xenon
08-04-2002, 01:05 PM
Originally posted by Xenon
ersetze das $bbuserinfo[username] mit dem da:
$bbuserinfo[username]." at ".vbdate($dateformat." ".$timeformat,time())
das sollte gehn ;)
ich nehme dann einmal schwarzen kaffe ^^
it was this post ;)
Boofo
08-04-2002, 01:11 PM
Ok, I saw that, but I still don't understand where it goes. :)
Xenon
08-04-2002, 01:18 PM
in english:
replace $bbuserinfo[username] with $bbuserinfo[username]." at ".vbdate($dateformat." ".$timeformat,time())
brauner
08-04-2002, 01:37 PM
Can one limit all this to certain forums?
Boofo
08-04-2002, 01:39 PM
No, I understood that part of it. I just don't see $bbuserinfo[username] anywhere in your closed reason code. I have "By: $thread[whoclosed]" from Lesane's addon.
Originally posted by Xenon
in english:
replace $bbuserinfo[username] with $bbuserinfo[username]." at ".vbdate($dateformat." ".$timeformat,time())
Xenon
08-04-2002, 01:53 PM
@boofo: This (https://vborg.vbsupport.ru/showthread.php?postid=280723#post280723) post is meant ;)
@brauner:
else $closereason=" closereason='Wurde wegen Spam von ".$bbuserinfo[username]." geschlossen!', ";
replace with:else {
if($thread[forumid]==xx) $closereason=" closereason='Wurde wegen Spam von ".$bbuserinfo[username]." geschlossen!', ";
elseif($thread[forumid]==y) $closereason=" closereason='Wurde wegen Beleidigungen von ".$bbuserinfo[username]." geschlossen!', ";
else $closereason=" closereason='', ";
}
brauner
08-04-2002, 04:54 PM
Der vordefinierte Text funzt nun einwandfrei mit Name und Zeit etc.
Allerdings geht das nicht mit der Zeit Datum und Username wenn ich den Standarttext nicht benutzen m?chte.
In Englisch:
The pre-defined text funzt now perfectly with name and time etc.. However with the time the date and username does not go not using if I the text of kind of condition would like.
ZiRu$
08-20-2002, 03:55 PM
dope i shall install this
Boofo
08-22-2002, 03:28 AM
Can anyone please tell me why I am getting this all of a sudden on a closed thread?
Reason for Thread being Closed by (Boofo on Aug 21, 2002 pm31 11:21 pm):
eXtremeTim
08-22-2002, 03:39 AM
Wow nice hack you guys. :)
I will proble install tommorrow.
Once again VERY NICE HACK.
Keep up the good work.
Donkeyballz
08-22-2002, 07:51 AM
Nice hack, very usefull :)
Xenon
08-22-2002, 08:04 PM
Boofo: seems you have corupted the timeformat part of the date/time addition of the hack ;)
Boofo
08-22-2002, 08:08 PM
But I didn't chnage anyting in it. Any idea how to fix it? :)
Originally posted by Xenon
Boofo: seems you have corupted the timeformat part of the date/time addition of the hack ;)
Xenon
08-22-2002, 08:19 PM
if you haven't changed something then i don't have an idea ;)
Boofo
08-23-2002, 10:13 AM
Well, Xenon, it kept bugging me so I kept at it until I found out (with some help) what the time problem was I was having. It turns out that it was my fault after all. You were right. The code you gave me for the time had this in it:
".vbdate($dateformat." ".$timeformat,time())."', ";
and I added an "at" to it, where, apparently, I shouldn't have. Like this:
".vbdate($dateformat." at ".$timeformat,time())."', ";
and the code I needed to change it to was this:
".vbdate($dateformat,time())." at ".vbdate($timeformat,time())."', ";
I guess I learned a little something from this after all. :)
Shepski
08-23-2002, 10:28 AM
Ok, now I am lost with this mixture of english and german. I saw per post the porblem about closing and then opening a thread still displays the closed reason but without the box but I couldnt work where the fix was.
Can someone help me to what I need to change to sort this out :) (in english would be cool ;))
Xenon
08-23-2002, 10:34 AM
completly deinstall the hack and install the really newest version there are no problems in it...
@boofo: :) yeah timeformat-string is no real outputstring ;)
Shepski
08-23-2002, 10:38 AM
Originally posted by Xenon
completly deinstall the hack and install the really newest version there are no problems in it...
If that was meant for me then I installed the version downloaded from https://vborg.vbsupport.ru/attachment.php?s=&postid=264907
is that not the latest one?
Boofo
08-23-2002, 10:41 AM
So when I want to put an "at" between the date and the time, I need to use the "long" string and if I don't need that, then I can used to "condensed" vesrion of the string, is that right? I mean, that is basically what I did there, isn't it? :)
Originally posted by Xenon
@boofo: :) yeah timeformat-string is no real outputstring ;)
Xenon
08-23-2002, 10:47 AM
yes it's because the "at" is also a formating option of date/timeformat.
look at http://www.php.net/manual/en/function.date.php to see which chars you cannot use in a formatstring because they are converted
Boofo
08-23-2002, 10:51 AM
Thanks for taking the time to help me understand this a little better. Now that I know what I did wrong, maybe I can avoid this in the future when working with the date and time string in vb. :)
Dark Shogun
09-11-2002, 05:09 PM
Can ANYONE tell me why this is happening? It only happened after I added this hack.
Dark Shogun
Dark Shogun
09-12-2002, 12:25 AM
Problem fixed.
Dark Shogun
Ihsahn
09-24-2002, 02:24 PM
Originally posted by Dark Shogun
Problem fixed.
Dark Shogun
how did u fix that ?
Dark Shogun
09-24-2002, 05:15 PM
I will have to go over the code again and tell you abit later. I works like a charm now.
Dark Shogun
Dark Shogun
09-26-2002, 03:21 AM
When it says in the instructions to find:
if ($s!=$session['dbsessionhash']) {
and replace it with:
if ($s!=$session['dbsessionhash'] && $reasonentered!=1) {
You are actually supposed to find:
$s == $session['dbsessionhash'] )) {
and replaced it with:
$s == $session['dbsessionhash'] && $reasonentered!=1)) {
That made everything show.
I am having a small problem though. When you close a topic and put in the reason it works fine but when you open it the reason stays there except it isn't in the box.
Dark Shogun
Xenon
09-26-2002, 10:46 AM
Originally posted by Dark Shogun
I am having a small problem though. When you close a topic and put in the reason it works fine but when you open it the reason stays there except it isn't in the box.
Dark Shogun
That was a bug in one of the first versions of this hack, it shouldn't be in the latest version.
are you sure you've no parts of an old version in your files?
Dark Shogun
09-26-2002, 04:14 PM
Xenon can you attach or tell me which version is the most up todate and how to make it so it shows who closed the topic?
Dark Shogun
Xenon
09-26-2002, 05:26 PM
of course :)
latest version is in the attachment :)
to show who closed the topic:
change this line in the instructions:
$closereason=" closereason='".addslashes($reason)."', ";
into this:
$closereason=" closereason='".addslashes($reason)." (by $bbuserinfo[username])', ";
Dark Shogun
09-26-2002, 05:50 PM
Works perfectly. :)
Dark Shogun
X-Fan
10-10-2002, 06:26 AM
Originally posted by Xenon
latest version is in the attachment :)
Does this work on 2.2.8, because in postings.php I'm not finding...
if ($s!=$session['dbsessionhash']) {
But I am finding...
// ############################### start do open / close thread ###############################
if ($HTTP_POST_VARS['action'] == 'openclosethread' OR ($action == 'openclosethread' AND s == $session['dbsessionhash')) {
Xenon
10-10-2002, 08:57 AM
yes it should work with vb228 too (it does at my forum)
the code has changed a bit from 227 to 228, so normally all should be ok if you just leave out this step:
Find:
if ($s!=$session['dbsessionhash']) {
Replace with:
if ($s!=$session['dbsessionhash'] && $reasonentered!=1) {
ZiRu$
10-13-2002, 03:53 AM
Installed the latest Version....still got a problem!
When you close a thread.....then open a thread....and then go to close it again....it has the last message in there and if you replace it all and type something new then it dosent have the thread closers username there......
Xenon
10-13-2002, 09:04 AM
it should be that it still have the old message until you delte it and write another one..
the username isn't included in the official release, if you use the modifications i told in the thread, they should work, but it's not 100% because i didn't test em
C.Birch
10-13-2002, 02:57 PM
how can i make it so it whys why a topic was closed in the topic list of a forum?
so its something like this
topic name
why it was closed if its a closed topic
Xenon
10-13-2002, 03:08 PM
you should be able to use $thread[closereason] in your forumdisplaybit templates...
C.Birch
10-13-2002, 04:03 PM
Tryed that did not work
<tr align="center">
<td bgcolor="{firstaltcolor}"><img src="{imagesfolder}/$thread[newoldhot].gif" border="0" alt=""></td>
<td bgcolor="{secondaltcolor}">$thread[icon]</td>
<td bgcolor="{firstaltcolor}" align="left" width="70%"><normalfont>$thread[gotonew] $paperclip$thread[movedprefix]$thread[typeprefix]<a href="showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]">$thread[title] $thread[closereason] </a></normalfont> <smallfont>$thread[pagenav]</smallfont></td>
<td bgcolor="{secondaltcolor}" width="30%" nowrap><normalfont>$thread[postedby]</normalfont></td>
<td bgcolor="{firstaltcolor}"><normalfont><a href="javascript:who($thread[threadid])">$thread[replycount]</a></normalfont></td>
<td bgcolor="{secondaltcolor}"><normalfont>$thread[views]</normalfont></td>
$threadrating
<td bgcolor="$backcolor">
<table cellpadding="0" cellspacing="0" border="0" width="100%" id="ltlink"><tr align="right">
<td nowrap><smallfont>$thread[lastreplydate] <font color="{timecolor}">$thread[lastreplytime]</font><br>
by <a href="member.php?action=getinfo&find=lastposter&threadid=$thread[threadid]"><b>$thread[lastposter]</b></a></smallfont></td>
<td nowrap> <a href="showthread.php?s=$session[sessionhash]&goto=lastpost&threadid=$thread[threadid]"><img src="{imagesfolder}/lastpost.gif" border="0" alt="Go to last post"></a></td>
</tr></table>
</td>
</tr>
ZiRu$
10-13-2002, 07:31 PM
Originally posted by Xenon
it should be that it still have the old message until you delte it and write another one..
the username isn't included in the official release, if you use the modifications i told in the thread, they should work, but it's not 100% because i didn't test em
i know man....but i did test it.....i used your newest release and the showing name add-on
Xenon
10-14-2002, 04:32 PM
sorry c.birch my fault, you have to edit forumdisplay.php
find this$threads=$DB_site->query("
SELECT $dotuserid $votequery ".iif($foruminfo[allowicons],'icon.title as icontitle,icon.iconpath,','')."
thread.threadid,thread.title,lastpost, forumid,pollid,open,replycount,postusername,postus erid,
lastposter,thread.dateline,views,thread.iconid,not es,thread.visible,sticky,votetotal,attach
FROM thread
".iif($foruminfo[allowicons],'LEFT JOIN icon ON (icon.iconid = thread.iconid)','')."
$dotjoin
WHERE $threadids or similar and after votetotal,attach
add
,closereason
ziru$: well i can't give full support on add-on i posted i the thread because some wanted as long as i don't test them myself how the work...
i've planned to update the hack but i don't have much time these days...
Zirus: I have this installed on 2.2.8, the instructions that Xenon posted a page back or so, they work fine. I closed a thread. It showed the reason and who did it. I opened it. I closed it, deleted the full reason already there, put in something else and it still showed who closed it.
I've found a problem, when I close a thread, give a reason, then open it and then I go to newreply.php [I have a hack so that there's a checkbox to close thread upon newreply and newthread], when I close the thread in that way, the thread is closed but the reason comes up again! [it shouldn't, as I haven't given a reason!] and it uses the same username as the person who gave that reason when it was closed first...
Xenon
10-16-2002, 09:46 PM
Tha Rock, that's a problem with your quickclose hack.
i don't know it exactly, but somewhere in newreply you'll find something similar like this:
$DB_site->query("UPDATE thread SET open=0.....
you have to change it to:
$DB_site->query("UPDATE thread SET open=0,closereason=''.....
!!!cyr0n_k0r
10-17-2002, 04:55 AM
the screen shots dont work.
Xenon: I can't find anything like that in newreply.php...I can't even find open=0...
Xenon
10-17-2002, 07:41 PM
well i don't know the hack, so i can't help you out then, you should ask in the supportthread of that hack...
normally such a line has to be in it, because that would be the query to close a thread..
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:
$closereason=" closereason='".addslashes($reason)."',whoclosed='".addslashes($bbuserinfo[username])."', ";
} else {
$closereason="";
with:
$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:
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:
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:
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:
$closereason="";
Replace with:
$closereason=" closereason='', ";
Thanks to krefft
https://vborg.vbsupport.ru/showthread.php?postid=314162#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:
if ($HTTP_POST_VARS['action'] == 'openclosethread' OR ($action == 'openclosethread' AND $s == $session['dbsessionhash'])) {
Replace with:
if ($HTTP_POST_VARS['action'] == 'openclosethread' OR ($action == 'openclosethread' AND $s == $session['dbsessionhash'] && $reasonentered!=1)) {
Modifying the SHOWTHREAD Template
Find:
<!-- End content area table (CREATED IN HEADER!!) -->
</td>
</tr>
</table>
After that, ADD:
<br>
$closereason
<br>
05-20-03 at 08:00 PM Courage said this in Post #173 (https://vborg.vbsupport.ru/showthread.php?postid=397921#post397921)
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:
if ($HTTP_POST_VARS['action'] == 'openclosethread' OR ($action == 'openclosethread' AND $s == $session['dbsessionhash'])) {
Replace with:
if ($HTTP_POST_VARS['action'] == 'openclosethread' OR ($action == 'openclosethread' AND $s == $session['dbsessionhash'] && $reasonentered!=1)) {
Modifying the SHOWTHREAD Template
Find:
<!-- End content area table (CREATED IN HEADER!!) -->
</td>
</tr>
</table>
After that, ADD:
<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
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.