vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v4.0 Support > Bugs & Issues > Bugs From v4.1.0

Reply
 
Thread Tools Display Modes
  #1  
Old 02-01-2011, 12:04 PM
TeknoSounds TeknoSounds is offline
Senior Member
 
Join Date: Nov 2006
Posts: 140
Default Facebook redirection rears its ugly head again

Hey Brian, just updated my dev site to 4.1.1 and immediately noticed it was forcing me to log in via Facebook. Based off the previous ticket I had opened, I was able to find and correct the issue.

In the Query Page Data plugin we have:
Current, Incorrect

Code:
if ((do_facebook_redirect() AND 
            ($vbulletin->userinfo['userid'] AND $vbulletin->userinfo['fbuserid'] != vB_Facebook::instance()->getLoggedInFbUserId())
            OR (!$vbulletin->userinfo['userid'] AND !vB_Facebook::instance()->getVbUseridFromFbUserid()))
        )
Corrected (removed first paren and moved it down in front of the $vbulletin variable)
Code:
if (do_facebook_redirect() AND 
            (($vbulletin->userinfo['userid'] AND $vbulletin->userinfo['fbuserid'] != vB_Facebook::instance()->getLoggedInFbUserId())
            OR (!$vbulletin->userinfo['userid'] AND !vB_Facebook::instance()->getVbUseridFromFbUserid()))
        )
Reply With Quote
  #2  
Old 02-02-2011, 11:45 AM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default

Thank you for pointing this out. I'm not sure how that change got left out, but I've went ahead and updated the install file in the download package here to include the correct code so it shouldn't be an issue for future installs.
__________________
Frequently Asked Questions
CMPS Users Manual

For vBadvanced software assistance, please use the support forums.
Unsolicted PMs, IMs, and email will not be responded to.
If you have a non-software related question or problem with your account, please submit a support ticket.
Reply With Quote
  #3  
Old 02-03-2011, 09:07 AM
MortysTW MortysTW is offline
Twisted Monkey
 
Join Date: Apr 2005
Location: California, USA
Posts: 138
Default

Having the same issue.

Can you explain where I can make this tweak myself without having to reload vBa? I just upgraded last week and really don't want to do it again if it's a simple tweak I can go make.

Please and thank you.
Reply With Quote
  #4  
Old 02-04-2011, 12:18 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default

Just go to Admin CP => Plugins & Products => Plugin Manager, edit the plugin called 'Query Page Data', and replace the 'Plugin PHP Code' with the following:
PHP Code:
if (defined('VBA_PORTAL'))
{
    
// ##### Facebook Redirect
    
if (THIS_SCRIPT == 'adv_index' AND function_exists('is_facebookenabled') AND is_facebookenabled() AND $show['facebookuser'] = vB_Facebook::instance()->userIsLoggedIn())
    {
        if (
do_facebook_redirect() AND 
            ((
$vbulletin->userinfo['userid'] AND $vbulletin->userinfo['fbuserid'] != vB_Facebook::instance()->getLoggedInFbUserId())
            OR (!
$vbulletin->userinfo['userid'] AND !vB_Facebook::instance()->getVbUseridFromFbUserid()))
        )
        {
            
exec_header_redirect($vbulletin->options['bburl'] . '/register.php' $vbulletin->session->vars['sessionurl_q']);
        }
    }

    global 
$phrasegroups;

    
// Figure out which page to grab
    
$pagevar false;
    if (
THIS_SCRIPT == 'adv_index')
    {
        
$pagevar $vbulletin->adv_portal_opts['adv_portal_main']['portal_pagevar'];
    }

    if (
defined('VBA_PAGE'))
    {
        
$getpage VBA_PAGE;
    }
    else if(
$pagevar AND isset($_REQUEST[$pagevar]))
    {
        
$getpage $_REQUEST[$pagevar];
    }
    else
    {
        
$getpage 'home';
    }

    
$initialize_dynamics false;

    (
$hook vBulletinHook::fetch_hook('vba_cmps_include_getpage')) ? eval($hook) : false;

    
// ##### Now grab the page
    
if ($getpage == 'home')
    {
        
$pages =& $vbulletin->adv_portal_home;
    }
    else
    {
        
$pages $db->query_first("
            SELECT *
            FROM " 
TABLE_PREFIX "adv_pages
            WHERE name = '" 
$db->escape_string($getpage) . "'
                " 
iif(!($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']), 'AND active = 1')
        );

        
$pages['modules'] = unserialize($pages['modules']);
        
$pages['userperms'] = explode(','$pages['userperms']);
        
$pages['advanced'] = unserialize($pages['advanced']);
        
$pages['meta'] = unserialize($pages['meta']);
    }

    
$vbulletin->adv_pages =& $pages;

    if (!empty(
$pages['modules']))
    {
        foreach (
$pages['modules'] AS $pagecol => $pagemodules)
        {
            if (!empty(
$pagemodules))
            {
                foreach (
$pagemodules AS $advmodid => $advmodorder)
                {
                    if (
$vbulletin->adv_modules[$advmodid]['dyna_prefix'])
                    {
                        
$initialize_dynamics true;
                        
$phrasegroups[] = $vbulletin->adv_modules[$advmodid]['dyna_prefix'];
                    }
                }
            }
        }
    }
}
else if (
defined('VBA_CMPS_ADMIN_FILE') AND in_array($_REQUEST['do'], array('addmodule''editmodule''copymodule''addpage''editpage''copypage''modifysettings')))
{
    global 
$phrasegroups;
    
$getdyna false;
    if (!empty(
$vbulletin->adv_modules))
    {
        foreach (
$vbulletin->adv_modules AS $modid => $mod)
        {
            if (
$mod['dyna_prefix'])
            {
                
$getdyna true;
            }
        }

        if (
$getdyna)
        {
            
$phrasegroups[] = 'adv_dyna';
            
$phrasegroups[] = 'adv_dyna_cp';
        }
    }
}
else if (
$vbulletin->options['vba_portal_navtabs'])
{
    
$datastore_fetch[] = "'adv_portal_page'";

__________________
Frequently Asked Questions
CMPS Users Manual

For vBadvanced software assistance, please use the support forums.
Unsolicted PMs, IMs, and email will not be responded to.
If you have a non-software related question or problem with your account, please submit a support ticket.
Reply With Quote
  #5  
Old 02-07-2011, 08:59 AM
MortysTW MortysTW is offline
Twisted Monkey
 
Join Date: Apr 2005
Location: California, USA
Posts: 138
Default

And now it works. Thank you very much! Much appreciated as always.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Facebook with vba blacura "How Do I..." Questions 0 09-28-2009 12:20 AM
Getting rid of the goto redirection BonjourChine Troubleshooting & Problems 5 07-31-2008 11:37 AM
Redirection fancom "How Do I..." Questions 3 03-12-2008 07:40 AM
Redirection issues with 3.5.7 chkdg8 Troubleshooting & Problems 2 11-26-2006 03:24 AM
Redirection after login azarl "How Do I..." Questions 19 10-30-2006 11:14 AM


All times are GMT -4. The time now is 05:27 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.