“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 17 posts previously published on December 14th

  • 2018
    • Oh The Irony of Driving This Train Sometimes your own blogging can turn around and nip at ya. One of my favorite tags of posts has been moocmocking. Now I’m riding the train, gimme an “M”… That’s right, now my current project is helping eCampus Ontario run a new round of the Ontario Extend project, starting January 2019… as a mOOC (medium […]
  • 2013
    • If You Are Authentic, You Don’t Need a Label This is not my photo, but I have driven past a Mexican restaurant in Payson, AZ that has the same label Does this mean other Mexican restaurants without an “authentic” label are inauthentic? Or am I confused with the Japanese style Mexican food? It just seems funny to me, almost as if the reason to […]
    • The GIFaChrome Experience I have no idea how to even blog what culminated today for headless ds106. Maybe it was because what was in the boxes. Trying to write this up sells it short. But one ought to try. This is in lieu of a more comprehensive it-might-be-blogged-one-day-before-the-sun-burns-out post for what has happened the last 15 weeks since […]
  • 2011
    • Clinging To Scarcity Tactics in A World of Information Abundance cc licensed ( BY NC ND ) flickr photo shared by Florin Draghici That title may mislead you that I know something. It just sounds good. But as much as we seem to be in a world of digital information abundance, there is plenty of strategies in publishing of creating scarcity that does not truly […]
    • Deconstructing Animated GIFS Via a comment on a recent posting of three photo animated gifs, I found GIF Exploder which might be a handy ds106 tool. It allows you to upload an animated GIF and it unbundles it into separate images. Whyfore might thou do this? Sometimes you don;t know in advance, but I took a play with […]
    • Back from the Great Wide Open cc licensed ( BY NC ND ) flickr photo shared by fliegender It was March 17 of 2011 when I described my [quasi] plan to jump out into the great wide open, which was most filled by the 5 month/15,000 mile road odyssey, but started with some reflection time and travel before the road trip, […]
  • 2010
    • It’s Alive! What hath Jim Groom wrought? A few spare body parts, some electricity, whilring dials, and some hunchbacked assistant… ds106 The Mad Open Online Course is Alive! So it’s not even place, it’s three weeks out, why are all my colleagues, friends madly in their labs, and doing of all things, retro 1990s techno things like […]
  • 2009
    • Twitter/Blogging Intertwined? (reports of death are… whatever) cc licensed flickr photo shared by Ruben Bos I’ve been cruising through a techno funk, a semi-periodic time when I am just finding the motivation gas tank leaning towards “E” and have refrained from blogging about not blogging. And I am not doing that here. After the trip to Doha, I have a half baked, […]
    • Okay, I am trying the new Twitter-API th Okay, I am trying the new Twitter-API thing Matt wrote about, posting via Tweetie 2 to a wp.com blog. Wow, what will 140 char blog posts do?
  • 2008
    • Useful Tweets Useful Highway Tweets by cogdogblog posted 14 Dec ’08, 5.53pm MST PST on flickr Thanks to @sorden I know am following ArizonaDOT – Department of Transportation which is now tweeting accidents and highway closures. I am trying getting these tweets via SMS – the message above would have helped a few days ago when I […]
    • Tagged Unknown, Caterpillar in Qatar, and Amplifying Effects It was by sheer accident a few years ago that I found if I tagged/ captioned my photos of flowers in flickr with “unknown” or “unidentified” that I was indirectly asking for help… and people I did not know would respond. I’ve relayed in presentations quite a few time the improbable but true-I-have-witnesses story of […]
    • Twitteronema Blue Fire. by tesla1000 posted 16 May ’06, 12.49pm MDT PST on flickr Miles Waldrons T.C. Clintlightning@aol.com Like the web first did about 12 years ago, Twitter seems to have jumped an inflection point from something weird and for geeks only… to something else. Who would of thought? I did not when I first tweeted […]
  • 2006
    • My Pool Overflow-eth flickr foto A Tree Swims in Arizonaavailable on flickr Hmmm, did some aerial agent drop this Christmas tree in our yard? Good shot! It landed in the pool! At least someone got to use the pool this year. Okay, actually we put the tree in here. On the advice of 2 different friends, it is […]
    • The Dog is Back (Was Our Absence Noted?)… and Barking Not sure if the net really even noticed, but for the last few days CogDogBlog was been Four Oh Four, off-line, DOA, kaput, flat-lined. It is almost ironic- on my plane flight out from Phoenix to Austin, a thought floated in my mind that I had not recently showed my gratitude to Audree, a colleague […]
  • 2004
    • An Innovations Conference Without Internet Is Like… We just got the notification for our presentation on our Ocotillo projects at the League For Innovation’s “Innovations 2005” conference to be held March in New Yoirk City. The conference is tagged as: Join the most innovative community college professionals as they come together to improve student and organizational learning through innovation, experimentation, and institutional […]
    • Jill’s Small Pieces Jill Walker’s description of an easy to use QwikiWiki is just a piece of what she describes like assembling her own bits of small technologies loosely joined: So I’m thinking Blogger.com blogs (no comment spam, no setup for me, they own it completely; no trackbacks but c’mon, comment spam is too high a price to […]
  • 2003
    • VersionTracker Does RSS (Sensibly) I have relied for years on VersionTracker (VT) for keeping up to date with the latest updates to software or finding out about new apps for Mac, Windows, and Palm platforms. On a recent visit to another similar site (MacUpdate) I began wondering why these types of sites do not have RSS feeds. Well VersionTracker […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 17 posts previously published on December 14th

  • 2018
    • Oh The Irony of Driving This Train Sometimes your own blogging can turn around and nip at ya. One of my favorite tags of posts has been moocmocking. Now I’m riding the train, gimme an “M”… That’s right, now my current project is helping eCampus Ontario run a new round of the Ontario Extend project, starting January 2019… as a mOOC (medium […] &amp#x27A1;
  • 2013
    • If You Are Authentic, You Don’t Need a Label This is not my photo, but I have driven past a Mexican restaurant in Payson, AZ that has the same label Does this mean other Mexican restaurants without an “authentic” label are inauthentic? Or am I confused with the Japanese style Mexican food? It just seems funny to me, almost as if the reason to […] &amp#x27A1;
    • The GIFaChrome Experience I have no idea how to even blog what culminated today for headless ds106. Maybe it was because what was in the boxes. Trying to write this up sells it short. But one ought to try. This is in lieu of a more comprehensive it-might-be-blogged-one-day-before-the-sun-burns-out post for what has happened the last 15 weeks since […] &amp#x27A1;
  • 2011
    • Clinging To Scarcity Tactics in A World of Information Abundance cc licensed ( BY NC ND ) flickr photo shared by Florin Draghici That title may mislead you that I know something. It just sounds good. But as much as we seem to be in a world of digital information abundance, there is plenty of strategies in publishing of creating scarcity that does not truly […] &amp#x27A1;
    • Deconstructing Animated GIFS Via a comment on a recent posting of three photo animated gifs, I found GIF Exploder which might be a handy ds106 tool. It allows you to upload an animated GIF and it unbundles it into separate images. Whyfore might thou do this? Sometimes you don;t know in advance, but I took a play with […] &amp#x27A1;
    • Back from the Great Wide Open cc licensed ( BY NC ND ) flickr photo shared by fliegender It was March 17 of 2011 when I described my [quasi] plan to jump out into the great wide open, which was most filled by the 5 month/15,000 mile road odyssey, but started with some reflection time and travel before the road trip, […] &amp#x27A1;
  • 2010
    • It’s Alive! What hath Jim Groom wrought? A few spare body parts, some electricity, whilring dials, and some hunchbacked assistant… ds106 The Mad Open Online Course is Alive! So it’s not even place, it’s three weeks out, why are all my colleagues, friends madly in their labs, and doing of all things, retro 1990s techno things like […] &amp#x27A1;
  • 2009
  • 2008
    • Useful Tweets Useful Highway Tweets by cogdogblog posted 14 Dec ’08, 5.53pm MST PST on flickr Thanks to @sorden I know am following ArizonaDOT – Department of Transportation which is now tweeting accidents and highway closures. I am trying getting these tweets via SMS – the message above would have helped a few days ago when I […] &amp#x27A1;
    • Tagged Unknown, Caterpillar in Qatar, and Amplifying Effects It was by sheer accident a few years ago that I found if I tagged/ captioned my photos of flowers in flickr with “unknown” or “unidentified” that I was indirectly asking for help… and people I did not know would respond. I’ve relayed in presentations quite a few time the improbable but true-I-have-witnesses story of […] &amp#x27A1;
    • Twitteronema Blue Fire. by tesla1000 posted 16 May ’06, 12.49pm MDT PST on flickr Miles Waldrons T.C. Clintlightning@aol.com Like the web first did about 12 years ago, Twitter seems to have jumped an inflection point from something weird and for geeks only… to something else. Who would of thought? I did not when I first tweeted […] &amp#x27A1;
  • 2006
    • My Pool Overflow-eth flickr foto A Tree Swims in Arizonaavailable on flickr Hmmm, did some aerial agent drop this Christmas tree in our yard? Good shot! It landed in the pool! At least someone got to use the pool this year. Okay, actually we put the tree in here. On the advice of 2 different friends, it is […] &amp#x27A1;
    • The Dog is Back (Was Our Absence Noted?)… and Barking Not sure if the net really even noticed, but for the last few days CogDogBlog was been Four Oh Four, off-line, DOA, kaput, flat-lined. It is almost ironic- on my plane flight out from Phoenix to Austin, a thought floated in my mind that I had not recently showed my gratitude to Audree, a colleague […] &amp#x27A1;
  • 2004
    • An Innovations Conference Without Internet Is Like… We just got the notification for our presentation on our Ocotillo projects at the League For Innovation’s “Innovations 2005” conference to be held March in New Yoirk City. The conference is tagged as: Join the most innovative community college professionals as they come together to improve student and organizational learning through innovation, experimentation, and institutional […] &amp#x27A1;
    • Jill’s Small Pieces Jill Walker’s description of an easy to use QwikiWiki is just a piece of what she describes like assembling her own bits of small technologies loosely joined: So I’m thinking Blogger.com blogs (no comment spam, no setup for me, they own it completely; no trackbacks but c’mon, comment spam is too high a price to […] &amp#x27A1;
  • 2003
    • VersionTracker Does RSS (Sensibly) I have relied for years on VersionTracker (VT) for keeping up to date with the latest updates to software or finding out about new apps for Mac, Windows, and Palm platforms. On a recent visit to another similar site (MacUpdate) I began wondering why these types of sites do not have RSS feeds. Well VersionTracker […] &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 *