Welcome, Guest. Please Login or Register.
November 25, 2024, 06:20:43 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Completed mods  |  [Done] Online Time Mod [v0.3a] « previous next »
Pages: 1 2 3 [4] Reply Ignore Print
Author Topic: [Done] Online Time Mod [v0.3a]  (Read 43882 times)
Surfy
Sr. Member
****
Posts: 458


I'm a llama!

Re:[Done] Online Time Mod [v0.3a]
« Reply #45 on: July 11, 2003, 06:34:11 AM »
Reply with quote


i have the German mod installed, works well  ::)


very well  ;D

Surfy
Logged
BiErLeEuW
Full Member
***
Posts: 174


WWW
Re:[Done] Online Time Mod [v0.3a]
« Reply #46 on: July 12, 2003, 06:31:04 PM »
Reply with quote

download links are dead... can somebody upload him again?
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:[Done] Online Time Mod [v0.3a]
« Reply #47 on: July 12, 2003, 07:11:59 PM »
Reply with quote

since vory isnt reponding to my IM and emails,
i'll try to upgrade the mod when i can find the time
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
BiErLeEuW
Full Member
***
Posts: 174


WWW
Re:[Done] Online Time Mod [v0.3a]
« Reply #48 on: July 13, 2003, 10:09:43 AM »
Reply with quote

tnx and i hope it's working with your more stats mod!
Logged
BiErLeEuW
Full Member
***
Posts: 174


WWW
Re:[Done] Online Time Mod [v0.3a]
« Reply #49 on: July 19, 2003, 07:31:27 PM »
Reply with quote

Quote from: Spaceman-Spiff on July 12, 2003, 07:11:59 PM
since vory isnt reponding to my IM and emails,
i'll try to upgrade the mod when i can find the time

I am still waiting for u :) Master of the YaBB Mods :) Like to intergrade him in your More stats mod
« Last Edit: July 19, 2003, 07:31:59 PM by BiErLeEuW » Logged
Thomas
Full Member
***
Posts: 203


WWW
Re:[Done] Online Time Mod [v0.3a]
« Reply #50 on: November 28, 2003, 10:13:13 PM »
Reply with quote

I am looking forward to this too. Does anyone know if it is implemented in SMF?

/Thomas
Logged
Shadow's Pawn
Support Team
YaBB God
*****
Posts: 597


ich soll nicht toten

ICQ - 8039201shadowpawn@hotmail.com WWW
Re:[Done] Online Time Mod [v0.3a]
« Reply #51 on: February 04, 2004, 03:08:57 AM »
Reply with quote

Quote from: Thomas on November 28, 2003, 10:13:13 PM
I am looking forward to this too. Does anyone know if it is implemented in SMF?

/Thomas

Yes, it is.  Go to the SMF site and you'll see that they count time online in your profile.

As for this mod...  I got it installed and no errors occur, however it does not seem to be counting the time.  Anyone else have this problem?  It might be because I'm running Enigma, but I don't think that the WriteLog function is different than in a normal YaBB SE installation.

Hopefully I can figure this out...
Logged

apologize \A*pol"o*gize\, v. i. - To lay the foundation for a future offense.
Shadow's Pawn
Support Team
YaBB God
*****
Posts: 597


ich soll nicht toten

ICQ - 8039201shadowpawn@hotmail.com WWW
Re:[Done] Online Time Mod [v0.3a]
« Reply #52 on: February 04, 2004, 04:35:24 AM »
Reply with quote

Well I narrowed the problem down a little bit.  The problem is, this thing seems incapable of figuring out what $lengthTime should be.

Here is the code:


      $result = mysql_fetch_array($request);
      if ($result != false)
      {
         $lengthTime = $logTime - $result[0];
         if ($lengthTime < 900)
            $request = mysql_query ("
               UPDATE {$db_prefix}members
               SET onlineTime=onlineTime+$lengthTime
               WHERE ID_MEMBER=$ID_MEMBER");


It appears as though the dumb thing is subtracting the same number from itself, which is resulting in 0, so it's not adding the time.

I don't know how to do this.  I'm going to try to figure it out but if anyone can drop me a hint, that would be great.
« Last Edit: February 04, 2004, 05:01:15 AM by Shadow's Pawn » Logged

apologize \A*pol"o*gize\, v. i. - To lay the foundation for a future offense.
dvucko
Noobie
*
Posts: 2


WWW
Re:[Done] Online Time Mod [v0.3a]
« Reply #53 on: February 11, 2004, 05:54:45 PM »
Reply with quote

Quote from: Shadow's Pawn on February 04, 2004, 04:35:24 AM
Well I narrowed the problem down a little bit.  The problem is, this thing seems incapable of figuring out what $lengthTime should be.

Here is the code:


      $result = mysql_fetch_array($request);
      if ($result != false)
      {
         $lengthTime = $logTime - $result[0];
         if ($lengthTime < 900)
            $request = mysql_query ("
               UPDATE {$db_prefix}members
               SET onlineTime=onlineTime+$lengthTime
               WHERE ID_MEMBER=$ID_MEMBER");


It appears as though the dumb thing is subtracting the same number from itself, which is resulting in 0, so it's not adding the time.

I don't know how to do this.  I'm going to try to figure it out but if anyone can drop me a hint, that would be great.

Use this (YaBBSE 1.5.4 / PfaBB 0.7)!  ;)

function WriteLog ()
{
   global $REMOTE_ADDR, $username, $db_prefix, $ID_MEMBER, $QUERY_STRING;

   $logTime = time();

   if ($ID_MEMBER == -1 && !empty($REMOTE_ADDR) && ip2long($REMOTE_ADDR) != -1)
   {
      $request = mysql_query ("
         DELETE FROM {$db_prefix}log_online
         WHERE logTime < " . ($logTime - 900) . "
            OR identity=IFNULL(INET_ATON('$REMOTE_ADDR'), -1)") or database_error(__FILE__, __LINE__);
      $request = mysql_query ("
         REPLACE INTO {$db_prefix}log_online
            (identity, logTime, url, ip)
         VALUES (IFNULL(INET_ATON('$REMOTE_ADDR'), -1), $logTime, '$QUERY_STRING', '$REMOTE_ADDR')") or database_error(__FILE__, __LINE__);
   }
   else
   {
      if (!is_numeric($ID_MEMBER))
         $ID_MEMBER = -1;
      //--- dodatek za online time
      $request = mysql_query("SELECT logTime FROM {$db_prefix}log_online WHERE identity='$ID_MEMBER'");
      $result = mysql_fetch_array($request);
      if ($result != false) {
         $lengthTime = $logTime - $result[0];
         if ($lengthTime < 900) $request = mysql_query ("UPDATE {$db_prefix}members SET onlineTime=onlineTime+$lengthTime WHERE ID_MEMBER=".$GLOBALS[ID_MEMBER]);
      }
      //---
      $request = mysql_query ("
         DELETE FROM {$db_prefix}log_online
         WHERE logTime < " . ($logTime - 900) . "
            OR identity=$ID_MEMBER") or database_error(__FILE__, __LINE__);
      $request = mysql_query ("
         REPLACE INTO {$db_prefix}log_online
            (identity, logTime, url, ip)
         VALUES ($ID_MEMBER, $logTime, '$QUERY_STRING', '$REMOTE_ADDR')") or database_error(__FILE__, __LINE__);

   }
}
Logged
Shadow's Pawn
Support Team
YaBB God
*****
Posts: 597


ich soll nicht toten

ICQ - 8039201shadowpawn@hotmail.com WWW
Re:[Done] Online Time Mod [v0.3a]
« Reply #54 on: February 11, 2004, 10:29:03 PM »
Reply with quote

That seems to work perfectly.  Thank you.
Logged

apologize \A*pol"o*gize\, v. i. - To lay the foundation for a future offense.
bluesyrio
Noobie
*
Posts: 21


I'm a llama!

Re:[Done] Online Time Mod [v0.3a]
« Reply #55 on: February 27, 2004, 08:40:36 PM »
Reply with quote

Quote from: Wiziwig on September 05, 2002, 04:45:44 AM
Yep I should of done that.. interesting how well meaning actions have helped you find a serious flaw with how yabbse is handling these type of posts..

:)

Yep, we have noticed this problema in our board quite a long time ago. And it's quite annoying...  :(
Logged
r0Nk0Ne
Noobie
*
Posts: 6


I'm a llama!

Re:[Done] Online Time Mod [v0.3a]
« Reply #56 on: March 01, 2004, 10:08:50 PM »
Reply with quote

Can nobody put a link? plz
Logged
Pages: 1 2 3 [4] Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Done] Online Time Mod [v0.3a] « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.062 seconds with 20 queries.