View Single Post
  #50  
Old 11-20-2006, 04:15 PM
mferguson's Avatar
mferguson mferguson is offline
 
Join Date: Jan 2003
Location: Colorado
Posts: 274
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CyberRanger View Post

The only item that I can't get working is overriding the mailbox full restriction. I've used the code above but setting adminpermissions to 2 doesn't seem to work. In class_dm_pm.php, $overridequota = false seems to need to be set to "true" but I can't figure out how to do that.
I had the same issue. What I found by searching through all the vB code is a couple of places where overridequota was referenced. All that is required to set this to send the PM even if the recipient's mailbox is full is to:

PHP Code:
$pmdm->overridequota true
Here is how my code looks with this:
PHP Code:
$pmdm =& datamanager_init('PM'$vbulletinERRTYPE_ARRAY);         

$pmdm->set('fromuserid'$vbulletin->userinfo['userid']);
$pmdm->set('fromusername'$vbulletin->userinfo['username']);
$pmdm->set_info('receipt'false);
$pmdm->set_info('savecopy'false);
$pmdm->overridequota true;                   // Force pm send even if recipient's mailbox is full
$pmdm->set('title'$title);
$pmdm->set('message'$message);
$pmdm->set('dateline'TIMENOW);
$pmdm->set('allowsmilie'true);            

$pmtousernames implode(';'$pmto_users);
$pmdm->set_recipients($pmtousernames$botpermissions);
$pmdm->save(); 
Hope this helps everyone that was running into similar problems.

Mark

When testing my auto send pm's code I kept seeing users that had pmpopup (popup-based pm notification) not being updated when I sent my auto pm.

If a user has pmpopup notification on this column should show as "1" in the user table. If they receive a new message and haven't read it yet it should show as "2" in the user table. The two denotes that there is an unread popup.

In the case where I was sending a message to multiple recipients I noticed that only the last of the recipients that also had pmpopup notification was having the pmpopup column updated to "2" while other's weren't.

In debuggint this problem I found that in the forums/includes/class_dm_pm.php file that line 557:

PHP Code:
$popupusers = array(); 
is reinitializing the array and therefore causes any previous userids that have pmpopup enabled to be lost (since its within a foreach loop processing all the users)

To resolve this I've commented the line out for now and also filed a bug report with vBulletin to get it resolved in a future release. I found this is 3.6.1 and also in 3.6.3.

Hope this helps some others that found problems in getting this mod working as expected.

Mark
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01179 seconds
  • Memory Usage 1,794KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete