basically, when anyone sends a pm i want it also sent to mods/admins
the way i want to do it is set up a custom group permission
i figure the easiest way for me to do it is to perform a query to retrieve an array of names/ids that are in groups with that permission set and then append them on to the recipients
and that's where i'm stuck ;p
Quote from: WWakerFAN on February 28, 2006, 04:17:58 AM
basically, when anyone sends a pm i want it also sent to mods/admins
the way i want to do it is set up a custom group permission
i figure the easiest way for me to do it is to perform a query to retrieve an array of names/ids that are in groups with that permission set and then append them on to the recipients
and that's where i'm stuck ;p
Something like this?
global $db_prefix;
$list = '';
$request = db_query("SELECT `memberName` FROM {$db_prefix}members WHERE (`ID_GROUP` = '1' OR `ID_GROUP` = '2')", __FILE__, __LINE__);
while ($ROW = mysql_fetch_array($request))
{
$list .= $ROW[0] . ', ';
}
$list = substr($list, 0, strlen($list) - 2);
Cheers,
Ryan Jones
it's close, i don't see anything in there involving permissions
thanx for trying though ^_^
Quote from: WWakerFAN on February 28, 2006, 05:28:28 PM
it's close, i don't see anything in there involving permissions
thanx for trying though ^_^
I still do not understand what you mean by it. hat creates a list of gmods and admins. Can you bemore specific?
Cheers,
Ryan Jones
Talk about a serious invasion of privacy. I think you'd be better off disabling PMs all together.
Quote from: Thantos on February 28, 2006, 07:53:40 PM
Talk about a serious invasion of privacy. I think you'd be better off disabling PMs all together.
I agree in most cases this can be an invasion of privacy issues. But also this mod could have allot of legit uses and make allot of institutions consider forums if things like Pm's could be monitored.
I once had a forum set up for my child's school children to use as a projects and events communications board. This is harmless enough and gave the pre-teens and teens the ability to still speak openly and privately on projects and events. On these specific forums we did set up a mod to allow Pm's sent from child to child to be sent to the moderators (parents and teacher volunteers) in order to insure the safety of the students. The fact that Pm's were monitored by the moderators was Openly Disclosed on the forums within the pm box.
But of course! I see your side of the story as well. In most situations this would be a seriously infringing mod that would best be suited not made publically available.
Quote from: RyanJones on February 28, 2006, 05:33:06 PM
Quote from: WWakerFAN on February 28, 2006, 05:28:28 PM
it's close, i don't see anything in there involving permissions
thanx for trying though ^_^
I still do not understand what you mean by it. hat creates a list of gmods and admins. Can you bemore specific?
Cheers,
Ryan Jones
i'll try explaining with an example
say i had 10 members,
and i had 6 membergroups, group a/b/c/x/y/z
and that membergroups a and x allow for this permission
if the member were apart of group a or x (primary or additional)
then the pm would be sent to them also
Quote from: WWakerFAN on March 01, 2006, 03:25:02 AM
i'll try explaining with an example
say i had 10 members,
and i had 6 membergroups, group a/b/c/x/y/z
and that membergroups a and x allow for this permission
if the member were apart of group a or x (primary or additional)
then the pm would be sent to them also
Ah I think I understand.
What you can do is grab the group ID from the database and then do this (Assuming taht the group is #3):
$request = db_query("SELECT `memberName` FROM {$db_prefix}members WHERE (`ID_GROUP` = '1' OR `ID_GROUP` = '2'
OR `ID_GROUP` = '3')", __FILE__, __LINE__);
Replace the original in your code I have you (The $request part) with that and you'll have your list of usernames.
That will gather the lis for you :)
Cheers,
Ryan Jones
I think what he means is that if they are in certain groups, the message should also be sent to moderators + admins.
To check if the current user is a member of 2 certain groups you can do this:
global $user_info;
if (in_array(groupnr_groupa, $user_info['groups'])) sendMessageToMods();
elseif (in_array(groupnr_groupb, $user_info['groups'])) sendMessageToMods();
Quote from: miseryshining on March 01, 2006, 03:54:39 AM
I think what he means is that if they are in certain groups, the message should also be sent to moderators + admins.
To check if the current user is a member of 2 certain groups you can do this:
global $user_info;
if (in_array(groupnr_groupa, $user_info['groups'])) sendMessageToMods();
elseif (in_array(groupnr_groupb, $user_info['groups'])) sendMessageToMods();
i mean if members (or anyone for that matter) send a pm, the pm also gets sent to members that are in those certain groups (which could be mods/admins/any other custom made group)
memberSendsPM() {
memberList = getListOfMembers();
foreach memberList as member {
if(member is in a group) {
if(group that member is in is allowed to receive other members pms)
sendPMToThemAlso();
}
}
Quote from: WWakerFAN on March 01, 2006, 09:42:58 AM
Quote from: miseryshining on March 01, 2006, 03:54:39 AM
I think what he means is that if they are in certain groups, the message should also be sent to moderators + admins.
To check if the current user is a member of 2 certain groups you can do this:
global $user_info;
if (in_array(groupnr_groupa, $user_info['groups'])) sendMessageToMods();
elseif (in_array(groupnr_groupb, $user_info['groups'])) sendMessageToMods();
i mean if members (or anyone for that matter) send a pm, the pm also gets sent to members that are in those certain groups (which could be mods/admins/any other custom made group)
memberSendsPM() {
memberList = getListOfMembers();
foreach memberList as member {
if(member is in a group) {
if(group that member is in is allowed to receive other members pms)
sendPMToThemAlso();
}
}
There was a thread about this somewhere... its potentially illegal as its classed as "spying" on the users and violating their privacy.
Cheers,
Ryan Jones
no need to worry about privacy and such, i'm using it for a completely legitimate purpose
all the other threads about similar things i've seen though about this provide no helpful info