“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 21 posts previously published on May 25th

  • 2020
    • In Which I Play The Part of a Sysadmin … with all the acting pistache of maybe… Steven Seagal? Sure I can futz around cpanel and run some command line stuff (on a really good day maybe vi) but it’s far from my wheelhouse. But I can stretch. Last fall Clint Lalonde came bearing some much needed contract work for BCCampus and his new […]
  • 2017
    • Are you looking at the opposite end of Creative Commons? Have you had any success explaining what Creative Commons is to people completely outside of our field or for that matter outside the range of people who work online? My attempts veer into vague generalities about alternatives to copyright that allow creators to share— (insert eye glaze over). This is not necessarily problematic but more […]
    • One Fewer Good Lambs in this World This is sad news to share. Last night my good friend Brian Lamb’s dad passed away following un-expected complications from a surgery. I asked he and his family if this news was okay to share, as they are in the midst of those grim logistics of funeral arrangements. If you know Brian, you know his […]
  • 2015
    • Do Not Trust Google That Search Results Are Licensed For Reuse In my workshops and materials on finding images licensed for reuse, I do explain how google image search can be used to filter out results that are licensed for reuse. I use this quite often myself, in fact I recommend making a browser search shortcut to make this easy to do. But be wary of […]
  • 2014
    • On the Road With Mariana Funes Talking About DS106 creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog Before reading this, I suggest reviewing Mariana’s newly shared “The psychology of open: On wrestling your inner MOOC”. It was written for a presentation she is doing June 3 at one of the more interestingly titled and themed conferences — The Higher Education Academy […]
    • Five Points on Creativity as Retro Posters Because she shares and gives so much when asked, I took it seriously to respond to Amy Burvall’s request Hey @dkuropatwa @cogdog @Braddo @WickedDecent @honoria @jimgroom would love your input – plz fwd too pic.twitter.com/0FnATNx62P — ?????????? (@amyburvall) May 17, 2014 A video would be me blabbing generalities. Pass. I got the idea a few […]
  • 2012
    • Faculty Academy 2012: The Canadian Invasion cc licensed ( BY ) flickr photo shared by cogdogblog pre-post script: On re-reading this is chaotic and not even close to a full wrap experience of an intense event, and I feel like I left more out than I described. Sigh, blogging about blogging or blogging about not blogging well… It’s hard to blog […]
  • 2011
    • May Story a Day #25: Dad Was a Distance Learner Looking at the old drafting table got me thinking of my Dad again. I found this table among the piles of stuff in our family home basement in Baltimore. Since leaving for college, I had asked Dad for it, and have taken it everywhere I have gone. I drove it across the US in my […]
    • Brain Change BS (Bad Science) cc licensed ( BY ) flickr photo shared by spablab A colleague recently shared a link to this Reuters story Is surfing the Internet altering your brain?. My degrees in Geology hardly qualify me to refute brain scientists, but my common sense really wrankles at suggestions such as: “We’re seeing an evolutionary change. The people […]
    • 50 * 3 / 48 The cryptic math is meant to communicate that over the last 2 days (48 hours), I have presented 3 times online 50+ Web 2.0 Ways to Tell a Story (if you do the math you get a bad pi). Last night was a presentation for Dean Shareski‘s ECMP 355 Course (no web site?), which I […]
  • 2010
    • Openness Begat Openness It feels like an old song to me (nothing wrong with classics), but open content or open education IMHO is not solely focused on the things- the courseware, the things shared – its more about the spirit of sharing openly, and how that multiplies, sometimes on its own accord. This is but a tiny example, […]
  • 2008
    • Ning “the” Thing Nings are everywhere. I’m not necessarily writing here about the virtue (or not) of the build your own social network tool. I’m in a few Nings, and technically/design-wise they have come along way from some of the first ones I recall 3 or 4 years ago when they first came out. No, these is a […]
    • Question Begging to Be Asked…. The psychic should know… by designwallah posted 14 Apr ’08, 10.41pm MDT PST on flickr Let’s see if we are on the same page with this fun image….  Share this barking on social media
    • My Theory on Why We Put Up with Twitter Flakiness Twitter has had a recent nasty string of outages, technical gaffs. Ouch, poor little blue birdie. While I have taken my cheap shots at them, I am liking pondering why, in the fickle fast pace high expectations web 2.0 days we live in (and knowing the “we” there is perhaps not all that inclusive of […]
  • 2006
    • Caught Redhanded Gulp. After telling everyone today about the virtues of using flickr creative commons images, I got caught. I my haste last night to find a banner image for our keynote tag cloud page, I located a nice San Francisco Peaks profile via a creative commons search in Flickrlilli. I did not even register that the […]
    • Tag Clouds Spotted Over Flagstaff The sky over Flagstaff Arizona today was actually crystal clear, but if you had appropriate x-ray glasses on you may have spotted some tag clouds, sprinkled with some Canadian flair. Is that too vague an opening blog post? Okay, today I had the sheer pleasure and honor to co-present, and that verb is used loosely, […]
  • 2005
    • Comment Serendipity Via a recent blog comment I was led by link curiosity to Leigh Blackall’s Teach and Learn Online blog which comes to us from the Blue Mountains of Australia (hence the blue template theme??). From his site, I found a nifty free wiki space called… WikiSpaces where amoung other things like blended learning wikis I […]
    • Go Dog Go! Fetch 5.0 I’ve been waiting a long time for this. Fetch, the Mac OSX ftp tool is released version 5.0, and it finally supports sftp, needed for most of my web transfer work these days. I’ve used string of flaky, bizarre named sftp apps over he last 3 years (CyberDuck, Fugu, and none of them were as […]
    • Oxymoron: Master Planned Blogging Communities Here in the Phoenix area, the housing industry is booming with the roll out of these new “master planned communities”. Physically, these communities are surrounded by high walls and require passing through a security gate to enter, and individual back yards are each walled off. So it looks like Apple Digital Campus Exchange is extending […]
  • 2004
    • First Baby Step for openMLX Colen is hard at work on re-coding the Maricopa Learning eXchange (MLX) for the proposed open-source version we hope to make available as an alpha soon. There is a good deal of restructuring of the code libraries, yanking some code logic from individual PHP files and putting them in the libraries, outlining some functionality needed […]
    • Feed2JS – First Out of the Gate… Just in a few hours of announcing yesterday our new version of the Feed2JS (RSS to JavaScript service/code), David Carter-Tod zoomed out the gate, downloaded the code, and had it up and running in Virginia. As well, he found a minor bug (pesky missing semi-colon) and reminded me to deal with the server parameters for […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 21 posts previously published on May 25th

  • 2020
    • In Which I Play The Part of a Sysadmin … with all the acting pistache of maybe… Steven Seagal? Sure I can futz around cpanel and run some command line stuff (on a really good day maybe vi) but it’s far from my wheelhouse. But I can stretch. Last fall Clint Lalonde came bearing some much needed contract work for BCCampus and his new […] &amp#x27A1;
  • 2017
    • Are you looking at the opposite end of Creative Commons? Have you had any success explaining what Creative Commons is to people completely outside of our field or for that matter outside the range of people who work online? My attempts veer into vague generalities about alternatives to copyright that allow creators to share— (insert eye glaze over). This is not necessarily problematic but more […] &amp#x27A1;
    • One Fewer Good Lambs in this World This is sad news to share. Last night my good friend Brian Lamb’s dad passed away following un-expected complications from a surgery. I asked he and his family if this news was okay to share, as they are in the midst of those grim logistics of funeral arrangements. If you know Brian, you know his […] &amp#x27A1;
  • 2015
    • Do Not Trust Google That Search Results Are Licensed For Reuse In my workshops and materials on finding images licensed for reuse, I do explain how google image search can be used to filter out results that are licensed for reuse. I use this quite often myself, in fact I recommend making a browser search shortcut to make this easy to do. But be wary of […] &amp#x27A1;
  • 2014
    • On the Road With Mariana Funes Talking About DS106 creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog Before reading this, I suggest reviewing Mariana’s newly shared “The psychology of open: On wrestling your inner MOOC”. It was written for a presentation she is doing June 3 at one of the more interestingly titled and themed conferences — The Higher Education Academy […] &amp#x27A1;
    • Five Points on Creativity as Retro Posters Because she shares and gives so much when asked, I took it seriously to respond to Amy Burvall’s request Hey @dkuropatwa @cogdog @Braddo @WickedDecent @honoria @jimgroom would love your input – plz fwd too pic.twitter.com/0FnATNx62P — ?????????? (@amyburvall) May 17, 2014 A video would be me blabbing generalities. Pass. I got the idea a few […] &amp#x27A1;
  • 2012
    • Faculty Academy 2012: The Canadian Invasion cc licensed ( BY ) flickr photo shared by cogdogblog pre-post script: On re-reading this is chaotic and not even close to a full wrap experience of an intense event, and I feel like I left more out than I described. Sigh, blogging about blogging or blogging about not blogging well… It’s hard to blog […] &amp#x27A1;
  • 2011
    • May Story a Day #25: Dad Was a Distance Learner Looking at the old drafting table got me thinking of my Dad again. I found this table among the piles of stuff in our family home basement in Baltimore. Since leaving for college, I had asked Dad for it, and have taken it everywhere I have gone. I drove it across the US in my […] &amp#x27A1;
    • Brain Change BS (Bad Science) cc licensed ( BY ) flickr photo shared by spablab A colleague recently shared a link to this Reuters story Is surfing the Internet altering your brain?. My degrees in Geology hardly qualify me to refute brain scientists, but my common sense really wrankles at suggestions such as: “We’re seeing an evolutionary change. The people […] &amp#x27A1;
    • 50 * 3 / 48 The cryptic math is meant to communicate that over the last 2 days (48 hours), I have presented 3 times online 50+ Web 2.0 Ways to Tell a Story (if you do the math you get a bad pi). Last night was a presentation for Dean Shareski‘s ECMP 355 Course (no web site?), which I […] &amp#x27A1;
  • 2010
    • Openness Begat Openness It feels like an old song to me (nothing wrong with classics), but open content or open education IMHO is not solely focused on the things- the courseware, the things shared – its more about the spirit of sharing openly, and how that multiplies, sometimes on its own accord. This is but a tiny example, […] &amp#x27A1;
  • 2008
    • Ning “the” Thing Nings are everywhere. I’m not necessarily writing here about the virtue (or not) of the build your own social network tool. I’m in a few Nings, and technically/design-wise they have come along way from some of the first ones I recall 3 or 4 years ago when they first came out. No, these is a […] &amp#x27A1;
    • Question Begging to Be Asked…. The psychic should know… by designwallah posted 14 Apr ’08, 10.41pm MDT PST on flickr Let’s see if we are on the same page with this fun image….  Share this barking on social media &amp#x27A1;
    • My Theory on Why We Put Up with Twitter Flakiness Twitter has had a recent nasty string of outages, technical gaffs. Ouch, poor little blue birdie. While I have taken my cheap shots at them, I am liking pondering why, in the fickle fast pace high expectations web 2.0 days we live in (and knowing the “we” there is perhaps not all that inclusive of […] &amp#x27A1;
  • 2006
    • Caught Redhanded Gulp. After telling everyone today about the virtues of using flickr creative commons images, I got caught. I my haste last night to find a banner image for our keynote tag cloud page, I located a nice San Francisco Peaks profile via a creative commons search in Flickrlilli. I did not even register that the […] &amp#x27A1;
    • Tag Clouds Spotted Over Flagstaff The sky over Flagstaff Arizona today was actually crystal clear, but if you had appropriate x-ray glasses on you may have spotted some tag clouds, sprinkled with some Canadian flair. Is that too vague an opening blog post? Okay, today I had the sheer pleasure and honor to co-present, and that verb is used loosely, […] &amp#x27A1;
  • 2005
    • Comment Serendipity Via a recent blog comment I was led by link curiosity to Leigh Blackall’s Teach and Learn Online blog which comes to us from the Blue Mountains of Australia (hence the blue template theme??). From his site, I found a nifty free wiki space called… WikiSpaces where amoung other things like blended learning wikis I […] &amp#x27A1;
    • Go Dog Go! Fetch 5.0 I’ve been waiting a long time for this. Fetch, the Mac OSX ftp tool is released version 5.0, and it finally supports sftp, needed for most of my web transfer work these days. I’ve used string of flaky, bizarre named sftp apps over he last 3 years (CyberDuck, Fugu, and none of them were as […] &amp#x27A1;
    • Oxymoron: Master Planned Blogging Communities Here in the Phoenix area, the housing industry is booming with the roll out of these new “master planned communities”. Physically, these communities are surrounded by high walls and require passing through a security gate to enter, and individual back yards are each walled off. So it looks like Apple Digital Campus Exchange is extending […] &amp#x27A1;
  • 2004
    • First Baby Step for openMLX Colen is hard at work on re-coding the Maricopa Learning eXchange (MLX) for the proposed open-source version we hope to make available as an alpha soon. There is a good deal of restructuring of the code libraries, yanking some code logic from individual PHP files and putting them in the libraries, outlining some functionality needed […] &amp#x27A1;
    • Feed2JS – First Out of the Gate… Just in a few hours of announcing yesterday our new version of the Feed2JS (RSS to JavaScript service/code), David Carter-Tod zoomed out the gate, downloaded the code, and had it up and running in Virginia. As well, he found a minor bug (pesky missing semi-colon) and reminded me to deal with the server parameters for […] &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 *