This MOD will change the style of the login screen on phpBB 2.0.X to the style on Olympus (phpBB 3.0)
For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered in our MOD-Database, located at: http://www.phpbb.com/mods/
Originaly planned to be a clone of the login screen featured in olympus, it has now become more featured than the olympus login screen.
- Initial Release :)
- Changed 'Return to Forum' to 'Board Index' - Fixed the style of the login box - Released a ForcedLogin_Explained Add-on
- Added Resend Activation MOD into it - Added ForcedLogin_Explained Compatiblity (No Add-On Needed)
- Added 'Hide my online status this session - Re-styled the box's - Added Switch for the Admin Re-Auth
- Added Error Handling for Pass/User/Inactive - Added the 'Sucessfull Login' message from olympus - Added Different message on left for re-authing - Changed 'New User Registration' to 'Create an Account' - Re-Wrote the lang files to be neat and tidy - Added a comment copyright to the template - Double-checked that it works ok with easymod (Passed)
- Fixed some coding errors and re-submitted to MODDB
- Added a Redirect for the 'Logged In' Message
- Fixed 'Hide my online status this session' bug - Resend Activation now checks to see if activation is set to ADMIN
- Changed '2' to USER_ACTIVATION_ADMIN in the account activation mode checks - Fixed a template error where tabindex was '4' on autologin and '5' on hide-my-online-status
Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
Find
$lang['Forgotten_password'] = 'I forgot my password';
After, Add
// [+] 'Olympus Style' Login Screen $lang['olympus_login_BoardIndex'] = 'Board Index'; $lang['olympus_login_CreateAccount'] = 'Create an Account'; $lang['olympus_login_ViewFAQ'] = 'View FAQ'; $lang['olympus_login_Resend_Activation'] = 'Resend Activation'; $lang['olympus_login_HideOnlineSession'] = 'Hide my online status this session'; $lang['olympus_login_NewActivationSent'] = 'A new activation key has been sent; please check your e-mail for details on how to activate it.'; $lang['olympus_login_NoAccount'] = 'It appears that this account does not exist'; $lang['olympus_login_WrongPassword'] = 'It appears that you have entered an incorrect password'; $lang['olympus_login_InactiveAccount'] = 'It appears that this account is inactive'; $lang['olympus_login_LoggedIn'] = 'You have successfully logged in'; $lang['olympus_login_ActivateAccountMsg'] = 'Click %shere%s to send a new activation code'; $lang['olympus_login_RegisterAccountMsg'] = 'Click %shere%s to register this account'; $lang['olympus_login_SendPasswordMsg'] = 'Click %shere%s to send a new password'; $lang['olympus_login_LoginInfo'] = 'In order to login you must be registered.<br />Registering takes only a few seconds but gives you increased<br />capabilies. The board administrator may also grant additional<br />permissions to registered users. Before you login please ensure you<br />are familiar with our terms of use and related policies. Please<br />ensure you read any forum rules as you navigate around the board.'; $lang['olympus_login_AdminInfo'] = 'To login to the administration panel you must re-authenticate yourself to verify you are really the administrator of the board<br /><br />Once logged in you will be able to access the ACP until your session ends'; $lang['olympus_login_Click_return'] = 'Click %sHere%s to return to the where you were previously'; $lang['olympus_login_No_send_account_active'] = 'An error has occured and we cannot continue, Please contact your administrator'; $lang['oly_adminactivation'] = 'Sorry but this board currently has ADMIN only activation enabled, Your account can only be activated by an administrator'; // [-] 'Olympus Style' Login Screen
Find
$autologin = ( isset($HTTP_POST_VARS['autologin']) ) ? TRUE : 0;
After, Add
// [+] 'Olympus Style' Login Screen $hideonlinestatus = ( isset($HTTP_POST_VARS['hideonline']) ) ? 0 : 1; // [-] 'Olympus Style' Login Screen
Find
if( $session_id )
Before, Add
// [+] 'Olympus Style' Login Screen
$sql = "UPDATE " . USERS_TABLE . " SET user_allow_viewonline = '" . $hideonlinestatus . "' WHERE user_id = '" . $row['user_id'] . "'";
if ( !( $result = $db->sql_query( $sql ) ) )
{
message_die(GENERAL_ERROR, 'Error in updating online status', '', __LINE__, __FILE__, $sql);
}
if(! $HTTP_POST_VARS['admin'] )
{
if ( empty ( $HTTP_POST_VARS['redirect'] ) )
{
$template->assign_vars(array(
'META' => "<meta http-equiv=\"refresh\" content=\"3;url=index.$phpEx\">")
);
$message = $lang['olympus_login_LoggedIn'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
else
{
$template->assign_vars(array(
'META' => "<meta http-equiv=\"refresh\" content=\"3;url=" . append_sid( $HTTP_POST_VARS['redirect'] ) . "\">")
);
$message = $lang['olympus_login_LoggedIn'] . '<br /><br />' . sprintf($lang['olympus_login_Click_return'], '<a href="' . append_sid( htmlspecialchars( $HTTP_POST_VARS['redirect'] ) ) . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
}
// [-] 'Olympus Style' Login Screen
Find
redirect(append_sid($url, true)); }
After, Add
// [+] 'Olympus Style' Login Screen
else if ( ! $row['user_active'] )
{
$message = $lang['olympus_login_InactiveAccount'] . '<br /><br />' . sprintf($lang['olympus_login_ActivateAccountMsg'], "<a href=\"profile.$phpEx?mode=resendactivation\">", '</a>') . '<br /><br />' . sprintf($lang['Click_return_login'], '<a href="' . append_sid("login.$phpEx") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
// [-] 'Olympus Style' Login Screen
Find
message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.'); }
After, Add
// [+] 'Olympus Style' Login Screen
$message = $lang['olympus_login_WrongPassword'] . '<br /><br />' . sprintf($lang['olympus_login_SendPasswordMsg'], "<a href=\"profile.$phpEx?mode=sendpassword\">", '</a>') . '<br /><br />' . sprintf($lang['Click_return_login'], '<a href="' . append_sid("login.$phpEx") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
// [-] 'Olympus Style' Login Screen
Find
message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.'); }
After, Add
// [+] 'Olympus Style' Login Screen
$message = $lang['olympus_login_NoAccount'] . '<br /><br />' . sprintf($lang['olympus_login_RegisterAccountMsg'], "<a href=\"profile.$phpEx?mode=register\">", '</a>') . '<br /><br />' . sprintf($lang['Click_return_login'], '<a href="' . append_sid("login.$phpEx") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
// [-] 'Olympus Style' Login Screen
Find
'L_SEND_PASSWORD' => $lang['Forgotten_password'],
After, Add
// [+] 'Olympus Style' Login Screen
'L_OL_REGISTER' => $lang['olympus_login_CreateAccount'],
'L_OL_INFOLOGIN' => $lang['olympus_login_LoginInfo'],
'L_OL_BINDEX' => $lang['olympus_login_BoardIndex'],
'L_OL_READFAQ' => $lang['olympus_login_ViewFAQ'],
'L_OL_INFOADMIN' => $lang['olympus_login_AdminInfo'],
'L_OL_ACTIVATION' => $lang['olympus_login_Resend_Activation'],
'L_OL_HIDEONLINESTATUS' => $lang['olympus_login_HideOnlineSession'],
'L_OL_OPTIONS' => $lang['Options'],
'U_OL_ACTIVATION' => append_sid("profile.$phpEx?mode=resendactivation"),
// [-] 'Olympus Style' Login Screen
Find
'S_HIDDEN_FIELDS' => $s_hidden_fields) );
After, Add
// [+] 'Olympus Style' Login Screen
if( isset( $HTTP_GET_VARS['admin'] ) )
{
$template->assign_block_vars('switch_admin_reauth', array());
}
if($board_config['require_activation'] !== USER_ACTIVATION_ADMIN && !$userdata['session_logged_in'])
{
$template->assign_block_vars('switch_admin_activation', array());
}
// [-] 'Olympus Style' Login Screen
Find
else if ( $mode == 'activate' )
{
include($phpbb_root_path . 'includes/usercp_activate.'.$phpEx);
exit;
}
After, Add
// [+] 'Olympus Style' Login Screen
else if ( $mode == 'resendactivation' )
{
include ( $phpbb_root_path . 'includes/usercp_sendactivation.'.$phpEx );
exit;
}
// [-] 'Olympus Style' Login Screen
Find
<form action="{S_LOGIN_ACTION}" method="post" target="_top">
Before, Add
<!--
Find
</form>
After, Add
-->
<form action="{S_LOGIN_ACTION}" method="post" target="_top">
<br />
<table width="100%" cellspacing="2" cellpadding="2" border="1" style="border-collapse: collapse; border-style: solid; border-width: 1">
<tr>
<td width="80%" align="left" class="row1"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a> <a href="{U_LOGIN}" class="nav">{L_LOGIN}</a></span></td>
<td width="20%" align="right" class="row1"><span class="gensmall"> {S_TIMEZONE} </span></td>
</tr>
</table>
<br />
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
<tr>
<th colspan="2">{L_LOGIN}</th>
</tr>
<tr>
<td class="row3" colspan="2" align="center"><span class="gensmall">
<!-- BEGIN switch_forced_login -->
{L_FORCED_LOGIN_EXPLAIN}
<!-- END switch_forced_login -->
{L_ENTER_PASSWORD}</span>
</td>
</tr>
<tr>
<td class="row1" width="50%"><center><span class="gensmall">
<!-- BEGIN switch_user_logged_out -->
{L_OL_INFOLOGIN}
<!-- END switch_user_logged_out -->
<!-- BEGIN switch_admin_reauth -->
{L_OL_INFOADMIN}
<!-- END switch_admin_reauth -->
</span><br /><br />
<span class="genmed" align="center"><a href="{U_INDEX}">{L_OL_BINDEX}</a> |
<!-- BEGIN switch_admin_activation -->
<a href="{U_OL_ACTIVATION}">{L_OL_ACTIVATION}</a> |
<!-- END switch_admin_activation -->
<a href="{U_FAQ}">{L_OL_READFAQ}</a></span>
</center></td>
<td class="row2">
<table cellspacing="1" cellpadding="4">
<tr>
<td class="row1"><b class="gensmall">{L_USERNAME}:</b></td>
<td width="100%" class="row1">
<input class="post" type="text" name="username" size="25" maxlength="40" value="{USERNAME}" tabindex="1" /><br />
<!-- BEGIN switch_user_logged_out -->
<a class="gensmall" href="{U_REGISTER}">{L_OL_REGISTER}</a>
<!-- END switch_user_logged_out -->
</td>
</tr>
<tr>
<td class="row1"><b class="gensmall">{L_PASSWORD}:</b></td>
<td width="100%" class="row1">
<input class="post" type="password" name="password" size="25" maxlength="25" tabindex="2" /><br />
<!-- BEGIN switch_user_logged_out -->
<a class="gensmall" href="{U_SEND_PASSWORD}">{L_SEND_PASSWORD}</a>
<!-- END switch_user_logged_out -->
</td>
</tr>
<!-- BEGIN switch_user_logged_out -->
<tr>
<td class="row1"><span class="gensmall"><b>{L_OL_OPTIONS}:</b></span></td>
<td width="100%" class="row1">
<span class="gensmall">
<input type="checkbox" name="autologin" tabindex="5" />{L_AUTO_LOGIN}
<br />
<input type="checkbox" name="hideonline" tabindex="5" />{L_OL_HIDEONLINESTATUS}
</span>
</td>
</tr>
<!-- END switch_user_logged_out -->
</table>
</td>
</tr>
<tr>
<td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="login" class="mainoption" value="{L_LOGIN}" tabindex="3" /></td>
</tr>
</table>
<br />
<table width="100%" cellspacing="2" cellpadding="2" border="1" style="border-collapse: collapse; border-style: solid; border-width: 1">
<tr>
<td width="80%" align="left" class="row1"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a> <a href="{U_LOGIN}" class="nav">{L_LOGIN}</a></span></td>
<td width="20%" align="right" class="row1"><span class="gensmall"> {S_TIMEZONE} </span></td>
</tr>
</table>
<!-- [ 2005 Olympus-Style Login Screen 1.8.0 ] -->
<br /></form>