Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Limit Pets per user (http://www.mysidiaadoptables.com/forum/showthread.php?t=335)

Seapyramid 02-02-2009 12:58 AM

Limit Pets per user
 
First Thank You! This script is a great starting point!

There are a number of modifications I would like to do, but thankfully most can wait a bit & be implemented slowly over time. I would however like to be able to limit users on the number of "growing" pets at one time they can have. Would you be able to help me with this?

I currently have 6 stages of growth. I would like to limit the number of pets a user has on stages 1-4 to 5 pets max at any time. Stages 5 & up would not count in this limit.

Any help on this would be greatly appreciated. :)

Thanks, Sea

BMR777 02-02-2009 03:35 PM

RE: Limit Pets per user
 
I'll have to see if Johnathon can add this to the next release, which is due out in a week or two. I'm rather hesitant to make any major changes to the current version as most of it will be rewritten with the new release.

Otherwise if it is not in the new release then once the new release comes out then I can add this in. :)

Brandon

Seapyramid 02-02-2009 03:50 PM

RE: Limit Pets per user
 
Thank you so much!!! :)

Sea

BMR777 02-02-2009 03:58 PM

RE: Limit Pets per user
 
Ok, quick down and dirty solution here, in case you can't wait... :)

Download the attached adopt.php and then replace the one on your site with the attached file.

The attached file by default will make it so a user cannot have more than 4 pets with levels less than 6. To change these values, open the file in wordpad or another text editor and change:

PHP Code:

$query "SELECT * FROM owned_adoptables WHERE currentlevel < '6' and owner='".$username."'"

Change the number 6 here to the level where adoptables must be to be considered adult and do not count against the user's total.

PHP Code:

if($num >= 4){ 

Change the number 4 here to be the maximum number of young adoptables a user can have before the system denies them new pets. :)

I haven't tested this file but it should work. Let me know how it works. :)

Brandon

Seapyramid 02-02-2009 05:01 PM

RE: Limit Pets per user
 
*hugs*

That works wonderfully!!!!!! Thank you! Thank you! Thank You!

Sea

agnyz 02-02-2009 10:51 PM

RE: Limit Pets per user
 
Damn you guys amaze me, I have watched and almost every time someone has asked for something special you guys have delivered.

Any chance i could get you guys to fix a myspace friend adder script that doesn't show the pictures for people signing up with the profile 2?

I bought the damn thing for 25 bucks and thier support sucks, I told them about it a month ago and they said they would work on it and that was the last I Heard.

lol I don't really expect you guys to fix that one, just wanted to point out how good the support is on this site.

Thanks guys.


All times are GMT -5. The time now is 02:33 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.