Mambo & SMF removes SWMenuFree from view

Started by Pavcules, February 13, 2005, 09:52:34 AM

Previous topic - Next topic

Pavcules

Hi there,

Last week I installed the SMF bridge in Mambo, but noticed that it removes the SWMenuFree (http://swonline.biz [nofollow]) menu from Mambo. 

I have posted the problem in the SWMenuFree forum at: http://swonline.biz/index.php?option=com_simpleboard&Itemid=33&func=view&id=316&catid=7 [nofollow], but due to no responses I wondered if anyone else is experiencing the same problem here.

There are two problems (maybe the same!) with SMF being integrated with Mambo.

1. If the SMF bridge code (as shown below) is added to main Mambo "index.php" file, the SWMenuFree menu disappears.

<?php 
global $sc$context;

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

$sc = &$context['session_id'];
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];

?>


2. Regardless of the bridge code being present or not in the "index.php", viewing the integrated SMF forum, the menu still disappears.

I have currently removed the SMF bridge code from my "index.php" file.  To view the problem of the menu (the SWMenuFree is the top menu) disappearing as stated in Problem (2), click on the link to see the menu present: http://www.pavcules.com [nofollow], and then go to the Forum: http://www.pavcules.com/index.php?option=com_smf&Itemid=52 [nofollow].

For reference, Mambo and SMF are installed on two different databases.

If there is any additional info you require, I will gladly help you.

Thanks.

- Pav

Kindred

I don't know what you're experiencing... but I have SWfreeMenu and the bridge running on my site just fine...

http://www.turtleshellprod.com/mambo
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

jorgen

Quote from: kindred on February 13, 2005, 10:08:00 AM
I don't know what you're experiencing... but I have SWfreeMenu and the bridge running on my site just fine...

http://www.turtleshellprod.com/mambo


Ditto.
www.inventorforum.net

Pavcules

Hi guys,

I looked at both your websites, and I tried setting the SWmenu to the right handside, just incase it was an orientation bug.  But it didn't make any difference.

I'm on the latest versions of the component and module for the menu.
What versions have you got installed?

In addition, did you specify anything different for the menu, e.g.: an extra parameter?

The code below is the result of when the page is displayed when in non-forum and forum modes:

Non-Forum (Menu code is correctly produced):

<!-- Top menu  -->
    <tr>

        <td colspan="3" class="silver_box">

        <div id="silver_toolbar" >
            <div id="silver_menu">
                <script type =" text/javaScript" src="modules/mod_swmenufree/menu.js"></script>
<style type="text/css">.....ETC...


Forum code (Menu code is not produced):

<!-- Top menu  -->
    <tr>

        <td colspan="2" class="silver_box">

        <div id="silver_toolbar" >
            <div id="silver_menu">
                 
   
             </div>                   
            <div style=" clear: both; ">             
            </div>
        </div>

        </td>

    </tr>


Regards
- Pav

Orstio

You are putting the SMF bridge code before the </head> tag, correct?

Pavcules

Hi Orstio,

Regardless of whether bridge code is in the "index.php" file or not, going to forum will stop the Top menu from working.

I have now added the bridge code to my "index.php" file, and if you go to my site now, you will not see the Top menu appearing. 

Regards
- Pav

Orstio

I wasn't questioning whether or not it was in the file, I was questioning the location of the code within the file. 

It must be placed above the closing head tag.

Pavcules

#7
Here is the code in my template for the <HEAD> tag section:

<head>

<?php

if ( $my->id ) {
    initEditor();
}

?>


<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO?>" />

<?php mosShowHead(); ?>

<link href="<?php echo $mosConfig_live_site;?>/templates/rhuk_planetfall/css/template_css.css" rel="stylesheet" type="text/css" />

<link rel="shortcut icon" href="<?php echo $mosConfig_live_site;?>/images/favicon.ico" />

<?php 
global $sc$context;

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

$sc = &$context['session_id'];
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];

?>

</head>


Do you see anything wrong with it? 
Or would showing the entire contents of the "index.php" file help you?

-------------
I had a quick look at the SMF bridge code.  On my system the only the "smf.php" file exists in the "components\com_smf" folder.  Should the "config.smf.php" file also be in there, or any other additional files?
- Pav

Orstio

OK, good.

You mentioned above that you installed them in separate databases.

What if you change the code in the header to this:

<?php 
global $sc$context;

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

$sc = &$context['session_id'];
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];

mysql_select_db($GLOBALS['mosConfig_db']);
?>


Pavcules

Hi Orstio,

Looks like we are getting there.  The Top Menu now successfully appears on the site and in the Forum now.  :)

At the bottom of page now, I am now getting the following error:

Database Error: Table 'pavcule_mamb2.smf_sessions' doesn't exist
File: /home/pavcule/public_html/smf/Sources/Load.php
Line: 1193
Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0


P.S.: If you didn't see, I updated my HEAD code query and asked about the "config.smf.php" file, as its not present.
- Pav

Orstio

#10
config.smf.php is under administrator/components/com_smf.

QuoteDatabase Error: Table 'pavcule_mamb2.smf_sessions' doesn't exist
File: /home/pavcule/public_html/smf/Sources/Load.php
Line: 1193
Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0

Yeah, that's the rub...

OK, how about if you take the new line out:

mysql_select_db($GLOBALS['mosConfig_db']);

and move it below the <body> tag:


<body>
<?php mysql_select_db($GLOBALS['mosConfig_db']); ?>

Pavcules

Nope, didn't make a difference to the error. 

Although my gallery is now working which wasn't before that line move, but that page does not show the error!

If you run out of options would it better if the SMF and Mambo databases was merged into one?

Regarding the "config.smf.php" file, I think their maybe a problem with the package installation.  I did an uninstall and reinstall today, but the file wasn't added.

- Pav

Orstio

QuoteIf you run out of options would it better if the SMF and Mambo databases was merged into one?

Merging the two is the easiest way to make it all work together.

QuoteRegarding the "config.smf.php" file, I think their maybe a problem with the package installation.  I did an uninstall and reinstall today, but the file wasn't added.

The bridge would give you errors all over the page if it wasn't there.  Again, it is not in your components/com_smf folder, it is in your administrator/components/com_smf folder.

Pavcules

Hi Orstio,

I have now merged my SMF database into the Mambo database, and everything is working correctly.

My mistake on the "config.smf.php", I was looking at the "components" folder, which is exactly similar in structure to the "administrator/components" one.  Better get my eyes tested.  ;)

At the end of the day, I think having two databases will cause more of a headache for users.  Although one line changed fixed the menu problem, it broke the Gallery section.  And if that was fixed, who knows what would or would not work in the future changes.

Thanks for your help.  :)
- Pav

Advertisement: