WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums

Register | Forgot Password

smf integration
cookies, login

Version:
printPrint


smf integration
ms_ukyankee
Beginner

Usergroup: Customer
Joined: Feb 05, 2004
Location: UK
Total Topics: 3
Total Posts: 9
Posted 12/04/04 - 06:03 AM:
quote post
#1
I've finally got something usable and very easy, not how I integrated on my own site but I reworked it for the better using SMF API. And it's using smf cookies now, so no need to set both cookies, which was what I was doing at first.

Paul, I don't know if you'll want to do this, but in order to make it very easy to set up, I've added a small bit to the beginning of start.php. I tried not to have to do this, but smf users will love to be able to use smf's SSI features in the templates, and this was the only way I could get SSI to work. SSI also provides login/logout functions for smf, which are really needed in the wsn side. Users would be asking for this right away for sure.

Beginning of start.php:

require ('./integration/smfpath.inc');
if (isset($pathtosmf))
{
require_once ($pathtosmf.'SSI.php');
require_once ($pathtosmf.'smf_api.php');
}



admin/adminstart.php:

require ('../integration/smfpath.inc');
if (isset($pathtosmf))
{
require_once ($pathtosmf.'SSI.php');
require_once ($pathtosmf.'smf_api.php');
}




It needs a better way to test for smf integration from the start, hopefully you might have a better idea? Then inside smfpath.inc, is simply:


This would need edited by user. And smf_api.php put in the forum directory.

I changed class/member.php:

else if ($cookietype == 'smf')
{
global $smf_user_info, $smf_settings;
smf_authenticateUser();
$id = $smf_user_info['id'];
$userpassword = $smf_user_info['password'];
smf_loadSession();
}



integration/smfencoder.php:


and integration/smf.php:



Very easy integration, comparatively. One thing I've almost forgotten, is that the admin login page would need to be switched to smf login, which can be done easily with SSI, but if you're fine with this so far, I can sort that too within templates. I would like to do a copy of the default templates using smf ssi's for the login/logout and other SSI features.


Edited by ms_ukyankee on 12/04/04 - 06:06 AM
juliusromo
Beginner

Usergroup: Customer
Joined: Sep 13, 2005
Total Topics: 0
Total Posts: 1
Posted 09/13/05 - 07:50 AM:
quote post
#2
Hi all....

This is my first post here, and I am looking for SMF integration help.

I can see in ur post (ms_ukyankee) what I have to do in:

start.php
adminstart.php
member.php

But I dont see the smfpath.inc code, smfencoder.php or smf.php....

Coul somebody help me?
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.