Joomla! Discussion Forums



It is currently Wed Nov 25, 2009 6:25 am (All times are UTC )

 




Post new topic Reply to topic  [ 5 posts ] 
Author Message
Posted: Wed Oct 11, 2006 4:11 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Fri Jun 23, 2006 4:41 pm
Posts: 84
Location: Joinville - Santa Catarina - Brazil
Whenever there is a private link that I'm not allowed to see as a registered user Joomla! shows:
Quote:
You are not authorized to view this resource.
You need to login.

Usually there is no login form anywhere around and I have to go to the main page and then I see the mod_login!!!

In order to make Joomla! meet usability standards I've changed function mosNotAuth() located in the /includes/joomla.php, please take a look and take it under consideration for future versions:

Code:
function mosNotAuth() {
   global $my;

   echo _NOT_AUTH;
   if ($my->id < 1) {
      echo "<br />" . _DO_LOGIN;
      /**
Modified by Douglas de Senne Machado
Used a few lines from component com_login
      **/
      ?>
      <br />
      <br />
      <br />
      <form action="<?php echo sefRelToAbs( 'index.php?option=login' ); ?>" method="post" name="login" id="login">
            <div class="componentheading">Efetue o Login</div>
            <br />
               <label for="username"><?php echo _USERNAME; ?>
                  <input name="username" id="username" type="text" class="inputbox" size="25" style="display:block" />
               </label>
               <label for="passwd"><?php echo _PASSWORD; ?>
               <input name="passwd" id="passwd" type="password" class="inputbox" size="25" style="display:block" />
               </label>
               
               <br/>
               <label style="display:block">
               <input type="checkbox" name="remember" class="inputbox" value="yes" style="width:12px;height:12px" />
               <?php echo _REMEMBER_ME; ?>
               </label>
               
               <a href="<?php echo sefRelToAbs( 'index.php?option=com_registration&task=lostPassword' ); ?>">
               <?php echo _LOST_PASSWORD; ?>
               </a>
                  <br />
                  <?php echo _NO_ACCOUNT; ?>
                  <a href="<?php echo sefRelToAbs( 'index.php?option=com_registration&task=register' ); ?>">
                  <?php echo _CREATE_ACCOUNT;?>
                  </a>
               <br />
               <br />
               <input type="submit" name="submit" class="button" value="<?php echo _BUTTON_LOGIN; ?>" />
         <noscript>
         <?php echo _CMN_JAVASCRIPT; ?>
         </noscript>
      <input type="hidden" name="op2" value="login" />
      </form>
      <?php
   }
}


I'm more a user than a programmer, so - of course - there are a lot of improvements to be made, however it's a start point!

Best regards,

_________________
Douglas Machado :: Joomla Extension Developer :: Brazilian : [<o>]
PHP Cross Reference for Joomla 1.5: http://ideal.fok.com.br/documentation/joomla-1.5/


Top
  E-mail  
 
Posted: Wed Oct 11, 2006 7:23 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Aug 25, 2005 5:48 pm
Posts: 2801
Location: Geneva mostly
very nice idea, make it easy for the users! ;)

_________________
Sometimes one pays most for the things one gets for nothing.
The important thing is not to stop questioning. Curiosity has its own reason for existing. AE
http://joomla15.blogspot.com for J! 1.5 screenshots
http://www.eyezberg.com


Top
  E-mail  
 
Posted: Wed Oct 11, 2006 7:39 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Fri Jun 23, 2006 4:41 pm
Posts: 84
Location: Joinville - Santa Catarina - Brazil
Hopefully someone one day will make include something similar in the out of the box installation!

BTW, Thanks for putting up your http://joomla15.blogspot.com, I haven't installed 1.5 just yet. But will do tomorrow (Beta release date)!!! The JPGs files did not show in Firefox... I had to go open IE in order to view them!

Regards,

_________________
Douglas Machado :: Joomla Extension Developer :: Brazilian : [<o>]
PHP Cross Reference for Joomla 1.5: http://ideal.fok.com.br/documentation/joomla-1.5/


Top
  E-mail  
 
Posted: Wed Oct 11, 2006 9:09 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Aug 25, 2005 5:48 pm
Posts: 2801
Location: Geneva mostly
Strange, I use the site with FF all the time..

_________________
Sometimes one pays most for the things one gets for nothing.
The important thing is not to stop questioning. Curiosity has its own reason for existing. AE
http://joomla15.blogspot.com for J! 1.5 screenshots
http://www.eyezberg.com


Top
  E-mail  
 
Posted: Fri May 25, 2007 7:05 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Mar 02, 2006 8:09 am
Posts: 56
I think there's an easier way of doing it:

Code:
      
echo _NOT_AUTH;
        if ($my->id < 1) {
                echo "<br />" . _DO_LOGIN;
                include ( $GLOBALS['mosConfig_absolute_path'] . '/components/com_login/login.html.php');
                include ( $GLOBALS['mosConfig_absolute_path'] . '/components/com_login/login.php');
        }


And you're done...?


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

Quick reply

 



Who is online

Users browsing this forum: anythinglifted and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group