Mambo Bridge - Login/Logout Issues

Started by rasncain, August 05, 2005, 10:49:29 AM

Previous topic - Next topic

rasncain

For the most part my Mambo bridge is working between my Mambo and SMF.  However when a user logs in they are redirected to the my SMF forum within Mambo, rather then just my main Mambo page.   When I go to Modules - and edit the mod_smf_login there are options for:

Login Redirection URL:

Back to the Mambo Homepage
Back to the SMF Main Page
Back to the page from which the user logged in

Logout Redirection URL:

Back to the Mambo Homepage
Back to the SMF Main Page
Back to the page from which the user logged in

I have both the "Back to the Mambo Homepage" check on each.  But I always get redirected to the Mambo/SMF integrated site.

Anyone have any ideas?  I could use some help on this.

xenovanis

"Insanity: doing the same thing over and over again and expecting different results."

rasncain

umm.. I dont think so.  My forum is integrated with Mambo.

www.acadianatalk.com is the site

rasncain

My smf integration is wrapped according the configuration of com_smf within mambo - components.

xenovanis

Weird.. That should work with a wrapped forum.. Does this also happen if you turn sef off?
"Insanity: doing the same thing over and over again and expecting different results."

rasncain

well it use to work with sef on.  The problem is I uninstalled the mambo bridge stuff.  And installed what I thought was an upgraded version of the mambo bridge from mambohacks.com [nofollow], well this caused me nothing but problems so I uninstalled it and reinstalled the MOS SMF Bridge that originally worked.

Now, for some reason I am dealing with this problem.  I am hoping to try and fix it without causing any major corruption between mambo and SMF of course.  Because I dont want to upset the few users I have.

xenovanis

Ah, I see.....  ;)

Did the installation of the package in step 1 cause any problems? Are you sure you uninstalled the mambohacks version completely and there were no errors during the uninstall of the package?
Are you sure the file /Sources/MOS_SMF.php is overwritten during reinstall? Just to be sure, open the file  smf_mambo3.1.tar.gz and upload it again.
"Insanity: doing the same thing over and over again and expecting different results."

rasncain

Will do that now.  Everything appeared to have installed and uninstalled fine.  But I will double check.

Thanks

tentronik

Any error messages?
Do you use the smf_mod_login module from the right version?
Do you use 404SEF(rewritting urls)?

I installe dthe mamabohacks version which is bugged - deinstalled com and mod and smf mod - then again installed com smf mod and working np here.

YOu need the right version there are 2 in the download section

1. for early versions and w 1 for 1.1 3p

rasncain

OK so I reinstalled step 1 (smf_mambo3.1) in the package manager and was getting this error:

Execute Modification ./Sources/Subs.php Test failed

So I then copied all files from the original SMF install into /Sources and overwrote what was there.

Then reinstalled step 1 again and the install when fine that time.

However I am still having the issues with login and logout redirecting me to wrapped SMF forum main page and not the mambo main page.  Any ideas would be greatly appreciated.  I really want to thank you for the help so far.

xenovanis

Did you also upload the file MOS_SMF.php? Have you tried to change the parameters once, save it and see if that helped?
"Insanity: doing the same thing over and over again and expecting different results."

rasncain

Yes I did upload a new MOS_SMF.php and I have gone through all settings within Mambo (components and modules for SMF Bridge) and saved everything.  Still have the same problem.  Sigh

rasncain

OK so people keep referring to this MOS_SMF.php file in regards to my logout problem.

I have checked and double checked my settings within Mambo under the smf login module.

I have changed the setting about the login and logout redirection URL.  I have seen in the database that the field changes.

I then checked the MOS_SMF.php file and found the following in regards to logout:


function MOS_Logout()
{
global $db_prefix, $sourcedir, $ID_MEMBER, $context, $db_name, $scripturl;
    global $acl, $mosConfig_live_site, $database, $mosConfig_db, $mosConfig_dbprefix;

// Make sure they aren't being auto-logged out.

require_once($sourcedir . '/Subs-Auth.php');
mysql_select_db($db_name);

// If you log out, you aren't online anymore :P.
db_query("
DELETE FROM {$db_prefix}log_online
WHERE ID_MEMBER = $ID_MEMBER
LIMIT 1", __FILE__, __LINE__);
$_SESSION['log_time'] = 0;

// Empty the cookie! (set it in the past, and for ID_MEMBER = 0)
setLoginCookie(-3600, 0);
setcookie( "usercookie[username]", "", -3600, "/" );
setcookie( "usercookie[password]", "", -3600, "/" );
setcookie ("sessioncookie","",-3600,"/");

mysql_select_db($mosConfig_db);

if (!isset($_REQUEST['returnurl'])){
$sql= mysql_query("SELECT params FROM {$mosConfig_dbprefix}modules WHERE module='mod_smf_login'");
$result = mysql_fetch_array($sql);
    $paramlist = $result[0];
    $paramslogin = mosParseParams($paramlist);
    $returncheck = $paramslogin->logout;
} else { $returncheck = $_REQUEST['returnurl']; }

   if (empty($_SESSION['return']) && empty($returncheck))
  $returncheck="1";


switch ($returncheck){
  case "0";
  $_SESSION['logout_url'] = $GLOBALS['mosConfig_live_site'];
  break;

  case "1";
  $_SESSION['logout_url'] = $scripturl;
  break;

  case "2";
  $_SESSION['logout_url'] = $_SESSION['return'];
  break;
}

mysql_select_db($db_name);

// Off to the merry board index we go!
if (empty($_SESSION['logout_url']))
redirectexit('', true, $context['server']['needs_login_fix']);
else
{
$temp = $_SESSION['logout_url'];
unset($_SESSION['logout_url']);

redirectexit($temp, false, $context['server']['needs_login_fix']);
}
}



I keep seeing it mention this "logout_url" and "$scripturl" which I assume it is pulling from the database some where?  Something must be hosed in regards to this, because anytime I logout or login I get redirected to the wrapped SMF main page within my mambo site.  I should be redirect to the Mambo Main page.

Any other ideas on this would be greatly appreciated.

tentronik

Try a clean mod install.

Remove all smf com and mod stuff then replace the source files with the original.
And install again - there are 2 versions you must use the MOS_SMF_BRIDGEv3.19a_SMF1.1b3 from the official smf package server.

There should be no problems.
Use the right login mod.

rasncain

OK well i removed everything, manually deleted some things.  Manually replaced somethings.  Reinstalled everything all over again.  Went through and set all the options on everything again.  And FINALLY!!!  it seems to be working correctly!  Thanks for all the help people, I really appreciated it.

tentronik

Nice!  8)

Well basicly the problem is we run the latest SMF version and most mods arent yet ported and or tested/documented.


Advertisement: