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.
Quote:
Originally Posted by Badhabitz
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....php?do=modify
find
Product : Mass PM Usergroups
Then click the edit button where it says:
Process PM private_insertpm_process
Find
Code:
$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
Code:
$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!
|