#1
|
|||
|
|||
Secure Random Adoption V2
This mod is intended for people who already or wanted to have a random adoption process on their adoptables site.
Compatibility: Mys V1.2.x NOTE:Please make a backup of your files before installing this mod! 1. Open your adopt.php and find PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Anyway, let's move on. 4. Find the following PHP Code:
PHP Code:
5. Finally, find the last closing curly bracket PHP Code:
PHP Code:
6. Now, to prevent some users from cheating. Open your doadopt.php, we'll just do a slight query modification. Find this query PHP Code:
PHP Code:
Done! Let me know if there's any problem with this mod. :) |
#2
|
||||
|
||||
Excellent, this happens to be exactly what I needed right now!! Thank you so much!!
|
#3
|
||||
|
||||
I'd like to thank you very much this is just what I needed for my site and it works perfectly.
|
#4
|
|||
|
|||
You're welcome!
I'm glad that this mod help some people on building their adoptables site. |
#5
|
||||
|
||||
I noticed that the code in the doadopt.php has some minor variation, will this effect the above changes?
Here's the current code, noticing brackets instead of single quotes: $query = "SELECT * FROM {$prefix}adoptables WHERE id={$id}"; |
#6
|
||||
|
||||
Nope, the bracket and single quote both work perfectly. In fact the bracket version is preferred and used in current Mysidia Adoptables script, as it is easier to read from the viewpoints of mine and my coders'.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#7
|
||||
|
||||
Thanks for the quick reply
|
#8
|
||||
|
||||
I'm not sure if this is the place to ask, and if not, let me know, but I would like to add an extra feature to this code which makes some of the random pets more rare than others. I found this code on this site which uses a 'chance' variable which will decrease the odds of the random pick on some of the images:
http://www.chickensmoothie.com/tutorial/tut3/index.html If anyone has time to take a peek and let me know how this can be added into this mod code, I would be very grateful as I'm good at following directions, but not so good at knowing how to do this myself. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adoption Problems | Kamalya | Questions and Supports | 8 | 01-27-2013 01:15 PM |
Secure Random Adoption Process | fadillzzz | Mys v1.1.x Mods | 19 | 02-14-2011 11:12 AM |
Random Adoption | nitrogen | Questions and Supports | 4 | 05-10-2009 09:10 AM |
Random 5 is not realy random! | RipJawWolfFang | Questions and Supports | 9 | 04-30-2009 06:03 AM |
What's New? |
What's Hot? |
What's Popular? |