Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Monday, May 20 2013 @ 01:45 PM EDT


 Forum Index > Extensions > Cool Hacks New Topic Post Reply
 Improved users.php
   
POunder
 09/29/03 02:11PM (Read 1511 times)  
+----
Newbie
indifferent

Status: offline


Registered: 06/28/03
Posts: 1
Have made some changes to
PHP Formatted Code
users.php
for those like me who like to use staticpages to do geeklog functions (Like: You are not logged in click here to log in). Normally when you access users.php it tells you you've mistyped your login credentials, which can be confusing for some users as they have never even entered any.

So...

If you open users.php and find around line 599 the line
PHP Formatted Code
templates->set_var('site_url', $_CONF['site_url']);


and underneith add the lines:
PHP Formatted Code

        if($_GET['bLoginOnly']==1)
        {
                    $user_templates->set_var('start_block_loginagain', COM_startBlock($LANG04[107]));
        }
        else
        {
                $user_templates->set_var('start_block_loginagain', COM_startBlock($LANG04[65]));
        }
    if($_GET['bLoginOnly']==1)
        {
                $user_templates->set_var('lang_message', $LANG04[106]);
        }
        else
        {
                $user_templates->set_var('lang_message', $LANG04[66]);
        }
 


then if you open one (or all) of your language files and go to the bottom of $LANG04 (
PHP Formatted Code
105 => 'Show up in Who's Online block',
) and add the following lines (of corse you can change them)

PHP Formatted Code

        106 => 'Please login using the form below.',
        107 => 'Log In',
 


So now if you access users.php?bLoginOnly=1 it just says please login instead of incorrect login credentials Big Grin

 
Profile Email Website
 Quote
Content generated in: 2.33 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to post 
Filtered HTML Allowed 
Censored Content