“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 16 posts previously published on May 12th

  • 2024
    • Carl’s Last Shutter Click was a (Life) Long Exposure I was thinking about calling yet never got around to it. For months, I had been getting word by direct message via my friend @pumpkiny- screenshots of Facebook posted photos shared by Carl Berger, typical scenes of St George, details of a bird, and light. Always seeing light (she knows I am not inside Facebook). […]
  • 2018
    • It Came From #DS106: a Direct Line to Ontario Extend Easily the most influential experience that has informed both my work in educational technology and the way I teach has come from the experiences I had being part of since 2011 as an open participant, teaching in person and online, and building out much of the web infrastructure for DS106, the open Digital Storytelling course […]
  • 2017
    • I’m a Deleter The cool ed-tech kids are deleting tweets. I’m not cool. Okay, I already did a cover version of the original for I’m a Reclaimer, so I am ripping myself off. I'm A Deleter G D G I thought twitter was only for status updates G D G Everyone sharing what they ate C G Trackers […]
  • 2015
    • Ballad of a Radio Man A few hours early, but here is your birthday present, @drjones106 — one of your greatest hits. I knew there was a pretty good remix potential in Dylan’s Ballad of a Thin Man (from Highway 61 Revisited). The tabs were a bit all over, I munged together a few, this was closest to what I […]
    • What Was Blogging Plus GIFsplaining on Imgur Talk about rabbit holes (the kind the dogs go running down). Twas just a tweet flying by Let's Talk About Dogs! http://t.co/HnYM7THV21 — Brendan Murphy (@dendari) May 12, 2015 This, published on imgur, is way more than image sharing. BePawsitive, self proclaimed dog lover writes: This post showed up on the front page a few […]
    • Digital Irony Nothing adds to sausage like spice. Irony is a spice. A colleague tweeted a like to a new article by Douglas Rushkoff called Digital Disruption and the Death of Storytelling. I’m prepping some new talks on storytelling, and I find Rushkoff’s writing on the intersections of media, technology, and people often compelling. Professor and media […]
  • 2014
    • Whomever is Responsible… creative commons licensed ( BY-NC-SA ) flickr photo shared by bigcityal … for planning my schedule shall be fired. What was I thinking? I returned home from London after two weeks in the UK attending the OER14 conference and a visit to the Open University (plus a nice weekend in Bristol With David Kernohan and […]
  • 2011
    • May Story a Day #12: Tell a Story in Five Frames For another hurry up and post story, this is an example of the flickr group Tell a Story in Five Frames, where you have to submit to the group discussion a single post with a title and 5 photos that… tell a story. It is in the vein of my Five Card Flickr stories, but […]
    • May Story a Day #11: Radio Motivational Poster I won’t apologize for being a day behind but I am so sorry I am a day behind. This is a tough pace, but certainly no race. Folks, if you think that ds106 is dangerous cc licensed ( BY ) flickr photo shared by cogdogblog Here is proof… So here, as a quicky, I used […]
  • 2008
    • Why Not Ask? Usually when I get emails about offers to advertise on my blog (which is a rather off thing to ask for), I just delete them. But for fun, when I got this recent one: Hello, We have a client in the e-learning sector who is interested in advertising on your blog. We find it relevant […]
    • Getting My Ticket Out of Alltel Jail So I finally have my magic card to get out of the Alltel Jail of Poor Service and Unrelenting Contracts Last week I was down in Phoenix using the new UM150 USB modem they sent me. It worked fine for the first stop. Then, I had 5 disconnects in less than 2 hours, from 2 […]
    • Tuesday. Maricopa 2.0. Be There. I have an interesting/weird presentation opportunity tomorrow, traveling all the way to Mesa, Arizona to do two sessions at the Maricopa Community Colleges Teaching & Learning with Technology Conference. It’s “weird” because I worked 14 years at Maricopa, nine of those years running the conference that was the predecessor, though I must say I never […]
  • 2007
    • Apt Podcast It was posted a while ago, and was well recommended, but on last Friday’s flight home from San Jose, I finally got a chance, and to be humbled, by Gardner Campbell’s Kemp Symposium keynote “Apt Numbers, or, Sense Variously Drawn Out””. Magically weaving together his genuinely expressed love of music and Milton, and his concept […]
  • 2006
    • The Tiny MIghty Link flickr foto Chain Of Entropyavailable on flickr It’s time to wax again on the sheer giddy glory of stumbling onto web gems by the serendipity of curious link clicking. It started in my RSS feeds, scanning an entry on Net Neutrality Comes Home to Haddam in Mike Roy’s new blog, Digital Incunabula. I actually didn’t […]
  • 2005
    • My First (sloppy) ScreenCast So it was time to put my money where my snout was… After waffling about screencasting, I decided to give it a go. Downloading the Windows Media Encoder was not too bad. I played a bit, not really sure of the various settings for the encoding. Anyhow, I recorded an 11 minute quick attempt at […]
    • Do I Have To Sacrifce A Virgin To Install Windows Software? flickr foto Do I Have To Sacrifce A Virgin To Install Windows Software?available on my flickr Just out of curiosity, I attempted to install the Windows “Photo Story 3” on my Dell laptop. I was unsuccessful at convincing Microsoft Windows that I was using Microsoft Windows despite extracting my secret password from the sticker on […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 16 posts previously published on May 12th

  • 2024
    • Carl’s Last Shutter Click was a (Life) Long Exposure I was thinking about calling yet never got around to it. For months, I had been getting word by direct message via my friend @pumpkiny- screenshots of Facebook posted photos shared by Carl Berger, typical scenes of St George, details of a bird, and light. Always seeing light (she knows I am not inside Facebook). […] &amp#x27A1;
  • 2018
    • It Came From #DS106: a Direct Line to Ontario Extend Easily the most influential experience that has informed both my work in educational technology and the way I teach has come from the experiences I had being part of since 2011 as an open participant, teaching in person and online, and building out much of the web infrastructure for DS106, the open Digital Storytelling course […] &amp#x27A1;
  • 2017
    • I’m a Deleter The cool ed-tech kids are deleting tweets. I’m not cool. Okay, I already did a cover version of the original for I’m a Reclaimer, so I am ripping myself off. I'm A Deleter G D G I thought twitter was only for status updates G D G Everyone sharing what they ate C G Trackers […] &amp#x27A1;
  • 2015
    • Ballad of a Radio Man A few hours early, but here is your birthday present, @drjones106 — one of your greatest hits. I knew there was a pretty good remix potential in Dylan’s Ballad of a Thin Man (from Highway 61 Revisited). The tabs were a bit all over, I munged together a few, this was closest to what I […] &amp#x27A1;
    • What Was Blogging Plus GIFsplaining on Imgur Talk about rabbit holes (the kind the dogs go running down). Twas just a tweet flying by Let's Talk About Dogs! http://t.co/HnYM7THV21 — Brendan Murphy (@dendari) May 12, 2015 This, published on imgur, is way more than image sharing. BePawsitive, self proclaimed dog lover writes: This post showed up on the front page a few […] &amp#x27A1;
    • Digital Irony Nothing adds to sausage like spice. Irony is a spice. A colleague tweeted a like to a new article by Douglas Rushkoff called Digital Disruption and the Death of Storytelling. I’m prepping some new talks on storytelling, and I find Rushkoff’s writing on the intersections of media, technology, and people often compelling. Professor and media […] &amp#x27A1;
  • 2014
    • Whomever is Responsible… creative commons licensed ( BY-NC-SA ) flickr photo shared by bigcityal … for planning my schedule shall be fired. What was I thinking? I returned home from London after two weeks in the UK attending the OER14 conference and a visit to the Open University (plus a nice weekend in Bristol With David Kernohan and […] &amp#x27A1;
  • 2011
    • May Story a Day #12: Tell a Story in Five Frames For another hurry up and post story, this is an example of the flickr group Tell a Story in Five Frames, where you have to submit to the group discussion a single post with a title and 5 photos that… tell a story. It is in the vein of my Five Card Flickr stories, but […] &amp#x27A1;
    • May Story a Day #11: Radio Motivational Poster I won’t apologize for being a day behind but I am so sorry I am a day behind. This is a tough pace, but certainly no race. Folks, if you think that ds106 is dangerous cc licensed ( BY ) flickr photo shared by cogdogblog Here is proof… So here, as a quicky, I used […] &amp#x27A1;
  • 2008
    • Why Not Ask? Usually when I get emails about offers to advertise on my blog (which is a rather off thing to ask for), I just delete them. But for fun, when I got this recent one: Hello, We have a client in the e-learning sector who is interested in advertising on your blog. We find it relevant […] &amp#x27A1;
    • Getting My Ticket Out of Alltel Jail So I finally have my magic card to get out of the Alltel Jail of Poor Service and Unrelenting Contracts Last week I was down in Phoenix using the new UM150 USB modem they sent me. It worked fine for the first stop. Then, I had 5 disconnects in less than 2 hours, from 2 […] &amp#x27A1;
    • Tuesday. Maricopa 2.0. Be There. I have an interesting/weird presentation opportunity tomorrow, traveling all the way to Mesa, Arizona to do two sessions at the Maricopa Community Colleges Teaching & Learning with Technology Conference. It’s “weird” because I worked 14 years at Maricopa, nine of those years running the conference that was the predecessor, though I must say I never […] &amp#x27A1;
  • 2007
    • Apt Podcast It was posted a while ago, and was well recommended, but on last Friday’s flight home from San Jose, I finally got a chance, and to be humbled, by Gardner Campbell’s Kemp Symposium keynote “Apt Numbers, or, Sense Variously Drawn Out””. Magically weaving together his genuinely expressed love of music and Milton, and his concept […] &amp#x27A1;
  • 2006
    • The Tiny MIghty Link flickr foto Chain Of Entropyavailable on flickr It’s time to wax again on the sheer giddy glory of stumbling onto web gems by the serendipity of curious link clicking. It started in my RSS feeds, scanning an entry on Net Neutrality Comes Home to Haddam in Mike Roy’s new blog, Digital Incunabula. I actually didn’t […] &amp#x27A1;
  • 2005
    • My First (sloppy) ScreenCast So it was time to put my money where my snout was… After waffling about screencasting, I decided to give it a go. Downloading the Windows Media Encoder was not too bad. I played a bit, not really sure of the various settings for the encoding. Anyhow, I recorded an 11 minute quick attempt at […] &amp#x27A1;
    • Do I Have To Sacrifce A Virgin To Install Windows Software? flickr foto Do I Have To Sacrifce A Virgin To Install Windows Software?available on my flickr Just out of curiosity, I attempted to install the Windows “Photo Story 3” on my Dell laptop. I was unsuccessful at convincing Microsoft Windows that I was using Microsoft Windows despite extracting my secret password from the sticker on […] &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 *