PDA

View Full Version : Edit No Name ??[Answered]


gjac1
12-02-2009, 12:50 PM
If a member chooses not to name there adoptable when adopting it, the script will just name it what name to creator gave it.

Is there any way to change it so that if a member adopts something but doesnt name it, it give it a defualt name of something like "Egg" ??

Thanks

Arianna
12-02-2009, 01:35 PM
In my install, it automatically gives it the name of the pet species, if there isn't a name inputted. I guess you could add, on the doadopt, something, but I'm too busy now. xD Good luck.

gjac1
12-02-2009, 01:50 PM
Thanks for the reply Arianna :)

In my install it also give it the name of the species, but thats what i want to change, if no name is inputted i want it to be called something like "Egg" instead of the species.

Thanks again

Haylzee
12-02-2009, 04:24 PM
On your doadopt.php it should contain a section of code that says if the name is ' ' (blank) the name = type of adoptable, like this:

// First we see if we have a custom name.
// If not, we use the default name

if($name == ""){
$name = $type;
}

I think you could just change $type; to "egg"; and it would work?

Fireballchad
12-02-2009, 04:25 PM
alright in your doadopt.php file around line 129 is this:
if($name == ""){
$name = $type;
}


You should change $type to whatever you want
Example:
if($name == ""){
$name = "Egg";
}
You need the "" in order for it to work :D cheers let me know if this helps![hr]

On your doadopt.php it should contain a section of code that says if the name is ' ' (blank) the name = type of adoptable, like this:

// First we see if we have a custom name.
// If not, we use the default name

if($name == ""){
$name = $type;
}

I think you could just change $type; to "egg"; and it would work?


Yay for posting at the same time basicly :) lol

gjac1
12-03-2009, 05:23 AM
I am sure i tried this and it didnt work...but it worked perfectly, thank you both :)

I think i might have missed out the "" around the word egg :s