“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 16 posts previously published on April 21st

  • 2023
    • My twitter bots and apps have been defecated Just typing the “t” word brings all the smelly fetid connotations. Still, twitter can be a swell place, Wally. The writing on the wall is happening for a string of my web sites and some silly experiments that likely the world will not suffer to be without. And while this week we are hearing of […]
  • 2019
    • Zoom! Extending The SPLOTbox Media Capability Sometimes a SPLOT just needs a little more kick. Well maybe, but I do have a working project with an interest in using the SPLOTbox in a case where the media is from much lesser known site on the other side of the world. I could have just tossed this in as a new case […]
  • 2017
    • One WordPress Thing Leads to Another An issue on a site leads to a solution that almost no one besides me can figure out, so we go at it again. Now there is happiness (infer). One of the more confusing aspects of running WordPress as multi-site is the meaning of the role of Administrator. On a self-hosted single WordPress site, as […]
  • 2016
    • On Hybridity and Disappearing Endpoints On Wednesday I was a virtual digital participant (nod to Laura Gogia) in an OLC Innovate session on Meeting the Potential of Hybridity: Access, Equity, and Inclusion. Planned and carried out by VConnecting (see that, Maha?) colleagues, the session was not focused on Virtually Connecting, but informed by what is now a year of experience. […]
  • 2015
    • The Chronicle Paywall and Paywall Alike Sharing This may be one of my favorite all time portrait photos, capturing I think the playful but serious intent of Audrey Watters. during a Minding the Future event in 2013 at University of Mary Washington. She had picked up a 3D printed shark jaw, and I barely got the camera pointed in time. I’m rather […]
  • 2014
    • Newest Fancy Step in the YouTube Download Dance (why do we need this dance?) In writing up the current ds106 lesson on telling stories, I provided some updates tips in how to download video form YouTube (and other services). In the past I have recommended KeepVid (requires Java, so its no go in Chrome). Since learning about it from Tim Owes, I switched to pwnyoutube, specifically the
  • 2013
    • Train Keep a Rolling I was born in Dixie in a boomer’s shack Just a little shanty by the railroad track Freight train was it taught me how to cry The holler of the driver was my lullaby I snapped a series of photos of this freight train going by out on the Santa Fe tracks behind La Posada […]
  • 2010
    • One Small Social Media Victory: Canon Frees Me From Rebate Hell cc licensed flickr photo shared by Jon Bradley Photography Yay! Just minutes ago, I got a phone call from Michelle from Canon, who apparently caught wind of my blogged descent into Canon Rebate Hell. She apologized for the frustration, and is FedEx-ing my rebate check. So what say you, are blogs dead? Is there no […]
    • You’d Think a Big Site Like GigaOM Would Be Better at Creative Commons cc licensed flickr photo shared by kisses are a better fate than wisdom I’m just a little pup on the web. A one dog show. I’ve got no ads on my blog, no sponsors, no income here. I pay for everything myself. But I sure as hell take the steps to provide attribution credit for […]
  • 2008
    • I Think I Remember These I Think I Remember These by cogdogblog posted 21 Apr ’08, 8.12pm MDT PST on flickr My running shoes have not seen the light outside the closet since the PF Chang’s marathon in January. Today was the first run in like 3 months. Not very far (less than 2 miles), not fast at all, just […]
  • 2006
    • Worlds Collide flickr foto Worlds Collideavailable on my flickr What is Windows XP doing on my Apple laptop? Shazam, that was easy. I Boot Camp-ed Windows XP onto my Apple MacBookPro.  Share this barking on social media
  • 2005
    • Harry Mudd and the TCC 2005 Keynote Whew! An hour ago I finished my one hour keynote presentation for the TCC 2005 Worldwide Online Conference. They asked me to talk about the future, so I hit them with a whiplash induced thing I created, “Harry Mudd, Small Pieces, and that Not Widely Distributed Future”: I thought I had way too much in […]
  • 2004
    • Pachy-ing it Up in The City Doing double duty with the Teaching in the Community Colleges Online Conference (Tues-Thursday) and a Pachyderm Project meeting in San Francisco (Wed-Friday). I read today in a tourist mag, that only out of towners refer to this place as “Frisco” or “San Fran” and that the proper local name is “San Francisco” or “The City”. […]
    • PopSci- A Magazine with Print TrackBacks For the plane flight reading from Phoenix to San Francisco, I grabbed a copy of Popular Science (the last time I read it was a preview of a new TR7, “the Shape of Things to Come”). I thought it interesting that column right under the letters to the editors reads: From the Blogs… Last month, […]
    • Teaching in the Community Colleges Online Conference The Teaching in the Community Colleges Online Conference is 2/3 over, with one more day of events tomorrow. I’ve had less then available time to participate for reasons to be blogged below, but leave it to say, I am representing Arizona at a virtual conference hosted in Hawaii while I am at a meeting in […]
  • 2003
    • RSS & LOs BlogMentions Just to keep up, here is some summary blog action referring to our work here on Learning Objects and RSS (Too bad Manila/Radio users do not have their entries coded internally to be recognized via autodiscover, and cannot be TrackBacked)… And it has been only about a week or two since the dabbling really got […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 16 posts previously published on April 21st

  • 2023
    • My twitter bots and apps have been defecated Just typing the “t” word brings all the smelly fetid connotations. Still, twitter can be a swell place, Wally. The writing on the wall is happening for a string of my web sites and some silly experiments that likely the world will not suffer to be without. And while this week we are hearing of […] &amp#x27A1;
  • 2019
    • Zoom! Extending The SPLOTbox Media Capability Sometimes a SPLOT just needs a little more kick. Well maybe, but I do have a working project with an interest in using the SPLOTbox in a case where the media is from much lesser known site on the other side of the world. I could have just tossed this in as a new case […] &amp#x27A1;
  • 2017
    • One WordPress Thing Leads to Another An issue on a site leads to a solution that almost no one besides me can figure out, so we go at it again. Now there is happiness (infer). One of the more confusing aspects of running WordPress as multi-site is the meaning of the role of Administrator. On a self-hosted single WordPress site, as […] &amp#x27A1;
  • 2016
    • On Hybridity and Disappearing Endpoints On Wednesday I was a virtual digital participant (nod to Laura Gogia) in an OLC Innovate session on Meeting the Potential of Hybridity: Access, Equity, and Inclusion. Planned and carried out by VConnecting (see that, Maha?) colleagues, the session was not focused on Virtually Connecting, but informed by what is now a year of experience. […] &amp#x27A1;
  • 2015
    • The Chronicle Paywall and Paywall Alike Sharing This may be one of my favorite all time portrait photos, capturing I think the playful but serious intent of Audrey Watters. during a Minding the Future event in 2013 at University of Mary Washington. She had picked up a 3D printed shark jaw, and I barely got the camera pointed in time. I’m rather […] &amp#x27A1;
  • 2014
  • 2013
    • Train Keep a Rolling I was born in Dixie in a boomer’s shack Just a little shanty by the railroad track Freight train was it taught me how to cry The holler of the driver was my lullaby I snapped a series of photos of this freight train going by out on the Santa Fe tracks behind La Posada […] &amp#x27A1;
  • 2010
  • 2008
    • I Think I Remember These I Think I Remember These by cogdogblog posted 21 Apr ’08, 8.12pm MDT PST on flickr My running shoes have not seen the light outside the closet since the PF Chang’s marathon in January. Today was the first run in like 3 months. Not very far (less than 2 miles), not fast at all, just […] &amp#x27A1;
  • 2006
    • Worlds Collide flickr foto Worlds Collideavailable on my flickr What is Windows XP doing on my Apple laptop? Shazam, that was easy. I Boot Camp-ed Windows XP onto my Apple MacBookPro.  Share this barking on social media &amp#x27A1;
  • 2005
    • Harry Mudd and the TCC 2005 Keynote Whew! An hour ago I finished my one hour keynote presentation for the TCC 2005 Worldwide Online Conference. They asked me to talk about the future, so I hit them with a whiplash induced thing I created, “Harry Mudd, Small Pieces, and that Not Widely Distributed Future”: I thought I had way too much in […] &amp#x27A1;
  • 2004
    • Pachy-ing it Up in The City Doing double duty with the Teaching in the Community Colleges Online Conference (Tues-Thursday) and a Pachyderm Project meeting in San Francisco (Wed-Friday). I read today in a tourist mag, that only out of towners refer to this place as “Frisco” or “San Fran” and that the proper local name is “San Francisco” or “The City”. […] &amp#x27A1;
    • PopSci- A Magazine with Print TrackBacks For the plane flight reading from Phoenix to San Francisco, I grabbed a copy of Popular Science (the last time I read it was a preview of a new TR7, “the Shape of Things to Come”). I thought it interesting that column right under the letters to the editors reads: From the Blogs… Last month, […] &amp#x27A1;
    • Teaching in the Community Colleges Online Conference The Teaching in the Community Colleges Online Conference is 2/3 over, with one more day of events tomorrow. I’ve had less then available time to participate for reasons to be blogged below, but leave it to say, I am representing Arizona at a virtual conference hosted in Hawaii while I am at a meeting in […] &amp#x27A1;
  • 2003
    • RSS & LOs BlogMentions Just to keep up, here is some summary blog action referring to our work here on Learning Objects and RSS (Too bad Manila/Radio users do not have their entries coded internally to be recognized via autodiscover, and cannot be TrackBacked)… And it has been only about a week or two since the dabbling really got […] &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 *