Version: 1.0.2, by Krofh
Developer Last Online: Jun 2013
Version: 3.5.4
Rating:
Released: 04-07-2006
Last Update: 07-06-2006
Installs: 39
DB Changes Uses Plugins
No support by the author.
Quote Notification
Note: This hack does not work in vBulletin 3.6. If someone would like to port it, that's fine with me, but I don't feel like updating this particular hack.
Description: This plugin will add a "Quote Notification" option for users to select. If selected, they will receive a notification by PM whenever someone quotes them in a post.
Installation:
Import the product XML file
Go to your User CP > Edit Options and select "Quote Notification" if you like
If you want to change the content of the PM that gets sent, the phrases are quotenotify_subject and quotenotify_message
The email notification has a separate phrase, quotenotify_emailmessage
If you want to change the Profile Field options, find the "Quote Notification" field in your User Profile Field Manager in the ACP.
If you want to set a default user for the notification PMs to be sent through, go to ACP > vBulletin Options > Message Posting and Editing Options > Quote Notification Sender; set it to 0 for the sender to be whoever did the quoting
Warning: DO NOT change the title of the Profile Field from "Quote Notification", or the values from "Private Message", "Email", and "No" or this hack will not work.
Contains:
1 Plugin
1 Profile Field
2 Phrases
This hack is somewhat similar to Who quoted me?, but still considerably different, and if your forum is concerned about quotes then both could probably go rather nicely together.
Version History: 1.0.2
- Fixed compatibility issues with Backlink For Quotes
- Added option for notification by Email or Private Message
- Added ACP option for one specific PM sender or for the PMs to be sent by the user who did the quoting (original functionality) 1.0.1
- Fix for users with apostrophes 1.0
- Original version
Please click install.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
This is what I have in my Quote Notification newpost_complete plugin. Works fine in 3.7 and worked in 3.6 to. You just need to change the field id number "profile_fields.field21" to whatever your custom profile field number is on your forums.
PHP Code:
$kr_load = array();
$kr_text = array();
if (preg_match_all("/\[quote=([^\\\"\]]*?)\](.*?)\[\/quote\]/is",$post['message'],$matches)>0) {
for ($kr=0;$kr<count($matches[1]);$kr++){
//echo $matches[1][$kr]."<br>";
$matches[1][$kr] = (strpos($matches[1][$kr],";")) ? substr($matches[1][$kr],0,strpos($matches[1][$kr],";")) : $matches[1][$kr];
if (strtolower($matches[1][$kr]) != strtolower($vbulletin->userinfo['username'])) {
if (!in_array($matches[1][$kr], $kr_load)) {
$kr_load[] = $matches[1][$kr];
$kr_text[] = "[quote=".$matches[1][$kr]."]".$matches[2][$kr]."[/quote]";
}
else {
for ($kri=0;$kri<count($kr_load);$kri++) {
if ($kr_load[$kri] == $matches[1][$kr]) {
$kr_text[$kri] .= "[quote=".$matches[1][$kr]."]".$matches[2][$kr]."[/quote]";
break;
}
}
}
}
}
}
if (count($kr_load) > 0) {
for ($kr=0;$kr<count($kr_load);$kr++) {
//echo "<br>" . $kr_load[$kr];
$quoteuserquery = $vbulletin->db->query_first("SELECT user_table.userid AS userid, profile_fields.field21 AS wantquotenotify FROM " . TABLE_PREFIX . "user AS user_table LEFT JOIN " . TABLE_PREFIX . "userfield AS profile_fields ON (user_table.userid=profile_fields.userid) WHERE user_table.username='" . $vbulletin->db->escape_string($kr_load[$kr]) . "' GROUP BY user_table.userid");
$theurl = $vbulletin->options['bburl'] . "/showthread.php?p=" . $post['postid'] . "#post" . $post['postid'];
if ($quoteuserquery['wantquotenotify'] == "Yes") {
// Override a potentially full inbox.
$senderpermissions['adminpermissions'] = 2;
$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);
The only thing I have changed since I installed it in 3.5, is the above plugin. I have no idea if the original xml will install in 3.7. But the three things you need to install (phrases, custom profile field & plugin) can be installed manually through the admincp.
The only thing I have changed since I installed it in 3.5, is the above plugin. I have no idea if the original xml will install in 3.7. But the three things you need to install (phrases, custom profile field & plugin) can be installed manually through the admincp.
...and also i tried to install it manually but it gives database error in 3.7.2 :/
Invalid SQL:
INSERT INTO vb3_profilefield (title, description, required, hidden, maxlength, size, displayorder, editable, type, data, height, def, optional, searchable, memberlist, regex, form, html) VALUES ('Quote Notification', 'Would you like to be notified by PM when someone quotes something you said in a post?', '0', '1', '250', '25', '100', '1', 'radio', 'a:2:{i:0;s:2:"No";i:1;s:3:"Yes";}', '0', '1', '0', '0', '0', '', '2', '0');
MySQL Error : Unknown column 'title' in 'field list'
Error Number : 1054
Request Date : Wednesday, July 2nd 2008 @ 01:09:19 AM
Error Date : Wednesday, July 2nd 2008 @ 01:09:19 AM
Script : http://xxxxxx/admincp/plugin.php?do=productimport
Referrer : http://xxxxxx/admincp/plugin.php?do=productadd
IP Address : 85.108.150.135
Username : xxxxxx
Classname : vB_Database
MySQL Version : 5.0.58