Home arrow Forum JSMF 2.0.2a patch (\n\n\t\n problem)
  Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2008, 05:55:15 PM
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)
| | | |-+  JSMF 2.0.2a patch (\n\n\t\n problem)
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: 1 2 3 [4] 5 6 Go Down Print
Author Topic: JSMF 2.0.2a patch (\n\n\t\n problem)  (Read 18929 times)
Adrian K
Joomla Newbie
*

Karma: +0/-1
Offline Offline

Posts: 5


View Profile
Re: JSMF 2.0.2a patch (\n\n\t\n problem)
« Reply #45 on: August 06, 2007, 06:41:33 PM »

sorry, I TOTALLY missed this thread when I did version 2.0.2.1... I'll get an updated version of that over here soon too.
Thank you! Cheesy
Logged
denislici
Joomla Newbie
*

Karma: +0/-8
Offline Offline

Posts: 10


View Profile
Re: JSMF 2.0.2a patch (\n\n\t\n problem)
« Reply #46 on: August 12, 2007, 11:22:24 AM »



i did the patch but now gives me login error:

You must wait 30 seconds... again and again wait but not...

when reupload the old smf.class.php i can login without any problem... need help plz...
Logged
Superdaantje
Joomla Guru
*****

Karma: +266/-23
Offline Offline

Posts: 370


Aka Livebox


View Profile WWW
Re: JSMF 2.0.2a patch (\n\n\t\n problem)
« Reply #47 on: August 12, 2007, 03:17:43 PM »

Always give version information about:
Joomla!
SMF
JSMF
etc.
Logged

My Projects
Joomlabridge.org JSMF 2.0.2.1 Bridge Support and Downloads
Dutchjoomla.org Dutch Joomla Community (more then 60.000 members)
D.Wagner Webservices
denislici
Joomla Newbie
*

Karma: +0/-8
Offline Offline

Posts: 10


View Profile
Re: JSMF 2.0.2a patch (\n\n\t\n problem)
« Reply #48 on: August 12, 2007, 03:40:12 PM »


joomla 1.013
smf 1.1.3
jsmf 2_0_2_1
Logged
Superdaantje
Joomla Guru
*****

Karma: +266/-23
Offline Offline

Posts: 370


Aka Livebox


View Profile WWW
Re: JSMF 2.0.2a patch (\n\n\t\n problem)
« Reply #49 on: August 12, 2007, 03:44:45 PM »

For what I know is the 2.0.2.1 not updated for the \n\n\t\n issue Wink

Kevin announced the update.
Logged

My Projects
Joomlabridge.org JSMF 2.0.2.1 Bridge Support and Downloads
Dutchjoomla.org Dutch Joomla Community (more then 60.000 members)
D.Wagner Webservices
denislici
Joomla Newbie
*

Karma: +0/-8
Offline Offline

Posts: 10


View Profile
Re: JSMF 2.0.2a patch (\n\n\t\n problem)
« Reply #50 on: August 12, 2007, 04:38:28 PM »

For what I know is the 2.0.2.1 not updated for the \n\n\t\n issue Wink

Kevin announced the update.


i did the patch myself manually...
Logged
Superdaantje
Joomla Guru
*****

Karma: +266/-23
Offline Offline

Posts: 370


Aka Livebox


View Profile WWW
Re: JSMF 2.0.2a patch (\n\n\t\n problem)
« Reply #51 on: August 12, 2007, 04:45:24 PM »

What do you mean? Did you rewrite the 2.0.2a bridge?

So far I know only the 2.0.2 bridge has been re written for the J! 2.0.13 version not the 2.0.2a version.

So has you all ready have read is the 2.0.2a version for a specific issue. The  \n\n\t\n issue. When you not having this problem it is better to use the 2.0.2.1 version of the Bridge and post you questions in that topic Wink

When you having issues with the \n\n\t\n then you have to wait for the update of the 2.0.2a.
Logged

My Projects
Joomlabridge.org JSMF 2.0.2.1 Bridge Support and Downloads
Dutchjoomla.org Dutch Joomla Community (more then 60.000 members)
D.Wagner Webservices
Kevin8020
QA / Testers
Joomla Master
*****

Karma: +33/-18
Offline Offline

Posts: 105



View Profile WWW
Re: JSMF 2.0.2a patch (\n\n\t\n problem)
« Reply #52 on: August 12, 2007, 04:56:58 PM »

Ok, so sorry for the long delay on this. I haven't had access to this site for the last few days so I didn't get the chance to do the patch to 2.0.2a. I'll get on that ASAP!
Logged
denislici
Joomla Newbie
*

Karma: +0/-8
Offline Offline

Posts: 10


View Profile
Re: JSMF 2.0.2a patch (\n\n\t\n problem)
« Reply #53 on: August 12, 2007, 05:17:53 PM »

What do you mean? Did you rewrite the 2.0.2a bridge?

So far I know only the 2.0.2 bridge has been re written for the J! 2.0.13 version not the 2.0.2a version.

So has you all ready have read is the 2.0.2a version for a specific issue. The  \n\n\t\n issue. When you not having this problem it is better to use the 2.0.2.1 version of the Bridge and post you questions in that topic Wink

When you having issues with the \n\n\t\n then you have to wait for the update of the 2.0.2a.


the patch inculdes only smf.class.php that must be rewritten with the one in  componentes/com_smf...

i have issues with \n\n\t\n so i did the patch but now i cant login (from joomla and smf login forms too).
Logged
Superdaantje
Joomla Guru
*****

Karma: +266/-23
Offline Offline

Posts: 370


Aka Livebox


View Profile WWW
Re: JSMF 2.0.2a patch (\n\n\t\n problem)
« Reply #54 on: August 13, 2007, 12:48:31 AM »

the patch inculdes only smf.class.php that must be rewritten with the one in  componentes/com_smf...

i have issues with \n\n\t\n so i did the patch but now i cant login (from joomla and smf login forms too).


Did you read the topic?? This version of the bridge has not be modified for this issue for J! 1.0.13 only for the 1.0.12 and lower versions.. When you can not modified it your self you have to wait when some one has done this. Kevin is all ready working on it
Logged

My Projects
Joomlabridge.org JSMF 2.0.2.1 Bridge Support and Downloads
Dutchjoomla.org Dutch Joomla Community (more then 60.000 members)
D.Wagner Webservices
denislici
Joomla Newbie
*

Karma: +0/-8
Offline Offline

Posts: 10


View Profile
Re: JSMF 2.0.2a patch (\n\n\t\n problem)
« Reply #55 on: August 13, 2007, 05:44:29 AM »


Did you read the topic?? This version of the bridge has not be modified for this issue for J! 1.0.13 only for the 1.0.12 and lower versions.. When you can not modified it your self you have to wait when some one has done this. Kevin is all ready working on it


ok thnks...
Logged
Superdaantje
Joomla Guru
*****

Karma: +266/-23
Offline Offline

Posts: 370


Aka Livebox


View Profile WWW
Re: JSMF 2.0.2a patch (\n\n\t\n problem)
« Reply #56 on: August 13, 2007, 05:49:03 AM »

No thanks Wink
Logged

My Projects
Joomlabridge.org JSMF 2.0.2.1 Bridge Support and Downloads
Dutchjoomla.org Dutch Joomla Community (more then 60.000 members)
D.Wagner Webservices
Eric
Joomla Newbie
*

Karma: +0/-1
Offline Offline

Posts: 3


View Profile
Re: JSMF 2.0.2a patch (\n\n\t\n problem)
« Reply #57 on: August 14, 2007, 06:06:59 AM »

Hi Kevin,
Do you plan to modify 2.0.2a version and add Joomla new password ?
Or correct \n\t problem in 2.0.2.1 ?
Still have few holydays. Maybe I can help (for test purpose ) ?
wm[at]gobordeaux.net
Logged
reydelanada
QA / Testers
Joomla Newbie
*****

Karma: +0/-0
Offline Offline

Posts: 24



View Profile
Re: JSMF 2.0.2a patch (\n\n\t\n problem)
« Reply #58 on: August 16, 2007, 04:34:44 PM »

Here's what I did to solve it:

Open your existing smf.class.php 2.0.2a

Replace from line 1716 to 1772 the following code (function integratelogin):

Code:
function integrateLogin($user, $pass, $cookietime)
{
    global $mainframe, $my, $database, $_VERSION, $mosConfig_lifetime;
    global $modSettings, $context;
    global $jsmfConfig;

    $username = mosGetParam($_REQUEST, 'user', '');
    $password = mosGetParam($_REQUEST, 'passwrd', '');
    $cookieneverexp = mosGetParam($_REQUEST, 'cookieneverexp', '');
    $cookielength = mosGetParam($_REQUEST, 'cookielength', '');
    $remember = mosGetParam($_REQUEST, 'remember', '');

    $jsmf =& jsmfFrontend::singleton();
    $jsmf->doLogin(FALSE);

    /* smf uses cookieneverexp set to on or cookielength equal to -1
     * joomla uses cookielength equal to -1
     * jsmf login uses cookielength equal to -1
     * CB login uses remember equal to yes
     * login is expecting 'yes' or 'no'
     *
     * the goal here is to identify all possible definitions of remember me
     * and translate that to Joomla/SMF cookie never expire settings
     */
    if (($cookielength == -1 || $cookielength == 525600 || $cookielength == 3153600 || strcasecmp($cookieneverexp, 'on') == 0) || (strcasecmp($remember, 'yes') == 0)) {
        $remember = 'yes';
        $_POST['remember'] = 'yes';
        $modSettings['cookieTime'] = 3153600;
        $context['never_expire'] = 1;
        $cookieneverexp = 'on';
    } else {
        $modSettings['cookieTime'] = (int) $cookietime;
        $mosConfig_lifetime = (int) $cookietime * 60;
    }

    if ($my->id <= 0) {
        $query =
            "SELECT password " .
            "FROM #__users " .
            "WHERE username = '$username'";
        $database->setQuery($query);
        $row = null;
        $database->loadObject( $row );
        $pass = $row->password;
        unset($row, $query);

        /*
         * Mambo compatability
         */
        if (strcasecmp($_VERSION->PRODUCT, 'Joomla!' ) == 0) {
            $mainframe->login($username, $pass, $remember);
        } else {
            $mainframe->login($username, $pass);
        }
    }
    return true;
}

With this new code from 2.0.2.1
Code:

function integrateLogin($user, $pass, $cookietime)
{
    global $mainframe, $my, $database, $_VERSION, $mosConfig_lifetime;
    global $modSettings, $context;
    global $jsmfConfig;
               
    $username = mosGetParam($_REQUEST, 'user', '');
    $password = mosGetParam($_REQUEST, 'passwd', '');
    $password2 = mosGetParam($_REQUEST, 'passwrd', '');
   
    $password = ($password ? $password : $password2);
   
    $cookieneverexp = mosGetParam($_REQUEST, 'cookieneverexp', '');
    $cookielength = mosGetParam($_REQUEST, 'cookielength', '');
    $remember = mosGetParam($_REQUEST, 'remember', '');

    $jsmf =& jsmfFrontend::singleton();
    $jsmf->doLogin(FALSE);

    /* smf uses cookieneverexp set to on or cookielength equal to -1
     * joomla uses cookielength equal to -1
     * jsmf login uses cookielength equal to -1
     * CB login uses remember equal to yes
     * login is expecting 'yes' or 'no'
     *
     * the goal here is to identify all possible definitions of remember me
     * and translate that to Joomla/SMF cookie never expire settings
     */
    if (($cookielength == -1 || $cookielength == 525600 || $cookielength == 3153600 || strcasecmp($cookieneverexp, 'on') == 0) || (strcasecmp($remember, 'yes') == 0)) {
        $remember = 'yes';
        $_POST['remember'] = 'yes';
        $modSettings['cookieTime'] = 3153600;
        $context['never_expire'] = 1;
        $cookieneverexp = 'on';
    } else {
        $modSettings['cookieTime'] = (int) $cookietime;
        $mosConfig_lifetime = (int) $cookietime * 60;
    }

    if ($my->id <= 0) {
        $query =
            "SELECT password " .
            "FROM #__users " .
            "WHERE username = '$username'";
        $database->setQuery($query);
        $row = null;
        $database->loadObject( $row );
        if($_VERSION->DEV_LEVEL < 13) {
            $password = $row->password;
        }
        unset($row, $query);
        /*
         * Mambo compatability
         */
        if (strcasecmp($_VERSION->PRODUCT, 'Joomla!' ) == 0) {
            $mainframe->login($username, $password, $remember);
        } else {
            $mainframe->login($username, $password);
        }
    }
    return true;
}

This permit login with joomla 1.0.13 and fixes the broken reply message page.

I only tested it for a few minutes as my site was broken. Don't know if this is the perfect solution but seems it's working.

I hope Kevin will give us some details about it Wink

Ciao
Logged
Eric
Joomla Newbie
*

Karma: +0/-1
Offline Offline

Posts: 3


View Profile
Re: JSMF 2.0.2a patch (\n\n\t\n problem)
« Reply #59 on: August 16, 2007, 06:32:38 PM »

It *seems* to work for me too.
Thanks a lot. (a patch for the a patch ?  Cool) ! Hope it will help us until Kevin has finished !
Logged
Pages: 1 2 3 [4] 5 6 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