Ok, i have installed and integrated MOS and SMF with the bridge.
I have followed the instructions carefully and read all the readme files that come with the bridge.
In index.english.php I have replaced:
$txt['welcome_guest'] = 'Welcome, <b>' . $txt[28] . '</b>. Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';
with:
$txt['welcome_guest'] = 'Welcome, <b>' . $txt[28] . '</b>. Please login or <a href="http://www.your-mambo-installation.com/directory/index.php?option=com_smf_registration&task=register">register</a>.';
In index.template.php I have changed:
action=login2
into:
action=mambo_loginand:
action=logout
into:
action=mambo_logout
I have made the following assumptions (PLEASE!!! correct me if I am wrong because I could be confused):
1. I am supposed NOT to use the ssi_login() and ssi_logout() functions (unless I am willing to edit SSI.php as well)
2. I am supposed NOT to use the SMF registation page because if I do users will only be registered in SMF and not in MOS, while if I do the opposite (have them register from the MOS registration page) they will automatically be registered in both SMF and MOS.
3. I am supposed to be able to log in both from the SMF pages and the MOS pages.
4. I don't see a logout button in the Mambo pages so I am supposed to logout from the SMF logout button.
If these assumptions are correct then I don't know what is wrong with this scenario but the fact is that I can't seem to log in or log out (cookies are enabled of course).
1. If I log in from the integrated log in module in the mambo pages I get a message in the SMF pages that says the following:
QuoteAn Error Has Occurred!
You were unable to login. Please check your cookie settings.
The URL in this case is:
Quote/mambo/index.php?option=com_smf&Itemid=&?PHPSESSID=rle50irqa1rkqdbg4l795h0ic3&action=mambo_login;sa=check;id=3
Strangely the ssi_whoisonline() function says that I am logged in but as soon as I click any link it goes back to saluting me as a guest.
2. If on the other hand I log in from the SMF log in at the top of the page using the default SMF theme then I am able to log in but clicking on the SMF logout button has no effect at all. This button points to:
Quote/community/index.php?action=mambo_logout;sesc=da2bf1a3fd4d0d262e2d3946eedbf2c1
I am stuck and don't know what to do.
I am using SMF 1.0 RC2 and MOS 4.5.1a
Everything is being tested locally with PHP5 and seems to work except this.
Your login string looks really wierd...
Quote
... /mambo/index.php?option=com_smf&Itemid=48&?action=login
There should be no session ID if you are not logged in yet.
(also, you did change the line:
... Please login or <a href="http://www.your-mambo-installation.com/directory/index.php?option=com_smf_registration...
to reflect your actual installation, correct?)
My logout looks somewhat similar...
Quote
... /mambo/?option=com_smf&Itemid=48&?action=mambo_logout;sesc=c7e94e8b9e8022c8af6ab8fabd31354a
And yes... if you ONLY go into SMF, bypassing Mambo, logout does not work at all...
Ok so let's see.
What is wrong with my login string? How can I fix it?
Yes I have made the change as the readme file said so that the Please login... sentence reflects the proper path. I have made this change in index.english.php and the line looks like this:
$txt['welcome_guest'] = 'Welcome, <b>' . $txt[28] . '</b>. Please login or <a href="/content/?option=com_smf_registration&task=register">register</a>.';
(my MOS is installed in /content)
Ok so I am not supposed to log out from SMF, is that what you are saying? I should ALWAYS log out from the Mambo log out button. Is this correct?
Please help me out on this.
I'm not sure how to fix your login link... I just know that it's wrong... Hopefully Orstio will see this and have an idea.
As for logging out...
If you bypass Mambo completely (in other words, load your SMF directly) the logout link does not work (at least it never has for me)
However, using the SMF logout link from the iframe of Mambo has always worked for me (to log me out of SMF, loggin out of Mambo is another story.
maybe I'm reading this incorrectly (strange day.... don't ask)... but it LOOKS like you replaced your login link with a registration link.
Why not add a few redirectexit()'s to LogInOut.php and make sure you got all the login/register links that way?
-[Unknown]
Quote1. I am supposed NOT to use the ssi_login() and ssi_logout() functions (unless I am willing to edit SSI.php as well)
2. I am supposed NOT to use the SMF registation page because if I do users will only be registered in SMF and not in MOS, while if I do the opposite (have them register from the MOS registration page) they will automatically be registered in both SMF and MOS.
3. I am supposed to be able to log in both from the SMF pages and the MOS pages.
4. I don't see a logout button in the Mambo pages so I am supposed to logout from the SMF logout button.
1) Correct.
2) Incorrect. You must use the com_smf_registration component in order for users to be registered in both.
3) If you use the integrated login, you should be logged in to both. If you use the SMF login, you will log in to SMF. If you use the Mambo login, you will be logged in to Mambo.
4) The integrated login comes with a logout button...... ???
It looks a lot to me like you are confusing registration and login. And in the process you seem to have made things far more complicated for yourself than they need to be.
I would like to see in the new registration component, the agreement text displayed with a checkbox that a new member has to check to have read the agreement.
QuoteI would like to see in the new registration component, the agreement text displayed with a checkbox that a new member has to check to have read the agreement.
That should be easy. Do you want me to email that to you?
Quote from: Orstio on November 07, 2004, 07:45:02 AM
QuoteI would like to see in the new registration component, the agreement text displayed with a checkbox that a new member has to check to have read the agreement.
That should be easy. Do you want me to email that to you?
You always can ;)
But I mean, I just noticed this is missing in the new registration and some site owners might appreciate that part included in the registration component.
Hello folks, strange I wasn't getting email notifications of your new posts so I missed them until now...
Anyway, thanks a lot for taking the time to reply, I ALWAYS appreciate your generosity, I know time is an asset.
My login problems continue.
All of the above I had written was happening on my local Mac OSX machine running Apache with PHP5, SMF RC2 and MOS 4.5.1a.
I decide to start over and I have just installed a fresh copy of Mambo on my remote server. This time it's a Unix machine with an Apache with PHP4. SMF is as always RC2 and MOS is 4.5.1a.
I installed Mambo in the folder /content/
I have made absolutely sure to perfectly follow ALL the instructions included in the four readme files of the bridge and this is what I get:
If I log in from the the integrated log in then I am logged into SMF but I am NOT logged into Mambo!!!
I don't know why this is happening, but I have made sure to follow all instructions carefully and I am really stuck now.
You can view the site here:
http://www.chaindlk.com/content/
the forum is here (obviously):
http://www.chaindlk.com/content/?option=com_smf
I know that I am not logged into Mambo is because if I go to the UserDetails page:
http://www.chaindlk.com/content/?option=com_user&task=UserDetails
it says that I am not authorized because I am not logged in!!!
I am currently working on this site so there are still things that aren't perfect and many dead links...
I hope somebody can lend a hand.
Feel free to create as many test accounts as you want, this website is not live yet...
QuoteIf I log in from the the integrated log in then I am logged into SMF but I am NOT logged into Mambo!!!
I don't know why this is happening, but I have made sure to follow all instructions carefully and I am really stuck now.
You can view the site here:
http://www.chaindlk.com/content/
the forum is here (obviously):
http://www.chaindlk.com/content/?option=com_smf
I know that I am not logged into Mambo is because if I go to the UserDetails page:
http://www.chaindlk.com/content/?option=com_user&task=UserDetails
it says that I am not authorized because I am not logged in!!!
I am currently working on this site so there are still things that aren't perfect and many dead links...
I hope somebody can lend a hand.
Feel free to create as many test accounts as you want, this website is not live yet...
Try v2.03:
http://mamboforge.net/frs/?group_id=543
It fixed those exact problems for everyone so far.
Very creative design you have there. Nice work. ;D
Wow, I didn't know there was a new version. I have v2.02beta...
I'll immediately try and see if the new version solves my problem, that would be heaven...
Do I need to uninstall the 2.02b bridge before installing the .03? Or does installing a component/module overwrite the existing one? If I do neet to uninstall it, does it matter in what order I do?
Thanks for the compliments about the site. I've been working on this for a long long time...
Marc
QuoteDo I need to uninstall the 2.02b bridge before installing the .03? Or does installing a component/module overwrite the existing one?
Because you already have v2.02 installed, you can just overwrite the files. It makes no difference in what order.
The instructions for the include in your Mambo template are a little different as well. Make sure you do that.
Orstio it works. You are a genius!
Your work is very much appreciated, I want you to know this!
You rock! Awesome!
PS. I see that you have added anc changed some things to make it PHP5-compliant... I am glad you could make use of my input. I will be testing this locally on my MacOSX/PHP5 installation as well and report back to you to let you know how that went... I have a feeling that with that new if statement that you added to the MOS template I won't be getting that PHP5-only error about the already defined SMF constant...
Glad to see I could at least of a little help in debugging on php5, at least I redeem myself from all the whining and complaining I did in this post ;-)
Sadly I have to report there are still a few issues with PHP5 compatibility.
One is very easy to fix and I will post it here for anybody who wants to take advantage:
After having installed it, open mod_smf_login.php and change both instances (line 16 and line 101) of:
PHP_SELFinto:
$_SERVER['PHP_SELF']That will avoid a few undefined index errors being displayed on PHP5 installations.
Apart from these easy fixes I get three more errors I am not sure how to fix properly, here they are:
Quote
<br />
<b>Notice</b>: Constant SMF already defined in <b>/Library/WebServer/Documents/content/components/com_smf/smf.php</b> on line <b>10</b><br />
<br />
<b>Notice</b>: A session had already been started - ignoring session_start() in <b>/Library/WebServer/Documents/community/Sources/Load.php</b> on line <b>1192</b><br />
<b>Notice</b>: Undefined variable: mosConfig_lang in <b>/Library/WebServer/Documents/community/Sources/Load.php(1098) : eval()'d code</b> on line <b>258</b><br />
PLEASE NOTE that the first and second errors will be at the top of your ?option=com_smf pages, while the third one you won't see but it's there. Just look at the source code of the rendered/parsed page you are looking at and you'll see it. The reason why you don't see it is because it is contained within a hidden form element tag so it's not displayed, but the whole error is sent along with the POST variables...
Anyway, important message to Orstio.
I know you are convinced that I am a crazy lunatic and that these issues are MacOSX related issues because your PHP5 beta tester did not see these errors, but it came to my mind that maybe he/she had error displaying and error handling disabled. Did you think about this?
If that is the case maybe you can ask your windows beta tester to do the following:
Quote
Comment the line: (remove the ; character at the beginning of the line)
;error_reporting = E_ALL & ~E_NOTICE
UNComment the line (add a ; character at the beginning of the line)
error_reporting = E_ALL
In my version of php.ini, these two lines were numbers 277 & 285 respectively.
This makes sure that all errors notices will be displayed.
Finally, change the line with display_errors to On: (line 292 for me)
display_errors = On
Let me know if that makes any difference... If it does you'll see it's not my Mac that is broken and neither is my brain or my eyes ;-)
Orstio you are the man!
Quote from: marcnyc on November 07, 2004, 05:28:05 PM
Sadly I have to report there are still a few issues with PHP5 compatibility.
One is very easy to fix and I will post it here for anybody who wants to take advantage:
After having installed it, open mod_smf_login.php and change both instances (line 16 and line 101) of:
PHP_SELF
into:
$_SERVER['PHP_SELF']
That will avoid a few undefined index errors being displayed on PHP5 installations.
Apart from these easy fixes I get three more errors I am not sure how to fix properly, here they are:
Quote
<br />
<b>Notice</b>: Constant SMF already defined in <b>/Library/WebServer/Documents/content/components/com_smf/smf.php</b> on line <b>10</b><br />
<br />
<b>Notice</b>: A session had already been started - ignoring session_start() in <b>/Library/WebServer/Documents/community/Sources/Load.php</b> on line <b>1192</b><br />
<b>Notice</b>: Undefined variable: mosConfig_lang in <b>/Library/WebServer/Documents/community/Sources/Load.php(1098) : eval()'d code</b> on line <b>258</b><br />
PLEASE NOTE that the first and second errors will be at the top of your ?option=com_smf pages, while the third one you won't see but it's there. Just look at the source code of the rendered/parsed page you are looking at and you'll see it. The reason why you don't see it is because it is contained within a hidden form element tag so it's not displayed, but the whole error is sent along with the POST variables...
Anyway, important message to Orstio.
I know you are convinced that I am a crazy lunatic and that these issues are MacOSX related issues because your PHP5 beta tester did not see these errors, but it came to my mind that maybe he/she had error displaying and error handling disabled. Did you think about this?
If that is the case maybe you can ask your windows beta tester to do the following:
Quote
Comment the line: (remove the ; character at the beginning of the line)
;error_reporting = E_ALL & ~E_NOTICE
UNComment the line (add a ; character at the beginning of the line)
error_reporting = E_ALL
In my version of php.ini, these two lines were numbers 277 & 285 respectively.
This makes sure that all errors notices will be displayed.
Finally, change the line with display_errors to On: (line 292 for me)
display_errors = On
Let me know if that makes any difference... If it does you'll see it's not my Mac that is broken and neither is my brain or my eyes ;-)
Orstio you are the man!
I don't think you're a lunatic, just a little confused sometimes. ;D
It could have something to do with error handling, or Apache, or PHP5, or MacOSX. There are a lot of factors that could be causing problems for you when hosting a site on your local machine, because your settings may be completely unique from the majority of servers on the web.
Your fixes for some of the "unseen" PHP5 issues are appreciated. ;D
Don't worry I was just kidding... Sometimes I do get confused, that happens when you are not a programmer and you try to figure out what is being said in a language that isn't yours (php in this case)...
I know that a local machine is unique, but I just can't imagine that it makes a difference if it is a Mac or a PC, in the end they are both running Apache, that's why in my humble non-programmer's opinion the real difference is PHP5 here and maybe your tester just didn't have error output enabled. I do, so I see ;-)
I should be your beta tester ;-) ha ha
Anyway, I am glad you appreciate my help, but please let me know if you have any ideas about where those other three erros I posted could come from... it really bugs me not to be able to test it locally ;-)
I see you are still on my production site... what are you doing there? ;-)) ha ha, stay as long as you want, smart people are always welcome in my book!
QuotemosConfig_lang in <b>/Library/WebServer/Documents/community/Sources/Load.php
I have no idea about that one. Nothing like that from Mambo should be passed to Load.php. ???
Quote<b>Notice</b>: A session had already been started - ignoring session_start() in <b>/Library/WebServer/Documents/community/Sources/Load.php</b> on line <b>1192</b><br />
I don't know if this one can be avoided without changing that file.
Quote<b>Notice</b>: Constant SMF already defined in <b>/Library/WebServer/Documents/content/components/com_smf/smf.php</b> on line <b>10</b><br />
You should be able to fix that. Change:
if (!defined('SMF')){
require ("components/com_smf/config.smf.php");
require ($smf_path."/SSI.php");
}
define('SMF', 1);
to:
if (!defined('SMF')){
require ("components/com_smf/config.smf.php");
require ($smf_path."/SSI.php");
define('SMF', 1);
}
Quote from: Orstio on November 07, 2004, 06:04:23 PM
QuotemosConfig_lang in <b>/Library/WebServer/Documents/community/Sources/Load.php
I have no idea about that one. Nothing like that from Mambo should be passed to Load.php. ???
If you look at the code, that error happens when you try to assign the value to the POST language variable in the form's hidden element tag.
Quote from: Orstio on November 07, 2004, 06:04:23 PM
Quote<b>Notice</b>: A session had already been started - ignoring session_start() in <b>/Library/WebServer/Documents/community/Sources/Load.php</b> on line <b>1192</b><br />
I don't know if this one can be avoided without changing that file.
Isn't there a way to check if the session is already started and not start it again if it is?
Quote from: Orstio on November 07, 2004, 06:04:23 PM
Quote<b>Notice</b>: Constant SMF already defined in <b>/Library/WebServer/Documents/content/components/com_smf/smf.php</b> on line <b>10</b><br />
You should be able to fix that. Change:
if (!defined('SMF')){
require ("components/com_smf/config.smf.php");
require ($smf_path."/SSI.php");
}
define('SMF', 1);
to:
if (!defined('SMF')){
require ("components/com_smf/config.smf.php");
require ($smf_path."/SSI.php");
define('SMF', 1);
}
Where would I make this change? If you are referring to the MOS template then there isn't a define('SMF',1) line at all there...
In smf.php.
Unfortunately all three errors still appear once your suggested change is performed in smf.php so if you have any other suggestions please let me know.
I am particularly curious what the result of your testing is on your php5 beta tester's machine with both the error displaying settings set to show all errors and displau them
Hi There! Thanks so much Orstio for the help the other day regarding the mysql($result) issue, I am now having difficulties getting the integrated login to work. In response to the troubles experienced as posted in the early parts of this thread, I am having trouble with the integrated login. I have applied all the extra changes as suggested in the readme file as well.
I can login fine using the module that's distributed with the MOS_SMF zip file, but if I hit logout on the module nothing happens, the link simply seems to refresh the page and I'm still logged in. If I try to logout through SMF obviously I log out of SMF but not through MOS.
I read a bit of this forum and noticed there was a newer version out, so swapped it for the other one I was using, only problem is now I'm getting the same mysql($result) error associated with the prefix being mos_instead of my chosen table prefix. I see that Orstio has put in a variable for that to try and fix that, but to no avail, unfortunately I'm getting the same error as well as when I do login and then try and logout, the same thing happens.
Any ideas?
Sorry for the beefy question.
OK, try uploading the new smf.php to your com_smf folder. In a very early version of that file for RC1, I had forgotten a line that would cause the logout issue you describe.
QuoteI read a bit of this forum and noticed there was a newer version out, so swapped it for the other one I was using, only problem is now I'm getting the same mysql($result) error associated with the prefix being mos_instead of my chosen table prefix. I see that Orstio has put in a variable for that to try and fix that, but to no avail, unfortunately I'm getting the same error as well as when I do login and then try and logout, the same thing happens.
This is pretty confusing. So, you set the variable $mos_prefix? And that put you back to the logout problem? Or do you still get the SQL error? (You've got two different things a bit mixed up.)
Sorry for the confusion, hopefully this clears things up.
QuoteSo, you set the variable $mos_prefix?
No, I thought this is what you fixed when I spoke with you earlier about the mysql_fetch_array() error. Thats less important, as I'm using the modified version from the 2.0beta release.
QuoteOK, try uploading the new smf.php to your com_smf folder. In a very early version of that file for RC1, I had forgotten a line that would cause the logout issue you describe.
Ok, I've done that and now I can login with no problems as before, and when I click logout, it works only with SMF, and I'm still logged into Mambo. Also I'm getting the following error when I log in or out:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/hatereport/components/com_smf/smf.php on line 40
QuoteQuote
So, you set the variable $mos_prefix?
No, I thought this is what you fixed when I spoke with you earlier about the mysql_fetch_array() error. Thats less important, as I'm using the modified version from the 2.0beta release.
No, you'll see in config.smf.php, that you have to set the variable $mos_prefix to whatever your Mambo table prefix happens to be. (Don't forget the underscore! ;) )
Aha! I knew it would be something silly like that I was overlooking. Cheers for that!
Okay so now login and log out is working wonderfully except that when I'm logged in it takes me to the SMF login screen. This is gonna be pretty confusing for my users, as they get a login screen after they've logged in. How can I make it so that after login the users are redirected to the main forum page?
In MOS_SMF.php, line 13, change $_SESSION['login_url'] = "http://address to go to after logging in";
This is $mosConfig_live_site by default..... you must have changed it, or you are not allowing guests to view your forum.
Ok, tried that, but no matter what I do it redirects to
http://mysite/index.php?option=com_smf&Itemid=41&?action=login;sa=check;id=1
I tested it with both my Admin and my testing user account as well as with both 2 browsers (FireFox and crappy IE). I have specifically put the address in place of $mosConfig_live_site. Am I meant to change the variable $mosConfig_live_site or do as I did?
In your SMF settings, are guests allowed to view the forum?
Yeah if you check at http://hatereport.entempore.com/forum/ they can see it, or through Mambo at http://hatereport.entempore.com/index.php?option=com_smf&Itemid=42 they are able to see the posts and everything. Is there something else in SMF permissions I'm supposed to set?
What bothers me is this: "action=login;" appearing in your query string. That should not be possible from MOS_SMF.php, unless you have changed something. It should be "action=mambo_login".
Yeah that is weird. I checked smf.php mod_smf_login.php adn MOS_SMF.php and all have "action=mambo_login" and not "action="login" except for the following in MOS_SMF.php:
redirectexit('action=login;sa=check;id=' . $ID_MEMBER);
I'm guessing this is the problem. I don't remember changing this, but how do I set it again? Do I put:
redirectexit('action=mambo_login');
Or is that wrong, sorry I'm not good at PHP at all.
Change it back to this:
redirectexit('action=mambo_login;sa=check;id=' . $ID_MEMBER);
Thanks again for your super friendly and fast support! Great job on the software!