[geeklog-hg] geeklog: Fixed usersettings.php message for non-logged in users....

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Aug 25 20:41:47 EDT 2013


changeset 9267:71220d2eb3a1
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/71220d2eb3a1
user: Tom <websitemaster at cogeco.net>
date: Sun Aug 25 20:41:20 2013 -0400
description:
Fixed usersettings.php message for non-logged in users. Fixed user message when user is logged in and visits users.php

diffstat:

 language/english.php         |   5 +++--
 language/english_utf-8.php   |   5 +++--
 public_html/users.php        |  20 +++++++++++++-------
 public_html/usersettings.php |   4 ++--
 4 files changed, 21 insertions(+), 13 deletions(-)

diffs (89 lines):

diff -r 6aad19730268 -r 71220d2eb3a1 language/english.php
--- a/language/english.php	Sun Aug 25 16:57:54 2013 -0400
+++ b/language/english.php	Sun Aug 25 20:41:20 2013 -0400
@@ -314,7 +314,7 @@
     67 => 'Member Since',
     68 => 'Remember Me For',
     69 => 'How long should we remember you after logging in?',
-    70 => "Customize the layout and content of {$_CONF['site_name']}",
+    70 => "Customize the layout and content of {$_CONF['site_name']}!",
     71 => "One of the great features of {$_CONF['site_name']} is you can customize the content you get and you can change the overall layout of this site.  In order to take advantage of these great features you must first <a href=\"{$_CONF['site_url']}/users.php?mode=new\" rel=\"nofollow\">register</a> with {$_CONF['site_name']}.  Are you already a member?  Then use the login form to the left to log in!",
     72 => 'Theme',
     73 => 'Language',
@@ -409,7 +409,8 @@
     167 => 'Remote login',
     168 => 'You may also login with one on of the below remote authentication services',
     'user_login' => 'User Login', 
-    'user_login_message' => 'Please login below. You must enter both a username and password.'
+    'user_login_message' => 'Please login below. You must enter both a username and password.',
+    'user_logged_in_message' => "You are already logged in. Whould you like to <a href=\"{$_CONF['site_url']}/users.php?mode=logout\" rel=\"nofollow\">logout</a>?"
 );
 
 ###############################################################################
diff -r 6aad19730268 -r 71220d2eb3a1 language/english_utf-8.php
--- a/language/english_utf-8.php	Sun Aug 25 16:57:54 2013 -0400
+++ b/language/english_utf-8.php	Sun Aug 25 20:41:20 2013 -0400
@@ -314,7 +314,7 @@
     67 => 'Member Since',
     68 => 'Remember Me For',
     69 => 'How long should we remember you after logging in?',
-    70 => "Customize the layout and content of {$_CONF['site_name']}",
+    70 => "Customize the layout and content of {$_CONF['site_name']}!",
     71 => "One of the great features of {$_CONF['site_name']} is you can customize the content you get and you can change the overall layout of this site.  In order to take advantage of these great features you must first <a href=\"{$_CONF['site_url']}/users.php?mode=new\" rel=\"nofollow\">register</a> with {$_CONF['site_name']}.  Are you already a member?  Then use the login form to the left to log in!",
     72 => 'Theme',
     73 => 'Language',
@@ -409,7 +409,8 @@
     167 => 'Remote login',
     168 => 'You may also login with one on of the below remote authentication services',
     'user_login' => 'User Login', 
-    'user_login_message' => 'Please login below. You must enter both a username and password.'
+    'user_login_message' => 'Please login below. You must enter both a username and password.',
+    'user_logged_in_message' => "You are already logged in. Whould you like to <a href=\"{$_CONF['site_url']}/users.php?mode=logout\" rel=\"nofollow\">logout</a>?"
 );
 
 ###############################################################################
diff -r 6aad19730268 -r 71220d2eb3a1 public_html/users.php
--- a/public_html/users.php	Sun Aug 25 16:57:54 2013 -0400
+++ b/public_html/users.php	Sun Aug 25 20:41:20 2013 -0400
@@ -1086,14 +1086,20 @@
                 displayLoginErrorAndAbort(82, $LANG04[113], $LANG04[112]);
             } else { // Show login form
                 if(($msg != 69) && ($msg != 70)) {
-                    if ($_CONF['custom_registration'] AND
-                            function_exists('CUSTOM_loginErrorHandler')) {
-                        // Typically this will be used if you have a custom
-                        // main site page and need to control the login process
-                        $display .= CUSTOM_loginErrorHandler($msg);
+                    if (COM_isAnonUser()) {
+                        if ($_CONF['custom_registration'] AND
+                                function_exists('CUSTOM_loginErrorHandler')) {
+                            // Typically this will be used if you have a custom
+                            // main site page and need to control the login process
+                            $display .= CUSTOM_loginErrorHandler($msg);
+                        } else {
+                            $display .= loginform(false, $status);
+                        }
                     } else {
-                        echo "ha " . $status;
-                        $display .= loginform(false, $status);
+                        // user is already logged in
+                        $display .= COM_startBlock ($LANG04['user_login']);
+                        $display .= '<p>' . $LANG04['user_logged_in_message'] . '</p>';
+                        $display .= COM_endBlock ();
                     }
                 }
             }
diff -r 6aad19730268 -r 71220d2eb3a1 public_html/usersettings.php
--- a/public_html/usersettings.php	Sun Aug 25 16:57:54 2013 -0400
+++ b/public_html/usersettings.php	Sun Aug 25 20:41:20 2013 -0400
@@ -1560,8 +1560,8 @@
         break;
     }
 } else {
-    $display .= COM_startBlock ($LANG04[70] . '!');
-    $display .= '<br' . XHTML . '>' . $LANG04[71] . '<br' . XHTML . '><br' . XHTML . '>';
+    $display .= COM_startBlock ($LANG04[70]);
+    $display .= '<p>' . $LANG04[71] . '</p>';
     $display .= COM_endBlock ();
     $display = COM_createHTMLDocument($display);
 }



More information about the geeklog-cvs mailing list