0 Members and 1 Guest are viewing this topic.

*

Pharg

  • *****
  • 2,494
    • OsDateFourm
  • osDate Version: osDate Evo v1.2
Fix for incorrect users online count osDateEvo v1.0
« on: December 07, 2016, 12:23:29 AM »
Hi members,

Here is a small fix for incorrect users online count on the homepage, stats and in the menu users online.

Will add this to the main downloads for osDateEvo v1.0 soon.
« Last Edit: December 07, 2016, 03:40:27 AM by Pharg »
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.2 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

Re: Fix for incorrect users online count osDateEvo v1.0
« Reply #1 on: January 04, 2017, 07:40:49 PM »
Hello Pharg,

Happy New Year :-)

About this Fix, can you tell me where the changes had been made as i want to apply them Manualy. I made mid December Changes on the index.php 3 weeks (to check the username availability) and don't want just exchange the file

Best regards
Dave

*

Pharg

  • *****
  • 2,494
    • OsDateFourm
  • osDate Version: osDate Evo v1.2
Re: Fix for incorrect users online count osDateEvo v1.0
« Reply #2 on: January 04, 2017, 09:32:06 PM »
Hi Dave,

This fix was to fix the online counting not the username checking.

In the index.php at line 411 I added:

Code: [Select]
/**********************************/
       // GET ONLINE USERS
       /**********************************/

       $t->assign( 'online_users_count',$osDB->getOne('SELECT count(ou.userid) as onlineusers FROM ! ou, ! as user where ou.userid = user.id and user.allow_viewonline = ?', array( ONLINE_USERS_TABLE, USER_TABLE, '1', (time()-0) ) ) );

Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.2 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

Re: Fix for incorrect users online count osDateEvo v1.0
« Reply #3 on: January 05, 2017, 01:37:11 PM »
Thank you :-)

*

Pharg

  • *****
  • 2,494
    • OsDateFourm
  • osDate Version: osDate Evo v1.2
Re: Fix for incorrect users online count osDateEvo v1.0
« Reply #4 on: January 09, 2017, 01:20:10 AM »
Hi Members,

Another very small change to make for the onlineusers count and time.

In your template find the index.tpl and go to the bottom about line 105:
Change this:
Code: [Select]
<script type="text/javascript">
updateOnlineTime();
{if $smarty.session.UserId <= 0}
updateOnlineCount();
{/if}
</script>

To this:
Code: [Select]
<script type="text/javascript">
updateOnlineTime();
{if $smarty.session.UserId > 0}
updateOnlineCount();
{/if}
</script>

The main osDateEvo v1.0 uploads will be updated shortly.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.2 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

Re: Fix for incorrect users online count osDateEvo v1.0
« Reply #5 on: April 20, 2017, 08:50:47 AM »
Hello Phil,

is there any way to manipulate the Online User Count and registered Users without creating fake profiles?

Just as example.. 0 Online user will show as 100 and registered user insted 128 would show 528.. Is there any way to manipulate this??


Thank you
Dave

*

Pharg

  • *****
  • 2,494
    • OsDateFourm
  • osDate Version: osDate Evo v1.2
Re: Fix for incorrect users online count osDateEvo v1.0
« Reply #6 on: April 20, 2017, 11:16:18 AM »
Hi Dave,

Yes there is, you have to use the the fake.php code.

This puts real users online not fake users online, I renamed the fake.php to onlinemembers.php doesn't look so bad.

So you would then add this to the bottom of the init.php before the ?>
Like this:
Code: [Select]
include_once( 'onlinemembers.php');

When you don't want it to count anymore you can comment out the line like this:
Code: [Select]
//include_once( 'onlinemembers.php');

This stops it counting and adding members online as on every page reload it will increase the online members fast.

You can also reduce the amount of members it adds, by editing the code.

Registered Users count.
As for the registered users 128 to make it look like 528 instead, I'm not sure about that one sorry.
Maybe add +500 in the count code somewhere.
« Last Edit: April 20, 2017, 11:54:43 AM by Pharg »
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.2 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

Re: Fix for incorrect users online count osDateEvo v1.0
« Reply #7 on: April 23, 2017, 03:53:09 PM »
Thank you Phil,

exactly what i was looking for