New
Jan 19, 2009 3:31 PM
#21
shiteiru said: find this part in the file 'sig.php' //this for-loop just extracts the anime_episode information for ($type=0;$type<$files;$type++){$z = 0; for ($j=1;$j<$i;$j++) { //episodes if ($cnt = strstr($buffer[$type][$j],$ptw)) { $status[$type][$z] = "plan to watch"; $z++; } if ($cnt = strstr($buffer[$type][$j],$completed)) { $status[$type][$z] = "completed"; $z++; } if ($cnt = strstr($buffer[$type][$j],$onhold)) { $status[$type][$z] = "on hold"; $z++; } if ($cnt = strstr($buffer[$type][$j],$dropped)) { $status[$type][$z] = "dropped"; $z++; } if ($cnt = strstr($buffer[$type][$j],$watching)) { $ncnt = str_replace($watching, "", $cnt); $end2 = strstr($ncnt, $descend); $status[$type][$z] = str_replace($end2,"",$ncnt); $z++; } if ($cnt = strstr($buffer[$type][$j],$reading)) { $ncnt = str_replace($reading, "", $cnt); $end2 = strstr($ncnt, $descend); $status[$type][$z] = str_replace($end2,"",$ncnt); $z++; } } and replace it witch: //this for-loop just extracts the anime_episode information for ($type=0;$type<$files;$type++){$z = 0; for ($j=1;$j<$i;$j++) { //episodes if ($cnt = strstr($buffer[$type][$j],$ptw)) { $status[$type][$z] = "plan to watch"; $z++; } if ($cnt = strstr($buffer[$type][$j],$completed)) { $ncnt = str_replace($completed, "", $cnt); $ncnt = str_replace(of, "/", $ncnt); $ncnt = str_replace(episodes, "", $ncnt); $end2 = strstr($ncnt, $descend); $status[$type][$z] = str_replace($end2,"",$ncnt); $z++; } if ($cnt = strstr($buffer[$type][$j],$onhold)) { $status[$type][$z] = "on hold"; $z++; } if ($cnt = strstr($buffer[$type][$j],$dropped)) { $status[$type][$z] = "dropped"; $z++; } if ($cnt = strstr($buffer[$type][$j],$watching)) { $ncnt = str_replace($watching, "", $cnt); $ncnt = str_replace(of, "/", $ncnt); $ncnt = str_replace(episodes, "", $ncnt); $end2 = strstr($ncnt, $descend); $status[$type][$z] = str_replace($end2,"",$ncnt); $z++; } if ($cnt = strstr($buffer[$type][$j],$reading)) { $ncnt = str_replace($reading, "", $cnt); $end2 = strstr($ncnt, $descend); $status[$type][$z] = str_replace($end2,"",$ncnt); $z++; } } haven't tested it...but should never the less work Thanks ^^ I will test it tomorrow :) Worked ^^b big thanks :) |
SunyiNyufiJan 19, 2009 5:00 PM
Jan 20, 2009 6:36 AM
#22
thx shiteiru :D i've made a new one with this tut. just thinking of changing colors of the font.. |
Jan 20, 2009 8:45 AM
#23
this version has the premade ability to "dot" the ends of the Anime/Manga titles. Just open the file 'settings.php' and search for $cut_titles = "0"; // 1=yes or 0=no $cut_title_after = "15"; // if you specified $cut_titles = "yes" enter the max char length of the anime title output now you have to set $cut_titles to 1 like so: $cut_titles = "1"; and the value for $cut_title_after as large/small as you like. e.g. if you want it to be 10 chars long set $cut_title_after = "10"; thats all...hope that helped |
Luck is the last dying wish of those who wanna believe that winning can happen by accident, sweat on the other hand is for those who know it's a choice, so decide now because destiny waits for no man. |
Jan 20, 2009 2:13 PM
#24
Jan 20, 2009 3:03 PM
#25
Good script, but I see only one anime. How I insert more anime? This is my code, but I see always the first anime O_o, help me please! PS: Sorry for my very very bad english. Anime 1 imagefttext($image,14,0,118,48,$colour,$font,$titles[0][0]); imagefttext($image,12,0,170,60,$colour,$font,$status[0][0]); imagefttext($image,14,0,222,72,$colour,$font,$dates[0][0]); Anime 2 imagefttext($image,14,0,118,48,$colour,$font,$titles[0][1]); imagefttext($image,12,0,170,60,$colour,$font,$status[0][1]); imagefttext($image,14,0,222,72,$colour,$font,$dates[0][1]); etc... |
shagalollaJan 20, 2009 3:07 PM
Jan 20, 2009 3:34 PM
#26
Hm. Working on a new sig thing and what not and I'm wondering, is it possible to align the text to the right? |
Jan 20, 2009 6:21 PM
#27
NyaChan said: It's possible but it's a pita. Basically you'll need to measure the pixels in the text and place the text accordingly. Unfortunately there doesn't appear to be a built in function that does this, since font size and type can be altered.Hm. Working on a new sig thing and what not and I'm wondering, is it possible to align the text to the right? This should help. Emihiro: Your code is correct. You just have to update your history so that the same series isn't listed twice in a row, i.e. watch a different show. |
kuroshiroiJan 20, 2009 6:30 PM
Jan 20, 2009 6:57 PM
#29
kuroshiroi said: Basically you'll need to measure the pixels in the text and place the text accordingly wouldnt that only allow the titles to be that precise length for that to work? like a title thats 8 characters long, the pixel position will be different compared to a title thats 20 characters long. i say that, but i dont know how to do it either xD. sniW said: There should be a signature scripting contest. why should there be that kind of contest, when there is already an overall signature contest that has good non-script signatures participating as well? lol |
Jan 20, 2009 7:04 PM
#30
atruong18 said: I'm not saying you should break out your ruler and measure it by hand. The measuring can be done on the fly by a php function for any text size, length and font and then applied correctly using some very simple math. It's still a pita since it should be automatic.kuroshiroi said: Basically you'll need to measure the pixels in the text and place the text accordingly wouldnt that only allow the titles to be that precise length for that to work? like a title thats 8 characters long, the pixel position will be different compared to a title thats 20 characters long. i say that, but i dont know how to do it either xD. If you want to measure it using a ruler you're welcome to :) |
Jan 20, 2009 7:08 PM
#31
ah, i thought you meant something else, my bad. lol. |
Jan 20, 2009 7:14 PM
#32
atruong18 said: sniW said: There should be a signature scripting contest. why should there be that kind of contest, when there is already an overall signature contest that has good non-script signatures participating as well? lol I dunno, to encourage creativity? People don't have to stick to tutorials, or even PHP GD to script a sig. I would participate in a signature scripting contest, but not a signature designing contest because I suck at designing :P |
Jan 20, 2009 7:18 PM
#33
sniW said: I dunno, to encourage creativity? People don't have to stick to tutorials, or even PHP GD to script a sig. I would participate in a signature scripting contest, but not a signature designing contest because I suck at designing :P im mediocore at both :D. horray for my incompetence! |
Jan 20, 2009 7:25 PM
#34
atruong18 said: sniW said: I dunno, to encourage creativity? People don't have to stick to tutorials, or even PHP GD to script a sig. I would participate in a signature scripting contest, but not a signature designing contest because I suck at designing :P im mediocore at both :D. horray for my incompetence! hehe. see, I wish I knew how to design sigs like yours (and pretty much everyone else's), but I've never really made the time to sit down and learn how... |
Jan 20, 2009 7:26 PM
#35
atruong18 said: sniW said: I dunno, to encourage creativity? People don't have to stick to tutorials, or even PHP GD to script a sig. I would participate in a signature scripting contest, but not a signature designing contest because I suck at designing :P im mediocore at both :D. horray for my incompetence! Psh, what are you talking about, you're really good at sigs =_= |
Jan 20, 2009 7:33 PM
#36
FreedomWings said: Psh, what are you talking about, you're really good at sigs =_= id still say no, because i havent 'made' something yet. its my own belief that mine isnt as good as others yet. i mean, i think yours put in more effort than mine. so its better. |
Jan 20, 2009 7:38 PM
#37
atruong18 said: FreedomWings said: Psh, what are you talking about, you're really good at sigs =_= id still say no, because i havent 'made' something yet. its my own belief that mine isnt as good as others yet. i mean, i think yours put in more effort than mine. so its better. But I remember you anime your previous sig, which is a lot better than what I can do x.X I phail at PHP |
Jan 20, 2009 8:26 PM
#38
NyaChan said: Hm. Working on a new sig thing and what not and I'm wondering, is it possible to align the text to the right? Right alignment is actually pretty simple. The way it's done is generally like this: The following is in general and not specific to any particular script:
The imagegettfbbox function finds the corner coordinates of the text you are inputting. This, for example is at 20 font and 0 (horizontal) alignment. It will return an array of corner points, of which $tfbbox[4] is the one you need (top right x value), as this will tell you the width of your text. The imagesx function finds the width of your background image ($im). On right alignment on the side of the image, you need to subtract the text width from the image width, and that gives you the x coordinate of where your text needs to begin. The $rightmargin value is something you set yourself to give you a little room from the edge. You can leave it at 0 if you wish. The imagettftext acts as it normally does. The above is set for 20-size font, 0 angle, y-baseline at 100. Center justification requires a few more lines. |
Jan 20, 2009 8:36 PM
#39
FreedomWings said: But I remember you anime your previous sig, which is a lot better than what I can do x.X I phail at PHP it wasnt true animated php, it was a regular gif. im not that good with php, lol. it was like a 'test' before i really did make an animated php, but i dont have the time nor the knowledge. @Iri: ooooo. doubt i use it though, lol. |
Jan 21, 2009 2:14 AM
#40
Man, you are absolutely fucking amazing. Thanks for this version 2, it is definitely worthful. Was reading a lot of tuts and trying everything, but apparently Im either slow or stupid because I couldn't figure this out for shit: How do you make it say "12/24" or "Watching @ 15/25" (like windy's, for example) etc, instead of it saying "Watching 12 of 24 Episodes"? |
Jan 21, 2009 3:14 AM
#41
find the code to make it look like"12/24" here: http://myanimelist.net/forum/?topicid=62511&show=20#msg2506546 due to the fact that there seems to be some uprising interest in customizinig the episode output i will release a plugin where you will be able to define how you want to look the episodes output. But cause i'm atm kinda stuck with studying and exams i don't know when the release will be out. |
Luck is the last dying wish of those who wanna believe that winning can happen by accident, sweat on the other hand is for those who know it's a choice, so decide now because destiny waits for no man. |
Jan 21, 2009 3:36 AM
#42
Ah, so sorry, it was right on this thread. I feel dumb. ;___; Thanks so much for all you are doing and MUCHOS FUCKING GRACIAS for the new update you are gonna be working on after exams. <3 Good luck on your exams. |
Jan 21, 2009 8:18 AM
#43
Good luck indeed. The episode output is what I'm playing around with, picking it up as I go along getting closer to exactly how I'd like. You never know I might just figure it out myself. Stranger things have happened. =p |
Jan 21, 2009 9:23 AM
#44
Queeg: I thought of this some time ago when I first saw your sig but since it wasn't php at the time I didn't want to mention it. Anyway, have you thought of randomizing the pictures? With php it's fairly simple and it should give your sig a little something extra. |
Jan 21, 2009 9:35 AM
#45
Jan 21, 2009 10:06 AM
#46
It has crossed my mind to fiddle with the pictures (and would give me a nice excuse to rewatch AzuDai looking for screencaps), but it's about time for a new one once I get the text right. Speaking of which I think I've got it. First time and all. Something must be wrong, it never works first time... |
Jan 21, 2009 11:13 AM
#47
well then......i did the update / wasn't really much to do, so it didn't take me long to make it. All new options you have right now are explained in detail in the file 'settings.php'. Got some questions? Ask....... Would be really great, if some of you who used this tutorial and made yourr sigs with it could send me links to your sigs. I'd make a new section where interested people could see what you are really able to do with this tutorial and how possible outcomes can look like. So if anyone is interested in supporting this idea send me your siglink...thx |
Luck is the last dying wish of those who wanna believe that winning can happen by accident, sweat on the other hand is for those who know it's a choice, so decide now because destiny waits for no man. |
Jan 21, 2009 2:34 PM
#48
Argh this is making me really frustrated. I took the template and got ALMOST everything working. I tested the sig included in the tut and it works perfectly. So I went in and fiddled with the settings to make them what I want, as well as add in the right alignment code. I hadn't yet fiddled with the right alignment code yet, I wanted to test it to make sure it all loaded and then edit it accordingly. However, I get greeted with a lovely page telling me my PHP cannot be run because it contains errors. click. I go and look at the image_output.php file and it's got a lovely slew of Font errors. Click. Warning: imagefttext() [function.imagefttext]: Could not find/open font in /home/a6529025/public_html/chie-x-hideki/image_output.php on line 16 For some reason, it seems to be trying to find the font for lines 16-18 (Anime Title, Status, and Date) as well as lines 21, 24, 25, 28, and 29 (Manga Title, Status, and Date + Right Alignment stuff) WITHIN the PHP file. lolwut? This error is NOT on the test sig, and yes my font name is correct. Here's the script, and go to here to see that the font name is correct. <?php ///////////////////////////////////////////////////////////////////// //generating the image $image = imagecreatefrompng("chiexhideki_bg.png"); $font = 'BKANT'; ///////dont change this////////////////// imagealphablending($image,true); imagesavealpha($image,true); //////////////////////////////////////// //imagecolorexact(image, red(between 0 and 255), green, blue) //imagecolorexact($blub,0,0,0) = black font | imagecolorexact($blub,255,255,255) = white font $colour = imagecolorexact($image,0,0,255); //imagefttext(image, font size, angle, x-pos(relative to the image in px), y-pos, font color, fontfile, text output) ///////////anime-text output//////////////// imagefttext($image,8,0,180,90,$colour,$font,$titles[0][0]); imagefttext($image,5,0,170,111,$colour,$font,$status[0][0]); imagefttext($image,14,0,222,72,$colour,$font,$dates[0][0]); //////////////////////////////////////// ///////////manga-text output//////////////// $tfbbox = imagettfbbox(8, 0, $font,$titles[1][0]); $x = imagesx($image) - $tfbbox[4]; $rightmargin = 10; imagettftext($image,8,0,($x - $rightmargin),55,$color,$font,$titles[1][0]); $tfbbox = imagettfbbox(5, 0, $font,$status[1][0]); $x = imagesx($image) - $tfbbox[4]; $rightmargin = 20; imagettftext($image,5,0,0,75,$color,$font,$status[1][0]); imagefttext($image,14,0,222,72,$colour,$font,$dates[1][0]); //////////////////////////////////////// imagepng ($image); //we want our final image to be in the png format //imagepng ($image, "sig.png") //imagepng (image, save as); uncomment this line if you want to save your output and use a cronjob for automated update - otherwise leave it as it is //imagedestroy ($image); // ///////////////////////////////////////////////////////////////////// ?> Argh. Stupid Book Antiqua. |
NyaChanJan 21, 2009 2:41 PM
Jan 21, 2009 2:42 PM
#49
The server is case sensitive, I'm pretty sure that includes the extension as well. Try renaming the font to bkant.ttf (all lower case) and using this line for the font: $font = 'bkant.ttf'; If that doesn't work there might be something wrong with the actual font file. |
Jan 21, 2009 2:47 PM
#50
kuroshiroi said: The server is case sensitive, I'm pretty sure that includes the extension as well. Try renaming the font to bkant.ttf (all lower case) and using this line for the font: $font = 'bkant.ttf'; If that doesn't work there might be something wrong with the actual font file. Thanks, now it works. Now I just gotta fix all the text alignments and size. Phew. No more frustration. edit: Here it is... Though I have two more I wanna do cause I'm indecisive and couldn't choose between three sigs. xD |
NyaChanJan 21, 2009 3:11 PM
Jan 21, 2009 4:44 PM
#51
been wondering. theres a rotation angle already in alot of the scripted sigs, but have anyone done rotation across z-plane yet? aka, make it more 3d looking from perspective. |
Jan 22, 2009 12:40 PM
#52
shiteiru said: well then......i did the update / wasn't really much to do, so it didn't take me long to make it. All new options you have right now are explained in detail in the file 'settings.php'. Got some questions? Ask....... For some reason even if I turn it on it's not working and still shows X out of Y episodes instead of the custom text. Even tried it on the test sig included and it didn't work. :/ Though editing of the sig.php with the code you posted last page works. Also, do you want a PM with the links? I'm quiet alright showing the three I did. At least it'll put the other two to good use. xD; |
NyaChanJan 22, 2009 2:38 PM
Jan 23, 2009 7:54 AM
#53
I have a question for you shiteiru. My current sig shows anime updates on the top and manga updates on the bottom. I know you specify anime or manga in the imagefttext, but is there any way to show the two most recent updates regardless of whether it's anime or manga? |
Jan 23, 2009 8:09 AM
#54
Jan 23, 2009 8:13 AM
#55
Queeg said: I have a question for you shiteiru. My current sig shows anime updates on the top and manga updates on the bottom. I know you specify anime or manga in the imagefttext, but is there any way to show the two most recent updates regardless of whether it's anime or manga? i want to know this too.. Fara7 said: Maybe you should set $to_parse in settings.php to number 4. Since it parses both anime and manga updates. i've done that and when you update newly watched anime it only takes 1st row of the update, and the manga update stays as the 2nd, regardless of the fact you have more anime updates, and that you didn't update the manga, for example for one week. so I think that's not the right way to go. |
Jan 23, 2009 8:13 AM
#56
That doesn't solve anything Fara7 since the anime and manga entries are still separated in the arrays. I'm pretty sure that the current script doesn't support this, yet :) What you would need to do is to do some comparisons of the update times for each of the first 2 entries in manga and anime. It's definately possible but requires some additional coding, mostly in the core part. |
Jan 23, 2009 8:18 AM
#57
Jan 23, 2009 8:31 AM
#58
Fara7: Well, I only commented after looking at the code for a little bit :) Alright, if you make this modification to sig.php $tmpstring = str_replace($end,"",$ncnt); then you'll get a handy array called $dateseconds with the time code in seconds which can be easily used for comparisons.$dateseconds[$type][$d] = strtotime($tmpstring); $dates[$type][$d] = strftime("$time_format",strtotime($tmpstring)); Then 'all' you have to do is code the comparison in the image_output.php so that the correct entries get used. |
Jan 24, 2009 2:54 AM
#59
I have a question for you shiteiru. My current sig shows anime updates on the top and manga updates on the bottom. I know you specify anime or manga in the imagefttext, but is there any way to show the two most recent updates regardless of whether it's anime or manga? That's currently not supported...actually to include something like that never came to my mind *scratches his head* erm well, might be in one of the next updates. If your somewho familiar with coding/scripting and or php try what kuroshiroi pointed out in the post above. Should probably work. NOTICE: since the code is absolutely free to use for everyone out there (unless you intend to make millions and millions of dollars out if it) everyones free to edit it and upload there own versions. So if you have some good contributions and would like to share them with everyone else don't hesitate and post your code. |
Luck is the last dying wish of those who wanna believe that winning can happen by accident, sweat on the other hand is for those who know it's a choice, so decide now because destiny waits for no man. |
Jan 24, 2009 10:36 AM
#60
ermm dont mind me asking a question.. but when you upload the image you wanted and set it up correctly.. how does the text appear the location you wanted it to be at? ah nvm.. i found the answer inside image_output.php.. imma start working on it xD |
ColorfusionJan 24, 2009 10:40 AM
Jan 24, 2009 12:04 PM
#61
awesome script ! I've used it and it works wonderfully :D |
Website http://akariREMOVED.co.cc/sig/sig.php is reporting as Malware. |
Jan 24, 2009 12:09 PM
#62
AkariChan said: hell yes, biribiri.awesome script ! I've used it and it works wonderfully :D |
Jan 24, 2009 12:12 PM
#63
Quick question, does createimagefrompng work with animated png files? |
Website http://akariREMOVED.co.cc/sig/sig.php is reporting as Malware. |
Jan 24, 2009 12:20 PM
#64
AkariChan said: Quick question, does createimagefrompng work with animated png files? nope, to make it animated, its very complicated. btw, nice looking sig. i like the color. and misaka fan, lol. |
Jan 24, 2009 12:23 PM
#65
atruong18 said: AkariChan said: Quick question, does createimagefrompng work with animated png files? nope, to make it animated, its very complicated. btw, nice looking sig. i like the color. and misaka fan, lol. aww ;_; if only it does, heh. I guess i can slice and dice part of it and animate it by parts :P |
Website http://akariREMOVED.co.cc/sig/sig.php is reporting as Malware. |
Jan 24, 2009 12:25 PM
#66
atruong18 said: AkariChan said: Quick question, does createimagefrompng work with animated png files? nope, to make it animated, its very complicated. btw, nice looking sig. i like the color. and misaka fan, lol. What you could do is make a bunch of images (frames for the GIF) using GD and merge them using a class like this: http://www.phpclasses.org/browse/package/3163.html |
Jan 24, 2009 1:03 PM
#67
sniW said: atruong18 said: AkariChan said: Quick question, does createimagefrompng work with animated png files? nope, to make it animated, its very complicated. btw, nice looking sig. i like the color. and misaka fan, lol. What you could do is make a bunch of images (frames for the GIF) using GD and merge them using a class like this: http://www.phpclasses.org/browse/package/3163.html found a better option; animated png :) ----> |
Website http://akariREMOVED.co.cc/sig/sig.php is reporting as Malware. |
Jan 24, 2009 1:14 PM
#68
Jan 24, 2009 1:29 PM
#69
AkariChan said: found a better option; animated png :) ----> forgot about animation without the text. could only think of the one regarding animation on the actual text at the time. also, its the return of the % bars. i think it looks odd having the newest update on the bottom, but w.e also, you should try to get the animation flow better than to suddenly start over. but thats just a preference. |
Jan 24, 2009 1:36 PM
#70
atruong18 said: AkariChan said: found a better option; animated png :) ----> forgot about animation without the text. could only think of the one regarding animation on the actual text at the time. also, its the return of the % bars. i think it looks odd having the newest update on the bottom, but w.e also, you should try to get the animation flow better than to suddenly start over. but thats just a preference. actually i messed up my update, so my newest watched is actually on the top. as for the animation, it's just a try and test... i'll do some other type of animation later. |
Website http://akariREMOVED.co.cc/sig/sig.php is reporting as Malware. |
More topics from this board
» 【 ART THREAD 】Let's share our art! ❤︎ ( 1 2 3 4 5 )mewmewforever - Aug 30, 2024 |
206 |
by Nette
»»
6 hours ago |
|
» Four Ages!Robert_SS_Gordon - Feb 21 |
47 |
by Robert_SS_Gordon
»»
Sep 23, 9:17 AM |
|
» AniTaste - cross-site anime list comparatorMciej - Sep 21 |
1 |
by Retro8bit
»»
Sep 21, 5:29 PM |
|
» Saeryen's Songs!Saeryen - Jul 25 |
5 |
by Saeryen
»»
Sep 20, 1:54 PM |
|
» Share Your YouTube Channel/Videos! ( 1 2 3 4 5 ... Last Page )nin-tendo - Dec 16, 2022 |
584 |
by Senery
»»
Sep 20, 10:01 AM |