“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 April 5th

  • 2021
    • Accordions, Collapsibles, Drawers, Disclosures When I say “Accordion” your first association may be the musical instrument. But here we are talking about a simple, display-oriented (no built in feedback) H5P content type…
    • Web Handicraft Might the antidote to some future/present sense of powerless miasma to an algorithmic fueled inescapable AI matrix be just human created quirkiness? Join me (or click away quickly now) for another rummaging in an old hard drive of 1990s website files for a taste of the uncharted freedom when we created digital content without platforms […]
  • 2019
    • Who Ya Calling a Grader? There’s a lot of twitter talk (don’t ask me to define “a lot”) of #Ungrading or as the Inside Higher Education article being batted around today calls it When Grading Less is More. I’m not sure where the locus is here- there’s seems a bandwagon jumping on teaching gradeless, which is, as most will say, […]
  • 2017
    • Felix Plus One Year One year ago I drove to the local Humane Society animal shelter in Payson, carrying the cocktail of excitement and nervousness. After almost 8 years of being without a canine companion it was time, enabled by my starting of an 18 month contract project that assured me work from home. I’d been the Dog-less CogDog. […]
  • 2016
    • Forking Your Way into the Flickr CC Attribution Helper In my last long scroll post I went over the steps for forking and editing a silly GitHub page to mess with the lyrics of “Home on the Range.” That is like, so, not really useful. This one might not be either. But it could be fun. When you use a bookmarklet tool created with […]
    • Fork on the Range: Getting Over the Fear of GitHub Forking Ugh I am not going to start doing tl;dr stuff, but my intros seem to be long. I am going to invite you to try some simple github edits to a public site, come fork with me, ok? I’ve had a GitHub account since 2010 (my guess was later, but found that on my profile). […]
    • Taking Interactive Technologies to the Next Level (back in 2000) Many are dismissive of nostalgia… until they have racked up a few years and have some to look back on. If that’s not your shtick, click on. In 1999 I was 7 years into my career as an instructional technologist at the Maricopa Community Colleges, working in a central office of faculty development for the […]
  • 2015
    • Groom Lake Beyond a few postcards, I was prepared to leave the quirky little Area 51 themed cafe in Nevada without any UFO or alien shlock. Then I glanced on the shelf and spotted a CD – Kenny Texeira’s “Groom Lake” labeled as “The official Rock ‘n Roll song about Area 51”. I am quite sure the […]
    • On Decelerating I’ve been two days not “in motion”- the phrase my good friend and true Gypsy Scholar GNA Garcia describes from a life style of roaming. And I underestimated the deceleration affect of returning home from a long trip. Boom. After being gone from October 10, 2014 through Thursday for a fantastic stint supported by a […]
  • 2013
    • Fluid Dog in Motion Sometimes I do not get what I intended in a photograph, and end up trashing them. In this case, I got something different, but better. This was a series where I was attempting to get a panning photo of something in motion, where you use a relatively slow shutter speed, and move the camera at […]
    • Muddy and Roger- No Mo Mojo Working Just last week, my ds106 students applied Roger Ebert’s How to Read Movies for their weekly assignment. One of my students was first in my network to share the sad news that Ebert passed away today https://twitter.com/mmbutlerr/status/319597819939921920 What a better way to honor his contributions that a ds106 assignment (well there are likely much better […]
  • 2010
    • iFrenzy (or not) cc licensed flickr photo shared by ooki_op iPad. That’s it. iPad! Yep. iPad. Got one? iPad… Nope. I sit on the sidelines taking in the iPad frenzy. Over the last few months, rarely have so many firm opinions been founded on so much lack of actual information. but now that changes. A bit. I have […]
  • 2008
    • Hail Feedistan! I’ve been still mentally energy catching up after the sprint marathon that is running our Symposium on Mashups last week and thuse am delinquent on sharing what an over-the-top session Jim Groom and Tom Woodward did on Welcome to the People’s Republic of Non-Programistan — including fake accents for 30 minutes — catch the Connect […]
    • Photo Simple I’ve tried to formulate it in my head and cannot put exactly to words why I love so much taking photos. And now I decided I dont really have to have it in words. It’s what energizes me. And so much has been rekindled just since January on taking on the challenge of the 366 […]
  • 2007
    • Shorpy – a Photo Blog Pioneer I like Shorpy, “the 100 year-old photo blog”: Shorpy.com is a photo blog about what life a hundred years ago was like: How people looked and what they did for a living, back when not having a job usually meant not eating. We’re starting with a collection of photographs taken in the early 1900s by […]
  • 2006
    • The Secret Lives of Apple Products Because the movie about dentists was such a gag fest, I am tweaking my post title to lob some rocks at Apple. But before that, my long disclaimer. I love Apple products. I am one who’s “stone cold death grip” would be clamped on a PowerBook. I’ve done programming, multimedia, CD-ROMs, internet-ing all in the […]
    • Article Preview “Speaking What We Write” We are prepping the Spring 2006 issue of our MCLI iForum, the online publication we generate via WordPress. Actually “prepping” means begging, nagging, cajoling people to actually write something (rather than copy and paste a summary of events that already exist on other web sites). Anyhow, as a preview (not exactly linked from the front […]
    • Tired of This Screen? And who keeps flicking the Gmail switch? I am reminded of the quote from the philosopher Steven Wright: In my house there’s this light switch that doesn’t do anything. Every so often I would flick it on and off just to check. Yesterday, I got a call from a woman in Madagascar. She said, “Cut […]
    • Holiday? While driving to work today, i felt like I had forgotten it was some sort of national, regional holiday like Drive To Work With Your Brakes On Day (which can also be celebrated by attempting to send messages via Morse code by tapping on your brakes). Of course, with only 2.5 days of commute left […]
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 April 5th

  • 2021
    • Accordions, Collapsibles, Drawers, Disclosures When I say “Accordion” your first association may be the musical instrument. But here we are talking about a simple, display-oriented (no built in feedback) H5P content type… &amp#x27A1;
    • Web Handicraft Might the antidote to some future/present sense of powerless miasma to an algorithmic fueled inescapable AI matrix be just human created quirkiness? Join me (or click away quickly now) for another rummaging in an old hard drive of 1990s website files for a taste of the uncharted freedom when we created digital content without platforms […] &amp#x27A1;
  • 2019
    • Who Ya Calling a Grader? There’s a lot of twitter talk (don’t ask me to define “a lot”) of #Ungrading or as the Inside Higher Education article being batted around today calls it When Grading Less is More. I’m not sure where the locus is here- there’s seems a bandwagon jumping on teaching gradeless, which is, as most will say, […] &amp#x27A1;
  • 2017
    • Felix Plus One Year One year ago I drove to the local Humane Society animal shelter in Payson, carrying the cocktail of excitement and nervousness. After almost 8 years of being without a canine companion it was time, enabled by my starting of an 18 month contract project that assured me work from home. I’d been the Dog-less CogDog. […] &amp#x27A1;
  • 2016
    • Forking Your Way into the Flickr CC Attribution Helper In my last long scroll post I went over the steps for forking and editing a silly GitHub page to mess with the lyrics of “Home on the Range.” That is like, so, not really useful. This one might not be either. But it could be fun. When you use a bookmarklet tool created with […] &amp#x27A1;
    • Fork on the Range: Getting Over the Fear of GitHub Forking Ugh I am not going to start doing tl;dr stuff, but my intros seem to be long. I am going to invite you to try some simple github edits to a public site, come fork with me, ok? I’ve had a GitHub account since 2010 (my guess was later, but found that on my profile). […] &amp#x27A1;
    • Taking Interactive Technologies to the Next Level (back in 2000) Many are dismissive of nostalgia… until they have racked up a few years and have some to look back on. If that’s not your shtick, click on. In 1999 I was 7 years into my career as an instructional technologist at the Maricopa Community Colleges, working in a central office of faculty development for the […] &amp#x27A1;
  • 2015
    • Groom Lake Beyond a few postcards, I was prepared to leave the quirky little Area 51 themed cafe in Nevada without any UFO or alien shlock. Then I glanced on the shelf and spotted a CD – Kenny Texeira’s “Groom Lake” labeled as “The official Rock ‘n Roll song about Area 51”. I am quite sure the […] &amp#x27A1;
    • On Decelerating I’ve been two days not “in motion”- the phrase my good friend and true Gypsy Scholar GNA Garcia describes from a life style of roaming. And I underestimated the deceleration affect of returning home from a long trip. Boom. After being gone from October 10, 2014 through Thursday for a fantastic stint supported by a […] &amp#x27A1;
  • 2013
    • Fluid Dog in Motion Sometimes I do not get what I intended in a photograph, and end up trashing them. In this case, I got something different, but better. This was a series where I was attempting to get a panning photo of something in motion, where you use a relatively slow shutter speed, and move the camera at […] &amp#x27A1;
    • Muddy and Roger- No Mo Mojo Working Just last week, my ds106 students applied Roger Ebert’s How to Read Movies for their weekly assignment. One of my students was first in my network to share the sad news that Ebert passed away today https://twitter.com/mmbutlerr/status/319597819939921920 What a better way to honor his contributions that a ds106 assignment (well there are likely much better […] &amp#x27A1;
  • 2010
    • iFrenzy (or not) cc licensed flickr photo shared by ooki_op iPad. That’s it. iPad! Yep. iPad. Got one? iPad… Nope. I sit on the sidelines taking in the iPad frenzy. Over the last few months, rarely have so many firm opinions been founded on so much lack of actual information. but now that changes. A bit. I have […] &amp#x27A1;
  • 2008
    • Hail Feedistan! I’ve been still mentally energy catching up after the sprint marathon that is running our Symposium on Mashups last week and thuse am delinquent on sharing what an over-the-top session Jim Groom and Tom Woodward did on Welcome to the People’s Republic of Non-Programistan — including fake accents for 30 minutes — catch the Connect […] &amp#x27A1;
    • Photo Simple I’ve tried to formulate it in my head and cannot put exactly to words why I love so much taking photos. And now I decided I dont really have to have it in words. It’s what energizes me. And so much has been rekindled just since January on taking on the challenge of the 366 […] &amp#x27A1;
  • 2007
    • Shorpy – a Photo Blog Pioneer I like Shorpy, “the 100 year-old photo blog”: Shorpy.com is a photo blog about what life a hundred years ago was like: How people looked and what they did for a living, back when not having a job usually meant not eating. We’re starting with a collection of photographs taken in the early 1900s by […] &amp#x27A1;
  • 2006
    • The Secret Lives of Apple Products Because the movie about dentists was such a gag fest, I am tweaking my post title to lob some rocks at Apple. But before that, my long disclaimer. I love Apple products. I am one who’s “stone cold death grip” would be clamped on a PowerBook. I’ve done programming, multimedia, CD-ROMs, internet-ing all in the […] &amp#x27A1;
    • Article Preview “Speaking What We Write” We are prepping the Spring 2006 issue of our MCLI iForum, the online publication we generate via WordPress. Actually “prepping” means begging, nagging, cajoling people to actually write something (rather than copy and paste a summary of events that already exist on other web sites). Anyhow, as a preview (not exactly linked from the front […] &amp#x27A1;
    • Tired of This Screen? And who keeps flicking the Gmail switch? I am reminded of the quote from the philosopher Steven Wright: In my house there’s this light switch that doesn’t do anything. Every so often I would flick it on and off just to check. Yesterday, I got a call from a woman in Madagascar. She said, “Cut […] &amp#x27A1;
    • Holiday? While driving to work today, i felt like I had forgotten it was some sort of national, regional holiday like Drive To Work With Your Brakes On Day (which can also be celebrated by attempting to send messages via Morse code by tapping on your brakes). Of course, with only 2.5 days of commute left […] &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 *