“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 18 posts previously published on October 12th

  • 2024
    • Northern Lights, Definitely Growing up on the east coast of the U.S. (Baltimore, Maryland), I knew nothing of Northern Lights. Perhaps there was a blip in a science class, or maybe a glorious National Geographic photo. Nor was it anything I experience after I moved to Arizona. But when I had that wild opportunity in November 2008 to […]
  • 2021
    • The Truth About Education (and Butterflies) (and podcasts) That’s a total clickbait title. Or maybe more cleverly, mis-direction. To me that is one of the key elements of storytelling, the hook, the draw into something, the nibble taste that makes you want more. So no, I have no truths to tell/sell you about education. It’s more about what I got from an episode […]
  • 2017
    • Ten Years Between Blog Posts? Sorry I have not blogged for a decade… Sigh, such excuses. I set up https://cogdogroo.wordpress.com/ in 2007 for a speaking/presenting tour of Australia I did in October 2007– well it was every capital city in two weeks, a bit mad cap. But I did manage 75 posts starting back with planning in February. So it’s […]
  • 2014
    • Eyeing My Next Trip To New Zealand creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog That blast of blog posts was doing what I loathe, trying to catch up on days past. It ends up feeling like homework, though all work was assigned by me for me. It’s because I am thinking of my future need for a time […]
    • 2014 Kiwi Tour: Round 2 of 2 at AUT creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog It’s Thursday. I have presented every day last week and this week, and here is the finish line. Today we returned to downtown Auckland for a followup to Tuesday’s talks at Auckland University of Technology. A good start was a flat white with Thom […]
  • 2011
    • Laptop Weirdness cc licensed ( BY NC SD ) flickr photo shared by blakie I’m getting a tad worried on the road- my MacBookPro seems to be acting up. More than its occasional inability to wake up from sleep, now it seems to go to sleep by itself, and oddly, it always seems to be about 10 […]
    • Geotagging Photos With Duct Tape cc licensed ( BY NC SD ) flickr photo shared by sgrah I’ve had mixed success at keeping up with geotagging my trip photos, usually when chided by someone like @windsordi 😉 Frankly, the technology seems 90% there, but for me, has always required just that smidgen of extra effort that makes it a barrier […]
    • Tributes versus Acts Like many I was in disbelief that we are in a Steve Job-less world. It’s deeply sad to lose anyone of such influence, of course, but I am not quite to the point of religious fervor elsewhere. And I was going to avoid trying to write anything, but… I got an email from someone really […]
  • 2010
    • More Than Something to Share(ski): Make a Mark Dean is talking again about sharing. Heck it’s in his name so its perfect, and worth listening when he says/tweets “I have something to share(ski)”. Take 25 minutes and watch his video Sharing: The Moral Imperative created pre-conference keynote for the 2010 K-12 Online Conference: The kinds of stories Dean shares ought to be moving […]
    • In Between Time cc licensed flickr photo shared by cogdogblog There I stood, semi-conscious, waiting for the clerk at the Walgreens in Payson, AZ to finish entering the insurance info for the precious cold medicine– the magic pills I was counting on relieving the past 5 days of stupor from a cold that followed me home from Spain. […]
  • 2008
    • Show Me the Stories Show me the money by Kees (km-fotografie.nl) posted 20 Mar ’08, 10.37am MDT PST on flickr This exhibition shows the full contract from – if I remember it wel – a Swiss Bank for lending out money to the museum. Behind every page is a light source. In the middle (where my friend is standing) […]
  • 2005
    • Ocotillo Podcasts: Copyright, not Copywrong Last week was our most recent meeting of our Ocotillo Online Learning Group (OLG) meeting– OLG is an open meeting once a month at different college sites at Maricopa. The October meeting was at South Mountain Community College, featuring a topic of Copyright, Not Copywrong. As our trend this year, we captured two of the […]
    • Screencast Megastar Shazam! Sit back and watch/listen to Brian Lamb’s first screen cast, “Beyond the Blog”, a whirlwind tour of weblogs, wikis, RSS, aggregators, flickr, social software, and more. Best quip, “Think of delicious as blogging without writing a weblog”. Awesome work, Brian, and your fans shall clamor for more.  Share this barking on social media
    • Shockwave Book Put To Work flickr foto Shockwave Book Put To Workavailable on my flickr I was musing recently about long ago doing multimedia development for the web using Macromedia Director and Shockwave as the playback engine in the browser… and I recalled that I am still using on the classic books. Darrel Plant’s Shockwave: Breathe New Life into Your […]
    • Strange Marriages Well what do you know, look which two Course Management Systems have hooked up… maybe more spicy than MacroDobie or Adobamedia will be BbCT? Interesting times as the curse goes, eh?  Share this barking on social media
    • RSS Mixers A year ago there were none but now there are a good handful of sites that allow you to mix in a collection of disparate RSS feed URLs, and it mixes them into a new one, with its own RSS feed. I refer these frequently to folks that write me about Feed2JS asking if it […]
  • 2004
    • Time Furl-ed Will wrote today about his mild wonderment on his time spent roaming blogs, furl-ing and webnoting interesting web sites: So I had about 90 minutes of true blogging flow this morning, reading the latest in my Bloglines aggregator, clicking on links, Furling interesting posts, and stealing paragraphs here and there and saving them as a […]
  • 2003
    • Notes from the Road: Under the Big Sierra Peaks Barely relevant to the rest of this blog, what follows are the collections of thoughts that brewed, frothed, fermented, distilled during a weeken of travel. On the heels of a trip to Columbus for the NLII Focus Session on Learning Objects, I actually returned home to Phoenix, but weirdly enough did not exit with baggage […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 18 posts previously published on October 12th

  • 2024
    • Northern Lights, Definitely Growing up on the east coast of the U.S. (Baltimore, Maryland), I knew nothing of Northern Lights. Perhaps there was a blip in a science class, or maybe a glorious National Geographic photo. Nor was it anything I experience after I moved to Arizona. But when I had that wild opportunity in November 2008 to […] &amp#x27A1;
  • 2021
    • The Truth About Education (and Butterflies) (and podcasts) That’s a total clickbait title. Or maybe more cleverly, mis-direction. To me that is one of the key elements of storytelling, the hook, the draw into something, the nibble taste that makes you want more. So no, I have no truths to tell/sell you about education. It’s more about what I got from an episode […] &amp#x27A1;
  • 2017
    • Ten Years Between Blog Posts? Sorry I have not blogged for a decade… Sigh, such excuses. I set up https://cogdogroo.wordpress.com/ in 2007 for a speaking/presenting tour of Australia I did in October 2007– well it was every capital city in two weeks, a bit mad cap. But I did manage 75 posts starting back with planning in February. So it’s […] &amp#x27A1;
  • 2014
    • Eyeing My Next Trip To New Zealand creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog That blast of blog posts was doing what I loathe, trying to catch up on days past. It ends up feeling like homework, though all work was assigned by me for me. It’s because I am thinking of my future need for a time […] &amp#x27A1;
    • 2014 Kiwi Tour: Round 2 of 2 at AUT creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog It’s Thursday. I have presented every day last week and this week, and here is the finish line. Today we returned to downtown Auckland for a followup to Tuesday’s talks at Auckland University of Technology. A good start was a flat white with Thom […] &amp#x27A1;
  • 2011
    • Laptop Weirdness cc licensed ( BY NC SD ) flickr photo shared by blakie I’m getting a tad worried on the road- my MacBookPro seems to be acting up. More than its occasional inability to wake up from sleep, now it seems to go to sleep by itself, and oddly, it always seems to be about 10 […] &amp#x27A1;
    • Geotagging Photos With Duct Tape cc licensed ( BY NC SD ) flickr photo shared by sgrah I’ve had mixed success at keeping up with geotagging my trip photos, usually when chided by someone like @windsordi 😉 Frankly, the technology seems 90% there, but for me, has always required just that smidgen of extra effort that makes it a barrier […] &amp#x27A1;
    • Tributes versus Acts Like many I was in disbelief that we are in a Steve Job-less world. It’s deeply sad to lose anyone of such influence, of course, but I am not quite to the point of religious fervor elsewhere. And I was going to avoid trying to write anything, but… I got an email from someone really […] &amp#x27A1;
  • 2010
    • More Than Something to Share(ski): Make a Mark Dean is talking again about sharing. Heck it’s in his name so its perfect, and worth listening when he says/tweets “I have something to share(ski)”. Take 25 minutes and watch his video Sharing: The Moral Imperative created pre-conference keynote for the 2010 K-12 Online Conference: The kinds of stories Dean shares ought to be moving […] &amp#x27A1;
    • In Between Time cc licensed flickr photo shared by cogdogblog There I stood, semi-conscious, waiting for the clerk at the Walgreens in Payson, AZ to finish entering the insurance info for the precious cold medicine– the magic pills I was counting on relieving the past 5 days of stupor from a cold that followed me home from Spain. […] &amp#x27A1;
  • 2008
    • Show Me the Stories Show me the money by Kees (km-fotografie.nl) posted 20 Mar ’08, 10.37am MDT PST on flickr This exhibition shows the full contract from – if I remember it wel – a Swiss Bank for lending out money to the museum. Behind every page is a light source. In the middle (where my friend is standing) […] &amp#x27A1;
  • 2005
    • Ocotillo Podcasts: Copyright, not Copywrong Last week was our most recent meeting of our Ocotillo Online Learning Group (OLG) meeting– OLG is an open meeting once a month at different college sites at Maricopa. The October meeting was at South Mountain Community College, featuring a topic of Copyright, Not Copywrong. As our trend this year, we captured two of the […] &amp#x27A1;
    • Screencast Megastar Shazam! Sit back and watch/listen to Brian Lamb’s first screen cast, “Beyond the Blog”, a whirlwind tour of weblogs, wikis, RSS, aggregators, flickr, social software, and more. Best quip, “Think of delicious as blogging without writing a weblog”. Awesome work, Brian, and your fans shall clamor for more.  Share this barking on social media &amp#x27A1;
    • Shockwave Book Put To Work flickr foto Shockwave Book Put To Workavailable on my flickr I was musing recently about long ago doing multimedia development for the web using Macromedia Director and Shockwave as the playback engine in the browser… and I recalled that I am still using on the classic books. Darrel Plant’s Shockwave: Breathe New Life into Your […] &amp#x27A1;
    • Strange Marriages Well what do you know, look which two Course Management Systems have hooked up… maybe more spicy than MacroDobie or Adobamedia will be BbCT? Interesting times as the curse goes, eh?  Share this barking on social media &amp#x27A1;
    • RSS Mixers A year ago there were none but now there are a good handful of sites that allow you to mix in a collection of disparate RSS feed URLs, and it mixes them into a new one, with its own RSS feed. I refer these frequently to folks that write me about Feed2JS asking if it […] &amp#x27A1;
  • 2004
    • Time Furl-ed Will wrote today about his mild wonderment on his time spent roaming blogs, furl-ing and webnoting interesting web sites: So I had about 90 minutes of true blogging flow this morning, reading the latest in my Bloglines aggregator, clicking on links, Furling interesting posts, and stealing paragraphs here and there and saving them as a […] &amp#x27A1;
  • 2003
    • Notes from the Road: Under the Big Sierra Peaks Barely relevant to the rest of this blog, what follows are the collections of thoughts that brewed, frothed, fermented, distilled during a weeken of travel. On the heels of a trip to Columbus for the NLII Focus Session on Learning Objects, I actually returned home to Phoenix, but weirdly enough did not exit with baggage […] &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 *