Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 11-24-2011, 08:28 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,386
SilverDragonTears is on a distinguished road
Default Limit amount of clicks per day

I need to put a limit on the amount of times an adopt's level up link can be clicked. This is because some of my members are using Yarolds and leveling up their pets in a ridiculous amount of time ie: 5 minutes after catching an egg, their adopt becomes an adult. I don't want to increase the amount of clicks it takes to level up because most of my users do not use Yarolds.

Can anyone help me out with this? :)
__________________

Check out SilvaTales
Reply With Quote
  #2  
Old 11-24-2011, 11:47 PM
Slix's Avatar
Slix Slix is offline
Member
 
Join Date: Jun 2010
Posts: 14
Credits: 2,232
Slix
Default

You could do what I did and simply block incoming traffic from Yarold's.
__________________
Poliwager ~ Pokémon Forums ~ Adopt a Pokémon

Reply With Quote
  #3  
Old 11-24-2011, 11:58 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,386
SilverDragonTears is on a distinguished road
Default

Oh please tell me how!! i'm not sure I'll go that route... but if I have to...
__________________

Check out SilvaTales

Last edited by SilverDragonTears; 11-25-2011 at 12:01 AM.
Reply With Quote
  #4  
Old 11-25-2011, 07:58 AM
Csar Csar is offline
Member
 
Join Date: Oct 2011
Posts: 7
Gender: Male
Credits: 783
Csar is on a distinguished road
Default

Quote:
Originally Posted by SilverDragonTears View Post
Oh please tell me how!! i'm not sure I'll go that route... but if I have to...
Well, you wouldn't need to "block" the users but simply not count if they're eing referred, If I'm right you could use something like this:

PHP Code:
<?php
    $blacklist 
Aray(/*Terms that identify banned sites for example:*/ 'yarolds''google');
    
$click_allowed true;
    foreach (
$blacklist as $disallowedpage
        if (
strpos($_SERVER['HTTP_REFERRER'], $disallowedpage) !== false$click_allowed=false;
?>
Later you can just check against your prohibited pages, something like this
PHP Code:
<?php
    
if ($click_allowed) echo 'This is a normal user';
    else echo 
'You should not use any click services';
?>
If you would like to limit the number of clicks everyday you would need to add an extra table to your MySQL.

Hope it helped

C#
Reply With Quote
  #5  
Old 11-25-2011, 10:29 AM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,386
SilverDragonTears is on a distinguished road
Default

I'm not sure exactly where to put these?
__________________

Check out SilvaTales
Reply With Quote
  #6  
Old 11-25-2011, 01:51 PM
Nemesis's Avatar
Nemesis Nemesis is offline
Member
 
Join Date: Mar 2011
Location: Ohio, United States
Posts: 641
Gender: Male
Credits: 49,019
Nemesis is on a distinguished road
Default

lol wow so i wonder if people would be willing to pay for clicks. $0.10 cpm lol that i can actually provide. Though this doesn't help SDT's situation lol.
__________________
https://gemnode.com
Free Hosting for Mysidia Adopt Sites
Just join our forum and request your free hosting account
Reply With Quote
  #7  
Old 11-27-2011, 10:38 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 333,906
Hall of Famer is on a distinguished road
Default

Quote:
Originally Posted by Csar View Post
Well, you wouldn't need to "block" the users but simply not count if they're eing referred, If I'm right you could use something like this:

PHP Code:
<?php
    $blacklist 
Aray(/*Terms that identify banned sites for example:*/ 'yarolds''google');
    
$click_allowed true;
    foreach (
$blacklist as $disallowedpage
        if (
strpos($_SERVER['HTTP_REFERRER'], $disallowedpage) !== false$click_allowed=false;
?>
Later you can just check against your prohibited pages, something like this
PHP Code:
<?php
    
if ($click_allowed) echo 'This is a normal user';
    else echo 
'You should not use any click services';
?>
If you would like to limit the number of clicks everyday you would need to add an extra table to your MySQL.

Hope it helped

C#
This looks cool, but seems that you made a typo here:

PHP Code:
    $blacklist Aray(/*Terms that identify banned sites for example:*/ 'yarolds''google'); 
It should be this if I am correct:

PHP Code:
    $blacklist = Array(/*Terms that identify banned sites for example:*/ 'yarolds''google'); 
But anyway I do not recommend the approach to block incoming traffic, since even without Yarold they can still find other ways to level up quickly. A better approach is to write a code that count how many clicks this very adoptable has received during the day and generates an error message if the number is above 10.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #8  
Old 11-28-2011, 03:22 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,386
SilverDragonTears is on a distinguished road
Default

How can I do this HoF?
__________________

Check out SilvaTales
Reply With Quote
  #9  
Old 11-28-2011, 11:14 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 333,906
Hall of Famer is on a distinguished road
Default

Well this can be achieved by adding these lines somewhere in levelup.php:

PHP Code:
$result runquery("SELECT * FROM {$prefix}vote_voters WHERE adoptableid='{$id}' and date = '{$date}'");
$num mysql_num_rows($result);
if(
$num >= 10){
$article_content .= "An error has occurred, this adoptable has been leveled up 10 times already today. " 
}
else{
// codes to execute if the adoptable can be leveled up

__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #10  
Old 11-28-2011, 11:17 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,386
SilverDragonTears is on a distinguished road
Default

HoF... have I mentioned how awesome you are? Will this still allow them to get money for clicking on it? I'd want them to be able to.
__________________

Check out SilvaTales
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to increase amount of clicks per day... Mortain Questions and Supports 6 12-02-2015 05:31 AM
Limit clicks/day to 10 sensacion Questions and Supports 1 07-02-2011 05:15 AM
amount of users currently online Tony Suggestions and Feature Requests 1 02-06-2011 10:20 PM
Limit clicks/day to 10, for each pet? Quillink Questions and Supports 9 02-08-2010 02:35 PM
Is there a way to limit the amount of adoptables a person can adopt? crydrk Suggestions and Feature Requests 2 08-01-2009 04:34 PM


All times are GMT -5. The time now is 10:16 AM.

Currently Active Users: 9701 (0 members and 9701 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636