Stability results were very high which suggests you are extremely relaxed, calm, secure, and optimistic.
Orderliness results were low which suggests you are overly flexible, improvised, and fun seeking at the expense too often of reliability, work ethic, and long term accomplishment.
Extraversion results were moderately low which suggests you are reclusive, quiet, unassertive, and secretive.
Also this other test said... INTP - "Architect". Greatest precision in thought and language. Can readily discern contradictions and inconsistencies. The world exists primarily to be understood. 3.3% of total population.
This code is outdated and it still has many unfixed issues, the new version is over at the Signature Scripters Club togheter with more stuff made by other people. There is yet another version I'm working on, more news and a new tutorial will come when I finished that one.
Well, I've been tinkering with PHP/GD and signatures for MAL for a couple of days now (as some of you coming to MAL's irc channel might know :P). After some not-really-satisfying results, I finally ended up with a decent script and decided to share it, along with tips and a little how-to to everyone so you can make your own.
The script and everything is far from perfect, and I'll gladly receive any tip or comment to improve it.
What are PHP and GD?
I'm in no way qualified to explain this, and even if I was, I'd be too lazy anyway, so I'll give you a couple of links to the all-knowing-wikipedia: PHP and GD.
If you want to lean how to use those two, I can suggest you to look at THIS website.
Moreover, using php nuke, you can rotate all or change parts of the signature (both the image and the fonts), randomly or based on time of the day or whatever you want.
Why a PHP-signature?
Signatures made with PHP and GD have several advantage, the first is the fact you can change the fonts/dimension/color/position of all the info shown in your signature. There are several examples of this on Talon's profile. Also it gives you a way greater control of the things you can show on your signature. A quick overview of what you have at your disposal can be seen using the debug feature of the parser part of the script (more info on the parser later). http://www.bard-tales.com/MAL/demosign/malparse.php?debug=1&e=1&user=bard
You can of course change your nick on the url to see yours. Changing the "e" value to 0 or removing it will cause the page to show the result of the parse of the "not-epsiodic" newsfeeds of your profile.
What do I need to make it work?
A bit of space in a web-hosting with PHP and GD installed. I think that all paid hosts are ok for that, and I think there's a lot of free hosts with it too.
And with that I think I'm done with the general explanation, now let's go on. .:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
First of all, you will need the four php files needed to run the script.
Those files are: malparse.php, malstorage.php, maltimer.php and malsign.php.
You can download all those files HERE
How the script works:
Basically the script works like this... you use malsign.php as your signature, when someone tries to load it, it will check maltimer.php for the last time the info has been updated, if since last time more than 3 minutes passed (you can change this), it will execute malparse.php. Malparse will read the three MAL feeds (anime, manga, malupdater), check them and put all useful info on malstorage.php (the empty file :D).
After this, malsign will generate an image using the script YOU will create and the info in malstorage.php.
If when malsign.php gets loaded the last update was less than 3 minutes before, it will just use the info in malstorage.php without asking Mal for the newsfeeds. I've done this to limit to once every X minutes the requests for MAL.
Now, I suppose you all got the files, so what you need to do now is upload them somewhere, all in the same directory, and make sure that maltimer.php and malstorage.php are writable.
If you want to make sure that malparser, maltimer and malstorage are working, just use the debug-url: http://www.your-website.com/directory/malparse.php?debug=1&e=1&user=yourusername
If that's not working, the reason will most probably be that one of the two files are not writable.
Next step is opening the malsign.php file, in there you'll have to set 3 things at first: your username, the refresh time in minutes for the malstorage.php (I suggest around 3-5 minutes) and the feed you want to use (episodic or the other one, if you want to see the difference, just go to your profile, on the bottom left, and try opening both of them).
And that's it, you are now ready to start coding the graphical part of your signature! .:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
So, let's get the malsign.php file and rename it to our liking, for this example I'll rename it demosign.php and I will create a directory demosign and put the images and fonts used in there.
First of all we need a background for our signature (you can actually use a single image, but for the purpose of showing you more stuff I'll use more), so after some googling and 30 seconds of photoshop, I obtained this (fugly) background picture. Now you'll need to upload it in the demosign directory.
On the code sign we will be using this php function:
$sign = ImageCreateFromPng("demosign/back.png");
This will basically put the image between parenthesis in the variable $sign.
Next step will be adding more stuff we might want on our signature, for example some animu character. After some googling, one minute of photoshop and some random mouse-art we'll have something like this [/url=http://www.bard-tales.com/MAL/demosign/leftchar.png](I'm ashamed of it) character picture[/url] on our demosign folder. You might want to notice that the background is transparent.
Now we want to put that over the background (think of Photoshop layers); the code to do that is this:
We already saw what the first line does, and the last is just used to free some memory in the server after we're done with that image.
The second line basically copies the image over the other one...
Let's see it in more detail:
imagecopymerge($trg,$src,a,b,c,d,w,h);
Target image: where the image will be copied.
Source image: the image that will be copied.
a,b : where on the target image it will be pasted (x,y coordinates in pixels)
c,d : where to start the copy in the source image (x,y coordinates in pixels)
w,h : dimensions of the part of the image that will be copied (width and height in pixels.
For the next steep we'll skip ahead to the last two lines of code, since the placing of text will need quite a bit of adjustment it would be handy to be able to already SEE the image in the browser, so let's add
imagepng($sign);
imagedestroy($sign);
at the end of the file. The first instruction will actually CREATE the image and send it to the browser, the second will free up the memory afterwards.
Now we need the fonts we'll be using for the text, so let's google for some website with free fonts and grab some random graffiti fonts. I decided without any reason to get The Battle Continuez and 08 Underground. After getting them you'll need to upload them in the usual demosign folder.
The syntax of the function to add text on an image is: imagettftext($target_image, fontsize, angle, X_position, Y_position, color, '/font path/fontname.ttf', string_of_text);
Two of the pieces of info required need a more in-depth explanation:
COLOR: the color needs to be defined beforehand using another function, and assigned to a variable. To do this just write: $colorname = imagecolorexact($target_image,R,G,B);
Where R, G and B are values ranging from 0 to 255 that indicate the quantity of Red, Green and Blue in the color.
STRING: Here you will put the text you want to be displayed.
To write some normal text put it between "...", for example: "Last Anime Watched"
To write the contents of a variable, just write it WITHOUT using "..", for example: $onhold
To mix varaible content and normal text you need to use the comma, like this: "I've already finished watching ".$completed." anime."
Complete list of variables:
$watching : Number of series you're "watching"
$completed : Number of series you've completed.
$onhold : Number of series you've on hold.
$dropped : Number of series you've dropped.
$plantowatch : Number of series you're planning to watch.
$dayswatched : Number of days you've spent watching anime.
Note on "n": n is a number between 0 and 4, if n = 0 the variable will contain the info about the last anime or manga you watched, with n=1 it will be the second to last, if n is 2 it will be the third to last, etc..
$animetitle[n] : Title of the anime
$animetime[n : Time when you watched it
$animeinfo[n] : Status and number of episodes watched / total
$mangatitle[n] : Title of the manga
$mangatime[n] : Time when you read it
$mangainfo[n] : Status and number of chapters read / total
Example:
imagettftext($sign,15,15,80,58,imagecolorexact($sign,250,150,150),'/demosign/arial.ttf',"Last Watched Anime:".$animetitle[0]);
Supposing that the last anime you watched was POKEMANS, this line will write "Last Watched Anime: POKEMANS", using the arial font placed on demosign folder, with a light red color. The text height will be 15 pixels, it will raise with an angle of 15° and the lower-left corner of the first letter will start at 80 pixel right of the left border, and 58 pixel lower than the top border. The text will be placed on the image contained in the variable $sign .
So, after thinkering with the text a little bit (and maybe adding another layer on the image to give a white background under the text, you will obtain (hopefully) something like this.
Well, now you're done, and I really really really hope you managed to get a better signature than the one I ended up making while writing this tutorial
.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
This is just the first draw of the tutorial (and the script), so I'll gladly receive any suggestion/corrections/criticism about the tutorial, the script and my crappy english. :D
Feel free to comment under this, pm me, add me in some IM or hunt me down on IRC.