Version: 1.01, by kall
Developer Last Online: Aug 2021
Version: 3.0.3
Rating:
Released: 09-07-2004
Last Update: 04-12-2005
Installs: 50
DB Changes
No support by the author.
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.
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.
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
PHP Code:
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET pmtotal=pmtotal+1, pmunread=pmunread+1, pmpopup=2 WHERE userid=$threadinfo[postuserid]");
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
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?
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
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:
Quote:
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');
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:
PHP Code:
$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.
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
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:
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