vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   New Posting Features - LAM - Dispute Resolution (https://vborg.vbsupport.ru/showthread.php?t=252472)

mawby 04-08-2011 08:52 AM

Quote:

Originally Posted by morrow (Post 2177339)
That's about it. If you can do this great, if not, no big deal. I think 1 and 2 are more important than 3 at the moment.

I'll add them to the list. I can't say when they'll get done though.

Quote:

Originally Posted by Sforums (Post 2180620)
Great stuff, love it.
However, today I doscovered serious problem:

Dispute thread was initiated and all of a sudden member who is not involved in dispute posted. His post came from mobile phone. At my forum we use tapatalk (https://vborg.vbsupport.ru/showthrea...light=tapatalk). I checked all permissions, used my forum testing ID and always received message that I can't get access to disputed thread, which is the way it should be. There must be some kind of conflict between these 2 mods, would you please look into it?

I suspect Tapatalk bypasses the normal route to creating posts/threads and performs the checks itself. As much as my mod knows nothing about the existence of Tapatalk or what to do with it, Tapatalk knows nothing about my mod either! Neither is at fault. :)

Unfortunately for me I do use Tapatalk on my site (well I don't, but users of my site do) so it's in my best interest to take the time to bridge the two mods. It won't be for a couple of weeks yet though.

Quote:

Originally Posted by Sforums (Post 2180681)
It would be nice to have an option to mark thread as "Dispute Resolved". Any ideas how to do this?

I'll look into adding the option, but again it may be a few weeks before I get a chance to look at it.

mawby 04-23-2011 07:19 AM

I've had a quick look at the Tapatalk code and as suspected it does by-pass the normal vB code and therefore doesn't execute any of the hooks needed to allow the Disputes Resolution add-on to work. However, the calls to the necessary hooks are in the Tapatalk files but they are commented out. By un-commenting the hooks it is possible to prevent Tapatalk creating threads in a Disputes forum (necessary because Tapatalk is not able to collect the disputed user names needed by this add-on), and prevent it from allowing people to reply to Dispute threads of which they do not belong. There are some limitations to this though...
  • None of the extra privacy options of this add-on will work with Tapatalk
  • It is not possible to create a Dispute using Tapatalk
  • The error messages returned when trying to create a thread/post are generic and not relevant to the Disputes add-on

I also want to state clearly that...
  • Applying these changes may break Tapatalk! By un-commenting the hooks you are exposing Tapatalk to all of your installed add-ons that use these hooks and although my Disputes Resolution add-on works fine other add-ons may not.
  • These changes will need re-doing every time you update Tapatalk
  • I make no guarantees that these changes will work with future versions of Tapatalk
  • Although I will try and keep the Disputes Resolution add-on and Tapatalk working together (for my own sites benefit if nothing else) I cannot offer any support for problems arising by making these changes. You make these changes at your own risk.

With that said, if you want basic Disputes Resolution support within Tapatalk then un-comment (remove the // from the beginning of) the following lines...

Code:

mobiquo/functions/new_topic.php
//($hook = vBulletinHook::fetch_hook('newthread_post_start')) ? eval($hook) : false;

mobiquo/functions/reply_post.php
mobiquo/functions/reply_topic.php
mobiquo/functions/get_quote_post.php
//($hook = vBulletinHook::fetch_hook('newreply_start')) ? eval($hook) : false;


reddyink 04-24-2011 10:56 PM

Great Mod!. Let to me know what does it take to add below functionality (I am willing to pay). I would like use this as a Thread Permissions MOD.

1) When a user is posting a thread, they will have option of selecting "Disputed Thread" Yes or No.

If No is selected, it becomes a general thread where everyone can use it. If Yes is selected only listed users can use the thread.
(or if no usersnames are entered, it becomes a public thread (all the forum permissions apply)
2) User has an option to enter User Group name and/or Social Group name. In that case, all the members of social group will be able to reply to the thread.

Thank you! PM me what does it take to do it.

Downloaded > Installed > Rated 5> Nominated

ProFifaLeagues 04-28-2011 06:35 PM

Great mod and something we will use heavly on our forum!
Is there anyway i can add some simple changes to offer some set Disputes ????

Ie we play Fifa and it could be used to arrange games that havent been played between members....

mawby 04-29-2011 03:01 PM

I'm going to be looking at all the requests made for this mod in the next couple of days so I can try and release the next version with all the features in that everyone have asked for.

Quote:

Originally Posted by rammieone (Post 2189765)
Is there anyway i can add some simple changes to offer some set Disputes ????

Ie we play Fifa and it could be used to arrange games that havent been played between members....

I'm not sure I understand, can you provide an example of what you mean.

ProFifaLeagues 04-29-2011 05:41 PM

Just some way of templete edits or other that can be set with options to enter info
For us some we would use being

Arrange game for IE time and date
Can you play IE Yes or No drop down box or just a reply space
Can play at this IE time and date (again some form of box or drop down to enter info

mawby 05-01-2011 12:07 PM

I've updated the product. This latest update fixes/adds...

Quote:

Originally Posted by mawby (Post 2177266)
The admin option still appears for all forums but if it's selected on a forum that doesn't have disputes turned on the user will get a friendly error message instead of an SQL error. When I get a bit more time I'll try and stop the menu option appearing at all when in a non-disputes forum.

Done. If you look at the instructions on the first post about editing the SHOWTHREAD template you'll see there are more lines to add now. For anyone upgrading simply do the following...

Code:

Find...
<li><label><input type="radio" name="do" value="LAM_DisputeResolution" tabindex="10" /> {vb:rawphrase LAM_DisputeResolution_Title}&hellip;</label></li>

Replace with...
<vb:if condition="$vboptions['LAM_DisputeResolution_GlobalEnable'] || in_array($threadinfo['forumid'], array($vboptions['LAM_DisputeResolution_DisputeForumIDs']))">
<li><label><input type="radio" name="do" value="LAM_DisputeResolution" tabindex="10" /> {vb:rawphrase LAM_DisputeResolution_Title}&hellip;</label></li>
</vb:if>

Quote:

Originally Posted by morrow (Post 2177339)
1. I'd like to be able to enable this in any forum however, when enabling in a forum, you MUST enter user names otherwise it won't allow you to post. I'd like to simply add the usernames but only if I want to add them. The way it's currently set up, one has to ideally create a new forum.

Quote:

Originally Posted by reddyink (Post 2188285)
1) When a user is posting a thread, they will have option of selecting "Disputed Thread" Yes or No.

If No is selected, it becomes a general thread where everyone can use it. If Yes is selected only listed users can use the thread.
(or if no usersnames are entered, it becomes a public thread (all the forum permissions apply)

Done. There is a new "Optional Disputes" setting that will skip the "You must enter the usernames of those you are disputing." test when enabled.

Quote:

Originally Posted by morrow (Post 2177339)
2. The ability to simply enable this in all forums and/or by forum ID's rather than having to go into each forum and ticking the button would of course be a great option.

Done. You can now specify the forums this is enabled for as a comma separated list on the products settings page, and there is also a "Globally Enabled" option too.





On my to-do list when I next get a spare couple of hours...

Quote:

Originally Posted by morrow (Post 2177339)
3. Now this one would really be cool... How about an option whereas you can input the users you DON'T want to see your new thread... For instance... UserA creates a new thread and doesn't want USER C, USER T and/or USERY to be able to read it and/or reply to it. However, ALL other users can do what the rules apply to.

I think this is out of scope of this product... however, I agree the product does lend itself well to such an idea so I will release a separate product based on the code of this one that can be used to ban a user from a thread. Being a separate product will allow me to add features that I'd find useful on my site like auto banning people on ignore lists and adding a quick ban from thread option to the postbit. I'll let you know when this is ready.

Quote:

Originally Posted by reddyink (Post 2188285)
2) User has an option to enter User Group name and/or Social Group name. In that case, all the members of social group will be able to reply to the thread.

Would this be an additional field or replace the usernames list? (For example, would you want to be able to ban user x OR users in group Y, or ban user X AND anyone in user group Y)

Quote:

Originally Posted by rammieone (Post 2190063)
Just some way of templete edits or other that can be set with options to enter info

So you simply want it to collect additional information and display it at the top of the thread? Or would this information be collected at post level instead of thread level? Either way this might also be out of scope of this product but I could release something to do the job as a separate product.

ProFifaLeagues 05-01-2011 01:34 PM

If the info could be collected at post level that would be superb Nhawk

mawby 05-04-2011 09:57 PM

Quote:

Originally Posted by mawby (Post 2190636)
I think this is out of scope of this product... however, I agree the product does lend itself well to such an idea so I will release a separate product based on the code of this one that can be used to ban a user from a thread. Being a separate product will allow me to add features that I'd find useful on my site like auto banning people on ignore lists and adding a quick ban from thread option to the postbit. I'll let you know when this is ready.

As promised... https://vborg.vbsupport.ru/showthread.php?t=263142

BLUSpy 05-10-2011 05:16 PM

I am not sure if it is just my settings that are or wrong or something is wrong with this product.

Like mentioned up thread I am using this product so that members of my website can create private threads between each other for role-play.

When you click on their profile and then click "View all posts" (and subsequently do a search) people who are not apart of the dispute can view the messages in the dispute thread. I have my settings configured so that they should not be able to view the dispute threads at all.

I have in my settings "Private Disputes" set to Yes and "Extra Privacy" set to Yes.

mawby 05-10-2011 05:27 PM

Hi BLUSpy. The problem is with the product and not your settings. Attempting to prevent a thread from being seen completely is proving tricky as there isn't one central place I can do it but instead I have to find all the different searches and fix them all. I did look at this problem last weekend and found the place in code I needed to hook in to didn't actually have a hook I could use. :(

I appreciate it's not very good though so I will attempt to resolve the issue. Unfortunately due to work time schedules I can't say when I'll get to look at it, but the more people I know this is affecting the more embarrassed I'll be about it so it will get sorted at some point! :)

reddyink 05-11-2011 11:05 PM

"Originally Posted by reddyink
2) User has an option to enter User Group name and/or Social Group name. In that case, all the members of social group will be able to reply to the thread.
Would this be an additional field or replace the usernames list? (For example, would you want to be able to ban user x OR users in group Y, or ban user X AND anyone in user group Y)"


This could be additional field or replacement (either way is fine)
Instead of entering userids, I would like to enter Social Group IDs or UserGroups IDs so that only and all of the members of the group can participate.

A Dead Puppie 05-11-2011 11:41 PM

Could you release a 3.8 version?

CardMafia 05-13-2011 01:11 AM

Great mod idea. Installed on a new board. I will post a review once the board goes live :)

CardMafia 05-13-2011 01:16 AM

Quote:

Originally Posted by BLUSpy (Post 2194118)
I am not sure if it is just my settings that are or wrong or something is wrong with this product.

Like mentioned up thread I am using this product so that members of my website can create private threads between each other for role-play.

When you click on their profile and then click "View all posts" (and subsequently do a search) people who are not apart of the dispute can view the messages in the dispute thread. I have my settings configured so that they should not be able to view the dispute threads at all.

I have in my settings "Private Disputes" set to Yes and "Extra Privacy" set to Yes.

If you have this set on a single forum, consider setting that forum as unsearchable. Not totally sure if this will prevent the posts from showing on the "View all posts" action, but it would keep the post out of a general site search. Hope this helps.

sulasno 06-17-2011 07:34 AM

tagged

BLUSpy 06-23-2011 11:14 PM

Any word on if you have resolved the search issue I mentioned earlier in the thread? Disabling search in the forum isn't possible for what I want to accomplish, unfortunately. The role-players still need to be able to search through their threads.

mawby 06-24-2011 10:54 AM

It's a difficult one to fix to without hacking files. It is still on my to-do list at the moment.

reddyink 06-29-2011 01:41 AM

When I edit the thread (Go Advanced ), I don't see how to edit the dispute member fields. Doesn't show at all.
First, I want add 1 more person to the dispute after submitting the tread.

Second, I may want to change the person who the dispute is between. Let me now if this can be accomplished. What I am doing wrong?
Thanks

BlessedFWI 07-02-2011 12:48 AM

This is a great mod!

I am using vb4.1.4 and I am not seeing the "Dispute Resolution" under the "Administrative" tools. Can you help me with this please?

Thanks so much!

Willy T 07-02-2011 12:35 PM

How can we get the border you have for our custom styles for the "dispute is between X & X" portion seen in your attachment: https://vborg.vbsupport.ru/attachmen...1&d=1287821986

Also, can you make it an option for the thread author to be able to change who the dispute is between?

BlessedFWI 07-03-2011 05:50 AM

Willy T, that is a great idea. I would also love it if the original author could edit the thread at anytime and add/remove people as needed. Can this be done, mawby? :)

S3Ponline 07-05-2011 06:43 AM

Quote:

Originally Posted by mawby (Post 2212124)
It's a difficult one to fix to without hacking files. It is still on my to-do list at the moment.

Would also REALLY love for this to be fixed.

Just a thought - In the default settings for VB 4.x, you can set "Can view other's threads" permissions to "No". Would it be easier/possible to make the Dispute Resolution override that setting for the individual users who are added to the dispute?

Seems to me that way you wouldn't have to mess with all the search functions... But I don't know how plausible it is to override that feature on an individual basis either.

mawby 07-05-2011 02:58 PM

Quote:

Originally Posted by reddyink (Post 2214343)
When I edit the thread (Go Advanced ), I don't see how to edit the dispute member fields. Doesn't show at all.

Quote:

Originally Posted by Willy T (Post 2215850)
Also, can you make it an option for the thread author to be able to change who the dispute is between?

Quote:

Originally Posted by BlessedLAF (Post 2216119)
Willy T, that is a great idea. I would also love it if the original author could edit the thread at anytime and add/remove people as needed. Can this be done, mawby? :)

I've updated the product. You can now edit the disputed user names by doing an advanced edit on a post by the owner, or any posts as a moderator.

Upgrade Instructions

As the admin option has been removed, you'll need to edit the SHOWTHREAD and remove this...

Code:

<vb:if condition="$vboptions['LAM_DisputeResolution_GlobalEnable'] || in_array($threadinfo['forumid'], array($vboptions['LAM_DisputeResolution_DisputeForumIDs']))">
<li><label><input type="radio" name="do" value="LAM_DisputeResolution" tabindex="10" /> {vb:rawphrase LAM_DisputeResolution_Title}&hellip;</label></li>
</vb:if>




Quote:

Originally Posted by BlessedLAF (Post 2215691)
I am using vb4.1.4 and I am not seeing the "Dispute Resolution" under the "Administrative" tools. Can you help me with this please?

The latest version doesn't use this menu any more, so that should fix that problem. :)

Quote:

Originally Posted by S3Ponline (Post 2216900)
Would also REALLY love for this to be fixed.

Just a thought - In the default settings for VB 4.x, you can set "Can view other's threads" permissions to "No". Would it be easier/possible to make the Dispute Resolution override that setting for the individual users who are added to the dispute?

I will look into it tomorrow.

Oh and I still haven't forgotten about the user group request. I'll try and look into that tomorrow too. (As always - work dependant)

Willy T 07-05-2011 09:48 PM

I GREATLY appreciate this update. Thank you VERY much for such a quick turn around time!

S3Ponline 07-06-2011 03:10 AM

Great Mawby!

Also nice taste in cars.

FD owner here. Wish I had the money for an MKIV

dmm2020 07-10-2011 03:32 PM

Removing the admin options without ANY instructions to configure it is a mistake in my opinion. I originally installed this and then had to disable it because I see no way to make it work. Your instructions for installing this are now obsolete and should at least be updated. I only want disputes to be allowed in one forum only and NOT in any of the others. When I reviewed the settings to these, nothing changes from the vB defaults. What I see at my end is a product taken form good to useless. Least it's not working in lastest version of vB. Something tells you you left a few steps out of install instructions that really should be in first post without forcing members to search all the posts to find the problem resolutions.

mawby 07-10-2011 06:02 PM

Err... the admin option removed was the option to edit the disputed users that appeared on the admin drop down menu of the thread for moderators. I removed it because you can now edit the disputed list by using the advanced edit option instead, enabling the thread creator to edit the disputed list without needing to be a moderator - as requested. I also updated the install instructions to reflect this. Everything else still remains, so I'm not sure what you're on about to be honest.

dmm2020 07-10-2011 07:11 PM

Well look at post 1. That is what should be updated. You show the graphic for the admincp yet. That should be removed. The part where you remove the item from SHOWTHREAD thread should also be added to post 1. You should also explain what part of the forum setup to edit. I found it by scanning the settings when I tried again. Once I found the option on the forum configuration page, I figured out the rest. This is not in the instructions (which leads to confusion) but instead you don't see it without fishing through all the posts. With clearer instructions, this would not be so confusing. The items no longer applicable should be removed from the initial post. Just my suggestion.

I still like the idea of admin settings (which can be in the forum setup) that make threads totally invisible to those not involved (except admins). The extra privacy option for example is now no longer available. That is important to keep confidential matters private.


Quote:

Originally Posted by mawby (Post 2219032)
Err... the admin option removed was the option to edit the disputed users that appeared on the admin drop down menu of the thread for moderators. I removed it because you can now edit the disputed list by using the advanced edit option instead, enabling the thread creator to edit the disputed list without needing to be a moderator - as requested. I also updated the install instructions to reflect this. Everything else still remains, so I'm not sure what you're on about to be honest.


dmm2020 07-10-2011 07:37 PM

I did some tests logging in as one of my "test users" with have registered member status. They are able to log in and view the test dispute even though they are not a party to the dispute. Is there something to be set regarding this?

mawby 07-14-2011 06:38 AM

Quote:

Originally Posted by reddyink (Post 2194619)
This could be additional field or replacement (either way is fine)
Instead of entering userids, I would like to enter Social Group IDs or UserGroups IDs so that only and all of the members of the group can participate.

I have this working on my dev system, allowing a list of users to be entered and an optional user group. Just one user group though, multiple users group was proving a problem to present to the user as there is no nice user group lookup like there is for user names, multi-select drop downs don't seem to work properly from within vB, and I thought it a bit naff to expect users to know user groups by ID. Will this single user group be good enough? If so I'll release an update with it in.

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.

mawby 07-14-2011 06:41 AM

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.

Phaedrus 07-17-2011 01:18 AM

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'...

:D

Believe me, I'll mark as installed once I have it installed.

CheeSie 07-18-2011 05:25 PM

Quote:

Originally Posted by mawby (Post 2220340)
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/

Successfulsteps 07-18-2011 05:34 PM

I would love to have this, but does it work with the new editor in 4.1.4?

CheeSie 07-18-2011 06:21 PM

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);
        }
}

You could do the above change to the "LAM - Check Usernames Have Been Given" plugin as well

CheeSie 07-18-2011 06:51 PM

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);
}


Successfulsteps 07-18-2011 09:20 PM

Quote:

Originally Posted by Successfulsteps (Post 2222053)
I would love to have this, but does it work with the new editor in 4.1.4?

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

mawby 07-19-2011 06:21 AM

@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.

mawby 07-19-2011 03:35 PM

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.


All times are GMT. The time now is 07:05 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.01543 seconds
  • Memory Usage 1,960KB
  • 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
  • (9)bbcode_code_printable
  • (23)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