Thread: Private Messages Enhancements - Popup Private Messaging
View Single Post
  #217  
Old 12-09-2009, 03:58 PM
Kosmic1 Kosmic1 is offline
 
Join Date: Nov 2009
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by phreebsd View Post
I found one problem when this mod is installed. My forum is 3.8.1.
When this mod is enabled and you have welcome PM's turned on, after the user receives their email to click on to activate their account they receive this error.

Fatal error: Call to a member function clean_gpc() on a non-object in /home/********/public_html/includes/class_dm_user.php(2595) : eval()'d code on line 1

Their account still activates but the error above is all they see upon clickin the activation link.
They also never receive the PM.
Once you take the name out (username welcome PM's will come from) out of vbulletin options -> user registration options they can activate with no issues.
Quote:
Originally Posted by AWJunkies View Post
I have same issue noted above been trying to find the culprit of the issue (mod) for quite some time finally found it.

To fix the issue you need to do a if statement around a plugin. Since the newpm does not have global $vbulletin value it errors the second the plugin tries to clean the value.

Change Popup PM Postbit Link postbit_display_start:
PHP Code:
if ($_POST['do'] == 'insertpm')
{
$vbulletin->input->clean_gpc('p''fbpm'TYPE_STR);

if (
$vbulletin->GPC['fbpm'] == 'yes')
{
    
$fbpmmessage '<strong>Message sent successfully!</strong> <a href="private.php?do=newpm&amp;fbpm=newpm">Send another?</a>';
    eval(
'print_output("' fetch_template('pm_fbpm') . '");');
}

Just added if statement around it to make sure this is a post insert request and NOT any internal pms being sent by any mod or any vb itself.
I have same issue too!

This is my postbit_display_start:

Quote:
global $vbulletin;

if (!empty($vbulletin->options['fbpm_permission']))
{
$fbpmpermission = explode(',', $vbulletin->options['fbpm_permission']);
if (in_array($vbulletin->userinfo['usergroupid'], $fbpmpermission))
{
$show['pmpopuplink'] = " onclick=\"divwin=dhtmlwindow.open('divbox', 'div', 'pmformdiv', 'Enviar uma Mensagem Privada para $post[username]', 'width=".iif($vbulletin->options['fbpm_width'], $vbulletin->options['fbpm_width'], $stylevar['formwidth']).",height=".$vbulletin->options['fbpm_height'].",left=200px,top=50px,resize=0,scrolling=0'); pmformframe.location.replace('private.php?do=newpm &amp;fbpm=newpm&amp;u=".$post['userid']."'); return false\"";
}
}

Where can I add your if statement to fix it??

Thanks for your help!
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01726 seconds
  • Memory Usage 1,780KB
  • 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
  • (1)bbcode_php
  • (3)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