View Full Version : Send a Private Message to Public Group Leaders Upon a Join Request
amykhar
06-13-2005, 10:00 PM
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
Text:
A request has been made to join the public group: {1}, of which you are a leader.
You may validate the user here ({2}/profile.php?do=editusergroups)
Then, upload the plugin and turn it on. Easy as pie. Enjoy and thanks to Kirby for his tutorial on how to send private messages.
mOdEtWo
06-14-2005, 09:43 PM
Very nice.
Could reduce the number of query insertions by sending to multiple users at once:
Have a look at this: :)
https://vborg.vbsupport.ru/showpost.php?p=666548&postcount=7
No need to use the while loop for the $pmdm->set then. :)
amykhar
06-14-2005, 11:52 PM
Could reduce the number of query insertions by sending to multiple users at once:
Have a look at this: :)
https://vborg.vbsupport.ru/showpost.php?p=666548&postcount=7
No need to use the while loop for the $pmdm->set then. :)
OK. I'll play with it later.
Gryphon
07-21-2005, 05:43 PM
My private messages were showing <br> from new lines in the phrase, also trying to make the link click-able it was showing html instead of parsing bbcode, so I had to make a change to do_parse in the plugin. Attached is my minor edit and my phrase.
amykhar
07-21-2005, 05:59 PM
Thank you :)
timelord726
07-22-2005, 10:43 PM
Ridiculous that this hasn't been made a standard feature yet. Thank you very much, incredibly simple yet unbelievably useful hack.
amykhar
07-22-2005, 11:15 PM
My pleasure. If I get time, I'll add in a feature so that users are notified via PM when they are accepted or denied.
FD929
07-30-2005, 12:33 AM
Is there any way to hyperlink the url? I've tried bbcode, html, and just plain hoping the software would automatically parse. Is it possible?
amykhar
07-30-2005, 02:01 AM
Read post 5.
Boofo
07-30-2005, 02:23 AM
My private messages were showing <br> from new lines in the phrase, also trying to make the link click-able it was showing html instead of parsing bbcode, so I had to make a change to do_parse in the plugin. Attached is my minor edit and my phrase.
Is the phrase GLOBAL?
Boofo
07-30-2005, 02:26 AM
Could reduce the number of query insertions by sending to multiple users at once:
Have a look at this: :)
https://vborg.vbsupport.ru/showpost.php?p=666548&postcount=7
No need to use the while loop for the $pmdm->set then. :)
You had a chance to look at this yet, amy? ;)
amykhar
07-30-2005, 03:08 AM
Yes. It's in the updated version.
Amy
Boofo
07-30-2005, 05:07 AM
Thank you, ;)
Is the phrase supposed to be GLOBAL? ;)
amykhar
07-30-2005, 02:00 PM
Yes. It's a global phrase Bob.
ricker
08-11-2005, 04:06 AM
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
Sometimes I can reproduce this, sometimes I can't. One of my users got this today, after he typed in his reason.
amykhar
08-11-2005, 04:21 AM
Any weird characters in the reason?
ricker
08-16-2005, 04:05 PM
Any weird characters in the reason?
Nopers. Short and to the point, all regular characters. He was actually bright enough to try with punctuation and without, and both failed.
TMM-TT
09-12-2005, 05:24 PM
Got an error in RC3, that I did'nt get in RC2:
Database error in vBulletin 3.5.0 Release Candidate 3:
Invalid SQL:
DELETE FROM usergrouprequest
WHERE usergrouprequestid IN();
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 2
Error Number : 1064
This error has been reported, and can be fixed, by looking here: http://www.vbulletin.com/forum/bugs35.php?do=view&bugid=1286
(Sometimes I'm too fast for my own good ;))
harry1951
09-30-2005, 03:05 PM
Does this works on 3.5.0 ???
q8manar
10-01-2005, 04:57 AM
From where we can use send to all
I installed it but i don't know how to use it
amykhar
10-01-2005, 01:39 PM
It's not what you think it is, if I am reading your question correctly. This mod sends a pm to the group leader when somebody requests permission to join the group. It does NOT allow you to mass pm the group.
Amy
The Wise One
10-03-2005, 11:18 PM
installed. works good on 3.5.0 so far.
Zachariah
10-04-2005, 12:25 AM
thank you ma'am.
Cyricx
10-04-2005, 07:25 PM
I'm getting this error with this plugin enabled on 3.5 gold
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
When I disable this plugin it works fine.
Any ideas?
Snake
10-06-2005, 07:19 PM
Thanks for the hack.
dookie
10-07-2005, 01:10 PM
Works fine @ 3.5 Gold here
I am also getting the fatal error mentioned above.
jluerken
10-12-2005, 07:36 AM
Phrase group_memberships_message contains a link to the editusergroups section in the usercp.
If HTML for PMs is not allowed this is not working.
vBTags like [URL] are also not working and I don't want to enable HTML for PMs.
Is there another solution to fix this?
Ted S
10-16-2005, 06:32 AM
I'm getting this error with this plugin enabled on 3.5 gold
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
When I disable this plugin it works fine.
Any ideas?
Check that you've got the phrase added. If that doesn't work try the udpated version in the second post of this thread... that worked for me.
Cyricx
10-17-2005, 12:50 PM
That was it! Thanks!!
Not sure how the phrase got deleted but thats definately what was causing the error.
Mephisteus
10-17-2005, 03:04 PM
You could add the phrase to the plugin :) (if its a product)
amykhar
10-17-2005, 04:20 PM
This was written before products and vbulletin changed the way it handled phrases on upgrades. Anybody who has it installed can easily change it to a product on their own system to avoid it from happening in the future.
majorxp
11-11-2005, 02:02 PM
I gotta install this.......I agree, this should be part of vb..
majorxp
11-11-2005, 02:27 PM
Phrase group_memberships_message contains a link to the editusergroups section in the usercp.
If HTML for PMs is not allowed this is not working.
vBTags like [URL] are also not working and I don't want to enable HTML for PMs.
Is there another solution to fix this?
did anyone figure this out? I'm in the same boat. Here is what my message looked like.
A request has been made to join the public group, + SWG Player, of which you are a leader.<br />
<br />
You may validate this user <a href="http://www.swglegend.com/lnr/portal/joinrequests.php?usergroupid=[ARG:2 UNDEFINED" target="_blank">]here</a> and you can manage all user groups <a href="http://www.swglegend.com/lnr/portal/profile.php?do=editusergroups" target="_blank">here</a>.
darn...I just realized that there is an ARG errror for {2}...any thoughts?
lanoix
11-14-2005, 02:17 PM
Installed... I just modified it to translate the title of the PM too ;)
Thanks!
GeorgeNewbie
11-14-2005, 04:13 PM
Im pretty new to all of vb and code stuff, but this seems like a great addition to any board. I was wondering if anyone could tell me where I would make these changes at....i.e where to make the new phrase and how to put in the plug-in
Thanks for any and all help!
G-
Just what I needed. Thanks Amy. :)
Feel like adding a bit more?
How about adding the ability for the group leader(s) to send a PM to the person submits a join request and is approved or rejected?
If accepted, user gets a "Welcome to the Group" PM.
If rejected, they get a "Sorry, but you do not meet the specified requirements to join this group."
Just another way to keep people from having to repeatedly check their UserCP for join status.
Just an idea. :)
amykhar
11-23-2005, 12:40 PM
I've thought about doing it when I have time. I guess I just keep expecting Jelsoft to make this a standard feature as it obviously should be one.
Vizionz
11-23-2005, 12:42 PM
i like this hack. but am i missing something somewhere where user can make there own groups. and is there any hacks that would allow created user groups to allows create a forum when created. amy your smart and been around thats why i ask in the same topic (sorry for offtopic questions )
amykhar
11-23-2005, 12:44 PM
My hideaway mod gives users a private group and one forum to manage, but it is a very limited application of it.
Vizionz
11-23-2005, 12:45 PM
do these works together ? so if you create a hideaway and someone wants to join your hideaway will they recieve the pm from this ?
amykhar
11-23-2005, 12:46 PM
Yes.
Vizionz
11-23-2005, 12:46 PM
thanks amy :) i will grab that then
EasyTarget
11-28-2005, 04:37 AM
nice hack.
how can I get the links to work in the pm system without enabling html?
LamboJay
11-28-2005, 06:29 PM
Installed on 3.5.1 and working great. Thanks!
Schwarze Katze
11-28-2005, 08:20 PM
Nice!
How do I change the pm title? Stupid me doesn't know... :(
If you really want to, it would be this line of code to change:
$pmdm->set('title', $vbulletin->userinfo['username']. " would like to join " . $groupname['title']);
Nice utility. Took me a while to figure out where to put everything but it's now up and running correctly.
For anyone else totally new to this sort of thing here be what I did.
you add the Phrase via the Langiages and Phrase Manager
Then via the Plugin Manager You copy the
Product, Hook Location and Title from the xml code
and then copy the xml code from require_once(DIR . '/includes/class_bbcode.php'); to // End of mod Do not include the closing brackes ]] into the plugin php code box
and everything being equal it should work.
NB: I put the actual http:// address inside url /url bbcode tags in the Phrase message.
cynix2
12-19-2005, 11:45 PM
i made a slight improvement on this mod
since i dont like hard coding things that are in variables i made it so the phrase uses $vboptions[bburl] as {2} instead of having to hard code the url into the phrase
files are attached, i hope they get put to good use
attachments removed, see below for new ones
Snake
12-20-2005, 08:45 AM
Thanks man!
cynix2
02-01-2006, 05:54 PM
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
EasyTarget
02-01-2006, 05:56 PM
thanks cynix
installed and seems to be working good.
Snake
02-01-2006, 06:29 PM
Yeah thanks man. That worked now! :)
Eriond
02-19-2006, 11:09 AM
excellent plugin :D
*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?
Hornstar
02-21-2006, 05:01 AM
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
Is this the same file that you download from the side bar?
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
Edit, I edited this post so it will help other people, I finally got it working, yay!!
axelhols
03-15-2006, 11:34 AM
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?.
amykhar
03-15-2006, 11:59 AM
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.
ricker
03-22-2006, 04:45 PM
Has anybody else using VB 3.5.3 with multiple joinable groups and group leaders experienced similar intermittant problems with this plug-in?.unfortunately yes, i had to disable this plugin. :(
trackpads
04-01-2006, 11:13 AM
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
trackpads
04-01-2006, 11:18 AM
Ok, big dummy, should have tested it again "after" I uploaded the new version. It works :) :)
Thanks!!
TypeStaff
04-03-2006, 09:09 AM
I'm totally noob installing plugins. Could anyone explain me where's exactly the file that I must edit? thanks!!
MThornback
04-03-2006, 02:18 PM
In totally noob installing plugins. Could anyone explain me where's exactly the file that I must edit? thanks!!
The file is edit is facilitated by the plugin, your only asked to add a phrase here.
Connector
04-24-2006, 12:43 AM
how can i send the user that i dany them or accept them message ?
Eriond
04-24-2006, 12:05 PM
at the moment i believe it is just a case of you manually sending a pm to them, it would be nice to have an auto reply for accept/deny but to be honest it doesnt take that long to type an accept/deny pm yourself :)
Connector
04-24-2006, 05:25 PM
at the moment i believe it is just a case of you manually sending a pm to them, it would be nice to have an auto reply for accept/deny but to be honest it doesnt take that long to type an accept/deny pm yourself :)
I have like 30 User join per day it is not hard but take to much time to sending one by one ..:eek:
Hornstar
05-13-2006, 10:11 AM
I started to get this error message after it working fine for a few months, $errors array is not empty in class vb_datamanager_pm in /includes/class_dm.php on line 758
That caused me getting heaps and heaps of the same pm from each person joining.
I have now deleted it, and uploaded it again after downloading the latest.
Will see if its working shortly.
Hornstar
05-14-2006, 04:46 AM
Yep still get the error message
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
The username of the person that got the error was XxNAKdragon5xX
and I think everyone else is getting it as well. Because of that, I have had to disable it until the problem can be fixed.
AndyP
05-16-2006, 02:11 AM
I've just installed this and done a quick test. Looks good and I agree that it should be standard (was something I got used to when I was on phpBB).
Thanks.
Princeton
06-05-2006, 01:41 PM
excellent plugin :up:
amykhar
06-05-2006, 01:47 PM
I am still surprised this isn't a standard option in vbulletin. All kinds of bells and whistles in there, but some real basic stuff isn't there yet.
cynix2
08-09-2006, 09:31 PM
has anyone tried this on 3.6? or know if 3.6 has this feature by default?
HMBeaty
08-10-2006, 02:59 AM
JUST tried to install on 3.6.0 and doesn't work. Pulls up this error after submitting a join request.....
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 763
Quarterbore
08-10-2006, 02:55 PM
Group hug time... I really need this for 3.6 or my staff may revolt!
Too bad this didn't get included with the new version...
Cheertobi
08-17-2006, 12:11 PM
Does this kind of mod exist, that sends emails to the groupleader instead of a PM!?
Tobi
amykhar
08-17-2006, 04:20 PM
you could easily change this to use the email system instead of pm. Just find a mod that sends emails and base your modifcations to this mod off that.
tracylee
08-29-2006, 06:54 PM
Group hug time... I really need this for 3.6 or my staff may revolt!
Too bad this didn't get included with the new version...
Same here, I've been asked for this by my mod team.
ConqSoft
08-29-2006, 07:10 PM
Working fine for me in 3.6.0....
FlynnUK
11-23-2006, 08:23 AM
Great add-on. Nice one.
I've just installed and tested on 3.6.3 and it works fine.
Very Usefull Mod. Installed and Working Fine...:-)
I Have Vbulletin 3.6.8 PL2 and Vbadvanced 3.00
Thank you for your Mod
AyeCapn
02-29-2008, 01:47 PM
Could this be modified to send a message to the person who just joined the group? I have one particular group that has some specific rules and instructions.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.