The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Quote Notification Details »» | |||||||||||||||||||||||||
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:
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:
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
|
Благодарность от: | ||
JohorBahru |
Comments |
#32
|
||||
|
||||
The last one... just the number itself.
|
#33
|
|||
|
|||
Already tried all, Krofh! But didn't work.
Or can I drop its tables manually in phpmyadmin? |
#34
|
||||
|
||||
Yes, I suppose you could do that... just drop the row with the quote notification, which seems to be #21 in your case. Argh, 'tis strange that they would remove some of these things in 3.6, I don't like it it doesn't help that this was one of my first hacks though, and I didn't code it very well :-/ sorry about the trouble.
|
#35
|
|||
|
|||
Quote:
We love your hack but we have run into a conflict with our alert system. We have 'alerts' set up to display as posts in a separate, staff only forum. The alerts include a quote of the post of the alerted post. Quote notifier rightly so. views it as any other quote and sends a PM to the person quoted, or in this case, alerted on. Since the text includes the name of the person who quoted them and the link refers them to a "no permissions" private forum, this basically tells them who alerted on their post. Quote:
Thank you. |
#36
|
||||
|
||||
Quote:
Code:
if ($post['forumid'] != 25) { ... all current code here ... } Quote:
|
#37
|
|||
|
|||
Quote:
thank you!!!. we will try that. |
#38
|
|||
|
|||
i have edited the cde to read
if ($post['forumid'] != 65) { $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:
} else { for ($kri=0;$kri<count($kr_load);$kri++) { if ($kr_load[$kri] == $matches[1][$kr]) { $kr_text[$kri] .= " Quote:
break; } } } } } } if (count($kr_load) > 0) { for ($kr=0;$kr<count($kr_load);$kr++) { //echo "<br>" . $kr_load[$kr]; $quotegetfieldquery = $vbulletin->db->query_first("SELECT profilefieldid FROM " . TABLE_PREFIX . "profilefield WHERE title='Quote Notification'"); $quoteuserquery = $vbulletin->db->query_first("SELECT user_table.userid AS userid, user_table.email AS email, profile_fields.field" . $quotegetfieldquery['profilefieldid'] . " 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'] == "Private Message") { // Override a potentially full inbox. $senderpermissions['adminpermissions'] = 2; $pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY); $qn_fromuserid = $vbulletin->userinfo['userid']; $qn_fromusername = $vbulletin->userinfo['username']; if ($vbulletin->options['quotenotify_sender'] > 0) { $qn_fromuserid = $vbulletin->options['quotenotify_sender']; $qn_fromtempuser = fetch_userinfo($qn_fromuserid); $qn_fromusername = $qn_fromtempuser['username']; } $pmdm->set('fromuserid', $qn_fromuserid); $pmdm->set('fromusername', $qn_fromusername); $pmdm->set('title', $vbphrase['quotenotify_subject']); $pmdm->set('message', construct_phrase($vbphrase['quotenotify_message'], $kr_load[$kr], $vbulletin->userinfo['username'], $kr_text[$kr], $theurl)); $pmdm->set_recipients($kr_load[$kr], $senderpermissions); $pmdm->set('dateline', TIMENOW); $pmdm->save(); //echo "curr url is " . $vbulletin->url; //echo "send a pm to " . $kr_load[$kr] . "with contents " . $kr_text[$kr]; } if ($quoteuserquery['wantquotenotify'] == "Email") { vbmail($quoteuserquery['email'], $vbphrase['quotenotify_subject'], construct_phrase($vbphrase['quotenotify_emailmessage'], $kr_load[$kr], $vbulletin->userinfo['username'], strip_quotes($kr_text[$kr]), $theurl)); } } } } the alerted posts are still triggering a pm to the alerted person |
#39
|
||||
|
||||
Ahhh, my mistake. Looking into it, it turns out the $post variable doesn't have the forumid... change the first line I had you put in:
Code:
if ($post['forumid'] != 65) { Code:
if ($threadinfo['forumid'] != 65) { |
#40
|
|||
|
|||
Quote:
Thank you! That did it. GREAT NEW FEATURE ! |
#41
|
|||
|
|||
is there a version for 3.6
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|