Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: 1ondon on February 28, 2008, 09:09:35 AM

Title: Integrating SMF registration info with rest of site
Post by: 1ondon on February 28, 2008, 09:09:35 AM
Hi folks.

I have a website with SMF forum.
My website is a member site, users having to register for certain viewing (page access) priviledges. Is there a tutorial on how to integrate the registration and page access rights with the smf  (registration) database?
Basically, I want to avoid members having to register twice and/or having them register with different details.

Thanks for any help.

Lon
Title: Re: Integrating SMF registration info with rest of site
Post by: greyknight17 on February 28, 2008, 12:40:55 PM
Hi Lon, take a look at SSI (http://www.simplemachines.org/community/index.php?topic=14906.0). Search for ssi_login in the Basics area...
Title: Re: Integrating SMF registration info with rest of site
Post by: 1ondon on February 29, 2008, 07:53:04 AM
Thanks for your suggestion. It looks a little tricky but I'll report back on how I get on.

Lon
Title: Re: Integrating SMF registration info with rest of site
Post by: Sarge on March 01, 2008, 07:00:21 AM
Let us know how it goes, when you can. :)
Title: Re: Integrating SMF registration info with rest of site
Post by: spottedhog on March 01, 2008, 08:04:37 AM
Try something like this:

require_once('pathto/SSI.php');
global $context;

if($context['user']['is_logged])
{

// page contents here

} else {
echo 'Only logged in registered members can see this page.';
}


Replace pathto with the actual path to your SSI.php file.
Title: Re: Integrating SMF registration info with rest of site
Post by: metallica48423 on March 03, 2008, 01:58:43 AM
i've moved this to SMF coding discussion -- but please let us know how it goes.

This board should also contain some information on SSI and the like.

Best of luck :)