Forum Settings
Forums

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

New
Reply Disabled for Non-Club Members
Pages (9) « 1 [2] 3 4 » ... Last »
Jun 19, 2009 3:05 PM

Offline
Apr 2008
254
Okay, everything seems to go better way now, great thanks for help, but still I would use some more ^^ Sig is loading now, but there's no text on it, whatever I do. Here's the text-regarding code:


Changing font, color, position, doesn't do anything, sig is still empty
Jun 19, 2009 3:12 PM

Offline
Feb 2008
4295
Well, what color is your background, are you sure that's the correct position of the text and since fonts are very CaSe-SeNsItIvE, check that, including the ttf.
Jun 19, 2009 5:03 PM

Offline
May 2008
4052
one more thing that might be the culprit: the mal forums will strip backslashes on edit... it's right on my post now, but I had to edit it once to put the backslashes back in. Without them the regular expressions break and none of your RSS data is loaded... which might cause no text to appear.

Make sure these three lines contain backslashes in your version:


You can check that your rss data is being matched by putting a line like this right before your text lines:
var_dump($titles); exit(0);

That will output what the titles array looks like and then stop the script.... so you should see some data when you try to run it.

You should see a list of all the titles in your feed... If nothing is there, something is probably going wrong with parsing. You can just remove the test code if it is working, or use it to test other variables if you'd like.

If that fails, just compare your code against my original since we know that works.... ;P

I am a banana.
Jun 20, 2009 5:16 AM

Offline
Apr 2008
254
Checked the code, it's exacly the same as Your original code, also that var_dump line doesn't work, nothing changes (at first time I got "NULL error", but later nothing changed). Changing font position, angle, size, doesn't do anything.

Maybe something's with font file, it was .otf, I've changed it to ttf...
Jun 20, 2009 6:32 AM

Offline
Feb 2008
4295
Silmoren said:
Checked the code, it's exacly the same as Your original code, also that var_dump line doesn't work, nothing changes (at first time I got "NULL error", but later nothing changed). Changing font position, angle, size, doesn't do anything.

Maybe something's with font file, it was .otf, I've changed it to ttf...
You changed the name of the font or the code?
Jun 20, 2009 9:11 AM

Offline
May 2008
4052
Silmoren said:
Checked the code, it's exacly the same as Your original code, also that var_dump line doesn't work, nothing changes (at first time I got "NULL error", but later nothing changed). Changing font position, angle, size, doesn't do anything.

...which just further implies that something is wrong before the text stuff. There's probably nothing in the $titles array, so you're printing out a lot of nothing. An empty string prints just about the same when moved or rotated. ;)

Silmoren said:
Maybe something's with font file, it was .otf, I've changed it to ttf...

*.otf should work just as well, as long as it matches the filename in your code...

I still suspect something on one of the parsing lines is not correct, but I can't tell without looking at it. I've zipped up my test files and sent you a link via pm.

Just replace with your background.png and ol.png and it should work just fine.

I am a banana.
Jun 20, 2009 11:08 AM

Offline
Apr 2008
254
Okay, as it can be seen the problem is out, it was the font file that generated errors, changed it and everything seems fine. Once more many thanks for all people, who helped me creating this sig ^^
Jun 20, 2009 11:41 AM

Offline
May 2008
4052
ooooo looks great, too.

I am a banana.
Jun 22, 2009 10:39 AM

Offline
May 2008
1707
Hey, I'm making a signature for a friend using the anime/manga merged feeds. Anime updates works great, but when manga is updated, it looks like this:

It doesn't show the read chapter. It also showed the manga type before, but I managed to remove that. This problem is out of my skills though :P

This is what my code looks like:
Jun 22, 2009 11:21 AM

Offline
Feb 2008
4295
I'm guessing you'll need to edit
if ($status[$i] == "Watching" or $status[$i] == "Re-Watching")
to something like this:
if ($status[$i] == "Watching" or $status[$i] == "Re-Watching" or $status[$i] == "Reading")


Basically, tell the script how it should format the reading manga entries.
Jun 22, 2009 11:28 AM

Offline
May 2008
1707
Thank you, works great now :)
Jul 2, 2009 5:44 PM

Offline
Sep 2007
530
Great script
Jul 3, 2009 2:02 PM

Offline
Apr 2008
254
Hmmm recently I wanted to change script from Anime to Anime/Manga. Everything works just fine but 2 problems.

Is it possible with this script to create signature that displays two titles with statuses, where one title is always for manga and other is always for anime? I've changed few things but that script always shows me my recent changes, so when I watch two animes, it displays changes about those two animes, when I read two mangas, it displayes changes about those two mangas.

Second thing is, that script displayes how many anime episodes I've watched, but it doesn't display how many manga chapters I've read.

Also made small change to the code, so that manga title won't be displayed with "- Manga" at the title end:

$titles[$i] = preg_replace('/ - (TV|Movie|ONA|OVA|OAD|Special|Manga)$/', '', $titles[$i]);
Jul 3, 2009 2:57 PM

Offline
May 2008
4052
Silmoren said:
Is it possible with this script to create signature that displays two titles with statuses, where one title is always for manga and other is always for anime? I've changed few things but that script always shows me my recent changes, so when I watch two animes, it displays changes about those two animes, when I read two mangas, it displayes changes about those two mangas.

I set it up like this intentionally, although since the status contains 'chapters' instead of 'episodes', you should be able to use this to determine whether an entry is anime or manga.

You could duplicate the preg_match_all lines and parse the anime and manga buffers separately instead of the combined one... You'd need to make some new array names, or make the titles[], status[] etc arrays two dimensional.

If that sounds odd to you, you can do this easier workaround... If you've got more than 15 anime in your list (most people), you can just comment out the line that sorts the combined entries by date:
// array_multisort($timestamps,SORT_DESC,$titles,$status,$current,$totals,$units);

...and then the most recent manga entry should always be the 16th one (since the recent anime feeds list 15 entries). It's not as elegant, but it works.

Silmoren said:

Second thing is, that script displayes how many anime episodes I've watched, but it doesn't display how many manga chapters I've read.

Also made small change to the code, so that manga title won't be displayed with "- Manga" at the title end:

$titles[$i] = preg_replace('/ - (TV|Movie|ONA|OVA|OAD|Special|Manga)$/', '', $titles[$i]);

Strange, I thought I had fixed that already, but I guess i forgot to update the url. The full line to remove all types is this:
$titles[$i] = preg_replace('/ - (TV|Movie|ONA|OVA|OAD|Special|Manga|Manhwa|Manhua|Novel|One Shot|Doujin|OEL)$/', '', $titles[$i]);

I'll fix this on the first page shortly.
sakaJul 3, 2009 3:00 PM

I am a banana.
Jul 4, 2009 5:44 AM

Offline
Sep 2007
530
Forgive me if I'm asking a lot, but is there a way to reposition text if the anime title has less then a certain amount of letters?
Jul 4, 2009 6:15 AM

Offline
Feb 2008
4295
Roxkis said:
Forgive me if I'm asking a lot, but is there a way to reposition text if the anime title has less then a certain amount of letters?
Should be rather easy, if you know a little programming. You'd have to use http://php.net/manual/en/function.strlen.php and some kind of conditional statement like a switch or an if.

There may be some errors there, but it should be something like this:

if (strlen($titles[0])>5)
{
imagettftext($sigimage,14,0,118,38,$colour,$font,$titles[0]);
imagettftext($sigimage,11,0,125,50,$colour,$font,$status[0]);
}
else
{
imagettftext($sigimage,14,0,200,38,$colour,$font,$titles[0]);
imagettftext($sigimage,11,0,150,50,$colour,$font,$status[0]);
}


In this case, the first 2 lines will execute if the length is over 5 and the last 2 will execute if the length is below 5.

Yes, I overuse white space, give me a break.
kuroshiroiJul 4, 2009 6:20 AM
Jul 4, 2009 12:22 PM

Offline
Apr 2008
254
saka said:
If that sounds odd to you, you can do this easier workaround... If you've got more than 15 anime in your list (most people), you can just comment out the line that sorts the combined entries by date:
// array_multisort($timestamps,SORT_DESC,$titles,$status,$current,$totals,$units);

...and then the most recent manga entry should always be the 16th one (since the recent anime feeds list 15 entries). It's not as elegant, but it works.

Nope, it doesn't work for me, when I use it, sig only displays anime entries.

saka said:
You could duplicate the preg_match_all lines and parse the anime and manga buffers separately instead of the combined one... You'd need to make some new array names, or make the titles[], status[] etc arrays two dimensional.

Hmm I understand what what you mean, but my low PHP skill doesn't allow me to use that.

Well I'll stick with what I've got now, still it's not so bad :P
Jul 4, 2009 5:13 PM

Offline
May 2008
4052
works for me... Try this code:
http://pastebin.com/m361654e1

the titles array comes out like this, where 0-14 are anime and 15+ are manga:


these are the lines i changed, which might be helpful:
http://pastebin.com/pastebin.php?diff=m361654e1

I am a banana.
Jul 5, 2009 7:41 AM

Offline
Apr 2008
254
Hmm that seems to work nicely, thanks for help ^^
Jul 5, 2009 8:31 AM

Offline
Feb 2008
4295
saka 1 - php 0
Jul 10, 2009 4:38 AM

Offline
Apr 2008
254
Small change in code:

if ($status[$i] == "Watching" or $status[$i] == "Re-Watching" or $status[$i] == "Reading" or $status[$i] == "Re-Reading") {


Without this, sig won't display amount of manga chapters
SilmorenJul 16, 2009 2:53 AM
Jul 11, 2009 3:36 PM

Offline
May 2008
4052
Thanks for mentioning that. This has been pointed out before so I've updated it in the code.

Since with dual feeds its more likely people will list lots of statuses, I've changed it to an in_array() call so that you don't need to keep writing " or $status[$i] == " every time. I encourage people to change the formatting bits any way they'd like.

Here's the diff:

I am a banana.
Jul 15, 2009 12:40 PM

Offline
Feb 2009
7
saka said:

kuroshiroi said:
I'm considering switching over to your script, I'd need to incorporate some minor changes but overall, it does what I need. I'm assuming it actually works with 000webhost's cron jobs?

there shouldn't be any problem. something like this should do it:


is that how you did it? I tried to create a cron job exactly like that, but it doesn't update. I have to manually visit the php file to get my cache pic to update, so I know that is working.

mine looks like this and yes, I added it (just in case anyone asked)


any idea what I could be doing wrong?
redlupineJul 15, 2009 12:45 PM
Jul 15, 2009 2:46 PM

Offline
May 2008
4052
make sure the second field starts with public_html since the path should contain that. I'm not sure how it was left out of my screenie from earlier, but it should be there. So the second field for you would be:
public_html/myanimelist/sig_creator2.php

I am a banana.
Jul 15, 2009 9:22 PM

Offline
Feb 2009
7
saka said:
make sure the second field starts with public_html since the path should contain that. I'm not sure how it was left out of my screenie from earlier, but it should be there. So the second field for you would be:
public_html/myanimelist/sig_creator2.php


it's still not updating, maybe that was just part of the problem
I've tried playing around with the check_cache function, to see if that was the problem, but no luck there
Jul 15, 2009 11:26 PM

Offline
May 2008
4052
check_cache() will just prevent the sig from updating more frequently than once every X minutes. If your cron job is set to visit it every ten minutes, then you should still see the updates after that 10 minutes (or the cache time, whichever is greater).

The script seems to be generating it properly, so it must be a problem with the cronjob and not the script. The settings you showed should work though... are you sure it isn't working? Try making an anime update, then wait 20 mins and check the cache image.

There are also alternatives to using cron, such as using MAL Updater's php signature plugin to visit the url.

I am a banana.
Jul 16, 2009 12:02 PM

Offline
Aug 2008
175
I used the script posted on the first page (this), the anime and manga merged one. But I get this error: Parse error: parse error in C:\xampp\htdocs\sig\index4.php on line 62

Does anyone know what to do?
Jul 16, 2009 12:05 PM

Offline
Feb 2009
7
thanks for trying to help, but it's still not working

I made a strange discovery though. I tried 3 other cron job sites and tried to point them to my php file url, but the all failed when I tried to set the cron. I think there's something about my php file that cron jobs don't like.

Maybe I gotta make it not output an image, just save it to a the cache. Is there a way to do that?

EDIT: Nevermind, I fixed it, that was exactly the problem
I commented out the
header("Content-type: image/png");
line and BAM, now it works

EDIT2:
False alarm, it still doesn't work. Either it was a one time deal that it updated or someone was messing with me and manually ran my php
redlupineJul 16, 2009 9:18 PM
Jul 16, 2009 12:07 PM

Offline
Jul 2008
97
V3gas said:
I used the script posted on the first page (this), the anime and manga merged one. But I get this error: Parse error: parse error in C:xampphtdocssigindex4.php on line 62

Does anyone know what to do?


in fact there is missing a )

if ( in_array($status[$i], array("Watching", "Re-Watching", "Reading", "Re-Reading") ) {
should be changed to

if ( in_array($status[$i], array("Watching", "Re-Watching", "Reading", "Re-Reading") ) ) {
Jul 16, 2009 12:23 PM

Offline
Aug 2008
175
Niroko said:
]should be changed to

if ( in_array($status[$i], array("Watching", "Re-Watching", "Reading", "Re-Reading") ) ) {

Oh. Hahaha, such a small mistake. I guess I didn't look closely enough.

EDIT: Can anyone tell me how to not display Plan to Watch/- Read?
V3gasJul 16, 2009 1:16 PM
Jul 17, 2009 7:18 AM

Offline
May 2008
4052
fixed the paren...

not sure about the cron problem. You can check your error log for signs of problems, but if your script runs properly when you load the url, it should be the same when cron runs it.

V3gas, filtering out those plan to watch statuses might be tricky, since you need to maintain the other arrays with it. I guess you'd need to make a for loop and have it go through and remove them, copying over each of the other arrays to make sure the array index still matches.... I'll write something for you later when I get back from work.

I am a banana.
Jul 19, 2009 6:10 AM

Offline
Aug 2008
175
saka said:
fixed the paren...

not sure about the cron problem. You can check your error log for signs of problems, but if your script runs properly when you load the url, it should be the same when cron runs it.

V3gas, filtering out those plan to watch statuses might be tricky, since you need to maintain the other arrays with it. I guess you'd need to make a for loop and have it go through and remove them, copying over each of the other arrays to make sure the array index still matches.... I'll write something for you later when I get back from work.

Oh, sounds tricky. But awesome, thanks in advance!

EDIT: Stupid question, I figured it out.

But anyway, saka; awesome script, thanks for putting so much time into it, and, of course, sharing it!
V3gasJul 19, 2009 1:12 PM
Jul 29, 2009 11:33 PM

Offline
May 2008
4052
Xinil changed the feeds slightly ("Re-Watching" changed to "Rewatching"), so I've updated both versions of the script to fix those statuses.

Older versions might end up displaying Rereading manga as Rewatching since they won't get replaced properly, and the status checks on the title formatting lines may fail causing numbers to not appear (with my default code). I encourage people to do a global replace of "Re-Watching" to "Rewatching", which is only in one place in the anime version, and two in the animanga version.

I am a banana.
Jul 31, 2009 11:51 AM

Offline
Feb 2009
7
my cron problem got solved in case anyone else has that problem. It turns out the cron was starting in my home directory (instead of where the php script was) and trying to find the cache folder from there, which failed so it did nothing

so I added this to the top of the php script and now it works perfectly
chdir('public_html/myanimelist/');

just point it to where your php script is and the rest works like normal
Jul 31, 2009 12:03 PM

Offline
May 2008
4052
hmmm interesting..... which of 000webhosts servers are you running on (it should say on the right side after you login to your panel). This is a php environment issue.... as usually php should still run with its current directory as the script location.

I wonder if maybe its running as php 4 instead of php 5+....

I am a banana.
Jul 31, 2009 10:06 PM

Offline
Feb 2009
7
saka said:
hmmm interesting..... which of 000webhosts servers are you running on (it should say on the right side after you login to your panel). This is a php environment issue.... as usually php should still run with its current directory as the script location.

I wonder if maybe its running as php 4 instead of php 5+....


its says its running on server33.000webhost.com
php 5.2
Aug 16, 2009 4:33 PM

Offline
Aug 2009
353
Total php noob here... Can someone tell me how to change "watching @ y/x" to something like "y of x episodes"?
Aug 16, 2009 5:01 PM

Offline
May 2008
4052
FinestX said:
Total php noob here... Can someone tell me how to change "watching @ y/x" to something like "y of x episodes"?


just look for this bit around line 50:
$status[$i] = "$status[$i] @ $current[$i]/$totals[$i]";

...and change it to this:
$status[$i] = "$status[$i] at $current[$i] of $totals[$i] episodes";

or if you're using the merged anime/manga feed (where it might be chapters or episodes depending what updated most recently), then use the $units[] array on the similar line around line 63:
$status[$i] = "$status[$i] at $current[$i] of $totals[$i] $units[$i]";

I am a banana.
Aug 21, 2009 12:39 AM

Offline
Aug 2009
353
saka said:
FinestX said:
Total php noob here... Can someone tell me how to change "watching @ y/x" to something like "y of x episodes"?


just look for this bit around line 50:
$status[$i] = "$status[$i] @ $current[$i]/$totals[$i]";

...and change it to this:
$status[$i] = "$status[$i] at $current[$i] of $totals[$i] episodes";

or if you're using the merged anime/manga feed (where it might be chapters or episodes depending what updated most recently), then use the $units[] array on the similar line around line 63:
$status[$i] = "$status[$i] at $current[$i] of $totals[$i] $units[$i]";

Alright, thanks a lot! XD

Edit: I noticed some sigs had some kind of progress bar or something like that? Can we actually make something like that? If so can somebody teach me how to?
Aug 21, 2009 10:09 AM

Offline
May 2008
4052
once you figure out how to draw rectangles in gd, it's not too difficult to divide the current eps by the total. That's pretty much all you need. Here's the code for a function to draw progress bars, modified from one I wrote for someone else's signature. There may be bugs, since I didn't test with this script... but it should work.




...just copy that code above into the bottom of the script before the ?> (or include it from an external file if you don't like looking at all the function code). Now you can make calls to it like this:

drawProgBar(0,25,25,"990000","550000");


That will use your first update (index 0) to draw a progress bar at 25,25 with those colors. You can just substitute the string "trans" for either color and it will not draw that half of the progress bar. You can optionally specify the width and height of the progress bar as well as an overall transparency by using those extra arguments:

drawProgBar(0,25,25,"990000","550000",200,3,25);


That example draws the same progress bar at 25,25 but now it will be 200px long and 3 pixels high, and will slightly fade into the background (25% transparent, similar to having 75% opacity on a photoshop layer). In this function 0 is fully opaque and 99 is almost completely transparent.

I have another version that can draw progress bars at an angle (by using some trigonometry), but it looks ugly unless you upscale the image first. I might make that one easier to use and release it with my script code later.

I am a banana.
Aug 22, 2009 4:54 PM

Offline
Aug 2009
353
Got it... I think. :P
Aug 25, 2009 10:06 AM

Offline
Aug 2009
403
having a problem. Your script works GREAT and it is much easier to use. However, I have a problem with how the text is displaying itself on my signature. I know its not a problem with the actual scripting because I copied the same parameters I used before. Here they are


Anything that you can do to help me get it working would be greatly appreciated. Thanks.
Caprica6Aug 25, 2009 10:11 AM
Aug 25, 2009 11:06 AM

Offline
Jul 2008
97
you don't have to post it all over MAL....
Aug 31, 2009 7:55 PM

Offline
Apr 2007
1964
Little questions:
About the "PARSING THE RSS FEED AND EXTRACTING DATA" section in the anime only script... what does it do? Cause I'm not sure I understand what I can change and what not to change... >.<;;

& about the cache, do I need the "sig.png" file in the cache folder as well as the signature folder?
crystal_yuyAug 31, 2009 10:18 PM




Aug 31, 2009 10:30 PM

Offline
May 2008
4052
crystal_yuy said:
Little questions:
About the "PARSING THE RSS FEED AND EXTRACTING DATA" section in the script... what does it do? Cause I'm not sure I understand what I can change and what not to change... >.<;;

It basically just converts the RSS feed into variables you can use. You shouldn't have to change anything there, except perhaps under the "// FORMAT THE TITLE VALUES" and "// FORMAT THE STATUS VALUES" comments if you want to change the strings into something other than the defaults.

crystal_yuy said:
& about the cache, do I need the "sig.png" file in the cache folder as well as the signature folder?

Basically just point $cachedpath to wherever you want it saved.

That $cachedpath can be any location that's writable by the webserver. The script saves an image copy of your signature there every time it updates. You can either make a blank sig.png file in the same directory and make that image writable, or make an empty cache directory and make the directory writable so it makes its own... both ways work.

Luckily on justhost which is huyyy's host, you don't need to change anything to make it writable.... so just put any file path you want into $cachedpath and it'll work fine.

I am a banana.
Aug 31, 2009 10:50 PM

Offline
Apr 2007
1964
@ saka: I see.. Thanks ^^




Aug 31, 2009 11:31 PM
Offline
Feb 2009
1637
Great job saka :3
But I hope you won't mind me asking a few things xD

1. What exactly is the major difference between the first script you provided and the second? xD Cause I can't seem to tell. I'm using the anime/manga merged.

2. Foreground Image doesn't seem to work for me (and kyrori). Whenever I post a foreground image in that line where I'm supposed to, the foreground image won't show up. It'll just remain as the background image.

3. How do you get rid of "Completed" or "Plan to watch"? like, if you only want the episodes to show.

Sorry for all the questions. xD
Aug 31, 2009 11:48 PM

Offline
May 2008
4052
CharisMagic said:
1. What exactly is the major difference between the first script you provided and the second? xD Cause I can't seem to tell. I'm using the anime/manga merged.

the first script downloads only one feed, and it's designed for anime only, so it doesn't distinguish between chapters/episodes. the second script downloads both the recently watched anime RSS feed and the recently read manga RSS feed and then merges them together into one super update feed -- i'm pretty sure it's the only script that merges them this way although other scripts let you grab one entry from each.

CharisMagic said:
2. Foreground Image doesn't seem to work for me (and kyrori). Whenever I post a foreground image in that line where I'm supposed to, the foreground image won't show up. It'll just remain as the background image.

I tested it before and it worked fine for me... just put the image name in the overlay_image() function and remove the // in front so it isn't commented out.

The line is after all the text is drawn with imagettftext, so it should be overlaid on top of that.

CharisMagic said:
3. How do you get rid of "Completed" or "Plan to watch"? like, if you only want the episodes to show.

Just find this block:
// FORMAT THE STATUS VALUES - you can change the format as you like
if ( in_array($status[$i], array("Watching", "Rewatching", "Reading", "Rereading") ) ) {
$status[$i] = "$status[$i] @ $current[$i]/$totals[$i]";
} else { // "Completed, "Plan to Watch", "Dropped", or "On Hold"
$status[$i] = "$status[$i]"; // doesn't really do anything, but feel free to modify
}

...and remove the $status[$i] parts from the right hand sides of the equal signs.

That code block says basically... "if i'm watching it, print the status and the episode numbers... otherwise just print completed/dropped/on hold without any episode number."

If you just want it to print only the episode numbers every time, you could replace that whole block with just:
// FORMAT THE STATUS VALUES - you can change the format as you like
$status[$i] = "$current[$i]/$totals[$i]";


I just added the if statement as an example.

I am a banana.
Sep 1, 2009 5:22 PM

Offline
Apr 2007
1964
I have two more little question..

1. What do I change, if it's possible, if I want it to say something like "watching 10/10" instead of "Completed"?

2. Is it possible to set it so it only update episode? Not sure how to say this...
Like, the one I currently have, with slicing part and all, it's only update when I update an episode, the title I add as "Plan to Watch" or "Dropped" aren't add.. Can I do that with the script one as well?




Sep 1, 2009 6:58 PM

Offline
May 2008
4052
crystal_yuy said:
1. What do I change, if it's possible, if I want it to say something like "watching 10/10" instead of "Completed"?

In the rss update feed, completed series are marked with a "Completed" so you'd have to manually replace completed with watching... something like this:

// FORMAT THE STATUS VALUES - you can change the format as you like
if ( in_array($status[$i], array("Watching", "Rewatching", "Reading", "Rereading") ) ) {
$status[$i] = "$status[$i] $current[$i]/$totals[$i]";
} else if ($status[$i] == "Completed") {
$status[$i] = "watching $current[$i]/$totals[$i]";

} else { // "Plan to Watch", "Dropped", or "On Hold"
$status[$i] = "$status[$i]"; // doesn't really do anything, but feel free to modify
}

It's kinda similar to question 3 in CharisMagic's question above... just use if statements and rewrite the status however you wish.


crystal_yuy said:
2. Is it possible to set it so it only update episode? Not sure how to say this...
Like, the one I currently have, with slicing part and all, it's only update when I update an episode, the title I add as "Plan to Watch" or "Dropped" aren't add.. Can I do that with the script one as well?

It should be possible to remove the "Plan to Watch"/"Dropped"/"On Hold" status changes... I suppose the only way to do it would be to just loop through looking for those statuses, and if you find one remove the elements from all the parsed arrays so those other arrays would still match. (so if you find "Plan to Watch" in $status[5], go through and remove $titles[5], $current[5], $total[5], etc)... I haven't tested this, but something like this after the values are parsed and right before that big block in the previous question.

foreach ($status as $k => $s) {
if ($s == "Plan to Watch" or $s == "Dropped" or $s == "On Hold" ) {
unset( $titles[$k], $status[$k], $current[$k], $totals[$k]);
}
}
// and we need to fix the array indices for all the arrays because we removed items
$titles = array_values($titles);
$status = array_values($status);
$current= array_values($current);
$totals = array_values($totals);

^ this works only for the normal version.... for the merged animanga one, you'll also need to take care of $units[] and $timestamps[].

Keep in mind that the feed only contains your last 15 updates.... if all of those updates have one of those ignored statuses, you might end up with a blank sig... unlikely but careful not to add more than a dozen new series to 'plan to watch' all in a row.



small edit: the & i had was *not* important in the foreach
sakaSep 1, 2009 7:07 PM

I am a banana.
Reply Disabled for Non-Club Members
Pages (9) « 1 [2] 3 4 » ... Last »

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