OK here we go...
This is a BETA mod that will allow you to log into 4images and automatically log you into the SMF forum.
The version of SMF that I am using is 1.1.5 (not sure if things are the same in other versions or not)
My site is laid out like this
root\gallery is my 4images gallery
root\forums is my smf forum
the 2 sets of files that you will need to install are from another programmer.
Not sure about the copyrights so I am just providing a link to get them
first file...http://www.simplemachines.org/download/?toolsdownload the SMF 1.1.x API file and place smf_api.php file in the root of your smf forum (mine is root\forums)
second file...http://vgb.org.ru/downloaddownload the smf_api2.zip file and unzip it into the root of your smf forum also.
This is just to get everyone started, it does work on my site but some little things have cropped up but I thought if
some better programmers looked over these changes they may have a better way or an easier way to make all this happen.
now for the modified files
(BACKUP! FIRST)on the 4images side...global.php
member.php
includes\functions.php
includes\sessions.php
on the SMF side...The main modification on the smf side is to turn off the login,registar,and forgot password buttons anywhere in the user area. the password still works for the administration side of it.
I believe I also had to uncheck the(Show a quick login on every page) in the admin settings.
(BACKUP! FIRST)sources\profiles.php
sources\themes.php
themes\default\index.template.php
themes\default\profile.template.php
themes\default\language\index.english.php
and based on whever other themes you have installed
mine would be...
themes\pinkblitz\boardindex.template.php
themes\pinkblitz\index.template.php
Now the changes...
Lets start on the 4images side...
in the
global.php file
look for
$table_prefix = "4images_";
add
after// MOD SMF integration
$SMF_user_email = "TTtt";
//END MOD SMF
in the
includes/Functions.php file
look for
function un_htmlspecialchars($text) {
$text = str_replace(
array('<', '>', '"', '&'),
array('<', '>', '"', '&'),
$text
);
return $text;
}
replace with
//MOD SMF integration
if (!function_exists('un_htmlspecialchars')) {
function un_htmlspecialchars($chars) {
//$chars = preg_replace("/(&#)([0-9]*)(;)/esiU", "chr(intval('\\2'))", $chars);
$chars = str_replace(">", ">", $chars);
$chars = str_replace("<", "<", $chars);
$chars = str_replace(""", "\"", $chars);
$chars = str_replace("&", "&", $chars);
return $chars;
}
}
//function un_htmlspecialchars($text) {
// $text = str_replace(
// array('<', '>', '"', '&'),
// array('<', '>', '"', '&'),
// $text
// );
// return $text;
//}
//END SMF
in the
includes\sessions.php file
look for
//-----------------------------------------------------
//--- End Configuration -------------------------------
//-----------------------------------------------------
add
after and look at comment in code
//MOD SMF integration
require(ROOT_PATH.'../../forums/smf_api_2.php'); //change paths to your forums directory
require(ROOT_PATH.'../../forums/smf_api.php'); //change paths to your forums directory
global $smf_settings, $smf_user_info;
//END MOD SMF
look for
$sql = "SELECT ".get_user_table_field("", "user_id").get_user_table_field(", ", "user_password")."
FROM ".USERS_TABLE."
WHERE ".get_user_table_field("", "user_name")." = '$user_name' AND ".get_user_table_field("", "user_level")." <> ".USER_AWAITING;
$row = $site_db->query_firstrow($sql);
replace with
//MOD SMF integration
$sql = "SELECT ".get_user_table_field("", "user_id").get_user_table_field(", ", "user_password").get_user_table_field(", ", "user_name").get_user_table_field(", ", "user_email")."
FROM ".USERS_TABLE."
WHERE ".get_user_table_field("", "user_name")." = '$user_name' AND ".get_user_table_field("", "user_level")." <> ".USER_AWAITING;
$row = $site_db->query_firstrow($sql);
// $sql = "SELECT ".get_user_table_field("", "user_id").get_user_table_field(", ", "user_password")."
// FROM ".USERS_TABLE."
// WHERE ".get_user_table_field("", "user_name")." = '$user_name' AND ".get_user_table_field("", "user_level")." <> ".USER_AWAITING;
// $row = $site_db->query_firstrow($sql);
$user_name = $row[2];
$user_email = $row[3];
$smf_user_password = $user_password;
//END SMF
look for
$this->start_session($user_id, 1);
add
after// MOD SMF integration
if (!smf_api_get_user($user_name,$smf_user_password)){
smf_api_register($user_name, $smf_user_password, $user_email);
}
smf_api_login(7200, $user_name, $smf_user_password, false);
// END MOD SMF
look for
$this->session_info = array();
add
after// MOD SMF integration
smf_api_logout();
smf_sessionDestroy($user_id);
//END MOD SMF
in the
member.php file
look for
if ($checkuser = $site_db->query_firstrow($sql)) {
add
after//MOD SMF integration
$smf_user_password = $checkuser[$user_table_fields['user_password']];
// END MOD SMF
look for
$sql = "UPDATE ".USERS_TABLE."
SET ".get_user_table_field("", "user_password")." = '".md5($user_password)."'
WHERE ".get_user_table_field("", "user_id")." = ".$checkuser[$user_table_fields['user_id']];
$site_db->query($sql);
add
after//MOD SMF integration
$smf_user_name = $checkuser[$user_table_fields['user_name']];
smf_api_get_user($smf_user_name,$smf_user_password);
$smf_user_info['id']=$smf_user_info['ID_MEMBER'];
$smf_user_info['username']=$smf_user_name;
$smf_user_id = $smf_user_info['ID_MEMBER'];
smf_api_update_user($smf_user_id, "", $user_password);
//END MOD SMF
look for
$sql = "UPDATE ".USERS_TABLE."
SET ".get_user_table_field("", "user_email")." = '$user_email', ".get_user_table_field("", "user_showemail")." = $user_showemail, ".get_user_table_field("", "user_allowemails")." = $user_allowemails, ".get_user_table_field("", "user_invisible")." = $user_invisible, ".get_user_table_field("", "user_homepage")." = '$user_homepage', ".get_user_table_field("", "user_icq")." = '$user_icq'".$additional_sql."
WHERE ".get_user_table_field("", "user_id")." = ".$user_info['user_id'];
$site_db->query($sql);
add
after//MOD SMF integration
$smf_user_id = $smf_user_info['ID_MEMBER'];
smf_api_update_user($smf_user_id, "", "",$user_email);
//END MOD SMF
look for
if ($action == "updatepassword") {
$txt_clickstream = $lang['control_panel'];
if ($user_info['user_level'] == GUEST) {
show_error_page($lang['no_permission']);
exit;
}
$error = 0;
add
after//MOD SMF integration
$smf_user_password = $HTTP_POST_VARS['user_password'];
//END MOD SMF
look for
if (!$error) {
$sql = "UPDATE ".USERS_TABLE."
SET ".get_user_table_field("", "user_password")." = '$user_password'
WHERE ".get_user_table_field("", "user_id")." = ".$user_info['user_id'];
$site_db->query($sql);
add
after//MOD SMF integration
$smf_user_id = $smf_user_info['ID_MEMBER'];
smf_api_update_user($smf_user_id, "", $smf_user_password);
//END MOD SMF
Now the SMF side of things...
in the
sources\profile.php file
look for
elseif ((allowedTo('profile_remove_own') && $context['user']['is_owner']) || allowedTo('profile_remove_any'))
$_REQUEST['sa'] = 'deleteAccount';
replace with
//MOD 4images integration
//elseif ((allowedTo('profile_remove_own') && $context['user']['is_owner']) || allowedTo('profile_remove_any'))
// $_REQUEST['sa'] = 'deleteAccount';
//END MOD 4images
look for
if (($context['user']['is_owner'] && allowedTo('profile_remove_own')) || allowedTo('profile_remove_any'))
$context['profile_areas']['profile_action']['areas']['deleteAccount'] = '<a href="' . $scripturl . '?action=profile;u=' . $memID . ';sa=deleteAccount">' . $txt['deleteAccount'] . '</a>';
replace with
//MOD 4images integration
//if (($context['user']['is_owner'] && allowedTo('profile_remove_own')) || allowedTo('profile_remove_any'))
// $context['profile_areas']['profile_action']['areas']['deleteAccount'] = '<a href="' . $scripturl . '?action=profile;u=' . $memID . ';sa=deleteAccount">' . $txt['deleteAccount'] . '</a>';
//END MOD 4images
look for
$profile_vars['emailAddress'] = '\'' . $_POST['emailAddress'] . '\'';
replace with
//MOD 4images integration
//$profile_vars['emailAddress'] = '\'' . $_POST['emailAddress'] . '\'';
$profile_vars['emailAddress'] = '\'' . $emailAddress . '\'';
//END MOD 4images
in the
sources/themes.php file
look for
if ($context[\'user\'][\'is_guest\'])
{
echo \'
<a href="\', $scripturl, \'?action=login">\', ($settings[\'use_image_buttons\'] ? \'<img src="\' . $settings[\'images_url\'] . \'/\' . $context[\'user\'][\'language\'] . \'/login.gif" alt="\' . $txt[34] . \'" border="0" />\' : $txt[34]), \'</a>\', $context[\'menu_separator\'], \'
<a href="\', $scripturl, \'?action=register">\', ($settings[\'use_image_buttons\'] ? \'<img src="\' . $settings[\'images_url\'] . \'/\' . $context[\'user\'][\'language\'] . \'/register.gif" alt="\' . $txt[97] . \'" border="0" />\' : $txt[97]), \'</a>\';
}
Otherwise, they might want to [logout]...
else
echo \'
<a href="\', $scripturl, \'?action=logout;sesc=\', $context[\'session_id\'], \'">\', ($settings[\'use_image_buttons\'] ? \'<img src="\' . $settings[\'images_url\'] . \'/\' . $context[\'user\'][\'language\'] . \'/logout.gif" alt="\' . $txt[108] . \'" border="0" />\' : $txt[108]), \'</a>\';
replace with
//MOD 4images integration
//if ($context[\'user\'][\'is_guest\'])
//{
// echo \'
// <a href="\', $scripturl, \'?action=login">\', ($settings[\'use_image_buttons\'] ? \'<img src="\' . $settings[\'images_url\'] . \'/\' . $context[\'user\'][\'language\'] . \'/login.gif" alt="\' . $txt[34] . \'" border="0" />\' : $txt[34]), \'</a>\', $context[\'menu_separator\'], \'
// <a href="\', $scripturl, \'?action=register">\', ($settings[\'use_image_buttons\'] ? \'<img src="\' . $settings[\'images_url\'] . \'/\' . $context[\'user\'][\'language\'] . \'/register.gif" alt="\' . $txt[97] . \'" border="0" />\' : $txt[97]), \'</a>\';
//}
//
// Otherwise, they might want to [logout]...
//else
// echo \'
// <a href="\', $scripturl, \'?action=logout;sesc=\', $context[\'session_id\'], \'">\', ($settings[\'use_image_buttons\'] ? \'<img src="\' . $settings[\'images_url\'] . \'/\' . $context[\'user\'][\'language\'] . \'/logout.gif" alt="\' . $txt[108] . \'" border="0" />\' : $txt[108]), \'</a>\';
//END MOD 4images
in the
themes/default/index.template.php file
look for
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'login' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=login">' , $txt[34] , '</a>
</td>' , $current_action == 'login' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'register' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=register">' , $txt[97] , '</a>
</td>' , $current_action == 'register' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'logout' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
</td>' , $current_action == 'logout' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
replace with
//MOD 4images integration
//if ($context['user']['is_guest'])
// echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
// <td valign="top" class="maintab_' , $current_action == 'login' ? 'active_back' : 'back' , '">
// <a href="', $scripturl, '?action=login">' , $txt[34] , '</a>
// </td>' , $current_action == 'login' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// If the user is a guest, also show [register] button.
//if ($context['user']['is_guest'])
// echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
// <td valign="top" class="maintab_' , $current_action == 'register' ? 'active_back' : 'back' , '">
// <a href="', $scripturl, '?action=register">' , $txt[97] , '</a>
// </td>' , $current_action == 'register' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
// Otherwise, they might want to [logout]...
//if ($context['user']['is_logged'])
// echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
// <td valign="top" class="maintab_' , $current_action == 'logout' ? 'active_back' : 'back' , '">
// <a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
// </td>' , $current_action == 'logout' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
//END MOD 4images
in the
themes\default\languages\index.english.php file
look for
$txt['welcome_guest'] = 'Welcome, <b>' . $txt[28] . '</b>. Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';
replace with
//MOD 4images integration
//$txt['welcome_guest'] = 'Welcome, <b>' . $txt[28] . '</b>. Please <a href="' . $scripturl . '?action=login">login</a> or <a href="' . $scripturl . '?action=register">register</a>.';
$txt['welcome_guest'] = 'Welcome, <b>' . $txt[28] . '</b>.';
//END MOD 4images
in the
themes/default/profile.template.php file
look for
echo '
<tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr><tr>
<td width="40%"><b', (isset($context['modify_error']['bad_email']) || isset($context['modify_error']['no_email']) || isset($context['modify_error']['email_taken']) ? ' style="color: red;"' : ''), '>', $txt[69], ': </b><div class="smalltext">', $txt[679], '</div></td>
<td><input type="text" name="emailAddress" size="30" value="', $context['member']['email'], '" /></td>
</tr>';
replace with
//MOD 4images integration
// echo '
<!-- <tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr><tr>
<td width="40%"><b', (isset($context['modify_error']['bad_email']) || isset($context['modify_error']['no_email']) || isset($context['modify_error']['email_taken']) ? ' style="color: red;"' : ''), '>', $txt[69], ': </b><div class="smalltext">', $txt[679], '</div></td>
<td><input type="text" name="emailAddress" size="30" value="', $context['member']['email'], '" /></td>
</tr>';
-->
echo '
<tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr><tr>
<td width="40%"><b', (isset($context['modify_error']['bad_email']) || isset($context['modify_error']['no_email']) || isset($context['modify_error']['email_taken']) ? ' style="color: red;"' : ''), '>', $txt[69], ': </b><div class="smalltext"></div></td>
<td> '.$context['member']['email']. '</td>
</tr>';
//END MOD 4images
look for
echo '
<tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr><tr>
<td width="40%"><b', (isset($context['modify_error']['bad_new_password']) ? ' style="color: red;"' : ''), '>', $txt[81], ': </b><div class="smalltext">', $txt[596], '</div></td>
<td><input type="password" name="passwrd1" size="20" /></td>
</tr><tr>
<td width="40%"><b>', $txt[82], ': </b></td>
<td><input type="password" name="passwrd2" size="20" /></td>
</tr>';
// This section allows the user to enter secret question/answer so they can reset a forgotten password.
echo '
<tr>
<td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
</tr><tr>
<td width="40%"><b>', $txt['pswd1'], ':</b><div class="smalltext">', $txt['secret_desc'], '</div></td>
<td><input type="text" name="secretQuestion" size="50" value="', $context['member']['secret_question'], '" /></td>
</tr><tr>
<td width="40%"><b>', $txt['pswd2'], ':</b><div class="smalltext">', $txt['secret_desc2'], '</div></td>
<td><input type="text" name="secretAnswer" size="20" /><span class="smalltext" style="margin-left: 4ex;"><a href="', $scripturl, '?action=helpadmin;help=secret_why_blank" onclick="return reqWin(this.href);">', $txt['secret_why_blank'], '</a></span></td>
</tr>';
replace with
//MOD 4images integration
//echo '
// <tr>
// <td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
// </tr><tr>
// <td width="40%"><b', (isset($context['modify_error']['bad_new_password']) ? ' style="color: red;"' : ''), '>', $txt[81], ': </b><div class="smalltext">', $txt[596], '</div></td>
// <td><input type="password" name="passwrd1" size="20" /></td>
// </tr><tr>
// <td width="40%"><b>', $txt[82], ': </b></td>
// <td><input type="password" name="passwrd2" size="20" /></td>
// </tr>';
// This section allows the user to enter secret question/answer so they can reset a forgotten password.
//echo '
// <tr>
// <td colspan="2"><hr width="100%" size="1" class="hrcolor" /></td>
// </tr><tr>
// <td width="40%"><b>', $txt['pswd1'], ':</b><div class="smalltext">', $txt['secret_desc'], '</div></td>
// <td><input type="text" name="secretQuestion" size="50" value="', $context['member']['secret_question'], '" /></td>
// </tr><tr>
// <td width="40%"><b>', $txt['pswd2'], ':</b><div class="smalltext">', $txt['secret_desc2'], '</div></td>
// <td><input type="text" name="secretAnswer" size="20" /><span class="smalltext" style="margin-left: 4ex;"><a href="', $scripturl, '?action=helpadmin;help=secret_why_blank" onclick="return reqWin(this.href);">', $txt['secret_why_blank'], '</a></span></td>
// </tr>';
//END MOD 4images
The following changes are in any theme that your end users get to choose.
Mainly you are taking away any logins, registration, or forgot password stuff
Not sure if it is in the same location in each theme but these are the changes I did to mine
in the
themes/pinkblitz/boardindex.template.php file
look for
// Show the login bar. (it's only true if they are logged out anyway.)
if ($context['show_login_bar'])
{
echo '
<tr>
<td class="titlebg" colspan="2">', $txt[34], ' <a href="', $scripturl, '?action=reminder" class="smalltext">(' . $txt[315] . ')</a></td>
</tr>
<tr>
<td class="windowbg" width="20" align="center">
<a href="', $scripturl, '?action=login"><img src="', $settings['images_url'], '/icons/login.gif" alt="', $txt[34], '" /></a>
</td>
<td class="windowbg2" valign="middle">
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<table border="0" cellpadding="2" cellspacing="0" align="center" width="100%"><tr>
<td valign="middle" align="left">
<label for="user"><b>', $txt[35], ':</b><br />
<input type="text" name="user" id="user" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="passwrd"><b>', $txt[36], ':</b><br />
<input type="password" name="passwrd" id="passwrd" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="cookielength"><b>', $txt[497], ':</b><br />
<input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
</td>
<td valign="middle" align="left">
<label for="cookieneverexp"><b>', $txt[508], ':</b><br />
<input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>
</td>
<td valign="middle" align="left">
<input type="submit" value="', $txt[34], '" />
</td>
</tr></table>
</form>
</td>
</tr>';
}
replace with
//MOD 4images integration
// Show the login bar. (it's only true if they are logged out anyway.)
//if ($context['show_login_bar'])
//{
// echo '
// <tr>
// <td class="titlebg" colspan="2">', $txt[34], ' <a href="', $scripturl, '?action=reminder" class="smalltext">(' . $txt[315] . ')</a></td>
// </tr>
// <tr>
// <td class="windowbg" width="20" align="center">
// <a href="', $scripturl, '?action=login"><img src="', $settings['images_url'], '/icons/login.gif" alt="', $txt[34], '" /></a>
// </td>
// <td class="windowbg2" valign="middle">
// <form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
// <table border="0" cellpadding="2" cellspacing="0" align="center" width="100%"><tr>
// <td valign="middle" align="left">
// <label for="user"><b>', $txt[35], ':</b><br />
// <input type="text" name="user" id="user" size="15" /></label>
// </td>
// <td valign="middle" align="left">
// <label for="passwrd"><b>', $txt[36], ':</b><br />
// <input type="password" name="passwrd" id="passwrd" size="15" /></label>
// </td>
// <td valign="middle" align="left">
// <label for="cookielength"><b>', $txt[497], ':</b><br />
// <input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
// </td>
// <td valign="middle" align="left">
// <label for="cookieneverexp"><b>', $txt[508], ':</b><br />
// <input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>
// </td>
// <td valign="middle" align="left">
// <input type="submit" value="', $txt[34], '" />
// </td>
// </tr></table>
// </form>
// </td>
// </tr>';
//}
//END MOD 4images
in the
themes/pinkblitz/index.template.php file
look for
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" />
<input type="password" name="passwrd" size="10" />
<input type="submit" value="', $txt[34], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form>', $context['current_time'],'<br />';
replace with
//MOD 4images integration
<!--
<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" style="margin: 4px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<input type="text" name="user" size="10" />
<input type="password" name="passwrd" size="10" />
<input type="submit" value="', $txt[34], '" />
<input type="hidden" name="hash_passwrd" value="" />
</form> --><br />', $context['current_time'],'<br />';
//END MOD 4images
look for
// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li', $current_action == 'login' ? ' id="chosen"' : '', '><a href="', $scripturl, '?action=login"><span>' , $txt[34] , '</span></a></li>';
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li', $current_action == 'register' ? ' id="chosen"' : '', '><a href="', $scripturl, '?action=register"><span>' , $txt[97] , '</span></a></li>';
// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li', $current_action == 'logout' ? ' id="chosen"' : '', '><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><span>' , $txt[108] , '</span></a></li>';
replace with
//MOD 4images integration
// If the user is a guest, show [login] button.
// 4images hack
//if ($context['user']['is_guest'])
//echo '<li', $current_action == 'login' ? ' id="chosen"' : '', '><a href="', $scripturl, '?action=login"><span>' , $txt[34] , '</span></a></li>';
// If the user is a guest, also show [register] button.
//4images hack
//if ($context['user']['is_guest'])
//echo '<li', $current_action == 'register' ? ' id="chosen"' : '', '><a href="', $scripturl, '?action=register"><span>' , $txt[97] , '</span></a></li>';
// Otherwise, they might want to [logout]...
//4images hack
//if ($context['user']['is_logged'])
//echo '<li', $current_action == 'logout' ? ' id="chosen"' : '', '><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><span>' , $txt[108] , '</span></a></li>';
//END MOD 4images
This is posted as a BETA to see how it works for everyone else...
How to get your smf forums to show up inside of 4images?
I used this mod and it worked for my site
http://www.4homepages.de/forum/index.php?topic=19843.0Curious how it works, and any problems that anyone runs into.
PLEASE only use this on a test site and do not run it on your main site until you are comfortable that it is working the way you like it to.
the one thing is if you delete someone on the 4images side they do not get deleted on the forum side but I just log into the forum and delete them myself right now until I can find a fix.
I posted this because SMF comes up allot over the years on the board and I would like to see it move forward...
Buddy Duke