The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
LAM - Dispute Resolution Details »» | |||||||||||||||||||||||||||||||||||||||||
This product will allow you to configure a forum so that only a thread creator, their nominated list of disputed members, and moderators are able to reply to the thread. When a dispute thread is created a PM will be sent to all those involved in the dispute.
On my site we have a lot of people selling items, and occasionally something goes wrong during the process. Before we had this product a member would post up about their problem and it became a free-for-all with 'friends' of both sides posting up slating the other side for being wrong and generally turning into a slanging match until the thread eventually got locked. Now, thanks to this product, only those actually involved in the dispute can reply. This has resulted in almost all of our disputes being resolved in a way where both sides are happy. As of version 4.0.8.1 it is now possible to configure this product to run in "Private Dispute" mode. This extends the normal functionality described above to also prevent those not in the dispute from being able to view the contents of the thread. They can still see it exists but any thread preview text, or opening the thread itself, will show a "You are not authorised to participate in this dispute" message. As of version 4.0.8.2 it is now possible to configure this product to run in "Extra Privacy" mode. This extends the "Private Dispute" functionality described above to also prevent those not in the dispute from being able to see the thread exists. With this setting enabled dispute threads will not be shown when browsing a forum if the user is not the thread creator, on the disputed list, or a moderator. As of version 4.1.3.0 it is now possible to make entering the disputed user names optional via the "Optional Disputes" setting. You can also enable the dispute functionality on all forums by enabling the "Globally Enabled" setting. As of version 4.1.4.0 it is now possible for the thread creator, or a moderator, to edit the threads dispute list by performing an advanced edit on any post in the thread which they have permission to edit. Upgrade instructions for this version can be found here. As of version 4.1.4.1 it is now possible to create a dispute against a single user group by enabling the "Enable Usergroups" setting. This will allow anyone in the user group to participate in the dispute, as well as anyone on the normal dispute list. PM notifications won't be sent to the user group. This version also fixes several bugs with the Private Dispute option where searches would still show a dispute thread even if the user wasn't allowed to participate in the dispute. Tapatalk Users - Please see this important note about Tapatalk support. Installation
Configuration You need configure which forums you want this product to run in, or globally enable it to run in all forums. You can also specify if creating a "dispute" thread in a dispute forum is optional. There is a setting that lets you override who the notification PM is sent from should you prefer it to come from an admin account rather than the user's account. And finally there are the privacy and user group options as detailed above. Example When creating or advanced editing a thread in a disputes forum there is now an additional row where the user can edit the user names (and user group if enabled) of those they are disputing... When the thread is created (or advanced edited) a PM is sent to those involved in the dispute (only newly disputed members are PMd when editing a thread)... When the thread is viewed it shows at the top who the dispute is between... An error will be shown if; the thread creator forgets to enter any names and the "Optional Disputes" option is set to No... the thread creator enters an unrecognised name... or someone not in the disputed list tries to reply to the thread... Version History 4.1.4.1 - Added user group option. Stopped threads showing in searches when Private Disputes is enabled. Stopped sending PMs to users already on the disputes list when editing a thread. (2011/07/19) 4.1.4.0 - Added the disputed users to the advanced edit screen & removed the admin option (2011/07/05) 4.1.3.0 - Added optional disputes, global enable and prevented the admin option appearing in non-disputes forums (2011/05/01) 4.1.2.0 - Fixed an SQL error if the admin option was accessed in a forum that didn't have disputes turned on (2011/03/25) 4.0.8.3 - Added auto-suggest to the user names field (2010/11/01) 4.0.8.2 - Added Extra Privacy mode (2010/10/24) 4.0.8.1 - Added Private Dispute mode (2010/10/23) 4.0.8.0 - Initial release (2010/10/23) Credits Although I've written this product for vB 4 the original idea came from the Private Debates product written by beebi. The code to not send PMd to users already on the disputes list when edited a thread was contributed by CheeSie Download Now
Screenshots
Show Your Support
|
Comments |
#72
|
|||
|
|||
Quote:
I haven't look at the social groups. There could be a performance overhead with the social groups one as I suspect I'd need to query another table to find out what social group each user is in. |
#73
|
|||
|
|||
Advanced Warning
Given it doesn't work properly, I intend to remove the Extra Privacy mode form the product in the next release. If I get this working properly in the furture I'll put it back in, but for now I don't want to support an option that doesn't work as it just causes grief for everyone. |
#74
|
|||
|
|||
So. If I load this I shouldn't use the "Extra" privacy mode? Not a problem. I need a debate area for our annual debate championship... This will do fine, I'll just need to change a few phrases and viola'...
Believe me, I'll mark as installed once I have it installed. |
#75
|
||||
|
||||
Quote:
Plugin: LAM - Hide Thread Completely (Extra Privacy) What has changed: This removes any information provided by forum permissions as to which threads to show and forces it to only show your own disputes or disputes you're involved in. Still only applies when Extra Privacy is eanbled New code Code:
if ($vbulletin->options['LAM_DisputeResolution_PrivateDisputes'] AND $vbulletin->options['LAM_DisputeResolution_ReallyPrivateDisputes']) { if (($vbulletin->options['LAM_DisputeResolution_GlobalEnable'] || in_array($foruminfo['forumid'], explode(',', $vbulletin->options['LAM_DisputeResolution_DisputeForumIDs']))) AND !can_moderate($foruminfo['forumid'])) { $limitothers = str_replace( "AND postuserid = " . $vbulletin->userinfo['userid'] . " AND " . $vbulletin->userinfo['userid'] . " <> 0", "", $limitothers . "AND (postuserid = " . $vbulletin->userinfo['userid'] . " OR " . $vbulletin->userinfo['userid'] . " IN (LAM_DisputeResolution))" ); } } What has changed: As before we're checking if we should apply all these things (Extra Privacy only). If the user is tagged in a dispute we add the "canviewothers" permissions (as they might have been disabled by the forum permissions - maybe add an option in the settings bit to enable/disable disputees from replying or just viewing the threads they've been tagged in). Still shows your error message if the user isn't supposed to view the thread. New code Code:
if ($vbulletin->options['LAM_DisputeResolution_PrivateDisputes'] AND $vbulletin->options['LAM_DisputeResolution_ReallyPrivateDisputes']) { if (($vbulletin->options['LAM_DisputeResolution_GlobalEnable'] || in_array($threadinfo['forumid'], explode(',', $vbulletin->options['LAM_DisputeResolution_DisputeForumIDs']))) AND !can_moderate($threadinfo['forumid'])) { if($threadinfo['LAM_DisputeResolution'] AND $vbulletin->userinfo['userid'] != $threadinfo['postuserid']){ //Allow user to see thread content if they've been tagged as a disputee in if(in_array($vbulletin->userinfo['userid'], explode(',', $threadinfo['LAM_DisputeResolution']))){ $vbulletin->userinfo['forumpermissions'][$threadinfo['forumid']] |= $vbulletin->bf_ugp_forumpermissions['canviewothers']; }else{ //Make sure they do not view the thread content eval(standard_error(fetch_error('LAM_DisputeResolution_NoPermission'))); } } } } |
#76
|
||||
|
||||
I would love to have this, but does it work with the new editor in 4.1.4?
|
#77
|
||||
|
||||
Further improvements..
Plugin: LAM - Save Edited Dispute Resolution Data What has changed: You just saved the list of disputees everytime, but when quick editing the post the list was empty, this has been fixed as it no longer updates if the request was made via ajax. Now it also only sends out PM notifications if the user has been added to the list and not if they were already on the list (otherwise all tagged members would receive loooots of pm if some noob was editing the thread massively). New code Code:
if (!$vbulletin->GPC['ajax'] && ($threadinfo['postuserid'] == $vbulletin->userinfo['userid'] || can_moderate($threadinfo['forumid'], 'caneditthreads'))) { $vbulletin->input->clean_gpc('p', 'LAM_DisputeResolution_UserNames', TYPE_STR); $vbulletin->GPC['LAM_DisputeResolution_UserNames'] = trim($vbulletin->GPC['LAM_DisputeResolution_UserNames']); if(!empty($vbulletin->GPC['LAM_DisputeResolution_UserNames'])) { $LAM_DisputeResolution_Names = explode(";", $vbulletin->GPC['LAM_DisputeResolution_UserNames']); unset($LAM_DisputeResolution_SQL, $LAM_DisputeResolution_UIDs); foreach ($LAM_DisputeResolution_Names AS $LAM_DisputeResolution_Name) { $LAM_DisputeResolution_Name = $db->escape_string(trim($LAM_DisputeResolution_Name)); if (!empty($LAM_DisputeResolution_Name)) { $LAM_DisputeResolution_SQL .= ",'$LAM_DisputeResolution_Name'"; } } $LAM_PreDisputees = explode(',', $threadinfo['LAM_DisputeResolution']); $LAM_DisputeResolution_UserInfo = fetch_userinfo($vbulletin->options['LAM_DisputeResolution_FromUserID']); $LAM_DisputeResolution_SQL = substr($LAM_DisputeResolution_SQL, 1); $LAM_DisputeResolution_Query = $db->query_read("SELECT userid, username FROM " . TABLE_PREFIX ."user AS user WHERE username IN ($LAM_DisputeResolution_SQL)"); while ($LAM_DisputeResolution_Row = $db->fetch_array($LAM_DisputeResolution_Query)) { $LAM_DisputeResolution_UIDs .= "," . $LAM_DisputeResolution_Row['userid']; if(!in_array($LAM_DisputeResolution_Row['userid'], $LAM_PreDisputees)){ $pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY); if (empty($vbulletin->options['LAM_DisputeResolution_FromUserID'])) { $pmdm->set('fromuserid', $vbulletin->userinfo['userid']); $pmdm->set('fromusername', $vbulletin->userinfo['username']); } else { $pmdm->set('fromuserid', $LAM_DisputeResolution_UserInfo['userid']); $pmdm->set('fromusername', $LAM_DisputeResolution_UserInfo['username']); } $pmdm->set('title', $vbphrase['LAM_DisputeResolution_Title']); $pmdm->set('message', construct_phrase($vbphrase['LAM_DisputeResolution_PMText'], $vbulletin->options['bburl'] . "/showthread.php?" . $vbulletin->session->vars['sessionurl'] . $threadinfo['threadid'] . "")); $pmdm->set_recipients($LAM_DisputeResolution_Row['username'], $permissions); $pmdm->set('dateline', TIMENOW); $pmdm->pre_save(); if (empty($pmdm->errors)) { $pmdm->save(); } } } $LAM_DisputeResolution_UIDs = substr($LAM_DisputeResolution_UIDs, 1); $db->free_result($LAM_DisputeResolution_Query); $db->query_write("UPDATE " . TABLE_PREFIX . "thread SET LAM_DisputeResolution = '" . $LAM_DisputeResolution_UIDs . "' WHERE threadid = " . $threadinfo['threadid'] . ""); }elseif($vbulletin->options['LAM_DisputeResolution_OptionalDisputes']){ $db->query_write("UPDATE " . TABLE_PREFIX . "thread SET LAM_DisputeResolution = '' WHERE threadid = " . $threadinfo['threadid'] . ""); } unset($LAM_DisputeResolution_Query, $LAM_DisputeResolution_SQL, $LAM_DisputeResolution_Names, $LAM_DisputeResolution_UIDs, $LAM_DisputeResolution_UserInfo, $LAM_PreDisputees); } Plugin: LAM - Check Edit Usernames Have Been Given What has changed: Commented out something you didn't use that was really dumb to include (sorry), but there's no point in it and I had to comment it out to add that "only notify new recipients feature". New code Code:
if (!$vbulletin->GPC['ajax'] AND !$vbulletin->GPC['quickeditnoajax'] AND !$vbulletin->GPC['advanced'] AND ($threadinfo['postuserid'] == $vbulletin->userinfo['userid'] || can_moderate($threadinfo['forumid'], 'caneditthreads'))) { $vbulletin->input->clean_gpc('p', 'LAM_DisputeResolution_UserNames', TYPE_STR); if ($vbulletin->options['LAM_DisputeResolution_GlobalEnable'] || in_array($foruminfo['forumid'], explode(',', $vbulletin->options['LAM_DisputeResolution_DisputeForumIDs']))) { if (empty($vbulletin->GPC['LAM_DisputeResolution_UserNames'])) { if (!$vbulletin->options['LAM_DisputeResolution_OptionalDisputes']) { eval(standard_error(fetch_error('LAM_DisputeResolution_MissingUserNames'))); } } else { $LAM_DisputeResolution_Names = explode(";", $vbulletin->GPC['LAM_DisputeResolution_UserNames']); foreach ($LAM_DisputeResolution_Names AS $LAM_DisputeResolution_Name) { $LAM_DisputeResolution_Name = $db->escape_string(htmlspecialchars_uni(trim($LAM_DisputeResolution_Name))); if (!empty($LAM_DisputeResolution_Name)) { $LAM_DisputeResolution_Query = $db->query_first("SELECT userid FROM " . TABLE_PREFIX ."user AS user WHERE username = '$LAM_DisputeResolution_Name'"); if ($LAM_DisputeResolution_Query) { $LAM_DisputeResolution_UIDs .= "," . $LAM_DisputeResolution_Query['userid']; $db->free_result($LAM_DisputeResolution_Query); } else { eval(standard_error(fetch_error('LAM_DisputeResolution_UnknownUserName', $LAM_DisputeResolution_Name))); } } } } //Could delete if you want to, just kept it commented to show you what I meant //$threadinfo[LAM_DisputeResolution] = $vbulletin->GPC['LAM_DisputeResolution_UserNames']; unset($LAM_DisputeResolution_Query, $LAM_DisputeResolution_Names, $LAM_DisputeResolution_UIDs); } } |
#78
|
||||
|
||||
Moreeeeeeee XD
To fix that the user could just add themselves as the ones being disputed.. Add the following phrase. Type: Error Messages Product: LAM - Dispute Resolution VarName: LAM_DisputeResolution_NoAddingSelf Text: You cannot add yourself as one of those you are disputing. Plugin: LAM - Check Edit Usernames Have Been Given What has changed: Removed unused stuff (seriously learn to clean up) and added the above mentioned check New code Code:
if (!$vbulletin->GPC['ajax'] AND !$vbulletin->GPC['quickeditnoajax'] AND !$vbulletin->GPC['advanced'] AND ($threadinfo['postuserid'] == $vbulletin->userinfo['userid'] || can_moderate($threadinfo['forumid'], 'caneditthreads'))) { $vbulletin->input->clean_gpc('p', 'LAM_DisputeResolution_UserNames', TYPE_STR); if ($vbulletin->options['LAM_DisputeResolution_GlobalEnable'] || in_array($foruminfo['forumid'], explode(',', $vbulletin->options['LAM_DisputeResolution_DisputeForumIDs']))) { if (empty($vbulletin->GPC['LAM_DisputeResolution_UserNames'])) { if (!$vbulletin->options['LAM_DisputeResolution_OptionalDisputes']) { eval(standard_error(fetch_error('LAM_DisputeResolution_MissingUserNames'))); } } else { $LAM_DisputeResolution_Names = explode(";", $vbulletin->GPC['LAM_DisputeResolution_UserNames']); foreach ($LAM_DisputeResolution_Names AS $LAM_DisputeResolution_Name) { $LAM_DisputeResolution_Name = $db->escape_string(trim($LAM_DisputeResolution_Name)); if (!empty($LAM_DisputeResolution_Name)) { $LAM_DisputeResolution_Query = $db->query_first("SELECT userid FROM " . TABLE_PREFIX ."user AS user WHERE username = '$LAM_DisputeResolution_Name'"); if ($LAM_DisputeResolution_Query) { if($LAM_DisputeResolution_Query['userid'] == $vbulletin->userinfo['userid']){ eval(standard_error(fetch_error('LAM_DisputeResolution_NoAddingSelf'))); } $db->free_result($LAM_DisputeResolution_Query); } else { eval(standard_error(fetch_error('LAM_DisputeResolution_UnknownUserName', $LAM_DisputeResolution_Name))); } } } } unset($LAM_DisputeResolution_Query, $LAM_DisputeResolution_Names, $LAM_DisputeResolution_UIDs); } } Plugin: LAM - Check Usernames Have Been Given What has changed: Removed unused stuff (seriously learn to clean up) and added the above mentioned check New code Code:
$vbulletin->input->clean_gpc('p', 'LAM_DisputeResolution_UserNames', TYPE_STR); if ($vbulletin->options['LAM_DisputeResolution_GlobalEnable'] || in_array($foruminfo['forumid'], explode(',', $vbulletin->options['LAM_DisputeResolution_DisputeForumIDs']))) { if (empty($vbulletin->GPC['LAM_DisputeResolution_UserNames'])) { if (!$vbulletin->options['LAM_DisputeResolution_OptionalDisputes']) { eval(standard_error(fetch_error('LAM_DisputeResolution_MissingUserNames'))); } } else { $LAM_DisputeResolution_Names = explode(";", $vbulletin->GPC['LAM_DisputeResolution_UserNames']); foreach ($LAM_DisputeResolution_Names AS $LAM_DisputeResolution_Name) { $LAM_DisputeResolution_Name = $db->escape_string(trim($LAM_DisputeResolution_Name)); if (!empty($LAM_DisputeResolution_Name)) { $LAM_DisputeResolution_Query = $db->query_first("SELECT userid FROM " . TABLE_PREFIX ."user AS user WHERE username = '$LAM_DisputeResolution_Name'"); if ($LAM_DisputeResolution_Query) { if($LAM_DisputeResolution_Query['userid'] == $vbulletin->userinfo['userid']){ eval(standard_error(fetch_error('LAM_DisputeResolution_NoAddingSelf'))); } $db->free_result($LAM_DisputeResolution_Query); } else { eval(standard_error(fetch_error('LAM_DisputeResolution_UnknownUserName', $LAM_DisputeResolution_Name))); } } } } unset($LAM_DisputeResolution_Query, $LAM_DisputeResolution_Names, $LAM_DisputeResolution_UIDs); } |
#79
|
||||
|
||||
Didn't get my question answered and the reason I am concerned about it is due to the screenshots showing the OLD editor pre 4.1.4
|
#80
|
|||
|
|||
@CheeSie, in my defence this code has evolved quite a bit over the last year and finding the time to update it with community requested features is often hard enough, let alone going back over it to tidy it up.... however.... I very much appreciate your contributions to this addon and I will attempt to merge them into the current version of the code and release it all as an update by the end of the week.
@Successfulsteps, this works fine on my site with the new editor. |
#81
|
|||
|
|||
Update
It is now possible to create a dispute against a single user group by enabling the "Enable Usergroups" setting. This will allow anyone in the user group to participate in the dispute, as well as anyone on the normal dispute list. PM notifications won't be sent to the user group. This version also fixes several bugs with the Private Dispute option where searches would still show a dispute thread even if the user wasn't allowed to participate in the dispute. Although this doesn't fix all the problems when using Private Disputes, it is a major step in the right direction! The remaining problems with Private Disputes are... 1) Last post details shown on the statistics page of the user profile. This can show disputes threads even if the user isn't allowed to participate in the dispute. Until this is fixed it can be circumvented by disabling the option to show the last post on the user profile. 2) CMS latest posts/threads widgets will still show disputes threads even if the user is not allowed to participate in them. I will try and fix this soon. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|