New
Mar 22, 2009 10:13 AM
#151
LordKail said: Gratz,Will be looking forward to see your sig :P Ok :3 One last question. There is a ''@'' in front of the ''watching'' and ''reading'' part. Dunno how to remove it. And the # behind the episodes I watched. |
Mar 22, 2009 10:36 AM
#152
Oh,sry for taking long to answer,Maybe you found already but you will change that easily by opening settings.php And finding the line : $pre_watch = @watching (atleast I think that's how it should look). And to remove the # you have to find line $after_watch = ''#'' that's how it looks I think :D Try out and let me know :) |
Mar 22, 2009 10:44 AM
#153
LordKail said: Oh,sry for taking long to answer,Maybe you found already but you will change that easily by opening settings.php And finding the line : $pre_watch = @watching (atleast I think that's how it should look). And to remove the # you have to find line $after_watch = ''#'' that's how it looks I think :D Try out and let me know :) Omg thank you so much~ *-* My first self-made signature x'DD Well, some friends told me they could not see the picture because of the webhost. I saved it so you can see :3 http://i44.tinypic.com/sm4mmg.png |
Mar 22, 2009 11:03 AM
#154
Wow thats a really nice one :D.I like the color of the font and font itself.Suits the pic.But now you're gonna help me :P.How did you put 2 animes there :P?Mine only shows one and I don't know how to add them xD.(What program you use to edit the .php files btw?) |
Mar 22, 2009 11:13 AM
#155
LordKail said: Wow thats a really nice one :D.I like the color of the font and font itself.Suits the pic.But now you're gonna help me :P.How did you put 2 animes there :P?Mine only shows one and I don't know how to add them xD.(What program you use to edit the .php files btw?) The second one is a Manga :) But here is something about putting a second one in: ehrgeiz said: imagefttext($image,14,0,118,48,$colour,$font,$titles[0][0]); * $titles[0][0] outputs the very first anime title of your rss-feed * $titles[0][1] outputs the second anime title of your rss-feed and so on Would look like this way I guess: ///////////anime-text output//////////////// imagefttext($image,20,0,150,95,$colour,$font,$titles[0][0]); imagefttext($image,12,0,150,115,$colour,$font,$status[0][0]); imagefttext($image,12,0,150,115,$colour,$font,$dates[0][0]); imagefttext($image,20,0,150,95,$colour,$font,$titles[0][1]); imagefttext($image,12,0,150,115,$colour,$font,$status[0][1]); imagefttext($image,12,0,150,115,$colour,$font,$dates[0][1]); (But change the position of the second part ^^) I edit the files at the webhost. Says ''edit'' at the right side of the file :) http://i41.tinypic.com/syxzx4.png |
Mar 22, 2009 11:16 AM
#156
Mar 23, 2009 5:38 AM
#157
thank you for this easy scripting 8D i kinda confuse with some part but i figure it myself 8] thanks again!! i honor you!! |
Mar 23, 2009 11:42 PM
#158
Just had to give my thanks. <3 My new sig, and I even had fun making it unlike my last one. Now to figure out this Cron Job, 000webhost seems to be able to confuse me a lot. Doesn't help I've been up all day messing with all this stuff. |
Mar 23, 2009 11:57 PM
#159
Mar 24, 2009 12:33 AM
#160
LordKail said: Oh o.O,kkay I will try that Thx Edit: Okay I got it thx much! :D I'm glad it worked :D Looks great x3 |
Mar 24, 2009 12:58 AM
#161
Nice tutorial. I'll definitely give it a shot when I have the time. |
Mar 24, 2009 1:20 AM
#162
windy said: suzuka_pew said: love it!!thank you for this easy scripting 8D i kinda confuse with some part but i figure it myself 8] thanks again!! i honor you!! thank you 8] yours are nice to (: |
Mar 28, 2009 11:07 AM
#163
Mar 29, 2009 4:53 AM
#164
the easiest way to do this would be: if(isset($titles[0][0])){ 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]); //////////////////////////////////////// ///////////manga-text output//////////////// imagefttext($image,14,0,258,75,$colour,$font,$titles[1][0]); imagefttext($image,12,0,290,90,$colour,$font,$status[1][0]); imagefttext($image,14,0,222,72,$colour,$font,$dates[1][0]); }else{ imagefttext($image,14,0,118,48,$colour,$font,"down");} |
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. |
Apr 1, 2009 1:42 AM
#165
Apr 1, 2009 11:03 AM
#166
Apr 3, 2009 1:52 PM
#167
Is there any possible way in this script to make anime title to be uppercase? |
incognitApr 3, 2009 3:33 PM
Apr 3, 2009 7:31 PM
#168
NETRiP26 said: Is there any possible way in this script to make anime title to be uppercase? Just figured it out (except with lowercase.) Go to sig.php and scroll down to the for loop which gets the title's information. Find the first line that updates the $ncnt variable: $ncnt = str_replace($title, "", $cnt); And replace it with: $ncnt = strtoupper(str_replace($title, "", $cnt)); A question of my own - is it possible to control the amount of spacing between characters? |
Apr 3, 2009 7:36 PM
#169
Helix said: NETRiP26 said: Is there any possible way in this script to make anime title to be uppercase? Just figured it out (except with lowercase.) Go to sig.php and scroll down to the for loop which gets the title's information. Find the first line that updates the $ncnt variable: $ncnt = str_replace($title, "", $cnt); And replace it with: $ncnt = strtoupper(str_replace($title, "", $cnt)); A question of my own - is it possible to control the amount of spacing between characters? o.o. sweet, lol. if only i had this for previous sigs. lol. thanks for the find. |
Apr 4, 2009 12:44 AM
#170
Helix said: NETRiP26 said: Is there any possible way in this script to make anime title to be uppercase? Just figured it out (except with lowercase.) Go to sig.php and scroll down to the for loop which gets the title's information. Find the first line that updates the $ncnt variable: $ncnt = str_replace($title, "", $cnt); And replace it with: $ncnt = strtoupper(str_replace($title, "", $cnt)); Thanks. |
Apr 4, 2009 4:22 AM
#171
Helix said: As far as I know, not with a function. You have to manually put every character on the image with your chosen spacing. I have a script that does something similar with words (justifies text), that probably could be modified.A question of my own - is it possible to control the amount of spacing between characters? |
Apr 4, 2009 11:34 PM
#172
Thanks for the tutorial. I have a couple of questions/problems: 1) Is it possible to center-justify text? Right now, the text is left-justified, and it works for long text, but for short titles, like K-ON, it looks bad. 2) For anime that have an unknown amount of episodes, the progress bar of the I-pod can't be calculated, since the int casting fails for num2 $number1 = substr($status[0][0],stripos($status[0][0]," ")+1,stripos($status[0][0],"-")-(stripos($status[0][0]," ")+1)); $number2 = substr($status[0][0],stripos($status[0][0],"-")+1,strripos($status[0][0]," ")-(stripos($status[0][0],"-")+1)); $num1= (int)$number1; $num2= (int)$number2; any suggestions for how I can correct this? |
SaitoeApr 5, 2009 12:38 PM
Apr 6, 2009 12:34 AM
#173
I have another question. Is there any possible way in this script to make random image? I mean when I reload the page my image would change each time and reverse (look spoiler). From this: to this: |
incognitApr 6, 2009 12:40 AM
Apr 6, 2009 12:51 AM
#174
NETRiP26 said: I have another question. Is there any possible way in this script to make random image? I mean when I reload the page my image would change each time and reverse (look spoiler). From this: to this: ehh, this is roughly what you have to do: Upload all the pics you want to use to your webspace. (label them something like: sig0, sig1, sig2.... to make things more convenient) replace $image = imagecreatefrompng("pic"); with the following $r=rand(0, # of images); if($r==0) $image = imagecreatefrompng("sig0"); if($r==1) $image = imagecreatefrompng("sig1"); if($r==2) $image = imagecreatefrompng("sig2"); etc until if($r==# of images) $image = imagecreatefrompng("sig#ofimages"); that should work. If you wanna save space and followed my earlier tip, you can use this little script: $r=rand(0, # of images); $image = imagecreatefrompng("sig".$r); NOTE: I'm typing this all out without debugging, so there may be a bug in this >_>, but that's the general idea- find a random number, and then use that number to select a picture from a list of your uploaded pictures. Also, it would be lovely if somebody could figure out how to solve my problem ^^ |
Apr 6, 2009 2:46 AM
#175
^ It's easier to do the image randomization with a switch case, but yeah, that is the general concept. For example: $num = rand (0,2); switch ($num){ case 0: $image = imagecreatefrompng("sig0"); break; case 1: etc. default: $image = imagecreatefrompng("sig0"); } As for Saito's problem: I'm not all that familiar with the version 2 script, so this is a general solution. Add this function: function calculateTextBox($fontSize,$fontAngle,$fontFile,$text) { $rect = imagettfbbox($fontSize,$fontAngle,$fontFile,$text); $minX = min(array($rect[0],$rect[2],$rect[4],$rect[6])); $maxX = max(array($rect[0],$rect[2],$rect[4],$rect[6])); $minY = min(array($rect[1],$rect[3],$rect[5],$rect[7])); $maxY = max(array($rect[1],$rect[3],$rect[5],$rect[7])); return array( "left" => abs($minX), "top" => abs($minY), "width" => $maxX - $minX, "height" => $maxY - $minY, "box" => $rect ); } Then what you can do is this: $box = calculateTextBox($fontsize, 0, $font,$titles[0][0]); In the imagefttext(..) part change the $x parameter to the following: leftmarginoftheiPod + (rightmarginoftheiPod - leftmarginoftheiPod - $box["width"])/2 If you want the longer titles to be put in to several rows, that can be arranged with some extra code too. |
Apr 6, 2009 3:08 AM
#176
Apr 25, 2009 9:59 AM
#179
Apr 25, 2009 11:45 AM
#180
^I tried something on one of my sigs and it worked. I will post the code here: $num = rand(0,1); switch($num) { case 0: $src = imagecreatefrompng ('image1.png'); $color1 = imagecolorexact($src, 0, 0, 0); imagefttext($src,14,0,7,118,$color1,$font,$titles[0]); break; case 1: $src = imagecreatefrompng ('image2.png'); $color2 = imagecolorexact($src, 255, 36, 41); imagefttext($src,14,0,7,118,$color2,$font,$titles[0]); break; } imagecopy($image, $src, 0, 0, 0, 0, 600, 140); imagepng ($image); I hope this helps. When the first picture is loaded it will use color stored in $color1 and for second picture it would use the color stored in $color2. see here: http://fara7.site90.com/test/crreator.php |
Apr 25, 2009 12:03 PM
#181
Hmm It seems my signature sometimes does display and other times it seems 'unavailable' (?) or something (AKA I get a white rectangle w/ the well-known red little cross in the upper-left corner). Is this something caused by the hosting site - I, like many others, have taken the advice and signed up at 000webhost - or is it something I have done wrong? I'm sorry if this has been posted already, it seems that I have read past it then. Great tutorial! - Lith. P.S. gg user 'MasterNova', I sees a resemblance :3 |
Apr 25, 2009 12:10 PM
#182
Fara7 said: ^I tried something on one of my sigs and it worked. I will post the code here: $num = rand(0,1); switch($num) { case 0: $src = imagecreatefrompng ('image1.png'); $color1 = imagecolorexact($src, 0, 0, 0); imagefttext($src,14,0,7,118,$color1,$font,$titles[0]); break; case 1: $src = imagecreatefrompng ('image2.png'); $color2 = imagecolorexact($src, 255, 36, 41); imagefttext($src,14,0,7,118,$color2,$font,$titles[0]); break; } imagecopy($image, $src, 0, 0, 0, 0, 600, 140); imagepng ($image); I hope this helps. When the first picture is loaded it will use color stored in $color1 and for second picture it would use the color stored in $color2. see here: http://fara7.site90.com/test/crreator.php Hmm... I think I have to revamp just about the entirety of image_output to make that work. A bit of a long shot, but is it possible to set something like '$color$num'? Lithia said: I'm seeing it fine right now. Did you just register at 000webhost? If so, then they check your content for a while, making it invisible to others.Hmm It seems my signature sometimes does display and other times it seems 'unavailable' (?) or something (AKA I get a white rectangle w/ the well-known red little cross in the upper-left corner). Is this something caused by the hosting site - I, like many others, have taken the advice and signed up at 000webhost - or is it something I have done wrong? |
Joe4evrApr 25, 2009 12:13 PM
Apr 25, 2009 1:17 PM
#183
Joe4evr said: I'm seeing it fine right now. Did you just register at 000webhost? If so, then they check your content for a while, making it invisible to others. I registered the day before yesterday. It's really a strange thing, I don't particulary mind, but having a sig IS all the rage, is it not? - Lith. |
May 1, 2009 9:21 PM
#184
Made my new sig with this code. :3 Feel free to put it in the top posts. Oh, and I remember my Persona 4 OP one was up before the site crashed a while ago, you can put that up again if you want, it's here. |
May 3, 2009 3:58 AM
#185
Why this script doesnt show re-watching status? I selected re-watching in anime but still it says completed. |
May 3, 2009 11:24 PM
#186
NETRiP26 said: Why this script doesnt show re-watching status? I selected re-watching in anime but still it says completed. You need to chose the script to parse 'Recent anime by episode' which is '1' in the settings.php. See my sig...it works :D |
May 3, 2009 11:28 PM
#187
anyone have anywhere other than 000webhost.com to host these things? They fucked me over and deleted my account, and they said its 24h to create a new one, its been more than 24 hours. Can't seem to find one that has the right php hosting thingys.. |
May 4, 2009 4:18 AM
#188
May 4, 2009 11:36 AM
#189
SunyiNyufi said: Did you make a website on the account? cos if you don't they surely will delete it, it's the same on almost every host. Yeah dude I made a placeholder index and a bunch of other stuff with it, and they deleted it.. I've tried to make another account, been way over their stupid 24 hours.. I'd assume they just ban by IP..grr. |
123114334dMay 4, 2009 11:41 AM
May 4, 2009 11:12 PM
#190
Is it possible to make this version 2 run with gif image? |
May 5, 2009 8:44 AM
#191
Meri said: Is it possible to make this version 2 run with gif image? It's easy to import gifs if you only want the first frame. Just change imagecreatefrompng() to imagecreatefromgif(). Depending on your image, you might have a limited color pallette, though. I'm assuming since you want to use gifs, though, that you're looking for animation (since that's the only thing gif really offers). Animated is a bit harder... I'm probably the only one who understands how to do animated gifs in the actual sig around here... and it's not something you can do on 000webhost. :-/ You can always have an animated gif next to the generated sig, which is how it's usually done. |
May 5, 2009 9:42 AM
#192
saka said: I don't understand exactly how it works but I'm using an animated gif class, the same one I believe you used for your TTGL sig; That one works on 000webhost:Animated is a bit harder... I'm probably the only one who understands how to do animated gifs in the actual sig around here... and it's not something you can do on 000webhost. :-/ It's not hard, just takes a bit of fenagling. In my case, I create 6 png frames, transform them to gif and then assemble. |
May 5, 2009 10:13 AM
#193
that gifmerge library can be used, but its slow and doesn't compress the gif at all. It's easy to get 1MB gifs if you're not careful. I don't recommend it for everyone, but it's fine for animations of a few frames if you know what you're doing. I even had to fix some silly typos in that class while I was using it, and the author has removed the fixed/expanded versions from his homepage now. The old versions on phpclasses.org have a typo in one of the arguments, and are missing some important stuff... so that's why I don't recommend it to others anymore. The better method is to use gifsicle or ImageMagick executables to merge and compress the frames, instead of that php library. Regretfully this requires exec(), which just about every free server disallows. |
May 5, 2009 10:28 AM
#194
I'm using GIFEncoder.class.php which apparently is a rewritten Gifmerge.class.php. I don't remember where the hell I got it from, probably google cache lol, but it seems to be very fast. You're right about the compression though but what are you gonna do... You could write your own compression code :P |
May 5, 2009 10:50 AM
#195
kuroshiroi said: You could write your own compression code :P tried that actually... not efficient or worth the time. I learned a lot about how gif works, though. :) GIFEncoder.class.php is the same class... if it's the one from phpclasses.org then it's got a misnamed argument and doesn't have support for frame offsets iirc so you cannot take a gif apart and put it back together. I suppose it still works for just merging a new gif, though.... The good version of it used to be at http://gifs.hu/ which was the author's page (László Zsidi), but it's been overwritten by some gawdy joomla reference site. Maybe there's still something there, but I don't speak hungarian... |
May 5, 2009 1:11 PM
#196
saka said: I do. Nothing there, it's now a homepage now for some webdesign comp.The good version of it used to be at http://gifs.hu/ which was the author's page (László Zsidi), but it's been overwritten by some gawdy joomla reference site. Maybe there's still something there, but I don't speak hungarian... But maybe you could write a guide about the ins and outs of using gif animation in php ^^ Teach us! |
May 5, 2009 1:51 PM
#197
Kvakond said: Gotta love the internet, lol ^^saka said: I do. Nothing there, it's now a homepage now for some webdesign comp.The good version of it used to be at http://gifs.hu/ which was the author's page (László Zsidi), but it's been overwritten by some gawdy joomla reference site. Maybe there's still something there, but I don't speak hungarian... Please don't teach us the correct way to use gif animation in PHP, it will ruin MAL... |
May 5, 2009 1:52 PM
#198
kuroshiroi said: Please don't teach us the correct way to use gif animation in PHP, it will ruin MAL... lol...but kinda true :D I was bored, so I googled: http://www.phpclasses.org/browse/author/283569.html |
SunyiNyufiMay 5, 2009 2:27 PM
May 8, 2009 7:57 AM
#199
So basically the "..." that's supposed to appear after you go over the specified cut off thing is appearing no matter what. Right now you can just barely see one of the "..." below the W in watching. I redownloaded the whole thing just to make sure I didn't change something stupid. Any ideas? I love the "..." part so I would prefer not to be rid of it; I'd just love to know why it's decided to appear. |
May 8, 2009 11:50 AM
#200
Sorry but i'm totally a n00b, and i've just started scripting yesterday. I've followed your tut, but from the first step using your example image, sig.php has shown nothing. It's not the error 'The image cannot be displayed because it contains errors', but a completely broken image. I used sig.png link as you said and it did bring me an outcome, so i continued to creat my own sig. Everything was finished, but sig.php still shows me a broken image. So how can i make it appear ?? I've only worked with image_output as you said, here is the code : <?php ///////////////////////////////////////////////////////////////////// //generating the image $image = imagecreatefrompng("alkiku.png"); $font = 'CAM_____'; ///////dont change this////////////////// imagealphablending($image,true); imagesavealpha($image,true); //////////////////////////////////////// //imagecolorexact(image,107,107,107) //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,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]); //////////////////////////////////////// imagepng($image, "alkiku.png") imagedestroy($image); //we want our final image to be in the png format //imagepng ($image, "alkiku.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); // ///////////////////////////////////////////////////////////////////// ?> |
More topics from this board
» Share Your YouTube Channel/Videos! ( 1 2 3 4 5 ... Last Page )nin-tendo - Dec 16, 2022 |
362 |
by nin-tendo
»»
8 hours ago |
|
» Protect or punish?DollzchanAi - Apr 18 |
4 |
by DollzchanAi
»»
Today, 6:15 AM |
|
» BL reference in Tomodachi LifeKinspie13 - Yesterday |
4 |
by Kinspie13
»»
Yesterday, 9:41 PM |
|
» How to Export/Backup Your Anime List Automatically! (TamperMonkey Script)hacker09 - May 18, 2020 |
3 |
by Vapor_AU
»»
Yesterday, 8:41 PM |
|
» advice for someone returning to artCrystepsi - Apr 4 |
5 |
by haaku-san
»»
Yesterday, 4:21 PM |