“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 June 12th

  • 2024
    • By the Blog: Long Lost Cousin Found plus Photo of My Aunt Doris It’s meaningful to me even if “nobody” blogs anymore, these things still work as generators of potential serendipity. Earlier this year, I rummaged through some old photos, online databases, exploring what small shreds I could find about my mother’s brother, my Uncle Harvey. I have the barest warm glow shreds of memories his wife, my […]
  • 2023
    • This Blog Now Powered By A.I. Levine Google Docs will have it, Microsoft is brewing it, PhotoShop is doing it, so is zoom…it’s high time that the advanced technology of CogDogBlog hop on the artificial intelligence inevitable train. As demonstrated this week at the Reclaim Open 2023 conference, behold the new generation of blogging powered by AI Levine: This is all the […]
  • 2019
    • Chasing the Course Arc: Storied Workshop for Kenyon College After engaging with a group of high energy faculty/staff at Kenyon College last week, the answer for the Campbell Consortium may just be… “maybe”. The question was set up as Seeking Answers: Can a Narrative Tie a Course Together? Whether there is such an organization as the Campbell Consortium is beside the point… or is […]
  • 2018
    • Interviewing CogDogBlog.com That thing about eating your own dogfood? It’s really quite good stuff. Last week I posted some questions for people to answer about the story of their own domains. This was aimed at helping our Ontario Extend project participants answer that Why Should I Bother With My Own Domain question (they may not even have […]
  • 2017
    • Those Flying Cars We Never Got for #ASCUE17 I’m seconded now in Myrtle Beach, South Carolina for the ASCUE annual conference. This is their 50th annual event, that is no typo, fifty as in Five Oh, as confirmed by people today I met who have been coming for 15, 20, and one gentleman, all 50. The invite to keynote this conference came quite […]
  • 2015
    • The Open Show (an un-paneled panel talk) at DML 2015 As I said in the opening, the idea for this session proposed for the DML Conference was totally my idea, so if it flopped, I am happy to take the blame and if it went well, I give credit to the co-presenters. Fortunately it was the latter, Laura Gibbs, Ben Werdmüller, Erin Richey, Jonathan Worth, […]
  • 2014
    • As We May Nugget creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog This is my second or third reading of Vannevar Bush’s essay As We May Think, having done so before in Gardner Campbell’s New Media Seminar. In the spirit of Associative Trailing, I tracked down on the NMC archived web site a podcast Gardner and […]
  • 2013
    • I Am @IAmTalkyTina I thought I could hold out, but because of reasons I am outlining below, I am admitting right here, as the eternal truth. I invented the character, twtter account, web site named after the Talky Tina doll from the
  • 2012
    • Week 3 Letter Home from Camp cc licensed ( BY ) flickr photo shared by photosteve101 Dear Dominoe, I thought I would write since it has been like forever since I last communicated (literally), but who would understand me better than the dog pal who followed me across the country and then some. You might noy be aware, but I have […]
    • Fantastic Slide Guy Just one more Slide Guy. Because who would not want to slide on a voyage with Raquel Welch.  Share this barking on social media
    • Venn Gandalf I’ve been all day peeking at the different design magic of Stephen Wildish’s site, I think we linked last year to one of his film alphabets, but all of his work has powerful elements of graphic design we are introducing this week to ds106 / Camp Magic Macguffin. The one that got under my skin […]
  • 2011
    • Salute to Scottlo (one last post before I exit for camping!) For those in the ds106 Radio fold, this week’s drama has been the reported demise of our New/Old Radio Friend, Scottlo. The “death” part being a bit downloayed, it has been a fascinating thing to watch unfold as he (Scottlo? Otto? Frank?) examines, reinvents, who he is […]
    • Gone Camping cc licensed ( BY ) flickr photo shared by cogdogblog It’s time to shut the lid and go offline. I’m going to pack up the camping gear, the kayak, and head up to Knoll Lake on the Mogollon Rim, to enjoy some mellow time. Might be back tomorrow, or Tuesday, or …. This is a […]
    • Real Virtual Connections cc licensed ( BY ) flickr photo shared by cogdogblog We often frame our ideas about the virtual/online spaces we inhabit as being separate, across some boundary from, the real ones we inhabit- we go binary, either/or, on/off, black/white. Like the image above, I find it not so neatly define, it is a swirl. Bear […]
  • 2006
    • NMC Summer Conference Podcasts This afternoon I did some minor editing (cutting some files into smaller pieces) from the audio recordings provided by the media team at Case for last week’s NMC Summer Conference, and in addition, posted a 5 minute video that was shown at the Second Life launch session. The audio quality is mostly good, with some […]
    • Home Hot Home There is no place like it, even when the outside temps are a moderate 112 degrees 😉 After about 9 days straight of work for last week’s NMC Conference in Cleveland, I have a few days set aside for catching up on home stuff like: * replacing a cracked disposal in the kitchen sink * […]
    • That’s No Way to Sort a Calendar Well shoot, I thought Google Calendar was going to be a killer app. I had set one up for our NMC Second Life blog site, hoping the calendar sharing features might allow others we give access the ability to schedule their events. Well, it does do that. But noted by someone in an email who […]
  • 2005
    • Back To del.icio.us Bookmarking Call me fickle, but despite some recent barking about the new social bookmark site Jots, I am romping back to del.icio.us for my primary bookmarking. Ttecnically, I am using my multi-bookmark tool to post to del.icio.us, Furl, and our Bag of URLs site… Furl since I have a big pile there not elsewhere, the “Bag” […]
    • Lap Dog flickr foto Over Thereavailable on my flickr Look Sani, there goes a cat! Get it! Hanging out a few days in San Diego- here is my stepsom’s 130 pound lapdog, ‘Sani’, a sweeter than sugar Great Dane puppy.  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 19 posts previously published on June 12th

  • 2024
    • By the Blog: Long Lost Cousin Found plus Photo of My Aunt Doris It’s meaningful to me even if “nobody” blogs anymore, these things still work as generators of potential serendipity. Earlier this year, I rummaged through some old photos, online databases, exploring what small shreds I could find about my mother’s brother, my Uncle Harvey. I have the barest warm glow shreds of memories his wife, my […] &amp#x27A1;
  • 2023
    • This Blog Now Powered By A.I. Levine Google Docs will have it, Microsoft is brewing it, PhotoShop is doing it, so is zoom…it’s high time that the advanced technology of CogDogBlog hop on the artificial intelligence inevitable train. As demonstrated this week at the Reclaim Open 2023 conference, behold the new generation of blogging powered by AI Levine: This is all the […] &amp#x27A1;
  • 2019
    • Chasing the Course Arc: Storied Workshop for Kenyon College After engaging with a group of high energy faculty/staff at Kenyon College last week, the answer for the Campbell Consortium may just be… “maybe”. The question was set up as Seeking Answers: Can a Narrative Tie a Course Together? Whether there is such an organization as the Campbell Consortium is beside the point… or is […] &amp#x27A1;
  • 2018
    • Interviewing CogDogBlog.com That thing about eating your own dogfood? It’s really quite good stuff. Last week I posted some questions for people to answer about the story of their own domains. This was aimed at helping our Ontario Extend project participants answer that Why Should I Bother With My Own Domain question (they may not even have […] &amp#x27A1;
  • 2017
    • Those Flying Cars We Never Got for #ASCUE17 I’m seconded now in Myrtle Beach, South Carolina for the ASCUE annual conference. This is their 50th annual event, that is no typo, fifty as in Five Oh, as confirmed by people today I met who have been coming for 15, 20, and one gentleman, all 50. The invite to keynote this conference came quite […] &amp#x27A1;
  • 2015
    • The Open Show (an un-paneled panel talk) at DML 2015 As I said in the opening, the idea for this session proposed for the DML Conference was totally my idea, so if it flopped, I am happy to take the blame and if it went well, I give credit to the co-presenters. Fortunately it was the latter, Laura Gibbs, Ben Werdmüller, Erin Richey, Jonathan Worth, […] &amp#x27A1;
  • 2014
    • As We May Nugget creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog This is my second or third reading of Vannevar Bush’s essay As We May Think, having done so before in Gardner Campbell’s New Media Seminar. In the spirit of Associative Trailing, I tracked down on the NMC archived web site a podcast Gardner and […] &amp#x27A1;
  • 2013
    • I Am @IAmTalkyTina I thought I could hold out, but because of reasons I am outlining below, I am admitting right here, as the eternal truth. I invented the character, twtter account, web site named after the Talky Tina doll from the &amp#x27A1;
  • 2012
    • Week 3 Letter Home from Camp cc licensed ( BY ) flickr photo shared by photosteve101 Dear Dominoe, I thought I would write since it has been like forever since I last communicated (literally), but who would understand me better than the dog pal who followed me across the country and then some. You might noy be aware, but I have […] &amp#x27A1;
    • Fantastic Slide Guy Just one more Slide Guy. Because who would not want to slide on a voyage with Raquel Welch.  Share this barking on social media &amp#x27A1;
    • Venn Gandalf I’ve been all day peeking at the different design magic of Stephen Wildish’s site, I think we linked last year to one of his film alphabets, but all of his work has powerful elements of graphic design we are introducing this week to ds106 / Camp Magic Macguffin. The one that got under my skin […] &amp#x27A1;
  • 2011
    • Salute to Scottlo (one last post before I exit for camping!) For those in the ds106 Radio fold, this week’s drama has been the reported demise of our New/Old Radio Friend, Scottlo. The “death” part being a bit downloayed, it has been a fascinating thing to watch unfold as he (Scottlo? Otto? Frank?) examines, reinvents, who he is […] &amp#x27A1;
    • Gone Camping cc licensed ( BY ) flickr photo shared by cogdogblog It’s time to shut the lid and go offline. I’m going to pack up the camping gear, the kayak, and head up to Knoll Lake on the Mogollon Rim, to enjoy some mellow time. Might be back tomorrow, or Tuesday, or …. This is a […] &amp#x27A1;
    • Real Virtual Connections cc licensed ( BY ) flickr photo shared by cogdogblog We often frame our ideas about the virtual/online spaces we inhabit as being separate, across some boundary from, the real ones we inhabit- we go binary, either/or, on/off, black/white. Like the image above, I find it not so neatly define, it is a swirl. Bear […] &amp#x27A1;
  • 2006
    • NMC Summer Conference Podcasts This afternoon I did some minor editing (cutting some files into smaller pieces) from the audio recordings provided by the media team at Case for last week’s NMC Summer Conference, and in addition, posted a 5 minute video that was shown at the Second Life launch session. The audio quality is mostly good, with some […] &amp#x27A1;
    • Home Hot Home There is no place like it, even when the outside temps are a moderate 112 degrees 😉 After about 9 days straight of work for last week’s NMC Conference in Cleveland, I have a few days set aside for catching up on home stuff like: * replacing a cracked disposal in the kitchen sink * […] &amp#x27A1;
    • That’s No Way to Sort a Calendar Well shoot, I thought Google Calendar was going to be a killer app. I had set one up for our NMC Second Life blog site, hoping the calendar sharing features might allow others we give access the ability to schedule their events. Well, it does do that. But noted by someone in an email who […] &amp#x27A1;
  • 2005
    • Back To del.icio.us Bookmarking Call me fickle, but despite some recent barking about the new social bookmark site Jots, I am romping back to del.icio.us for my primary bookmarking. Ttecnically, I am using my multi-bookmark tool to post to del.icio.us, Furl, and our Bag of URLs site… Furl since I have a big pile there not elsewhere, the “Bag” […] &amp#x27A1;
    • Lap Dog flickr foto Over Thereavailable on my flickr Look Sani, there goes a cat! Get it! Hanging out a few days in San Diego- here is my stepsom’s 130 pound lapdog, ‘Sani’, a sweeter than sugar Great Dane puppy.  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 *