“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 22 posts previously published on May 23rd

  • 2025
    • Felix @ 11 Today the Best Dog Ever* turns eleven or as Lorne Green would calculate “that’s 80 for you and me” — depending on your calculation. I always went with human years * 7 plus 3. I math digress. Felix is older but not old. I adopted him in April 2016 from the Humane Society in Payson, […]
    • Hope is an Onion Based on true gardening events! Almost a year ago Hope was planted in the garden. Hope came in a bag of maybe 20 or 30 more equal sized seeds of Hopes. I imagine somewhere the place where Hope is growin in megasized amounts, truck loads, train loads, one after another, from somewhere not far but […]
  • 2021
    • The Sea Level Photo Rises Again An email came in bearing the simple subject line “photo permission”. This often ends up here as a blog post, and this one take me full circle back to 2006. Marty, start up the DeLorean, we are riding the blog machine back in time! The writer of the email states that they are putting out […]
  • 2019
    • At the Arts Gala: Making Stories with Sound (Wow, is there ever a backlog of overdue blog posts. I’m giving myself demerits for tardiness). Maybe my favorite media thing to teach is audio editing, because it’s typically fat from most people’s experiences. With an offer from Cori to do a session at the Arts Gala event for the Prairies South School Division, I […]
  • 2017
    • From The Seventh Grade Creative Vault In March the Networked Narratives virtual bus stopped at the Young Writers Project and I was more than blown away by the depth of writing of the 10th grade students we talked to. I reached back into my box of memories (bless you Mom, you saved almost everything I brought home from school) and found […]
  • 2016
    • Puny Data: Popularity Metrics Added to Daily Blank Sites Enough of the old fart nostalgia and facebook whinging posts, it’s time to get back to some coding. I wanted to flex some WordPress muscles, and thought I was biting off on a small, one night bit of updates to the Daily Blank WordPress Theme (a generic thing that runs the DS106 Daily Create site). […]
  • 2015
    • Shoes on a Tree at Sunset There are photos that yell at you from the roadside, we just do not hear them, tuned in to the radio or just too much to our own piddly lives. This one yelled out to me from US 395 in Eastern California; I was in the middle (almost literally by mileage) of the return trip […]
  • 2014
    • Scanning My Next Frontiers creative commons licensed ( BY ) flickr photo shared by kennymatic Here it is, what seems like what I have done every other week since March, packing the suitcase and setting an early wakeup so I can drive down to the airport. There are some really good thing I can see way off carrying me […]
    • Every Google Hangout is a TechnoVirginity Reboot https://www.youtube.com/watch?v=qHDy_b33cCQ Google Hangouts are an amazingly useful experience of online collaboration; if you told me 7 years ago this capability would be free I would have shushed you away. In the three or so I have done this week (one one that starts in 25 minutes), it does feel like the first time every visit, […]
  • 2013
    • That Wiggly Old Monk A Wiggle Spectroscopy ds106 assignment: Take two photos of the same subject from slightly different angles. Merge the two photos into a single looped, animated gif to create a wiggle stereoscopic image that simulates 3-D. A very good tutorial explaining the full process can be found on Martin Sutherland’s website. I did not even intend […]
    • The Things We Talk Ourselves Out Of cc licensed ( BY ) flickr photo shared by Felipe Skroski So long as a man imagines that he cannot do this or that, so long is he determined not to do it: and consequently, so long it is impossible to him that he should do it. — Spinoza Lately I’ve been tuned into how […]
    • Less Trouble When You Do Not Eat Alone (Messing with the MacGuffin) Playing more with the #ds106zone for the Twilight Zone episode of the Invaders. All of the screaming, banging, and destruction might is averted if Alien Lady checks her iPhone. Instead of getting zapped by laser guns and whopping spaceships with her axe, instead, Alien Lady and Jim Groom laugh at old stories over the best […]
  • 2009
    • A Modest Twitter Idea for Hashtags cc licensed flickr photo shared by ciaranj75 Sometimes it is more obvious what a twitter hashtag means (if the term is new- see the Ultimate Guide to Twitter Hashtags). Regular CDB readers (hi Mom!) might recall I’ve snarked a bit on twitter hashtags which truly was meant in jest. As is everything I right here, […]
    • Spring Feed Cleaning cc licensed flickr photo shared by cogdogblog Every few months, I get the urge to wipe out the backlog on unread RSS feed items. It is just a few Shift-A’s to get a nice clean slate (it hardly takes anytime to do the edublogger feeds since no one blogs anymore 😉 Go ahead, I dare […]
  • 2008
    • No Reason to Be Plain White Background iGoogle Google’s genesis was in well executed back-end server stuff (those precious search algorithms, they KO-d Altravista, Yahoo, Lycos) and at the time of ad-cluttered busy sites, it’s stark simplicity design of plain text, one colorful logo, on a white background was the antidote to the web status quo. But hey, its 2008, and there is […]
  • 2007
    • <blush>slideshare featured</blush> My Faculty Academy presentation “Being There: nets, tweets, avatars” is getting some eyeballs where it is sitting in slideshare. Just got a note that it is now listed on their featured presentations page and has me thinking I should comb back through and make sure I’ve not done something typical like mispelling my own name […]
  • 2006
    • I Have a Bone To Pick With Flickr I have oft professed my deep love for flickr. I have been a user of it since March 2004, when it had that hokey black flash interface. I have uploaded almost 1400 photos, not nearly prolific as some. But recently I was slapped by one of their policies regarding a new way I was using […]
    • RSS Blabbering RSS was the cutting bleeding edge in 2002, or at least it seemed to me. Few people knew what it was if you muttered it (well that has not changed), but very little of the things we are excited about now would have have their oomph without the underlying, humble glue, of RSS, ugly to […]
    • Hardware Serenity Prayer I don’t know the words, but am ready to make them up. Apple, grant me the serenity to accept the firmware I cannot change; courage to update the things I can; and wisdom to know the difference. Maybe not. This morning, I installed the latest firmware update for my MacBookPro, and worked through the morning. […]
  • 2005
    • Airport Mysteries a.k.a “What to do in the boarding area when there is no free wireless…” As a public service, I am here to expose some of the great puzzles of the species humanus nomadus moderni. (1) Coffee. Is Starbucks truly as superior to say the brew bubbling at Cinnabun, Nathans, or Burger King? When I say […]
    • Cheeburger Between Paradises flickr foto Semi-Serious Burgeravailable on my flickr This is art- a 10oz burger from “Cheeburger Cheeburger” on Sanibel Island- only half the size you need to put away to get your photo on the wall (I was in no mood to go such SuperSized) I’ve got a few hours in between coming and going. But […]
  • 2004
    • Here It Is! A New Feed2JS (and source code) As hinted, I have just posted an updated version of the RSS to JavaScript service/code we created in April 2003. The new one is now called Feed2JS and features a number of enhancements- primarily an adoption of the open-source Magpie RSS parser, to replace the unsupported OnysRSS parser previously used. Magpie allows us to provide […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 22 posts previously published on May 23rd

  • 2025
    • Felix @ 11 Today the Best Dog Ever* turns eleven or as Lorne Green would calculate “that’s 80 for you and me” — depending on your calculation. I always went with human years * 7 plus 3. I math digress. Felix is older but not old. I adopted him in April 2016 from the Humane Society in Payson, […] &amp#x27A1;
    • Hope is an Onion Based on true gardening events! Almost a year ago Hope was planted in the garden. Hope came in a bag of maybe 20 or 30 more equal sized seeds of Hopes. I imagine somewhere the place where Hope is growin in megasized amounts, truck loads, train loads, one after another, from somewhere not far but […] &amp#x27A1;
  • 2021
    • The Sea Level Photo Rises Again An email came in bearing the simple subject line “photo permission”. This often ends up here as a blog post, and this one take me full circle back to 2006. Marty, start up the DeLorean, we are riding the blog machine back in time! The writer of the email states that they are putting out […] &amp#x27A1;
  • 2019
    • At the Arts Gala: Making Stories with Sound (Wow, is there ever a backlog of overdue blog posts. I’m giving myself demerits for tardiness). Maybe my favorite media thing to teach is audio editing, because it’s typically fat from most people’s experiences. With an offer from Cori to do a session at the Arts Gala event for the Prairies South School Division, I […] &amp#x27A1;
  • 2017
    • From The Seventh Grade Creative Vault In March the Networked Narratives virtual bus stopped at the Young Writers Project and I was more than blown away by the depth of writing of the 10th grade students we talked to. I reached back into my box of memories (bless you Mom, you saved almost everything I brought home from school) and found […] &amp#x27A1;
  • 2016
    • Puny Data: Popularity Metrics Added to Daily Blank Sites Enough of the old fart nostalgia and facebook whinging posts, it’s time to get back to some coding. I wanted to flex some WordPress muscles, and thought I was biting off on a small, one night bit of updates to the Daily Blank WordPress Theme (a generic thing that runs the DS106 Daily Create site). […] &amp#x27A1;
  • 2015
    • Shoes on a Tree at Sunset There are photos that yell at you from the roadside, we just do not hear them, tuned in to the radio or just too much to our own piddly lives. This one yelled out to me from US 395 in Eastern California; I was in the middle (almost literally by mileage) of the return trip […] &amp#x27A1;
  • 2014
    • Scanning My Next Frontiers creative commons licensed ( BY ) flickr photo shared by kennymatic Here it is, what seems like what I have done every other week since March, packing the suitcase and setting an early wakeup so I can drive down to the airport. There are some really good thing I can see way off carrying me […] &amp#x27A1;
    • Every Google Hangout is a TechnoVirginity Reboot https://www.youtube.com/watch?v=qHDy_b33cCQ Google Hangouts are an amazingly useful experience of online collaboration; if you told me 7 years ago this capability would be free I would have shushed you away. In the three or so I have done this week (one one that starts in 25 minutes), it does feel like the first time every visit, […] &amp#x27A1;
  • 2013
    • That Wiggly Old Monk A Wiggle Spectroscopy ds106 assignment: Take two photos of the same subject from slightly different angles. Merge the two photos into a single looped, animated gif to create a wiggle stereoscopic image that simulates 3-D. A very good tutorial explaining the full process can be found on Martin Sutherland’s website. I did not even intend […] &amp#x27A1;
    • The Things We Talk Ourselves Out Of cc licensed ( BY ) flickr photo shared by Felipe Skroski So long as a man imagines that he cannot do this or that, so long is he determined not to do it: and consequently, so long it is impossible to him that he should do it. — Spinoza Lately I’ve been tuned into how […] &amp#x27A1;
    • Less Trouble When You Do Not Eat Alone (Messing with the MacGuffin) Playing more with the #ds106zone for the Twilight Zone episode of the Invaders. All of the screaming, banging, and destruction might is averted if Alien Lady checks her iPhone. Instead of getting zapped by laser guns and whopping spaceships with her axe, instead, Alien Lady and Jim Groom laugh at old stories over the best […] &amp#x27A1;
  • 2009
    • A Modest Twitter Idea for Hashtags cc licensed flickr photo shared by ciaranj75 Sometimes it is more obvious what a twitter hashtag means (if the term is new- see the Ultimate Guide to Twitter Hashtags). Regular CDB readers (hi Mom!) might recall I’ve snarked a bit on twitter hashtags which truly was meant in jest. As is everything I right here, […] &amp#x27A1;
    • Spring Feed Cleaning cc licensed flickr photo shared by cogdogblog Every few months, I get the urge to wipe out the backlog on unread RSS feed items. It is just a few Shift-A’s to get a nice clean slate (it hardly takes anytime to do the edublogger feeds since no one blogs anymore 😉 Go ahead, I dare […] &amp#x27A1;
  • 2008
    • No Reason to Be Plain White Background iGoogle Google’s genesis was in well executed back-end server stuff (those precious search algorithms, they KO-d Altravista, Yahoo, Lycos) and at the time of ad-cluttered busy sites, it’s stark simplicity design of plain text, one colorful logo, on a white background was the antidote to the web status quo. But hey, its 2008, and there is […] &amp#x27A1;
  • 2007
    • <blush>slideshare featured</blush> My Faculty Academy presentation “Being There: nets, tweets, avatars” is getting some eyeballs where it is sitting in slideshare. Just got a note that it is now listed on their featured presentations page and has me thinking I should comb back through and make sure I’ve not done something typical like mispelling my own name […] &amp#x27A1;
  • 2006
    • I Have a Bone To Pick With Flickr I have oft professed my deep love for flickr. I have been a user of it since March 2004, when it had that hokey black flash interface. I have uploaded almost 1400 photos, not nearly prolific as some. But recently I was slapped by one of their policies regarding a new way I was using […] &amp#x27A1;
    • RSS Blabbering RSS was the cutting bleeding edge in 2002, or at least it seemed to me. Few people knew what it was if you muttered it (well that has not changed), but very little of the things we are excited about now would have have their oomph without the underlying, humble glue, of RSS, ugly to […] &amp#x27A1;
    • Hardware Serenity Prayer I don’t know the words, but am ready to make them up. Apple, grant me the serenity to accept the firmware I cannot change; courage to update the things I can; and wisdom to know the difference. Maybe not. This morning, I installed the latest firmware update for my MacBookPro, and worked through the morning. […] &amp#x27A1;
  • 2005
    • Airport Mysteries a.k.a “What to do in the boarding area when there is no free wireless…” As a public service, I am here to expose some of the great puzzles of the species humanus nomadus moderni. (1) Coffee. Is Starbucks truly as superior to say the brew bubbling at Cinnabun, Nathans, or Burger King? When I say […] &amp#x27A1;
    • Cheeburger Between Paradises flickr foto Semi-Serious Burgeravailable on my flickr This is art- a 10oz burger from “Cheeburger Cheeburger” on Sanibel Island- only half the size you need to put away to get your photo on the wall (I was in no mood to go such SuperSized) I’ve got a few hours in between coming and going. But […] &amp#x27A1;
  • 2004
    • Here It Is! A New Feed2JS (and source code) As hinted, I have just posted an updated version of the RSS to JavaScript service/code we created in April 2003. The new one is now called Feed2JS and features a number of enhancements- primarily an adoption of the open-source Magpie RSS parser, to replace the unsupported OnysRSS parser previously used. Magpie allows us to provide […] &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 *