News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Re: Questions concerning the Combined Readme post

Started by Orstio, January 24, 2005, 04:04:35 PM

Previous topic - Next topic

[Unknown]

Quote from: Radianation on May 05, 2005, 07:51:44 PM
QuoteFatal error: Call to undefined function md5_hmac() in I:\louipimps\forum\Sources\MOS_SMF.php on line 171

I'm getting this error when trying to login from the mambo page with the latest bridge?

You'll need a different version of the bridge for 1.1.

-[Unknown]

p9939068

Hi i just downloaded smf 1.0.3 and MOS-SMF Bridge 3.1, and am using Mambo 4.5.2. and I've hit some pretty bad brick wall  :-[ By the way i'm configuring the bridge to work for a standalone SMF, where the Mambo site is root, and smf url is root/smf, AND mambo and smf using 2 different databases.

Firstly, consider reading the quote below:
Quote7) Configure the SMF component in Mambo Admin.
      7a) Using the Mambo Admin, choose Components> Simple Machines Forum > Edit Config
      7b) Set the Path to SMF. This is NOT a URL! This is the absolute path to your SMF
            Installation.
            (Usually this will be something similar to /home/username/public_html/forum)
      7c) Set the SMF database name
            (If you are using SMF wrapped and installed in the same database as mambo,
            you CAN leave this blank, but it's better to have it filled in anyhow.)
      7c) Set the SMF database prefix
            (Usually this will be smf_)
      7d) Set the Mambo database prefix
         (Usually this will be something similar to `MAMBO_DATABASE_NAME`.mos_)

         NOTE: If your Mambo and SMF Tables are in the same database, then the
         `DATABASE_NAME` is not required.
      (Although it will not hurt anything and may avoid furute problems if it is present.)

      7e) Choose if you want your Forum wrapped or unwrapped.
 
         It should be noted that there are essentially three formats to display your
         Mambo/Forum integration:
      Wrapped:         You are using SMF through the Mambo bridge. The Forum appears
                           "wrapped" in the Mambo tables.
      Unwrapped:      You are still using SMF through Mambo, but it doesn't have the
                           look of a wrapped forum. It looks stand-alone, but it is actually
                           loading through Mambo.
                           This is set in the Mambo config for the component.
                           (The changes to MOS_SMF.php are not required in this case.)
      Stand-alone:   You don't want your forum URL to change.
                           This would be if you already have a large SMF userbase, and you
                           don't want them to have to change the URL that they probably have
                           bookmarked.  In that case, make the changes in MOS_SMF.php as noted.

Now this part of the instructions, sadly, do not work for me, as this is what i see in my Edit SMF-Forum page:

As we can see, there is no place for me to "Set the SMF Database Name", SMF DB Prefix, Mambo DB Prefix. Also I only have 2 options in the SMF Forum Integration dropdown box: Wrapped and Unwrapped. There is no Standalone option. There is also the unexplained SMF Forum Integration dropdown box below, which has 2 options "Use Bridge Registration" and "Use SMF Registration", which I assume is to set whether the forum or the bridge will handle the registrations.

Next comes the error at logging in from Mambo. When i login, it shows a totally blank page with the url "localhost:8080/index.php?option=com_smf&Itemid=29&action=mambo_login" (yeah i'm developing this on local). I'm guessing it could be a redirection error? When i hit the back button and refreshed, it shows i'm logged in, but the extra Mambo buttons viewable only for logged in users do not appear. Note that they DID appear when i stored both mambo and smf tables in one databases. After i port smf tables (they're empty) over to another database, this happens. Everything was configured accordingly for a standalone smf using a separate database.

Next is the 2nd log in error. As it is, there are 2 methods of logging in from the Mambo site. One can either enter username and password in the smf login form and hit the enter button (which will result in the above error for me), or click the link "login", also in the smf login form (note that i've already unpublished mambo's default login form). When i click on the link "login", i get transferred to a totally blank page (url: "http://localhost:8080/index.php?option=com_smf&Itemid=29&action=login"), again without redirection. Also note that the action parameter in the url is "action=login" instead of action=mambo_login or action2=mambo_login. Maybe i missed something?

Next is the error of registration through mambo. Remember the part where i said I have 2 choices in my mambo component -> SMF-Config -> SMF Forum Integration for registration? (Use Bridge Registration and Use SMF Registration). When it's set to Use Bridge Registration and i try to register, i get this error: Notice: Undefined variable: context in C:\Program Files\Apache Group\Apache2\htdocs\components\com_smf_registration\smf_registration.php on line 130. Whereas if it's set to Use SMF Registration and i try to register, it goes to a blank page (url:http://localhost:8080/index.php?option=com_smf&Itemid=29&action=register) and doesnt redirect anywhere SOMETIMES, or will redirect me to the smf registration page OTHER TIMES (hehe i know this sounds really silly, but it's true). I'm guessing it's cookies? I've set both local storage of cookies and subdomain independant cookies to off.

Just to add, the whole thing works fine when I have both Mambo and SMF using the SAME database. It only starts acting up when i split up the database (which i have to on the live site, unfortunately), so maybe that's a clue...  :-[

Appreciate all help in advance :)

Orstio

QuoteAs we can see, there is no place for me to "Set the SMF Database Name", SMF DB Prefix, Mambo DB Prefix. Also I only have 2 options in the SMF Forum Integration dropdown box: Wrapped and Unwrapped. There is no Standalone option. There is also the unexplained SMF Forum Integration dropdown box below, which has 2 options "Use Bridge Registration" and "Use SMF Registration", which I assume is to set whether the forum or the bridge will handle the registrations.

That is correct.  The database info is pulled in from Mambo and SMF automatically, so there's no need to enter it here.

QuoteNext comes the error at logging in from Mambo. When i login, it shows a totally blank page with the url "localhost:8080/index.php?option=com_smf&Itemid=29&action=mambo_login" (yeah i'm developing this on local). I'm guessing it could be a redirection error? When i hit the back button and refreshed, it shows i'm logged in, but the extra Mambo buttons viewable only for logged in users do not appear. Note that they DID appear when i stored both mambo and smf tables in one databases. After i port smf tables (they're empty) over to another database, this happens. Everything was configured accordingly for a standalone smf using a separate database.

Take a look at the file MOS_SMF.php inside your SMF Sources directory.  There are instructions in there that will assist you in modifying it to meet the needs of a stand-alone forum with bridged registration and login.

QuoteNext is the error of registration through mambo. Remember the part where i said I have 2 choices in my mambo component -> SMF-Config -> SMF Forum Integration for registration? (Use Bridge Registration and Use SMF Registration). When it's set to Use Bridge Registration and i try to register, i get this error: Notice: Undefined variable: context in C:\Program Files\Apache Group\Apache2\htdocs\components\com_smf_registration\smf_registration.php on line 130. Whereas if it's set to Use SMF Registration and i try to register, it goes to a blank page (url:http://localhost:8080/index.php?option=com_smf&Itemid=29&action=register) and doesnt redirect anywhere SOMETIMES, or will redirect me to the smf registration page OTHER TIMES (hehe i know this sounds really silly, but it's true). I'm guessing it's cookies? I've set both local storage of cookies and subdomain independant cookies to off.

You still need to put the code from the readme in step 4 into your Mambo template.

p9939068

Thanks for the reply! :) Just need a little more information:

QuoteTake a look at the file MOS_SMF.php inside your SMF Sources directory.  There are instructions in there that will assist you in modifying it to meet the needs of a stand-alone forum with bridged registration and login.
I've already modified the MOD_SMF.php file. It looks like this:
if (!defined('SMF')){
  //Change this next line to the absolute path if you are using SMF outside of Mambo (stand alone)
  //I know it looks right, but not if you're using a stand-alone forum
  require ("administrator/components/com_smf/config.smf.php");
  require ("smf/SSI.php");
}


// Uncomment the following lines if you wish to use SMF outside of Mambo, but you still want the single login
// You will, of course, have to set the paths and database/table names according to your own installation
if (!defined('_VALID_MOS')){
  define( '_VALID_MOS', 1 );
  include_once( '../globals.php' );
  require_once( '../configuration.php' );
  require ("../includes/mambo.php");
}

Am I still missing something..? I read through MOS_SMF.php, but the rest of the params dont seem relevant to logging in/out..  ::)

QuoteYou still need to put the code from the readme in step 4 into your Mambo template.
By this you're referring to changing the contents of xxx.template.php where action=login2 to action=mambo_login and action=logout to action=mambo_logout right..? i've already done that...to no avail  :(

Orstio

Here is your problem:

// You will, of course, have to set the paths and database/table names according to your own installation
if (!defined('_VALID_MOS')){
  define( '_VALID_MOS', 1 );
  include_once( '../globals.php' );
  require_once( '../configuration.php' );
  require ("../includes/mambo.php");
}


The key being this part:  // You will, of course, have to set the paths and database/table names according to your own installation

Your paths to those files are not set correctly.

p9939068

hmm ok but cant i use a relative path? cus my configuration.php and global.php are just 2 levels down. i dont know the absolute path of my server  :-[

Orstio

Quotehmm ok but cant i use a relative path? cus my configuration.php and global.php are just 2 levels down. i dont know the absolute path of my server 

Check your Mambo admin panel, Global Configuration.  Click on the Server tab, and the very top item is your absolute path.

caritas

#47
Ok, I'm freaking out a little bit >:( ...

After installing the bridge all works fine (accept for the fact that a mambosessions keep existing while the smf session is already terminated; and yes their both set to the same 2880; smf is using db sessions however).
But my actual problem is with the latest event and latest topic module, which are installed from the bridge zip as mentioned in the starting post of this topic.

Latest topic
When showing this module, within Mambo, on the homepage all works fine. But when showing it, within Mambo, on the forum page, it errors.
Fatal error: Call to undefined function: ssi_recenttopics()
in "myserverroot"\modules\mod_smf_recentTopics.php on line 19

So, it seams to me :-\, that the module can't find the SSI.php... Am I right? But the SSI.php is in the path in my php.ini.

Latest event
When showing this module on the homepage it errors.
Notice: Undefined index: calender_only_today
in "myserverroot"\modules\mod_smf_recentEvents.php on line 25

But whatever, this is just a notice, but... on the forum page this happens:
Fatal error: Call to undefined function: smf_loadcalendarinfo()
in "myserverroot"\modules\mod_smf_recentEvents.php on line 21


Please tell me, what the  :'( am I doing wrong. Or.. what can I do to repair :D.

Tnx Upfront! 8)

Orstio

Take a look at the readme in step 4 in the bridge package.  There is code that you must add to your Mambo template.

b_michael

Speaking of stand alone forums...

I have all of my options set to let my forum run in "wrapped" mode, yet my forum is still accessable as a stand-alone system. This is causing errors for my users when they attempt to login from forum pages they've previously bookmarked.

I've added a redirect from the original URL to help compensate. Is there anything I can do to shutdown independent access to the forum?

xenovanis

Quote from: b_michael on May 13, 2005, 11:54:04 AM
Speaking of stand alone forums...

I have all of my options set to let my forum run in "wrapped" mode, yet my forum is still accessable as a stand-alone system. This is causing errors for my users when they attempt to login from forum pages they've previously bookmarked.

I've added a redirect from the original URL to help compensate. Is there anything I can do to shutdown independent access to the forum?

http://www.simplemachines.org/community/index.php?topic=35225.0

Make sure you read the whole thread  ;)
"Insanity: doing the same thing over and over again and expecting different results."

jbutler

Quote from: Kindred on January 24, 2005, 03:57:43 PMYou can
make a "quick and dirty"
merge of the CSS files by doing the following:

Open the MAMBO/templates/TEMPLATE_NAME/css/template_css.css file
Open the SMF/Themes/THEME_NAME/style.css file

Copy all of the SMF Theme file into the Mambo template file.
Remove the Duplicate entries from the newly copied portion.
(In other words, if the CSS entry exists in the Mambo template, delete the entry in
the newly created SMF section)
Now save it, and then remove the same "duplicate" entries in the style.css file in
your SMF theme directory.

If I may make a suggestion...

I think you might save some effort if you first remove the duplicate entries from SMF's style.css and then copy the revised file into the Mambo template (template_css.css).

The revised steps would be:


  • Make a back-up of your CSS files (always a good idea!).
  • Compare style.css with template_css.css.  Remove entries in style.css that are contained in template_css.css.
  • Copy the remaining entries from style.css into a new, SMF section of template_css.css.

Does that make sense?

One question:  Won't this process create new duplicate entries in style.css and template_css.css?  Does one have to have the SMF entries from style.css included in Mambo's template_css.css?

Regards,

Kindred

well, the order of removing the duplicates doesn't really matter.  I find it much easier to work within a single file than to bounce back and forth between files/windows.

The problem is not that the entry is decalred twice... the problem is (if you don't merge the files) then the SMF entries OVERRIDE the mambo entries and screw up the look of the mambo part of the board, when any SMF function is loaded in the main window.

As long as the entries are identical between mambo and SMF, the fact that one file is a copy of the other will have no visible effect.

Сл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."

Advertisement: