“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 19 posts previously published on October 19th

  • 2022
    • A SPLOT for One’s Own One of the very best things that can happen from sharing something digital I’ve built/duct taped together, is that someone actually uses it. But even better, is when they use it in a way I would have never imagined. Take my SPLOTs. Please. (bad Rodney Dangerfield joke) The ones that have been most widely used […]
  • 2018
    • A Few More Switches and Gizmos for SPLOTs Actually it’s just switches, like things to turn on and off. When I wrote the title, “switches” by itself sounded like things were changing. So imagine the gizmos. As it likely has been written before, the best things about seeing SPLOTs get used are the ways people use it that I would have never anticipated, […]
  • 2017
    • What The World Really Needed Was a Bike Trail Lorem Ipsum Generator “But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born…” The translation of “standard” Lorem ipsum text might be talking about mountain biking… This rather un-nessary bit of web tinkering was triggered by some tweets this morning from Tom Woodward about one of the variants of […]
  • 2015
    • Keynoting from a Beach: Stories of Connection for the K12 Online Conference At 8:00 AM EST today I was keynoting the K12 Online Conference while at a beach hotel in Western Puerto Rico. Well not exactly. At 8:00 AM I already on the road, driving back to San Juan for my flight to Chicago. But I was keynoting. This is because this online conference, the presentations are […]
  • 2012
    • Remixing ds106 Assignments at Open Ed 2012 It’s been a jam full week of conference and post conference fun at Open Education 2012 – how much cooler could a conference be that has not only a night boat cruise but has a rocking jam session from participants? On the first day I had my 22.5 minutes to talk about the ds106 Assignment […]
  • 2011
    • ds106 Radio Broadcast with Tom Woodward cc licensed ( BY ) flickr photo shared by cogdogblog Do not take this boyish innocent smile lightly- Tom Woodward is a force of creative and sarcastic genius. It was yet another highlight to have spent tim with Tom in person a few clicks back, and to get to visit with him and his family […]
    • Animated GIFs from Your Own Photos While in Nashville, I noticed these interesting series of reflections from the Cumberland River in an office building, literally twinkling in the windows. I wondered if I could take a series of these to create an animated GIF. I used the camera in multiple shot mode, but still felt like the camera moved slightly (it […]
    • Message From the XO: Find Obi Don… I’ve had to keep moving around here in Philly to escape notice. There are way too many people walking around in dark shades, carrying radios, looking around. I apologize for my friends who are here for the EDUCAUSE conference, but I can’t be socializing or hanging around sessions. But I now know my next location […]
    • Please Leave Your Message at the Scream In this week, Michael Branson Smith’s ds106 class is moving into the audio assignments, and I like the concept for a new one he designed, Movie Voice Machines: Create a voice mail message for a character in a film or tv show. Use samples, impressions, and/or music to create your message. See what Michael provided […]
  • 2008
    • Mobile Twitter Video Storytelling Found via a comment on an earlier post, Hugh Garry has a short video with footage shot at a music festival, overlain with a “narration” form his tweets at the event, converted via Speech to Text: As described there, Whilst making Shoot The Summer I’ve been thinking a lot about the capabilities of the mobile […]
    • Mobile, Media Recognition, Magic My iPhone excitement is nothing new here, given how long it took me to get one, but there is wave after wave of discovery of new things, I am forgetting I have only had it for 2 months. But last night… I found an app that is, to me, explosive, in terms of opening potential […]
  • 2006
    • The Levelator Rocks! Thanks to a del.icio.us for:cogdog tag from Scott Leslie, I took a quick peak at the Levelator, a free tool offered from GigaVox Media. It’s a tool developed and applied by the pros at ITConversations, designed to adjust audio levels common in interview situations where one person’s audio levels are much higher or lower than […]
    • dog blogged out I guess I’ve had nothing to write. Actually, my attention has been corralled elsewhere, with multiple daily posts for the NMC Campus Observer with our 12 day Second Life Symposium on Impact of Digital Media. I’ve been recording all of our streamed live audio sessions, making sure chat transcripts get posted, taking tons on in […]
  • 2005
    • 2.0 Serendipity The least thought-out posts gain the most comment? As a follow-up to Me 2.0 someone kindly sent a serendipitous Bloglines pairing of my post and something else that is sort of related (might need the full-size to appreciate):  Share this barking on social media
    • Google Links Are Back What a nice surprise that search results returned from Google now act like the are supposed to- a hover or a right/control mouse click on a link actually points to the site listed, rather than a re-direct via a Google.com address: This has been most annoying for blogging especially as I use Google to locate […]
  • 2004
    • Mile High So this is Denver… It is not secret, but the Denver airport is an entire city unto itself. You get off a plane, get on a train, hop on a boat, cross a mountain… and then wait 40 minutes, praying, for your luggage. Then, you find out the airport is so far east of the […]
  • 2003
    • CarRP Parses RSS to JavaScript Another option for getting RSS feeds into your own web pages, CaRP: Freeware Caching RSS news feed Parser Keep your website fresh effortlessly with RSS newsfeeds. Numerous options ensure that the feeds fit the look and feel of your site. If you already publish an RSS feed, CaRP can create a JavaScript version of it. […]
    • League Bloggin’: The Rest of Day 1 Blogging at the League for Innovation conference got a wee more difficult as the Wi-Fi went AWOL, 404. The word is even the wired network here in the Midways Airport Convention center due to a blaster type worm banging out of a machine in the exhibit area. Last I saw, the techies were yanking machines […]
    • League Bloggin’: “Weaving Critical Thinking…” Okay, first session at the League for Innovation conference, this one from Wisconsin Indianhead Technical College titled “Weaving Critical Thnking into Online Courses”. Okay, we wade through the cheeese-head jokes, a lot of background on WITC, their mission, their learning acadamies… still waiting 30 minutes in to get to the Critical Thinking. The college does […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 19 posts previously published on October 19th

  • 2022
    • A SPLOT for One’s Own One of the very best things that can happen from sharing something digital I’ve built/duct taped together, is that someone actually uses it. But even better, is when they use it in a way I would have never imagined. Take my SPLOTs. Please. (bad Rodney Dangerfield joke) The ones that have been most widely used […] &amp#x27A1;
  • 2018
    • A Few More Switches and Gizmos for SPLOTs Actually it’s just switches, like things to turn on and off. When I wrote the title, “switches” by itself sounded like things were changing. So imagine the gizmos. As it likely has been written before, the best things about seeing SPLOTs get used are the ways people use it that I would have never anticipated, […] &amp#x27A1;
  • 2017
    • What The World Really Needed Was a Bike Trail Lorem Ipsum Generator “But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born…” The translation of “standard” Lorem ipsum text might be talking about mountain biking… This rather un-nessary bit of web tinkering was triggered by some tweets this morning from Tom Woodward about one of the variants of […] &amp#x27A1;
  • 2015
  • 2012
    • Remixing ds106 Assignments at Open Ed 2012 It’s been a jam full week of conference and post conference fun at Open Education 2012 – how much cooler could a conference be that has not only a night boat cruise but has a rocking jam session from participants? On the first day I had my 22.5 minutes to talk about the ds106 Assignment […] &amp#x27A1;
  • 2011
    • ds106 Radio Broadcast with Tom Woodward cc licensed ( BY ) flickr photo shared by cogdogblog Do not take this boyish innocent smile lightly- Tom Woodward is a force of creative and sarcastic genius. It was yet another highlight to have spent tim with Tom in person a few clicks back, and to get to visit with him and his family […] &amp#x27A1;
    • Animated GIFs from Your Own Photos While in Nashville, I noticed these interesting series of reflections from the Cumberland River in an office building, literally twinkling in the windows. I wondered if I could take a series of these to create an animated GIF. I used the camera in multiple shot mode, but still felt like the camera moved slightly (it […] &amp#x27A1;
    • Message From the XO: Find Obi Don… I’ve had to keep moving around here in Philly to escape notice. There are way too many people walking around in dark shades, carrying radios, looking around. I apologize for my friends who are here for the EDUCAUSE conference, but I can’t be socializing or hanging around sessions. But I now know my next location […] &amp#x27A1;
    • Please Leave Your Message at the Scream In this week, Michael Branson Smith’s ds106 class is moving into the audio assignments, and I like the concept for a new one he designed, Movie Voice Machines: Create a voice mail message for a character in a film or tv show. Use samples, impressions, and/or music to create your message. See what Michael provided […] &amp#x27A1;
  • 2008
    • Mobile Twitter Video Storytelling Found via a comment on an earlier post, Hugh Garry has a short video with footage shot at a music festival, overlain with a “narration” form his tweets at the event, converted via Speech to Text: As described there, Whilst making Shoot The Summer I’ve been thinking a lot about the capabilities of the mobile […] &amp#x27A1;
    • Mobile, Media Recognition, Magic My iPhone excitement is nothing new here, given how long it took me to get one, but there is wave after wave of discovery of new things, I am forgetting I have only had it for 2 months. But last night… I found an app that is, to me, explosive, in terms of opening potential […] &amp#x27A1;
  • 2006
    • The Levelator Rocks! Thanks to a del.icio.us for:cogdog tag from Scott Leslie, I took a quick peak at the Levelator, a free tool offered from GigaVox Media. It’s a tool developed and applied by the pros at ITConversations, designed to adjust audio levels common in interview situations where one person’s audio levels are much higher or lower than […] &amp#x27A1;
    • dog blogged out I guess I’ve had nothing to write. Actually, my attention has been corralled elsewhere, with multiple daily posts for the NMC Campus Observer with our 12 day Second Life Symposium on Impact of Digital Media. I’ve been recording all of our streamed live audio sessions, making sure chat transcripts get posted, taking tons on in […] &amp#x27A1;
  • 2005
    • 2.0 Serendipity The least thought-out posts gain the most comment? As a follow-up to Me 2.0 someone kindly sent a serendipitous Bloglines pairing of my post and something else that is sort of related (might need the full-size to appreciate):  Share this barking on social media &amp#x27A1;
    • Google Links Are Back What a nice surprise that search results returned from Google now act like the are supposed to- a hover or a right/control mouse click on a link actually points to the site listed, rather than a re-direct via a Google.com address: This has been most annoying for blogging especially as I use Google to locate […] &amp#x27A1;
  • 2004
    • Mile High So this is Denver… It is not secret, but the Denver airport is an entire city unto itself. You get off a plane, get on a train, hop on a boat, cross a mountain… and then wait 40 minutes, praying, for your luggage. Then, you find out the airport is so far east of the […] &amp#x27A1;
  • 2003
    • CarRP Parses RSS to JavaScript Another option for getting RSS feeds into your own web pages, CaRP: Freeware Caching RSS news feed Parser Keep your website fresh effortlessly with RSS newsfeeds. Numerous options ensure that the feeds fit the look and feel of your site. If you already publish an RSS feed, CaRP can create a JavaScript version of it. […] &amp#x27A1;
    • League Bloggin’: The Rest of Day 1 Blogging at the League for Innovation conference got a wee more difficult as the Wi-Fi went AWOL, 404. The word is even the wired network here in the Midways Airport Convention center due to a blaster type worm banging out of a machine in the exhibit area. Last I saw, the techies were yanking machines […] &amp#x27A1;
    • League Bloggin’: “Weaving Critical Thinking…” Okay, first session at the League for Innovation conference, this one from Wisconsin Indianhead Technical College titled “Weaving Critical Thnking into Online Courses”. Okay, we wade through the cheeese-head jokes, a lot of background on WITC, their mission, their learning acadamies… still waiting 30 minutes in to get to the Critical Thinking. The college does […] &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.

    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 *