“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 20 posts previously published on February 28th

  • 2025
    • Like a Bridgy Over Federated Waters Today I am wearing my Get Federated t-shirt as my attire as a guest on an Open Education Week panel on “Where are OER conversations happening anymore?” I sing of a Bridge over some kind of waters: Oh, social media gets brokenAnd followers just can’t be foundLike a bridgy over federated networksI will connect me […]
  • 2022
    • Chasing The Magic Chef Cafe I can’t stop the curiosity impulse and sometimes feel obliged to chase down source-less photos. So it started with a Cory Doctorow tweet (just follow him, you will not be sorry) Why this image? It’s just road side Americana. Was it the tweet saying “circa 1970s” which was my childhood? That guess might be based […]
  • 2019
    • The Daily Blank Theme can be… less than Daily Not everyone is up to running a daily _________ kind of site (like the original DS106 Daily Create). It’s a tough pace! So now you can make it Every Other Day or heck, even Weekly. This was out of my own need, there you go. I’m running two of these sites now, a Daily Digital […]
  • 2017
    • cow + bird Twenty days ago I heard that the elegant story site cowbird was closing up the front door. So I vowed to add one a day until the very end. And I did twenty of them, right up until today (well one day missed because the site was “out of helium” for maybe 2 full days) […]
    • Not Available in Stores (yet) Maybe when the internet Amazon Web Services comes back.  Share this barking on social media
    • [timebuddy] for WordPress Without digging too much into the reasons why (that’s code for “I don’t know why”) one headache with running WordPress Multisite is that even users who have administrative privileges on their own site, any embed code, javascript put into the editor is stripped on publishing. Only Site Network admins can insert JavaScript. Why? I said, […]
  • 2016
    • Dear Facebook The subject line in today’s email held some promise: A friend reported a profile they think is pretending to be you I was a bit bust enjoying the beach and time with friends on my last night in Puerto Rico, so I left it for later. And thus, I got another Rejection Letter from Facebook. […]
  • 2014
    • Charting Spring Via Flickr Flower Photos cc licensed ( BY SA ) flickr photo shared by Alan Levine This is unreal, February 27, and the flowers are out on my plum tree. I knew it was crazy early, but was curious about the dates I had posted first plum tree flowers in previous years. Well actually I tweeted something about this, […]
  • 2012
    • Artsifiying YouTube Videos After coming across this brilliant redo of Star Wars in the Silent era form, I created the ds106 assignment “Return to the Silent Era” http://www.youtube.com/watch?v=eOjzLggAKis The dawn of cinema had no audio; silent movies created an atmosphere with music and the use of cue cards. Take a 3-5 minute trailer of a modern movie and […]
    • Recasting ds106 Assignments When Dean Shareski asks a question, my ears perk up, cause the guy shares so much back (it is in his name after all), I have to oblige @cogdog Are there any assignments in #ds106 that would be ideal for Math or Science specifically? — Dean Shareski (@shareski) February 28, 2012 The thing is, there […]
  • 2009
    • No Bava Can’t Get No Bava by cogdogblog posted 28 Feb ’09, 9.09pm MST PST on flickr Jeez, Rev, pull back on the accelerator, will ya?  Share this barking on social media
  • 2008
    • 50 Ways at UBC Today I spent at UBC, first an informal meeting with some course designers where Brian Lamb and I did some blog talk, and my bit from Northern Voice Not Cat Diaries / Lets Rip WordPress Apart to Make a Web Site, and an informal romp through Second Life. Then it was over to the Land […]
    • Where in the World is Google Reader? Where in the World is Google Reader? by cogdogblog posted 28 Feb ’08, 9.24am MST PST on flickr Why has Google Reader been banished from my navigation? Its not even listed on the More Google Products – it seems to not exist. Though it is alive and well at www.google.com/reader Maybe it is a game. […]
  • 2007
    • Temporal Virtual Worlds Although being rather involved in NMC’s Second Life and Virtual Worlds endeavors, I’ve yet to find or blog much on the experience there over the last 9 months or so. My SL namesake will turn 1 year old in a few months, though in many ways I feel still like a puppy (“In Second Life, […]
  • 2006
    • 130 And Counting flickr foto DSC01365 It has been 130 days since it has rained in Phoenix. One Hundred And Thirty. That stretches back to mid-October that we experienced the odd phenomena of water falling from the sky. It has been four months of blue sky, sunshine, lies by weather forecasters, and a complete bust on the snow […]
    • The RMA Dance Step A few months back I started having some problems with my SamrtDisk Firelite portable FireWire drive… I keep all of my working documents on here, a mirror of my web site, as I shuttle it between home and work computers. After two failures, where Disk Warrior managed to save the day, I ordered a new […]
  • 2005
    • Drowning, Drowned, Drown I am drowning in things to do, things I would like to do, and things I have to do. My workload is more or less double what it was 6 months ago since losing the expertise of Colen, who worked 5 years for us doing part-time programming support and developing much of the MLX and […]
    • Shelley Is On It: “Using RSS Feeds in English 102” MLX Package One of my colleagues has gotten bit severely by the weblog / RSS fever— this is a good thing. Shelley teaches English at Mesa Community College and is experimenting this semester with having her student review resources via Bloglines, and she is crafting an extra credit assignment for them to post entries in the Bloglines […]
    • How Not To do e-Customer Service: “Call Us” Our local telephone service provide, Qwest, has these smarmy tv commercials with customers gushing how great the Qwest “Spirit of Service” is. I will not be starring in any of these soon. Regular CDB readers will know we periodically bark and growl about bad online customer service, so here is chapter 22 in the novel. […]
    • Stark Raving MAD I owe my sarcastic streak to a boyhood influence of MAD magazine – the codebook to becoming a solid porcupine internet citizen. But Doug Gilford’s Mad Cover site is an over the top homage to friends of movie spoofs, Roger Kaputnik, Spy vs Spy, and the fold in covers. The site goes as far as […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 20 posts previously published on February 28th

  • 2025
    • Like a Bridgy Over Federated Waters Today I am wearing my Get Federated t-shirt as my attire as a guest on an Open Education Week panel on “Where are OER conversations happening anymore?” I sing of a Bridge over some kind of waters: Oh, social media gets brokenAnd followers just can’t be foundLike a bridgy over federated networksI will connect me […] &amp#x27A1;
  • 2022
    • Chasing The Magic Chef Cafe I can’t stop the curiosity impulse and sometimes feel obliged to chase down source-less photos. So it started with a Cory Doctorow tweet (just follow him, you will not be sorry) Why this image? It’s just road side Americana. Was it the tweet saying “circa 1970s” which was my childhood? That guess might be based […] &amp#x27A1;
  • 2019
    • The Daily Blank Theme can be… less than Daily Not everyone is up to running a daily _________ kind of site (like the original DS106 Daily Create). It’s a tough pace! So now you can make it Every Other Day or heck, even Weekly. This was out of my own need, there you go. I’m running two of these sites now, a Daily Digital […] &amp#x27A1;
  • 2017
    • cow + bird Twenty days ago I heard that the elegant story site cowbird was closing up the front door. So I vowed to add one a day until the very end. And I did twenty of them, right up until today (well one day missed because the site was “out of helium” for maybe 2 full days) […] &amp#x27A1;
    • Not Available in Stores (yet) Maybe when the internet Amazon Web Services comes back.  Share this barking on social media &amp#x27A1;
    • [timebuddy] for WordPress Without digging too much into the reasons why (that’s code for “I don’t know why”) one headache with running WordPress Multisite is that even users who have administrative privileges on their own site, any embed code, javascript put into the editor is stripped on publishing. Only Site Network admins can insert JavaScript. Why? I said, […] &amp#x27A1;
  • 2016
    • Dear Facebook The subject line in today’s email held some promise: A friend reported a profile they think is pretending to be you I was a bit bust enjoying the beach and time with friends on my last night in Puerto Rico, so I left it for later. And thus, I got another Rejection Letter from Facebook. […] &amp#x27A1;
  • 2014
    • Charting Spring Via Flickr Flower Photos cc licensed ( BY SA ) flickr photo shared by Alan Levine This is unreal, February 27, and the flowers are out on my plum tree. I knew it was crazy early, but was curious about the dates I had posted first plum tree flowers in previous years. Well actually I tweeted something about this, […] &amp#x27A1;
  • 2012
    • Artsifiying YouTube Videos After coming across this brilliant redo of Star Wars in the Silent era form, I created the ds106 assignment “Return to the Silent Era” http://www.youtube.com/watch?v=eOjzLggAKis The dawn of cinema had no audio; silent movies created an atmosphere with music and the use of cue cards. Take a 3-5 minute trailer of a modern movie and […] &amp#x27A1;
    • Recasting ds106 Assignments When Dean Shareski asks a question, my ears perk up, cause the guy shares so much back (it is in his name after all), I have to oblige @cogdog Are there any assignments in #ds106 that would be ideal for Math or Science specifically? — Dean Shareski (@shareski) February 28, 2012 The thing is, there […] &amp#x27A1;
  • 2009
    • No Bava Can’t Get No Bava by cogdogblog posted 28 Feb ’09, 9.09pm MST PST on flickr Jeez, Rev, pull back on the accelerator, will ya?  Share this barking on social media &amp#x27A1;
  • 2008
    • 50 Ways at UBC Today I spent at UBC, first an informal meeting with some course designers where Brian Lamb and I did some blog talk, and my bit from Northern Voice Not Cat Diaries / Lets Rip WordPress Apart to Make a Web Site, and an informal romp through Second Life. Then it was over to the Land […] &amp#x27A1;
    • Where in the World is Google Reader? Where in the World is Google Reader? by cogdogblog posted 28 Feb ’08, 9.24am MST PST on flickr Why has Google Reader been banished from my navigation? Its not even listed on the More Google Products – it seems to not exist. Though it is alive and well at www.google.com/reader Maybe it is a game. […] &amp#x27A1;
  • 2007
    • Temporal Virtual Worlds Although being rather involved in NMC’s Second Life and Virtual Worlds endeavors, I’ve yet to find or blog much on the experience there over the last 9 months or so. My SL namesake will turn 1 year old in a few months, though in many ways I feel still like a puppy (“In Second Life, […] &amp#x27A1;
  • 2006
    • 130 And Counting flickr foto DSC01365 It has been 130 days since it has rained in Phoenix. One Hundred And Thirty. That stretches back to mid-October that we experienced the odd phenomena of water falling from the sky. It has been four months of blue sky, sunshine, lies by weather forecasters, and a complete bust on the snow […] &amp#x27A1;
    • The RMA Dance Step A few months back I started having some problems with my SamrtDisk Firelite portable FireWire drive… I keep all of my working documents on here, a mirror of my web site, as I shuttle it between home and work computers. After two failures, where Disk Warrior managed to save the day, I ordered a new […] &amp#x27A1;
  • 2005
    • Drowning, Drowned, Drown I am drowning in things to do, things I would like to do, and things I have to do. My workload is more or less double what it was 6 months ago since losing the expertise of Colen, who worked 5 years for us doing part-time programming support and developing much of the MLX and […] &amp#x27A1;
    • Shelley Is On It: “Using RSS Feeds in English 102” MLX Package One of my colleagues has gotten bit severely by the weblog / RSS fever— this is a good thing. Shelley teaches English at Mesa Community College and is experimenting this semester with having her student review resources via Bloglines, and she is crafting an extra credit assignment for them to post entries in the Bloglines […] &amp#x27A1;
    • How Not To do e-Customer Service: “Call Us” Our local telephone service provide, Qwest, has these smarmy tv commercials with customers gushing how great the Qwest “Spirit of Service” is. I will not be starring in any of these soon. Regular CDB readers will know we periodically bark and growl about bad online customer service, so here is chapter 22 in the novel. […] &amp#x27A1;
    • Stark Raving MAD I owe my sarcastic streak to a boyhood influence of MAD magazine – the codebook to becoming a solid porcupine internet citizen. But Doug Gilford’s Mad Cover site is an over the top homage to friends of movie spoofs, Roger Kaputnik, Spy vs Spy, and the fold in covers. The site goes as far as […] &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.

    If this kind of stuff has value, please support me by tossing a one time PayPal kibble or monthly on Patreon
    Become a patron at Patreon!
    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 *