PDA

View Full Version : fixxing up the GD Signature


RoconzaArt
01-26-2011, 10:21 AM
um I don't know what you call it but that text you see under the adoptable.

http://roconza.sessions-st.net/kawaiipetshop/siggy.php?id=1 (http://roconza.sessions-st.net/kawaiipetshop/levelup.php?id=1)

I think it would be nice to have not make the image HUGE. Maybe in the next release there can be a more smaller text and not so much of it. Such as maybe just srink it to name, gender and owner.

OR maybe have a way the admin could edit this though the CP without having to go in to the php code to find it.

By the way were do you go to manually edit it?

Just a Suggestion.

fadillzzz
01-26-2011, 10:40 AM
You have to edit the siggy.php file.
I've edited mine to use .ttf font ( a little messy though...)
http://www.adoptapoke.com/get/455.gif

RoconzaArt
01-26-2011, 10:49 AM
What fonts work with it?

Hall of Famer
01-26-2011, 11:06 AM
I am sure this can be done, I may consider it for Mys v1.2.0 release.

RoconzaArt
01-26-2011, 11:16 AM
Oh no what happened to the picture it's all messed up now. :cfrown:

Kaeliah
01-26-2011, 12:01 PM
GD is sometimes very difficult to work with. This may be a fix that could be done in the next release but there are already a lot of things being worked on. I could make changes to it, but I'm not real excited to because of the pain in the butt GD is. XD


Just for kicks and giggles I went into the script to see if I couldn't find an easy way to do what you were asking for. First, look at this:

$str1 = "Name: ".$name;
$str2 = "Owner: ".$owner;
$str3 = "Click Here to Feed Me!";
$str4 = "More Adopts at:";
$str5 = "www.".$domain;

These are the strings to be added to the image. If there's something here you don't want to be added, delete the string or
edit the string. If you delete the string then you have to go down a little further...


imagestring ($image, 12, 0, $textheight, $str1, $color);
imagestring ($image, 12, 0, $textheight + 13, $str2, $color);
imagestring ($image, 12, 0, $textheight + 26, $str3, $color);
imagestring ($image, 12, 0, $textheight + 42, $str4, $color);
imagestring ($image, 12, 0, $textheight + 55, $str5, $color);


And delete the row containing the string to be added. This is where the strings get added to the image.
The number 12 listed on all the rows of code, is the font size. You can try adjusting that to make it a little
smaller but you have to make some other edits as well. Say you made the font size 8. All the + # have to be
increments of nine. So, +9, +18, +27, +36. That just made your image's height almost 20 pixels smaller.

If you go up higher in the code you'll find...


if($newwidth < 250){
$newwidth = 250;
}
else{
$newwidth = $width;
}


Change the 2 '250' numbers to smaller numbers to reduce the width. However you want to make sure
there's still enough room for the strings and don't make it smaller than your largest pet's width. Also
be sure to change BOTH numbers to the same number.


Hope that helps a bit.

RoconzaArt
01-26-2011, 12:15 PM
Well I guess I disable it for now because it does not seem to be working for me right. It's not a big loss really. I can wait.