“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 24 posts previously published on February 7th

  • 2025
    • Federatin’ Down at the WordPress ActivityPub While many people are slamming WordPress because of its baby in charge, I’m focussed still on the open source software I run on my own sites that are not impacted by the tantrums. Lately I have been putting to work on several sites, the WordPress ActivityPub plugin that makes your site publish to and suck […]
  • 2019
    • Who is Belle North? Yet again a random click leads down an internet rabbit tunnel. Or a dead end. I meant to do another blog post, and was rummaging through the public domain images the Library of Congress Free to Use Extension puts in my new Chrome tabs. The expression on her face, plus the title of Belle North, […]
    • Between the 5th and the 8th (and beyond) This week of February was always handy for remembering to send cards or do phone calls to my parents. I knew the 5th and the 8th marked their anniversary and Mom’s birthday (often I’d get them switched but close enough is always good enough by parents like mine). Yes, the 5th came, and as my […]
  • 2017
    • February 8’s Wondermug Oh that calendar. After the evening dog walk (where solitude yields thoughts that solve most of the world’s problems, though solutions vanish in passage through the front door) I return maybe to tinker in some code or blog something… and a pop up reminder. Tomorrow is February 8. With arithmetic, on February 8, if Mom […]
  • 2016
    • Shining Up The Old Bookmarklet Tool Slipped into the recent post on social bookmarking was a new little browser bookmarklet maker tool I made so someone can create a tool to bookmark links to any subreddit. If it looks familiar, it’s because it’s the same theme I use for the flickr cc attribution helper, which is just another bookmarklet tool. It’s […]
    • Fallen Off the #Western106 Radio Horse More grand plans upended- after dialing back my #Western106 plans as a “trail adjustment”, I was hoping to keep plugging along with the High Noon Radio show on DS106 Radio. Travel, life, work interceded, and I dropped doing the show this week (also guest Bryan Alexander was down at the big EDUCAUSE EE-EL-EYE county fait […]
  • 2015
    • Dinosaur Eggs and Web Paleontology In the summer of 1986 as an undergraduate student in Geology, I got an internship at the Lamont-Doherty Geological Observatory. At the time I was on track to likely continue the track on to graduate school, but had not really zeroed in on an interest, but on that seemed to have my interest was paleontology. […]
    • Sky Rider This bot of metal sculpture sits atop a bicycle shelter on the campus of Thompson Rivers University, in Kamloops, British Columbia. I’ve noticed in numerous times since I arrived here three months ago. It has a stylish shape. On this clear day, in mid afternoon, the light was super contrasty strong. I thought that it […]
  • 2014
    • Would Have Been Loving at 64 It was always easy to remember/calculate my parent’s anniversary since they were hitched in the nice even year of 1950. That means last Wednesday would have been their 64th anniversary. I rummage through the Box Of Unorganized Photos to assemble a little animated gif memory show. It starts with that wedding photo; I like to […]
  • 2013
    • Wolf Chasing Free form wandering trying to keep with the Wolves baseline, it’s so easy to fall off the train! I listened to the song omce cause its new to me. This was with some anonymous acoustic that belongs to my girlfriend’s daughter. I kept doing the suspended 4th on the D (one my favorite chord variations) […]
  • 2012
    • Comic Me Down Under cc licensed ( BY ) flickr photo shared by cogdogblog A quick one for a new #ds106 assignment created by one of my students: Comic Book Effect Take a picture and experiment with the “Halftone Effect” in some photo editing software to create a comic book effect. There are lots of tutorials on Youtube and […]
    • Those Illiudium Q-36 Space Modulators are DANGEROUS Inspired by Ben Rimes post today I wanted to take a spin at the ds106 Warning Design assignment: Lots of things today have warning labels. Create warning labels for things that exist only in movies or your imagination I felt that as a weapon of planetary destruction, the Illudium Q-36 Space Modulator wielded by Marvin […]
    • We Need More Reality Shows Actually we don’t. We need more fake reality shows. San Francisco: Flip This Mayor There must be something in the water at Oakland’s City Hall which makes people stupid. San Francisco’s unemployment rate stands at 7.6 percent, below the national average and the third-lowest unemployment rate in California, as city officials say the number of […]
  • 2011
    • Great Teaching Moments in Stereo… Anyone? Anyone? In an upcoming presentation where I hope to make a case to a group of teachers that they are more innovative then they give themselves credit for, I planned to show a well worn clip of the teaching style I am fairly sure they do not employ What I loved in looking this up is […]
  • 2009
    • Treat Me Like a Moron, Please Red Alert! DEFCON 2! NOT by cogdogblog posted 7 Feb ’09, 9.56am MST PST on flickr It brightens my day when magazines (who are like the dinosaurs at 30 minutes before the end of the Cretaceous period admiring themselves in the mirror) assume I am a moron. Not. I’ve been getting this "urgent" mailing from […]
    • Tricking Out CoolIris as a Presentation Tool What I used for today’s presentation was one of those lucky cool finds that can lift my from a web 2.0 sized rut. Today I was invited to give an opening keynote back at some old stomping grounds; Scottsdale Community College was hosting their first “TechTools” day, and I got tagged to kick it off. […]
  • 2006
    • Packing the Doggie Bags flickr foto Pass the Sulfur, Pleaseavailable on my flickr
    • Podcasting a Meeting About Podcasting Last Friday was the February meeting of our Ocotillo Online Learning Group — the theme for this meeting (selected back in May 2005) was digital audio and podcasting. While the meeting notes are not yet updated, I’ve done a quick turn around on the audio recorded and posted them to the meeting notes page. Yes, […]
  • 2005
    • Location: Why “Medium” is Extra Small NBC’s “hit show” Medium is about a psychic who is helping solve cases in what is purported to be Phoenix, Arizona. I believe it is the “Phoenix, near Burbank”. It looks like they are not wasting any money on location shots, because I have yet to see a cactus, a desert rabbit, a creosote bush, […]
    • Durl and Blogpulse– More Link Digging Tools Just a few clicks after posting about digging out interesting link information via del.icio.us and furl, a comment there from Carmen highlighted some more tools to my toolchest. It had been some time since I had seen Durl, which accesses data from del.icio.us and eeks out some backlinks trends, a mini screen shots. In addition, […]
    • A Scary Mouse Click Whew! Today was the day we triggered announcement emails on the final reviews of our internal grants program, MCLI Learning Grants. This is a completely homegrown, online system where all applications, reviews, management, and year end reports are done online. The task today was to run a script that rummages through the database, pulls the […]
    • How To Really Get Help A week silently passed on my simple IT help desk request (read the sad story). There was now a consequence as the main page for our site was hijacked via the vulnerability I reported (see the blurb on this, we were definitely not alone). So since the requests were not answered, I resorted to the […]
  • 2004
    • Waiting on the MLX… I’ve been holding back the itch to gripe about how hard it still is to get the people in our system to squeeze a few minutes out of their day to share ideas and materials that already exist in the Maricopa Learning eXchange (MLX) (past gripes 1, 2, 3 … There have been a few […]
    • Pachyderm Dialogue Day Follow-up We have compiled more of the products / ideas from the 61 faculty and staff who participated in the January 30 Pachyderm: Building Meaningful Content with Learning Objects Dialogue Day . This was hands-down one of the most high energy and active ones of the sessions we have run in a long time. Unlike many […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 24 posts previously published on February 7th

  • 2025
    • Federatin’ Down at the WordPress ActivityPub While many people are slamming WordPress because of its baby in charge, I’m focussed still on the open source software I run on my own sites that are not impacted by the tantrums. Lately I have been putting to work on several sites, the WordPress ActivityPub plugin that makes your site publish to and suck […] &amp#x27A1;
  • 2019
    • Who is Belle North? Yet again a random click leads down an internet rabbit tunnel. Or a dead end. I meant to do another blog post, and was rummaging through the public domain images the Library of Congress Free to Use Extension puts in my new Chrome tabs. The expression on her face, plus the title of Belle North, […] &amp#x27A1;
    • Between the 5th and the 8th (and beyond) This week of February was always handy for remembering to send cards or do phone calls to my parents. I knew the 5th and the 8th marked their anniversary and Mom’s birthday (often I’d get them switched but close enough is always good enough by parents like mine). Yes, the 5th came, and as my […] &amp#x27A1;
  • 2017
    • February 8’s Wondermug Oh that calendar. After the evening dog walk (where solitude yields thoughts that solve most of the world’s problems, though solutions vanish in passage through the front door) I return maybe to tinker in some code or blog something… and a pop up reminder. Tomorrow is February 8. With arithmetic, on February 8, if Mom […] &amp#x27A1;
  • 2016
    • Shining Up The Old Bookmarklet Tool Slipped into the recent post on social bookmarking was a new little browser bookmarklet maker tool I made so someone can create a tool to bookmark links to any subreddit. If it looks familiar, it’s because it’s the same theme I use for the flickr cc attribution helper, which is just another bookmarklet tool. It’s […] &amp#x27A1;
    • Fallen Off the #Western106 Radio Horse More grand plans upended- after dialing back my #Western106 plans as a “trail adjustment”, I was hoping to keep plugging along with the High Noon Radio show on DS106 Radio. Travel, life, work interceded, and I dropped doing the show this week (also guest Bryan Alexander was down at the big EDUCAUSE EE-EL-EYE county fait […] &amp#x27A1;
  • 2015
    • Dinosaur Eggs and Web Paleontology In the summer of 1986 as an undergraduate student in Geology, I got an internship at the Lamont-Doherty Geological Observatory. At the time I was on track to likely continue the track on to graduate school, but had not really zeroed in on an interest, but on that seemed to have my interest was paleontology. […] &amp#x27A1;
    • Sky Rider This bot of metal sculpture sits atop a bicycle shelter on the campus of Thompson Rivers University, in Kamloops, British Columbia. I’ve noticed in numerous times since I arrived here three months ago. It has a stylish shape. On this clear day, in mid afternoon, the light was super contrasty strong. I thought that it […] &amp#x27A1;
  • 2014
    • Would Have Been Loving at 64 It was always easy to remember/calculate my parent’s anniversary since they were hitched in the nice even year of 1950. That means last Wednesday would have been their 64th anniversary. I rummage through the Box Of Unorganized Photos to assemble a little animated gif memory show. It starts with that wedding photo; I like to […] &amp#x27A1;
  • 2013
    • Wolf Chasing Free form wandering trying to keep with the Wolves baseline, it’s so easy to fall off the train! I listened to the song omce cause its new to me. This was with some anonymous acoustic that belongs to my girlfriend’s daughter. I kept doing the suspended 4th on the D (one my favorite chord variations) […] &amp#x27A1;
  • 2012
    • Comic Me Down Under cc licensed ( BY ) flickr photo shared by cogdogblog A quick one for a new #ds106 assignment created by one of my students: Comic Book Effect Take a picture and experiment with the “Halftone Effect” in some photo editing software to create a comic book effect. There are lots of tutorials on Youtube and […] &amp#x27A1;
    • Those Illiudium Q-36 Space Modulators are DANGEROUS Inspired by Ben Rimes post today I wanted to take a spin at the ds106 Warning Design assignment: Lots of things today have warning labels. Create warning labels for things that exist only in movies or your imagination I felt that as a weapon of planetary destruction, the Illudium Q-36 Space Modulator wielded by Marvin […] &amp#x27A1;
    • We Need More Reality Shows Actually we don’t. We need more fake reality shows. San Francisco: Flip This Mayor There must be something in the water at Oakland’s City Hall which makes people stupid. San Francisco’s unemployment rate stands at 7.6 percent, below the national average and the third-lowest unemployment rate in California, as city officials say the number of […] &amp#x27A1;
  • 2011
    • Great Teaching Moments in Stereo… Anyone? Anyone? In an upcoming presentation where I hope to make a case to a group of teachers that they are more innovative then they give themselves credit for, I planned to show a well worn clip of the teaching style I am fairly sure they do not employ What I loved in looking this up is […] &amp#x27A1;
  • 2009
    • Treat Me Like a Moron, Please Red Alert! DEFCON 2! NOT by cogdogblog posted 7 Feb ’09, 9.56am MST PST on flickr It brightens my day when magazines (who are like the dinosaurs at 30 minutes before the end of the Cretaceous period admiring themselves in the mirror) assume I am a moron. Not. I’ve been getting this "urgent" mailing from […] &amp#x27A1;
    • Tricking Out CoolIris as a Presentation Tool What I used for today’s presentation was one of those lucky cool finds that can lift my from a web 2.0 sized rut. Today I was invited to give an opening keynote back at some old stomping grounds; Scottsdale Community College was hosting their first “TechTools” day, and I got tagged to kick it off. […] &amp#x27A1;
  • 2006
    • Packing the Doggie Bags flickr foto Pass the Sulfur, Pleaseavailable on my flickr &amp#x27A1;
    • Podcasting a Meeting About Podcasting Last Friday was the February meeting of our Ocotillo Online Learning Group — the theme for this meeting (selected back in May 2005) was digital audio and podcasting. While the meeting notes are not yet updated, I’ve done a quick turn around on the audio recorded and posted them to the meeting notes page. Yes, […] &amp#x27A1;
  • 2005
    • Location: Why “Medium” is Extra Small NBC’s “hit show” Medium is about a psychic who is helping solve cases in what is purported to be Phoenix, Arizona. I believe it is the “Phoenix, near Burbank”. It looks like they are not wasting any money on location shots, because I have yet to see a cactus, a desert rabbit, a creosote bush, […] &amp#x27A1;
    • Durl and Blogpulse– More Link Digging Tools Just a few clicks after posting about digging out interesting link information via del.icio.us and furl, a comment there from Carmen highlighted some more tools to my toolchest. It had been some time since I had seen Durl, which accesses data from del.icio.us and eeks out some backlinks trends, a mini screen shots. In addition, […] &amp#x27A1;
    • A Scary Mouse Click Whew! Today was the day we triggered announcement emails on the final reviews of our internal grants program, MCLI Learning Grants. This is a completely homegrown, online system where all applications, reviews, management, and year end reports are done online. The task today was to run a script that rummages through the database, pulls the […] &amp#x27A1;
    • How To Really Get Help A week silently passed on my simple IT help desk request (read the sad story). There was now a consequence as the main page for our site was hijacked via the vulnerability I reported (see the blurb on this, we were definitely not alone). So since the requests were not answered, I resorted to the […] &amp#x27A1;
  • 2004
    • Waiting on the MLX… I’ve been holding back the itch to gripe about how hard it still is to get the people in our system to squeeze a few minutes out of their day to share ideas and materials that already exist in the Maricopa Learning eXchange (MLX) (past gripes 1, 2, 3 … There have been a few […] &amp#x27A1;
    • Pachyderm Dialogue Day Follow-up We have compiled more of the products / ideas from the 61 faculty and staff who participated in the January 30 Pachyderm: Building Meaningful Content with Learning Objects Dialogue Day . This was hands-down one of the most high energy and active ones of the sessions we have run in a long time. Unlike many […] &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 *