Hi all,
Recently, I've been playing about this snippet and realised that perhaps a few installation instructions might be handy for some people.
So, here you go - feel free to comment on anything, I'm hoping that the advice is useful to people who don't necessarily know the in's and out's of MODx and PHP:
SMF UserComments setupInstallation (if you haven't already installed SMF and the snippet)1. Download and extract SMF 1.1RC2 into a folder at the root of your website.
2. Run the SMF installer and complete all the necessary information. (The installer will try and create a database if one doesn’t exist already)
3. Download and insert the SMF_UserComments code into a new snippet.
Fixing SMF1. In your SMF install, edit lines 1782 to 1787 of Sources/load.php to be:
// Attempt to change a few PHP settings.
if (session_id() == '') {
@ini_set('session.use_cookies', true);
@ini_set('session.use_only_cookies', false);
@ini_set('url_rewriter.tags', '');
@ini_set('session.use_trans_sid', false);
@ini_set('arg_separator.output', '&');
}
2. Log into SMF and check the following setting in the admin (I found this caused a few issues with my setup):
- Configuration->Server Settings->Feature Configuration Tab->Enable local storage of cookies: Set to off.
Setting up the template1. Create a TV (name of your choice) and assign it to the template that will form the blog/repository pages.
2. Use the snippet call in the TV to add the commenting to the pages.
3. To display the forum user name instead of the logged-in user (which in most cases will be ‘anonymous’), look for the [+user+] in the default output for the snippet and change to [+forumuser+].
4. The path back to the forum login is also hardcoded, so if you have the forum install in a sub-directory or under a different folder name then this will need editing in the snippet code as well.
Hope that helps,
Garry