A Request for My Readers

I know that some of you are very talented code writers, whereas my abilities in that area are rudimentary. So maybe one of you could help me? I would like to have a button that would, with one click, automatically redirect the clicker to Birds in the News, without me having to update it on a weekly basis. A button similar to this;

Of course, the button would be prettier (I hope), but the purpose would remain the same, and readers could copy the code to post on their own blogs, if they wish. Is there anyone out there who is willing to work on such a thing for me?

(Does this remind anyone of the "Dark Mark" tattoo that would glow whenever Voldemort wished his Death Eaters to attend to him?)

More like this

Are you saying that you just want a button that links to Birds in the News?

Or are you saying that you want this button to automatically (dynamically) show what the latest version of birds in the news is?

The latter's a little harder.

yeah, the second challenge is the one i am after. this is why everyone is scared away.

Yeah, I'm scared away mostly.

Can you get feeds for each category? As in, can you get a feed for just your Birds In the News category? You'd need a way to "access" just that list somehow. Also, you'd need to be able to go over that list and generate images on your (SEED's) servers, and then provide the code that links to it.

It's actually not that hard. But it's probably best done by the tech people that maintain your site...

hm. well, i have to admit right now i don't have time, but look at it the "quick & dirty" way i can think of doing it is to take advantage of the fact that you have a consistent naming convention. you could have a 'redirect' page where a script loops through URLs, makes and http request and checks to see it the page exists. when it hits a number where the page doesn't exist it can exit out of the loop and redirect automatically to the last URL that gave back a good response (this could be saved in a variable that updates with everyone good response).

look i said, this is inelegant method, but i think it could work. unfortunately i don't have time to implement it now...but i've saved someone 15 seconds of thinking before they start cranking :)

to be more specific, i assume every post has the form:
birds_in_the_news_56_v2n7_1.php

so you could have a string like so:

$str = "birds_in_the_news_" . $num1 . "_v" . $num2 . "_" . $num3 ."\.php"

set up some loops where you start with the initial numbers. i don't think this will be too computationally intensive since you aren't going to iterate through too much junk. there are some narly ways out there to check if a URL exists i've seen in PHP.

anyway, there must be some unemployed web dev guys reading this weblog. fortunately i'm not one of them right now...but if no one steps up, i might this weekend.

It seems to me that to do this properly you'd need a referrer page at BitN Central, which "knows" where the current issue is and can bounce people there. And if you don't have a BitN Central, you need to institute one....

By David Harmon (not verified) on 02 May 2006 #permalink

it's a shame the URL http://scienceblogs.com/grrlscientist/birds_in_the_news/ doesn't have it's own RSS or atom feed. i'm not sure how much control you have over the site, could the admins at scienceblogs turn on an RSS feed on for only posts tagged with "Birds in the news"?

if they could it would then be trivial to include the AJAX RSS reader into the html of your side bar and set it to only display the first result (ie. the most recent 'edition').

should probably add that you could then format the AJAX RSS reader any way you want using a tage and a bit of CSS. this code can then be provided to any body else who might want to 'plug' the 'birds in the news' button on their site.

those of you who are curious and of you who like to think about these things .. every issue of "Birds in the News" is tagged so it pops up in my archives' "Birds in the News" category, so in that sense, it should be possible (magically, miraculously) to link to that one category tag and make a button that dynamically updates using only that category. i have no idea what this mysterious code might look like, and only the foggiest notion as to how it would function, so one might even argue that "it's magic!" (a la Harry Potter) or "it's a miracle!" (a la religion). which reminds me that everything that we don't understand looks like it's magic/miraculous if we only allow ourselves to get carried away with it.

okay, i've had my squawk; i'll go quietly back into my cage.