#1
|
||||
|
||||
limit adopted eggs
need help converting this code from ver. 1.3.2 to 1.3.4
already tried to change the code but cant make it work. PHP Code:
|
#2
|
||||
|
||||
The way of writing the database query has changed, as well as setting a document's title and contents. I'll try to take a look at it a bit later.
From what I can make of it, you're trying to prevent a user from adopting any more pets if they already own so many pets under a certain level?
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it. |
#3
|
||||
|
||||
Alright, inside adoptview.php, find this function:
PHP Code:
PHP Code:
When a person goes to try to adopt a new pet now, the error will display instead. However, the bottom of this file also contains the button that will send the form. You might consider wrapping it in an if statement and removing access to it entirely when the user has too many low level pets/eggs and replacing it with a memo instructing them to go level things up instead.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it. Last edited by Kyttias; 04-16-2015 at 09:38 PM. |
#4
|
||||
|
||||
Umm... I've tried that.
but I got both. The comment, I've too many eggs AND "Congratulations...you just adopt..." Is it possible to get this function for the adopt-shop too ? Last edited by draugluin; 04-17-2015 at 04:48 AM. |
#5
|
||||
|
||||
yes im trying to prevent users from adopting more eggs...
I think im doing something wrong because i only get a blank page when i click the submit botton... and when i look at my owned adopts the adopt is there... PHP Code:
|
#6
|
||||
|
||||
Alright, let's just not display any pets here at all if the user has too many eggs, then? It'd just be teasing them, anyway.
Here's the whole document now: PHP Code:
PHP Code:
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it. Last edited by Kyttias; 04-17-2015 at 10:49 AM. |
#7
|
||||
|
||||
Thank you!! Kyttias!!!
|
#8
|
||||
|
||||
Yay! Great, I'm glad things worked out.
Though this is completely unrelated, I think you might be able to learn a lot, coding-wise, if you read through this post I made while helping someone else -- I explained a lot of what I've come to understand about the framework (at least v1.3.4) so far here, including some basic explanation of object-oriented stuffs.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it. |
#9
|
||||
|
||||
Quote:
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#10
|
||||
|
||||
@ Kyttias
ah great. It works now. Thank you very much for your help |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is there a Limit adopted eggs for 1.3.2? | Infernette | Questions and Supports | 6 | 02-08-2013 01:20 PM |
Limit Adopted Eggs | fadillzzz | Mys v1.1.x Mods | 17 | 04-03-2011 06:37 PM |
Last adopted? | Xius | Questions and Supports | 2 | 05-17-2009 03:14 PM |
Adopted by certain user levels... | densaugeo | Questions and Supports | 11 | 04-21-2009 03:33 PM |
change the "You just adopted a ..." code output | LilPixie | Questions and Supports | 2 | 02-14-2009 06:41 PM |
What's New? |
What's Hot? |
What's Popular? |