Home arrow Forum
Latest posts of: tFF
  Welcome, Guest. Please login or register.
December 03, 2008, 05:46:42 PM
Home New Posts Search Calendar


Login with username, password and session length
  Show Posts
Pages: [1]
1  Mambo 3rd Party Addon Hacks / Module Hacks / Re: Who's Online SMF Integration on: April 08, 2005, 02:52:49 AM
Thank you.

It's not a cookie problem. It's a session storage problem. I was there on http://hacks.armeniancollegeofcalcutta.com/ and tested the prob. The user left the Who's-online counter right after the session life-time had expired. Smiley

So, everything is ok, and must admit there are no such prob with SMF Integration. Smiley

This module helped a lot. Thanks
2  Mambo 3rd Party Addon Hacks / Module Hacks / Re: Who's Online SMF Integration on: April 07, 2005, 05:50:05 PM
Same thing, same glitch.
Mambo's who's online module shows a user is online even he is logged out. Tried Mambo SMF Integration and Mambo SMF Bridge - same glitch in both of integration solutions.

That's the reason why I decided not to use integration at all.

Even more, I can't make fast log out from administrator back-end from the browser in which i previously have logged in. To manually log out the user you should open another browser (f.e. IE with FireFox) and log out the user from the back-end.

It's a cookie problem. Not solved yet. Once again, the glitch persists in both integration solutions.
3  MamboHacks.com / Mambo-SMF Integration 1.2.0 Support / Re: SMF database incorrect prefix on: April 06, 2005, 04:31:55 PM
Whom are you talking to? Aravot or me (tFF)?
What fix do you mean aravot has made?
4  MamboHacks.com / Mambo-SMF Integration 1.2.0 Support / Re: SMF database incorrect prefix on: April 06, 2005, 04:13:17 PM
Has anybody of you tried to get inside of the code to solve the prob?
look at /administrator/components/com_smf/
functions.smf.php
Code:
function isSMFInstalled()
{
global $database, $mosConfig_absolute_path, $mosConfig_db, $smf_prefix;
include_once( $mosConfig_absolute_path . '/administrator/components/com_smf/config.smf.php' );
$result = mysql_list_tables($mosConfig_db);
while ($row = mysql_fetch_row($result)) {
        if (substr($row[0],0,4) == $smf_prefix) {
      return true;
      }
    }
    return false;
}

And what do you think of it? Look here:
if (substr($row[0],0,4) == $smf_prefix) {

It's written here that prefix should be no longer than 4 symbols.
What's that? That's a glitch and a cosiquence of author is not trying to cover all the angles.

Here's a 5 minute hack for me i've made. It's not universal and doesn't prevent user from entering incorrect data (simply change the above mentioned line to this one shown below):
Code:
if ((strpos($row[0],$smf_prefix)!==false)&&(strpos($row[0],$smf_prefix)==0)) {

So, finally u should get this:
Code:
function isSMFInstalled()
{
global $database, $mosConfig_absolute_path, $mosConfig_db, $smf_prefix;
include_once( $mosConfig_absolute_path . '/administrator/components/com_smf/config.smf.php' );
$result = mysql_list_tables($mosConfig_db);
while ($row = mysql_fetch_row($result)) {
if ((strpos($row[0],$smf_prefix)!==false)&&(strpos($row[0],$smf_prefix)==0)) {
      return true;
      }
    }
    return false;
}

What has been changed:
1. here we check whether the prefix could be found in table's name
2. then if it is found we check whether the found string is at the very beginning of the name

Some side-effects here:
suppose i have prefix "msu_smf_"
so if i enter...
..."msu_smf_" - match => correct prefix
..."msu_smf" - match => component thinks the prefix is correct
..."msu_sdf" - no match => incorrect prefix

As u may see the hack doesn't prevent admin from making easy mistakes.
But it works. The purpose was to make one-line hack without any extra sub-routines.
Pages: [1]


Login with username, password and session length

Powered by MySQL Powered by PHP Forum | Powered by SMF 1.0.5 & Mambo-SMF.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!
None of the text or images in this public website may be copied without the expressed written consent of the authors.
Copyright 2005 by MamboHacks.com. Powered by Mambo. All rights reserved.
TERMS OF USE