News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Site Home Page/SMF Login Integration?

Started by SmartRoss, April 20, 2008, 06:31:16 AM

Previous topic - Next topic

SmartRoss

I am building a site around the SMF Forum System and I hope to be able to create a login prompt on the site home page that logs into the forum and displays the index.php page. What PHP code would I need to add to the home page do this?

By home page I mean the home page of my website; not the home page of the forum system (index.php).

Oldiesmann

Right after the opening PHP tag, add this:

include_once('/path/to/smf/SSI.php');

Replace "/path/to/smf" with the actual path to your SMF installation.

Then, wherever you want the login box to appear:

ssi_login();
Michael Eshom
Christian Metal Fans

SmartRoss


Jumpmasterrt

So if I wanted to remove or override another PHP scripted program's login to accept the SMF login I would do the same thing at that page's index/login screen?

Spaceman-Spiff

Yes, you can do that, but for a better integration, perhaps you should create a Bridge script instead.

You can check out the SMF API: http://www.simplemachines.org/download/?tools

jmrallen

A somewhat related question: I have integrated my forum login on my non-forum homepage using SSI. However, the login section that appears is somewhat ugly. I would prefer to use the better-looking login/register interface and buttons that's shown inside the forum itself. Is there an SSI reference I can use to include that better-looking interface instead, or are there alterations that I can make to the SSI code that would let me "re-create" that look?

Work-in-progress page is here: http://76.12.227.132/testradical.php [nofollow].

You can see that I'm trying to create a login section on the top left. However, I'd like it to look like the forum login/registration interface shown here in the top left: http://76.12.227.132/forums/ [nofollow]

Advertisement: