Mysidia Adoptables Support Forum  

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

Thread Tools Display Modes
Old 01-13-2020, 10:47 AM
kristhasirah's Avatar
kristhasirah kristhasirah is offline
Join Date: Jan 2010
Location: In middle of the nothingness
Posts: 191
Gender: Female
Credits: 15,620
Default (mysidia 1.3.4)Adopt page kind of fix...

This is a kind of fix for the adopt.php
First Problem:
If the user use the inspect option they can change the value of the id to anything they want even use the adopt name and the site will give them the adopt. so if you dont know how to code and have to use the default code then we have a small problem.
so to "fix" this, we will place a small code in our adopt.php page:
below of
PHP Code:
            if($mysidia->session->fetch("adopt") != or !$id) throw new InvalidIDException("global_id"); 
you will paste this:
PHP Code:
            if($id == '1' || $id >= '3' && $id <='21' || $id == '23'|| $id == '24'|| $id == '25' || $id == '27'|| $id == '28'
            throw new 
InvalidIDException("You are trying to adopt a creature that don't belong in here...<br>If you want this creature please go to to the corresponding page...");
            if (
preg_match('/\D/'$id))throw new InvalidIDException("You are trying to adopt a creature that don't belong in here...<br>If you want this creature please go to to the corresponding page..."); 
the first if is to exlude the shop/promo/wild/limited/exclusive/prize adopt of your site, just replace the ids with the ones of your site. if a user tries to edit the id using one of those will give them an error.
the second if is to exclude all the names, so if the user tries to edit the id of the adopt and put a different adopt name it will give them an error.

Second problem:
the second problem the adopt page presents is when the user adopts a pet they can keep refreshing the page and keep adopting even if they no longer have money if you use money for the adopts.
so to "fix"this just open adoptview.php, in the
PHP Code:
search for:
PHP Code:
code and paste this above:
PHP Code:
Reply With Quote
Old 01-27-2020, 02:44 PM
Pear's Avatar
Pear Pear is offline
Woah man.
Join Date: Dec 2013
Location: The Underworld
Posts: 166
Gender: Female
Credits: 38,555
Pear is on a distinguished road

Oh geeze, this is very handy! Thank you for giving us a fix :O
Noot noot! Gotta get a new signooture. >->
Reply With Quote
Old 06-18-2020, 02:28 PM
Micolai's Avatar
Micolai Micolai is offline
Loving Mysidia
Join Date: May 2020
Location: Tennessee
Posts: 73
Gender: Female
Credits: 2,724
Micolai is on a distinguished road

Thank you so much!
"You try you fail, you try you fail, but the only true failure is if you stop trying. So try again." - Haunted Mansion
Reply With Quote

Thread Tools
Display Modes

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

All times are GMT -5. The time now is 03:27 PM.

Currently Active Users: 282 (1 members and 281 guests)
Threads: 4,025, Posts: 31,703, Members: 15,672
Welcome to our newest members, Meimbel.

What's New?

What's Hot?

What's Popular?

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