The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Send a Private Message to Public Group Leaders Upon a Join Request Details »» | |||||||||||||||||||||||||||
Send a Private Message to Public Group Leaders Upon a Join Request
Developer Last Online: Nov 2013
I'm still surprised this isn't built in yet. What this mod does is to send a private message to all of the leaders of a public group, letting them know that somebody wants to join the group.
To install: Add a new phrase: (obviously, change the url to go to your board ) group_memberships_message Code:
Text: A request has been made to join the public group: {1}, of which you are a leader. You may validate the user here Supporters / CoAuthors Show Your Support
|
Comments |
#52
|
|||
|
|||
after a good long while of testing i finally fixed up this hack
the main problem that existed was the bbcode was being parsed in the hack, when it didnt need to be, vb will parse the bbcode when displaying the pm, so i then proceeded to use bbcode to construct the phrase for the pm the second thing i fixed was the url issue, i was on the right track using {2} in my last post above but i put the wrong variable into the hack, so now it works just fine anyways here are the new updated files, amykhar you might wanna update the hack so people dont have to come to the last page to see it needed fix'n |
#53
|
|||
|
|||
thanks cynix
installed and seems to be working good. |
#54
|
||||
|
||||
Yeah thanks man. That worked now!
|
#55
|
|||
|
|||
excellent plugin
*INSTALLED* finally very new to all this so took me a few days to learn exactly how to get this working *feels silly* working perfectly just wondering if there was any news on an auto reply pm accepting the member? |
#56
|
|||
|
|||
Quote:
Is this the same file that you download from the side bar? Code:
product - vbulletin hooklocation - profile_insertjoinreques title - PM Group Leader on Join Request Plugin PHP Code - require_once(DIR . '/includes/class_bbcode.php'); // Find the leaders of the usergroup $leaders = $db->query_read(" SELECT ugl.userid, username FROM " . TABLE_PREFIX . "usergroupleader AS ugl INNER JOIN " . TABLE_PREFIX . "user AS user USING(userid) WHERE ugl.usergroupid = " . $vbulletin->GPC['usergroupid'] . " "); // Get the name of the member group $groupname = $db->query_first(" SELECT title FROM " . TABLE_PREFIX . "usergroup WHERE usergroupid = " . $vbulletin->GPC['usergroupid'] ." ORDER BY usergroupid DESC LIMIT 1 "); // Create the message: $message = construct_phrase($vbphrase['group_memberships_message'], $groupname['title'], $vbulletin->options['bburl']); if ($db->num_rows($leaders)) { while ($leader = $db->fetch_array($leaders)) { // create the DM to do error checking and insert the new PM $pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY); $pmdm->set('fromuserid', $vbulletin->userinfo['userid']); $pmdm->set('fromusername', $vbulletin->userinfo['username']); $pmdm->set('title', $vbulletin->userinfo['username']. " would like to join " . $groupname['title']); $pmdm->set('message', $message); $pmdm->set_recipients($leader[username], $botpermissions); $pmdm->set('dateline', TIMENOW); $pmdm->set_info('savecopy',0); $pmdm->save(); } } else { eval(standard_error(fetch_error('usergroup_already_member'))); } // End of mod plugin is active - yes |
#57
|
|||
|
|||
I still sense that this plug-in is buggy.
getting Fatal error: Unable to proceed with save while $errors array is not empty in class vb_datamanager_pm in /includes/class_dm.php on line 758 1. Using VB 3.5.3 2. Using multiple joinable Groups with multiple group leaders for each. 2. Have added the VB phrase group_memberships_message. The confusing part is that the problem is intermittant. When I remove the plug-in and VB phrase and re-install everything it seems to work for while until a few new user registrations later and join requests to any of the groups bombs out with the error message above. In another case it will work with only one of my 3 joinable groups and bomb out with the other two. In other cases each group leader will get multiple (3) PM messages for the same "join request to one specific group!. Has anybody else using VB 3.5.3 with multiple joinable groups and group leaders experienced similar intermittant problems with this plug-in?. |
#58
|
||||
|
||||
It must be something in the pm settings for some of the group leaders. At some point, I'll look into how to make this more bullet-proof, but for now it suits my needs.
|
#59
|
|||
|
|||
Quote:
|
#60
|
||||
|
||||
I found out how to reproduce the error that happens on line 758, in my case one of my group leaders had a space in his username. Once I removed him as a group leader the bug went away. I am not sure which version of the hack I have but I am going to reinstall and try again.
Thanks again, -Jason |
#61
|
||||
|
||||
Ok, big dummy, should have tested it again "after" I uploaded the new version. It works
Thanks!! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|