Home arrow Forum Module login SMF logout and Login problem
  Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2008, 07:22:45 AM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Hacks
| |-+  Joomla-SMF Forum Support
| | |-+  Joomla-SMF 2.0.x (Moderators: -Wolverine, kai920)
| | | |-+  Module login SMF logout and Login problem
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Module login SMF logout and Login problem  (Read 939 times)
gendi
Joomla Newbie
*

Karma: +1/-2
Offline Offline

Posts: 13


View Profile
Module login SMF logout and Login problem
« on: June 03, 2007, 10:31:01 PM »

Hello all

I have a problem when a user want to connect to his account.

my site is http://nsxxxxx.ovh.net/~sitedemo/

when a person want to connect or disconnect the url of the action is allwais :

http://nsxxxxx.ovh.net/~sitedemo//~sitedemo/

So an error page show.

How to resolve this ?

I've tried to make url redirect on login and logout to fix the problem in the login but no result.

Sorry for my english i'm french, i hope you will help me.

Bests Regards, Alban.

Et vive joomlahacks !  Cheesy
Logged
Vasko_Hvah
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1


View Profile
Re: Module login SMF logout and Login problem
« Reply #1 on: August 05, 2007, 11:48:00 AM »

I have the same problem please someone explain how to fix it

OK so far no answer to this question and this is not the first thread...
I am extremely lame on php but I will try to do my best if someone wants to help is welcome....

1) The problem comes from mod_smf_login.php which is located in the modules directory

2) Changing to the normal mod_login.php seems to work out but we want to use this one

3)A quick workaround for people who are ina a hurry publish the original mod_login.php and the mod_smf_login.php set the last one 2 registered and You will have the menu available also the login.... a little bit ugly but.... hey I am lame Smiley

4)the original login looks like that
Quote
// Login output
// ie HTML when not logged in and trying to login
   // used for spoof hardening
   $validate = josSpoofValue(1);
   ?>
   <form action="<?php echo sefRelToAbs( 'index.php' ); ?>" method="post" name="login" >
   <?php
   echo $pretext;
   ?>

   <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
   <tr>
      <td>
         <label for="mod_login_username">
            <?php echo _USERNAME; ?>
         </label>
         <br />
         <input name="username" id="mod_login_username" type="text" class="inputbox" alt="username" size="10" />
         <br />
         <label for="mod_login_password">
            <?php echo _PASSWORD; ?>
         </label>
         <br />
         <input type="password" id="mod_login_password" name="passwd" class="inputbox" size="10" alt="password" />
         <br />
         <input type="checkbox" name="remember" id="mod_login_remember" class="inputbox" value="yes" alt="Remember Me" />
         <label for="mod_login_remember">
            <?php echo _REMEMBER_ME; ?>
         </label>
         <br />
         <input type="submit" name="Submit" class="button" value="<?php echo _BUTTON_LOGIN; ?>" />
      </td>
   </tr>
   <tr>
      <td>
         <a href="<?php echo sefRelToAbs( 'index.php?option=com_registration&amp;task=lostPassword' ); ?>">
            <?php echo _LOST_PASSWORD; ?></a>
      </td>
   </tr>
   <?php
   if ( $registration_enabled ) {
      ?>
      <tr>
         <td>
            <?php echo _NO_ACCOUNT; ?>
            <a href="<?php echo sefRelToAbs( 'index.php?option=com_registration&amp;task=register' ); ?>">
               <?php echo _CREATE_ACCOUNT; ?></a>
         </td>
      </tr>
      <?php
   }
   ?>
   </table>
   <?php
   echo $posttext;
   ?>

   <input type="hidden" name="option" value="login" />
   <input type="hidden" name="op2" value="login" />
   <input type="hidden" name="lang" value="<?php echo $mosConfig_lang; ?>" />
   <input type="hidden" name="return" value="<?php echo htmlspecialchars( sefRelToAbs( $login ) ); ?>" />
   <input type="hidden" name="message" value="<?php echo htmlspecialchars( $message_login ); ?>" />
   <input type="hidden" name="force_session" value="1" />
   <input type="hidden" name="<?php echo $validate; ?>" value="1" />
   </form>
   <?php
}
?>

5) Maybe this is the code for jsmf login
Quote
if (empty($login)) {
       $login = mosGetParam($_SERVER, 'REQUEST_URI', '');
    }

    if (strcasecmp($menu_style, 'customized') != 0) {
        echo'<tr><td>
        <form action="index.php" id="login" method="post">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td>
                    <label for="mod_smf_login_username">',$txt[35],':</label><br />
                    <input type="text" id="mod_smf_login_username" name="username" size="12" class="inputbox" alt="',$txt[35],'" /><br />
                    <label for="mod_smf_login_password">',$txt[36],':</label><br/>
                    <input type="password" id="mod_smf_login_password" name="passwd" size="12" class="inputbox" alt="',$txt[36],'" /><br />';
                    if ($remember_me) {
                        echo '<input type="checkbox" id="mod_smf_login_remember" name="remember" class="inputbox" value="yes" alt="',_REMEMBER_ME,'" checked="checked" />';
                    } else {
                        echo '<input type="checkbox" id="mod_smf_login_remember" name="remember" class="inputbox" value="yes" alt="',_REMEMBER_ME,'" />';
                    }
                    echo '
                    <label for="mod_smf_login_remember">',_REMEMBER_ME,'</label><br />
                    <input type="submit" value="', $txt[34], '" class="button"/><br />
                    <input type="hidden" name="option" value="login" />
                    <input type="hidden" name="lang" value="',$mosConfig_lang,'" />
                    <input type="hidden" name="message" value="',$message_login,'" />';
                    if (!empty($login)) {
                  echo '<input type="hidden" name="return" value="',str_replace(array('&'), array('&amp;'), $login),'" />';
                    }
                    echo '
                 </td>
             </tr>
        </table>
        </form>
        </td>
        </tr>

I have some personal feelings about this line ... it seems it is messing the redirect.... or it is not... lame o me...
Code:
   echo '<input type="hidden" name="return" value="',str_replace(array('&'), array('&amp;'), $login),'" />';

This looks somewhat connected :
Code:
    if (empty($login)) {
    $login = mosGetParam($_SERVER, 'REQUEST_URI', '');

However I added
Code:
// url of current page that user will be returned to after login
if ($query_string = mosGetParam( $_SERVER, 'QUERY_STRING', '' )) {
$return = 'index.php?' . $query_string;
} else {
$return = 'index.php';
}
and changed the
Code:
   echo '<input type="hidden" name="return" value="',str_replace(array('&'), array('&amp;'), $login),'" />';
to 
Code:
echo '<input type="hidden" name="return" value="',str_replace(array('&'), array('&amp;'),  htmlspecialchars( sefRelToAbs( $login ) )),'" />';

IT DIDN'T WORK not that I have expected... Smiley C'mon Wolverine u got us into this... get us out of the blue....


My research continues....
« Last Edit: August 05, 2007, 01:20:14 PM by Vasko_Hvah » Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use
Joomla Hacks



Joomla Hacks
German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
Search Contact About Advertise Blogs Topsites Submit News Register Login