“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 15 posts previously published on June 13th

  • 2023
    • Joy! H5P in Web Article… Alas, No Metadata I sure miss the days of supporting the H5P Kitchen project — if anything really hits the elements of the olde 5 Rs, to me, it’s the portability, platform independence, downloadability, reusability of H5P plus, the thing fe really love, built in metadata. So when I spotted a reshare of this University Affairs online article […]
  • 2018
    • A Few #whydomain stories in for @ontarioextend Last week I posted some “interview” questions for educators who have their own self-hosted domain; here are a few first responses. My idea for doing this is to give some wisdom of others who have gone down this road to our participants in the Ontario Extend project supported by eCampus Ontario. These participants working towards […]
    • Dropping The Number Where I first heard this line is forgotten, but it has invariably proven to be true when someone I meet shares their phone number. Your area code probably indicates where you lived in 2008. I’m plenty old to remember the fixed geolocation of an area code (well you would look it up on a map […]
  • 2017
    • Image AI: Amazing When It Works? Silly When Not? Yes. At a session today on “Deep Learning” at the ASCUE17 conference Steve Kenode lauded the merits of advanced machine learning, like Deep Mind‘s “learning” the best way to play Breakout I did appreciate the schematic way he explained it for a lay audience (including me) with the way weights are assigned to relationships; I’m a […]
    • A Long Soaring Dive… this is What Blogging Does Many people (not here) see blogging as a thing of the past; most of the regular ones I was reading back in the early to mid 2000s have fallen silent or just vanished. Insert whatever theory you have. This one keeps going, no let up since it’s start in 2003. Here is but one small […]
  • 2016
    • OS Upgrade Pulp Novels I don;t have much time or energy to do a big writeup, but seeing a DS106 Daily Create on remixing book covers, is hard to pass (well I knew about it since I put in the site, but that was a while again). I just scrolled through a long list of covers found in Google […]
  • 2012
    • Right out of Piedmont cc licensed ( BY ) flickr photo shared by cogdogblog With activity ramping up for me at the Northern Voice conference this week, my window for MADI (Making Art Damn It) is closing, hence here I sit working an hour on a faux book cover for the I Can Read Movies assiognment: Create a film-based […]
  • 2011
    • Audio Books as Audiobooks In preparation for my upcoming long road time, I’ve been organizing some audio books to fill some of the time/space. There is a veritable bag of gold from the Internet Archive. I also found a decent selection of free (public domain) Adventure Audio Books. A small problem with them is that these are really a […]
  • 2010
    • Award for Sloppiest Email Spam Ever I mean c’mon, if you are going to the effort to run bots to spam and phish me, at least try to be convincing! The CogDog judge gives this a -1 for effort and a 0 for originality. How many hours were sent crafting: To: undisclosed recipients; Subject: our Email ID has been awarded 1,000,000.00 […]
  • 2009
    • Thanks, Kathy As you may know, after seeing her speak in 2008 at SXSW and WordCamp, I was rather determined to invite Kathy Sierra to keynote the 2009 NMC Summer Conference. I was a fan long before this as a follower of her blog Creating Passionate Users. I had done a parady of her graphic style in […]
  • 2006
    • Tagging It to the Next Level While there are at least 20 or more different social bookmark tools out there, I am pretty much committed and hooked on del.icio.us. It has that no frills but highly functional interface, but mainly because it has so many subtle features that are easy to overlook, even if you have been a regular user. It […]
    • Holy RipMix! What is a Blog? Web video is exploding, and more than just hosting and tagging clips with exploding soda bottles… Check out this re-mixed clip from the Weblog Project called What is a Blog? The 50 Second Answer: This is a great remix that really shows how much more impact and insight a short well edited clip can do […]
    • Flickr Quick Response… the Same Response I cannot complains anymore that flickr is not responding to my mad barkings… as the last attempt got a response in just a few hours. Yay! But the contents or just more of the same… “We think Second Life photos are screen shots, you are still NIPSA”: From: “Flickr Support” <ase103599@support.flickr.com> Date: June 13, 2006 […]
    • Knock Knock Flickr For anyone besides me keeping count on my sags of Flickr slapping me NIPSA, it has been 11 days since I emailed flickr, and more than 21 days since the last previous attempt. I have received a lot of interesting commentary, and support from the bone I had to pick with flickr about a new […]
  • 2003
    • 3 @ NMC Summer Conference It’s been a jam packed day at the New Media Consortium 2003 summer conference in lovely (humid) Blacksburg Virginia (Hokie-land, Virginia Tech). The Maricopa Learning eXchange got a large dose of exposure today, and I am thinking many people are going home thinking “Gotta do a Google on RSS”  Share this barking on social media
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 15 posts previously published on June 13th

  • 2023
    • Joy! H5P in Web Article… Alas, No Metadata I sure miss the days of supporting the H5P Kitchen project — if anything really hits the elements of the olde 5 Rs, to me, it’s the portability, platform independence, downloadability, reusability of H5P plus, the thing fe really love, built in metadata. So when I spotted a reshare of this University Affairs online article […] &amp#x27A1;
  • 2018
    • A Few #whydomain stories in for @ontarioextend Last week I posted some “interview” questions for educators who have their own self-hosted domain; here are a few first responses. My idea for doing this is to give some wisdom of others who have gone down this road to our participants in the Ontario Extend project supported by eCampus Ontario. These participants working towards […] &amp#x27A1;
    • Dropping The Number Where I first heard this line is forgotten, but it has invariably proven to be true when someone I meet shares their phone number. Your area code probably indicates where you lived in 2008. I’m plenty old to remember the fixed geolocation of an area code (well you would look it up on a map […] &amp#x27A1;
  • 2017
    • Image AI: Amazing When It Works? Silly When Not? Yes. At a session today on “Deep Learning” at the ASCUE17 conference Steve Kenode lauded the merits of advanced machine learning, like Deep Mind‘s “learning” the best way to play Breakout I did appreciate the schematic way he explained it for a lay audience (including me) with the way weights are assigned to relationships; I’m a […] &amp#x27A1;
    • A Long Soaring Dive… this is What Blogging Does Many people (not here) see blogging as a thing of the past; most of the regular ones I was reading back in the early to mid 2000s have fallen silent or just vanished. Insert whatever theory you have. This one keeps going, no let up since it’s start in 2003. Here is but one small […] &amp#x27A1;
  • 2016
    • OS Upgrade Pulp Novels I don;t have much time or energy to do a big writeup, but seeing a DS106 Daily Create on remixing book covers, is hard to pass (well I knew about it since I put in the site, but that was a while again). I just scrolled through a long list of covers found in Google […] &amp#x27A1;
  • 2012
    • Right out of Piedmont cc licensed ( BY ) flickr photo shared by cogdogblog With activity ramping up for me at the Northern Voice conference this week, my window for MADI (Making Art Damn It) is closing, hence here I sit working an hour on a faux book cover for the I Can Read Movies assiognment: Create a film-based […] &amp#x27A1;
  • 2011
    • Audio Books as Audiobooks In preparation for my upcoming long road time, I’ve been organizing some audio books to fill some of the time/space. There is a veritable bag of gold from the Internet Archive. I also found a decent selection of free (public domain) Adventure Audio Books. A small problem with them is that these are really a […] &amp#x27A1;
  • 2010
    • Award for Sloppiest Email Spam Ever I mean c’mon, if you are going to the effort to run bots to spam and phish me, at least try to be convincing! The CogDog judge gives this a -1 for effort and a 0 for originality. How many hours were sent crafting: To: undisclosed recipients; Subject: our Email ID has been awarded 1,000,000.00 […] &amp#x27A1;
  • 2009
    • Thanks, Kathy As you may know, after seeing her speak in 2008 at SXSW and WordCamp, I was rather determined to invite Kathy Sierra to keynote the 2009 NMC Summer Conference. I was a fan long before this as a follower of her blog Creating Passionate Users. I had done a parady of her graphic style in […] &amp#x27A1;
  • 2006
    • Tagging It to the Next Level While there are at least 20 or more different social bookmark tools out there, I am pretty much committed and hooked on del.icio.us. It has that no frills but highly functional interface, but mainly because it has so many subtle features that are easy to overlook, even if you have been a regular user. It […] &amp#x27A1;
    • Holy RipMix! What is a Blog? Web video is exploding, and more than just hosting and tagging clips with exploding soda bottles… Check out this re-mixed clip from the Weblog Project called What is a Blog? The 50 Second Answer: This is a great remix that really shows how much more impact and insight a short well edited clip can do […] &amp#x27A1;
    • Flickr Quick Response… the Same Response I cannot complains anymore that flickr is not responding to my mad barkings… as the last attempt got a response in just a few hours. Yay! But the contents or just more of the same… “We think Second Life photos are screen shots, you are still NIPSA”: From: “Flickr Support” <ase103599@support.flickr.com> Date: June 13, 2006 […] &amp#x27A1;
    • Knock Knock Flickr For anyone besides me keeping count on my sags of Flickr slapping me NIPSA, it has been 11 days since I emailed flickr, and more than 21 days since the last previous attempt. I have received a lot of interesting commentary, and support from the bone I had to pick with flickr about a new […] &amp#x27A1;
  • 2003
    • 3 @ NMC Summer Conference It’s been a jam packed day at the New Media Consortium 2003 summer conference in lovely (humid) Blacksburg Virginia (Hokie-land, Virginia Tech). The Maricopa Learning eXchange got a large dose of exposure today, and I am thinking many people are going home thinking “Gotta do a Google on RSS”  Share this barking on social media &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 *