New
Dec 31, 2008 11:55 PM
#41
Jan 1, 2009 3:53 AM
#42
Ok im trying to customize the sig you see i have now. But there are some problems. First of all, as you see i know how to install and use a fond.But the problem is that it works ONLY for "capture_it" and no other. I tried 4-5 different fonts, i uploaded the ttf in the file directory where it should be but still nothing.Why does it work ONLY for "capture it" font? I did everything in the tytorial but still... Secondly, I want my sig to have more than 1 update.I thought that since with this: imagefttext($blub,14,45,10,120,$colour,$font,$titles[0]); imagefttext($blub,13,45,15,137,$colour,$font,$status[0]); I got one if i did this (with different X-pos of course): imagefttext($blub,14,45,10,120,$colour,$font,$titles[0]); imagefttext($blub,13,45,15,137,$colour,$font,$status[0]); imagefttext($blub,14,45,10,120,$colour,$font,$titles[1]); imagefttext($blub,13,45,15,137,$colour,$font,$status[1]); I would get 2 updates... But it doesnt work. My last problem is how to place dots when the anime is too long. For example now Akane doesnt fit in my sig. I want if it crosses the border to end like this: Akane-Iru Ni ... Instead of just going through. I really need some help :( Heres my whole script atm- If someone could tell me what to change or to modify it so that will work i would be glad :3 <?php header("Content-Type: image/png"); //specify the url that shall be read $url = "http://myanimelist.net/rss.php?type=rw&u=Cloud1234"; //generate a readable file out of the specified url for our parser to read $file = @fopen ("$url","r"); //starting and ending strings needed to get the valuable information out of the file //do not modify this unless you know what you are doing $title = "<title>"; $ptw = "<description>Plan to Watch -"; $watching = "<description>Watching -"; $completed = "<description>Completed -"; $onhold = "<description>On-Hold -"; $dropped = "<description>Dropped -"; $titleend = "</title>"; $descend ="</description>"; //set variables $t = 0; $z = 0; //rss-parser(Anime-Titles) if (trim($file) == "") { echo "Service out of order"; //if we can't create a file MAL is supposed to be down } else { $i=0; //this while-loop will run until the end of the file and read it line per line //every single read line will be save in an array (in this case $buffer[$i] while (!feof($file)) { //1024 bytes per line will be read until the end of file has been reached //every single line will be saved in the array $buffer //example: line 1 would be saved in $buffer[0]; line 2 would be saved in $buffer[1] and so on $buffer[$i] = fgets($file,1024); $i++; } fclose($file);//close the file } //now we have to prepare the information we cached in the $buffer array earlier //for this we are going to use a for-loop //this for-loop just extracts the anime_title information for ($j=1;$j<$i;$j++) { if ($cnt = strstr($buffer[$j],$title)) { //strstr('string to be searched', 'string to search') //if the specified string has been found do... //str_replace('found string', 'replace with', 'replace it in') //and save it in the variable $ncnt $ncnt = str_replace($title, "", $cnt); $end = strstr($ncnt, $titleend); //strstr('string to be searched', 'string to search') //once again replace a part of the string and save the outcome in a new arrai $titles[$t] = str_replace($end,"",$ncnt); $t++; } } //this for-loop just extracts the anime_episode information for ($j=1;$j<$i;$j++) { //episodes if ($cnt = strstr($buffer[$j],$ptw)) { $status[$z] = "plan to watch"; $z++; } if ($cnt = strstr($buffer[$j],$completed)) { $status[$z] = "completed"; $z++; } if ($cnt = strstr($buffer[$j],$onhold)) { $status[$z] = "on hold"; $z++; } if ($cnt = strstr($buffer[$j],$dropped)) { $status[$z] = "dropped"; $z++; } if ($cnt = strstr($buffer[$j],$watching)) { $ncnt = str_replace($watching, "", $cnt); $end2 = strstr($ncnt, $descend); $status[$z] = str_replace($end2,"",$ncnt); $z++; } } //generate the image $blub = ImageCreateFromPng("Satsukisig.png"); $font = 'Capture_it'; //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($blub,0,0,0); //imagefttext(image, font size, angle, x-pos(relative to the image in px), y-pos, font color, fontfile, text output) imagefttext($blub,14,45,10,120,$colour,$font,$titles[0]); imagefttext($blub,13,45,15,137,$colour,$font,$status[0]); imagepng ($blub); //we want our final image to be in the png format //imagepng ($blub, "sig.png") //imagepng (image, save as) //imagedestroy ($blub); ?> |
CloudyJan 1, 2009 4:06 AM
Jan 1, 2009 4:01 AM
#43
What is the extention of the font you are trying to use? If the extension is 'TTF' (in capital letters) it won't work (this happens to me sometimes), so try changing the extension to 'ttf'. For adding dots to long titles, try what I posted 2 posts above this or wait for someone who knows better to give a better way :) |
Jan 1, 2009 4:16 AM
#44
@Fara7: I replaced this code you gave me, but it doesn't show nothing when I put 2 character number. Only works with 1 character numbers. EDIT: I just might know where is problem. I think when title is shorter than for example 20 characters it will not show it. I would fix it but PHP is not my better side. Other than that the rest is working fine. |
RipazJan 1, 2009 4:39 AM
Jan 1, 2009 4:52 AM
#45
@ripaz: to show something like 'Code Geass R2' like 'Code Geass...' you will have to do the following tewaks to the code: find the following code: for ($j=1;$j<$i;$j++) { if ($cnt = strstr($buffer[$j],$title)) { //strstr('string to be searched', 'string to search') //if the specified string has been found do... //str_replace('found string', 'replace with', 'replace it in') //and save it in the variable $ncnt $ncnt = str_replace($title, "", $cnt); $end = strstr($ncnt, $titleend); //strstr('string to be searched', 'string to search') //once again replace a part of the string and save the outcome in a new arrai $cutter = str_replace($end,"",$ncnt); $titles[$t] = substr($cutter, 0, 15); $t++; } } and replace it with this: for ($j=1;$j<$i;$j++) { if ($cnt = strstr($buffer[$j],$title)) { //strstr('string to be searched', 'string to search') //if the specified string has been found do... //str_replace('found string', 'replace with', 'replace it in') //and save it in the variable $ncnt $ncnt = str_replace($title, "", $cnt); $end = strstr($ncnt, $titleend); //strstr('string to be searched', 'string to search') //once again replace a part of the string and save the outcome in a new arrai $cutter = str_replace($end,"",$ncnt); If (strlen($cutter) > 12) { $titles[$t] = substr($cutter, 0, 12); $titles[$t] .= "..."; } else{ $titles[$t] = str_replace($end,"",$ncnt); } $t++; } } the vital parts are marked in red what it will do: check if a title is longer than 12 characters, if so the loop will be activated, the string will be trimmed and '...' after the 12th character. It is vital that you cut the string after the 12th char cause you want to add 3 dots and get a final counting of 15 to work with. @cloud: imagefttext($blub,14,45,10,120,$colour,$font,$titles[0]); imagefttext($blub,13,45,15,137,$colour,$font,$status[0]); imagefttext($blub,14,45,10,120,$colour,$font,$titles[1]); imagefttext($blub,13,45,15,137,$colour,$font,$status[1]); [/qote] this should work, try to make the y-pos a little smaller e.g. replace 120 with 50 an 137 with 67 and see if it works My last problem is how to place dots when the anime is too long. For example now Akane doesnt fit in my sig. I want if it crosses the border to end like this: Akane-Iru Ni ... see above, thats the same prob ripaz has... to the font-problem if you have something like: $font = 'Your_Font'; try replacing it with: $font = Your_Font.ttf'; note that: the font has to be written case-sensitive; also, if the font has another ending than .ttf you will have to write the font plus the ending in case-sensitive letters like in my example above, otherwise it wont work. |
ehrgeizJan 1, 2009 5:07 AM
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 1, 2009 5:07 AM
#46
Yeah I have done that. Replaced code and now look like this //this for-loop just extracts the anime_title information for ($j=1;$j<$i;$j++) { if ($cnt = strstr($buffer[$j],$title)) { //strstr('string to be searched', 'string to search') //if the specified string has been found do... //str_replace('found string', 'replace with', 'replace it in') //and save it in the variable $ncnt $ncnt = str_replace($title, "", $cnt); $end = strstr($ncnt, $titleend); //strstr('string to be searched', 'string to search') //once again replace a part of the string and save the outcome in a new arrai $cutter = str_replace($end,"",$ncnt); If (strlen($cutter) > 32) { $titles[$t] = substr($cutter, 0, 32); $titles[$t] .= "..."; } $t++; } } Sig looks like this: Currently watching Akikan! that has 12 characters in total (with TV suffix). I have set 32 characters to cut but when title is shorter than that it will not show it at all. Dunno if I explained well. |
Jan 1, 2009 5:09 AM
#47
fixed the issue in my above post, realized the problem as soon as i posted the solution... you have to add this part else{ $titles[$t] = str_replace($end,"",$ncnt); } |
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 1, 2009 5:12 AM
#48
Ok i solved the fond and the 2 updates problem.But the dots just wont show up :3 for ($j=1;$j<$i;$j++) { if ($cnt = strstr($buffer[$j],$title)) { //strstr('string to be searched', 'string to search') //if the specified string has been found do... //str_replace('found string', 'replace with', 'replace it in') //and save it in the variable $ncnt $ncnt = str_replace($title, "$titles", $cnt); $end = strstr($ncnt, $titleend); //strstr('string to be searched', 'string to search') //once again replace a part of the string and save the outcome in a new arrai $cutter = str_replace($end,"$titles",$ncnt); If (strlen($cutter) > 6) { $titles[$t] = substr($cutter, 0, 6); $titles[$t] .= "..."; } else{ $titles[$t] = str_replace($end,"$titles",$ncnt); } $t++; } } ?> This is my code what am i doing wrong? This is what i get |
Jan 1, 2009 5:18 AM
#49
try this: for ($j=1;$j<$i;$j++) { if ($cnt = strstr($buffer[$j],$title)) { //strstr('string to be searched', 'string to search') //if the specified string has been found do... //str_replace('found string', 'replace with', 'replace it in') //and save it in the variable $ncnt $ncnt = str_replace($title, "", $cnt); $end = strstr($ncnt, $titleend); //strstr('string to be searched', 'string to search') //once again replace a part of the string and save the outcome in a new arrai $cutter = str_replace($end,"",$ncnt); If (strlen($cutter) > 6) { $titles[$t] = substr($cutter, 0, 6); $titles[$t] .= "..."; } else{ $titles[$t] = str_replace($end,"",$ncnt); } $t++; } } |
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 1, 2009 5:32 AM
#51
Thanks for help everyone. @cloud: You must replace several lines mentioned above not just add them at bottom. This how final code should look like: <?php header("Content-Type: image/png"); //specify the url that shall be read $url = "http://myanimelist.net/rss.php?type=rw&u=Ripaz"; //generate a readable file out of the specified url for our parser to read $file = @fopen ("$url","r"); //starting and ending strings needed to get the valuable information out of the file //do not modify this unless you know what you are doing $title = "<title>"; $ptw = "<description>Plan to Watch -"; $watching = "<description>Watching -"; $completed = "<description>Completed -"; $onhold = "<description>On-Hold -"; $dropped = "<description>Dropped -"; $titleend = "</title>"; $descend ="</description>"; //set variables $t = 0; $z = 0; //rss-parser(Anime-Titles) if (trim($file) == "") { echo "Service out of order"; //if we can't create a file MAL is supposed to be down } else { $i=0; //this while-loop will run until the end of the file and read it line per line //every single read line will be save in an array (in this case $buffer[$i] while (!feof($file)) { //1024 bytes per line will be read until the end of file has been reached //every single line will be saved in the array $buffer //example: line 1 would be saved in $buffer[0]; line 2 would be saved in $buffer[1] and so on $buffer[$i] = fgets($file,1024); $i++; } fclose($file);//close the file } //now we have to prepare the information we cached in the $buffer array earlier //for this we are going to use a for-loop //this for-loop just extracts the anime_title information for ($j=1;$j<$i;$j++) { if ($cnt = strstr($buffer[$j],$title)) { //strstr('string to be searched', 'string to search') //if the specified string has been found do... //str_replace('found string', 'replace with', 'replace it in') //and save it in the variable $ncnt $ncnt = str_replace($title, "", $cnt); $end = strstr($ncnt, $titleend); //strstr('string to be searched', 'string to search') //once again replace a part of the string and save the outcome in a new arrai $cutter = str_replace($end,"",$ncnt); If (strlen($cutter) > 32) { $titles[$t] = substr($cutter, 0, 32); $titles[$t] .= "..."; } else{ $titles[$t] = str_replace($end,"",$ncnt); } $t++; } } //this for-loop just extracts the anime_episode information for ($j=1;$j<$i;$j++) { //episodes if ($cnt = strstr($buffer[$j],$ptw)) { $status[$z] = "plan to watch"; $z++; } if ($cnt = strstr($buffer[$j],$completed)) { $status[$z] = "completed"; $z++; } if ($cnt = strstr($buffer[$j],$onhold)) { $status[$z] = "on hold"; $z++; } if ($cnt = strstr($buffer[$j],$dropped)) { $status[$z] = "dropped"; $z++; } if ($cnt = strstr($buffer[$j],$watching)) { $ncnt = str_replace($watching, "", $cnt); $end2 = strstr($ncnt, $descend); $status[$z] = str_replace($end2,"",$ncnt); $z++; } } //generate the image $blub = ImageCreateFromPng("blueye.png"); $font = 'hero'; //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($blub,210,201,194); //imagefttext(image, font size, angle, x-pos(relative to the image in px), y-pos, font color, fontfile, text output) imagefttext($blub,12,0,195,95,$colour,$font,$titles[0]); imagefttext($blub,9,0,200,112,$colour,$font,$status[0]); imagepng ($blub); //we want our final image to be in the png format //imagepng ($blub, "sig.png") //imagepng (image, save as) //imagedestroy ($sig); ?> |
RipazJan 1, 2009 5:36 AM
Jan 2, 2009 10:24 AM
#53
been trying to figure out whats wrong with it for awhile, but i cant get the 'sig_creator.php' to load on the website. keep getting 'not found' any ideas on what's the problem? using 000webhost signature folder is 777 and the 'sig_creator.php' & 'sig.png' are both 755. also in the signature folder is the 'Capture_it.tff' and 'dark_sig.png' edit: got it. man why do i always figure it out AFTER posting about it for most of the things i do x-x. new edit: ok, im starting to get the concept of it now. just wanted to know if theres a way to change the font style so that lowercase will be small caps (like my current signature title) |
atruong18Jan 2, 2009 11:22 AM
Jan 3, 2009 7:49 AM
#54
Edited the code so it can change pictures according to the update. Like, if you are watching CLANNAD, then an image related to it will be displayed, or If you are watching Special A then another picture will be displayed and so on. If anyone is interested, here is the code. I used what kuroshiroi gave to change the picture randomly. if (strstr($titles[0], "Clannad")) { $num = rand(0,2); switch($num) { case 0: $src = imagecreatefrompng ('clannad1.png'); break; case 1: $src = imagecreatefrompng ('clannad2.png'); break; case 2: $src = imagecreatefrompng ('clannad3.png'); } }elseif (strstr($titles[0], "Special A")){ $src = imagecreatefrompng ('sa.png'); }elseif (strstr($titles[0], "Pani Poni Dash!")){ $src = imagecreatefrompng ('ppd.png'); }else{ $src = imagecreatefrompng ('default.png'); } It will first search for CLANNAD in the title and if it was found it will create random number between 0 and 2, according to that number an image will be displayed. If CLANNAD was not found it will move to the second condition (after elseif) and search for Special A which will display another picture. Again, if the condition was not met it will move to the next condition. If none of the conditions were met then it will move to else (last line) and will display another image (this can be the default image). I hope I was able to explain it properly. If you think anything is wrong with it then please point it out :) |
Jan 3, 2009 10:29 AM
#55
Jan 3, 2009 5:16 PM
#56
Fara7 said: Other than the fact that I don't think your Poni Poni Dash! check is working, why didn't you just use another switch :) It works the same way as all those if else conditions.Edited the code so it can change pictures according to the update. Like, if you are watching CLANNAD, then an image related to it will be displayed, or If you are watching Special A then another picture will be displayed and so on. If anyone is interested, here is the code. I used what kuroshiroi gave to change the picture randomly. if (strstr($titles[0], "Clannad")) { $num = rand(0,2); switch($num) { case 0: $src = imagecreatefrompng ('clannad1.png'); break; case 1: $src = imagecreatefrompng ('clannad2.png'); break; case 2: $src = imagecreatefrompng ('clannad3.png'); } }elseif (strstr($titles[0], "Special A")){ $src = imagecreatefrompng ('sa.png'); }elseif (strstr($titles[0], "Pani Poni Dash!")){ $src = imagecreatefrompng ('ppd.png'); }else{ $src = imagecreatefrompng ('default.png'); } It will first search for CLANNAD in the title and if it was found it will create random number between 0 and 2, according to that number an image will be displayed. If CLANNAD was not found it will move to the second condition (after elseif) and search for Special A which will display another picture. Again, if the condition was not met it will move to the next condition. If none of the conditions were met then it will move to else (last line) and will display another image (this can be the default image). I hope I was able to explain it properly. If you think anything is wrong with it then please point it out :) |
Jan 3, 2009 7:33 PM
#57
Jan 3, 2009 8:42 PM
#58
Now that's just cruel, tricking me like that... :) |
Jan 4, 2009 12:01 PM
#60
atruong18 said: been trying to figure out whats wrong with it for awhile, but i cant get the 'sig_creator.php' to load on the website. keep getting 'not found' any ideas on what's the problem? using 000webhost signature folder is 777 and the 'sig_creator.php' & 'sig.png' are both 755. also in the signature folder is the 'Capture_it.tff' and 'dark_sig.png' Im having this problem, kind of. ;___; Might I have some files in the wrong folder? I have both my ".png" files, my font file, and my "sig_creator.png" file in the Signature folder. Is that wrong? The host Im using is Awardspace.com Any help is appreciated. http://cielodesign.awardspace.com/Signature/sig_creator.php T_T My script: <?php header("Content-Type: image/png"); //specify the url that shall be read $url = "http://myanimelist.net/rss.php?type=rw&u=Drybananna"; //generate a readable file out of the specified url for our parser to read $file = @fopen ("$url","r"); //starting and ending strings needed to get the valuable information out of the file //do not modify this unless you know what you are doing $title = "<title>"; $ptw = "<description>Plan to Watch -"; $watching = "<description>Watching -"; $completed = "<description>Completed -"; $onhold = "<description>On-Hold -"; $dropped = "<description>Dropped -"; $titleend = "</title>"; $descend ="</description>"; //set variables $t = 0; $z = 0; //rss-parser(Anime-Titles) if (trim($file) == "") { echo "Service out of order"; //if we can't create a file MAL is supposed to be down } else { $i=0; //this while-loop will run until the end of the file and read it line per line //every single read line will be save in an array (in this case $buffer[$i] while (!feof($file)) { //1024 bytes per line will be read until the end of file has been reached //every single line will be saved in the array $buffer //example: line 1 would be saved in $buffer[0]; line 2 would be saved in $buffer[1] and so on $buffer[$i] = fgets($file,1024); $i++; } fclose($file);//close the file } //now we have to prepare the information we cached in the $buffer array earlier //for this we are going to use a for-loop //this for-loop just extracts the anime_title information for ($j=1;$j<$i;$j++) { if ($cnt = strstr($buffer[$j],$title)) { //strstr('string to be searched', 'string to search') //if the specified string has been found do... //str_replace('found string', 'replace with', 'replace it in') //and save it in the variable $ncnt $ncnt = str_replace($title, "", $cnt); $end = strstr($ncnt, $titleend); //strstr('string to be searched', 'string to search') //once again replace a part of the string and save the outcome in a new arrai $titles[$t] = str_replace($end,"",$ncnt); $t++; } } //this for-loop just extracts the anime_episode information for ($j=1;$j<$i;$j++) { //episodes if ($cnt = strstr($buffer[$j],$ptw)) { $status[$z] = "plan to watch"; $z++; } if ($cnt = strstr($buffer[$j],$completed)) { $status[$z] = "completed"; $z++; } if ($cnt = strstr($buffer[$j],$onhold)) { $status[$z] = "on hold"; $z++; } if ($cnt = strstr($buffer[$j],$dropped)) { $status[$z] = "dropped"; $z++; } if ($cnt = strstr($buffer[$j],$watching)) { $ncnt = str_replace($watching, "", $cnt); $end2 = strstr($ncnt, $descend); $status[$z] = str_replace($end2,"",$ncnt); $z++; } } //generate the image $blub = ImageCreateFromPng("rei.png"); $font = 'Yoshi'; //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($blub,0,0,0); //imagefttext(image, font size, angle, x-pos(relative to the image in px), y-pos, font color, fontfile, text output) imagefttext($blub,14,0,118,48,$colour,$font,$titles[0]); imagefttext($blub,12,0,170,60,$colour,$font,$status[0]); imagepng ($blub); //we want our final image to be in the png format //imagepng($blub, „reiout.png“) //imagepng (image, save as) //imagedestroy($blub) ?> |
Jan 4, 2009 12:04 PM
#61
Drybananna said: atruong18 said: been trying to figure out whats wrong with it for awhile, but i cant get the 'sig_creator.php' to load on the website. keep getting 'not found' any ideas on what's the problem? using 000webhost signature folder is 777 and the 'sig_creator.php' & 'sig.png' are both 755. also in the signature folder is the 'Capture_it.tff' and 'dark_sig.png' Im having this problem. ;___; Might I have some files in the wrong folder? I have both my ".png" files, my font file, and my "sig_creator.png" file in the Signature folder. Is that wrong? The host Im using is Awardspace.com Any help is appreciated. http://cielodesign.awardspace.com/Signature/sig_creator.php T_T first of all, did you set the signature folder as 777 and the php and png files to 755? as in how i solved my problem, i (after quadruple checking the above, lol) move the folder into public, and it magically worked. |
Jan 4, 2009 12:07 PM
#62
When I put it to 777, it gives me this error: Error 500: Script Execution Failure So I did what the above posts told me to do when getting that error and set it to 755. :< |
Jan 4, 2009 12:11 PM
#63
Drybananna said: When I put it to 777, it gives me this error: Error 500: Script Execution Failure So I did what the above posts told me to do when getting that error and set it to 755. :< hmm, im not sure about this. double check to see if you put all the things in the right places? im only an amateur in coding myself. but i do recognize terms so it helps alittle (arrays...*shudders*) |
Jan 4, 2009 12:21 PM
#64
Gracias for trying to help. <3 Bah, been messing around with it and still get errors. New SCRIPTYY Im using: <?php header("Content-Type: image/png"); //specify the url that shall be read $url = "http://myanimelist.net/rss.php?type=rw&u=Drybananna"; //generate a readable file out of the specified url for our parser to read $file = @fopen ("$url","r"); //starting and ending strings needed to get the valuable information out of the file //do not modify this unless you know what you are doing $title = "<title>"; $ptw = "<description>Plan to Watch -"; $watching = "<description>Watching -"; $completed = "<description>Completed -"; $onhold = "<description>On-Hold -"; $dropped = "<description>Dropped -"; $titleend = "</title>"; $descend ="</description>"; //set variables $t = 0; $z = 0; //rss-parser(Anime-Titles) if (trim($file) == "") { echo "Service out of order"; //if we can't create a file MAL is supposed to be down } else { $i=0; //this while-loop will run until the end of the file and read it line per line //every single read line will be save in an array (in this case $buffer[$i] while (!feof($file)) { //1024 bytes per line will be read until the end of file has been reached //every single line will be saved in the array $buffer //example: line 1 would be saved in $buffer[0]; line 2 would be saved in $buffer[1] and so on $buffer[$i] = fgets($file,1024); $i++; } fclose($file);//close the file } //now we have to prepare the information we cached in the $buffer array earlier //for this we are going to use a for-loop //this for-loop just extracts the anime_title information for ($j=1;$j<$i;$j++) { if ($cnt = strstr($buffer[$j],$title)) { //strstr('string to be searched', 'string to search') //if the specified string has been found do... //str_replace('found string', 'replace with', 'replace it in') //and save it in the variable $ncnt $ncnt = str_replace($title, "", $cnt); $end = strstr($ncnt, $titleend); //strstr('string to be searched', 'string to search') //once again replace a part of the string and save the outcome in a new arrai $titles[$t] = str_replace($end,"",$ncnt); $t++; } } //this for-loop just extracts the anime_episode information for ($j=1;$j<$i;$j++) { //episodes if ($cnt = strstr($buffer[$j],$ptw)) { $status[$z] = "plan to watch"; $z++; } if ($cnt = strstr($buffer[$j],$completed)) { $status[$z] = "completed"; $z++; } if ($cnt = strstr($buffer[$j],$onhold)) { $status[$z] = "on hold"; $z++; } if ($cnt = strstr($buffer[$j],$dropped)) { $status[$z] = "dropped"; $z++; } if ($cnt = strstr($buffer[$j],$watching)) { $ncnt = str_replace($watching, "", $cnt); $end2 = strstr($ncnt, $descend); $status[$z] = str_replace($end2,"",$ncnt); $z++; } } //generate the image $blub = ImageCreateFromPng("misato.png"); $font = 'handsean'; //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($blub,235,203,130); $bcolour = imagecolorexact($blub,255,250,247); //imagefttext(image, font size, angle, x-pos(relative to the image in px), y-pos, font color, fontfile, text output) imagefttext($blub,9,0,18,95,$bcolour,$font,$titles[1]); imagefttext($blub,8,0,18,105,$bcolour,$font,$status[1]); imagefttext($blub,9,0,18,55,$bcolour,$font,$titles[0]); imagefttext($blub,8,0,18,65,$bcolour,$font,$status[0]); $overlay = ImageCreateFromPng("misatohead-1.png"); imagecopy($blub,$overlay,0,0,0,0,400,120); imagedestroy ($overlay); imagepng ($blub); imagedestroy ($blub); //we want our final image to be in the png format //imagepng ($blub, "sig.png") //imagepng (image, save as) //imagedestroy ($blub); ?> Could it be the hosting site? |
Jan 4, 2009 12:26 PM
#65
did you try it without your own added customizing? if his default didnt work, then its a problem with the inputting to the site. if his default works, then its your change thats causing the problem. try his default first to see if its your host's problem. |
Jan 4, 2009 12:39 PM
#66
His png files won't even upload in my ftp. =/ Im trying a new host now, though, so I hope that works. :D |
Jan 4, 2009 12:40 PM
#67
Drybananna said: His png files won't even upload in my ftp. =/ Im trying a new host now, though, so I hope that works. :D might be limitations in that site i guess, try 000webhost? |
Jan 4, 2009 2:05 PM
#68
New host seemed to do the trick + big thanks to Scud for helping me out. <3 Now, I have one last question: That is what I came out with, but I want that black edges to go away so it will be transparent. In other words, it was suppose to be "ovular" not square. Sorry if that made no sense. Gracias ahead of time. :D |
Jan 4, 2009 2:11 PM
#69
Drybananna said: New host seemed to do the trick + big thanks to Scud for helping me out. <3 Now, I have one last question: That is what I came out with, but I want that black edges to go away so it will be transparent. In other words, it was suppose to be "ovular" not square. Sorry if that made no sense. Gracias ahead of time. :D there was a thread where someone posted that code up. forgot which, look for it yourself, or wait until i find it and edit this message |
Jan 4, 2009 2:12 PM
#70
Been looking for it, thought there might be. Good to know it being confirmed that there actually is. Haven't found it yet, but I'll keep searching, you don't have to look if you don't want. Thanks for all the help. ♥ |
Jan 4, 2009 2:30 PM
#71
Drybananna said: Been looking for it, thought there might be. Good to know it being confirmed that there actually is. Haven't found it yet, but I'll keep searching, you don't have to look if you don't want. Thanks for all the help. ♥ cant remember where the heck i seen it. all i remember is the code has 'alpha' in it. well good luck finding it. |
Jan 4, 2009 2:42 PM
#72
I threw in these two lines ($img being my variable holding the image, to be replaced with $blub or whatever you might've called yours) and it worked fine for me:imagealphablending($img,true); |
![]() |
Jan 4, 2009 3:18 PM
#73
Jan 4, 2009 3:20 PM
#74
Jan 4, 2009 3:21 PM
#75
atruong18 said: i actually haven't gotten around to editing it yet; i just made the image flat with rounded edges/white bg. it currently looks like crap to dark theme users but i'm so lazy. ;A;windy said: yeah the transparent stuff was a question i asked here. :) that was the post!, lol. i remembered something about jagged-ness and it looks like your signature isnt jagged anymore. :) |
Jan 4, 2009 3:50 PM
#76
windy said: atruong18 said: i actually haven't gotten around to editing it yet; i just made the image flat with rounded edges/white bg. it currently looks like crap to dark theme users but i'm so lazy. ;A;windy said: yeah the transparent stuff was a question i asked here. :) that was the post!, lol. i remembered something about jagged-ness and it looks like your signature isnt jagged anymore. :) ah i see. cant blame the laziness, lol. im lazy to animate + automate my sig, its one or the other, not both. |
Jan 4, 2009 10:33 PM
#77
when i get my laptop back im gonna dedicated one weekend just to sit and make sigs :P |
![]() ![]() ![]() Thanks to FreedomWings for the sig! Thanks to SabakuNoGaara for the profile pic! ![]() |
Jan 5, 2009 3:32 AM
#78
Ok here is my first attempt at this. *just something really basic so I can see the text and play with it* *MIA* I'm still trying to get the dates to work.. :? Its a start.. |
DrizzkaJan 5, 2009 2:55 PM
Jan 5, 2009 4:46 AM
#79
Thank you guys, especially shiteiru,Krelian,Fara7, and Ripaz for discussing and making it possible for me to make this signature. I've learned from your tries ^^ Now I need to make a decent avatar :) |
Jan 5, 2009 5:31 AM
#80
did u make that sig? thats fantastic |
![]() ![]() ![]() Thanks to FreedomWings for the sig! Thanks to SabakuNoGaara for the profile pic! ![]() |
Jan 5, 2009 7:04 AM
#81
Jan 5, 2009 2:54 PM
#82
Jan 5, 2009 11:37 PM
#83
Can you guys solve this for me: I got January 5th on my sig when I updated my anime list, and it's January 6th for me. I'm in GMT+1 zone. I'm using script from this tutorial. How can I fix this? |
Jan 6, 2009 6:37 AM
#84
Miyako-chan said: Can you guys solve this for me: I got January 5th on my sig when I updated my anime list, and it's January 6th for me. I'm in GMT+1 zone. I'm using script from this tutorial. How can I fix this? from what im guessing, go to 'edit your profile' on the personal tab, there should be a timezone section, change it to your own timezone. that should link to everything in the update hopefully, or only the ones after it. |
Jan 6, 2009 2:27 PM
#85
^that isn't it (the "profile timezone" decide only what shown on the MAL page, not what saved in the DB) but maybe, the server you use have not your timezone upload this as php file and look if the correct date shown <?php echo date("d M, G:i");//current date e.g. 06 Jan, 23:30 ?> if yes, post a snippet of the relevant code, for a closer look |
Jan 6, 2009 9:17 PM
#86
Does anyone know how to put a stroke around the text? Not a glow, just a stroke. I've been trying everything, nothing seems to do it. :< Sorry for all of my questions. |
Jan 6, 2009 10:13 PM
#87
Drybananna said: Does anyone know how to put a stroke around the text? Not a glow, just a stroke. I've been trying everything, nothing seems to do it. :< Sorry for all of my questions. I think a glow is all that anyone has been able to produce so far, but I'm not a complete PHP wiz so I can't really say if it's possible or not. A text stroke would be so sexy though, I would seriously fall in love with whoever could make it happen. The closest I've seen is this as far as creating a stroke like effect. |
Jan 6, 2009 11:26 PM
#88
You could manage it, I'm sure, but I don't know of any easy way to do it. Especially with decent antialiasing. I've been puzzling over it a bit, but I'm thinking you'd have to create a blank image, write the text on that, and then step through pixel by pixel to add a stroke effect. |
![]() |
Jan 7, 2009 12:25 AM
#89
atruong18 said: Miyako-chan said: Can you guys solve this for me: I got January 5th on my sig when I updated my anime list, and it's January 6th for me. I'm in GMT+1 zone. I'm using script from this tutorial. How can I fix this? from what im guessing, go to 'edit your profile' on the personal tab, there should be a timezone section, change it to your own timezone. that should link to everything in the update hopefully, or only the ones after it. _Bael said: ^that isn't it (the "profile timezone" decide only what shown on the MAL page, not what saved in the DB) but maybe, the server you use have not your timezone upload this as php file and look if the correct date shown <?php echo date("d M, G:i");//current date e.g. 06 Jan, 23:30 ?> if yes, post a snippet of the relevant code, for a closer look Bael was right :D thank you very much :) I've put this: date_default_timezone_set('Europe/Sarajevo'); and it's working :) |
Jan 8, 2009 10:37 AM
#90
More topics from this board
» MyAnimeList x Honeyfeed Writing Contest 2025 SubmissionAvarion - Yesterday |
2 |
by Avarion
»»
2 hours ago |
|
» New Clashing Feelings volume after a decadeShiratori-san - Sep 27 |
3 |
by Retro8bit
»»
8 hours ago |
|
» MAL Analog HorrorWendy-- - Sep 27 |
10 |
by Shizuna
»»
10 hours ago |
|
» Vladimir Volfovich Zhirinovsky's MAL Diary of Kawai MemoriesV_V_Zhirinovsky - Yesterday |
1 |
by V_V_Zhirinovsky
»»
Yesterday, 1:00 AM |
|
» New Android App – Shimeji Mascot Screen Petsshimejimascot - Sep 26 |
8 |
by hacker09
»»
Sep 26, 10:03 PM |