“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 18 posts previously published on December 9th

  • 2024
    • My Store is Open For Business- As Usual it will Make me no Money Be giving away everything I’ve tossed on to the web for not only free, but without really any requirements, I have mastered opposite of a knack for web entrepreneurship. I refuse to use that word that turns money into a verb than a longer noun. Here is my latest version of un-capitalistic strategies This is […]
  • 2023
    • I Swim the Net Upstream Given most have left the technopastoral garden for the stream (Look our Mike Caulfield, incoming trackback pings from here), I’m given to wonder of how we swim there. Its a side venture to the old trope quote of giving fish vs teaching how to fish (I once spun in the fish nuggets effect, but that’s […]
  • 2017
    • After GIFfing The Heck out of it, Finally Watched “The Big Country” My creative work only gets fully moving when I have settled on a metaphor, a shtick, if you will. For the DML Workshop I did in October with Kim Jaxon, we were agreed on building on the Western theme the workshop had the previous year with Justin Reich. I had pitched Justin the notion of […]
    • Show Your Work! Session at Wodonga TAFE How quickly this time went, this workshop represents the last stop on my ISS Institute circuit. It was also the most distant travel. Sigh, this is back blogging, I loathe loathe loathe back blogging– this is from the workshop done November 22, 2017. I should have known better, back from my 2000 visit to Albury […]
  • 2016
    • I Guess An Eight Year Old WordPress Plugin Might Be an Issue WordPress is a long running machine, and in most of my 11 year experience using it, have found it rather forgiving with old code and themes. With the 4.7 WordPress update, I have been seeing a problem with the Feed WordPress plugin, and despite a fix I found that cleared the error, tonight I found […]
    • Making the UDG Agora Work in Spanglish / Ingléspañol This Tuesday marks the culmination of our second year of the UDG Agora project, maybe one of the best projects I have been ever part of for professional, collaborative, cultural, and human reasons. It is also one that will likely never make a splash in any academic marquee publishing space. The project is a significant […]
  • 2015
    • Un nuevo día para Edupunk I never expected to be blogging about EDUPUNK, much less presenting on it. But the folks running the CIINOVApp conference here in Guadalajara asked me and colleagues Tannis Morgan and Brian Lamb to bring it back (we are here by invitation from the University of Guadalajara a week before our UDG Agora Project events). It […]
  • 2012
    • Hargadon Talking Last week Todd Conaway tweeted me (I enjoy how that has become my grammar) that he was going to attend a session in Phoenix that Steve Hargadon was running on his Hack Your Education tour. It was well worth going for both the chance to meet Steve in person, and have some great conversation time […]
  • 2011
    • Tree #106 and the Patchy Story of Sapper Kevin Gavan Ray This started out as one of my usual chasings of photos showing the number 106 in honor of ds106, but I am finding a lesson that you can keep peeling back layers of a story, find interesing bits, but maybe never get there. So I was doing a stroll on a lovely day in Hobart, […]
  • 2010
    • My Adobe Connect Recipe cc licensed flickr photo shared by klynslis Someone in my twitter flow, I cannot recall who, tweeted in angst asking if anyone has had a good webinar experience in Adobe Connect. The subtext was clear- he/she had a lousy experience, and wonders if te problem is the technology. Heck, I do this all the time. […]
  • 2006
    • Food Map The point of cognitive desperation on a plane flight is reading the in-flight magazine (no there is one level lower, reading the Sky Mall catalog), but o my flight Thursday to San Francisco, I chuckled at a “map” of the US (under heading “Food Nation”) featuring city/place names that are also food names… and right […]
    • TubeSpam No web form open to comments goes un-spammed, so its no surprise that via 2 different YouTube accounts I have, that there have been a spate of unwarranted, message spam porn links from folks like “goodlife100” and “xacana10”. Sadly, YouTube, awash in Googlebucks, seems ill equipped to do anything about this. It’s hard to even […]
    • Tracking Those Viral Videos Are you trying to get a pulse on the wild west of the latest videos streaking across YouTube, or looking to out flank your friends who forward those funny flicks by email? Try Viral Video Chart: We scan several million blogs a day to see which online videos people are talking about the most. We […]
    • Hyperlink Graphic Previews are a Snap Another interesting web add-on I looked at today is snap “preview anywhere”. It is essentially a service, you enroll a web site URL, it generates a line of JavaScript that goes in the HEAD of your site’s pages (or better the single header template file). But what does it do? It adds a function so […]
    • Woah… Drawball Wow, I have stumbled into some amazing, attention distracting things recently! I am not sure I can describe drawballl (not that the site explains, but hey, somethings need discovery). The “Ball” is a giant round piece of canvas, where people can go in at a very small scale and draw, draw, draw will colors, creating […]
  • 2005
    • Yahoo-ing the Multipost Bookmarklet Tool Thanks to an email nudge from “Jamie”, I’ve added Yahoo My Web 2.0 to the set of social bookmark tools you can combine into one browser tool via the Make Your Own Multipost Bookmarklet Tool. For those not even sure what all this means, I built a page that allows you to pick all the […]
  • 2004
    • MT Upgrade Dance (2.6 to 3.1) Steps… Advice? Appearances, aside, I copy others quite often… and reading Scott’s note on successful migration from MovableTYpe 2.x to 3.1, I am pondering dragging the CogDog up a notch. I’d resisted for a while because (a) The blog is doing fine as as; and (b) I have about 12 MT blogs on 3 different servers and […]
    • Take the Spam Filtering Survey I am not sure what he is doing with the results, but it looks like John Graham-Cumming is collecting data on people’s attitudes and annoyances with e-mail spam– check out the Spam Filtering Survey: This survey will lead you through a number of pages asking about you, your attitude towards spam and spam filtering, your […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 18 posts previously published on December 9th

  • 2024
    • My Store is Open For Business- As Usual it will Make me no Money Be giving away everything I’ve tossed on to the web for not only free, but without really any requirements, I have mastered opposite of a knack for web entrepreneurship. I refuse to use that word that turns money into a verb than a longer noun. Here is my latest version of un-capitalistic strategies This is […] &amp#x27A1;
  • 2023
    • I Swim the Net Upstream Given most have left the technopastoral garden for the stream (Look our Mike Caulfield, incoming trackback pings from here), I’m given to wonder of how we swim there. Its a side venture to the old trope quote of giving fish vs teaching how to fish (I once spun in the fish nuggets effect, but that’s […] &amp#x27A1;
  • 2017
    • After GIFfing The Heck out of it, Finally Watched “The Big Country” My creative work only gets fully moving when I have settled on a metaphor, a shtick, if you will. For the DML Workshop I did in October with Kim Jaxon, we were agreed on building on the Western theme the workshop had the previous year with Justin Reich. I had pitched Justin the notion of […] &amp#x27A1;
    • Show Your Work! Session at Wodonga TAFE How quickly this time went, this workshop represents the last stop on my ISS Institute circuit. It was also the most distant travel. Sigh, this is back blogging, I loathe loathe loathe back blogging– this is from the workshop done November 22, 2017. I should have known better, back from my 2000 visit to Albury […] &amp#x27A1;
  • 2016
    • I Guess An Eight Year Old WordPress Plugin Might Be an Issue WordPress is a long running machine, and in most of my 11 year experience using it, have found it rather forgiving with old code and themes. With the 4.7 WordPress update, I have been seeing a problem with the Feed WordPress plugin, and despite a fix I found that cleared the error, tonight I found […] &amp#x27A1;
    • Making the UDG Agora Work in Spanglish / Ingléspañol This Tuesday marks the culmination of our second year of the UDG Agora project, maybe one of the best projects I have been ever part of for professional, collaborative, cultural, and human reasons. It is also one that will likely never make a splash in any academic marquee publishing space. The project is a significant […] &amp#x27A1;
  • 2015
    • Un nuevo día para Edupunk I never expected to be blogging about EDUPUNK, much less presenting on it. But the folks running the CIINOVApp conference here in Guadalajara asked me and colleagues Tannis Morgan and Brian Lamb to bring it back (we are here by invitation from the University of Guadalajara a week before our UDG Agora Project events). It […] &amp#x27A1;
  • 2012
    • Hargadon Talking Last week Todd Conaway tweeted me (I enjoy how that has become my grammar) that he was going to attend a session in Phoenix that Steve Hargadon was running on his Hack Your Education tour. It was well worth going for both the chance to meet Steve in person, and have some great conversation time […] &amp#x27A1;
  • 2011
    • Tree #106 and the Patchy Story of Sapper Kevin Gavan Ray This started out as one of my usual chasings of photos showing the number 106 in honor of ds106, but I am finding a lesson that you can keep peeling back layers of a story, find interesing bits, but maybe never get there. So I was doing a stroll on a lovely day in Hobart, […] &amp#x27A1;
  • 2010
    • My Adobe Connect Recipe cc licensed flickr photo shared by klynslis Someone in my twitter flow, I cannot recall who, tweeted in angst asking if anyone has had a good webinar experience in Adobe Connect. The subtext was clear- he/she had a lousy experience, and wonders if te problem is the technology. Heck, I do this all the time. […] &amp#x27A1;
  • 2006
    • Food Map The point of cognitive desperation on a plane flight is reading the in-flight magazine (no there is one level lower, reading the Sky Mall catalog), but o my flight Thursday to San Francisco, I chuckled at a “map” of the US (under heading “Food Nation”) featuring city/place names that are also food names… and right […] &amp#x27A1;
    • TubeSpam No web form open to comments goes un-spammed, so its no surprise that via 2 different YouTube accounts I have, that there have been a spate of unwarranted, message spam porn links from folks like “goodlife100” and “xacana10”. Sadly, YouTube, awash in Googlebucks, seems ill equipped to do anything about this. It’s hard to even […] &amp#x27A1;
    • Tracking Those Viral Videos Are you trying to get a pulse on the wild west of the latest videos streaking across YouTube, or looking to out flank your friends who forward those funny flicks by email? Try Viral Video Chart: We scan several million blogs a day to see which online videos people are talking about the most. We […] &amp#x27A1;
    • Hyperlink Graphic Previews are a Snap Another interesting web add-on I looked at today is snap “preview anywhere”. It is essentially a service, you enroll a web site URL, it generates a line of JavaScript that goes in the HEAD of your site’s pages (or better the single header template file). But what does it do? It adds a function so […] &amp#x27A1;
    • Woah… Drawball Wow, I have stumbled into some amazing, attention distracting things recently! I am not sure I can describe drawballl (not that the site explains, but hey, somethings need discovery). The “Ball” is a giant round piece of canvas, where people can go in at a very small scale and draw, draw, draw will colors, creating […] &amp#x27A1;
  • 2005
    • Yahoo-ing the Multipost Bookmarklet Tool Thanks to an email nudge from “Jamie”, I’ve added Yahoo My Web 2.0 to the set of social bookmark tools you can combine into one browser tool via the Make Your Own Multipost Bookmarklet Tool. For those not even sure what all this means, I built a page that allows you to pick all the […] &amp#x27A1;
  • 2004
    • MT Upgrade Dance (2.6 to 3.1) Steps… Advice? Appearances, aside, I copy others quite often… and reading Scott’s note on successful migration from MovableTYpe 2.x to 3.1, I am pondering dragging the CogDog up a notch. I’d resisted for a while because (a) The blog is doing fine as as; and (b) I have about 12 MT blogs on 3 different servers and […] &amp#x27A1;
    • Take the Spam Filtering Survey I am not sure what he is doing with the results, but it looks like John Graham-Cumming is collecting data on people’s attitudes and annoyances with e-mail spam– check out the Spam Filtering Survey: This survey will lead you through a number of pages asking about you, your attitude towards spam and spam filtering, your […] &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 *