Tips/Guidance using...
 
Notifications
Clear all

Tips/Guidance using the included SMF bridge

4 Posts
3 Users
0 Reactions
3,796 Views
(@chelle)
Posts: 122
Estimable Member
Topic starter
 

[Admins/Mods, please feel free to move this to where it will be most useful  πŸ˜€ ]

The bridge was made with simplest conditions assumed: fresh efic install, fresh SMF install and the tables for each are in the SAME database

So far, this is the scenarios that have been tested [via my own installations]:

New Efic with an existing SMF [converted from a Nuke integrated phpbb forum to SMF]
Upgraded Efic with an existing SMF

After implementing the bridge, if your SMF install is existing, you will have to edit your SMF UID to be 1 if it is not.  Otherwise you will lose Admin rights to your Efiction install. In the case of my SMF forum converted from a NUKE phpbb, the god account created right after installation was 2 not 1 and remained as such when converted over to SMF.

Changing your SMF UID:

Access phpMyAdmin
Access your database that has both the SMF and Efiction tables installed
Browse the smf_members table
Make note of your current ID number, you will need this to reclaim your posts under the new id number you're about to assign
Edit your ID_Number so that it is now 1. 

Doing this causes any previous post made by you in your forum to revert to guest.  To reclaim your posts, you will need to run some mySQL statements to reassociate things to your 'new' member id

Reclaim your posts:

Access phpMyAdmin
Access the database
Click on SQL [should be a link at the top]

Paste in the statements Oldiesman from the SMF support Community has put together that you want to run.  Remember to change the prefix to the one that your SMF install uses. You can run all of them if you choose.  In these statements, newmemberid will be 1,  oldmemberid will be what it changed from.  newusername- this hasn't changed, so it will be the username you've been using.  newemailaddress should be the email address on your 'old' profile.

Link to thread at the SMF forum

Here are some useful queries for you. I've seperated each one so you can choose which one(s) you need more easily...

Associate attachments:

UPDATE smf_attachments SET ID_MEMBER = 'newmemberid' WHERE ID_MEMBER = 'oldmemberid';

Associate calendar events:

UPDATE smf_calendar SET ID_MEMBER = 'newmemberid' WHERE ID_MEMBER = 'oldmemberid';

Associate IMs (received and sent):

UPDATE smf_personal_messages SET ID_MEMBER_FROM = 'newmemberid' WHERE ID_MEMBER_FROM = 'oldmemberid';
UPDATE smf_pm_recipients SET ID_MEMBER = 'newmemberid' WHERE ID_MEMBER = 'oldmemberid';

Associate posts (first one associates the posts, second one changes the "modified by" username for every post they modified under the old account):

UPDATE smf_messages SET ID_MEMBER = 'newmemberid', posterName = 'newusername', posterEmail = 'newemailaddress' WHERE ID_MEMBER = 'oldmemberid';
UPDATE smf_messages SET modifiedName = 'newusername' WHERE modifiedName = 'oldusername';

Associate polls:

UPDATE smf_log_polls SET ID_MEMBER = 'newmemberid' WHERE ID_MEMBER = 'oldmemberid';
UPDATE smf_polls SET ID_MEMBER = 'newmemberid' WHERE ID_MEMBER = 'oldmemberid';
UPDATE smf_polls SET posterName = 'newusername' WHERE posterName = 'oldusername';

Associate topics:

UPDATE smf_topics SET ID_MEMBER_STARTED = 'newmemberid' WHERE ID_MEMBER_STARTED = 'oldmemberid';
UPDATE smf_topics SET ID_MEMBER_UPDATED = 'newmemberid' WHERE ID_MEMBER_UPDATED = 'oldmemberid';

You can change their post count, karma info and registration date from the profile. You would be wise to do a "recount statistics and totals" after this as well, just to make sure everything gets updated properly. You may get a "duplicate entry for key 1" when you attempt to update the polls log - this just means that the member has already voted in one or more polls under the new account that they previously voted in under the old account.

When you run the post association statement, you may get the message of 0 rows being affected, this is because you didn't change your username, just the ID associated with it.

Once you have restored your Admin rights, you can now access the Members link in your Efic and give Admin status to the members you choose.  The Bridge now uses your SMF members table for members and creates a singular login that works with both scripts. 

ERRORS:

If you have logging on in your settings, you may run across a mySQL statement error when you try editing a story/chapter.

will amend as needed


 
Posted : 29/12/2006 9:06 am
(@becca)
Posts: 553
Honorable Member
 

It should be alright in the meantime, since there is no 3.0 Modding forums.


 
Posted : 29/12/2006 11:59 am
(@chelle)
Posts: 122
Estimable Member
Topic starter
 

Ok, first post updated with some things that has proved useful.  I hope others will find it to be too


 
Posted : 29/12/2006 2:33 pm
(@tammy)
Posts: 2577
Member Moderator
 

Since it's a new eFiction install, it would have probably been easier to do it the other way around.  Edit the fanfiction_authorprefs entry for uid 1 and make the uid the SMF id.  You'll then have admin privileges in eFiction.


 
Posted : 29/12/2006 4:23 pm
Share: