vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Quote Notification (https://vborg.vbsupport.ru/showthread.php?t=112498)

Krofh 04-10-2006 04:48 AM

Since everyone seems to want to be able to set this enabled by default...
  • Log into your Admin Control Panel
  • Go to User Profile Fields > User Profile Field Manager
  • Locate the "Quote Notification" field, and click "Edit"
  • In the big "Options" textbox, switch "Yes" and "No" so that "Yes" is first. This will make "Yes" the default option.
  • Make sure the "Set Default" option is set to "Yes" as well
  • Save your changes

Snake 04-10-2006 06:38 PM

Thanks, I'll give this a shot!

hambil 04-12-2006 03:19 AM

Nice hack.

*clicks install*

SpankMe 04-16-2006 04:44 AM

Got the following SQL error

Invalid SQL:
SELECT user_table.userid AS userid, profile_fields.field21 AS wantquotenotify FROM user AS user_table LEFT JOIN userfield AS profile_fields ON (user_table.userid=profile_fields.userid) WHERE user_table.username='Brian d'marge' GROUP BY user_table.userid;

Need to change:
PHP Code:

$quoteuserquery $vbulletin->db->query_first("SELECT user_table.userid AS userid, 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='" $kr_load[$kr] . "' GROUP BY user_table.userid"); 

to:
PHP Code:

$quoteuserquery $vbulletin->db->query_first("SELECT user_table.userid AS userid, 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"); 

so as to escape the username as it contained a single quote in above error.

Krofh 04-17-2006 04:09 AM

Ahh, indeed. Thanks for noticing and fixing that, I'll go post an updated version now.

... done.

sinaluna 04-17-2006 10:19 PM

I really like the sound of this. But I haven't been able to get it to work. Was there supposed to be a php file to download also?

I don't get any error messages. But I don't get any PM's either. The setting is turned on in the User CP.

Krofh 04-18-2006 04:24 AM

Is the product enabled? There's no PHP, it's just the XML file... Is the profile field's name still "Quote Notification", and the values "Yes" and "No"? (sorry, this hack breaks if those are changed). I just tried installing this on a completely clean forum and it worked fine.

sinaluna 06-28-2006 11:54 PM

I finally figured out the problem, though I am still working on finding a solution. I am also using the Back-Link for Quotes hack

https://vborg.vbsupport.ru/showthread.php?t=91282

and the link is interferring with this hack.

Example: [quote=testuser;326157]

Any ideas?

Krofh 06-29-2006 04:43 AM

Ahhh, I see what's causing it... obviously, there will be no user called "username;1324" :p anyways, I'm really tired right now and don't have the patience to test it thoroughly, but this should work...
1) Go to your Plugin Manager in the ACP
2) Edit the plugin "Quote Notification" under newpost_complete
Add the highlighted code:
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'])) {

I did some testing on my boards, and it worked fine, though like I said it wasn't very extensive. Let me know if that doesn't work.

COBRAws 06-30-2006 01:46 PM

This works great! Any way i can specify the sender?

I have an username for massive pm's and moderation reports i would lik to use for sending these pm's.

Thank you Jesse


All times are GMT. The time now is 03:17 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01090 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete