“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 19 posts previously published on March 1st

  • 2023
    • Double Down on Daily Double in February The daily habit is on for a two month streak! Picking up in the January pace of batting 1000 for the DS106 Daily Create and my Daily Flickr Photo habit, by the 59th day of the year being 59/59 in both. As the kid asks… Daily Flickr Photos A bit of… Not quite the Ghostbusters […]
  • 2021
    • Strawberry Crossfade A wavering of the flux capacitor of pandemic time left this post lingering a long time, not even as a draft in WordPress (I almost never leave drafts), but in my mind. In November of Covid-19 Year Zero (aka 2020) I sold the little house in Strawberry Arizona that was my home from 2008 to […]
    • Desert Cooking Workshop: Spicing Up OERs With H5P There was a sequel to sharing the H5P/PB Kitchen as a keynote February 19 for the Arizona OER Conference. A week later, I brought to the same conference…
  • 2016
    • How The Web Was / Is Won A few weeks ago I got an email from Justin Reich asking if I wanted to run a workshop on connected courses with him at DML 2016. Heck yeah! I’m a big follower of his work, and it was Justin who got me on board doing an aggregation hub a few years ago for the […]
    • Un mes bellísimo en Puerto Rico That is true – a beautiful month in Puerto Rico; that was my February of 2016 thanks to an invitation from Antonio Vantaggiato to spend a month with him and staff/students in the STEMmED project at Universidad del Sagrado del Corazón in San Juan, Puerto Rico. And it’s not the first time Antonio has been […]
  • 2015
    • This is what the factory system of schools produces I’ve been thinking of starting a blog, but have hesitated because who really wants to read what goes on in my head and in my classroom? Or maybe not just schools, maybe its society. When teachers pop out of university system, sent on a mission to shape young minds, the factory products have been stamped […]
    • A Personal Hyperidea System I’m reading a book right now. You know the interface design? A written work of ideas, printed to granular containers of text (called “pages”) with an intuitive navigation system. Yet I am thinking in the back of my mind the recent discussions a bunch of us are having about the History of Hypertext led by […]
    • More Stuff On It Than You Can Possibly Imagine “Hey, why should I be on the Internet?” “By the time I am in college, the internet will be our telephone..” “television…” “shopping centers…” “and workplace.” “And it’s already got more stuff on it than you can possible imagine.” Pretty obvious, right? You might be reading this on your phone at work. Gartner already charted […]
  • 2014
    • Cory Greenspan / Alan Doctorow ? The CAPTCHA Did it! cc licensed ( BY SA ) flickr photo shared by Alan Levine For today’s ds106 Daily Create, Got CAPTCHArt? the challenge was to make some art out of those crazy “prove you are a human” devices. Captchas are not quite as easy to find any more with interesting words. I have some in my flickr […]
    • Leaving Your Own Domains In August 2013, I summarized the status of the domains my previous 81 students at UMW had made. Few from 2012 kept their domains, and then, at 6 months after the Spring 2013 class had ended, 20 out of 22 of the blogs from the Spring 2013 class were still there. That was then. While […]
  • 2009
    • Paperwork/Network 2009/365/60: Downed by Paperwork by cogdogblog posted 1 Mar ’09, 9.48pm MST PST on flickr In valiant attempts to get campus wireless access for me at Baylor, Gardner went to the extremes to work the channels. I had to provide my home address, phone number, forms were faxed, we went to the IT office, phone […]
  • 2008
    • Telecaster It may look like I knew what I was doing with this guitar at the Northern Voice EduGlu Blues JamFest, but rest assured, you most likely dont want to ask for a recording (there was none)- but just holding a guitar, for me, is a sensual experience. And a nostalgic one. So I am thinking […]
    • PhotoDropper Gateway Plugin Drug for Flickr Photos photo credit: lovestruck. This is my first play with PhotoDropper a WordPress plugin that provides a search interface and one click insert so you can find creative commons licensed flickr photos in your blog. It is lovely, a lovely, lovely plugin, and is just one more iota of my expression of my flickr love. Or […]
  • 2007
    • The Search That Said “Ack” So yeah, flickr was swallowed by the big fish Yahoo, and piss off the old skoolers. At least the site still surprises with some bursts of quirky personality syndrome, as a search today just resulted in a Bill The Cat response: You gotta love an error that says, “Ack”! It makes you want to say, […]
    • (Webhost) Experience is Relative It seems to be a human condition to extend our own experiences to generalities. So for example, in hours trying to help my wife and her computer woes (like Windows not being able to open desktop windows), I can say with confidence, “Windows Sucks”. Or when I put in a telephone call to my insurance […]
  • 2006
    • Sick Of Podcasting After a second Podcasting, Schmodcasting demo this week, I am getting sick and tired of talking about them 😉 This was for a mostly faculty crowd at Glendale Community College, who managed to all suit in the last two rows of the room. Different from Monday, today I moved more quickly through the variety of […]
  • 2005
    • Folksonomic Video: Vimeo I am supposed to be out the door about 5 minuntes ago when I get to curious to click on vimeo (tip of the blog hat to David Weinberger, thanks for making me later for dinner 😉 In a nutshell, it looks like a filckr for video, and it semms there are a lot of […]
    • Skype Blemish? I like Skype. I like Skype. I like it so much, I wanted to run it on my PC laptop across the desk from me. What I did not like was when I logged in with the account I use on my Mac, I notice that my contacts do not appear, so it seems that […]
  • 2004
    • Doing the Web Database Mambo- Online Registration Site for Dance Festival As part of our support for some of our system-wide Arts programs, a few months back I agreed to build a web site and some online registration tools for the March 2004 American College Dance Festival (Southwest Regional) being hosted by our Scottsdale Community College. There are some 350 attendees from 31 different college dance […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 19 posts previously published on March 1st

  • 2023
    • Double Down on Daily Double in February The daily habit is on for a two month streak! Picking up in the January pace of batting 1000 for the DS106 Daily Create and my Daily Flickr Photo habit, by the 59th day of the year being 59/59 in both. As the kid asks… Daily Flickr Photos A bit of… Not quite the Ghostbusters […] &amp#x27A1;
  • 2021
    • Strawberry Crossfade A wavering of the flux capacitor of pandemic time left this post lingering a long time, not even as a draft in WordPress (I almost never leave drafts), but in my mind. In November of Covid-19 Year Zero (aka 2020) I sold the little house in Strawberry Arizona that was my home from 2008 to […] &amp#x27A1;
    • Desert Cooking Workshop: Spicing Up OERs With H5P There was a sequel to sharing the H5P/PB Kitchen as a keynote February 19 for the Arizona OER Conference. A week later, I brought to the same conference… &amp#x27A1;
  • 2016
    • How The Web Was / Is Won A few weeks ago I got an email from Justin Reich asking if I wanted to run a workshop on connected courses with him at DML 2016. Heck yeah! I’m a big follower of his work, and it was Justin who got me on board doing an aggregation hub a few years ago for the […] &amp#x27A1;
    • Un mes bellísimo en Puerto Rico That is true – a beautiful month in Puerto Rico; that was my February of 2016 thanks to an invitation from Antonio Vantaggiato to spend a month with him and staff/students in the STEMmED project at Universidad del Sagrado del Corazón in San Juan, Puerto Rico. And it’s not the first time Antonio has been […] &amp#x27A1;
  • 2015
    • This is what the factory system of schools produces I’ve been thinking of starting a blog, but have hesitated because who really wants to read what goes on in my head and in my classroom? Or maybe not just schools, maybe its society. When teachers pop out of university system, sent on a mission to shape young minds, the factory products have been stamped […] &amp#x27A1;
    • A Personal Hyperidea System I’m reading a book right now. You know the interface design? A written work of ideas, printed to granular containers of text (called “pages”) with an intuitive navigation system. Yet I am thinking in the back of my mind the recent discussions a bunch of us are having about the History of Hypertext led by […] &amp#x27A1;
    • More Stuff On It Than You Can Possibly Imagine “Hey, why should I be on the Internet?” “By the time I am in college, the internet will be our telephone..” “television…” “shopping centers…” “and workplace.” “And it’s already got more stuff on it than you can possible imagine.” Pretty obvious, right? You might be reading this on your phone at work. Gartner already charted […] &amp#x27A1;
  • 2014
    • Cory Greenspan / Alan Doctorow ? The CAPTCHA Did it! cc licensed ( BY SA ) flickr photo shared by Alan Levine For today’s ds106 Daily Create, Got CAPTCHArt? the challenge was to make some art out of those crazy “prove you are a human” devices. Captchas are not quite as easy to find any more with interesting words. I have some in my flickr […] &amp#x27A1;
    • Leaving Your Own Domains In August 2013, I summarized the status of the domains my previous 81 students at UMW had made. Few from 2012 kept their domains, and then, at 6 months after the Spring 2013 class had ended, 20 out of 22 of the blogs from the Spring 2013 class were still there. That was then. While […] &amp#x27A1;
  • 2009
    • Paperwork/Network 2009/365/60: Downed by Paperwork by cogdogblog posted 1 Mar ’09, 9.48pm MST PST on flickr In valiant attempts to get campus wireless access for me at Baylor, Gardner went to the extremes to work the channels. I had to provide my home address, phone number, forms were faxed, we went to the IT office, phone […] &amp#x27A1;
  • 2008
    • Telecaster It may look like I knew what I was doing with this guitar at the Northern Voice EduGlu Blues JamFest, but rest assured, you most likely dont want to ask for a recording (there was none)- but just holding a guitar, for me, is a sensual experience. And a nostalgic one. So I am thinking […] &amp#x27A1;
    • PhotoDropper Gateway Plugin Drug for Flickr Photos photo credit: lovestruck. This is my first play with PhotoDropper a WordPress plugin that provides a search interface and one click insert so you can find creative commons licensed flickr photos in your blog. It is lovely, a lovely, lovely plugin, and is just one more iota of my expression of my flickr love. Or […] &amp#x27A1;
  • 2007
    • The Search That Said “Ack” So yeah, flickr was swallowed by the big fish Yahoo, and piss off the old skoolers. At least the site still surprises with some bursts of quirky personality syndrome, as a search today just resulted in a Bill The Cat response: You gotta love an error that says, “Ack”! It makes you want to say, […] &amp#x27A1;
    • (Webhost) Experience is Relative It seems to be a human condition to extend our own experiences to generalities. So for example, in hours trying to help my wife and her computer woes (like Windows not being able to open desktop windows), I can say with confidence, “Windows Sucks”. Or when I put in a telephone call to my insurance […] &amp#x27A1;
  • 2006
    • Sick Of Podcasting After a second Podcasting, Schmodcasting demo this week, I am getting sick and tired of talking about them 😉 This was for a mostly faculty crowd at Glendale Community College, who managed to all suit in the last two rows of the room. Different from Monday, today I moved more quickly through the variety of […] &amp#x27A1;
  • 2005
    • Folksonomic Video: Vimeo I am supposed to be out the door about 5 minuntes ago when I get to curious to click on vimeo (tip of the blog hat to David Weinberger, thanks for making me later for dinner 😉 In a nutshell, it looks like a filckr for video, and it semms there are a lot of […] &amp#x27A1;
    • Skype Blemish? I like Skype. I like Skype. I like it so much, I wanted to run it on my PC laptop across the desk from me. What I did not like was when I logged in with the account I use on my Mac, I notice that my contacts do not appear, so it seems that […] &amp#x27A1;
  • 2004
    • Doing the Web Database Mambo- Online Registration Site for Dance Festival As part of our support for some of our system-wide Arts programs, a few months back I agreed to build a web site and some online registration tools for the March 2004 American College Dance Festival (Southwest Regional) being hosted by our Scottsdale Community College. There are some 350 attendees from 31 different college dance […] &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 *