The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
This very simple hack will show a checkbox in the options area (with show signature, email notification, etc.) of the Reply
to Topic screen that allows you to close the thread at the same time as posting your reply to the thread. The checkbox will only show to those that have permission to close the thread. Tested by me on 2.2.1. Compatibility with earlier versions is likely but not proven. This hack was requested by Freestyler here. EDIT: This hack has been updated; the attachment is now in Post #9. Show Your Support
|
Comments |
#32
|
|||
|
|||
seems depending on Groups Permissions. But i have Stanard-Permissions for our Mods.
Must be one of these settings: Can Move own threads to other forums Can open / close own threads Can delete own threads by deleting the first post These settings are turned off for my mods. |
#34
|
||||
|
||||
Installed, works like a charm.
|
#35
|
|||
|
|||
Ok, i fixed it. Here we go:
In the Hack Instructions find: Code:
} else { if ($closethread=="yes" and $permissions['canopenclose']==1) { $DB_site->query("UPDATE thread SET open='0' WHERE threadid='$threadid'"); } if ($attachmentid and !$foruminfo[moderateattach]) { $DB_site->query("UPDATE thread SET attach = attach + 1 WHERE threadid = '$threadid'"); } Code:
} else { if ($closethread=="yes" and ($bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7)) { $DB_site->query("UPDATE thread SET open='0' WHERE threadid='$threadid'"); } if ($attachmentid and !$foruminfo[moderateattach]) { $DB_site->query("UPDATE thread SET attach = attach + 1 WHERE threadid = '$threadid'"); } Code:
if ($permissions['canopenclose']==1) { $closethreadchecked=iif(trim($closethread)=="yes","checked",""); eval("\$closethreadbox = \"".gettemplate("newpost_closethread")."\";"); } else { $closethreadbox=""; } Code:
if ($bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7) { $closethreadchecked=iif(trim($closethread)=="yes","checked",""); eval("\$closethreadbox = \"".gettemplate("newpost_closethread")."\";"); } else { $closethreadbox=""; } Sorry for my bad english... |
#36
|
|||
|
|||
Oh, yes.. if you allready installed it, you can use this changes in your newreply.php...
|
#37
|
||||
|
||||
Super fix! :up: Major thanks!
|
#38
|
||||
|
||||
Thnx for the fix AlexD
|
#39
|
|||
|
|||
if you still want it the way, it should work, try this:
PHP Code:
See it in Action on http://www.hotornot.de |
#40
|
||||
|
||||
I tried the fix by pwr_sneak.
What I found is that as an Admin, if I change the permissions for the admin user group to NOT be able to close own threads, that I did not see the checkbox for ANY thread, regardless of who started it. Correct me if I'm wrong, but the way the hack is in the last version that I posted, will work just fine for the vast majority of people who use the default permissions scheme, where admins can close any thread, mods can close threads in their forums, and regular members cannot close any threads at all, right? If this is true, then I'm leaving my version posted as-is. If you use a different permission scheme, then it kind of complicates things, and I think part of the problem is that there is no permission setting (that I can find) that lets a user or user group be able to close any thread, just the one where they can close their own threads. |
#41
|
|||
|
|||
Your last Version uses hard-coded usergroupid and it don't let the user close his own thread if he started it.
If you changed your Admin Usergroup not to close their own threads, why should they have permission to close any thread?? Anyway, I got another Version which should work for not only the majority of forums but all, because its fully based upon the permission system in VBulletin. PHP Code:
It first checks if the user is Moderator for this Forum or even SuperModerator and then (if not) asks for the permission "Close own threads" and if the User has started this thread. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|