“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 16 posts previously published on December 1st

  • 2024
  • 2021
    • More Like H5P Transclusion than Syndication (plus dreams of versioning) While my stint for BCcampus operating the H5P Kitchen has passed, I am still very interested in H5P as an open education platform. I did a short open discussion (aka free form) this week for Simon Fraser University, and spied a new H5P project over at MERLOT and was interested to see an H5P Studio […]
  • 2014
    • Partial Intro to The Daily Blank That’s meant to be blank like _________ like make your own site that operates like the DS106 Daily Create. I’ve been mumbling about it for like months, and sat down to start tinkering about a week ago. I think most of the parts are in place, I’d say it is several Greek letters prior to […]
    • DS106Radio Wants YOU! (to adopt a block in the programming schedule) DS106 radio is coming up on its 4th birthday in February. I’m skipping all of the what it is stuff, besides to say that it is free form internet radio. We give away all you need to do a live broadcast. But it needs a fully loaded set of audio to play ongoing. The programmed […]
  • 2013
    • Completing Tom Woodward Tom keeps pumping out his creations of the Illustrating Odd Autocompletes assignment he spun out this gem featuring my pals Gardner Campbell and MC Hammer (!) cc licensed ( BY SA ) flickr photo shared by Tom Woodward and so… turn about is fair play. I went to The Google to find what Tom Woodward […]
  • 2011
    • 50 Ways Returns Down Under It was an honor, privilege, and a hoot to be invited to come to Melbourne to do a 50+ Web 2.0 Ways to Tell a Story presentation for the PLP Network project here. This all came about because in October, during my road trip, I paid a visit to the home of Sheryl Nussbaum-Beach in […]
    • Keep the Lease, ok? (Cropped Sign Story) cc licensed ( BY ) flickr photo shared by cogdogblog No one wanted to acknowledge that the Earbird family might stop running the Rook that had been a fixture on the streets of Fort Perry for three generations. Where would people go to replace their worn bishops or chipped pawns, or get the new copy […]
  • 2010
    • The Past Golden Age of Multimedia Development I’m tired and ought to be resting a throat that is rumbling soreness, but a hearth of nostalgia is welling up reading Mike Caulfied’s memories of his experience if Big Learning Objects Gone South– my title, his is The Coming Golden Age of Open Educational Simulations. Mike talks about his time of golden glory years […]
  • 2009
    • I’ve Got Something to Comment(ski) So Dean Share(ski) is tired of tired phrases and acronyms Dude! I submitted the perfect zen like comment for him, twice, and his blog ate it twice (the second time wising up and composing it in a text editor), so here it is sent directly from The ‘Berry LOL, peeps, that’s a great blog you […]
  • 2006
    • Ghost in the Trackback Machine This is weird. About a day or 2 ago, I started getting a stream of Trackback notices by email. At first, I feared it was something Beth warned about after my use of a spam enticing word. But no, this was a string of trackbacks triggered from my own posts, going back to a year […]
    • Google Reader- I’m in Love Someone should be worried. With just a few sniffs, I might be getting hooked on Google Reader for my RSS habits. I’ve not really like using web-based RSS readers for scanning, as checking each site’s news required a wait for a web transcation, whereas a desktop reader grabs allt he stuff quickly, or in the […]
  • 2004
    • The Open Source Party is in Town And… Yawn… I almost forgot, Today through Friday is the Open Source Summit right in my own backyard in Scottsdale, and what a list of heavy hitters are on the docket. It kind of feels like peeking through the fence at an exclusive country club, marveling at all the shiny, pretty people. The Open Source Summit […]
    • The Wiki Bites Back Another open system bites the dust. Well, maybe I am caving in a bit to the wiki url spammers but as it is the sites we set up are completely useless wikis as they pile up with pages of links to URLs with names so horrific I get a slimy feeling just reading them. Thanks […]
    • Some ePortfolios Blossoming It’s been a while since I browsed some of the new electronic portfolios that have been growing this semester on our Maricopa eP site. But I am liking what is starting to pop up… Dale Doubleday, our Ocotillo ePortfolio Action Group co-chair, has had her ART289 (Computer Illustration) students post to their ePs examples of […]
    • That Googly Feeling Over the waters at Auricle, Derek again provocatively asks who will drive the next wave of learning technology trends: In my recent Auricle article A filling station model of e-learning? I suggested that integrated mobile multimedia players and communication devices could be the ‘googly’ which catches advocates of centralized e-learning solutions unawares. So are the […]
  • 2003
    • Cool Tools from UBC An artlcle and links from University of British Columbia’s e-Strategy newsletter (no RSS!) features some interesating tools developed at the UBC Arts ISIT. <tiphat>Tip of the blg hat to my colleague Michelle, who has one of the funkier blog names for an educator 😉 </tiphat> You gotta like the fun photos of the tool creators […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 16 posts previously published on December 1st

  • 2024
  • 2021
  • 2014
    • Partial Intro to The Daily Blank That’s meant to be blank like _________ like make your own site that operates like the DS106 Daily Create. I’ve been mumbling about it for like months, and sat down to start tinkering about a week ago. I think most of the parts are in place, I’d say it is several Greek letters prior to […] &amp#x27A1;
    • DS106Radio Wants YOU! (to adopt a block in the programming schedule) DS106 radio is coming up on its 4th birthday in February. I’m skipping all of the what it is stuff, besides to say that it is free form internet radio. We give away all you need to do a live broadcast. But it needs a fully loaded set of audio to play ongoing. The programmed […] &amp#x27A1;
  • 2013
    • Completing Tom Woodward Tom keeps pumping out his creations of the Illustrating Odd Autocompletes assignment he spun out this gem featuring my pals Gardner Campbell and MC Hammer (!) cc licensed ( BY SA ) flickr photo shared by Tom Woodward and so… turn about is fair play. I went to The Google to find what Tom Woodward […] &amp#x27A1;
  • 2011
    • 50 Ways Returns Down Under It was an honor, privilege, and a hoot to be invited to come to Melbourne to do a 50+ Web 2.0 Ways to Tell a Story presentation for the PLP Network project here. This all came about because in October, during my road trip, I paid a visit to the home of Sheryl Nussbaum-Beach in […] &amp#x27A1;
    • Keep the Lease, ok? (Cropped Sign Story) cc licensed ( BY ) flickr photo shared by cogdogblog No one wanted to acknowledge that the Earbird family might stop running the Rook that had been a fixture on the streets of Fort Perry for three generations. Where would people go to replace their worn bishops or chipped pawns, or get the new copy […] &amp#x27A1;
  • 2010
    • The Past Golden Age of Multimedia Development I’m tired and ought to be resting a throat that is rumbling soreness, but a hearth of nostalgia is welling up reading Mike Caulfied’s memories of his experience if Big Learning Objects Gone South– my title, his is The Coming Golden Age of Open Educational Simulations. Mike talks about his time of golden glory years […] &amp#x27A1;
  • 2009
    • I’ve Got Something to Comment(ski) So Dean Share(ski) is tired of tired phrases and acronyms Dude! I submitted the perfect zen like comment for him, twice, and his blog ate it twice (the second time wising up and composing it in a text editor), so here it is sent directly from The ‘Berry LOL, peeps, that’s a great blog you […] &amp#x27A1;
  • 2006
    • Ghost in the Trackback Machine This is weird. About a day or 2 ago, I started getting a stream of Trackback notices by email. At first, I feared it was something Beth warned about after my use of a spam enticing word. But no, this was a string of trackbacks triggered from my own posts, going back to a year […] &amp#x27A1;
    • Google Reader- I’m in Love Someone should be worried. With just a few sniffs, I might be getting hooked on Google Reader for my RSS habits. I’ve not really like using web-based RSS readers for scanning, as checking each site’s news required a wait for a web transcation, whereas a desktop reader grabs allt he stuff quickly, or in the […] &amp#x27A1;
  • 2004
    • The Open Source Party is in Town And… Yawn… I almost forgot, Today through Friday is the Open Source Summit right in my own backyard in Scottsdale, and what a list of heavy hitters are on the docket. It kind of feels like peeking through the fence at an exclusive country club, marveling at all the shiny, pretty people. The Open Source Summit […] &amp#x27A1;
    • The Wiki Bites Back Another open system bites the dust. Well, maybe I am caving in a bit to the wiki url spammers but as it is the sites we set up are completely useless wikis as they pile up with pages of links to URLs with names so horrific I get a slimy feeling just reading them. Thanks […] &amp#x27A1;
    • Some ePortfolios Blossoming It’s been a while since I browsed some of the new electronic portfolios that have been growing this semester on our Maricopa eP site. But I am liking what is starting to pop up… Dale Doubleday, our Ocotillo ePortfolio Action Group co-chair, has had her ART289 (Computer Illustration) students post to their ePs examples of […] &amp#x27A1;
    • That Googly Feeling Over the waters at Auricle, Derek again provocatively asks who will drive the next wave of learning technology trends: In my recent Auricle article A filling station model of e-learning? I suggested that integrated mobile multimedia players and communication devices could be the ‘googly’ which catches advocates of centralized e-learning solutions unawares. So are the […] &amp#x27A1;
  • 2003
    • Cool Tools from UBC An artlcle and links from University of British Columbia’s e-Strategy newsletter (no RSS!) features some interesating tools developed at the UBC Arts ISIT. <tiphat>Tip of the blg hat to my colleague Michelle, who has one of the funkier blog names for an educator 😉 </tiphat> You gotta like the fun photos of the tool creators […] &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 *