View Full Version : Auto PM to Thread Starter on Moderation
What does this Hack do?
When a thread is Opened/Closed, Stuck/Unstuck, Moved, Split, Merged, or a Post is deleted, a PM will be automatically sent to the Poster to inform them of this.
If you don't want to have a PM sent for a specific action, just don't add the code for that bit.
As requested here
Don't forget to click Install. :)
Update: PM now includes the name of the Moderator who actioned the changes.
22 December 2004 - Bugfix - missing variables. Thanks to Bison.
14 April 2005 - Fixed missing $action for Deleted threads.
Phalynx
09-08-2004, 07:03 AM
Really usefull, have waiting for such a hack a long time. Thanks!
Oblivion Knight
09-08-2004, 07:24 AM
Nice, I have some custom code that auto PM's the author when a thread has been moved that also says where it has been moved to, and who moved it.. I'll probably integrate some of these options in to it.
Nice, I have some custom code that auto PM's the author when a thread has been moved that also says where it has been moved to, and who moved it.. I'll probably integrate some of these options in to it.
I've got the 'where its moved to' bit, but it's not parsed as yet. :)
Nice, do you have any idea on how does this hack respons in a large forum?
Very intetesting hack. I will consider installing this one :)
Nice, do you have any idea on how does this hack respons in a large forum?
No idea sorry...it seems to work fine on my 250-member forum.
:)
q8manar
09-10-2004, 02:45 PM
thanks kall becuase you did what I requested
Thank you very much
q?
can we make the sender of PM is who did the modeartor task ???
thanks kall becuase you did what I requested
Thank you very much
q?
can we make the sender of PM is who did the modeartor task ???
*tips cap*
No worries, I saw you request it and am glad I was able to help.
I think it is possible to do what you are asking, and it shouldn't be too hard, but it's not something I will be able to look at for at least a couple of days.
At the moment, it's very rough, and quite limited. Eg: It only sends the PM to the thread starter. In the case of a thread being Split, the thread starter may not be the person whose posts have been split off..but they are the one who gets the message.
I would like to have a switch/checkbox to tick if you don't want to send the auto-PM, among other things. I'll add your request to the wishlist.
thanks kall
can we make the sender of PM is who did the modeartor task ???
it will be better.
DJ RRebel
09-18-2004, 01:00 AM
Hey ... great hack (in theory .. lol .. as I haven't installed it yet) ... anyhow what would make it really great, is if you had a checklist of all the people who posted in that thread, and had the option of sending to those you checked. You could also add a [check all / uncheck all] box, as well as be sure there are no duplicate names. :)
Just a couple of ideas to make a good hack even better !!! :)
OmaniMan
09-18-2004, 08:14 PM
Iam really don't know if word (( Thanks alot )) is enough to you because what did you do ??
I was waiting this hack creating since vB3.0.0 Beta 1 !! because I really need it too much ...
I installed it ...
OmaniMan
09-18-2004, 08:22 PM
Dear ...
I forgot to ask you :
Can you add more feature to this hack for example :
as same time a poster get PM because of his thread or post ... need to send auto email to poster to remind him by Email ??
Thanks ... :cool:
OmaniMan
09-20-2004, 11:07 AM
Up :) >>> :disappointed:
Ghanem
09-20-2004, 02:22 PM
Thank you very much
a very very great powrfull hack
regards.
nnjj.net
09-20-2004, 03:34 PM
Find:
$_REQUEST['forceredirect'] = 1;
$url = "showthread.php?$session[sessionurl]t=$threadid";
eval(print_standard_redirect('redirect_openclose') );
__________________________________________________ _________________
there are 3 places, shall I modify all 3?
OmaniMan
09-24-2004, 12:21 AM
No dear...
Only 1 Place ... Exactly Here ...
Find :
eval(print_standard_redirect('redirect_openclose') );
Then Above :
$_REQUEST['forceredirect'] = 1;
Add The Code .. :o
and waiting for your answer dear kall ... about email ??
futureye
10-02-2004, 02:38 AM
Dear kall,
i tried the hack with 3.0.1
but seem to have problems.
am not sure with adding the request in data base
shell i add every line alone
or all togather
Ageel
10-04-2004, 05:01 PM
hi there,
I don't know if somebody said this or not :)
for me, I am using 'User Notes' to tell the user that something has been done against his thread/post... since many users are disabling their PM.
so, It's would be great if it can be shifted to add a 'User Note' to the user notes... where you can assign moderators to see those notes also and track the history of the user. :)
anybody agree?!!
thanx
TundraSoul
10-05-2004, 03:43 AM
In the instructions it states
Add $modby to your PM text in the Admin CP options.
Where exactly does $modby go?
theArchitect
10-06-2004, 09:24 AM
Sensational idea for a hack, but i am getting the following DB error when i try and moderate a thread:
Invalid SQL:
SELECT postid, post.title, pagetext, post.threadid, thread.title AS threadtitle
FROM post AS post
INNER JOIN thread AS thread USING(threadid)
WHERE postid =
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 4
mysql error number: 1064
Any assistance would be most appreciated.
In the instructions it states
Add $modby to your PM text in the Admin CP options.
Where exactly does $modby go?
@Tundrasoul: In the part in the AdminCP where you define what the message will be - it's in the User Posting part from memory.
@omaniman: Another good idea, but again, something I couldn't work out how to do.
@futureye: if you are using vBs built in SQL thingame, one command at a time. If you are using phpmyadmin you can copy and paste the entire queries and run them at once.
@theArchitect: I don't know why you are getting that error, it looks like it's not getting the postid for some reason.
@Ageel: I agree, but I couldn't work out how to do that easily. If someone wants to write the code for that I can add it to the first post and credit them. :)
Delphiprogrammi
12-20-2004, 09:25 AM
can't get this working i installed tested it did a post with my "test user" logged out looged back in as admin locked the thread and finally checked the pm's on the test account but nope ... no errors at all but no pm either
pm is enabled on both accounts
Bison
12-22-2004, 07:00 AM
The variables to delete, close and move aren't printing in the PM...
The variables to delete, close and move aren't printing in the PM...
Oh dear, so they aren't. Thanks man.
Fixed install file uploaded...I think that's correct, it's 11PM here and I'm rapidly losing consciousness. :)
Delphiprogrammi
12-22-2004, 09:02 AM
can't get this working no errors at all when i am done editing postings.php i upload the modified file to /forums/ then i goto
http://forums.mysite.com/admincp/options.php?dogroup=posting&do=options and i click save then i moderate a thread (i lock it) but no pm ....
Bison
12-22-2004, 12:59 PM
Oh dear, so they aren't. Thanks man.
Fixed install file uploaded...I think that's correct, it's 11PM here and I'm rapidly losing consciousness. :)
Thanks for the fix Kall, but there's still another problem ... if you "soft delete" a thread or post, and restore the same thread or post later later, no notification is sent when the thread was retored. Also, the delet fix didn't work. The $action variable is not storing values.
Delphiprogrammi
01-01-2005, 11:03 AM
i can't get this to work pm's on my testaccount are on i did the database querys you instructions tell us todo then i edit postings.php i upload the modified file (overwriting the existing one) then i close a thread and login with the test account but no pm ??????
$_REQUEST['forceredirect'] = 1;
$url = "showthread.php?$session[sessionurl]t=$threadid";
eval(print_standard_redirect('redirect_openclose') );
above that code i add code like your instructions tells us ... but nope :devious:
Filmrus
01-02-2005, 04:32 PM
Hello,
I have found one problem in your script. When deleting one of any posts in the topic then confirmation message has been sending not to the author of the post but to the author of the topic. Could you please fix it?
kadafi_alive
01-04-2005, 09:26 AM
Does anyone know how to do undo the database? I'm gettin' a error when I try to moderate threads and posts.
I want to do delete the SQL queries I ran, what queries do I've to type in to delete?
theArchitect
01-06-2005, 11:14 PM
I am having a slight problem with this hack.
I didn't used it under 3.0.3 but have decided to under 3.0.4. However, I have noticed that whenever a thread is modified so too are the users settings for PM notification. The option is turned to on, and the user then needs to go into their user CP and turn them off again. It will then stay off for normal PMs but once another notification PM is sent about moderation the option is affected again.
Is this normal for the hack? If so is there a way to change his as it could become annoying.
Delphiprogrammi
01-11-2005, 05:42 AM
now it works fine however one more small issue here it look like the $url variable isn't processed it just turns up as "located at URL $url" in the notification pm look at the attached image and you'll see what i mean
theArchitect,
look at this line of php code
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET pmtotal=pmtotal+1, pmunread=pmunread+1, pmpopup=2 WHERE userid=$threadinfo[postuserid]");
that might help you
theArchitect
01-11-2005, 08:15 PM
now it works fine however one more small issue here it look like the $url variable isn't processed it just turns up as "located at URL $url" in the notification pm look at the attached image and you'll see what i mean
theArchitect,
look at this line of php code
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET pmtotal=pmtotal+1, pmunread=pmunread+1, pmpopup=2 WHERE userid=$threadinfo[postuserid]");
that might help you
So if I remove pmpopup=2 WHERE userid=$threadinfo[postuserid] then it should stop the popup from reactivating? Or do I change the pmpopup number?
Delphiprogrammi
01-11-2005, 09:13 PM
i'm not sure but most of us have a testsite with a vbulletin installation (remember you have to call it 'testvb') and there you could test that i think the number controls wheter members want a notification about new pm's in a popup or not just an idea i have the author of this hack can help you better however
kadafi_alive
01-17-2005, 05:38 AM
Does anyone know how to do undo the database? I'm gettin' a error when I try to moderate threads and posts.
I want to do delete the SQL queries I ran, what queries do I've to type in to delete?
Anyone figured it out?
The queries are:
INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('modpmfrom', 'posting', '1', '1', '', 140, 0, 0);
INSERT INTO phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0', 'setting_modpmfrom_title', 'User Who Sends Automatic PM on Moderation', '5000');
INSERT INTO phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0', 'setting_modpmfrom_desc', 'Enter the user ID of the person whose account you\'d like to be used when sending Auto Moderation PMs.', '5000');
INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('modpmtext', 'posting', 'Hi $username,\r\n\r\nThis message is to advise that your $type titled "$threadinfo" has been $action.\r\n\r\nThe $type is located at this URL $url\r\n\r\nIf you have any questions, you can ask an administrator for assistance\r\n\r\nSincerely,\r\nThe $bbtitle staff.', 'Hi $username,\r\n\r\nThis message is to advise that your $type titled "$threadinfo" has been $action by $modby.\r\n\r\nThe $type is located at this URL $url\r\n\r\nIf you have any questions, you can ask an administrator for assistance\r\n\r\nSincerely,\r\nThe $bbtitle staff.', 'textarea', 150, 0, 0);
INSERT INTO phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0', 'setting_modpmtext_title', 'Auto PM on Moderation Text', '5000');
INSERT INTO phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0', 'setting_modpmtext_desc', 'Set the text of the PM sent to users on Moderation.<br />\r<br />\rNote: You can use the following variables to specify the <b>user\'s</b> information: $bbtitle, $username, $type, $action, $userid, $threadinfo, $modby.', '5000');
INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('modpmtitle', 'posting', 'Your $type "$threadinfo" has been $action', 'Your $type "$threadinfo" has been $action', '', 160, 0, 0);
INSERT INTO phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0', 'setting_modpmtitle_title', 'Title Of the PM That is Sent on Thread Moderation', '5000');
INSERT INTO phrase (phraseid, languageid, varname, `text`, phrasetypeid) VALUES (NULL, '0', 'setting_modpmtitle_desc', 'Set the title of the PM that is sent to users when threads are moderated. You can use the same variables as above.', '5000');
Delphiprogrammi
01-20-2005, 12:43 PM
now it works fine however one more small issue here it look like the $url variable isn't processed it just turns up as "located at URL $url"
fixed this issue myself look at the image :D
Paprika
02-06-2005, 02:02 AM
Dude, I am tired. I just installed this Hack/Mod and the $action varible isn't being printed. No intent to be rude, or anything negative like that but it would be really nice if you fixed it. Thanks! :)
Meanwhile I am going to look into myself and probably will end up using generic message until you come back, but you are coming back... right?
OK, EDIT BIGTIME:
If you are having a problem like me where your $action varible isn't defined for some of the moderation tasks then listen up. After looking around and comparing blocks of code I deducted that the $action varible was straight up forgetten about in some of the If cases, so I added:
$action = "Deleted";
at line 380 of postings.php and now it is defined in the PMs. Using this pattern you should be able to fix all other PM variable issues.
See what I am saying?
Delphiprogrammi
03-31-2005, 05:57 PM
hi people,
i made a small modification to this hack basicly it hyperlinks the url where a thread is located rater then just plain text where a user can't click on in the code of this hack a variable $newurl is used (except in delete thread &post) modify this variable like this
$newurl="/showthread.php?$session[sessionurl]t=$threadid]newurl ($vboptions[bburl)";
note
$threadid is not always the same look in the instruction from this hack ....
SmartGnome
04-04-2005, 08:05 AM
Great hack... .clicked install.
But this is the PM I get:
Hi SmartGnome,
This message is to advise that your thread titled "proxy test" has been by SmartGnome.
The thread is located at this URL DELETED
If you have any questions, you can ask an administrator for assistance
Sincerely,
The Anita's Lifestyle Board staff.
Any Idea why the link doesn't show ??
@Delphiprogrammi
Also not with your modification :disappointed:
Cheers
Smarty
Delphiprogrammi
04-04-2005, 08:55 AM
Great hack... .clicked install.
But this is the PM I get:
Hi SmartGnome,
This message is to advise that your thread titled "proxy test" has been by SmartGnome.
The thread is located at this URL DELETED
If you have any questions, you can ask an administrator for assistance
Sincerely,
The Anita's Lifestyle Board staff.
Any Idea why the link doesn't show ??
@Delphiprogrammi
Also not with your modification :disappointed:
Cheers
Smarty
you cannot link to a deleted thread / post that's pretty normal i guess since the deleted post is "deleted" i think vb temporarly stores deleted post/threads in another db table (for the restore option) but you will not get a hyperlinked $newurl with deleting posts / threads cause deletion is done when the board owner does not want the post/thread on his / her board
SmartGnome
04-04-2005, 10:41 AM
@Delphiprogrammi
Stupid me :dead: :dead:
Well it should be nice to read in the pm not "The thread is located at this URL DELETED" but "The thread is DELETED". Are conditionals possible in the message ??
When I move a posting I get this one:
Hi SmartGnome,
This message is to advise that your thread titled "Test 1" has been moved by SmartGnome.
The thread is located at this URL http://anita.adfs.nl/forum/showthread.php?t=10739
If you have any questions, you can ask an administrator for assistance
Sincerely,
The Anita's Lifestyle Board staff.
So it is not a clickable link :disappointed:
Anyway thanks for opening my eyes :ermm:
athoob
04-13-2005, 03:51 PM
Hi
I got this error when I tried to instesrt the new quesries :ermm:
SQL-query:
INSERT INTO `vb3_setting` ( `varname` , `grouptitle` , `value` , `defaultvalue` , `optioncode` , `displayorder` , `advanced` , `volatile` )
VALUES (
'modpmfrom', 'posting', '1', '1', '', 140, 0, 0
)
MySQL said:
#1062 - Duplicate entry 'modpmfrom' for key 1
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/common.lib.php on line 685
Marco van Herwaarden
04-13-2005, 04:01 PM
Then you are trying to run that line twice.
athoob
04-13-2005, 04:51 PM
Thank you so much, the hack is now installed but a strange thing happened
there is no subject and the pm is empty when it's send :surprised:
athoob
04-15-2005, 12:40 AM
actually it sends no msg ,, just a link to the member's profile :/
Martin CX
04-27-2005, 12:30 AM
Nice, but I would like the sender of the PM to be the same no matter what. Is this possible?
nnjj.net
05-02-2005, 10:17 AM
good point Martin
mgurain
05-19-2005, 05:00 PM
Hi,,
Perfect Hack Kall :squareeyed:
but I have some requests to be added to the new version of the hack :
1. The SENDER of the PM to be the Moderator who does the action.
2. an option to disable sending the PM by thread-base, i.e. in that time only I don't want the PM to be sent.
3. When I do the actions on MY THREADS no meaning for the PM to be sent to me !
4. which is an important one : to integrate this hack with Thanks Hack, where a PM will be sent when somebody thanks a user.
thanks,,
t-roz
05-20-2005, 09:58 AM
how can i remove this hack????
cuz i got moderation problems!!!
nnjj.net
05-22-2005, 01:44 PM
is it working on 3.7 and I need to be sending email not PM
is it possible?
mgurain
05-25-2005, 07:18 AM
1. The SENDER of the PM to be the Moderator who does the action.
2. an option to disable sending the PM by thread-base, i.e. in that time only I don't want the PM to be sent.
3. When I do the actions on MY THREADS no meaning for the PM to be sent to me !
4. which is an important one : to integrate this hack with Thanks Hack, where a PM will be sent when somebody thanks a user.
any advancement ?
t-roz
05-26-2005, 02:03 AM
how can i remove this hack????
cuz i got moderation problems!!!
nobody knows how to remove it???
how can i remove the tables that i added to the database????
Executing the SQL Query for those table and deleting them using the admincp....
t-roz
05-26-2005, 05:00 PM
Executing the SQL Query for those table and deleting them using the admincp....
which tables do i have to remove???
what are there names??
nnjj.net
05-28-2005, 06:17 AM
is it working on 3.7 and I need to be sending email not PM
is it possible?
any idea :tired:
t-roz
05-29-2005, 01:17 AM
please
how can i remoove these tables????
or tell me how can i remove this hack???
My hack didn't create any tables.
It added some entries to existing ones.
To remove an entry, phpmyadmin is a useful tool, otherwise you can run a query that is the reverse of the one that put them there.
Or, restore the backup you made of your database.
You *did* backup your database before installing this, yes?
This hack clearly states that there are database changes, and you should always backup your satabase before making changes.
t-roz
05-29-2005, 04:14 AM
My hack didn't create any tables.
It added some entries to existing ones.
To remove an entry, phpmyadmin is a useful tool, otherwise you can run a query that is the reverse of the one that put them there.
Or, restore the backup you made of your database.
You *did* backup your database before installing this, yes?
This hack clearly states that there are database changes, and you should always backup your satabase before making changes.
thanx for your support but how can i delete these entries or run a query that is the reverse of the one that put them there
cause i forgot to take a backup of my data base :disappointed: :disappointed:
mgurain
06-02-2005, 12:54 PM
Hi,,
Perfect Hack Kall :squareeyed:
but I have some requests to be added to the new version of the hack :
1. The SENDER of the PM to be the Moderator who does the action.
2. an option to disable sending the PM by thread-base, i.e. in that time only I don't want the PM to be sent.
3. When I do the actions on MY THREADS no meaning for the PM to be sent to me !
4. which is an important one : to integrate this hack with Thanks Hack, where a PM will be sent when somebody thanks a user.
thanks,,
any advancement kall ?
smdani
06-10-2005, 06:26 AM
The idea is really good, a hack like this would must be included in next release.
t-roz
06-10-2005, 06:28 PM
how can i delete these entries or run a query that is the reverse of the one that put them there
how can i delete these entries or run a query that is the reverse of the one that put them there
1. Restore the backup you made of your database prior to installing this hack.
or:
2. Learn mysql. It's not hard to work out what the reverse of ADD or CREATE are.
or:
3. Go through your database table by table, row by row, and delete anything that matches the entries you made when installing.
paul41598
09-08-2005, 05:51 PM
is there any way to add the varable $forum to it, so when it PM's the author it says, your thread has been moved to "x forum" as well as giving a thread URL.?
Private
09-09-2005, 06:27 AM
Really great hack
but i think it's missing 2 important things
1- when the mod do an action (like closing), there should be a place to put the reason of that action to include it in the PM.
2- the ability of "not" sending a PM everytime i do an action, i mean like putting check box to inform sending or not.
i think that would be a good mods to ur hack if u did it
thank u
Private
kud0gfx
08-09-2008, 09:13 AM
does it rules in 3.7.2?
pnosko31
08-31-2008, 08:17 AM
I'd have to say no since the postings.php file doesn't have some of the code he states in the instructions
barcena
09-27-2008, 10:46 PM
Can this mod be updated to version 3.7? The one in use for our forum version is only useful for Theads deletion not for posts, moving, etc, this one is more completed.
This is a great hack, can someone work on it so we can have it on 3.7 ?
Delphiprogrammi
09-30-2008, 07:29 PM
Can this mod be updated to version 3.7? The one in use for our forum version is only useful for Theads deletion not for posts, moving, etc, this one is more completed.
This is a great hack, can someone work on it so we can have it on 3.7 ?
https://vborg.vbsupport.ru/showthread.php?t=192344
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.