“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 14 posts previously published on August 8th
- 2018
- At Almost Ten Years Old, Five Card Flickr Tells Its Survival Story Among my fleet of creaky old hand coded web sites like Feed2JS one of my favorite is the Five Card Flickr stories site that is just a few stories short of being 10 years old. I cannot even recall last time I checked in on it. A few days ago, I got this alert Howdy […]
- 2017
- You Gotta Sing Your Own Version “Taking Care of Archives” Cue up the BTO opening power chords… You see a broken icon hole in a post five years old What were you thinking using Flash? There was no HTML5 and Adobe seemed alive, Now that video’s as good as trash. And that link to what you read is now just a 404 dead. Keeping the […]
- 2014
- Not Quite Elves at the North Pole https://www.youtube.com/watch?v=P9C1kBeO48Q I could not help myself but remix when I saw the tweet by Tim Maughan (actually retweeted by @savasavasava) https://twitter.com/timmaughan/status/497770409660801026 Mostly through sava’s tweets, I’ve gathered Tim is on some expedition, by freighter ship, to China, to get to the source of those shiny things on our store shelves. According to his original video, […]
- 2012
- Back Out in the Great Wide Open cc licensed ( BY ) flickr photo shared by cogdogblog Tomorrow I am headed to Washington DC and catching a flight form there to Toronto to participate in Unplug’d 2012. I was during my road trip last year I met with so many wide-eyed Canadians who were there for the first version of this unique […]
- Direct Deposit for ds106 Assignments cc licensed ( BY NC SD ) flickr photo shared by hermitsmoores This is a last little bit of code I wanted to bang out today (for more on this statement, see my next blog post). We have over 3800 examples that people have shared for the ds106 Assignment Bank. The way these get here […]
- License to ________ Can the movement to try and make things open also make the simplest act of sharing that more complicated? Do we really need licenses and legal language on everything? Are there not things out there that implicitly we share (air?). I’m going to likely land way off mark here. I fully understand the reasons for […]
- 2011
- Road Stats: Week 6 cc licensed ( BY ) flickr photo shared by cogdogblog (All blogging etc has been held up due to long hours behind the wheel or just enjoying the time not tethered to a computer) Number of days on the road: 42 Miles Driven: 4131 Number of States/Provinces driven in: 7 Number of US/Canadian Border Crossings: […]
- 2009
- Automatic Flickr Set Manager Randomly surfing flickr for photos for a new video project. Sometimes, when I find a photo (usually via a compfight search) i like that’s part of a set, I look at the whole set. On one today, I found it was generated automatically by something called Flickr Set Manager: Flickr Set Manager allows you to […]
- 2006
- Blogs Like Weeds Despite my best intentions, I find myself with a small herd of WordPress blogs- this one, my running blog, and two more over at NMC (one is our Second Life site, the other is still under wraps, sorry). So today was upgrade day, making sure they were all brought up to the latest 2.04 version […]
- 2005
- Open Source in Education (SAC2005) Open Source in Education- Evolving the IT Marketplace Bernadine Chuck Fong (President, Foothills College) Chris Coppola (President, rSmart) One sentence summary: Open source is good, happening, the game of institutional software is evolving. Share this barking on social media
- OpenCourseWare and the Emerging Global Meta University (SAC2005) Open Courseware and the Emerging Global Meta University Charles M. Vest President Emeritus, MIT Seminars on Academic Computing (SAC) 2005 , Snowmass, Colorado, August ??, 2005 Claire Maple Address Links added March 31, 2026 and podcast recording resurrected from the Internet Archive (Notes below via collaborative SubEthaEdit session with Cyprien Lomas- I had never done […]
- 2004
- 2003
- MERLOT: The Buzz (and the next day effect) A little bit of echo to Brian’s analysis of our conference ending session on RSS and Learning Objects. You can find the paper there as well as a hefty 6 Mb PowerPoint (if I have time, I will at least post a MS mangled HTML version), plus there is a streaming quicktime version too. There […]
- MERLOT: Online Faculty Development Friday, last homestretch of the conference. Collaborative Usability Evaluations with IDEA Online Rachel Smith (Comment- this is a very cool, Carl Berger “cooooool”, resource. Sign up, submit designs, and join their evaluation group. The system itself is well designed) Asked for hand raises of faculty, staff, who designs online content or learning objects. Then… asked […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 14 posts previously published on August 8th
- 2018
- 2017
- You Gotta Sing Your Own Version “Taking Care of Archives” Cue up the BTO opening power chords… You see a broken icon hole in a post five years old What were you thinking using Flash? There was no HTML5 and Adobe seemed alive, Now that video’s as good as trash. And that link to what you read is now just a 404 dead. Keeping the […] ➡
- 2014
- Not Quite Elves at the North Pole https://www.youtube.com/watch?v=P9C1kBeO48Q I could not help myself but remix when I saw the tweet by Tim Maughan (actually retweeted by @savasavasava) https://twitter.com/timmaughan/status/497770409660801026 Mostly through sava’s tweets, I’ve gathered Tim is on some expedition, by freighter ship, to China, to get to the source of those shiny things on our store shelves. According to his original video, […] ➡
- 2012
- Back Out in the Great Wide Open cc licensed ( BY ) flickr photo shared by cogdogblog Tomorrow I am headed to Washington DC and catching a flight form there to Toronto to participate in Unplug’d 2012. I was during my road trip last year I met with so many wide-eyed Canadians who were there for the first version of this unique […] ➡
- Direct Deposit for ds106 Assignments cc licensed ( BY NC SD ) flickr photo shared by hermitsmoores This is a last little bit of code I wanted to bang out today (for more on this statement, see my next blog post). We have over 3800 examples that people have shared for the ds106 Assignment Bank. The way these get here […] ➡
- License to ________ Can the movement to try and make things open also make the simplest act of sharing that more complicated? Do we really need licenses and legal language on everything? Are there not things out there that implicitly we share (air?). I’m going to likely land way off mark here. I fully understand the reasons for […] ➡
- 2011
- Road Stats: Week 6 cc licensed ( BY ) flickr photo shared by cogdogblog (All blogging etc has been held up due to long hours behind the wheel or just enjoying the time not tethered to a computer) Number of days on the road: 42 Miles Driven: 4131 Number of States/Provinces driven in: 7 Number of US/Canadian Border Crossings: […] ➡
- 2009
- Automatic Flickr Set Manager Randomly surfing flickr for photos for a new video project. Sometimes, when I find a photo (usually via a compfight search) i like that’s part of a set, I look at the whole set. On one today, I found it was generated automatically by something called Flickr Set Manager: Flickr Set Manager allows you to […] ➡
- 2006
- Blogs Like Weeds Despite my best intentions, I find myself with a small herd of WordPress blogs- this one, my running blog, and two more over at NMC (one is our Second Life site, the other is still under wraps, sorry). So today was upgrade day, making sure they were all brought up to the latest 2.04 version […] ➡
- 2005
- Open Source in Education (SAC2005) Open Source in Education- Evolving the IT Marketplace Bernadine Chuck Fong (President, Foothills College) Chris Coppola (President, rSmart) One sentence summary: Open source is good, happening, the game of institutional software is evolving. Share this barking on social media ➡
- OpenCourseWare and the Emerging Global Meta University (SAC2005) Open Courseware and the Emerging Global Meta University Charles M. Vest President Emeritus, MIT Seminars on Academic Computing (SAC) 2005 , Snowmass, Colorado, August ??, 2005 Claire Maple Address Links added March 31, 2026 and podcast recording resurrected from the Internet Archive (Notes below via collaborative SubEthaEdit session with Cyprien Lomas- I had never done […] ➡
- 2004
- 2003
- MERLOT: The Buzz (and the next day effect) A little bit of echo to Brian’s analysis of our conference ending session on RSS and Learning Objects. You can find the paper there as well as a hefty 6 Mb PowerPoint (if I have time, I will at least post a MS mangled HTML version), plus there is a streaming quicktime version too. There […] ➡
- MERLOT: Online Faculty Development Friday, last homestretch of the conference. Collaborative Usability Evaluations with IDEA Online Rachel Smith (Comment- this is a very cool, Carl Berger “cooooool”, resource. Sign up, submit designs, and join their evaluation group. The system itself is well designed) Asked for hand raises of faculty, staff, who designs online content or learning objects. Then… asked […] ➡
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.
Share this barking on social media