Page Index Toggle Pages: 1 ... 5 6 [7]  Send TopicPrint
Very Hot Topic (More than 25 Replies) Users Online Counter for SP 1.3.1 (Read 45157 times)
paclady
Full Member
***
Offline


I love YaBB 1G - SP1.3!

Posts: 196
Joined: Feb 6th, 2004
Re: Users Online Counter for SP 1.3.1
Reply #90 - Apr 5th, 2005 at 9:07pm
Print Post  
Ok, I will live with it  Undecided  At least it is working ahlf way
  
Back to top
WWW  
IP Logged
 
qvae
Junior Member
**
Offline


I love YaBB 1G - SP1.2!

Posts: 52
Joined: Dec 14th, 2004
Re: Users Online Counter for SP 1.3.1
Reply #91 - May 2nd, 2005 at 10:13pm
Print Post  
I'm having the same problem, but mine is worse in that mine is not showing the users name or date and time. Just that someone is on the board index.

Any Help?
  
Back to top
 
IP Logged
 
mimit
Full Member
***
Offline


I love YaBB 1G - SP1.2!

Posts: 247
Location: Buenos Aires
Joined: Jun 16th, 2003
Gender: Male
Re: Users Online Counter for SP 1.3.1
Reply #92 - May 8th, 2005 at 6:11am
Print Post  
I have some problem with this mod, It works good for some time but them I install a few more mods and now its broken, the colour are broken and some tables take a look
the colours are by default but shows all in red

http://www.tete-net.com.ar/cgi-bin/YaBB.cgi?board=;action=who

Im Also check again de Users_online_counter_13.mod and I find in Boardindex.pl some errors, it could be there the problem? take a look of this:

In some step in BoardIndex.pl I put this when I install the mod one year ago... and works fine until I broken install other mod...

Quote:
<replace>
     <!-- WHOSON MOD START -->
     </tr>~;
     if ($Show_OnlineBar == 1 || $Show_OnlineBar eq "") {
           $yymain .= qq~
     <tr>
       <td class="catbg" bgcolor="$color{'catbg'}" colspan="2"> <font size="2" class="catbg"><b>$txt{'158'}</b></font></td>
     </tr><tr>
       <td class="windowbg" bgcolor="$color{'windowbg'}" width="20" valign="middle" align="center"><img src="$imagesdir/online.gif" border="0" alt=""></td>
       <td class="windowbg2" bgcolor="$color{'windowbg2'}"><font size=1>
       <table width="98%" cellpadding="3" align="center">
         <tr>
           <td valign="top" align="left"><font size="1">
           $uwhoonline$uguest $uuser<BR>$users $uonline
           </font></td>
         </tr>
       </table>
       </font></td>
     </tr>~;
     }
     ## WHOSON MOD END ##

</replace>


In this place I have this

Quote:
     <!-- WHOSON MOD START -->
     </tr>~;
     if ($Show_OnlineBar == 1 || $Show_OnlineBar eq "") {
           $yymain .= qq~
     <tr>

~;
     if ($forum_staff) {
           # Load MemberGroups
           if(!$MemStatAdmin) {
                 fopen(FILE, "$vardir/membergroups.txt") || &fatal_error("100 $txt{'106'}: $txt{'23'} membergroups.txt");
                 @membergroups = <FILE>;
                 fclose(FILE);
                 chomp $membergroups[0]; $tmp_admin_txt = $membergroups[0] || "Administrator";
                 chomp $membergroups[7]; $tmp_gmod_txt =  $membergroups[7] || "Global Moderator";
           } else {
                 $tmp_admin_txt = $MemStatAdmin || "Administrator";
                 $tmp_gmod_txt = $MemStatGMod || "Global Moderator";
           }

           fopen(FILE, "$vardir/mem_groups.txt");
           @mem_groups = <FILE>;
           fclose(FILE);
           @mem_groups = sort{uc($a) cmp uc($b)} (@mem_groups);
           foreach $curentry (@mem_groups) {
                 chomp $curentry;
                 ($tmp_username, $tmp_group, $tmp_name) = split(/\|/, $curentry);
                 if ($group_list{$tmp_group}) { $group_list{$tmp_group} .= qq~, ~;}
                 $group_list{$tmp_group} .= qq~<a href="$scripturl?action=viewprofile;username=$tmp_username">$tmp_name</a>~;
           }

           @staff = split (/,/, $forum_staff);
           $list = "";
           foreach $curentry (@staff) {
                 $curentry =~ s~^\s*(\S.*?\S|\S)\s*$~$1~;
                 if($curentry eq "Administrator") {$tmp_group_txt = $tmp_admin_txt;}
                 elsif($curentry eq "Global Moderator") {$tmp_group_txt = $tmp_gmod_txt;}
                 else {$tmp_group_txt = $curentry;}
                 if ($group_list{$curentry}) { $list .= qq~
            <tr>
              <td width="10%" valign="top" nowrap><font size="1"><b>$tmp_group_txt:</b>&nbsp;</font></td><td valign="top"><font size="1">$group_list{$curentry}</font></td>
            </tr>~;
                 }
           }

           if ($list) {$yymain .= qq~
         <td class="catbg" bgcolor="$color{'catbg'}" colspan="2"> <font size="2"><b>$txt{'509c'}</b></font></td>
       </tr><tr>
        <td class="windowbg" bgcolor="$color{'windowbg'}" width="20" valign="middle" align="center"><img src="$imagesdir/admin.gif" border="0" alt="" align="absmiddle"></td>
        <td class="windowbg2" bgcolor="$color{'windowbg2'}">
          <table width="98%" cellpadding="0" align="center">$list
          </table>
        </td>
     ~;
     if($totalt > 0) {
           require "$sourcedir/TopStats.pl";
           &TopLink;
     }
     $yymain .= qq~
      </tr><tr>~;
           }
     }
     $yymain .= qq~
       <td class="catbg" bgcolor="$color{'catbg'}" colspan="2"> <font size="2" class="catbg"><b>$txt{'158'}</b></font></td>
     </tr><tr>
       <td class="windowbg" bgcolor="$color{'windowbg'}" width="20" valign="middle" align="center"><img src="$imagesdir/online.gif" border="0" alt=""></td>
       <td class="windowbg2" bgcolor="$color{'windowbg2'}"><font size=1>
       <table width="98%" cellpadding="3" align="center">
         <tr>
           <td valign="top" align="left"><font size="1">
           $uwhoonline$uguest $uuser<BR>$users $uonline<BR>$uttxt{'1'} $usertodaycount $uttxt{'2'} $usertoday
           </font></td>
         </tr>
       </table>
       </font></td>

     ~;

     $high_lst = 5; # Set the number of members in the list

     my(@templist, @SortAList);
     fopen(FILE, "$memberdir/memberlist.txt");
     @membername = <FILE>;
     $memcount = @membername;
     fclose(FILE);
     $z = 0;
     $total_topposts = 0;
     $total_posts = 0;
     for($i=0;$i<$memcount;$i++) {
           chomp(@membername);
           $membname = $membername[$i];
           fopen(MEMBERFILE,"$memberdir/$membname.dat");
           @member = <MEMBERFILE>;
           fclose(MEMBERFILE);
           chomp(@member);
           if($member[6] > 0) {
                 $templist[$z] .= qq($member[6]|$member[1]|$membname);
                 $total_posts = $total_posts + $member[6];
                 $z++;
           }
     }
     @SortAList = sort{$b<=>$a} (@templist);
     $pstmem = @SortAList;
     if($pstmem > $high_lst) { $pstmem = $high_lst }

     if($pstmem > 0) {
           $yymain .= qq~
           </tr><tr>
             <td class="catbg" bgcolor="$color{'catbg'}" colspan="2"> <font size="2" class="catbg"><b>$txt{'411a'} $pstmem $txt{'306'}</b></font></td>
           </tr><tr>
             <td class="windowbg" bgcolor="$color{'windowbg'}" width="20" valign="middle" align="center"><img src="$imagesdir/guest.gif" border="0" alt=""></td>
             <td class="windowbg2" bgcolor="$color{'windowbg2'}">
             <table width="98%" cellpadding="3" align="center">
             <tr>
             <td width="50%" valign="top" align="left">
             <table cellpadding="2" cellspacing="0" border="0" align="left">
           ~;
           for($i=0;$i<$pstmem;$i++) {
                 $x = $i+1;
                 chomp(@SortAList);
                 ($shposts[$i], $shname[$i], $usname[$i]) = split(/\|/, $SortAList[$i]);
                 $total_topposts = $total_topposts + $shposts[$i];
                 $Bar = "";
                 $barchart = ($shposts[$i]);
                 $bartemp = ($shposts[$i] * 100);
                 $barwidth = ($bartemp / $shposts[0]);
                 $barwidth = ($barwidth + 0.5);
                 $barwidth = int($barwidth);
                 if($barwidth > 100) {$barwidth = 100}
                 if ($barwidth < 1) {$Bar = "$Bar";}
                 else {
                       $Bar = qq~<img src="$imagesdir/bar.gif" width="$barwidth" height="10" alt="" border="0">~;
                 }
                 if ($Bar eq "") { $Bar="&nbsp;"; }
                 &LoadUser($usname[$i]);
           $yymain .= qq~
               <tr>
                 <td valign="middle" align="right"><font size="1"><b>$x.</b></font></td>
                 <td valign="middle" align="left"><font size="1"><a href="$scripturl?action=viewprofile;username=$useraccount{$usname[$i]}"><b>$shname[$i]</b></a></font></td>
                 <td valign="middle" align="right"><font size="1">$shposts[$i]</font></td>
                 <td valign="middle" align="left">$Bar</td>
               </tr>
           ~;
           }
           $tmp_pct = ($total_topposts * 100) / $total_posts;
           $top_pct = sprintf ("%.2f", $tmp_pct);
           $yymain .= qq~
             </table>
             </td>
             <td width="50%" valign="top" align="left"><font size="1">
                 $pstmem $txt{'314'}:<br>
                 - $total_topposts $txt{'86'}<br>
                 - $top_pct% $txt{'309'} $txt{'190'} $txt{'86'}
             </font></td>
           </tr>
           </table>
           </td>
           ~;
     }
     $yymain .= qq~
     </tr>~;
     }
     ## WHOSON MOD END ##

I put in Yellow the part of code of the mod but are dispersed...

It could be there the problem of broken tables and colours here http://www.tete-net.com.ar/cgi-bin/YaBB.cgi?board=;action=who

Please I need Help  Undecided Im triyng to fix this since December but I cant.
  
Back to top
 
IP Logged
 
Squirrelman
Junior Member
**
Offline


The Squirerl Never Sleeps!

Posts: 59
Joined: Nov 8th, 2004
Gender: Male
Re: Users Online Counter for SP 1.3.1
Reply #93 - Aug 13th, 2006 at 3:54am
Print Post  
YAY!  I finally got this to work.  I have to hand edit one step, but it's all working fine now.

Just a question (I might have missed it in this long thread).  The counter is including the number of Guests that signed on.  Is there a way to exclude "guests" from the count of the most users on line in one day?

Thanks in advance!!
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1 ... 5 6 [7] 
Send TopicPrint