• Welcome to Simple Machines Community Forum. Please login or sign up.
October 27, 2021, 10:59:45 PM

News:

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


SMF -> Mambo Bridge 2.04b

Started by Ket, November 16, 2004, 01:16:02 PM

Previous topic - Next topic

Ket

November 16, 2004, 01:16:02 PM Last Edit: November 16, 2004, 01:52:24 PM by Ket
Ok I got the bridge to work... Well Kind Of.
A few questions...

1) When a user registers as a new account  it takes the user off the Mambo portal and opens up the SMF registration, when they complete the reg it just goes to SMF... I would like SMF to stay in the Mambo portal framework. How can I do this. I load SMF from the main menu and keep it in the framework just fine.

2)Do I have the ability to control how the module login box is displayed. If so where and how can I edit this.

3) Mambo does not seem to realize that the user has been loged in. They still show up as a guest. As a matter of fact that user is not created on the mambo side...

4) A note to the developer of the bridge, the instructions in the latest build do not make sence, it was not untill I came to the forums and learned to deactivate the Mambo login and activate the SMF Module. Before that I was trying to figure out how to edit an include or something to push the SMF bridge login...

Obviously I'm doing something wrong..
Thanks in Advance

Kindred

Ket,

1) When a user registers on my system (with the bridge), it takes them to the mambo registration. They enter name, username, email and password. After which they must respond to their activation email (from Mambo, activation on SMF is immediate).

Once they do this, they can access the login...   enter the username and password and they're in.  It does not take me to SMF, ever, in this whole registration process.

2) the module box description is in mod_smf_login.php in the mambo/modules directory. You can edit the DIV class and the background image...

3) this seems to be realted to the issue you're having with #1. They should never see SMF until they actually go to the forum. SMF has nothing to do with the foreground of the registration process, it's all background (and unseen by the user)

4) the instructions are very clear.  Read all the readme files....   I know one of them plainly states that you must unpublish the original mambo login module and publish the new smf_login module

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

Orstio

Quote1) When a user registers as a new account  it takes the user off the Mambo portal and opens up the SMF registration, when they complete the reg it just goes to SMF... I would like SMF to stay in the Mambo portal framework. How can I do this. I load SMF from the main menu and keep it in the framework just fine.

Incorrect.  The bridge DOES NOT use the Mambo registration, nor does it use the SMF registration.  It uses com_smf_registration, which is a component that is used instead of the Mambo registration.

From what you describe, you have either not installed the integrated registration, or you have installed something incorrectly.

Quote2)Do I have the ability to control how the module login box is displayed. If so where and how can I edit this.

Yes.  Just edit the form in mod_smf_login.php.

Quote3) Mambo does not seem to realize that the user has been loged in. They still show up as a guest. As a matter of fact that user is not created on the mambo side...

See my reply for point 1).

Quote4) A note to the developer of the bridge, the instructions in the latest build do not make sence, it was not untill I came to the forums and learned to deactivate the Mambo login and activate the SMF Module. Before that I was trying to figure out how to edit an include or something to push the SMF bridge login...

There is a separate readme for each and every component/module.  I certainly don't provide instructions on how to publish/unpublish modules and components, because that is provided with Mambo.

Ket

Hey guys...

Ok here is what I did I follwed the directions as best as I could figure but unless I read them wrong the set for 2.04b is a bit vague...

com_smf_rc2
- Just install, then FTP to config.smf.php, and change the value of $smf_path to whatever the path to SMF is.
Complete and working

-  Once that's done, add the component to your Mambo menu.
Done

Then
com_smf_registration_mos_4.5.1
This is the common registration component for Mambo and SMF.
Install this after you have installed the com_smf component.

- Done

In order to call this component directly, the query string must be:
?option=com_smf_registration&task=register

Then - mod_smf_loginv2.0

1)  Unzip the package.
2) Upload MOS_SMF.php to your Sources directory.
3) Go to your Mambo control panel and install the module.
4) Go to your Mambo template, and add the following code, right before the </head> tag:
<?php
global $sc, $context;

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

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

?>
5) publish the module.

All complete.

Nowhere does it say to unpublish the module, but I found that on the forum.
Obviously I am doing something wrong as the behavior is what I described.
The intergrated login seems to work fine, its the registration that does not seem to work. Obviously my error is in

In order to call this component directly, the query string must be:
?option=com_smf_registration&task=register



HUH? Where does this go? This very well could be my problem. But I have no clue where this goes.
Site is at www.etechtimes.com/dev
I also checked in Mambo
Allow User Registration:  Yes
Use New Account Activation: Yes
Require Unique Email:    Yes

Kindred

I see part of the problem.

(unless Orstio has changed something between 2.03 and 2.04...

You do not call com_smf_rc2 from your menu....
you need to call ...com_smf&Itemid=...

The registration should be taken care of by the login module (if you're not logged in, it gives you the option to register as a new user or login)

I never added the rsgitration string anywhere, I use the integrated login/registration built into the module and have no issues at all.
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."

Ket

2.04 does not have com_smf

Only com_smf_rc2

The menu item calls "hxxp:www.etechtimes.com/dev/index.php?option=com_smf&Itemid=40 [nonactive]" which seems to work.

The module with the intergrated login and register seems to work on login, but not on register.

Ket

WOOT  :) :) :) :) :) :) :) :) :)
Did I mention  :)

Ok it works the step that I was missing was to edit index.english.php which is not mentioned in the 2.04b docs (the readme files)
(unless I am blind which may be the case)

Thanks for the assistance even tough I was most likely explaining myself poorly and of course thanks for the tips on where to customize the module.

:)
Very happy ket!

Kindred

Ok, I attempted to register on your site.

When I did, it gave me the check your email message for activation.
I did.
I clicked on the activation link.

It seems to have worked properly, taking me to the mambo home page...

I got this message in the login form:
Quote
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/etecht/www.etechtimes.com/htdocs/dev/modules/mod_smf_login.php on line 5


I notice that this is the section where Orstio changed the code to allow for different prefixes in the database tables (MOS_ being the default)


What did you have to edit in index.english.php?  I didn't touch that file....

(Just installed 2.04... no problems and didn't touch the index.english.php at all....)


Orstio...

actually he is right about one thing, the 2.04 documentation does not mention publishing the login module nor does it mention unpublishing the old login module...   I think in your revving of the doc, you may have taken out those two lines. I remember them from the 2.0 and 2.01 readmes, but I don't think I ever checked the readmes after that...


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

Ket

Kindred...

Thanks for taking a look at the site. The error you saw was transient, I was adjusting the mod_smf_login.php file and I created an error that I had to correct. It seems to be ok now and functions well.

I had to change the index.english.php like this (of course its site specific)

*Original * // $txt['welcome_guest'] = 'Welcome, <b>' . $txt[28] . '</b>. Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';

*modified *$txt['welcome_guest'] = 'Welcome, <b>' . $txt[28] . '</b>. Please login or <a href="http://www.etechtimes.com/dev/index.php?option=com_smf_registration&task=register">register</a>.';

Orstio

QuoteOrstio...

actually he is right about one thing, the 2.04 documentation does not mention publishing the login module nor does it mention unpublishing the old login module...   I think in your revving of the doc, you may have taken out those two lines. I remember them from the 2.0 and 2.01 readmes, but I don't think I ever checked the readmes after that...

I can add it, it just seems rather redundant.  If you want a module to appear on the page, you have to publish it, right?

QuoteOk it works the step that I was missing was to edit index.english.php which is not mentioned in the 2.04b docs (the readme files)
(unless I am blind which may be the case)

I'll check the readme for the login module.  it should be there....but stranger things have happened.

Kindred

it's not the publishing the old one....   you might want to add the "unpublish the old one" line...   just to avoid confusion with people who are literal-instruction followers. :)

Hmmm... strange, I don't remember changing my index.english.php, but that line was changed in my file...   very strange.
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: