SMF bridging steps
 
Notifications
Clear all

SMF bridging steps

2 Posts
2 Users
0 Reactions
2,092 Views
(@ibeta)
Posts: 13
Active Member
Topic starter
 

at the following steps

Edit queries.php to point to your SMF tables and directory.

Goto Admin->Page Links and edit your Register and Lost Password links to point to your
SMF pages.

What do I need to edit in queries ?

<?php

// The table prefix for SMF
$db_prefix = "smf_";

// The RELATIVE path to your SMF install from your eFiction install. 
// The example given is an SMF and eFiction install as sibling folders.
define("PATHTOSMF", "../smf/");

$db_connection = $dbconnect;

// Default query strings used throughout the script.  You may need to alter these to bridge to other scripts or databases.

define ("_UIDFIELD", "author.ID_MEMBER");  // Do not change the aliasing (the "author." part)!
define ("_PENNAMEFIELD", "author.realName");  // Do not change the aliasing (the "author." part)!
define ("_EMAILFIELD", "author.emailAddress");  // Do not change the aliasing (the "author." part)!
define ("_PASSWORDFIELD", "author.passwd"); //  Do not change the aliasing (the "author." part)!
define ("_AUTHORTABLE", $db_prefix."members as author"); // Do not change the aliasing (the "as author" part)!

define ("_STORYQUERY",  "SELECT stories.*, "._PENNAMEFIELD." as penname, UNIX_TIMESTAMP(stories.date) as date, UNIX_TIMESTAMP(stories.updated) as updated FROM ("._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_stories as stories) WHERE "._UIDFIELD." = stories.uid AND stories.validated > 0 ");
define ("_STORYCOUNT", "SELECT count(sid) FROM ".TABLEPREFIX."fanfiction_stories as stories WHERE validated > 0");
define ("_SERIESQUERY", "SELECT series.*, "._PENNAMEFIELD." as penname FROM "._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_series as series WHERE "._UIDFIELD." = series.uid ");
define ("_SERIESCOUNT", "SELECT COUNT(seriesid) FROM ".TABLEPREFIX."fanfiction_series as series ");
define ("_MEMBERLIST", "SELECT count( stories.sid ) as stories, "._PENNAMEFIELD." as penname, "._UIDFIELD." as uid FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs AS ap ON "._UIDFIELD." = ap.uid LEFT JOIN ".TABLEPREFIX."fanfiction_stories AS stories ON stories.validated > 0 AND (FIND_IN_SET("._UIDFIELD.", stories.coauthors) > 0 OR stories.uid = "._UIDFIELD.") ");
define ("_MEMBERCOUNT", "SELECT COUNT(DISTINCT "._UIDFIELD.") FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_stories as stories ON stories.validated > 0 AND (FIND_IN_SET("._UIDFIELD.", stories.coauthors) > 0 OR stories.uid = "._UIDFIELD.")  LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs as ap ON "._UIDFIELD." = ap.uid");
?>

For this Goto Admin->Page Links and edit your Register and Lost Password links to point to your
SMF pages.

I cant access my panel , i get error


Warning: require_once(../smf/SSI.php) [function.require-once]: failed to open stream: No such file or directory in /home/xxxx/public_html/includes/get_session_vars.php on line 23

Fatal error: require_once() [function.require]: Failed opening required '../smf/SSI.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxx/public_html/includes/get_session_vars.php on line 23


 
Posted : 01/07/2011 9:21 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

For the queries.php, you need to edit the file to make sure you have the right prefix and path to SMF defined. From what I can tell (not having done this myself) you probably shouldn't need to edit the rest, so long as there haven't been too many changes to eFic & SMF since the bridge was written.

Have you edited includes/get_session_vars.php? I notice that line 23 of the 3.5.3 version is merely the end of the license agreement. The error certain looks bridge-related, but I'm not familiar with it so I'm not sure why it's happening. Maybe fixing the first part will fix the second part.


 
Posted : 03/07/2011 6:48 pm
Share: