News:

Wondering if this will always be free?  See why free is better.

Main Menu

Mambo Open Source

Started by Sreya, February 24, 2004, 01:40:26 AM

Previous topic - Next topic

Kyre

#280
Quote from: Orstio on October 20, 2004, 02:31:58 PM
It will only add that line when you add the component to your menu.  Mambo doesn't do that for you.

Figured out how to add components to the menu (sorry I'm a mambo noob). The query seems to be giving me lip.


Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /www/theoutfit.sadgamer.com/modules/mod_smf_login.php on line 9


Site is here: hxxp:www.outfitgaming.com [nonactive]

Edit:

That went away when I just hardwired the query with the correct menu ID. But I still get this when I try and login. I have some PHP experience and this one has me stumped.


Fatal error: Cannot redeclare ssi_shutdown() (previously declared in /www/theoutfit.sadgamer.com/forums/SSI.php:150) in /www/theoutfit.sadgamer.com/forums/SSI.php on line 152


Here's the code it's talking about:

    147 // This shuts down the SSI and shows the footer.
    148 function ssi_shutdown()
    149 {
    150    if (!isset($_GET['ssi_function']) || $_GET['ssi_function'] != 'shutdown')
    151       template_footer();
    152 }

Orstio

At the top of mod_smf_login.php, and MOS_SMF.php, does it have this:

if (!defined('SMF')){
  require ("components/com_smf/config.smf.php");
  require ($smf_path."/SSI.php");
}


What's happening is somewhere you are including SSI.php twice.  It thinks you are trying to redeclare ssi_shutdown(), because that is the first function in SSI.php.

Kyre

#282
It is at the top of MOS_SMF.php but not at the top of mod_smf_login.php.

It is in smf.php however.

Edit: That is to say smf.php requires it without a check.

Orstio

Try changing the require in smf.php to that.  If it works, I'll change it in the zip as well.

Kyre

Ah ha! Figured it out.

The template itself does a require for SSI but doesn't check to see if it's already been defined. I also have globals turned on in php.

Changed template to this:

<?php 
if (!defined('SMF')){
   require ("components/com_smf/config.smf.php");
   require ("/www/theoutfit.sadgamer.com/forums/SSI.php");
}
?>

And it seems to be working at least partially.

Orstio

Good.

Another problem your users are going to have is related to some of your registration settings.

You have both Mambo and SMF requiring an activation email.  This is redundant, and causes a lot of run-around and confusion.  Just the Mambo activation should be plenty.

And, in your SMF settings, do you have local cookies turned on?  If so, turn that off.  I can't log in to your SMF at all, it keeps telling me:   You were unable to login. Please check your cookie settings.

Kyre

#286
There was some template mess ups I did. Changed both login2 and login to mambo_login instead of just login2.

Good point about the activation thing.

Edit:
Noticed a couple of problems with MOS_SMF.php having to do with the sql queries. Since my mambo and my SMF are read from 2 seperate databases, I had to put the database prefix for mambo in front of all the places where it does queries on mambo tables.  It was a quick fix and now works just fine.

Also, you probably already know this but all the queries on tables in MOS_SMF.php are static so if you used a seperate database prefix other than mos, it won't work (unless you change them of course).

It's working now though and it's pretty sweet. Thanks.

Orstio

There is one other thing:

I'm not certain that a site at www.outfitgaiming.com can access your forum cookie, which is set to forum.outfitgaming.com.......   ???

Kyre

Quote from: Orstio on October 20, 2004, 04:25:41 PM
There is one other thing:

I'm not certain that a site at www.outfitgaiming.com can access your forum cookie, which is set to forum.outfitgaming.com.......   ???

It's all virtual domain stuff. In reality hxxp:forums.outfitgaming.com [nonactive] is hxxp:www.outfitgaming.com/forums/ [nonactive]. It's apache magic. ;)

Orstio

QuoteIt's all virtual domain stuff. In reality forums.outfitgaming.com is www.outfitgaming.com/forums/. It's apache magic.

I understand that, but I don't think the cookies do.  ;)

Kyre

Quote from: Orstio on October 20, 2004, 04:38:50 PM
QuoteIt's all virtual domain stuff. In reality hxxp:forums.outfitgaming.com [nonactive] is hxxp:www.outfitgaming.com/forums/ [nonactive]. It's apache magic.

I understand that, but I don't think the cookies do.  ;)

Good point. They are acting quite bizarre.

Francis_Drake

Quote from: Orstio on October 20, 2004, 02:31:58 PM
Well, I can see the user menu, but I can't seem to logout of Mambo on your site now......
Yes logged one hour later in mambo.  Thats not fine. I can´t found the error.

Quote
/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
      Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
      Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
      Standards compliance mode happens when you use xhtml... */
   if ($context['browser']['needs_size_fix'])
      echo '
   <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';
Does not function any longer if the forum runs in mambo.
"Führungsstärke ist eine Frage von Intelligenz, Glaubwürdigkeit , Gerechtigkeit, Mut und Autorität." - Sun Tzu, Die Kunst des Krieges

Ben Dragon

Will this mod work with Mambo 4.51a?

[Unknown]

#293
Sounds like there are some issues that I could help with - I could probably solve the subdomain issue ;).

If someone could make a list of what problems they may be having, and which are resolved and/or fixed...  I can probably do a bit better at them only because I've got more experience with SMF...

-[Unknown]

Orstio

QuoteQuote
/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
      Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
      Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
      Standards compliance mode happens when you use xhtml... */
   if ($context['browser']['needs_size_fix'])
      echo '
   <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';

Does not function any longer if the forum runs in mambo.

Quick came up with a nice solution for that....

neo

Quote from: Kyre on October 20, 2004, 03:50:38 PM
Ah ha! Figured it out.

The template itself does a require for SSI but doesn't check to see if it's already been defined. I also have globals turned on in php.

Changed template to this:

<?php 
if (!defined('SMF')){
   require ("components/com_smf/config.smf.php");
   require ("/www/theoutfit.sadgamer.com/forums/SSI.php");
}
?>

And it seems to be working at least partially.

http://www.boehsebaeren.de/index.php?option=com_smf&Itemid=107&?action=profile;u=43;sa=theme


http://www.boehsebaeren.de/index.php?option=com_wrapper&wrap=Forum&Itemid=26


Quote<html xmlns="http://www.w3.org/1999/xhtml">

<?php 
if (!defined('SMF')){
   require ("components/com_smf/config.smf.php");
   require ("/home/boehsebaeren.de/www/smf/SSI.php");
}
?>

<head>

leider kann ich kein English
was mache ich falsch ???
Die dunkle Seite der Unterhaltung,
Quoten mit Idioten, der Tod kommt nach Haus'.
Feige Medien, angepasster Meinungsterror.
Unerträgliches, gestellter Applaus.
Bridge:

Analysen - ersetzt durch Emotionen,
Futter für Voyeure, verarschung für Millionen.
...

Orstio

Quote from: neo on October 21, 2004, 05:57:25 AM
Quote from: Kyre on October 20, 2004, 03:50:38 PM
Ah ha! Figured it out.

The template itself does a require for SSI but doesn't check to see if it's already been defined. I also have globals turned on in php.

Changed template to this:

<?php 
if (!defined('SMF')){
   require ("components/com_smf/config.smf.php");
   require ("/www/theoutfit.sadgamer.com/forums/SSI.php");
}
?>

And it seems to be working at least partially.

http://www.boehsebaeren.de/index.php?option=com_smf&Itemid=107&?action=profile;u=43;sa=theme


http://www.boehsebaeren.de/index.php?option=com_wrapper&wrap=Forum&Itemid=26


Quote<html xmlns="http://www.w3.org/1999/xhtml">

<?php 
if (!defined('SMF')){
   require ("components/com_smf/config.smf.php");
   require ("/home/boehsebaeren.de/www/smf/SSI.php");
}
?>

<head>

leider kann ich kein English
was mache ich falsch ???

Try it like this:


<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<?php 
if (!defined('SMF')){
   require ("components/com_smf/config.smf.php");
   require ($smf_path."/SSI.php");
}
?>

neo

Quote from: Orstio on October 21, 2004, 06:12:12 AM


Try it like this:


<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<?php 
if (!defined('SMF')){
   require ("components/com_smf/config.smf.php");
   require ($smf_path."/SSI.php");
}
?>

i have
immer noch das gleiche problem
Quote
<head>
<?php 
if (!defined('SMF')){
   require ("components/com_smf/config.smf.php");
   require ($smf_path."/SSI.php");
}
?>

<title><?php echo $mosConfig_sitename; ?></title>

http://www.boehsebaeren.de/index.php?option=com_smf&Itemid=107

???
Die dunkle Seite der Unterhaltung,
Quoten mit Idioten, der Tod kommt nach Haus'.
Feige Medien, angepasster Meinungsterror.
Unerträgliches, gestellter Applaus.
Bridge:

Analysen - ersetzt durch Emotionen,
Futter für Voyeure, verarschung für Millionen.
...

Kyre

#298
Quote from: [Unknown] on October 21, 2004, 02:22:56 AM
Sounds like there are some issues that I could help with - I could probably solve the subdomain issue ;).

If someone could make a list of what problems they may be having, and which are resolved and/or fixed...  I can probably do a bit better at them only because I've got more experience with SMF...

-[Unknown]

I was able to get them to interact somewhat correctly between the subdomains when I set local cookies on oddly enough but SMF gave me an invalid cookie error when I turned that off and switched on subdomain independent cookies.

The login process acted very bizarre when it was even partially functional however. I logged in via the Mambo_Smf module and a forum window appeared inside of my mambo template which I had to log into as well. An error would come up full screen stating "You must wait 15 seconds". I'd hit the backup button which would take me back to mambo home, I'd relogin via the module and bam. I was logged into mambo as my forum account and also logged into the forums.

The only problem being that when I hit the logout button, it would clear my forum login but mambo would still show me as being logged in.

If you either of you want, you can IM me (aim preferrable) and I can hook you up with access to my site if you want to mess with it. (PS, it's very messy).

Another minor little bug I noticed was that the accounts that were merged over automatically did not appear in the mambo user manager due to the group not being set.

Edit: My SQL query hacks could also be to blame for some of the problems.

Orstio

QuoteAnother minor little bug I noticed was that the accounts that were merged over automatically did not appear in the mambo user manager due to the group not being set.

Edit: My SQL query hacks could also be to blame for some of the problems.

That may have something to do with the changes you've made to run them out of different databases.

Here is the code in MOS_SMF.php that takes care of it:


//if the user doesn't exist in Mambo, they've already been verified by SMF, so register them into Mambo as well
   if (!isset($mos_user)){
   $mos_write = mysql_query( "INSERT INTO ".$mos_prefix."users (name,username,email,password) VALUES ('".$_REQUEST['user']."','".$_REQUEST['user']."','".$user_settings['emailAddress']."','".$passwd."');");
   $mos_find_id = mysql_query( "SELECT `id` FROM ".$mos_prefix."users WHERE name='".$_REQUEST['user']."' LIMIT 1");
   $mos_id_array = mysql_fetch_array($mos_find_id);
   $mos_id = $mos_id_array[0];
   $mos_write = mysql_query( "INSERT INTO `".$mos_prefix."core_acl_aro` ( `aro_id` , `section_value` , `value` , `order_value` , `name` , `hidden` ) VALUES ('', 'users', '".$mos_id."', '0', '".$_REQUEST['user']."', '0');");
   $mos_map_sql = mysql_query("SELECT `aro_id` FROM `".$mos_prefix."core_acl_aro` WHERE name='".$_REQUEST['user']."' LIMIT 1");
   $mos_map_array = mysql_fetch_array($mos_map_sql);
   $aro_id = $mos_map_array[0];
   $mos_write = mysql_query ("INSERT INTO `mos_core_acl_groups_aro_map` ( `group_id` , `section_value` , `aro_id` ) VALUES ('18', '', '".$aro_id."');");

}


This could probably be cleaner, but it does the job.

Advertisement: