Welcome, Guest. Please Login or Register.
November 25, 2024, 06:45:41 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

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 43885 times)
Nemesis
What's an Admin?
Global Moderator
YaBB God
*****
Posts: 2199


WWW
Re:[Done] Online Time Mod [v0.3a]
« Reply #30 on: June 19, 2002, 04:21:40 AM »
Reply with quote

Update the english.ing file  ;)
Logged


Want to say thanks?
*************************************
DONATE or check out my WishList
*********************************
GaleForce
Full Member
***
Posts: 183


Zabrak Fighting for the Rebellion

murphypuppy@hotmail.com WWW
Re:[Done] Online Time Mod [v0.3a]
« Reply #31 on: June 20, 2002, 01:40:46 AM »
Reply with quote

I did updated english.lng.... No results, it still doesnt say Online For.
Logged

GaleForce
Full Member
***
Posts: 183


Zabrak Fighting for the Rebellion

murphypuppy@hotmail.com WWW
Re:[Done] Online Time Mod [v0.3a]
« Reply #32 on: June 20, 2002, 03:46:23 PM »
Reply with quote

Any suggestions?
Logged

Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
1.4.1 Online Time - Memberlist Plus V2 Compatable Part 1
« Reply #33 on: September 03, 2002, 09:55:42 PM »
Reply with quote

If you are using my Memberlist Plus mod, this mod will be compatable will you apply it. Thank you Vorapoap!

<id>
Online Time Mod
</id>

<version>
v0.3a - Memberlist Plus V2 Compatable
</version>

<mod info>
UPDATED v0.3a: Add the support to the future of mod that modify Register.php, and reduce one step!
(a: Add default to query, no need to modify Register.php)

*** If you update into version a *** Please run this query
ALTER TABLE yabbse_members ALTER COLUMN onlineTime SET DEFAULT 0;

This mod will display the online time on the profile page and member list.
(The ICQ column is replaced with OnlineTime column)

*** Run these queries first ***

ALTER TABLE yabbse_members ADD COLUMN onlineTime bigint DEFAULT 0;
UPDATE yabbse_members SET onlineTime = 0;

*** And add this to the language file. ***

$txt['mlist16'] = "Time Online";
$txt['ontime1'] = 'Online Time';
$txt['ontime2'] = 'hour';
$txt['ontime3'] = 'minute';
$txt['ontime4'] = 'second';
$txt['ontime5'] = 's';
$txt['ontime6'] = '<NOBR>Online for</NOBR>';


</mod info>

<author>
Vorapoap Lohwongwatana
</author>

<homepage>
http://www.vrl.barrysworld.net/work/mod
</homepage>

<edit file>
Sources\Subs.php
</edit file>

<search for>
   $logTime = time();
   $identity = $username;
   if($username == 'Guest') { $identity = $REMOTE_ADDR; }
</search for>

<add after>
   else {
      $request = mysql_query("SELECT logTime FROM {$db_prefix}log_online WHERE identity='$identity'");
      $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]);
      }
   }

</add after>

<edit file>
Sources\Profile.php
</edit file>

<search for>
   # get the member's info
   $request = mysql_query("SELECT passwd,realName,emailAddress,websiteTitle,websiteUrl,signature,posts,memberGroup,ICQ,AIM,YIM,gender,personalText,avatar,dateRegistered,location,birthdate,timeFormat,timeOffset,hideEmail,ID_MEMBER,usertitle,karmaBad,karmaGood,lngfile,MSN,memberIP,disableCensoring FROM {$db_prefix}members WHERE memberName='$user'");
   $memsettings = mysql_fetch_row($request);
   $request2 = mysql_query("SELECT bio,memberIP,MSN FROM {$db_prefix}members WHERE (memberName='$user')");
   $request2 = mysql_fetch_row($request2);
   $bio = $request2[0];
   $bio = htmlspecialchars($bio);
   $bio = str_replace("\t","&nbsp;&nbsp;&nbsp;",$bio);
   $bio = str_replace("\r","",$bio);
   $bio = str_replace("\n","<br>",$bio);
        $bio = DoUBBC($bio);
</search for>

<replace>
   # get the member's info
   $request = mysql_query("SELECT passwd,realName,emailAddress,websiteTitle,websiteUrl,signature,posts,memberGroup,ICQ,AIM,YIM,gender,personalText,avatar,dateRegistered,location,birthdate,timeFormat,timeOffset,hideEmail,ID_MEMBER,usertitle,karmaBad,karmaGood,lngfile,MSN,memberIP,disableCensoring,onlineTime FROM {$db_prefix}members WHERE memberName='$user'");
   $memsettings = mysql_fetch_row($request);
   $request2 = mysql_query("SELECT bio,memberIP,MSN FROM {$db_prefix}members WHERE (memberName='$user')");
   $request2 = mysql_fetch_row($request2);
   $bio = $request2[0];
   $bio = htmlspecialchars($bio);
   $bio = str_replace("\t","&nbsp;&nbsp;&nbsp;",$bio);
   $bio = str_replace("\r","",$bio);
   $bio = str_replace("\n","<br>",$bio);
        $bio = DoUBBC($bio);

   $temptime = floor($memsettings[26]/3600);

   if ($temptime > 0) {
      $onlineTime = "$temptime {$txt['ontime2']}";
      if ($temptime > 1)  $onlineTime .= $txt['ontime5'];
      $memsettings[26] = $memsettings[26]%(3600*$temptime);
   }
   $temptime = floor($memsettings[26]/60);
   if ($temptime > 0) {
      $onlineTime .= " $temptime {$txt['ontime3']}";
      if ($temptime > 1)  $onlineTime .= $txt['ontime5'];
      $memsettings[26] = $memsettings[26]%(60*$temptime);
   }
   if ($memsettings[26] > 0) {
      $onlineTime .= " $memsettings[26] {$txt['ontime4']}";
      if ($temptime > 1)  $onlineTime .= $txt['ontime5'];
   }

</replace>

<search for>
<tr>
   $karmastr
        <td><font size=2><b>$txt[233]: </b></font></td>
        <td><font size=2>$dr</font></td>
      </tr><tr>
</search for>

<add after>
        <td><font size=2><b>$txt[ontime1]: </b></font></td>
        <td><font size=2>$onlineTime</font></td>
      </tr><tr>
</add after>
Logged

Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
1.4.1 Online Time - Memberlist Plus V2 Compatable Part 2
« Reply #34 on: September 03, 2002, 09:58:37 PM »
Reply with quote

<edit file>
Sources\Memberlist.php
</edit file>

<search for>
   <td class="catbg" bgcolor="$color[catbg]" align="center" colspan="2">$sortTop<b><font size=1>$txt[86]</font></b></a></td>
</tr>
<tr>
   <td class="catbg" bgcolor="$color[catbg]" align="center"><font size=1></font></a></td>
</search for>

<replace>
   <td class="catbg" bgcolor="$color[catbg]" align="center" colspan="2">$sortTop<b><font size=1>$txt[86]</font></b></a></td>
</tr>
<tr>
   <td class="catbg" bgcolor="$color[catbg]" align="center"><font size=1>$txt[mlist16]</font></a></td>
</replace>

<search for>
$result = mysql_query("SELECT MAX(posts) FROM {$db_prefix}members");
$row = mysql_fetch_row($result);
$MOST_POSTS = ($row[0]!=0)?$row[0]:1;
</search for>

<add after>
$result = mysql_query("SELECT MAX(onlineTime) FROM {$db_prefix}members");
$row = mysql_fetch_row($result);
$MOST_ONLINE = ($row[0]!=0)?$row[0]:1;

function GetTimeLength($time) {
   $h = floor($time/3600);
   if ($h > 0) $time = $time%(3600*$h);
   $m = floor($time/60);
   if ($m > 0) $time = $time%(60*$m);
   if ($h == 0) {
      if ($m == 0) {
         if ($time == 0) return '';
         else return sprintf("%02d", $time);
      }
      else return sprintf("%2d:%02d", $m, $time);
   }
   else return sprintf("%2d:%02d:%02d", $h, $m, $time);
}
</add after>

<search for>
   $request = mysql_query("SELECT memberName,realName,websiteTitle,websiteUrl,posts,memberGroup,ICQ,AIM,YIM,MSN,emailAddress,personalText,bio,gender,location,birthdate,signature,hideEmail$sFixSort FROM {$db_prefix}members $sOrderBy LIMIT $start,$MembersPerPage");
</search for>

<replace>
   $request = mysql_query("SELECT memberName,realName,websiteTitle,websiteUrl,posts,memberGroup,onlineTime,ICQ,AIM,YIM,MSN,emailAddress,personalText,bio,gender,location,birthdate,signature,hideEmail$sFixSort FROM {$db_prefix}members $sOrderBy LIMIT $start,$MembersPerPage");
</replace>

<search for>
/*      if(isset ($row['ICQ'])) {
         $ICQ = "<a href=\"$cgi;action=icqpager;UIN=$row[ICQ]\" target=_blank><img src=\" http://web.icq.com/whitepages/online?icq=$row[ICQ]&img=5\" alt=\"$row[ICQ]\" border=0></a>";
      }*/
</search for>

<add after>
      $ICQ = GetTimeLength($row['onlineTime']);

</add after>

<search for>
      print <<< EOT
<tr>
   <td class="windowbg" bgcolor="$color[windowbg2]" align="center"><font size=1></font></b></a></td>
</search for>

<replace>
      print <<< EOT
<tr>
   <td class="windowbg" bgcolor="$color[windowbg2]" align="center"><font size=1>$onlineTime</font></b></a></td>
</replace>

<search for>
      if(isset($row['ICQ'])) {
         $ICQ = "<a href=\"$cgi;action=icqpager;UIN=$row[ICQ]\" target=_blank><img src=\" http://web.icq.com/whitepages/online?icq=$row[ICQ]&img=5\" alt=\"$row[ICQ]\" border=0></a>";
      }
</search for>

<add after>
      $onlineTime = GetTimeLength($row['onlineTime']);

</add after>

<search for>
EOT;

      print <<< EOT
<tr>
   <td class="windowbg" bgcolor="$color[windowbg2]" align="center"><font size=1></font></b></a></td>
</search for>

<replace>
EOT;

      print <<< EOT
<tr>
   <td class="windowbg" bgcolor="$color[windowbg2]" align="center"><font size=1>$onlineTime</font></b></a></td>
</replace>

<search for>
      if(isset($row['ICQ'])) {
         $ICQ = "<a href=\"$cgi;action=icqpager;UIN=$row[ICQ]\" target=_blank><img src=\" http://web.icq.com/whitepages/online?icq=$row[ICQ]&img=5\" alt=\"$row[ICQ]\" border=0></a>";
      }
</search for>

<add after>
      $onlineTime = GetTimeLength($row['onlineTime']);

</add after>

<search for>
EOT;

      print <<< EOT
<tr>
   <td class="windowbg" bgcolor="$color[windowbg2]" align="center"><font size=1></font></b></a></td>
</search for>

<replace>
EOT;

      print <<< EOT
<tr>
   <td class="windowbg" bgcolor="$color[windowbg2]" align="center"><font size=1>$onlineTime</font></b></a></td>
</replace>

<search for>
?>
</search for>
Logged

Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
Online Time Mod - Memberlist Plus V2 Compatable Part 3
« Reply #35 on: September 03, 2002, 10:01:54 PM »
Reply with quote

<add before>
function MLTopOnline () {
   global $user,$txt,$start,$MembersPerPage,$settings,$allow_hide_email,$TopAmmount,$color;
   global $TableHeader,$MOST_POSTS,$imagesdir,$cgi,$db_prefix;
   global $NUM_MEMBERS,$TableFooter,$yytitle;
    if($user == "Guest") { fatal_error("$txt[223]"); }
   $yytitle = "$txt[313] $TopAmmount $txt[314]";
   template_header();
   print $TableHeader;

   $request = mysql_query("SELECT * FROM {$db_prefix}members WHERE 1 ORDER BY onlineTime DESC LIMIT $TopAmmount");

   while ($row = mysql_fetch_array($request)) {
      $name = $row['memberName'];
      if (OnlineStatus($row['memberName']) > 0) { $online = "$txt[online6]"; } else $online = "$txt[online7]";
      $Bar = "";
      $onlineTime = "";

      $Bar = "&nbsp;";
      $onlineTime = "";

      $barchart = round(($row['posts'] / $MOST_POSTS) * 100);
      if ($barchart <= 0) {$barchart = 1;}
      $Bar = "<img src=\"$imagesdir/bar.gif\" width=$barchart height=15 border=\"0\">";

      $onlineTime = GetTimeLength($row['onlineTime']);
      $row['websiteTitle'] = isset($row['websiteTitle'])?$row['websiteTitle']:'';
      $row['websiteUrl'] = isset($row['websiteUrl'])?$row['websiteUrl']:'';
      $row['memberGroup'] = isset($row['memberGroup'])?$row['memberGroup']:'';
//

if (isset($row['MSN'])) { $hmsn=$row['MSN']; $msn = "<a href=\"http://members.msn.com/results.msnw?SearchType=1&DName=".$row[MSN]."\" target=\"_blank\"><img src=\"$imagesdir/msntalk.gif\" border=\"0\"></a>"; }

//if (isset($row['MSN'])) { $hmsn=$row['MSN']; $msn = "<a href=javascript:MsgrApp.LaunchIMUI(\"".$hmsn."\")><img src=\"$imagesdir/msntalk.gif\" border=\"0\"></a>"; $hmsn=""; } else { $msn=""; }
//
      $bio = $row['bio'];
      $bio = htmlspecialchars($bio);
      $bio = str_replace("\t","&nbsp;&nbsp;&nbsp;",$bio);
      $bio = str_replace("\r","",$bio);
      $bio = str_replace("\n","<br>",$bio);
           $bio = DoUBBC($bio);
      if ($bio == '')
         $bio = "$txt[mlist9]"; //description
      $personalText = $row['personalText'];
      $personalText = htmlspecialchars($personalText);
      $personalText = str_replace("\t","&nbsp;&nbsp;&nbsp;",$personalText);
      $personalText = str_replace("\r","",$personalText);
      $personalText = str_replace("\n","<br>",$personalText);
           $personalText = DoUBBC($personalText);
      if ($personalText == '')
         $personalText = "$txt[mlist10]"; //description
      $gender = $row['gender'];
      if ($gender == '')
         $gender = "$txt[mlist11]"; //description
      $location = $row['location'];
      if ($location == '')
         $location = "$txt[mlist12]"; //description
      $datearray = getdate(time());
      $birthdate = '';
      if (!isset($row['birthdate']) || $row['birthdate'] =='0000-00-00' || $row['birthdate']=='')
      $birthdate = "$txt[mlist13]";
      else
      {
      $birthdate = substr($row['birthdate'],0,4) == '0000' ? 'N/A' : $datearray['year']-substr($row['birthdate'],0,4)-(($datearray['mon']>substr($row['birthdate'],5,2)||$datearray['mon']==substr($row['birthdate'],5,2) && $datearray['mday']>=substr($row['birthdate'],8,2))?0:1);
      }
      $signature = $row['signature'];
      $signature = htmlspecialchars($signature);
      $signature = str_replace("\t","&nbsp;&nbsp;&nbsp;",$signature);
      $signature = str_replace("\r","",$signature);
      $signature = str_replace("\n","<br>",$signature);
           $signature = DoUBBC($signature);
      if ($signature == '')
         $signature = "$txt[mlist14]"; //description
//
      if($row['posts'] > 100000) { $row['posts'] = "$txt[683]"; }
      $euser=urlencode($row['memberName']);
Logged

Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
1.4.1 Online Time - Memberlist Plus V2 Compatable Part 4
« Reply #36 on: September 03, 2002, 10:03:38 PM »
Reply with quote


         print<<<EOT

         <tr>
EOT;
         // Online Status
            if ($online == "$txt[online6]"){ print <<< EOT
            <td class="windowbg2" bgcolor="$color[windowbg2]" align="center"><a href="$cgi;action=imsend;to=$row[memberName]" target="_blank"><img src="$imagesdir/greenon.gif" alt="Online" border="0" align="absmiddle"></td>
EOT;
         } else { print<<<EOT
            <td class="windowbg2" bgcolor="$color[windowbg2]" align="center"><a href="$cgi;action=imsend;to=$row[memberName]" target="_blank"><img src="$imagesdir/redoff.gif" alt="Offline" border="0" align="absmiddle"></td>
EOT;
         }
         // Adds Online Status and Send IM
         print <<< EOT
         <td class="windowbg" bgcolor="$color[windowbg]"><font size=2><a href="$cgi;action=imsend;to=$row[memberName]" target="_blank">$row[realName]</a></font></td>
EOT;
         // Adds Email Address
         if ($row['hideEmail'] && $settings[7] != "Administrator" && $allow_hide_email) { print <<<EOT
            <td class="windowbg2" bgcolor="$color[windowbg2]" align="center"><img src="$imagesdir/lockmail.gif" alt="Hidden Address" border="0" align="absmiddle"></a>
EOT;
         } else { print<<<EOT
            <td class="windowbg2" bgcolor="$color[windowbg2]"><font size=2><a href="mailto:$row[emailAddress]">$row[emailAddress]</a></font></td>
EOT;
         }
         // Adds Website
         if ($row[websiteUrl]){ print <<<EOT
            <td class="windowbg" bgcolor="$color[windowbg]" align="center"><a href="$row[websiteUrl]" target="_blank"><img src="$imagesdir/www2.gif" alt="$row[websiteTitle]" border="0" align="absmiddle"></a></td>
EOT;
         }
         else {
            print<<<EOT
            <td class="windowbg" bgcolor="$color[windowbg]">&nbsp;</td>
EOT;
         }
         // Adds ICQ
         if(isset ($row['ICQ'])) { print <<<EOT
            <td class="windowbg2" bgcolor="$color[windowbg2]" align="center"><a href="$cgi;action=icqpager;UIN=$row[ICQ]" target=_blank><img src="http://web.icq.com/whitepages/online?icq=$row[ICQ]&img=5" alt="$row[ICQ]" border="0" align="absmiddle"></a></td>
EOT;
         }
         else { print <<< EOT
            <td class="windowbg2" bgcolor="$color[windowbg2]">&nbsp;</td>
EOT;
         }
         // Adds AIM
         if($row[AIM]) { print <<<EOT
            <td class="windowbg2" bgcolor="$color[windowbg2]" align="center"><a href="aim:goim?screenname=$row[AIM]&amp;message=Hi.+Are+you+there?"><img src="$imagesdir/aim.gif" alt="$row[AIM]" border="0" align="absmiddle"></a></td>
EOT;
         }
         else { print <<< EOT
            <td class="windowbg2" bgcolor="$color[windowbg2]">&nbsp;</td>
EOT;
         }
         // Adds YIM
         if($row[YIM]) { print <<<EOT
            <td class="windowbg2" bgcolor="$color[windowbg2]" align="center"><a href="http://edit.yahoo.com/config/send_webmesg?.target=$row[YIM]"><img SRC="http://opi.yahoo.com/online?u=$row[YIM]&m=g&t=0" alt="$row[YIM]" NO SAVE border="0" align="absmiddle"></a></td>
EOT;
         }
         else { print <<< EOT
            <td class="windowbg2" bgcolor="$color[windowbg2]">&nbsp;</td>
EOT;
         }
         // Adds MSN
if (strlen($row[MSN])>1)
{
print <<<EOT
         <td class="windowbg2" bgcolor="$color[windowbg2]" align="center">$msn</a></td>

EOT;
}         print <<<EOT
         <td class="windowbg" bgcolor="$color[windowbg]"><font size=2>$row[memberGroup]</font>&nbsp;</td>
         <td class="windowbg2" bgcolor="$color[windowbg2]" align="center"><font size=2>$row[posts]</font>&nbsp;</td>
         <td class="windowbg" bgcolor="$color[windowbg]">$Bar</td>
      </tr>

EOT;

      print <<< EOT
<tr>
   <td class="windowbg" bgcolor="$color[windowbg2]" align="center"><font size=1>$onlineTime</font></b></a></td>
   <td class="windowbg2" bgcolor="$color[windowbg2]" align="center"><font size=1>$gender</font></b></a></td>
   <td class="windowbg" bgcolor="$color[windowbg2]" align="center"><font size=1>$bio</font></b></a></td>
   <td class="windowbg2" bgcolor="$color[windowbg2]" align="center"><font size=1>$location</font></b></a></td>
   <td class="windowbg" bgcolor="$color[windowbg2]" align="center"><font size=1>$personalText</font></b></a></td>
   <td class="windowbg2" bgcolor="$color[windowbg2]" align="center"><font size=1><a href="$cgi;action=profile;user=$row[memberName]" target="_blank"><img src="$imagesdir/go_y.gif" alt="Edit Profile" border="0" align="absmiddle"></font></b></a></td>
   <td class="windowbg" bgcolor="$color[windowbg2]" align="center"><font size=1></font></b></a></td>
   <td class="windowbg2" bgcolor="$color[windowbg]"><font size=1><a href="$cgi;action=imsend;to=$row[memberName]" target="_blank"><center>$txt[mlist8]</center></a></font></td>
   <td class="windowbg" bgcolor="$color[windowbg2]" align="center"><font size=1>$birthdate</font></b></a></td>
   <td class="windowbg2" bgcolor="$color[windowbg2]" align="center"><font size=1><a href="$cgi;action=viewprofile;user=$euser" target="_blank"><img src="$imagesdir/question.gif" alt="$txt[mlist15]" border="0" align="absmiddle"></font></b></a></td>
   <td class="windowbg" bgcolor="$color[windowbg2]" align="center"><font size=1>$signature</font></b></a></td>
</tr>
<tr>
   <td class="catbg" bgcolor="$color[catbg]" align="center"><font size=1></font></a></td>
</tr>
EOT;
   }

   print $TableFooter;

   footer();
   obExit();
}
</add before>
Logged

Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
1.4.1 Online Time - Memberlist Plus V2 Compatable Part 5
« Reply #37 on: September 03, 2002, 10:05:01 PM »
Reply with quote

<search for>
if($action == "mltop") { $Sort .= "$txt[305] $txt[411] $TopAmmount $txt[306]"; } else { $Sort .= "<a href=\"$cgi;action=mltop\"><font size=2 class=\"text1\" color=\"$color[titletext]\">$txt[305] $txt[411] $TopAmmount $txt[306]</font></a>"; }
</search for>

<replace>
if($action == "mltop") { $Sort .= "$txt[305] $txt[411] $TopAmmount $txt[306] | "; } else { $Sort .= "<a href=\"$cgi;action=mltop\"><font size=2 class=\"text1\" color=\"$color[titletext]\">$txt[305] $txt[411] $TopAmmount $txt[306]</font></a> | "; }
if($action == "mlonline") { $Sort .= "$txt[305] $txt[411] $TopAmmount $txt[ontime6]"; } else { $Sort .= "<a href=\"$cgi;action=mlonline\"><font size=2 class=\"text1\" color=\"$color[titletext]\">$txt[305] $txt[411] $TopAmmount $txt[ontime6]</font></a>"; }
</replace>

<search for>
   $request = mysql_query("SELECT * FROM {$db_prefix}members WHERE 1 ORDER BY posts DESC LIMIT $TopAmmount");

   while ($row = mysql_fetch_array($request)) {
//

if (isset($row['MSN'])) { $hmsn=$row['MSN']; $msn = "<a href=\"http://members.msn.com/results.msnw?SearchType=1&DName=".$row[MSN]."\" target=\"_blank\"><img src=\"$imagesdir/msntalk.gif\" border=\"0\"></a>"; }

//if (isset($row['MSN'])) { $hmsn=$row['MSN']; $msn = "<a href=javascript:MsgrApp.LaunchIMUI(\"".$hmsn."\")><img src=\"$imagesdir/msntalk.gif\" border=\"0\"></a>"; $hmsn=""; } else { $msn=""; }
//
      $name = $row['memberName'];
      if (OnlineStatus($row['memberName']) > 0) { $online = "$txt[online6]"; } else $online = "$txt[online7]";
      $Bar = "";
      $ICQ = "";

      $Bar = "&nbsp;";
      $ICQ = "";

      $barchart = round(($row['posts'] / $MOST_POSTS) * 100);
      if ($barchart <= 0) {$barchart = 1;}
      $Bar = "<img src=\"$imagesdir/bar.gif\" width=$barchart height=15 border=\"0\">";

      if(isset($row['ICQ'])) {
         $ICQ = "<a href=\"$cgi;action=icqpager;UIN=$row[ICQ]\" target=_blank><img src=\" http://web.icq.com/whitepages/online?icq=$row[ICQ]&img=5\" alt=\"$row[ICQ]\" border=0></a>";
      }
      $row['websiteTitle'] = isset($row['websiteTitle'])?$row['websiteTitle']:'';
</search for>

<replace>
   $request = mysql_query("SELECT * FROM {$db_prefix}members WHERE 1 ORDER BY onlineTime DESC LIMIT $TopAmmount");

   while ($row = mysql_fetch_array($request)) {
//

if (isset($row['MSN'])) { $hmsn=$row['MSN']; $msn = "<a href=\"http://members.msn.com/results.msnw?SearchType=1&DName=".$row[MSN]."\" target=\"_blank\"><img src=\"$imagesdir/msntalk.gif\" border=\"0\"></a>"; }

//if (isset($row['MSN'])) { $hmsn=$row['MSN']; $msn = "<a href=javascript:MsgrApp.LaunchIMUI(\"".$hmsn."\")><img src=\"$imagesdir/msntalk.gif\" border=\"0\"></a>"; $hmsn=""; } else { $msn=""; }
//
      $name = $row['memberName'];
      if (OnlineStatus($row['memberName']) > 0) { $online = "$txt[online6]"; } else $online = "$txt[online7]";
      $Bar = "";
      $ICQ = "";
      $onlineTime = "";

      $Bar = "&nbsp;";
      $ICQ = "";
      $onlineTime = "";

      $barchart = round(($row['posts'] / $MOST_POSTS) * 100);
      if ($barchart <= 0) {$barchart = 1;}
      $Bar = "<img src=\"$imagesdir/bar.gif\" width=$barchart height=15 border=\"0\">";

      $onlineTime = GetTimeLength($row['onlineTime']);

      if(isset($row['ICQ'])) {
         $ICQ = "<a href=\"$cgi;action=icqpager;UIN=$row[ICQ]\" target=_blank><img src=\" http://web.icq.com/whitepages/online?icq=$row[ICQ]&img=5\" alt=\"$row[ICQ]\" border=0></a>";
      }
      $row['websiteTitle'] = isset($row['websiteTitle'])?$row['websiteTitle']:'';
</replace>

<edit file>
index.php
</edit file>

<search for>
      else if ($action == 'mlletter') { include_once "$sourcedir/Memberlist.php"; MLByLetter(); }
</search for>

<add after>
      else if ($action == 'mlonline') { include_once "$sourcedir/Memberlist.php"; MLTopOnline(); }
</add after>
Logged

Nemesis
What's an Admin?
Global Moderator
YaBB God
*****
Posts: 2199


WWW
Re:[Done] Online Time Mod [v0.3a]
« Reply #38 on: September 04, 2002, 03:25:42 AM »
Reply with quote

wouldn't be easier to attach it as an boardmod file? Atleast then the template system here at yabb.info will not be broken.  ;D
Logged


Want to say thanks?
*************************************
DONATE or check out my WishList
*********************************
Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
Re:[Done] Online Time Mod [v0.3a]
« Reply #39 on: September 05, 2002, 04:45:44 AM »
Reply with quote

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..

:)
Logged

Beertje
Noobie
*
Posts: 12


Re:[Done] Online Time Mod
« Reply #40 on: October 07, 2002, 10:42:13 AM »
Reply with quote

Quote from: vorapoap (vory) on May 08, 2002, 07:27:46 AMIt determines the length of time between each click, and then add it to the onlineTime.
Just a few simple questions:

What happens with my online time when I logged in with the option "always stay logged in" and I return after a few days?

Will these days be added to my online time (time between 2 clicks = xx days), or is there a threshold for the time between 2 clicks that will not be counted?

If there is a threshold, how large is it?

Can anyone answer these questions?

Thanks.
Logged
1979Z28
Sr. Member
****
Posts: 324


WWW
Re:[Done] Online Time Mod [v0.3a]
« Reply #41 on: October 07, 2002, 06:00:16 PM »
Reply with quote

I would imagine that the 'counter' for being online would be reset. Clicking the box to keep you logged in, doesn't leave you logged in all the time, it just automatically logs you in the next time you visit the page.
Logged
Gere
Jr. Member
**
Posts: 53


I'm a llama!

Re:[Done] Online Time Mod [v0.3a]
« Reply #42 on: July 07, 2003, 04:00:08 PM »
Reply with quote

Has someone updated this great mod to work with 1.5.1?
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

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

i was told the german version works well: http://www.yabbse.org/community/index.php?board=171;action=display;threadid=23758
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Wiziwig
Sr. Member
****
Posts: 407


Programmer and Users Liason and Manager

WWW
Re:[Done] Online Time Mod [v0.3a]
« Reply #44 on: July 09, 2003, 08:51:29 AM »
Reply with quote

Someone in the german forum posted the most recent converted mod and that conversion was done by me for YabbSE Pre-1.5.1 R40, I had given up further coversion development of that mod after the release of YabbSE 1.5.1. Reason, The mod no longer worked. Why? It no longer read or calculated the time values from logonline. Why? Something that YabbSE Changed in the logging functions and I haven't investigated what I would need to have done to make the function work again.

Quote from: Spaceman-Spiff on July 07, 2003, 06:59:03 PM
i was told the german version works well: http://www.yabbse.org/community/index.php?board=171;action=display;threadid=23758
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.104 seconds with 20 queries.