PDA

View Full Version : Private Messages Enhancements - Mass PM Usergroups (NOT via admincp)


vBNinja
05-09-2014, 10:00 PM
This is a custom mod I created for the member: XSV_4ce and was given permission to release it here.

This mod basically allows specific usergroups (not required to be admins) to be given a list of other usergroups they are allowed to mass PM (can also be allowed to PM all usergroups)

A checkbox list of the allowed usergroups will show up above the PM message area (in private.php) for those given permission to use the feature (see screenshots)

Features:

Setting to allow only certain usergroups to use the mass PM feature
Setting to allow specific usergroups to mass PM all usergroups (overwrites custom permissions / [Useful for admin/mod usergroups])
Allows "custom permissions" in which usergroups can only mass PM a specific list of other usergroups


Note: Checking one or more usergroups to mass PM will overwrite the "BCC Recipients" field (should't be a problem, but just letting you know ;))

Please "Mark as Installed" for support/updates
Also don't forget to rate
Nominate for MOTM if you'd like as well :)


Installation Instructions:

Import the XML
Change settings to your liking (http://YOURDOMAIN.COM/admincp/options.php?do=options&dogroup=masspm_ugs_settings)
Enjoy!


Please let me know if you find any bugs

Thanks!

Sforums
05-10-2014, 07:06 PM
Excellent!

ggrimes620
05-11-2014, 02:53 AM
Not working for my setup. I'm running 4.2.2.

http://postimg.org/image/guscijm79/

My settings in ACP:

http://postimg.org/image/9exi0niw9/

vBNinja
05-11-2014, 02:59 AM
Not working for my setup. I'm running 4.2.2.

http://postimg.org/image/guscijm79/

My settings in ACP:

http://postimg.org/image/9exi0niw9/

Sometimes cache is an issue, try visiting this page:
http://YOURDOMAIN.com/admincp/misc.php?do=clear_cache

Then see if it works

ggrimes620
05-11-2014, 03:10 AM
I just now cleared cache and still see nothing like described in your pictures.

vBNinja
05-11-2014, 03:16 AM
I just now cleared cache and still see nothing like described in your pictures.

Can you PM me an admin login so I can check it out?

ggrimes620
05-11-2014, 03:23 AM
Sure

vBNinja
05-11-2014, 04:32 AM
Updated to 1.1
Changes:

Fixed cache issue that prevented checkboxes from appearing at times
Fixed potential Tapatalk conflict


To update simply download the new XML and import with "allow overwrite" set to YES

NoMatt3r
05-11-2014, 09:50 AM
I can't import your addon. Getting stuck at installation: http://puu.sh/8HTDb.png

EDIT: Although it stucks, i can set mass PM usergroups in admicp. BUT when i click on New Message i get

Parse error: syntax error, unexpected 's' (T_STRING) in /home/ehcainho/public_html/forum/includes/class_core.php(4715) : eval()'d code on line 83

and this no content http://puu.sh/8HTRq.png

vBNinja
05-11-2014, 02:08 PM
I can't import your addon. Getting stuck at installation: http://puu.sh/8HTDb.png

EDIT: Although it stucks, i can set mass PM usergroups in admicp. BUT when i click on New Message i get

Parse error: syntax error, unexpected 's' (T_STRING) in /home/ehcainho/public_html/forum/includes/class_core.php(4715) : eval()'d code on line 83

and this no content http://puu.sh/8HTRq.png

Another mod is probably causing this

tomfuegue
05-11-2014, 03:44 PM
It works perfectly on my vBulletin 4.2.2 Patch Level 1.

Thanks a lot!!!.

gajinoz
05-14-2014, 10:23 PM
Does not seem to work on my Vers. 4.1.7

Screenshot of settings below. Why does it say no usergroups allowed?

Also, no selection boxes appear when creating new PM

gajinoz
05-15-2014, 10:14 PM
I've reinstalled with overwrite, followed the directions, same result. Not working.

vBNinja
05-15-2014, 10:22 PM
This is for vB Version: 4.2.x atm

gajinoz
05-17-2014, 10:30 PM
Sorry, didn't notice that bit. Any chance of a 4.1.x version?

Badhabitz
05-20-2014, 05:10 PM
This thing is amazing for my community since we are a multi gaming community and I needed my Guild Leaders to be able to PM members within their usergroups.

However members are in mutiple usergroups since we have a usergroup for each guild. So I modified this to look for if the member is in a secondary user group instead of their primary.

I hope VBNinja doesn't mind me posting how I did this.

Go to
http://www.yourforumname.com/admincp/plugin.php?do=modify

find
Product : Mass PM Usergroups
Then click the edit button where it says:
Process PM private_insertpm_process

Find


$masspm_recipients_q = $vbulletin->db->query_read_slave(
"SELECT username FROM " .TABLE_PREFIX. "user
WHERE usergroupid IN (".implode(',', $masspm_recipientugs).")"
);



And replace with this line



$masspm_recipients_q = $vbulletin->db->query_read_slave(
"SELECT username FROM " .TABLE_PREFIX. "user
WHERE membergroupids LIKE '%".implode(',', $masspm_recipientugs)."%'"
);


Save and your done.

Hope this helps anyone else looking to send mass pm's based on a secondary usergroup. Thanks VBNinja for a great mod!

blackberry
06-12-2014, 09:41 AM
Give blank page :-s

Daniel
10-14-2014, 07:06 PM
This breaks if there is a ' in the usergroup name.

Parse error: syntax error, unexpected 's' (T_STRING) in /includes/class_core.php(4715) : eval()'d code on line 79

Sforums
10-15-2014, 01:50 AM
Uninstalled. Doesn't work properly, too many problems.

ozzy47
10-15-2014, 01:58 AM
Uninstalled. Doesn't work properly, too many problems.

You need to be more descriptive so the developer knows what the issue are so he can potentially fix them.

mrsupps
12-02-2014, 08:56 PM
When I try to send PM I get an error because some of my users have special characters but I see the list of receipents at that point.

I copied the BCC list and removed the bad names (Just 3 so easy to do).

Now when I try to send the PM to that list I just get a blank page.

So this is not technically an issue with the script I don't think.

Any help would be appreciated.

ozzy47
12-02-2014, 09:02 PM
Well the error message you are getting would help. As well as the names that are causing the error. :)

yippykiyey
12-18-2014, 12:09 AM
Running into an issue using 4.2.2

Parse error: syntax error, unexpected 's' (T_STRING) in /home/yippykiyey/public_html/forums/includes/class_core.php(4715) : eval()'d code on line 185

Any ideas on a solution?

yippykiyey
12-18-2014, 01:51 AM
Disregard, fixed.

bounty7565
03-08-2015, 09:15 PM
Is it possible to set this up to allow you to message someone regardless to whether their usergroup is primary, or additional usergroup?

Edit: I followed Badhabitz's instructions below, and it appears that I can now PM both primary and secondary groups.

This thing is amazing for my community since we are a multi gaming community and I needed my Guild Leaders to be able to PM members within their usergroups.

However members are in mutiple usergroups since we have a usergroup for each guild. So I modified this to look for if the member is in a secondary user group instead of their primary.

I hope VBNinja doesn't mind me posting how I did this.

Go to
http://www.yourforumname.com/admincp/plugin.php?do=modify

find
Product : Mass PM Usergroups
Then click the edit button where it says:
Process PM private_insertpm_process

Find


$masspm_recipients_q = $vbulletin->db->query_read_slave(
"SELECT username FROM " .TABLE_PREFIX. "user
WHERE usergroupid IN (".implode(',', $masspm_recipientugs).")"
);



And replace with this line



$masspm_recipients_q = $vbulletin->db->query_read_slave(
"SELECT username FROM " .TABLE_PREFIX. "user
WHERE membergroupids LIKE '%".implode(',', $masspm_recipientugs)."%'"
);


Save and your done.

Hope this helps anyone else looking to send mass pm's based on a secondary usergroup. Thanks VBNinja for a great mod!

EasyEazy
04-17-2015, 08:42 PM
Is it possible to set this up to allow you to message someone regardless to whether their usergroup is primary, or additional usergroup?

Edit: I followed Badhabitz's instructions below, and it appears that I can now PM both primary and secondary groups.

Nice update and great mod vbNinja. Working perfectly.

Novablaze
04-30-2015, 02:43 PM
Give blank page :-s

This is what i am getting when i select my Registered users group to send a mass MSG to all other usegroups seem to be working fine just that one is not i have added the code for a secondry usergroup now that it only sends to a few users when i send a msg to registered users if you can think of a fix to this issue it will be a great help.

PS i think it maybe due to the # and others like [ {etc etc so if we can find a fix for that it would be appricated.

blackberry
12-02-2015, 10:34 AM
plugin is enabled but options are not showing anymore ??
it seems to be working fine.

blackberry
12-02-2015, 10:35 AM
This is what i am getting when i select my Registered users group to send a mass MSG to all other usegroups seem to be working fine just that one is not i have added the code for a secondry usergroup now that it only sends to a few users when i send a msg to registered users if you can think of a fix to this issue it will be a great help.

PS i think it maybe due to the # and others like [ {etc etc so if we can find a fix for that it would be appricated.
best is to select few usergroups and send.

Guardian Hope
08-27-2016, 03:34 AM
Uninstalled. Worked with vBulletin 4.2.2 but not 4.2.3 or 4.2.5.

Selecting to go to the "full editor" results in a page of the UserCP loaded with a blank spot where the full editor should be.

A shame, it was a useful modification.