phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Fake online users


 
Search this topic... | Search MOD Requests... | Search Box
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Author Message
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Thu Jul 02, 2009 7:46 pm 
Post subject: Fake online users

Hi!

I want a MOD that will allow me to set, in the AP, a number of fake online users. For example: If on my board I have 2 registered users, 1 hidden and 3 visitors and I set 5 fake users, it has to show 2 registered, 1 hidden and 8 visitors. icon_wink.gif

Thanks!

_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Thu Jul 02, 2009 11:23 pm 
Post subject: Re: Fake online users

in includes/page_header.php
Code:

//
// Get basic (usernames + totals) online
// situation
//
$logged_visible_online = 0;
$logged_hidden_online = 0;
$guests_online = 0;
$online_userlist = '';
$l_online_users = '';


Just change those zeroes to whatever number you want to start at, and the real number of guests and users will be added.

_________________
Moof!
Lincoln's Tomb, Oak Ridge Cemetery, Springfield IL Mac 512K Blog Mac GUI
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Fri Jul 03, 2009 8:25 am 
Post subject: Re: Fake online users

Yes, it works. Dog Cow, you know many things. icon_wink.gif
But it would be even better if I could set this up from Admin Panel. icon_biggrin.gif

_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
Acaria
Board Member



Joined: 20 Feb 2009

Posts: 238



PostPosted: Fri Jul 03, 2009 9:05 am 
Post subject: Re: Fake online users

That'd be a pretty easy Mod to set up.

This just... doesn't seem very useful to me. o.o;
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Fri Jul 03, 2009 10:18 am 
Post subject: Re: Fake online users

I will tell you why I consider it pretty useful. If you go to a forum and see 2 visitors online you think, oh so is just me and some other guy. No point in writing something for myself. But if you see 5-10 visitors you say to youself: Mother, everyone will see my opinion... I'm a star! icon_cool.gif

People are more interested when they see more visitors, I guess. icon_smile.gif

_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
Acaria
Board Member



Joined: 20 Feb 2009

Posts: 238



PostPosted: Fri Jul 03, 2009 11:02 am 
Post subject: Re: Fake online users

Hmm... That's true, I suppose.

I may actually write this Mod to get some practice. :3
Back to top
Murmur
Board Member



Joined: 20 Aug 2009

Posts: 57
Location: California


flag
PostPosted: Sat Aug 29, 2009 6:34 am 
Post subject: Re: Fake online users

Simply diabolical. Downright sneaky. I like it.

$guests_online = rand(0,2) == 2 ? (5 + rand(-2,2)) : 5;

There. Now we have people coming and going.

lol...
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Sat Aug 29, 2009 9:55 am 
Post subject: Re: Fake online users

Murmur wrote:
Simply diabolical. Downright sneaky. I like it.

$guests_online = rand(0,2) == 2 ? (5 + rand(-2,2)) : 5;

There. Now we have people coming and going.

lol...

What's this with the "rand"? It ads from 2 to 5 online guest to the real number, or what?

_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Sat Aug 29, 2009 5:50 pm 
Post subject: Re: Fake online users

rand = random?
Back to top
Murmur
Board Member



Joined: 20 Aug 2009

Posts: 57
Location: California


flag
PostPosted: Sat Aug 29, 2009 8:33 pm 
Post subject: Re: Fake online users

Oh ok. Yes, rand() returns a number between MINIMUM and MAXIMUM.

rand(min,max);
http://us2.php.net/rand

Code:

if( rand(0,2) == 2 ) {     // 33 percent chance
    $guests_online = 5 + rand(-2,2);  // 5 plus or minus 2 (33% chance)
    }
else {
    $guests_online = 5; // else make  guests =5 66% of the time
    }



With these numbers you'd have 3 to 7 guests + real guests.
Back to top
dogs and things
Board Member



Joined: 18 Nov 2008

Posts: 621
Location: Spain


flag
PostPosted: Sat Aug 29, 2009 8:55 pm 
Post subject: Re: Fake online users

Or
Code:
$guests_rand = mt_rand(1, 4);
$guests_online = $guests_rand;

This will give a random amount between 1 and 4, if you want more just change 1 and 4.

_________________
phpBB2 will never die, I hope!
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 653
Location: Texas


flag
PostPosted: Wed Sep 02, 2009 5:47 pm 
Post subject: Re: Fake online users

What are you going to do if someone clicks the "Who's Online" page and doesn't see the proper number of sessions listed?
_________________
phpBBDoctor Blog
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Wed Sep 02, 2009 8:24 pm 
Post subject: Re: Fake online users

drathbun wrote:
What are you going to do if someone clicks the "Who's Online" page and doesn't see the proper number of sessions listed?

Run like hell! icon_eek.gif

That won't work.... icon_cry.gif

Seriously, though, this same code is used for viewonline, so you can just adjust the numbers again, and make the loop loop out a few more guests.

_________________
Moof!
Lincoln's Tomb, Oak Ridge Cemetery, Springfield IL Mac 512K Blog Mac GUI
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Wed Sep 30, 2009 12:16 pm 
Post subject: Re: Fake online users

We could do the same trick for adding fake messages and members? +10.000 messages and +5.000 members. No one would guess. icon_biggrin.gif But what is to change for that?
_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
Display posts from previous:   
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0139 seconds using 15 queries. (SQL 0.0025 Parse 0.0004 Other 0.0109)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo