View Full Version : User to Admin PM Notification
hypedave
04-07-2002, 10:05 PM
Looking for a hack that will notify admin ID 1 every time a user sends a pm
Wow.... what if you had like 300+ PMs sent a day?
hypedave
04-08-2002, 03:07 AM
I can handle it :)
Logician
04-08-2002, 07:44 AM
What kind of notification is that?
You want to receive a CC pm (which will full your message box) or an email that X pm'ed Y?
Do you want the content of the PM or just a notification about its presence?
What's the aim? Reading user's pms?
I can help you more if you answer these questions.. :)
But a quick reminder: If your aim is to read your user's pms, there are easy ways:
* You can install "Admin can read user's pms" hack and read them individually
* You can install Webtemplates Hack and then apply this (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36578 ) webquery to have a web page which only you can login and read last XX pms in your database.
See here:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=36578
hypedave
04-08-2002, 04:22 PM
the kind of notification this is a notification that a user has sent a pm to another user.
I would jus like the notification about PM's that are being sent
well the aim, I can already rad user's pm's, but I forgot to mention that if possible I would like to be filtered by words, for an example, if it is configured to scan for words like " admin "
and user A sends and pm to user B saying our admin sucks, then some how I can be notified that user a sent a pm to user b containing the word admin
hypedave
04-10-2002, 12:08 AM
any luck
Logician
04-10-2002, 09:52 AM
I dont have access to my local test board now, so writing this message on the fly, therefore it's not tested! But if it does not work, give me the errors and I think we can fix it later:
1- backup private.php
2- edit your private.php find
-- cut --
if ($savecopy) {
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title ,message,dateline,showsignatur e,iconid,messageread,folderid) VALUES (NULL,$bbuserinfo[userid],$touserinfo[userid],$bbuserinfo[userid],'".addslashes(htmlspecialchars($title))."','".addslashes($message)."',".time(). ",'$signature','$iconid',1,-1)");
}
-- cut --
Before that insert:
-- cut ---
if (eregi("admin", $message))
{
$message="This Message is sent by".$bbuserinfo[userid]." to ". $touserinfo[userid]."<br>".$message;
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title ,message,dateline,showsignatur e,iconid,messageread,folderid) VALUES (NULL,$bbuserinfo[userid],1,$bbuserinfo[userid],'".addslashes(htmlspecialchars($title))."','".addslashes($message)."',".time(). ",'$signature','$iconid',1,-1)");
}
-- cut ---
This hack should send a pm to user with userid 1 when a member sends another member a pm with word "admin" in it.
Enjoy..
Logician
hypedave
04-10-2002, 09:54 PM
as there a way I can add more words to this hack ???
like somewhere in the control panel define a set of words ?
Logician
04-11-2002, 04:59 AM
Adding a feature to define set of words inside CP requires a lot of coding and hacking. It's possible but there is no simple or easy way..
hypedave
04-11-2002, 05:01 AM
do you think you could try, if not I understand, im not in no big fast hurry
Logician
04-11-2002, 05:12 AM
sorry I cant commit that a lot of time at the moment, because I have other hacks I need to do. Personally I dont think this hack is needed because as I said in my previous message, there are other hacks which allow you to read user pms. I just tried to help with a simle code modification, in case it helps you..:)
hypedave
04-11-2002, 05:15 AM
okay thanks bud, I will use this code still, I guess it will like every month when a user pm's another user and says the admin is cool, lol. I just have user abusing the pm system and want to put a quick stop to it, so I thought a word filter for the PM System would be nice
TundraSoul
05-24-2003, 11:23 PM
Wow that would be thousands of notices a day for me... ;)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.