Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Jade Elizabeth on October 20, 2008, 12:10:07 AM

Title: Stop guests and spiders being counted
Post by: Jade Elizabeth on October 20, 2008, 12:10:07 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1471)

I believe that spiders and guests aren't members. SMF 2.0 does not seem to agree with me, so with this code I have accomplished disabling them from being counted in the "most members online" statistic ;).

So in essence, this mod stops guests and spiders being counted for the "most online ever" statistic. There is no easy way to undo any "damages" the function caused (before my mod was installed, spiders and guests were counted, which may have messed up your statistics), so do NOT ask me unless you are willing to go and directly edit your database.

This mod is for 2.0 beta 4 ONLY.
Title: Re: Stop guests and spiders being counted
Post by: Minare on October 20, 2008, 03:47:20 AM
Thank you Jade  :)

and I agree, guests shouldn't be counted as members  ::)
Title: Re: Stop guests and spiders being counted
Post by: Jade Elizabeth on October 20, 2008, 08:45:06 AM
:D you're welcome!

It was one of the first things I did when I upgraded my forum, and the time I reinstalled, so I decided to package it :D
Title: Re: Stop guests and spiders being counted
Post by: babjusi on October 20, 2008, 01:14:43 PM
A very nice mod. Well done Jade :)
Title: Re: Stop guests and spiders being counted
Post by: Jade Elizabeth on October 20, 2008, 04:36:53 PM
Lol I'm starting small

/me gets a kick out of it
Title: Re: Stop guests and spiders being counted
Post by: K3TK3TK3T on October 20, 2008, 05:46:31 PM
you should make this mod give like a list of everyone who was counted online at that time, just for fun
Title: Re: Stop guests and spiders being counted
Post by: Jade Elizabeth on October 20, 2008, 06:55:53 PM
Gosh, if only I knew how to do that!
Title: Re: Stop guests and spiders being counted
Post by: Kreator on October 21, 2008, 01:29:36 AM
Any chance of a 1.1.6 mod for it!... I`m getting fed up with spiders crawling my site!
Title: Re: Stop guests and spiders being counted
Post by: Jade Elizabeth on October 21, 2008, 08:31:28 AM
They can crawl, but they arent counted in the most online stat in 1.1.6. If you want to stop spiders altogether, google "robots.txt" and make one, it will stop bots if you have the right thing :).
Title: Re: Stop guests and spiders being counted
Post by: Eliana Tamerin on October 21, 2008, 09:01:22 AM
Congrats on your first mod, Jade!
Title: Re: Stop guests and spiders being counted
Post by: Jade Elizabeth on October 21, 2008, 09:07:57 AM
Danke Eliana!

I'm planning to release a few more when I get the chance ;).
Title: Re: Stop guests and spiders being counted
Post by: ccbtimewiz on October 21, 2008, 12:10:36 PM
Congratulations on your first mod, Jade-moose. :D
Title: Re: Stop guests and spiders being counted
Post by: Jade Elizabeth on October 21, 2008, 04:52:54 PM
;D danke!

I got a few ideas for some more coming >:D.
Also small ones..
Title: Re: Stop guests and spiders being counted
Post by: K3TK3TK3T on October 22, 2008, 08:27:19 PM
congratulations on your first mod jade!

lol now figure out how to do the list-of-those-online thing
Title: Re: Stop guests and spiders being counted
Post by: dewdrinker19 on November 28, 2008, 05:01:01 AM
Is there an option to ONLY block spiders as being counted.  I want my number to be the number of alive humans online...
Title: Re: Stop guests and spiders being counted
Post by: Jade Elizabeth on November 28, 2008, 11:31:48 AM
Quote from: dewdrinker19 on November 28, 2008, 05:01:01 AM
Is there an option to ONLY block spiders as being counted.  I want my number to be the number of alive humans online...

No, but I can certainly make that for you :)

Sources/BoardIndex.php
FIND:
// Track most online statistics? (Subs-MembersOnline.php)
   if (!empty($modSettings['trackStats']))
      trackStatsUsersOnline($context['num_guests'] + $context['num_spiders'] + $context['num_users_online']);


REPLACE:
// Track most online statistics? (Subs-MembersOnline.php)
   if (!empty($modSettings['trackStats']))
      trackStatsUsersOnline($context['num_guests'] + $context['num_users_online']);
Title: Re: Stop guests and spiders being counted
Post by: dewdrinker19 on November 28, 2008, 03:45:43 PM
Thanks, I'll try this out tonight when I get home from work.

Thank you so much for the quick response, I really appreciate it!  :)
Title: Re: Stop guests and spiders being counted
Post by: Jade Elizabeth on November 28, 2008, 03:55:18 PM
No worries :D If it's in my topic I can see and respond ;D.
Title: Re: Stop guests and spiders being counted
Post by: edding2 on December 20, 2008, 03:07:55 PM
Hey Jade, I thought I'd inform you there's an incompatibility with another mod. When I tried to install it, it showed me an error saying this. I have 16 other mods installed in my forum, all of which work great, and I really wanted to add yours to the list.

Here are the other mods I have installed:

Advanced Reputation System 1.5.2
Aeva ~ Auto-Embed Video & Audio    5.0.18
Redirect_Moved_Topics 1.0
Generic Avatars 1.1
New Style Message Icon 1.1
SMF Trader System    1.2
Auto Merge Double Post 1.1
PM to New Members 1.0
Minimun Characters or Words Mod 1.0
BK-SMF Welcome Message Mod 1.0
BK-SMF Drop Down Menu 1.0
SMF Arcade 2.5 Beta 2.2 Public
Irritate lurkers with 0 posts 0.1
Wysiwyg Quick Reply 1.1
Favicon  1.2
Banned members avatar 0.1

I'd really appreciate it if you could look into this. Thanks.
Title: Re: Stop guests and spiders being counted
Post by: Jade Elizabeth on December 20, 2008, 03:09:59 PM
Can you attach your /Sources/BoardIndex.php file for me please?
Title: Re: Stop guests and spiders being counted
Post by: edding2 on December 20, 2008, 06:10:26 PM
Sorry, I can't right now because I don't have access to the FTP account. I'll be sure to attach it when I do though :)
Title: Re: Stop guests and spiders being counted
Post by: Jade Elizabeth on December 20, 2008, 07:01:34 PM
Okay, when you do I can fix it for you :).
Title: Re: Stop guests and spiders being counted
Post by: live627 on March 23, 2010, 06:49:18 PM
Any change of an update for rc3?