“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 20 posts previously published on February 12th

  • 2024
    • 2 / 10 = 20 Years and Big & Little Things I Love About Flickr One day late! I’m sorry Flickr, your 20th Birthday was yesterday but I have been thinking about this for a while, I promise. My love is real! Okay, here are 20 special things (there are more) in no specific order except when they pop out of my head, well actually as I am blitting them […]
  • 2018
    • Not Quite the Cover of the Forest Service Trail Strategy A little record spin horn tooting for a US Forest Service document published with two of my photos in it. I do volunteer work with a local organization that raises funds for and then does the manual work of, expanding a system of hiking/biking trails around Pine and Strawberry, Arizona (I am working on a […]
  • 2016
    • A Feed WordPress Magic Box This is a pondering not a promise. I’ve been thinking longer on this, but have a dream of rolling a lot of the custom coding I have done for past Connected Course projects (e.g. ds106, Thoughtvectors, ETMOOC, Future of Learning, YouShow— all building a syndication hub in WordPress using the Feed WordPress plugin, e.g. Connected […]
  • 2015
    • Playing the Web Walkback Game Here’s a game I play on the web. There are metric tonnes of sights that gather curious / interesting / weird stories be it mentalfloss, neatorama, Random Good Stuff, Holy Kaw… It must be a business, track eyeballs for advertisers, make stuff spreadable, hoping it hits the viral google juiced jackpot. Pretty much they sift […]
  • 2014
    • How to Give a [TED Worthy] Power of Storytelling Talk DISCLAIMER: This is likely in bad taste and not nearly as funny (or at all) as I thought. I have and continue to commit a few of the sins I lampoon (the campfire photo is usually on slide 1). The real point is to wonder why so few people talk about storytelling in a presentation […]
    • That Pusher Open String Ringing Sliding Bluesy thing I’m no David Kernohan but share a little thing I use probably way to much for blues riffs. It’s basically the one from Steppenwolf’s The Pusher It’d probably still not easy to see the fingers in the video, but I have someone who can show you better. If you have not seen Soundslice, you gotta […]
    • DS106 Radio Corps cc licensed ( BY SA ) flickr photo shared by Alan Levine February 13 is World Radio Day and ds106 is on it! Check it out! Tweet it Out! Broadcast it out! It’s your internet! Keep it Free! cc licensed ( BY SA ) flickr photo shared by Alan Levine  Share this barking on social […]
  • 2013
    • #nightAtORD Two flavors of this story, a series of comic renderings (done via the Halftone iPhone app) or an extended storify. [View the story “#nightAtORD” on Storify] A few thoughts. The whole ideas seemed like a fun way to pass the time via tweets, photos, some audio. It actually is an fascinating experience to observe the […]
    • What is Storytelling? for #etmooc What mean ye storytelling- the #etmooc version from Alan Levine Thar be slides, slides, slides, way too many slides, from a presentation I did online yesterday as part of the ETMOOC Section on Digital Storytelling. You can find resources mentioned at http://cogdog.wikispaces.com/What+Mean+Ye+Storytelling and an archive is available. It was a lot crammed in. I wanted […]
  • 2012
    • My Week 4 of ds106 I’m setting up an example of how I might do my weekly recaps if I were a student in my ds106 class (cough) (cough). I am doing the same work my students are doing. Daily Creates Our task this week was to do one every day! I got 7 out of 7. These were challenging […]
  • 2011
    • Music has liner notes, DVDs have extras… digital stories have stories We buy/get music for many reasons, to enjoy it, but for many people (I hope) there is an interest in knowing more about the musicians, the meaning of songs -hence the liner notes that used to be part of the LP or CD package. I am reading now Bob Dylan in America and caught note […]
    • Packed cc licensed ( BY ) flickr photo shared by cogdogblog It’s time for another “it made sense at the time of planning” crazy road trip. This is three weeks: (Feb 13-16): Washington DC for EDUCAUSE ELI (release of Horizon Report) (Feb 16-18): Keene State College (thanks Mike Caulfied who requested an invasion of the Secret […]
    • CogDog Guide to Nicecasting I’m a huge fan of Rogue Amoeba’s streaming software for OS X, Nicecast, and have used it before for broadcasting for projects at NMC. With the zaniness of free form live broadcasting in the ds106 radio space, people are sorting out the various live streaming tools and learning as we go. This is not going […]
    • The Golden Arm cc licensed ( BY ) flickr photo shared by cogdogblog Since my copy of The Thing at the Foot of the Bed came in the mail yesterday, it was prime time to run another live #ds106radio broadcast of Scary Stories from Strawberry. I set up some props and creepy background music, and lit the live […]
  • 2010
    • Echoes of Cactus Ed cc licensed flickr photo shared by cogdogblog The photo above is literally the title of a book that was pivotal to me 21 years ago (the photo was for today’s @dailyshoot photo assignment). And just reflecting back jolted me to how powerful the words were of Edward Abbey, ripping my gut out from a paperback […]
  • 2008
    • From Flickr to Print Web Storytelling in Interesting Snippets posted 12 Feb ’08, 10.36pm MST PST on flickr Lynette Webbs’ Interesting Snippets Flickr Set came to me via UPS delivery, in print form, ordered from LuLu. This is the first on demand print product I bought, and am impressed with it from concept to product. This set of slides […]
    • Yep, Back Stretched Out posted 12 Feb ’08, 12.00am MST PST on flickr Fresa uses my laptop bag for a pillow Just to be clear, Fresa said, “Start blogging again” so the gates are opening….  Share this barking on social media
  • 2007
    • Buried, Blog Lying Low In between travel for meetings, trying to ramp up the new beta for an NMC site, and some time off this week, the blogging quotient here promises to be low and/or dull. Heck, I;ve not even taken a photo in like a week. And I’m not even getting to go to Northern Voice (sniff). I’m […]
  • 2005
    • Spam Slithered in the MT Cracks Worrisome. I just got Movable Type (2.661) comment spam on entries in one of my blogs where the database has been set via comment closing routines to turn the allow comments to the value that closes them. How is it possible for the roach to sneak in? I had hoped that was a complete shutoff. […]
  • 2004
    • Gone to the Dogster: Dog-jects, Doggie Meta-Data?? UIh-oh, I am going to be busy now. From Ben Hammersley by way of Stephan Downes (who is a cat-person) comes a reference to Dogster ( “catster.com” is registered but no site is there!). Welcome to Dogster …where every dog has a webpage. Dogster lets you view and save photos of dogs, search by breed, […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 20 posts previously published on February 12th

  • 2024
    • 2 / 10 = 20 Years and Big & Little Things I Love About Flickr One day late! I’m sorry Flickr, your 20th Birthday was yesterday but I have been thinking about this for a while, I promise. My love is real! Okay, here are 20 special things (there are more) in no specific order except when they pop out of my head, well actually as I am blitting them […] &amp#x27A1;
  • 2018
    • Not Quite the Cover of the Forest Service Trail Strategy A little record spin horn tooting for a US Forest Service document published with two of my photos in it. I do volunteer work with a local organization that raises funds for and then does the manual work of, expanding a system of hiking/biking trails around Pine and Strawberry, Arizona (I am working on a […] &amp#x27A1;
  • 2016
    • A Feed WordPress Magic Box This is a pondering not a promise. I’ve been thinking longer on this, but have a dream of rolling a lot of the custom coding I have done for past Connected Course projects (e.g. ds106, Thoughtvectors, ETMOOC, Future of Learning, YouShow— all building a syndication hub in WordPress using the Feed WordPress plugin, e.g. Connected […] &amp#x27A1;
  • 2015
    • Playing the Web Walkback Game Here’s a game I play on the web. There are metric tonnes of sights that gather curious / interesting / weird stories be it mentalfloss, neatorama, Random Good Stuff, Holy Kaw… It must be a business, track eyeballs for advertisers, make stuff spreadable, hoping it hits the viral google juiced jackpot. Pretty much they sift […] &amp#x27A1;
  • 2014
    • How to Give a [TED Worthy] Power of Storytelling Talk DISCLAIMER: This is likely in bad taste and not nearly as funny (or at all) as I thought. I have and continue to commit a few of the sins I lampoon (the campfire photo is usually on slide 1). The real point is to wonder why so few people talk about storytelling in a presentation […] &amp#x27A1;
    • That Pusher Open String Ringing Sliding Bluesy thing I’m no David Kernohan but share a little thing I use probably way to much for blues riffs. It’s basically the one from Steppenwolf’s The Pusher It’d probably still not easy to see the fingers in the video, but I have someone who can show you better. If you have not seen Soundslice, you gotta […] &amp#x27A1;
    • DS106 Radio Corps cc licensed ( BY SA ) flickr photo shared by Alan Levine February 13 is World Radio Day and ds106 is on it! Check it out! Tweet it Out! Broadcast it out! It’s your internet! Keep it Free! cc licensed ( BY SA ) flickr photo shared by Alan Levine  Share this barking on social […] &amp#x27A1;
  • 2013
    • #nightAtORD Two flavors of this story, a series of comic renderings (done via the Halftone iPhone app) or an extended storify. [View the story “#nightAtORD” on Storify] A few thoughts. The whole ideas seemed like a fun way to pass the time via tweets, photos, some audio. It actually is an fascinating experience to observe the […] &amp#x27A1;
    • What is Storytelling? for #etmooc What mean ye storytelling- the #etmooc version from Alan Levine Thar be slides, slides, slides, way too many slides, from a presentation I did online yesterday as part of the ETMOOC Section on Digital Storytelling. You can find resources mentioned at http://cogdog.wikispaces.com/What+Mean+Ye+Storytelling and an archive is available. It was a lot crammed in. I wanted […] &amp#x27A1;
  • 2012
    • My Week 4 of ds106 I’m setting up an example of how I might do my weekly recaps if I were a student in my ds106 class (cough) (cough). I am doing the same work my students are doing. Daily Creates Our task this week was to do one every day! I got 7 out of 7. These were challenging […] &amp#x27A1;
  • 2011
    • Music has liner notes, DVDs have extras… digital stories have stories We buy/get music for many reasons, to enjoy it, but for many people (I hope) there is an interest in knowing more about the musicians, the meaning of songs -hence the liner notes that used to be part of the LP or CD package. I am reading now Bob Dylan in America and caught note […] &amp#x27A1;
    • Packed cc licensed ( BY ) flickr photo shared by cogdogblog It’s time for another “it made sense at the time of planning” crazy road trip. This is three weeks: (Feb 13-16): Washington DC for EDUCAUSE ELI (release of Horizon Report) (Feb 16-18): Keene State College (thanks Mike Caulfied who requested an invasion of the Secret […] &amp#x27A1;
    • CogDog Guide to Nicecasting I’m a huge fan of Rogue Amoeba’s streaming software for OS X, Nicecast, and have used it before for broadcasting for projects at NMC. With the zaniness of free form live broadcasting in the ds106 radio space, people are sorting out the various live streaming tools and learning as we go. This is not going […] &amp#x27A1;
    • The Golden Arm cc licensed ( BY ) flickr photo shared by cogdogblog Since my copy of The Thing at the Foot of the Bed came in the mail yesterday, it was prime time to run another live #ds106radio broadcast of Scary Stories from Strawberry. I set up some props and creepy background music, and lit the live […] &amp#x27A1;
  • 2010
    • Echoes of Cactus Ed cc licensed flickr photo shared by cogdogblog The photo above is literally the title of a book that was pivotal to me 21 years ago (the photo was for today’s @dailyshoot photo assignment). And just reflecting back jolted me to how powerful the words were of Edward Abbey, ripping my gut out from a paperback […] &amp#x27A1;
  • 2008
    • From Flickr to Print Web Storytelling in Interesting Snippets posted 12 Feb ’08, 10.36pm MST PST on flickr Lynette Webbs’ Interesting Snippets Flickr Set came to me via UPS delivery, in print form, ordered from LuLu. This is the first on demand print product I bought, and am impressed with it from concept to product. This set of slides […] &amp#x27A1;
    • Yep, Back Stretched Out posted 12 Feb ’08, 12.00am MST PST on flickr Fresa uses my laptop bag for a pillow Just to be clear, Fresa said, “Start blogging again” so the gates are opening….  Share this barking on social media &amp#x27A1;
  • 2007
    • Buried, Blog Lying Low In between travel for meetings, trying to ramp up the new beta for an NMC site, and some time off this week, the blogging quotient here promises to be low and/or dull. Heck, I;ve not even taken a photo in like a week. And I’m not even getting to go to Northern Voice (sniff). I’m […] &amp#x27A1;
  • 2005
    • Spam Slithered in the MT Cracks Worrisome. I just got Movable Type (2.661) comment spam on entries in one of my blogs where the database has been set via comment closing routines to turn the allow comments to the value that closes them. How is it possible for the roach to sneak in? I had hoped that was a complete shutoff. […] &amp#x27A1;
  • 2004
    • Gone to the Dogster: Dog-jects, Doggie Meta-Data?? UIh-oh, I am going to be busy now. From Ben Hammersley by way of Stephan Downes (who is a cat-person) comes a reference to Dogster ( “catster.com” is registered but no site is there!). Welcome to Dogster …where every dog has a webpage. Dogster lets you view and save photos of dogs, search by breed, […] &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 *