Installing SMF Connector by accinent


									Installing the SMF Connector
How to install and setup the Simple Machines forum connector for MODx

In this tutorial we will show you how you can install and configure the SMF connector
module to work with an existing SMF installation.

Disclaimer: This connector is provided as is. Feel free to modify and enhance it in
anyway you feel. Also remember to share your experiences, fixes and suggestions at - The MODx community

1. Download and unzip the file to a folder on harddrive.

2. After downloading the file you need to upload/ftp the unzipped files and folder into
the root of your website. Note make sure you’re uploading the install and assets
folders. The “readme.doc” file should not be uploaded.

3. Open your browser and point it to, where is the name of your website.

The following installation screen should appear inside your browser.

4. Follow the on screen instructions to complete the installation

Once the installation is complete we now need to setup a few settings in order to
make the module work.

To do this click on the Manage module menu option.
Select the SMF connector from the list of installed modules by clicking on the name
of the module. You can also do this by clicking on the module’s icon.

From the Create/Edit module screen, click on the Configuration tab

Scroll down to “Module configuration” and enter full path to where your SMF files are
installed. This path is the physical path to the SMF files and folder (e.g.

Next, enter the user id and password for the SMF admin account. This user id and
password will be use to log into the SMF Administration center when you run the
Now save your changes by clicking on the “Save” button located at the top of the

Running the module

Now that we have successfully installed and configure our SMF module it now time to
run it.

From the Manage module screen click on the SMF icon and select the “Run module”
option from the context menu.

The module should load the as shown below:

From this screen you can export/import users and administer your SMF forums.

Note: To be able to login directly from the manager to the SMF Administration
Center without having to enter a password you must disable the administration
security feature. See your SMF documentation for further information.
That’s it! Enjoy!

Web page integration

If you would like to further integrate your SMF forum into your web you can modify
the following files to redirect request from the forum to the appropriate webpage.

Note: Some PHP coding experience is required. It’s also good practice to backup
your files

Go to the Sources folder of your SMF installtion and edit the following files:

For Login/Out requests edit the “LogInOut.php” file and comment out the “Login”
function then add the the following:

global $MODx_LoginURL;
global $MODx_LogOutURL;

$MODx_LoginURL = "../index.php?id=1";
$MODx_LogOutURL = "../index.php?id=1";

// MODx: redirect to MODx login page
function Login()
       global $MODx_LoginURL;
       header("Location: ".$MODx_LoginURL);

Now look for the Logout function comment it out and then add the following:

// MODx: redirect to MODx logoutpage
function Logout()
       global $MODx_LogOutURL;
       header("Location: ".$MODx_LogOutURL);

Note: You should modify the $MODx_LoginURL variable to point to the web page
where your login snippet is located. The $MODx_LogOutURL variable should point to
a URL that the user can use to logout.

For the “Register” requests you can edit the “Register.php” file and comment out the
Register function and then add the following:

global $MODx_RegisterURL;

// MODx: redirect to MODx registration page
function Register()
       global $MODx_RegisterURL;
       header("Location: ".$MODx_RegisterURL);

Modify the $MODx_RegisterURL to point to a URL that the user can use to signup for
a new account.

To remove the login at the top of the page you need to edit the appropriate
index.template.php theme for the selected theme.

For the default theme edit:


Go to line 211 and replace the echo statement with:

echo $txt['welcome_guest'], '<br />', $context['current_time'], '<br />';

To top