- ".(file_exists(THEME."images/login_logo.png") ? "

\n" : "

\n" );
+ {LOGO=login}";
}
// ##### LOGIN TABLE -----------------------------------------------------------------------------
@@ -52,7 +52,9 @@ if(!isset($LOGIN_TABLE))
\n\n
\n\n\n
\n";
- if($LOGIN_TABLE_SECIMG_SECIMG)
+
+
+ if(LOGIN_CAPTCHA)
{
$LOGIN_TABLE .= "
\n\n
\n";
}
@@ -66,10 +68,10 @@ if(!isset($LOGIN_TABLE))
if(!isset($LOGIN_TABLE_FOOTER))
{
$LOGIN_TABLE_FOOTER = "
-
@@ -78,4 +80,25 @@ if(!isset($LOGIN_TABLE_FOOTER))
// ##### ------------------------------------------------------------------------------------------
+
+// Starter for v2. - Bootstrap
+
+$LOGIN_TEMPLATE['xxxxx'] = '
+
+
+
+
+
+
+
+ ';
+
+
+
+
+
+
+
?>
\ No newline at end of file
diff --git a/e107_plugins/siteinfo/e_shortcode.php b/e107_plugins/siteinfo/e_shortcode.php
index 3183fdb62..9f87ebf00 100644
--- a/e107_plugins/siteinfo/e_shortcode.php
+++ b/e107_plugins/siteinfo/e_shortcode.php
@@ -44,30 +44,56 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
parse_str(vartrue($parm)); // Optional {LOGO=file=file_name} or {LOGO=link=url} or {LOGO=file=file_name&link=url}
// Paths to image file, link are relative to site base
$tp = e107::getParser();
-
+
$logopref = e107::getConfig('core')->get('sitelogo');
- $logo = $tp->replaceConstants($logopref);
-
- if(vartrue($logopref) && is_readable($logo))
+ $logop = $tp->replaceConstants($logopref);
+
+ if($parm == 'login') // Login Page. BC fix.
{
- $logo = $tp->replaceConstants($logopref,'abs');
- $path = $tp->replaceConstants($logopref);
+ if(vartrue($logopref) && is_readable($logop))
+ {
+ $logo = $tp->replaceConstants($logopref,'abs');
+ $path = $tp->replaceConstants($logopref);
+ }
+ elseif(is_readable(THEME."images/login_logo.png"))
+ {
+
+ $logo = THEME_ABS."images/login_logo.png";
+ $path = THEME."images/login_logo.png";
+ }
+ else
+ {
+ $logo = e_IMAGE_ABS."logo.png";
+ $path = e_IMAGE."logo.png";
+ }
}
- elseif (isset($file) && $file && is_readable($file))
+ else
{
- $logo = e_HTTP.$file; // HTML path
- $path = e_BASE.$file; // PHP path
- }
- else if (is_readable(THEME.'images/e_logo.png'))
- {
- $logo = THEME_ABS.'images/e_logo.png'; // HTML path
- $path = THEME.'images/e_logo.png'; // PHP path
- }
- else
- {
- $logo = e_IMAGE_ABS.'logo.png'; // HTML path
- $path = e_IMAGE.'logo.png'; // PHP path
+
+ if(vartrue($logopref) && is_readable($logop))
+ {
+ $logo = $tp->replaceConstants($logopref,'abs');
+ $path = $tp->replaceConstants($logopref);
+ }
+ elseif (isset($file) && $file && is_readable($file))
+ {
+ $logo = e_HTTP.$file; // HTML path
+ $path = e_BASE.$file; // PHP path
+ }
+ else if (is_readable(THEME.'images/e_logo.png'))
+ {
+ $logo = THEME_ABS.'images/e_logo.png'; // HTML path
+ $path = THEME.'images/e_logo.png'; // PHP path
+ }
+ else
+ {
+ $logo = e_IMAGE_ABS.'logo.png'; // HTML path
+ $path = e_IMAGE.'logo.png'; // PHP path
+ }
+
}
+
+ //TODO Parm for resizing the logo image with thumb.php
$dimensions = getimagesize($path);
diff --git a/login.php b/login.php
index ef01cbe72..2722f415c 100644
--- a/login.php
+++ b/login.php
@@ -26,46 +26,54 @@ if ((USER || e_LOGIN != e_SELF) && !getperms('0')) // Disable page if user logge
exit();
}
-$HEADER = '';
-$FOOTER=''; // Avoids strange displays when debug enabled! (But doesn't completely maintain XHTML formatting)
+define('e_IFRAME',true);
+//$HEADER = '';
+//$FOOTER=''; // Avoids strange displays when debug enabled! (But doesn't completely maintain XHTML formatting)
+
require_once(HEADERF);
$use_imagecode = ($pref['logcode'] && extension_loaded("gd"));
-if ($use_imagecode)
-{
- require_once(e_HANDLER."secure_img_handler.php");
- $sec_img = new secure_image;
-}
+
+define("LOGIN_CAPTCHA", $use_imagecode);
+
+//if (LOGIN_CAPTCHA)
+//{
+ //require_once(e_HANDLER."secure_img_handler.php");
+ //$sec_img = new secure_image;
+//}
if (!USER || getperms('0'))
{
-
-
-
if (!defined('LOGINMESSAGE')) define('LOGINMESSAGE', ''); // LOGINMESSAGE only appears with errors
- require_once(e_HANDLER.'form_handler.php');
- $rs = new form;
- $text = "";
- $allowEmailLogin = varset($pref['allowEmailLogin'],0);
- $ulabel = array(LAN_LOGIN_1,LAN_LOGIN_28,LAN_LOGIN_29);
+ require_once(e_HANDLER.'form_handler.php'); // required for BC
+ $rs = new form; // required for BC
+
+
+// $text = "";
+ // $allowEmailLogin = varset($pref['allowEmailLogin'],0);
+ // $ulabel = array(LAN_LOGIN_1,LAN_LOGIN_28,LAN_LOGIN_29);
- $LOGIN_USERNAME_LABEL = $ulabel[$allowEmailLogin];
- $LOGIN_TABLE_LOGINMESSAGE = LOGINMESSAGE;
- $LOGIN_TABLE_USERNAME = "
";
- $LOGIN_TABLE_PASSWORD = "
";
- if (!USER && e107::getSession()->is('challenge') && varset($pref['password_CHAP'],0))
- {
- $LOGIN_TABLE_PASSWORD .= "
\n\n";
- }
- if ($use_imagecode)
- {
- $LOGIN_TABLE_SECIMG_LAN = LAN_LOGIN_13;
- $LOGIN_TABLE_SECIMG_HIDDEN = "
";
- $LOGIN_TABLE_SECIMG_SECIMG = $sec_img->r_image();
- $LOGIN_TABLE_SECIMG_TEXTBOC = "
";
- }
- $LOGIN_TABLE_AUTOLOGIN = "
";
- $LOGIN_TABLE_AUTOLOGIN_LAN = LAN_LOGIN_8;
- $LOGIN_TABLE_SUBMIT = "
";
+// $LOGIN_USERNAME_LABEL = $ulabel[$allowEmailLogin];
+// $LOGIN_TABLE_LOGINMESSAGE = LOGINMESSAGE;
+// $LOGIN_TABLE_USERNAME = "
";
+// $LOGIN_TABLE_PASSWORD = "
";
+
+ // if (!USER && e107::getSession()->is('challenge') && varset($pref['password_CHAP'],0))
+ // {
+ // $LOGIN_TABLE_PASSWORD .= "
\n\n";
+ // }
+
+
+
+// if ($use_imagecode)
+// {
+// $LOGIN_TABLE_SECIMG_LAN = LAN_LOGIN_13;
+// $LOGIN_TABLE_SECIMG_HIDDEN = "
";
+ // $LOGIN_TABLE_SECIMG_SECIMG = $sec_img->r_image();
+// $LOGIN_TABLE_SECIMG_TEXTBOC = "
";
+// }
+// $LOGIN_TABLE_AUTOLOGIN = "
";
+// $LOGIN_TABLE_AUTOLOGIN_LAN = LAN_LOGIN_8;
+// $LOGIN_TABLE_SUBMIT = "
";
if (!isset($LOGIN_TABLE) || !$LOGIN_TABLE)
{
@@ -82,29 +90,34 @@ if (!USER || getperms('0'))
require_once(e_CORE."templates/login_template.php");
}
}
- $text = preg_replace("/\{(.*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE);
+
+ $sc = e107::getScBatch('login');
+ $text = $tp->parseTemplate($LOGIN_TABLE,true);
+
+
+
+// $text = preg_replace("/\{(.*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE);
if(getperms('0'))
{
echo "
You are currently logged in.
";
}
- echo preg_replace("/\{(.*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE_HEADER);
-
-// $login_message = LAN_LOGIN_3." | ".SITENAME;
- $login_message = SITENAME;
+// echo preg_replace("/\{(.*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE_HEADER);
+ $login_message = SITENAME; // $login_message = LAN_LOGIN_3." | ".SITENAME;
+
+ echo $tp->parseTemplate($LOGIN_TABLE_HEADER);
$ns->tablerender($login_message, $text, 'login_page');
-
- $LOGIN_TABLE_FOOTER_USERREG = ' '; // In case no registration system enabled
- if ($pref['user_reg'])
- {
- $LOGIN_TABLE_FOOTER_USERREG = "
".LAN_LOGIN_11."";
- }
- echo preg_replace("/\{([^ ]*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE_FOOTER);
+ echo $tp->parseTemplate($LOGIN_TABLE_FOOTER);
+
+
+ // echo preg_replace("/\{([^ ]*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE_FOOTER);
}
-echo "