“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 17 posts previously published on March 9th

  • 2019
    • Coloring Black & White Photos with AI– Bringing to Life, or? Old black and white photos- do they look old just because the lack the colors most of us see day to day? We look back at them from a world full of colors, but so did the original photographer. Can we open that world again? Among many tweets that slip by on a daily basis, […]
  • 2015
    • A Tool List For Gail I had thought of this (and then forgot) the last time I taught DS106. It seemed like a good idea to ask students as they worked through the process to keep on their site a running collection of the tools […]
    • The You Show Videos Probably the most rewarding thing Brian and I did on the You Show was our series of introductory videos. The ironic thing is that they are not even essential to the “content.” I’ve been thinking about that nearly all of […]
    • Reshaping This Thing Coming into my last week here at TRU I am hoping to get my portfolio site into shape to represent the four months here of my fellowship. I am very pleased with the capabilities of this Moesia Lite theme (a […]
  • 2013
    • Digging Myself Out of the Blog Hole cc licensed ( BY NC ND ) flickr photo shared by Artbandito Between the impact of long distance travel, getting the customer service enema treatment from US Failways, and falling under the spell of plane induced cough/cold, I am overflowing with excuses not to be blogging. I’ve enjoyed two full days of doing workshops and […]
    • Short Term Hacky Fix for ds106 Radio Live Stream Announcing (using Ladiocast) cc licensed ( BY SA ) flickr photo shared by The Daring Librarian One of the things the veterans of ds106 radio miss with the new station software is the ability for the @ds106radio twitterbot to recognize when a live braodcast has been started. I have full confidence Grant Potter will sort it out. Tonight, […]
    • PT Barnum GIFs Alive and Well on the Web It’s not the blinking blue border that makes me chuckle, it’s the double take of “this is not a joke” combined with a smiley face. I would guess the click also gets you to the place to be the prime ocean front real estate in Mohave County, Arizona.  Share this barking on social media
  • 2011
    • I’m Your Dog Thanks to the glory of keyword search and random related videos linking, today I found the new theme song for CogDogBlog– I can hear your toes tapping to this song by comedian Sean Morey, but just so you can enjoy it more, I put some energy into transcribing it. I am your dog and I […]
  • 2010
    • TEDxNYED-ed cc licensed flickr photo shared by aliceskr It’s been rattling around in the grey matter since Saturday, an un-organized strand of thoughts about the TEDxNYED event— and lacking a clever title, I made it a past tense verb (and that is something I expect no one to even spot as clever). Just to set the […]
  • 2009
    • Follow a Trail of Content via RSS, Republishing, Retweeting After all these years (like maybe 7? 8?) RSS is still so hot some regimes may wish to ban it, but it is the magic magic magic glue that makes content move around the web. Here is one little story. At NMC, I run a WordPress powered site to publish stories our Second Life work […]
    • AT&T Can’t Tell Time nor Support Customers 2009/365/67 AT&T Can’t Tell Time by cogdogblog posted 8 Mar ’09, 9.05pm MDT PST on flickr Went I went to be last night, my analog watch and my iPhone had the same time. This morning, after the start of daylight savings, my iphone (which is set to be automatic time zone for Phoenix) decided to […]
  • 2006
    • Digital Story Podcast Feed (and a free iTunes RSS Maker tool) I am working on getting over my podcast malady. For the past few years, two of our faculty that teach a semester-long class in digital storytelling have provided the same experience in compressed form for faculty as a 40 hour “Bringing Digital Storytelling to the Classroom LearnShop”. I started hovering in the August 2004 session […]
  • 2005
    • Subjects Wanted for 5 minute Skyperviews On Digital Audio My editor is breathing down my back (considering it is like 15 degrees this morning in New York City, that may not be a bad thing). No, I am behind on writing my technology column for the Spring 2005 issue of our publication, the mcli Forum . I need some help 😉 The article will […]
  • 2004
    • Furl-ing Syndicated (to the right) Niiiiiiiice. I have been mildly using Furl because I tend to bookmark things on my home computer I end up needing at work, and on my work computer I end up needing at home. Call it Murphy’s law of bookmarks. Furl does this with little fuss, just a bookmarklet link. I thought I had noticed […]
    • ePortfolio Beta Opens Last Friday’s Ocotillo Online Learning Group meeting was the first announcement and access provided to a new experimental electronic portfolio service we are hosting. This is a new installation of the software developed at Chandler-Gilbert Community College— we have set up this new server so that faculty form our other colleges could explore the potential […]
    • NMC Online Conference Post…. err…. Mortum? This morning was the release of my keynote on “Mysteries Revealed! Inside the Maricopa Learning eXchange” at the New Media Consortium Spring 2004 Online Conference. This turned out to be a 52 minute Breeze presentation, weighing in at a 70.5 Mb in authored PowerPoint, but a streaming 15 Mb via Breeze delivered Flash. At 9:30 […]
    • WaterField Designs Novel Concept: Excellent Laptop Bags and Personal Service Of course you can pick up a $20 bag at OfficeMax for your laptop, and end up with the same one as every other cheapskate on the plane playing solitaire on with their ThinkPad, with zippers that bust, too many stupid pockets, and just no protection for your investment of several hundred/thousand bucks. On the […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 17 posts previously published on March 9th

  • 2019
  • 2015
    • A Tool List For Gail I had thought of this (and then forgot) the last time I taught DS106. It seemed like a good idea to ask students as they worked through the process to keep on their site a running collection of the tools […] &amp#x27A1;
    • The You Show Videos Probably the most rewarding thing Brian and I did on the You Show was our series of introductory videos. The ironic thing is that they are not even essential to the “content.” I’ve been thinking about that nearly all of […] &amp#x27A1;
    • Reshaping This Thing Coming into my last week here at TRU I am hoping to get my portfolio site into shape to represent the four months here of my fellowship. I am very pleased with the capabilities of this Moesia Lite theme (a […] &amp#x27A1;
  • 2013
    • Digging Myself Out of the Blog Hole cc licensed ( BY NC ND ) flickr photo shared by Artbandito Between the impact of long distance travel, getting the customer service enema treatment from US Failways, and falling under the spell of plane induced cough/cold, I am overflowing with excuses not to be blogging. I’ve enjoyed two full days of doing workshops and […] &amp#x27A1;
    • Short Term Hacky Fix for ds106 Radio Live Stream Announcing (using Ladiocast) cc licensed ( BY SA ) flickr photo shared by The Daring Librarian One of the things the veterans of ds106 radio miss with the new station software is the ability for the @ds106radio twitterbot to recognize when a live braodcast has been started. I have full confidence Grant Potter will sort it out. Tonight, […] &amp#x27A1;
    • PT Barnum GIFs Alive and Well on the Web It’s not the blinking blue border that makes me chuckle, it’s the double take of “this is not a joke” combined with a smiley face. I would guess the click also gets you to the place to be the prime ocean front real estate in Mohave County, Arizona.  Share this barking on social media &amp#x27A1;
  • 2011
    • I’m Your Dog Thanks to the glory of keyword search and random related videos linking, today I found the new theme song for CogDogBlog– I can hear your toes tapping to this song by comedian Sean Morey, but just so you can enjoy it more, I put some energy into transcribing it. I am your dog and I […] &amp#x27A1;
  • 2010
    • TEDxNYED-ed cc licensed flickr photo shared by aliceskr It’s been rattling around in the grey matter since Saturday, an un-organized strand of thoughts about the TEDxNYED event— and lacking a clever title, I made it a past tense verb (and that is something I expect no one to even spot as clever). Just to set the […] &amp#x27A1;
  • 2009
    • Follow a Trail of Content via RSS, Republishing, Retweeting After all these years (like maybe 7? 8?) RSS is still so hot some regimes may wish to ban it, but it is the magic magic magic glue that makes content move around the web. Here is one little story. At NMC, I run a WordPress powered site to publish stories our Second Life work […] &amp#x27A1;
    • AT&T Can’t Tell Time nor Support Customers 2009/365/67 AT&T Can’t Tell Time by cogdogblog posted 8 Mar ’09, 9.05pm MDT PST on flickr Went I went to be last night, my analog watch and my iPhone had the same time. This morning, after the start of daylight savings, my iphone (which is set to be automatic time zone for Phoenix) decided to […] &amp#x27A1;
  • 2006
    • Digital Story Podcast Feed (and a free iTunes RSS Maker tool) I am working on getting over my podcast malady. For the past few years, two of our faculty that teach a semester-long class in digital storytelling have provided the same experience in compressed form for faculty as a 40 hour “Bringing Digital Storytelling to the Classroom LearnShop”. I started hovering in the August 2004 session […] &amp#x27A1;
  • 2005
    • Subjects Wanted for 5 minute Skyperviews On Digital Audio My editor is breathing down my back (considering it is like 15 degrees this morning in New York City, that may not be a bad thing). No, I am behind on writing my technology column for the Spring 2005 issue of our publication, the mcli Forum . I need some help 😉 The article will […] &amp#x27A1;
  • 2004
    • Furl-ing Syndicated (to the right) Niiiiiiiice. I have been mildly using Furl because I tend to bookmark things on my home computer I end up needing at work, and on my work computer I end up needing at home. Call it Murphy’s law of bookmarks. Furl does this with little fuss, just a bookmarklet link. I thought I had noticed […] &amp#x27A1;
    • ePortfolio Beta Opens Last Friday’s Ocotillo Online Learning Group meeting was the first announcement and access provided to a new experimental electronic portfolio service we are hosting. This is a new installation of the software developed at Chandler-Gilbert Community College— we have set up this new server so that faculty form our other colleges could explore the potential […] &amp#x27A1;
    • NMC Online Conference Post…. err…. Mortum? This morning was the release of my keynote on “Mysteries Revealed! Inside the Maricopa Learning eXchange” at the New Media Consortium Spring 2004 Online Conference. This turned out to be a 52 minute Breeze presentation, weighing in at a 70.5 Mb in authored PowerPoint, but a streaming 15 Mb via Breeze delivered Flash. At 9:30 […] &amp#x27A1;
    • WaterField Designs Novel Concept: Excellent Laptop Bags and Personal Service Of course you can pick up a $20 bag at OfficeMax for your laptop, and end up with the same one as every other cheapskate on the plane playing solitaire on with their ThinkPad, with zippers that bust, too many stupid pockets, and just no protection for your investment of several hundred/thousand bucks. On the […] &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 *