jabari
10-24-2006, 09:08 PM
Change Log:
January 15, 2007 - Changed the download link.
October 24 - Reposted these mod instructions since the original instructions were lost during this website's move to a new server.
-----------------------------
I hacked together a working SMF 1.1 RC1 and RC2 authentication mod for phpRaid 3.0.7. I am a programmer but not a PHP programmer so fully test this mod out and backup your data before even thinking of using it for a production website. I used the working auth_smf.php file from phpRaid 2.9.5 and also the auth_phpbb.php file in phpRaid for the basis of my auth_smf.php file for phpRaid 3.0.6. I tried to make the SMF authentication work exactly like the phpBB authentication. However I made the following change from the official phpRaid distribution:
1. If I understand the programming correctly when a phpBB user logs into phpRaid, phpRaid checks to see if an existing phpRaid user profile that has the same email address as the phpBB user already exists. If it does then the user is logged into phpRaid. If a profile doesn't already exist then a phpRaid user profile is created for the user before being logged into phpRaid. My problem was that email addresses were not unique among my SMF users because I manually create my SMF users via a bridge with Joomla CMS and their email address is optional in my install of Joomla so I usually put in a bogus email of "changeme@nowhere.com" for their email address. So since phpRaid uses the email address to uniquely identify phpBB users I had to change it so that phpRaid looks for some other unique identifier for my SMF users. So I decided to use the user ID number of my SMF users for the unique identifier since phpRaid uses that number for the profile ID numbers anyway so I figured that was a good alternate choice for a unique identifier.
As with the phpRaid 2.9.5 version of SMF authentication, the SMF "SSI.php" needs to and be in the root of your SMF installation directory. I have tested this mod with SMF 1.1 RC1 and RC2. Here are the phpRaid fresh install instructions for this mod:
Fresh Installation:
1. Extract the phpRaid 3.0.6 install files to your web server.
2. Ensure SSI.php is present in the root of your SMF directory.
3. Overwrite the install/install.php file with the attached SMF modified version in the file auth_smf_phpRaid306.zip.
4. Place the file auth_smf.php (also located in auth_smf_phpRaid306.zip) into the auth/ subdirectory in your phpRaid installation directory.
5. Install phpRaid 3.0.6 and choose the SMF authentication choice.
6. Log into SMF with the admin user you specified in the installation script and then go to phpRaid. Finish the normal phpRaid configuration in the configuration screen of phpRaid.
7. Apply the upgrade files for phpRaid 3.0.7.
What Doesn't Work
- The phpRaid username/password fields do not work. If you type in your username and password into these boxes you will just get an error. You need to first log into SMF and then go to phpRaid. You can edit the phpRaid template to omit the username/password field so that it does not confuse your users.
SMF Versions Confirmed Working with this Mod
- 1.0.7
- 1.1 RC1
- 1.1 RC2
Mod Files
Download Link (http://www.thetaintedguild.com/index.php?option=com_docman&task=doc_details&gid=4&Itemid=134)
- auth_smf.php
- install.php
January 15, 2007 - Changed the download link.
October 24 - Reposted these mod instructions since the original instructions were lost during this website's move to a new server.
-----------------------------
I hacked together a working SMF 1.1 RC1 and RC2 authentication mod for phpRaid 3.0.7. I am a programmer but not a PHP programmer so fully test this mod out and backup your data before even thinking of using it for a production website. I used the working auth_smf.php file from phpRaid 2.9.5 and also the auth_phpbb.php file in phpRaid for the basis of my auth_smf.php file for phpRaid 3.0.6. I tried to make the SMF authentication work exactly like the phpBB authentication. However I made the following change from the official phpRaid distribution:
1. If I understand the programming correctly when a phpBB user logs into phpRaid, phpRaid checks to see if an existing phpRaid user profile that has the same email address as the phpBB user already exists. If it does then the user is logged into phpRaid. If a profile doesn't already exist then a phpRaid user profile is created for the user before being logged into phpRaid. My problem was that email addresses were not unique among my SMF users because I manually create my SMF users via a bridge with Joomla CMS and their email address is optional in my install of Joomla so I usually put in a bogus email of "changeme@nowhere.com" for their email address. So since phpRaid uses the email address to uniquely identify phpBB users I had to change it so that phpRaid looks for some other unique identifier for my SMF users. So I decided to use the user ID number of my SMF users for the unique identifier since phpRaid uses that number for the profile ID numbers anyway so I figured that was a good alternate choice for a unique identifier.
As with the phpRaid 2.9.5 version of SMF authentication, the SMF "SSI.php" needs to and be in the root of your SMF installation directory. I have tested this mod with SMF 1.1 RC1 and RC2. Here are the phpRaid fresh install instructions for this mod:
Fresh Installation:
1. Extract the phpRaid 3.0.6 install files to your web server.
2. Ensure SSI.php is present in the root of your SMF directory.
3. Overwrite the install/install.php file with the attached SMF modified version in the file auth_smf_phpRaid306.zip.
4. Place the file auth_smf.php (also located in auth_smf_phpRaid306.zip) into the auth/ subdirectory in your phpRaid installation directory.
5. Install phpRaid 3.0.6 and choose the SMF authentication choice.
6. Log into SMF with the admin user you specified in the installation script and then go to phpRaid. Finish the normal phpRaid configuration in the configuration screen of phpRaid.
7. Apply the upgrade files for phpRaid 3.0.7.
What Doesn't Work
- The phpRaid username/password fields do not work. If you type in your username and password into these boxes you will just get an error. You need to first log into SMF and then go to phpRaid. You can edit the phpRaid template to omit the username/password field so that it does not confuse your users.
SMF Versions Confirmed Working with this Mod
- 1.0.7
- 1.1 RC1
- 1.1 RC2
Mod Files
Download Link (http://www.thetaintedguild.com/index.php?option=com_docman&task=doc_details&gid=4&Itemid=134)
- auth_smf.php
- install.php