“Who ya gonna call?” “CODEBUSTERS”
No.
But the metaphor of Ghostbusters crossing the streams was inversely appropriate to a little bit of code action over the holidays (of which the actual action was nil).
But this was fun.
This nice tweet from John Johnston (who spawned the idea) reminded me of a WordPress plugin I had made
The WP Posted Today plugin is meant to offer a short code you can put on a site and it will list all previous posts on the current calendar day (this of course is useful if you actually still blog regularly) (cough) (cough).
Just for grins I checked the page where I use my own plugin. Yikes. Red Alert. It displayed all the ones for December 29 in years past, but the part where it should list how many there were was blank.
I dug into my own code… and found myself a bit lost. Crossed. I was not even sure where I got the sprintf functions (John’s original code?) that were aimed to be compatible if anyone every wanted a language translation (maybe, or it’s just that thing when people code things differently).
Taking the path of least resistance, I took out the code where I think the problem was occurring and did it a more simple, but brute force way.
And it worked.
So I updated the version on GitHub and felt at peace with the world. In the off chance someone stumbled into my little corner of code, they would find something that works (or should work).
And then (here comes a stream crossing) Michael Hanscom @djwudi — someone I don’t think I’ve ever communicated with — tweets that he had seen pretty much the same bug and offered a fix.
In looking at his post I saw the fix he made, and said– that’s better than mine! So I decided today to roll back my changes in place of Michael’s solution (but also keeping a modification I had made to remove extraneous calls when not needed for singular versus multiple results).
I noted the extra change he made in hos own version
Plus, I’ve made one other tweak to the plugin, so that it adds a link to the end of the excerpt to better handle “microblog” style entries that don’t have titles, so I still get to feel good about that part, as well. 🙂 My coding skills may be underdeveloped and rusty from lack of regular use, but they’re not entirely atrophied!
In this case, these microblog type entries (see Michael’s demo page) lack titles, so yes, a link is needed at the end of the post excerpt.
Yet I could see that regular posts (like on my site) did not need the extra link, and also, not everyone might want the arrow Michael likes.
I solved this cleverly by creating an additional shortcode parameter more which defaults to a blank string. In the shortcode function, we convert any attributes passed to variables with
extract(shortcode_atts( array( "month" => '', "day" => '', 'excerpt' => 1, 'more' => '' ), $atts ));
So on my site, where I just used the shortcode There are 12 posts previously published on April 15th
- 2025
- CogDogBlog Now Revving Engines Cloud Powered Hey, it’s a tiny post, just like 2004 days. Short. Sweet. If you are actually reading this post, not just clicking a like button, you hopefully notice a bit more “zip” to it? Like a purring sports car engine. Like… …being now hosted in Reclaim Cloud. It was maybe a year or more ago, when […]
- 2024
- Blog Post Silly Polo I hardly have to ask the internet (hey you!) to ignore me, but I am trying one more post as an ActivityPub enabled blog check the formatting when it goes out- this time I have changed the format of the posting to include a title intro, am added excerpt, and a stuffed in hashtag. Already […]
- The Tiny of SPLOT I was thinking of the times when I would, now totally sounding naively, exalt about the bigness of the internet which today, which we pursue trendingness to be seen, noticed, affirmed, liked and re-liked. Who wants to spout out and not be heard? I come to celebrate today the small, unnoticed. One of my weirdest […]
- 2016
- The Present Web as the Future’s Raggeddy Past Dead Link For as vast and fast expanding as it is, the web ends up being rather friable (that’s my geology vocabulary surfacing). All set off by a seemingly simple tweet by Rob Reynolds https://twitter.com/xplanarob/status/720697804969111553 It reminded me of a paper from a colleague I met way back in my own way back machine, back to my […]
- 2015
- It’s Not Stealing (please stop saying so) It’s been a good year for my apple tree. I have more than enough than I can eat, more than I can can, so I put them outside with a sign. “Free Apples”. It’s clear that they are yours to take, as many as you want. So, if you take one of my apples from […]
- 2014
- Look! Alan and Darren Are Talking About 50 Ways Gone Mobile creative commons licensed ( BY-NC-SA ) flickr photo shared by Krister462 Off and on since the start of the year, Darren Kuropatwa and I have been meeting via video chat (we love appear.in) as we work on an expansion of the original 50 Web 2.0 Ways to Tell a Story to include mobile story creation […]
- 2012
- Four Icon remix Prequel It’s time I eat my own remix food and do a ds106 remixed assignment assignment. I drew the One Story / Four Icon [remixed]: What’s the Prequel?. Here’s mine, which I call “Young Whipper” based on the original work done by MC Guirk: The original assignment, one of the all time classics at ds106, is: […]
- An Unexpected Consequence: ds106 Remixed Assignments cc licensed ( BY NC ) flickr photo shared by carlstr The photo I chose for this post actually has nothing to do with what (I think I will) write about, but came up in the photostream of something from the compfight search on “unexpected”. Get it? “unexpected”. Enough pre-amble. It’s been exciting to see […]
- 2009
- Enough of Zombies, Alright? Nice guys by Sebastián-Dario posted 26 Oct ’08, 7.57pm MDT PST on flickr Cachorritos de Lila You can hardly glance at twitter or open your RSS feeds these days without reading about zombies. WTF? Lumbering flesheaters are somehow fashionable? Time magazine gushes about them. The New York Times loves ’em. Jane Austen now embraces them. […]
- Your Dear John Letter is in the (Yahoo) Mail cc licensed flickr photo from irishdragongreen I’d heard from a colleague today that they got a Dear John email from Yahoo informing them that the online video editor app Jumpcut was going away, as confirmed by the “in the deadpool” story from TechCrunch. It’s little surprise, given the December 2008 move where Jumpcut removed the […]
- I Saw Them Play in DC Before They Got Big Oh if you caught Beautiful Depravity back when they were starting out, you’d know what pure true Metal music is all about. Of course by the time Thou Art Metal came out in 2002, they had already lost a lead guitarist to a bizarre accident with a welding torch, and their original keyboard player found […]
- 2004
- An Aussie Park Named (Almost) After Us…. err… Before Us Some folks Down Under apparently have honored us by naming a park (almost) after CogDogBlog. Colleague Michael Coghlan writes from Adelaide of “Cobdogloa Station Caravan Park“: The Cobdogla Station Caravan Park is a privately owned caravan park nestled on the backwaters adjacent to the River Murray in the Riverland of South Australia. Cobdogla is an […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 12 posts previously published on April 15th
- 2025
- CogDogBlog Now Revving Engines Cloud Powered Hey, it’s a tiny post, just like 2004 days. Short. Sweet. If you are actually reading this post, not just clicking a like button, you hopefully notice a bit more “zip” to it? Like a purring sports car engine. Like… …being now hosted in Reclaim Cloud. It was maybe a year or more ago, when […] ➡
- 2024
- Blog Post Silly Polo I hardly have to ask the internet (hey you!) to ignore me, but I am trying one more post as an ActivityPub enabled blog check the formatting when it goes out- this time I have changed the format of the posting to include a title intro, am added excerpt, and a stuffed in hashtag. Already […] ➡
- The Tiny of SPLOT I was thinking of the times when I would, now totally sounding naively, exalt about the bigness of the internet which today, which we pursue trendingness to be seen, noticed, affirmed, liked and re-liked. Who wants to spout out and not be heard? I come to celebrate today the small, unnoticed. One of my weirdest […] ➡
- 2016
- The Present Web as the Future’s Raggeddy Past Dead Link For as vast and fast expanding as it is, the web ends up being rather friable (that’s my geology vocabulary surfacing). All set off by a seemingly simple tweet by Rob Reynolds https://twitter.com/xplanarob/status/720697804969111553 It reminded me of a paper from a colleague I met way back in my own way back machine, back to my […] ➡
- 2015
- It’s Not Stealing (please stop saying so) It’s been a good year for my apple tree. I have more than enough than I can eat, more than I can can, so I put them outside with a sign. “Free Apples”. It’s clear that they are yours to take, as many as you want. So, if you take one of my apples from […] ➡
- 2014
- Look! Alan and Darren Are Talking About 50 Ways Gone Mobile creative commons licensed ( BY-NC-SA ) flickr photo shared by Krister462 Off and on since the start of the year, Darren Kuropatwa and I have been meeting via video chat (we love appear.in) as we work on an expansion of the original 50 Web 2.0 Ways to Tell a Story to include mobile story creation […] ➡
- 2012
- Four Icon remix Prequel It’s time I eat my own remix food and do a ds106 remixed assignment assignment. I drew the One Story / Four Icon [remixed]: What’s the Prequel?. Here’s mine, which I call “Young Whipper” based on the original work done by MC Guirk: The original assignment, one of the all time classics at ds106, is: […] ➡
- An Unexpected Consequence: ds106 Remixed Assignments cc licensed ( BY NC ) flickr photo shared by carlstr The photo I chose for this post actually has nothing to do with what (I think I will) write about, but came up in the photostream of something from the compfight search on “unexpected”. Get it? “unexpected”. Enough pre-amble. It’s been exciting to see […] ➡
- 2009
- Enough of Zombies, Alright? Nice guys by Sebastián-Dario posted 26 Oct ’08, 7.57pm MDT PST on flickr Cachorritos de Lila You can hardly glance at twitter or open your RSS feeds these days without reading about zombies. WTF? Lumbering flesheaters are somehow fashionable? Time magazine gushes about them. The New York Times loves ’em. Jane Austen now embraces them. […] ➡
- Your Dear John Letter is in the (Yahoo) Mail cc licensed flickr photo from irishdragongreen I’d heard from a colleague today that they got a Dear John email from Yahoo informing them that the online video editor app Jumpcut was going away, as confirmed by the “in the deadpool” story from TechCrunch. It’s little surprise, given the December 2008 move where Jumpcut removed the […] ➡
- I Saw Them Play in DC Before They Got Big Oh if you caught Beautiful Depravity back when they were starting out, you’d know what pure true Metal music is all about. Of course by the time Thou Art Metal came out in 2002, they had already lost a lead guitarist to a bizarre accident with a welding torch, and their original keyboard player found […] ➡
- 2004
- An Aussie Park Named (Almost) After Us…. err… Before Us Some folks Down Under apparently have honored us by naming a park (almost) after CogDogBlog. Colleague Michael Coghlan writes from Adelaide of “Cobdogloa Station Caravan Park“: The Cobdogla Station Caravan Park is a privately owned caravan park nestled on the backwaters adjacent to the River Murray in the Riverland of South Australia. Cobdogla is an […] ➡
to get the arrow codes he likes. This works because output for each found post looks like
// output post and link
$output .= '
' . get_the_title() . '';
// display excerpt if we want it
if ( $excerpt ) $output .= ' ' . get_the_excerpt();
// for microblog output where there might not be titles so add a link at end
// h/t https://www.michaelhanscom.com/eclecticism/2020/01/02/rss-feed-weirdness-and-php-debugging/
$output .= ' ' . $more . '';
So how is that for the odds of streams crossing on the same obscure bit of code? That’s the old fashioned kind of net serendipity that still happens.
Thanks Michael! Check out his 20 year old blog, he’s an “Enthusiastically Ambiverted Hopepunk” quite the tag line.
Featured Image: Edit of the Ghostbusters Cross Streams scene found in the Ghostbusters Fandom Wiki site which states “Community content is available under CC-BY-SA unless otherwise noted.” I replaced part of the background with a screenshot of the WP Posted Today PHP code.