Quote:
Originally Posted by mawby
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.
|
Here's what to do..
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))"
);
}
}
Plugin: LAM - No Permission Message (View)
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')));
}
}
}
}
Both pieces of new code has been tested (and is running) on my site
http://darkztar.com/