Jason basically rocks at coding
Some of you may or may not be aware of the fact that The Orange Belt main page now displays a basic list of the latest comics made from some of the community sites. Until now, the list has been somewhat rudimentary; comic authors make an image that's always at the same URL, update it whenever they update the comic, and I put a static link on theorangebelt.org to their comic's front page. It does the trick, but it lacks a certain flair I originally desired with this project. Ideally I wanted to have the newest comics show up on top, and have the links go directly to the updated comic, wherever that might be.
So I got ahold of Jason and expressed my general desires, and he coded the whole damn thing in a day!
Now we've got a fancy dynamic display of comic RSS feeds (Zelda Comic is the only one that's formatted properly so far, I'll have to chat with Geoff, Steven et al to get them up to snuff) fit for a king. It checks each feed in its list looking for the latest entry that contains an image, so that only your newest comic shows up (and so that the lists isn't cluttered with a single prolific comic, pushing everyone else off the list). It looks like feeds that don't have an image choke the PHP, so I'll add other feeds in once they meet the criteria.
Thanks Jason! You really went above and beyond on this one. And I definitely appreciate your propensity to // comment on everything your code does. Very easy on the eyes.
So I got ahold of Jason and expressed my general desires, and he coded the whole damn thing in a day!
Now we've got a fancy dynamic display of comic RSS feeds (Zelda Comic is the only one that's formatted properly so far, I'll have to chat with Geoff, Steven et al to get them up to snuff) fit for a king. It checks each feed in its list looking for the latest entry that contains an image, so that only your newest comic shows up (and so that the lists isn't cluttered with a single prolific comic, pushing everyone else off the list). It looks like feeds that don't have an image choke the PHP, so I'll add other feeds in once they meet the criteria.
Thanks Jason! You really went above and beyond on this one. And I definitely appreciate your propensity to // comment on everything your code does. Very easy on the eyes.
Comments
//The next line is a comment
//This line prints "Hello World!"
Etc.
Jason doesn't wear sunblock. The sun wears Jasonblock.
Mario, thanks for the heads up on the glitch...my bad for being lazy. (It's actually something that should be solvable with regular expressions. Is it possible that these feeds will have images in them that are in blocks, or images that aren't wrapped in anchor (link) tags? (Your CSS selector suggestion is an excellent idea, too.) Let me know so that I can write something that discriminates.
Another non-robust issue is the fact that I try to insert the title of the RSS item as the title attribute of the image, but it probably breaks if there's not a space in between the <a href...> and the <img /> ...so I'll fix that as well.
Might be another day or so, as I have some other stuff to tackle (to put food on the table), but I'll likely get to it tonight.
(Hamelin, I still haven't forgotten about phpoetry, I swear. Just been super-mega-busy, and it's a slightly larger undertaking than this was.)
Can Jason make it so it'll strip out any ALIGN tags? I see most of the other ones are aligned to center, and the one from Mario's blog isn't aligned at all.
Side rant: align, border, and nearly all of the attributes that you folks (or wordpress?) are throwing into the <img> tag are what Cascading Style Sheets were invented for, people. I know CSS is scary, but seriously, it's been in use for a decade now, people. Even if you don't use CSS-based layouts, a little tweaking of it can be your friend!
:tmyk:
And please don't get me started on IE.
End rant.
Here's what the latest one looks like, "postimage" is the style to display my images correctly. Are the two classes messing things up? I looked it up and you can use two css classes in an image tag if you separate them by a space.[HTML]<img class="ob_img postimage" src="http://www.jkirchoff.net/image/balrogf.png" />[/HTML]
I'm not removing the css class for my images because I don't want to change how my site looks.
EDIT: I fixed it temporally by putting the CSS right in the image tag by doing the style= thingie, it works in the feed now, but it takes the style I added to it and uses it on the image on the orange belt page.
That includes throwing it at the very end of the list for some reason.