“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 December 28th

  • 2023
    • Reads and Feeds and the Right Bowl of web Porridge Be wary of nebulous titles as they forbode a blog post of meandering paths and uncertain destinations. As I look gleefully over his holiday break span full of plans to write all the posts rattling in my head and browser tabs left open for months, it too reminds me of this stack of unfinished intentions […]
  • 2019
    • 2019 Book Summary I see your pie charts and lists of almost 100 books read this year, Martin Weller. And it is impressive. My summary will not take a spreadsheet, as I just today finished one book for 2019, this one bought maybe a year ago (big review below). The list is one book long (well there is […]
  • 2017
    • Forget Rings, One CSS Selector to Rule All Styles Actually my title and featured image went a little off track. This is not about one powerful CSS feature… it’s all of them. Now I know that most people run shrieking at the sight of HTML, and me talking about CSS just ends up sounding like this. And I am far from being a CSS […]
    • #ResNetSem Thesis Projects in the Arganee Journal My ResNetSem students are now published… well, it is our own journal, but hey, we can do that. The new Arganee Journal is here! The new Arganee Journal is here! Are you kidding? I’m somebody now! Millions of people look at this journal every day! This is the kind of spontaneous publicity – your name […]
    • Beauty, Courage Amongst Rubble: Beyond the Bubble Do you remember the kerfuffle when Georgia Tech canceled a Coursera MOOC on “Fundamentals of Online Education: Planning and Application” because the ill-advised use of a Google spreadsheet for 40,000 participants, crashed it? Can you imagine what would happen to Georgia Tech courses if a Category 4 hurricane slammed the state, leaving its inhabitants flooded, […]
  • 2015
    • On Waiting For Polaroid Images Adam Croom is on a tour de force blogging like it was 2006 blowout, and just the opening paragraphs of his latest post Toward a Polaroid Pedagogy triggered those reverberations that signals to me… this means more than a comment. Adam shares an analogy from a book he is reading on a road trip, by […]
    • Taking the Reins of the DS106 Daily Create The DS106 Daily Create started January 8, 2012 in a site originally created and maintained by Tim Owens. I took it over a few months later when I went to teach/work at the University of Mary Washington, and populated/tended it until late July 2014. Then I had roped Mariana Funes into taking over keeping the […]
  • 2013
    • Bootstrapping A New Landing Site I’ve been tinkering this week for a new approach to building basic web sites driven by a single HTML file (with a backend of sophisticated CSS and Javascript). It’s a style you can start to recognize — see Medium, Sports Illustrated, and countless others once you tune into it. It is exploding. This is a […]
  • 2010
    • Same New World google image search on Brave New World I just finished reading one of The Great Books I Was Supposed to Read in High School– Huxley’s Brave New World. The catch phrase is usually along the lines of “a vision of a dystopian future.” This seems a rather ironic statement given the conversation in the latter […]
  • 2008
    • Tis the Season of Predictions cc licensed flickr photo by SiRi About the most reliable prediction one can make this end time of year is the flood of people posting their own predictions for 2009, lots of them in the technology space (e.g. ReadWriteWeb, EDITing in the Dark, and Stephen Downes takes out the 10 year scope in an amazing […]
  • 2007
    • Sweet! Tweetscan Tweetscan is “a real-time search engine for Twitter posts. Beyond that, TweetScan can do your searches automatically and email them to you”. At the ego level, you can use it to search for tweets directed at yourself or make that, myself. So this is extremely useful to track replies people may make to you who […]
    • Writing for Junior High (and free spam links to boot) The blog readability site has plenty of bounces around the blog-o-sphere – plug in a blog URL, and the magical black box somehow comes up with an absolute determination. I am proud to wear by junior high school reading level badge, which means I am certainly writing for an audience that is at a higher […]
    • Top 0 Lists for 2007 Get it?  Share this barking on social media
    • Unblanking the Page Blank Page posted 12 Feb ’07, 12.18pm MST PST on flickr Mmm … what shall I create today? It’s probably not healthy that I awoke this morning, still shaking off the dream state, thinking I was writing a blog entry. Why dream about writing blog posts? Why not red sports cars, standing on mountains, that […]
  • 2006
    • Cash Cover Master I cannot say for most of my life that I really listened to, or was a fan of Johnny Cash. Somewhere I knew he was the “man in black” and had done a concert inside a prison. But I chalked him up to country music (like Jake and Elwood said, “yep, we got both kinds […]
    • Google Gripes I’m still thumbs up on using Google Reader — remember kids, there is no “best” web application, and just because I say its great does not mean something else might work better for you. Not only am I prone to be wrong, but there is just no way in the fast changing webscape for anyone […]
    • Snowtraction flickr foto Deck Full of Snowavailable on flickr The weather reports this as an accumulation of "one inch" — my measurements are a bit off. What a beautiful distraction is outside my cabin window! Last night they were forecasting maybe 1-2 inches of snow, and there was about an inch when I went to bed. […]
    • My Speakers Are a Radio Up here at my cabin, we have no TV reception, so we have a system of a DVD player, TV, and some Altec-Lansing computer speakers for audio. I’ve noticed when the TV and DVD are off, if I raise the audio cable, I can hear some low, static filled radio sound from the speakers. With […]
  • 2005
    • Google Module: WordPress Search After I made up the terms “inward/outward aggregating”, Tim Lauer expounded on possibilities for his school to use Google Personalized Home page. After looking at the ever-expanding collection of Google Modules, seeing they are just little (or not so little) chunks of XML, I began getting the urge to tinker, to see how complicated it […]
  • 2004
    • Accurate Predictions for 2005 Ahh, it is creeping up New Year, and the insightful pundits are rolling out the grand prognostications. Is their crystal ball really any sharper than yours or mine? Why? Here is mine: I predict that I will not be making any new year predictions. That’s it.  Share this barking on social media
  • 2003
    • Reading Time: “The Map that Changed the World” This slow time has allowed a rare luxury: finishing a good book. On one forgotten trip a few months back, thumbing through the schlock selections at some airport bookstore, one caught my attention because of a geology cross-section on the cover. Simon Winchester’s “The Map that Changed the World” is the riveting story of William […]
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 December 28th

  • 2023
    • Reads and Feeds and the Right Bowl of web Porridge Be wary of nebulous titles as they forbode a blog post of meandering paths and uncertain destinations. As I look gleefully over his holiday break span full of plans to write all the posts rattling in my head and browser tabs left open for months, it too reminds me of this stack of unfinished intentions […] &amp#x27A1;
  • 2019
    • 2019 Book Summary I see your pie charts and lists of almost 100 books read this year, Martin Weller. And it is impressive. My summary will not take a spreadsheet, as I just today finished one book for 2019, this one bought maybe a year ago (big review below). The list is one book long (well there is […] &amp#x27A1;
  • 2017
    • Forget Rings, One CSS Selector to Rule All Styles Actually my title and featured image went a little off track. This is not about one powerful CSS feature… it’s all of them. Now I know that most people run shrieking at the sight of HTML, and me talking about CSS just ends up sounding like this. And I am far from being a CSS […] &amp#x27A1;
    • #ResNetSem Thesis Projects in the Arganee Journal My ResNetSem students are now published… well, it is our own journal, but hey, we can do that. The new Arganee Journal is here! The new Arganee Journal is here! Are you kidding? I’m somebody now! Millions of people look at this journal every day! This is the kind of spontaneous publicity – your name […] &amp#x27A1;
    • Beauty, Courage Amongst Rubble: Beyond the Bubble Do you remember the kerfuffle when Georgia Tech canceled a Coursera MOOC on “Fundamentals of Online Education: Planning and Application” because the ill-advised use of a Google spreadsheet for 40,000 participants, crashed it? Can you imagine what would happen to Georgia Tech courses if a Category 4 hurricane slammed the state, leaving its inhabitants flooded, […] &amp#x27A1;
  • 2015
    • On Waiting For Polaroid Images Adam Croom is on a tour de force blogging like it was 2006 blowout, and just the opening paragraphs of his latest post Toward a Polaroid Pedagogy triggered those reverberations that signals to me… this means more than a comment. Adam shares an analogy from a book he is reading on a road trip, by […] &amp#x27A1;
    • Taking the Reins of the DS106 Daily Create The DS106 Daily Create started January 8, 2012 in a site originally created and maintained by Tim Owens. I took it over a few months later when I went to teach/work at the University of Mary Washington, and populated/tended it until late July 2014. Then I had roped Mariana Funes into taking over keeping the […] &amp#x27A1;
  • 2013
    • Bootstrapping A New Landing Site I’ve been tinkering this week for a new approach to building basic web sites driven by a single HTML file (with a backend of sophisticated CSS and Javascript). It’s a style you can start to recognize — see Medium, Sports Illustrated, and countless others once you tune into it. It is exploding. This is a […] &amp#x27A1;
  • 2010
    • Same New World google image search on Brave New World I just finished reading one of The Great Books I Was Supposed to Read in High School– Huxley’s Brave New World. The catch phrase is usually along the lines of “a vision of a dystopian future.” This seems a rather ironic statement given the conversation in the latter […] &amp#x27A1;
  • 2008
    • Tis the Season of Predictions cc licensed flickr photo by SiRi About the most reliable prediction one can make this end time of year is the flood of people posting their own predictions for 2009, lots of them in the technology space (e.g. ReadWriteWeb, EDITing in the Dark, and Stephen Downes takes out the 10 year scope in an amazing […] &amp#x27A1;
  • 2007
    • Sweet! Tweetscan Tweetscan is “a real-time search engine for Twitter posts. Beyond that, TweetScan can do your searches automatically and email them to you”. At the ego level, you can use it to search for tweets directed at yourself or make that, myself. So this is extremely useful to track replies people may make to you who […] &amp#x27A1;
    • Writing for Junior High (and free spam links to boot) The blog readability site has plenty of bounces around the blog-o-sphere – plug in a blog URL, and the magical black box somehow comes up with an absolute determination. I am proud to wear by junior high school reading level badge, which means I am certainly writing for an audience that is at a higher […] &amp#x27A1;
    • Top 0 Lists for 2007 Get it?  Share this barking on social media &amp#x27A1;
    • Unblanking the Page Blank Page posted 12 Feb ’07, 12.18pm MST PST on flickr Mmm … what shall I create today? It’s probably not healthy that I awoke this morning, still shaking off the dream state, thinking I was writing a blog entry. Why dream about writing blog posts? Why not red sports cars, standing on mountains, that […] &amp#x27A1;
  • 2006
    • Cash Cover Master I cannot say for most of my life that I really listened to, or was a fan of Johnny Cash. Somewhere I knew he was the “man in black” and had done a concert inside a prison. But I chalked him up to country music (like Jake and Elwood said, “yep, we got both kinds […] &amp#x27A1;
    • Google Gripes I’m still thumbs up on using Google Reader — remember kids, there is no “best” web application, and just because I say its great does not mean something else might work better for you. Not only am I prone to be wrong, but there is just no way in the fast changing webscape for anyone […] &amp#x27A1;
    • Snowtraction flickr foto Deck Full of Snowavailable on flickr The weather reports this as an accumulation of "one inch" — my measurements are a bit off. What a beautiful distraction is outside my cabin window! Last night they were forecasting maybe 1-2 inches of snow, and there was about an inch when I went to bed. […] &amp#x27A1;
    • My Speakers Are a Radio Up here at my cabin, we have no TV reception, so we have a system of a DVD player, TV, and some Altec-Lansing computer speakers for audio. I’ve noticed when the TV and DVD are off, if I raise the audio cable, I can hear some low, static filled radio sound from the speakers. With […] &amp#x27A1;
  • 2005
    • Google Module: WordPress Search After I made up the terms “inward/outward aggregating”, Tim Lauer expounded on possibilities for his school to use Google Personalized Home page. After looking at the ever-expanding collection of Google Modules, seeing they are just little (or not so little) chunks of XML, I began getting the urge to tinker, to see how complicated it […] &amp#x27A1;
  • 2004
    • Accurate Predictions for 2005 Ahh, it is creeping up New Year, and the insightful pundits are rolling out the grand prognostications. Is their crystal ball really any sharper than yours or mine? Why? Here is mine: I predict that I will not be making any new year predictions. That’s it.  Share this barking on social media &amp#x27A1;
  • 2003
    • Reading Time: “The Map that Changed the World” This slow time has allowed a rare luxury: finishing a good book. On one forgotten trip a few months back, thumbing through the schlock selections at some airport bookstore, one caught my attention because of a geology cross-section on the cover. Simon Winchester’s “The Map that Changed the World” is the riveting story of William […] &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 *