“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 15 posts previously published on August 2nd

  • 2025
    • Blowing By Seven (months of daily photos) July was a bit tenuous for this year’s Daily Photo Habit, and things were looking dicy, but a big upload push last week filled in the first 3 weeks of the month. Now it looks easy, but the seventh month is in the bag, and I’m batting 1.000. Getting to July 31 aka 212 is […]
  • 2020
    • Mineral Machine Names: My First Subdomains My memory may be operating at guess level here. The Office Wall Jacks Back in 1992, my first year as an instructional technologist* at the Maricopa Community Colleges, for exact reasons I forget, I was giving what now I know are subdomain names for all of the computers in our office. The how/why goes further […]
  • 2017
    • Digging to the Bottom of an Obscure Twitter API Thing It’s a very satisfying thing to succeed at digging. While I am way way behind Tom Woodward in API wrangling, I’ve put them to use in projects- using the FLickr API for pechaflickr and 5 Card Stories. I also put the twitter API to use in the Daily _____ sites, e,g, the DS106 Daily Create. […]
    • Sometimes When You Go Cheap You Get What You Pay For Somewhere on my road trip last months I managed to loose my iPhone ear buds. And somewhere earlier I had lost my backup pair (if you know me, you know I believe in backup backups). I use these all the time for my online video stuff, and for a few days I was using an […]
  • 2016
    • Domains: Own, Value, Care, Time Like a small stubborn, unique, old fashioned house surrounded by modern monolithic mega modern glass and steel structures, the Domain of Ones Own project started at the University of Mary Washington stands out as one hope amongst Educational Technology’s adoration of mega scale, management, analytics, automation, and tall tall towers of data, data, data. Much […]
  • 2015
    • Hace doce horas en un pasillo del hotel oscuro – Openness with Brian Lamb Much as he may disavow my assertion (ask him about the one in Flagstaff a few years ago), Brian Lamb and I getting together for presenting is always a peak experience, usually peaking soon before it happens. For the UdG Agora face to face sessions last month in Guadalajara, Tannis Morgan asked us to do […]
  • 2012
    • UBC Student Views on Wikipedia Writing Project Sigh, July somehow gobbled up my momentum from my time spent at the University of British Columbia in June, even with the fun of rebooting the old CAREO service in Brian Lamb’s [old] office. But as follow-up to my interview with UBC History professor Tina Loo I had also interviewed three of her students to […]
    • Syndication Machines (plus syndication of syndication) cc licensed ( BY ) flickr photo shared by psd It’s sweetly ironic that despite the almost consistent reprisal of “RSS being dead” maybe that’s in terms of outward perception. Down at the bowels of the systems of internet flow, and I see plenty of it in highly functional action via my own small corner […]
  • 2007
    • DogPeeBook Enough already of insanely more, ever expanding facebook apps. Will the web soon implode from some unexpected infinitely recursive facebooking? Here is my new facebook app DogPeeBook – D-friend is for pretty littles kitties. This Big Dog App will drop a hideous, smelly yellow stain on the profile page every person who takes you off […]
    • Not to Rain on Wills Parade, but.. As a long time baseball fan (Orioles in the 1970s glory years right on through to young Cal in the early 80s…) I’m as much as anyone thinking the Cubs are due their title. But Will, in all your excitement of the standings, get real with how the central division stacks up even in the […]
    • Twitter Follower Spam- It Will Be a Deep Freeze in Phoenix Before I Follow…. No, I will not follow this crud on twitter: That is a quick delete. In a few days I predict invites bearing glorious news like: Texas Holdem Galore (txpokerscum) is now following your updates on Twitter.. ViagraPropeciaCialis (thebluepill) is now following your updates on Twitter… NastyAnimalSex (dontclickhere) is now following your updates on Twitter… Hughs […]
    • Sizeasy- User Generated Size Database Just what I needed in the middle of a work day- another interesting web tool. But there is this itch when I find these, and the scratch says, “Hmmm. Must blog this…. must …. blog…. this….” So how do you know if something is “bigger than a breadbox”? You can guess or measure. Sizeasy is […]
    • 50(+) Web 2.0 Ways to Tell a Story (or 50 ways to drive myself nuts) After my excitement of how easy it was to create a rich media piece with Voice Thread, I got this notion of a workshop where participants could not only explore that one tool, but perhaps an array of others I was marginally aware of. So maybe it was after the evening of watching the Paul […]
  • 2005
    • The Pitfalls of Link-a-toriums The recent T.H.E. Journal article 20 Technology Skills Every Educator Should Have has already bounced around the blogs I scan, many with some strong opinions about the value or lack value in such a list. The Edtech Posse Podcast #3 gave it a thorough roundup, and I concur with their skepticism about such lists which […]
    • Small Ocotillo Pieces Tweaked As summer winds down and the school year ramps up, I’ve been trying to refine a bit of the Small Technologies Loosely Joined approach we created last year for our Ocotillo instructional technology initiatives… For those irregular readers, Ocotillo is a faculty led program that attemps to drive technology agendas here, having been around in […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 15 posts previously published on August 2nd

  • 2025
    • Blowing By Seven (months of daily photos) July was a bit tenuous for this year’s Daily Photo Habit, and things were looking dicy, but a big upload push last week filled in the first 3 weeks of the month. Now it looks easy, but the seventh month is in the bag, and I’m batting 1.000. Getting to July 31 aka 212 is […] &amp#x27A1;
  • 2020
    • Mineral Machine Names: My First Subdomains My memory may be operating at guess level here. The Office Wall Jacks Back in 1992, my first year as an instructional technologist* at the Maricopa Community Colleges, for exact reasons I forget, I was giving what now I know are subdomain names for all of the computers in our office. The how/why goes further […] &amp#x27A1;
  • 2017
    • Digging to the Bottom of an Obscure Twitter API Thing It’s a very satisfying thing to succeed at digging. While I am way way behind Tom Woodward in API wrangling, I’ve put them to use in projects- using the FLickr API for pechaflickr and 5 Card Stories. I also put the twitter API to use in the Daily _____ sites, e,g, the DS106 Daily Create. […] &amp#x27A1;
    • Sometimes When You Go Cheap You Get What You Pay For Somewhere on my road trip last months I managed to loose my iPhone ear buds. And somewhere earlier I had lost my backup pair (if you know me, you know I believe in backup backups). I use these all the time for my online video stuff, and for a few days I was using an […] &amp#x27A1;
  • 2016
    • Domains: Own, Value, Care, Time Like a small stubborn, unique, old fashioned house surrounded by modern monolithic mega modern glass and steel structures, the Domain of Ones Own project started at the University of Mary Washington stands out as one hope amongst Educational Technology’s adoration of mega scale, management, analytics, automation, and tall tall towers of data, data, data. Much […] &amp#x27A1;
  • 2015
  • 2012
    • UBC Student Views on Wikipedia Writing Project Sigh, July somehow gobbled up my momentum from my time spent at the University of British Columbia in June, even with the fun of rebooting the old CAREO service in Brian Lamb’s [old] office. But as follow-up to my interview with UBC History professor Tina Loo I had also interviewed three of her students to […] &amp#x27A1;
    • Syndication Machines (plus syndication of syndication) cc licensed ( BY ) flickr photo shared by psd It’s sweetly ironic that despite the almost consistent reprisal of “RSS being dead” maybe that’s in terms of outward perception. Down at the bowels of the systems of internet flow, and I see plenty of it in highly functional action via my own small corner […] &amp#x27A1;
  • 2007
    • DogPeeBook Enough already of insanely more, ever expanding facebook apps. Will the web soon implode from some unexpected infinitely recursive facebooking? Here is my new facebook app DogPeeBook – D-friend is for pretty littles kitties. This Big Dog App will drop a hideous, smelly yellow stain on the profile page every person who takes you off […] &amp#x27A1;
    • Not to Rain on Wills Parade, but.. As a long time baseball fan (Orioles in the 1970s glory years right on through to young Cal in the early 80s…) I’m as much as anyone thinking the Cubs are due their title. But Will, in all your excitement of the standings, get real with how the central division stacks up even in the […] &amp#x27A1;
    • Twitter Follower Spam- It Will Be a Deep Freeze in Phoenix Before I Follow…. No, I will not follow this crud on twitter: That is a quick delete. In a few days I predict invites bearing glorious news like: Texas Holdem Galore (txpokerscum) is now following your updates on Twitter.. ViagraPropeciaCialis (thebluepill) is now following your updates on Twitter… NastyAnimalSex (dontclickhere) is now following your updates on Twitter… Hughs […] &amp#x27A1;
    • Sizeasy- User Generated Size Database Just what I needed in the middle of a work day- another interesting web tool. But there is this itch when I find these, and the scratch says, “Hmmm. Must blog this…. must …. blog…. this….” So how do you know if something is “bigger than a breadbox”? You can guess or measure. Sizeasy is […] &amp#x27A1;
    • 50(+) Web 2.0 Ways to Tell a Story (or 50 ways to drive myself nuts) After my excitement of how easy it was to create a rich media piece with Voice Thread, I got this notion of a workshop where participants could not only explore that one tool, but perhaps an array of others I was marginally aware of. So maybe it was after the evening of watching the Paul […] &amp#x27A1;
  • 2005
    • The Pitfalls of Link-a-toriums The recent T.H.E. Journal article 20 Technology Skills Every Educator Should Have has already bounced around the blogs I scan, many with some strong opinions about the value or lack value in such a list. The Edtech Posse Podcast #3 gave it a thorough roundup, and I concur with their skepticism about such lists which […] &amp#x27A1;
    • Small Ocotillo Pieces Tweaked As summer winds down and the school year ramps up, I’ve been trying to refine a bit of the Small Technologies Loosely Joined approach we created last year for our Ocotillo instructional technology initiatives… For those irregular readers, Ocotillo is a faculty led program that attemps to drive technology agendas here, having been around in […] &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 *