New
Jul 9, 2008 3:17 AM
#1
Here is, the core of my script. Documentation and more comments may be added later on. Last update: 15-05-2010 - Download - - color can be a simple hex-color string (#e470cA) - no need anymore to say png = true, the script checks the filetype itself. - Debug functionality is moved to the constant define('DEBUG', true); - the Signature class is sorted and shiny now Important! if you've used the older script and have upgraded now, make sure that the Signature constructor has the right values. (see below for the new format: 2 values, simple isn't it?) Also addImage("img.png", $x, $y); works now for png, addImage("img.png", $x, $y, true); doesn't work anymore! older versions: - Download - (07 June 2009) - Functionlist is added to describe the most used functions - Example of howTo xml nessesary ------- examples how the script looks like and the output of it. ------- Talons Signature talon.php said: // IGNORE ME!!!! // function applyMask($srcImg,$maskImg,$xOffset=0,$yOffset=0){ $maskHeight = imagesx($maskImg); $maskWidth = imagesy($maskImg); $imgwidth = imagesx($srcImg); $imgheight = imagesy($srcImg); $destImg = imagecreatetruecolor($imgwidth, $imgheight); $bgColor = imagecolorallocatealpha($destImg, 0, 0, 0, 127); imagefill($destImg, 0, 0, $bgColor); imagealphablending($destImg, true); imagesavealpha($destImg, true); for ($x = 0; $x < $maskHeight; $x++) for($y=0; $y<$maskWidth; $y++){ $maskColorIndex = imagecolorat($maskImg, $x, $y); $maskColorValue = imagecolorsforindex($maskImg, $maskColorIndex); if($maskColorValue["red"]!=0){ $srcColorIndex = imagecolorat($srcImg, $x+$xOffset, $y+$yOffset); $srcColorValue = imagecolorsforindex($srcImg, $srcColorIndex); $destColorIndex =imagecolorallocatealpha($destImg, $srcColorValue["red"], $srcColorValue["green"], $srcColorValue["blue"], (int) floor((255-$maskColorValue["red"])/2)); imagesetpixel($destImg, $x, $y, $destColorIndex); unset($maskColorIndex, $maskColorValue, $srcColorIndex, $srcColorValue, $destColorIndex); } } return $destImg; } // STOP IGNORING ME!! // require("./lib/Signature.class.php"); $Sig = new Signature("Talon", "senjogahara_bg.png", 1); $txtColor = array(255, 255, 255); $txtShadow = array(0, 0, 0); $txtGlow = array('scale'=> 0.999, 'strength'=>2); $txtStyle = $Sig->setRule("ACIDL.TTF", 28, $txtColor, $txtShadow, 0, 0, false, $txtGlow); $txt1 = substr(eregi_replace("[^a-z0-9 .]", "",$Sig-> titlePart(0, 'title')), 0, 17); $txt2 = substr(eregi_replace("[^a-z0-9 .]", "",$Sig-> titlePart(1, 'title')), 0, 16); $txt3 = substr(eregi_replace("[^a-z0-9 .]", "",$Sig-> titlePart(2, 'title')), 0, 20); $txt4 = substr(eregi_replace("[^a-z0-9 .]", "",$Sig-> titlePart(3, 'title')), 0, 15); $Sig->writeText($txt1, 20, 25, $txtStyle, -1, "l"); $Sig->writeText($txt2, 660, 40, $txtStyle, 2, "r"); $Sig->writeText($txt3, 20, 140, $txtStyle, 3, "l"); $Sig->writeText($txt4, 660, 130, $txtStyle, -1, "r"); $Sig->addImage("senjogahara_overlay.png", 0, 0, true); $mask = imagecreatefrompng($Sig->backgroundPath."senjogahara_mask.png"); $Sig->sigImage = applyMask($Sig->sigImage, $mask); imagedestroy($mask); $Sig->showSignature(); Output: ![]() De-JaY's Signature dj-test.php said: require("./lib/Signature.class.php"); require("./lib/imagettf.adv.php"); // ------------------------------------------------ $Sig = new Signature("de-jay", "dj-Noel.png"); // basic colour $color1 = "#091037"; $color2 = "#e1d6c3"; $color3 = "#f7f1df"; // drop shadow / glow / stroke $shadow1 = "#5393fc"; $shadow2 = "#96c7fe"; $shadow3 = "#002755"; // glow settings $Glow1 = array(); $Glow2 = array(); $Glow1['scale'] = 0.96; $Glow1['strength'] = 4; $Glow2['scale'] = 0.9; $Glow2['strength'] = 2; // rules $style1 = $Sig->setRule("BATMFA_.TTF", 10, $color1, $shadow1, 0, 0, false, $Glow1); $style2 = $Sig->setRule("BATMFA_.TTF", 6, $color2, $shadow2, 0, 0, false, $Glow2); $style3 = $Sig->setRule("BATMFA_.TTF", 8, $color3, $shadow3); // title $text1 = strtoupper($Sig->titlePart(0, "title")); $x = 198; $y = 61; $textwidth = $Sig->getTextWidth($text1, $style1); while($textwidth > 270) { $text1 = substr_replace($text1 ,"", -1); $textwidth = $Sig->getTextWidth($text1, $style1); } $Sig->writeText($text1, $x-($textwidth/2), $y, $style1, 0); // episode $text2 = $Sig->descriptionPart(0, "[current] of [total]"); $x = 198; $y = 75; $Sig->writeText($text2, $x, $y, $style2, 0, "c"); // status $text3 = strtoupper($Sig->descriptionPart(0, "status")); if($text3 == "REWATCHING") $text3 = "WATCHING"; $x = 191; $y = 88; $textwidth = $Sig->getTextWidth($text3, $style3); imagettfstroke( $Sig->sigImage, $style3['Size'], 0, $x, $y, hex2rgb($shadow3), $Sig->fontPath.$style3["Font"], $text3, 2 , hex2rgb($shadow3)); $Sig->writeText($text3, $x, $y, $style3, 0, "l"); // roundup $Sig->addImage("dj-Noel-l1.png", 0, 0); $Sig->showSignature(); Output: ![]() aero's Signature aero4.php said: require("./lib/XML_Sig.class.php"); $Signature = new XML_Sig("xml/aero4.xml", "file"); aero4.xml said: <?xml version="1.0" encoding='UTF-8'?> <signature> <user name="AEro" timzone="1" rsstype="rw" /> <background url="aerosig3-bg.png" type="png" /> <text x="485" y="42"> <content>[name:1]</content> <font type="LAUNDROMAT.TTF" size="30" color="#ffffff" align="right" /> <characters maxwidth="323" mode="resize" /> </text> <text x="455" y="120"> <content>[current:1]</content> <font type="LAUNDROMAT.TTF" size="50" color="#ffffff" align="center" /> </text> <image url="aerosig3-l1.png" x="0" y="0" /> </signature> Output: ![]() |
TalonAug 17, 2010 12:13 PM
Jul 9, 2008 7:44 AM
#2
=( Talon is mean, it's your code and you can release it as anything you want (If you do release code make sure you put a license on it though, GPLv3 would be suitable). =P |
Jul 9, 2008 9:22 AM
#3
Zarin said: =( Talon is mean, it's your code and you can release it as anything you want (If you do release code make sure you put a license on it though, GPLv3 would be suitable). =P that's the reason I've explained to him too after I came home. he can do what he wants with his script but to be sure what happends when you give it away without licensing. I don't know how many people have a signature script public but this one has glow effects on text wich is something I didn't ever see before and shouldn't be given away without licensing. there is also a file missing wich is important for the script to work correctly. And if he releases the script, please let me polish up his english wich the comments first :P |
![]() Donate to my awesomeness! | "Insanity: doing the same thing over and over again and expecting different results." - Albert Einstein |
Jul 9, 2008 12:01 PM
#4
Talon said: this one has glow effects on text wich is something I didn't ever see before Well I haven't seen the code, but if it's made like.. two layers of the same text, where the bottom one is a different color and passed on a for loop with gaussian and smooth filters in it.. it's old news :P If not, hurry up and license it cuz I want to see :D |
Needs to fix this sometime but I'm lazy - since 11/05/2009 |
Jul 9, 2008 12:13 PM
#5
Bard said: good way of thinking, but try that without blurring the background ;)Talon said: this one has glow effects on text wich is something I didn't ever see before Well I haven't seen the code, but if it's made like.. two layers of the same text, where the bottom one is a different color and passed on a for loop with gaussian and smooth filters in it.. it's old news :P If not, hurry up and license it cuz I want to see :D |
TalonJul 9, 2008 12:19 PM
![]() Donate to my awesomeness! | "Insanity: doing the same thing over and over again and expecting different results." - Albert Einstein |
Jul 9, 2008 12:30 PM
#6
uhm it shouldn't if it's placed on a transparent layer and merged after the filtering :O Tomorrow when I'm back from the exams I'll try :P |
Needs to fix this sometime but I'm lazy - since 11/05/2009 |
Jul 9, 2008 9:38 PM
#7
Bard is correct in the method he stated, it's the fastest and most optimized way for the effect to be written in a scripting language assuming it has a built-in blur filter and supports compositing (Layering). Another good thing about this method is that it can also be reused as a soft shadow effect just by applying an offset to the glow layer. |
Jul 10, 2008 2:03 AM
#8
we'd noticed when we apply a filter on a transparent text layer it loses his transparancy. so we have a little workaround build. my brother has licenced it and working on some functions so you'll see soon how it's done. |
![]() Donate to my awesomeness! | "Insanity: doing the same thing over and over again and expecting different results." - Albert Einstein |
Jul 11, 2008 4:27 AM
#9
Jul 11, 2008 6:16 PM
#10
as tip if you use the imageconvolution() function. if you want to keep the colors(and not put a gamma on the image), then use as div variable the sum of all number in the matrix(that supposed to be a 3x3 matrix). a blur effect is for example: [ 1 ][ 1 ][ 1 ] [ 1 ][ 1 ][ 1 ] [ 1 ][ 1 ][ 1 ] with div 9 or a other blur: [ 1 ][ 2 ][ 1 ] [ 2 ][ 4 ][ 2 ] [ 1 ][ 2 ][ 1 ] with div 16 if you want to make you text thick, scale the div like div*0.8 But remember, if you use the function, all alpha values of that image will be lost |
Jul 11, 2008 6:25 PM
#11
Jul 11, 2008 6:35 PM
#12
done. What license is it btw? GPLv3? CC? |
Needs to fix this sometime but I'm lazy - since 11/05/2009 |
Jul 11, 2008 11:18 PM
#13
GPLv3 is it. I think I should go and correct some english now~ EDIT: Functionlist with description added. Not all functions are included yet but some functions might be interesting to know what they do because we didn't announced these. readme added :P |
TalonJul 12, 2008 3:22 AM
![]() Donate to my awesomeness! | "Insanity: doing the same thing over and over again and expecting different results." - Albert Einstein |
Jul 12, 2008 8:51 AM
#14
Niroko said: But remember, if you use the function, all alpha values of that image will be lost You can get around this problem by reimplementing the function, luckily for you someone already has. Just copy/paste that code, change the function's name and remove the "if(!function_exists('imageconvolution')){" condition around the definition and you are good to go. Edit: Spotted an error with the function, replace: $alpha = imagecolorat($srcback, $pxl[0], $pxl[1]); with: $alpha = imagecolorat($srcback, $x, $y); |
SarixJul 12, 2008 8:56 AM
Jul 12, 2008 9:10 AM
#15
hmm wonder if that goes faster, theoretically not. currently we make first our texteffect and then our mask out of it. with you function he would make the mask over and over again within the for loop wich could take some longer. the package is ready (also already one quickfix with the gloweffect made so who already downloaded it, same link). Those who want our core script can message Niroko. |
![]() Donate to my awesomeness! | "Insanity: doing the same thing over and over again and expecting different results." - Albert Einstein |
Jul 12, 2008 9:12 AM
#16
Heh, I used a weird work around, I set the background of the image to the colour glow I wanted, blurred the image, and set the transparency colour to be the background. Result so far: The text with a blurry outline. I used copy merge to stick this onto the base image with a low opacity before throwing an unblurred text on top. Not sure what will be shown by the time you read this message, but the current version has 2 layers of blur, a 40% layer of double blur, a 60% layer that's more of an outline, and then the text layer. Don't mind me too much though, I'm just messing around to see what I can get :P |
Jul 14, 2008 5:57 PM
#17
Hey, can you post the signature.class.php for that script, or will mine suffice? Actually to tell you the truth I don't really understand any of this stuff... I got my sig done through dudave's script, and took us a really long time to adjust and translate it to work with my webspace... |
Jul 15, 2008 3:27 AM
#18
I can't tell how your scripts looks like so I can't tell if it would be effecient to use an other script/class. if you want our class, just write niroko a message and he'll send it to you. and even if you don't understand it, you can try learning. with our pack I've written a functionlist and how they work. with some basic php knowlegde and keeping an eye on the given sample it should be posible to use our class. |
![]() Donate to my awesomeness! | "Insanity: doing the same thing over and over again and expecting different results." - Albert Einstein |
Jul 17, 2008 7:10 AM
#19
oh nice to find out such a club exists.. but i made my own signature script a while ago. It's still not perfect and i want to add more stuff soon but if someone wants to take a look: http://signature.dudave.de/signature.zip btw i'm not good at grafics so my sig is not so good :/ Edit: and to mention i transformed the dates to german output |
![]() |
Jul 17, 2008 11:21 AM
#20
I think I told you before to resize your sig, it's 10 pixels too high so please get to that very soon. I like the looks of it though. |
staff.applications ▼ guidelines.faq ▼ report.abuse ▼ thx.skittles ▼ thx.kina ▼ [H+] ³ ▼ |
Jul 18, 2008 12:05 AM
#21
I know, i edited the script an forgot to resize it again.. This weekend i plan to create a new background grafic so then it will be in the allowed size at least. |
![]() |
Jul 22, 2008 12:34 PM
#22
When I did PHP I only learnt how to grab information which I now have forgotten. Putting PHP with sigs is a lot of hard work @_@;; The only part I don't understand is printing the text onto the image ._. Anyways, if people want to understand more about PHP, I suggest heading over to w3schools for understanding the basics of PHP. |
Jul 22, 2008 5:33 PM
#23
TEH_GEASS said: The only part I don't understand is printing the text onto the image ._. Anyways, if people want to understand more about PHP, I suggest heading over to w3schools for understanding the basics of PHP. http://it.php.net/manual/en/function.imagettftext.php <-- it's a simple GD command, nothing major, you can find it on php.net. Also I'd add php.net to the websites people should check for php, there's all the commands you can use (and some more :P) with examples and a discussion thread under them where you usually can find answers to all the questions you might have and more complex examples. |
Needs to fix this sometime but I'm lazy - since 11/05/2009 |
Jul 23, 2008 5:19 AM
#24
Jul 23, 2008 7:22 AM
#25
Im sure you could arrange something similar with RoR? Most larger languages have some way of playing with images, and if not allow external execution so you could use imagemagic. As long as you can socket other websites and manipulate images I don't see any reason why you would be unable to make a sig. If you decide to leech code, you'll need to use the language the author decided upon. Also the question you asked flags a few questions. Most web servers will have php installed, including free ones. If your running from home you get issues like uptime and bandwidth concerns. I'm not a large forum poster but I wouldn't be surprised if my sig causes 1gb of traffic this month. |
Jul 23, 2008 8:01 AM
#26
I guess so, but i've never dealt with images w/ RoR before so its kinda something like a new field for me, with that in mind its just the same story if I was going to use Php so I guess I'll stick with this scripting style and ask a couple more questions from the author. thanks for the heads up. |
canephalanxJul 23, 2008 8:10 AM
Jul 23, 2008 10:25 AM
#27
I'm testing my signs on thefreehoster.com just to be sure it will work on at least a free server, it's not perfect but has cronjobs, last version of php, gd, curl and almost all usefuls libs installed, 100mb space and 5gb bandwith. Maybe we should make a post with a list of decent freehost to use to host the signs? |
Needs to fix this sometime but I'm lazy - since 11/05/2009 |
Jul 24, 2008 12:47 PM
#28
Jul 25, 2008 8:37 PM
#29
It is a good idea, there are quite a few details which would be needed for a good host. Some which aren't as apparent. Some forums only let valid image extensions so mod_rewrite is a plus, I suggest CURL for sockets, PHP5 (rather than 4) is quite important too. Bandwidth could actually be an issue, signatures generally range from 100-200kb. With 5gb bandwidth your looking at about 170mb a day. I'm not a big poster and all my sigs are about 150kb but I reach about 40mb a day bandwidth. If continue to use mal (im a fairly new user) it wouldnt be odd to quadruple by sig views, that would bring me just shy of 5gb. |
Jul 25, 2008 8:57 PM
#30
It's probably pretty obvious to most of us, but I thought I might point out that you should use a local webserver (like WAMP) first to test and tweak your sig before actually uploading it. This makes the process a lot faster and doesn't use up your bandwidth or generate lots of errors for your webserver administrator. Also it's a generally good practice to minimize the amount of bandwidth, memory, and processing time your sig consumes. For example if you grab your xml data using cURL but only use the data at the top, try using CURLOPT_RANGE to only grab the top of the file instead of the top entries and the hundred plus entries under it. I realize most people have trouble just getting it working, but try to learn the craft and write clean code and you'll see snappier, more-efficient sigs. |
sakaJul 25, 2008 9:04 PM
Jul 25, 2008 10:18 PM
#31
I would have to disagree with you on the local testing. Although at the same time I don't suggest live testing. I prefer to code things in a 'live environment' (different folder or subdomain on the same host), especially when your going to be using a fairly specific service. It's quite rare to find two servers exactly configured when it comes to versions and apache. Your looking at overlapping rules and directives and different versions. My webhost for example disables access to external websites through all of PHP's functions, also there have been edits to the gd functions in the later versions of PHP5. Also you'll find that quite a few webhosts won't count traffic caused by code due to the way its executed, this is more true for free hosts than paid hosting. I'll end on the note that, editing code in ssh is quite popular among my friends who find it silly that I prefer to use a local text editor. I prefer having a local copy (usually on svn), and having a text editor with a built in ftp has its advantages. |
Jul 25, 2008 10:55 PM
#32
Editing files over SSH is absolutely stupid unless the server is geographically close to you. Having 250ms lag between pressing a key and having it appear makes it absolutely impossible to do any fast coding and the time it takes to compensate you might as well just edit locally then upload when testing. As for testing on a remote server it's also not really worth it when writing anything over 2,000 lines long, once again due to the time wasted for uploading over the time gained when writing locally. I don't use free hosts so I don't really know their specifics but almost every single paid host is identical to one-another so it's quite easy to emulate them on a local server. Of course if you are just beginning or just want to do one thing and never touch [Your favourite language] again then it isn't really worth setting up your own development environment, but if that is not the case it's worth it in the long run. |
Jul 26, 2008 7:58 AM
#33
Personally I don't see much difference between [ctrl+s](save) and [ctrl+shift+s] (upload to ftp) both usually get the file saved to the right place before I have time to switch to firefox and refresh. I'im on one of the largest webhosts on the internet and it has fopen disabled for eternal websites, although it allows you to compile your own php or use your own php.ini, which I have done for specific needs. I also use servers dedicated for IRC use, hosting things like BNC's and eggdrops, which are configured a little differently to my main webhost, and have things like specific IP's which things need binded too. I recently made a script which used a different IP each socket (I've access to 80 IP's on that server) I also have a user on a friends VPS, which has its own quirks, and I'm hosting an eggdrop and a web site on the same user. And finally, as if that's not enough reasons, PHP behaves differently on windows and nix, for example php4 has problems accessing files through GD commands like 'imagecreatefrom*' |
Jul 26, 2008 6:35 PM
#34
I think it goes without saying that all good hosts will have fopen disabled.... you shouldn't use it anyway. cURL is just fine and is more secure, and hence is usually allowed. The only reason it wouldn't work is if the host has a firewall and wont poke outgoing holes for you.... there are some like that, including the company I work for.... *sigh* I test locally because I get instant refresh, instead of waiting a few seconds, but that's mostly asthetics. Perhaps you just have a badass internet connection, but going over the net should always be slower than pulling it right off your drive through http://localhost/.... It's good practice in general to use a test server first.... especially if you're debugging lots of cpu and bandwidth-intensive code. Your system administrator will thank you for it, or at least not temporarily lock you out for manipulating server resources with buggy code. WAMP is a snap to install, so I see no reason not to use it.... If your free host doesn't support your script, find another free host. |
Sep 7, 2008 4:57 AM
#35
I hope the documentation comes soon. I'm a PHP newb so I can't get around much ^^ I'll try every script posted in this club. |
Sep 8, 2008 2:28 AM
#36
Another newbie with stupid questions... Thanks to Khobbits code and Bard's links I was able to create a sig (a simple one), and to make it work on my local server (I used MAMP, as I have a mac). Bard's code didn't work on it, I don't know why.: But I have three questions for the expert : 1. If I want to use aa animated gif background I come accross some troubles (it works well with png) : The gif is not animated anymore and the typo is awful, like with pixels (I changed the header from content-type:image/png to content-type:image.gif, then imagecreatefrompng to image createfrom gif). Does anyone know what I did wrong / what I forgot to do ? Is the header wrong ? 2. With khobbits code, I can have inforamtion about my profile on my sig (numbers of anime completed for example), but how can I have the recently watched anime ? This information doesn't appear on my profile (Seems it doesn't downlaod) . Do I have to chage something on the malparse doc ? (On bard's This info come from a file wich is missing). 3. Last but not least, a stupid question (Sorry about this). I have a free server which support php, but how do I upload all this ? I uploaded everything in the parent directory, but it doesn't work. Any tips ? Thank you very much for your help. I did everything I could by myself - I don't want to be too much of a nuisance- but I'm quite stuck here, and after going this far (far for me of course, I know it's very basic), I really want to learn more. |
![]() ![]() |
Oct 4, 2008 12:06 PM
#37
Nov 17, 2008 6:53 PM
#38
I noticed that some here have their signatures as (5/12) instead of "Watching, 5 of 12 episdoes completed". I dont know any PHP so I'm just working from this outline: function writeDescription($nr,$x,$y,$rule,$rotation=0,$length=45,$align="l") { $nr--; $Text=$this->rssDescription[$nr][1]; if(strlen($Text)>$length) $Text=substr($Text,0,$length)."..."; $this->writeText($Text,$x,$y,$rule,$rotation,$align); } I assume I have to change the $Text line, but I dont know what to change it to. can someon tell me how to get your signature to do that? also a description of what rssDescription[$nr][1] returns would be helpful. thanks! |
Nov 20, 2008 12:03 PM
#39
theeggman85: rssDescription is the contents of the MAL RSS feed. So it will return "Watching - 5 of 12 episodes" because that's what's in the feed. To change it you would have to parse that string to return the number of episodes watched and the total number of episodes and then use those two values for a new $text=($watched / $total). [Pseudo-code] This was already done with the script I'm using (Bard's) so I didn't have to do any fancy parsing myself. You can take a look at his code to see how it's done. Spoiler for relevant parsing code public function parseMAL($content, $thumb=TRUE) { $parser = xml_parser_create(); xml_set_element_handler($parser, array(&$this, 'startElement'), array(&$this, 'endElement')); xml_set_character_data_handler($parser, array(&$this, 'charElement')); xml_parse($parser,$content); for ($i = 0; $i < 50; $i++) { $episode = array(); $total = array(); $status = array(); preg_match('/ - ([0-9]{1,3}) of/', $this->content['description'][ $i+1 ], $episode); preg_match('/ of ([0-9?]{1,3})/', $this->content['description'][ $i+1 ], $total); preg_match('/(.*) - /', $this->content['description'][ $i+1 ], $status); $results[$i] = array('title' => $this->content['title'][ $i+1 ], 'time' => (strtotime($this->content['pubdate'][ $i ]) + (4*60*60) + (5*60)), 'status' => $status[1], 'episode' => $episode[1], 'total' => $total[1], 'type' => substr($this->content['link'][ $i+1 ],23,5), 'id' => substr($this->content['link'][ $i+1 ],36), 'thumb' => '' ); }; xml_parser_free($parser); return $results; } |
Nov 20, 2008 5:20 PM
#40
Unfortunately I know nothing about php... I have some experience with flash which somewhat helps, but I guess I'll have to figure that out. One other really noobish question: I uploaded Talon's outline to a free php site, after customizing it to my needs. when i go to the website, what should the file path be for my sig with text from the php? will the php directly change the image in the /img folder so that I just navigate directly to the "background" for the sig, or is it somewhere else? |
Nov 28, 2008 2:32 AM
#41
can someone please tell me how do I add Recently Read Manga by chapters to this script?? |
A True Man Never Dies... Even When He's Killed!!!! ![]() |
Dec 5, 2008 8:06 AM
#42
I use my own script, but since I've helped others set it up I know a lot about Talon/Niroko's as well. Assuming you have it working using using the default anime type with a constructor line something like this: Signature("nikmax","yourbackground.png",-5,true,true); ...then all you need to do is add on one additional argument that specifies the feed type. In your case it's... Signature("nikmax","yourbackground.png",-5,true,true,"rrm"); If anyone's interested in using the other feed types, they are as follows: 'rw' = recently anime by series (default) 'rwe' = recently anime by episode 'rm' = recent manga series 'rrm' = recently read manga by chapter Hope that helps. :) Edit: had "rrm" listed as by volume instead of chapter--fixed. :) |
sakaDec 5, 2008 8:10 AM
Dec 11, 2008 7:37 AM
#43
thanks... ^^ well.. I wanted recently watched Anime and recently read Manga on one sig.. how do I add coordinates for manga capters? I added rrm to the line you wrote and now its showing only manga :( oh and btw.. I would be thankful if anyone could tell me how do I remove "Anime name - TV" .. sometimes its "Anime Name - ..." ... and I guess it would be the same with "Manga Name - Manga" thanks... |
nikmaxDec 11, 2008 7:41 AM
A True Man Never Dies... Even When He's Killed!!!! ![]() |
Dec 11, 2008 12:20 PM
#44
yes, it's the same. until now we didn't remove this and I can't tell when we're releasing here a newer vesion where it's posible. sorry.. |
![]() Donate to my awesomeness! | "Insanity: doing the same thing over and over again and expecting different results." - Albert Einstein |
Dec 17, 2008 7:41 PM
#45
Talon said: yes, it's the same. until now we didn't remove this and I can't tell when we're releasing here a newer vesion where it's posible. sorry.. Yeah I would like to remove that "TV", "OVA" as well, which I could probably do if I knew php... lol. I have a quick question. I have this on my script for the description part of the sig (thanks saka!): $TextDescription=$this->rssDescription[$nr][1]; preg_match('/ - ([0-9]{1,3}) of/', $this->rssDescription[$nr][1], $episode); preg_match('/ of ([0-9?]{1,3})/', $this->rssDescription[$nr][1], $total); $TextDescription="(".$episode."/".$total.")"; But when it outputs it gives me (Array/Array)... Anyone know how to fix this? |
theeggman85Dec 17, 2008 7:45 PM
Dec 17, 2008 11:35 PM
#46
last row doesn't work because of the created arrays, this is how it's done afaik... $TextDescription="($episode[0]/$total[0])"; |
![]() Donate to my awesomeness! | "Insanity: doing the same thing over and over again and expecting different results." - Albert Einstein |
Dec 18, 2008 4:14 PM
#47
Talon said: last row doesn't work because of the created arrays, this is how it's done afaik... $TextDescription="($episode[0]/$total[0])"; that worked the way I wanted it to; unfortunately Im still php retarded. This is the code I have: $TextTitle=$this->rssTitle[$nr][1]; $TextDescription=$this->rssDescription[$nr][1]; preg_match('/ - ([0-9]{1,3}) of/', $this->rssDescription[$nr][1], $episode); preg_match('/ of ([0-9?]{1,3})/', $this->rssDescription[$nr][1], $total); $TextDescription="($episode[0]/$total[0])"; if(strlen($TextTitle)>$length) $TextTitle=substr($TextTitle,0,$length)."..."; $Text=$TextTitle." ".$TextDescription; $this->writeText($Text,$x,$y,$rule,$rotation,$align); these two lines, of course: preg_match('/ - ([0-9]{1,3}) of/', $this->rssDescription[$nr][1], $episode); preg_match('/ of ([0-9?]{1,3})/', $this->rssDescription[$nr][1], $total); give me a total output of "( - 11 of / of 13 ) which is obviously not what I want. I tried removing them from the preg match, but then it can only find the first entry (episodes watched). How can I remove these from the string and make it "(11/13)"? |
Dec 19, 2008 5:38 AM
#48
try $TextDescription="($episode[1]/$total[1])"; instead of what I said earlier... |
![]() Donate to my awesomeness! | "Insanity: doing the same thing over and over again and expecting different results." - Albert Einstein |
Dec 19, 2008 10:22 AM
#49
Dec 19, 2008 12:17 PM
#50
first element of the array is the complete part wich was a match, second is what you've extracted. |
![]() Donate to my awesomeness! | "Insanity: doing the same thing over and over again and expecting different results." - Albert Einstein |
More topics from this board
» saka's minimal signature script (with merged anime/manga feeds) ( 1 2 3 4 5 ... Last Page )saka - May 10, 2009 |
430 |
by Mathes
»»
Oct 5, 2017 2:43 PM |
|
» Scripted Signature ShowcaseKHobbits - Jul 9, 2008 |
23 |
by KHobbits
»»
Oct 21, 2014 6:42 PM |
|
» MAL Signature DesignerApoWulf - Mar 11, 2014 |
10 |
by ApoWulf
»»
Aug 6, 2014 3:01 PM |
|
» iSignaturei906 - Dec 11, 2009 |
9 |
by USKurosaki
»»
Apr 10, 2013 8:40 PM |
|
» Animated Signatureskoleare - Jan 3, 2013 |
1 |
by Rezurrekt
»»
Jan 10, 2013 4:13 PM |