Forum

Request asstiance w...
 
Notifications
Clear all

Request asstiance with Smf bridge (please)

Methen
(@methen)
Trusted Member

I am attempting to bridge efiction  with smf  2.04  however I do not fully understand just what I am suppose to edit in the queries.php file
the instructions are a little vage.

Somebody is asking for a Hinne Whooping!

Quote
Topic starter Posted : 25/10/2008 4:56 am
Kindred
(@kindred)
Active Member

please do note that smf 2.0 is very different from smf 1.1.x and it is likely that any integration designed for smf 1.1.x will not work with smf 2.0

(and current smf is smf 2.0beta4, not 2.04)

Things I note:

in 2.0.x, the database table names are all lower case.
id_member
also, the ones in mixed case, like realName are now separated by _
real_name
email_address

also, the code in SMF/Sources/QueryString.php is now


// Same goes for numeric keys.
foreach (array_merge(array_keys($_POST), array_keys($_GET), array_keys($_FILES)) as $key)
if (is_numeric($key))
die('Numeric request keys are invalid.');

// Numeric keys in cookies are less of a problem. Just unset those.
foreach ($_COOKIE as $key => $value)
if (is_numeric($key))
unset($_COOKIE[$key]);

so, in theory, this should become...


// Added for eFiction.  We do need $blocks set.
$blocks = isset($_GET['action']) && $_GET['action'] == "blocks" ? true : false;

// Same goes for numeric keys. 
foreach (array_merge(array_keys($_POST), array_keys($_GET), array_keys($_FILES)) as $key)
// added blocks check for eFiction.
if (is_numeric($key) && !$blocks)
die('Numeric request keys are invalid.');

// Numeric keys in cookies are less of a problem. Just unset those.
foreach ($_COOKIE as $key => $value)
// added blocks check for eFiction.
if (is_numeric($key) && !$blocks)
unset($_COOKIE[$key]);

I will also note that SMF has some very nice, simple integration functions built into it now, specifically for bridging to other systems...   
these allow things like linking registration and , profile updates, etc... between other systems and SMF.

I think several of the bridged functions could be better handled using SMF's SSI.php rather than doing direct database writes... 

also also, the createPost function would allow a post to be created for new eFiction submissions!

ReplyQuote
Posted : 26/10/2008 3:20 pm
Kindred
(@kindred)
Active Member

However... after some testing, even with the correct updated settings in efiction/includes/queries.php and the update the SMF's smf/Sources/QueryString.php, the login still does not work.

I log in, the system correctly triggers action=login2, but it takes me to the forum (logged in) and, when I go back to efiction, I am still not logged in.)

efiction correctly sees the memberlist from smf... but won't do the login.

I will also note the the "quick login" in efiction still tries to run eFiction/user.php?action=login instead of the smf login function.

ReplyQuote
Posted : 26/10/2008 5:06 pm
Carissa
(@carissa)
Member Moderator

Yeah, that happens sometimes. If you are clicking on a link that is www.yoursite.com but you logged into yoursite.com (without the www) the cookie won't work. Try using the back button to see if you remain logged in, then adjust whatever link you've clicked on to have a relative path so it won't matter whether the www is there or not.

ReplyQuote
Posted : 26/10/2008 5:33 pm
Kindred
(@kindred)
Active Member

Carissa,

Which one happens? 🙂
I listed two "bugs".

However, if it was the first one... I am using www.site.com/community and www.site.com/eFiction in both cases.
(I'm not listing the actual site because the efiction portion is not open until I can get this working....  but since I can't log in, I can't get to the admin to adjust anything. 🙁 )

ReplyQuote
Posted : 26/10/2008 7:46 pm
Share: