Forum Settings
Forums

saka's minimal signature script (with merged anime/manga feeds)

New
Reply Disabled for Non-Club Members
Pages (9) « First ... « 6 7 [8] 9 »
May 10, 2011 12:22 PM

Offline
May 2008
4052
Is there perhaps a sig.png in the directory already, that is not writable? If there is a sig.png there then just delete it and try again.

I am a banana.
May 15, 2011 4:09 PM

Offline
Apr 2009
155
saka said:
Is there perhaps a sig.png in the directory already, that is not writable? If there is a sig.png there then just delete it and try again.


nope. the dir is completely empty. i've never had a successful sig yet.

technically i have two servers i'm trying to work this on, but the other one gives me a server error (500) without putting anything in the log, so i figured the one where it's saying cache isn't writable (when it is) is the one i'll be more likely to get working.


May 15, 2011 5:06 PM

Offline
May 2008
4052
Not sure then... perhaps if you zip up the whole directory and upload it for me I can try to troubleshoot. It sounds server dependent though.

I try to make the code as portable as possible, but there are always cases that slip by. Some servers do not compile php with GD or FreeType and will therefore throw errors when trying to work with images at all.

The one with the "not writable" error should have those at least, so I hope it can be resolved. Make sure the $cachedpath variable has the correct path, and that the path is writable by the webserver. Some servers will run su_exec so the server actually runs with your username, and I've seen them error out if you chmod the directory (for example justhost.com). Perhaps setting the directory back to the default 755 is worth trying.

I am a banana.
May 18, 2011 3:37 PM

Offline
May 2010
1017
How do I put the anime/manga text in upper case? >:
May 18, 2011 3:59 PM

Offline
May 2008
4052
Before your imagettftextalign() lines, do something like this:
array_walk($titles,"strtoupper");
...or substitute $status for the same effect on the status text.

I am a banana.
Jul 11, 2011 1:28 AM

Offline
Sep 2008
29
I really like your signature's script.Do you give away this script? I would really appreciate if I can have this script.
Jul 11, 2011 1:39 AM

Offline
May 2008
4052
there's a link on the first post ;3

if you need help with a specific effect, ask me privately and i'll help you out

I am a banana.
Jul 11, 2011 4:25 AM

Offline
Sep 2008
29
I would to know how to add thumbnail. I design my signature like this.

Jul 11, 2011 10:46 AM

Offline
May 2008
4052
Well it's too big to use on mal first of all.... so you'll need to make it smaller first (600x140 is the max). I've posted my thumbnail functions in this topic (second post):
http://myanimelist.net/forum/?topicid=209829

You'll need to add a bit more logic for each thumbnail to rotate it using imagerotate(). What you'll want to do is make your image above transparent in the thumbnail areas. In the script open or make a blank image just large enough to overlay all three thumbnails, generate and overlay the thumbnails, rotate that whole image 10 degrees or whatever it is, overlay all the thumbnails onto a blank image the same size as your final image, and then finally overlay your hinagiku and film with the transparency over all that so that the thumbnails peek through them.

Resize your image first to be 140px high and I can help you with the rest. I've done some very similar signatures before. Somebody made one with the tilted film idea too some time ago.

I am a banana.
Jul 22, 2011 11:35 AM

Offline
Apr 2007
1964
What should I add to the script if I want to have stroke on the title text?




Jul 22, 2011 12:12 PM

Offline
May 2008
4052
Most people have been using niroko's glow/effect library here:
http://myanimelist.net/forum/?topicid=104246

You can just download that file to the same directory, add require('imagettf.adv.php'); at the top, and then follow the example there providing each value the imagettfstroke function needs.

If you just need stroke, I can probably whip up a fast function for you. I was also working on an improved glow library a while back that I never quite finished, but works better in some situations. Give me a bit and I'll post some nice stroke code here.

I am a banana.
Jul 22, 2011 12:26 PM

Offline
Apr 2007
1964
Thank you, I just need stroke for now.




Jul 22, 2011 12:52 PM

Offline
May 2008
4052
alrighty, here ya go:
http://codepad.org/jVRTd8QE
^ copy and paste the above function to the bottom of your signature script just before the ?>

...and then just replace your imagettftextalign lines with imagettfstrokealign, adding a stroke color and radius onto the end:
imagettftextalign($sigimage,18,0,250,40,$color,$font,$titles[0],'c');

...becomes...
imagettfstrokealign($sigimage,18,0,250,40,$color,$font,$titles[0],'c',0xff0000,10);


I didn't feel like doing $strokecolor = imagecolorallocate($sigimage,255,0,0); so I just entered the hex color directly. You can use a variable for it if you wish.

I am a banana.
Jul 22, 2011 3:27 PM

Offline
Apr 2007
1964
thanks saka




Jul 24, 2011 12:01 AM

Offline
Jan 2009
348
Heya. I'm having some problems with your script Saka. I've uploaded all my files and I've updated my user, font name etc but when i try and open the sig.php in my browser it outputs the following errors:

Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in /home/a1016241/public_html/signature/sig.php on line 191
Warning: imagettftext() [function.imagettftext]: Could not find/open font in /home/a1016241/public_html/signature/sig.php on line 198

If it's easier i can upload a .zip of my files.

Thanks!

Ahoy!
Jul 24, 2011 12:25 AM

Offline
May 2008
4052
You need the *.ttf file in the same directory, and the font file name in the script is case sensitive on unix servers (most servers are). If it's not that, go ahead and upload a zip and I'll look at it.

I am a banana.
Jul 24, 2011 12:32 AM

Offline
Jan 2009
348
I have checked the case of the font and i do believe it's correct so i've uploaded my files instead. The URL is in the spoiler.

Ahoy!
Jul 24, 2011 12:58 AM

Offline
May 2008
4052
Works fine for me:


Try reuploading the font -- maybe it only uploaded partially or something. Otherwise it may be an issue on the server that you cannot fix (php+gd may not have been compiled with freetype support). You might also try using a different font to see if it works on that server.

I'm going to bed now but I'll be back in ~8 hours.

I am a banana.
Jul 24, 2011 1:24 AM

Offline
Jan 2009
348
Ok well i've uploaded it to a better webhost and it works brilliantly now (stupid 000webhost).
Thanks for the help Saka :D

Ahoy!
Aug 3, 2011 4:29 AM

Offline
Sep 2008
29
How to rotate function imagettfstrokealign?
ThaiAnimeAug 3, 2011 4:58 AM
Oct 31, 2011 9:42 PM

Offline
Apr 2009
98
Thanks for the script it worked pretty well ^_^
Nov 1, 2011 8:25 AM

Offline
May 2008
4052
Glad it worked for you. :3

I am a banana.
Dec 28, 2011 4:47 PM
Offline
Mar 2011
68
I had to add ./ before font name. Dunno why.
Jan 10, 2012 11:53 PM

Offline
Aug 2009
9
I'm having a problem. I'm using the random signature codes you posted, but I keep getting this error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/vhosts/9-k.freeoda.com/signature/randsig.php on line 9

Line 9 said:
header('Content-type: image/png');

I'm not sure what's wrong there..



Okay, for some reason it wasn't working earlier, but it works now. I figured it out.

Thanks for the codes (and all the help you've indirectly given me!)
mzkmkbJan 12, 2012 6:35 AM
Jan 11, 2012 12:00 AM

Offline
Oct 2009
5736
EDIT:

Read through the whole thread and found my answer, sorry about that.

EDIT

@Saka: Could I have a link to the perspective warping/rotation, web2.0-style reflections + photoshop-style blending modes .zip? (Sent you a PM about it too.)

EDIT:

Oh and Niroko's Glow Effect Library with alignment if you still have that.
YanofliesJan 11, 2012 1:26 AM
Signature removed. Please follow the signature rules, as defined in the Site & Forum Guidelines.
Mar 3, 2012 6:18 PM

Offline
May 2010
1017
Does it work with gif images? I changed the output to gif:


However, the gif is frozen. Again, it appears sometimes, but mostly I get it:



What do I do?

Btw, I use freewebhostingarea.
lihmaoMar 3, 2012 7:34 PM
Jul 3, 2012 12:58 PM

Offline
Mar 2007
3128
Haven't made a sig in over 3 years... i heard about something about 000webhost... so are they blocking these php scripts now or something? b/c i reactivated my acct and everytime i try to run it 404's.

Its the same script i've had before (thank god i kept it zipped)... is it the host thats giving me issues?

"What happens when we die?" I know that the ones who love us will miss us.
Jul 8, 2012 8:53 AM

Offline
Feb 2012
805
I can't get it to work...

I get these errors, apparently, it can't load the font.
http://ozland.mareko.webatu.com/sig.php



Edit: Nevermind, it was 000webhost acting again. Thanks for the script :)
Edit 2: Is there a way that I can only show the anime updates and not the "Plan To Watch", "Dropped", etc. ?
OzlandJul 8, 2012 9:26 AM
Jul 8, 2012 9:47 AM

Offline
May 2008
4052
Ranivus said:
Haven't made a sig in over 3 years... i heard about something about 000webhost... so are they blocking these php scripts now or something? b/c i reactivated my acct and everytime i try to run it 404's.

Its the same script i've had before (thank god i kept it zipped)... is it the host thats giving me issues?
Yeah 000webhost decided to declare war on signatures, since poorly configured scripts were using a significant amount of their resources. I made a topic with a list of free web hosts, although as you'll see almost all of them are unusable now. The remaining ones are either badly limited or difficult to register. If anybody finds new free hosts that work, please post them there.

Ozland said:
Edit 2: Is there a way that I can only show the anime updates and not the "Plan To Watch", "Dropped", etc. ?
Yes, you can remove them from the update array(s) though be careful because the rss feed goes back only 15 updates, and that can cause issues if you have no allowed statuses in those updates. For example, if you add 15 new titles under Plan to Watch, and your script is set to remove them, it will find no updates and fail.

Understanding this, you can remove it like this.... Find line 72 which looks like this:
array_multisort($timestamps,SORT_DESC,$titles,$status,$current,$totals,$units,$types,$subtypes,$ids);
...and add the code from this post beneath it:
http://myanimelist.net/forum/?topicid=84446&show=240#msg8576208

It's actually a hackish way to do it, since you have to make sure every array is included in your lists. It would have been better if I had made all the statuses in a structured way. At the time it seemed better to make them easy to reference (If they were objects or nested arrays you would have $updates[0]->title instead of just $titles[0]).
sakaJul 9, 2012 9:14 AM

I am a banana.
Jul 8, 2012 10:19 AM

Offline
Feb 2012
805
Amazing, thank you very much for your anwer, I got it working now. :)
Jul 16, 2012 5:20 AM

Offline
Apr 2011
44
Hello..Today i wanted to create my own Signature and use the custom text and such without Mal standard.i stated working on this 5 hours ago and finaly nearly finished...but now ive given up and thought of asking for help..Ok firstly i am actually completed But when i try get the signature to comeup or generate,it wont show..The webhost i use is Freewebhosting.com and i can view my sig.php and my png file on the browser but when i try add it to my Signature it tells me that it cant find it..Any help would be greatly apreaciated Thank you.

Edit: ok well i managed to show an Image but i am abit lost on puting the Information of the List onto the image i have provided..

Edit: The only problem i have is my Sig.php wont generate a picture with the font..
ArcuiedJul 16, 2012 7:14 AM
Jul 17, 2012 11:55 PM

Offline
May 2008
4052
Um... you should not be using FTP to reference your signature. Even if it weren't password-protected, the PHP environment runs under the HTTP side so the script would only be accessed and not run.

The public link to access your script is here, and the error is pretty self-explanatory:
http://arturia.orgfree.com/Signature/sig.PHP
...Try to avoid using spaces and special charaters in your image names. Make sure the file names match exactly, and they are case-sensitive.

I am a banana.
Jul 18, 2012 12:21 AM

Offline
Apr 2011
44
Ok Thanks ill try it now
Edit : Thanks Saka i got it to show..all i got to do is Edit my font and colour and size then im all good...Thanks again
ArcuiedJul 18, 2012 12:28 AM
Oct 24, 2012 5:40 PM

Offline
Jan 2008
82
Small issue here with the script.
I realized today it doesn't work anymore. Nothing changed on the server, permissions are still 755, but it doesn't work. No error is given out either, aside from the 504 of the browser.
I checked all error logs, but absolutely nothing from the script. Any way to see why isn't it working?
Oct 24, 2012 7:32 PM

Offline
May 2008
4052
If php doesn't like anything in the script then the script should output a descriptive text error instead of the image. It sounds like your web server's software is complaining instead.

A 504 error generally means there is a networking issue with the web server. It's more likely an issue with the server configuration than the script. This script requires there to be open outgoing ports on the server's gateway (router) and depending on how it is configured that could cause a 504 error. Your host may have recently started blocking outgoing traffic (which means the script will fail to download mal's rss feed). There are legitimate reasons to do this to prevent people from using their servers for unsavory stuff (botnets, spam, password harvesting, etc).

If you pm me the link to your script and a copy of the source, I can take a look at it to be sure. You might also want to try uploading the script I have in the spoiler here:
http://myanimelist.net/forum/?topicid=217409

I am a banana.
Oct 26, 2012 8:11 AM

Offline
Jan 2008
82
saka said:
If php doesn't like anything in the script then the script should output a descriptive text error instead of the image. It sounds like your web server's software is complaining instead.

A 504 error generally means there is a networking issue with the web server. It's more likely an issue with the server configuration than the script. This script requires there to be open outgoing ports on the server's gateway (router) and depending on how it is configured that could cause a 504 error. Your host may have recently started blocking outgoing traffic (which means the script will fail to download mal's rss feed). There are legitimate reasons to do this to prevent people from using their servers for unsavory stuff (botnets, spam, password harvesting, etc).

If you pm me the link to your script and a copy of the source, I can take a look at it to be sure. You might also want to try uploading the script I have in the spoiler here:
http://myanimelist.net/forum/?topicid=217409

It was indeed a firewall blocking outbound connections. I sent them a ticket and they added MAL RSS to allowed IPs, so now the script is working properly.
Thanks. ^^
Feb 27, 2013 7:01 PM

Offline
Sep 2008
29
Nov 4, 2013 8:14 AM

Offline
Apr 2011
44
Heya Again Been awhile since I last needed help haha.

Any way I have had smooth sailing for my Sig all this time until now..For some reason it isn't showing my Updates on the Sig anymore..I am aunsure what to do..

If you want details like the Scripts I can Message them afterwards..

Any help would be appreciated thank you.
Nov 4, 2013 10:19 PM

Offline
May 2008
4052
Crave implemented a new intrusion detection system that is blocking a lot of automated traffic, including not just scripts but services like Taiga and MAL Updater. Until Crave can find some middle ground between security and accessibility, I'm afraid that a lot of signatures and other programs that rely on the API will continue to have these problems. Changes to the code may be required to keep things running smoothly, but I won't post any changes until I verify that next week.

I am a banana.
Nov 5, 2013 1:36 AM

Offline
Apr 2011
44
Alright Thank you for the Reply.
Nov 5, 2013 3:11 PM

Offline
Jan 2008
82
saka said:
Crave implemented a new intrusion detection system that is blocking a lot of automated traffic, including not just scripts but services like Taiga and MAL Updater. Until Crave can find some middle ground between security and accessibility, I'm afraid that a lot of signatures and other programs that rely on the API will continue to have these problems. Changes to the code may be required to keep things running smoothly, but I won't post any changes until I verify that next week.


So this was the problem.
I noticed all of a sudden that my signature was only showing the image, without the list, and was wondering what's wrong.
Please keep us updated.
Nov 28, 2013 2:14 PM

Offline
Apr 2011
44
Wondering if there is any news about this?
Dec 14, 2013 2:26 PM

Offline
May 2010
1017
Yeah, I have the same problem. I thought it was a problem on my FTP server, but seems not... Wish I knew how to solve it. My great thanks to saka, who is trying to solve it. :)
Dec 14, 2013 6:34 PM

Offline
May 2008
4052
There is a whitelist feature implemented now, though I've had some continuing trouble with it. Essentially you set a fixed user agent in the cURL header and it should allow you to get the RSS feeds from MAL. Problem is there is no user agent by default on my script so everyone will require an update. I'll post the needed code changes once it's approved by Crave.

I am a banana.
Dec 28, 2013 8:02 AM

Offline
Feb 2008
219
saka said:
There is a whitelist feature implemented now, though I've had some continuing trouble with it. Essentially you set a fixed user agent in the cURL header and it should allow you to get the RSS feeds from MAL. Problem is there is no user agent by default on my script so everyone will require an update. I'll post the needed code changes once it's approved by Crave.


Hey saka,

Any update. I just noticed this was happening to me. I tried updating the script to include the CURL User Agent, but no go. This whitelisting stuff appears to be generally annoying. It looks like they made a poor choice in vendors DDoS protection. Regardless, I'd love to get this working again. I'll assume you submitted your script to their whitelisting form? I'm about to start building my own MAL because of all this BS.
Jan 4, 2014 3:03 AM

Offline
Jul 2007
40
Saka,

Do you still work with the full script?(Not the minimalist version). I still use(if you can call it that right now) the very old original version, but am curious of the updates you've done.

Jan 5, 2014 2:43 AM

Offline
May 2008
4052
I'm not sure what version that would be, since my script has always been pretty minimal. Are you referring to ehrgeiz's version from back in the day?

I am a banana.
Jan 5, 2014 5:14 PM

Offline
Jul 2007
40
Hrm, perhaps
MAL Signature Builder - Dynamic picture signatures is the file I received from you, copyrighted 2008. I've used and expanded on it ever since.

Jan 21, 2014 9:15 AM

Offline
Jul 2007
40
Ok got a little tired of waiting. The issue doesn't just to appear to be with the userAgent, the header seems to try to add cookies as well, if the cookies aren't provided you get redirected to a invalid location.


The 2 cookies seems to be generated each time as well

incap_ses_32_81958 = 72dMW7OxwTqD2usirbBxAC2p3lIAAAAAuQtkRU4XDPlxg5dnpUGIlw==

and

visid_incap_81958 = WQFIoKoISzWPuvUK/Np /i2p3lIAAAAAQUIPAAAAAADARdiAKNpg9OoI0POYtC98

You set a cookie ahead of time to cUrl with curl_setopt($ch, CURLOPT_COOKIE, $cookie'); , but the issue Apo's seeing is if it's possible to grab the cookies first to allow the cUrl to process correctly.

Jan 21, 2014 7:34 PM

Offline
May 2008
4052
You're not going to have any luck with cookies. It's funny because yesterday I did manage to get it working successfully, though not as Crave advertised it. I requested a whitelisted user agent from Crave to use the API, and tried setting the user agent but had no success in three attempts of contacting them. I did try adding fields as if I was various browsers and also was getting frustrated by the cookies. If you set the appropriate headers with the whitelisted user agent, it does seem to work. I work long hours during the week but I'll post some code as soon as I can.

I am a banana.
Reply Disabled for Non-Club Members
Pages (9) « First ... « 6 7 [8] 9 »

More topics from this board

» Scripted Signature Showcase

KHobbits - Jul 9, 2008

23 by KHobbits »»
Oct 21, 2014 6:42 PM

» MAL Signature Designer

Apocist - Mar 11, 2014

10 by Apocist »»
Aug 6, 2014 3:01 PM

» iSignature

i906 - Dec 11, 2009

9 by USKurosaki »»
Apr 10, 2013 8:40 PM

» Animated Signatures

koleare - Jan 3, 2013

1 by Rezurrekt »»
Jan 10, 2013 4:13 PM

» List of Free PHP Hosts that meet script requirements

saka - Jun 8, 2010

31 by saka »»
Oct 26, 2012 2:58 AM
It’s time to ditch the text file.
Keep track of your anime easily by creating your own list.
Sign Up Login