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)
-   -   Change Default Pet Name (http://www.mysidiaadoptables.com/forum/showthread.php?t=4913)

Abronsyth 11-25-2015 02:28 PM

Change Default Pet Name
 
Hello!

I was wondering if any of you lovely folks know how I'd be able to make it so that the default pet name is just "Unnamed" instead of the pet type?

Pets that result from breedings, promocodes (I think), adopt stores, and when the box is left blank are given the pet type as the default, and since my pet-types are kind of weird to help me keep organized I'm trying to make it so that they don't show up on the site from the user's perspective.

Thank you,
Abron

Abronsyth 11-27-2015 01:17 PM

Actually, looking at it I think the only file I need to alter is adopt.php, this line;
PHP Code:

            $name = (!$mysidia->input->post("name"))?$adopt->getType():$mysidia->input->post("name"); 

Likely something to do with the getType part, but I'm not sure what here to change to make it put "Unnamed" instead of the pet type?

Hall of Famer 11-27-2015 02:31 PM

Just change $adopt->getType() to "Unnamed", and it should be good enough for you. This only takes care of adoption though, you need to do something similar for breeding.

Abronsyth 11-27-2015 04:40 PM

Works like a charm, thank you!

Now to change it for bred and promocode adopt I'd alter the string where the new pet is inserted into the database, correct? So for class_breeding.php I alter to:
PHP Code:

            $mysidia->db->insert("owned_adoptables", array("aid" => NULL"type" => $adopt->getType(), "name" => "Unnamed"... 


Hall of Famer 11-27-2015 06:51 PM

Yup, that's correct, you are getting a hang of it.

Abronsyth 11-28-2015 01:11 PM

Awesome! Haha, I'm very slowly figuring out what to look for and what means what XD Just wait, 20 years and I'll maybe know what I'm doing!

Thanks for the help, HoF!

Edit:
I am having trouble figuring out where I change it for adoptables purchased at a shop...could you possibly point me in the right direction?


All times are GMT -5. The time now is 05:23 PM.

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