“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.

Red arrow points to missing number where the page output reads "There are posts previously published on December 29th"

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.

https://twitter.com/djwudi/status/1212871226953101313

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 13 posts previously published on September 14th

  • 2025
    • The Web That Was, Is I both wince and smile when I see those proclamations about the web [internet] being broken. I’d like to know the field data that is based upon. To say this confidently, someone would have to visited and explored every single corner of the web. I for one have been exploring for 2 plus decades and […]
  • 2024
    • It’s Gonna Take Me a Year to Finish Reading This Book. That’s the plan (and actually better pace than the stack of partly reads on my nightstand table). The book is “A Year in the Woods” by Norwegian writer Torbjørn Ekelund– the sad state of web search yields no author managed web site, just links to book sellers or book reviews, I link therefore to a […]
  • 2021
    • What Can We [Still] Do With Flickr (circa 2021)? If I had to choose one internet tool to take on my deserted island (the one with high speed fiber of course), easily it would be flickr. Often chalked up for dead, passe, not hip, and overshadowed by FacebookGram, I cannot help but revel that a service started in 2004 not only still exists but […]
  • 2016
    • Image / Photo One of many pieces of Jonathan Worth wisdom to me was his differentiation, as a photographer, of the photographic print versus the digital image. Both we see as pictures, representations of the world. The business of photography, assigning a value to a photo, the laws of copyright, our idea of ownership are fixated in that […]
  • 2015
    • Why I Woke Up at 5 AM (and stayed up til 4AM) for @VConnecting: The Connection Trick All it takes is alarm clocks and coffee. No, alarm clocks, coffee, and a relatively small group of interesting, geographically dispersed people. And some google hangouts. And now a Slack with snarky bots. Last week the geometrically growing Virtually Connecting was set up for several live sessions from participants at the ALT Conference (Association for […]
  • 2012
    • You Never Forget Your First PirateBox Yesterday I successfully built my first solo PirateBox, the anonymous, free local sharing platform created by David Darts cc licensed ( BY ) flickr photo shared by cogdogblog My first one, the StoryBox I traveled with last year, was built for my by Zack Dowell. Last Spring, Tim Owens and I each did one at […]
    • Nudging Your WordPress Installs Up the Directory Stairs We are just sampling the success we have had with not only ds106, but many other classes at University of Mary Washington, in getting students going with their own domains and web sites under Domains of Ones Own. One niggling issue is on the wordpress installer, it is set by default to install the blog […]
  • 2008
    • Chinabound Headed for China 1.0 by cogdogblog posted 14 Sep ’08, 10.36am MDT PST on flickr Chinatown in San Francisco is always a fun place to "visit" but in a few hours I am headed for the real deal or China 1.0, boarding a plane at SFO that will teleport me directly (well 12 hours directly) […]
  • 2005
    • Podcasting On The Cheap: Number 8 Bailing Wire Not Include The kiwis have a great expression about being able to fix anything with some number 8 bailing wire, sort of the down under flavor of duct tape. I just spent about 90 minutes cobbling together what I hope to be a framework for supporting audio content across a number of our content sites. I’ve yet […]
    • Wiki-ing the Talk… Knowledge Sharing with Distributed Networking Tools I’m still drowning in a flotsam of un-done tasks, but I was glad I shoved by a little bit of time to check our Leigh Blackall and Sean FitzGerald’s presentation for Cool Results: Engaging Clients in E-learning hosted by LearningTimes Australia. It’s well worth a look, or at least tossing a bookmark at and coming […]
  • 2004
    • Beautiful, Textbook Instructional Design… I Yawned All the Way to the Post Test Our system recently issued a policy that to drive any vehicles for school purposes, one would have to pass an online Defensive Driving course. I logged on recently to take care of this requirement but also to look at the design factors. It was very well done instructional design, following the ADDIE formula to a […]
    • The Inevitable Cycle of Learning Object Definitions With some regular motion in the learning space, maybe every other lunar conjunction there is a sharp increase in attempts to define learning objects. David Davies has been at it with echos here and there. Personally, my attention span goes into day dream mode as the level of definition attempts grows, but I accept that […]
    • CogDogSpielberg Hardly Hollywood, but I’ve been focussed this week in the MCLI movie studio (e.g. my G4 TiBook). We are preparing an online opening for our Ocotillo Action Groups that will include some video welcome messages from our faculty co-chairs… as an introduction of their efforts this year and a teaser to invite people from Maricopa […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 13 posts previously published on September 14th

  • 2025
    • The Web That Was, Is I both wince and smile when I see those proclamations about the web [internet] being broken. I’d like to know the field data that is based upon. To say this confidently, someone would have to visited and explored every single corner of the web. I for one have been exploring for 2 plus decades and […] &amp#x27A1;
  • 2024
    • It’s Gonna Take Me a Year to Finish Reading This Book. That’s the plan (and actually better pace than the stack of partly reads on my nightstand table). The book is “A Year in the Woods” by Norwegian writer Torbjørn Ekelund– the sad state of web search yields no author managed web site, just links to book sellers or book reviews, I link therefore to a […] &amp#x27A1;
  • 2021
    • What Can We [Still] Do With Flickr (circa 2021)? If I had to choose one internet tool to take on my deserted island (the one with high speed fiber of course), easily it would be flickr. Often chalked up for dead, passe, not hip, and overshadowed by FacebookGram, I cannot help but revel that a service started in 2004 not only still exists but […] &amp#x27A1;
  • 2016
    • Image / Photo One of many pieces of Jonathan Worth wisdom to me was his differentiation, as a photographer, of the photographic print versus the digital image. Both we see as pictures, representations of the world. The business of photography, assigning a value to a photo, the laws of copyright, our idea of ownership are fixated in that […] &amp#x27A1;
  • 2015
  • 2012
    • You Never Forget Your First PirateBox Yesterday I successfully built my first solo PirateBox, the anonymous, free local sharing platform created by David Darts cc licensed ( BY ) flickr photo shared by cogdogblog My first one, the StoryBox I traveled with last year, was built for my by Zack Dowell. Last Spring, Tim Owens and I each did one at […] &amp#x27A1;
    • Nudging Your WordPress Installs Up the Directory Stairs We are just sampling the success we have had with not only ds106, but many other classes at University of Mary Washington, in getting students going with their own domains and web sites under Domains of Ones Own. One niggling issue is on the wordpress installer, it is set by default to install the blog […] &amp#x27A1;
  • 2008
    • Chinabound Headed for China 1.0 by cogdogblog posted 14 Sep ’08, 10.36am MDT PST on flickr Chinatown in San Francisco is always a fun place to "visit" but in a few hours I am headed for the real deal or China 1.0, boarding a plane at SFO that will teleport me directly (well 12 hours directly) […] &amp#x27A1;
  • 2005
    • Podcasting On The Cheap: Number 8 Bailing Wire Not Include The kiwis have a great expression about being able to fix anything with some number 8 bailing wire, sort of the down under flavor of duct tape. I just spent about 90 minutes cobbling together what I hope to be a framework for supporting audio content across a number of our content sites. I’ve yet […] &amp#x27A1;
    • Wiki-ing the Talk… Knowledge Sharing with Distributed Networking Tools I’m still drowning in a flotsam of un-done tasks, but I was glad I shoved by a little bit of time to check our Leigh Blackall and Sean FitzGerald’s presentation for Cool Results: Engaging Clients in E-learning hosted by LearningTimes Australia. It’s well worth a look, or at least tossing a bookmark at and coming […] &amp#x27A1;
  • 2004
    • Beautiful, Textbook Instructional Design… I Yawned All the Way to the Post Test Our system recently issued a policy that to drive any vehicles for school purposes, one would have to pass an online Defensive Driving course. I logged on recently to take care of this requirement but also to look at the design factors. It was very well done instructional design, following the ADDIE formula to a […] &amp#x27A1;
    • The Inevitable Cycle of Learning Object Definitions With some regular motion in the learning space, maybe every other lunar conjunction there is a sharp increase in attempts to define learning objects. David Davies has been at it with echos here and there. Personally, my attention span goes into day dream mode as the level of definition attempts grows, but I accept that […] &amp#x27A1;
    • CogDogSpielberg Hardly Hollywood, but I’ve been focussed this week in the MCLI movie studio (e.g. my G4 TiBook). We are preparing an online opening for our Ocotillo Action Groups that will include some video welcome messages from our faculty co-chairs… as an introduction of their efforts this year and a teaser to invite people from Maricopa […] &amp#x27A1;
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.

    Profile Picture for CogDog The Blog
    An early 90s builder of web stuff and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person. And he is 100% into the Fediverse (or tells himself so) Tooting as @cogdog@cosocial.ca

    Leave a Reply

    Your email address will not be published. Required fields are marked *