Mysidia Adoptables Support Forum  

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

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 11-25-2015, 03:28 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 133,527
Abronsyth is on a distinguished road
Default 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
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #2  
Old 11-27-2015, 02:17 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 133,527
Abronsyth is on a distinguished road
Default

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?
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #3  
Old 11-27-2015, 03:31 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 490,858
Hall of Famer is on a distinguished road
Default

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.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #4  
Old 11-27-2015, 05:40 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 133,527
Abronsyth is on a distinguished road
Default

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"... 
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #5  
Old 11-27-2015, 07:51 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 490,858
Hall of Famer is on a distinguished road
Default

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


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #6  
Old 11-28-2015, 02:11 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 133,527
Abronsyth is on a distinguished road
Default

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?
__________________
My Mods Site (1.3.4, 2020 Mods)

Last edited by Abronsyth; 11-28-2015 at 03:21 PM.
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Change Default Pages text? gloryKAT Questions and Supports 14 07-25-2013 10:47 PM
Need default member_register page coding Ruinily Questions and Supports 2 06-13-2013 08:31 PM
Suggestions for default Item functions Hall of Famer Suggestions and Feature Requests 36 01-14-2012 10:21 AM
HELP! default theme won't change mythic Templates and Themes 3 10-05-2011 09:24 PM
How to change the default layout. alonaria Questions and Supports 6 04-05-2011 03:24 PM


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

Currently Active Users: 675 (0 members and 675 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


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