“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 13 posts previously published on February 27th

  • 2016
    • Seeking Evidence of Badge Evidence My upcoming long term project is all about building a credential system. Most of the first reflexes on hearing is “Go Directly to Badges, Do Not Pass Go.” It’s two weeks before I start, but my brain is already in motion, so I am info grazing. Now I have been a little bit flip about […]
  • 2015
    • The Internet Reacts to Teens Reacting to the Internet My idea for this remix is likely better than the execution. The FineBros has a brilliant series of Kids React videos where modern youth try to make sense of past culture, toys, and technology. They seem to average like 9 kazillion views per video; I’m lucky if I hit double digits. In some research for […]
    • Blog Makeover: The You Show Edition Heading into a latter (not last, not ending, not over) phase of the You Show, in unit 5 we offer/ask participants to consider how they move a site that looks pretty bloggy into something that might be outwardly facing more […]
    • Conferences By Numbers. And Chickens. Let’s just do some arithmetic. Let’s say the average cost of attending a big conference is say, $1500 (~$400 airfare / travel related, ~$400 registration, ~ $400 hotel, ~$200 food, etc all subject to question where these came from). At a conference say the size of EDUCAUSE, where 7000 people attend, that is over $10 […]
    • Archeology of Past Presentations My next talk for the TCC 2015 conference (the 20th one) has me digging in the catacombs of web history; I was looking trough my files for what I had from my talks in 1996. I have a fairly complete archive of stuff I did from my stints at the Maricopa Community Colleges (1992-2006) and […]
  • 2014
    • DS106 Assignment Bank Theme: Now With Syndication Options cc licensed ( BY ) flickr photo shared by Sasquatch I I’m pretty sure which trail I am… My progress on finishing the beta ds106 Assignment Bank as a WordPress Theme proceeds in slow lurches, no need to reach for the glacial metaphor. But it should be nearing a more public ready beta test at […]
  • 2012
    • Code Riffing cc licensed ( BY NC ) flickr photo shared by Thomas Hawk Jim, Zack, Tim, and I have had some loose brainstorms on the idea of free form rapid creation we have seen happen in ds106 that is akin to jamming between musicians. This is the kind of thing the Noiseprofessor in particular excels, to […]
    • On Wisconisin They say it is the state motto — (this is a play with the fabulous flickrsounds mashup crafted by John Johnston). Can you guess what is suggested by the images and sounds? by garryknight Attribution-ShareAlike LicenseYour browser does not support the audio tag.sound1 by bortescristian Attribution LicenseYour browser does not support the audio tag.sound2 by […]
  • 2010
    • Shining Toys I saw Mikhail’s effort of telling the story of The Shining in 6 Frames in response to Jim Groom’s explanation of this as an activity used in his digital storytelling class. But c’mon, how many other ways do you mix up Jack with an Ax, Jack in the Ice, Jack in the Bar, jack poking […]
  • 2009
    • Spinning Discs at Baylor 2009/365/58: One Turntable by cogdogblog posted 27 Feb ’09, 10.38pm MST PST on flickr Baylor University Ray I. Riley Digitization Center. I got a nice tour today of their equipment. See www.baylormag.com/story.php?story=006232 This is a special audio lab set up for the The Black Gospel Music Restoration Project contentdm.baylor.edu/cdm4/index_03gospel.php?CISOROOT=/03… Gardner Campbell, my host, had a […]
  • 2006
    • If Not a Walled Garden, then Something With a Drawbridge? So while some are not happy with the broad label of “walled garden”, I am growing increasingly annoyed at the complete lack of anything substantive, or half substantive, or a sketch on a dirty napkin of just what this Apple iTunes U is all about. As far as I know, it is very vaporous. At […]
    • If I Had More Time… I might have presented a shorter presentation. My timing was not on cue at today’s Podcasting, Schmodcasting demo at GateWay Community College, but we had a full room, folks were wide-eyed, and asking questions. Or they are just nice people. During the session, I had the iRiver running, so have made a huge, “umm”-filled recording […]
  • 2005
    • Site Submission Bookmarklet Maker Hits Tool Number 10 My web site submission multi-tool, which rolls a selected set of JavaScript submission tools into one, has hit its tenth tool. Thanks to those who have made recent suggestions. This means, you can build your own browser bookmark submission tool that includes all or any from: Furl del.icio.us Frassle Connotea Bag of URLs CiteULike Simpy […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 13 posts previously published on February 27th

  • 2016
    • Seeking Evidence of Badge Evidence My upcoming long term project is all about building a credential system. Most of the first reflexes on hearing is “Go Directly to Badges, Do Not Pass Go.” It’s two weeks before I start, but my brain is already in motion, so I am info grazing. Now I have been a little bit flip about […] &amp#x27A1;
  • 2015
    • The Internet Reacts to Teens Reacting to the Internet My idea for this remix is likely better than the execution. The FineBros has a brilliant series of Kids React videos where modern youth try to make sense of past culture, toys, and technology. They seem to average like 9 kazillion views per video; I’m lucky if I hit double digits. In some research for […] &amp#x27A1;
    • Blog Makeover: The You Show Edition Heading into a latter (not last, not ending, not over) phase of the You Show, in unit 5 we offer/ask participants to consider how they move a site that looks pretty bloggy into something that might be outwardly facing more […] &amp#x27A1;
    • Conferences By Numbers. And Chickens. Let’s just do some arithmetic. Let’s say the average cost of attending a big conference is say, $1500 (~$400 airfare / travel related, ~$400 registration, ~ $400 hotel, ~$200 food, etc all subject to question where these came from). At a conference say the size of EDUCAUSE, where 7000 people attend, that is over $10 […] &amp#x27A1;
    • Archeology of Past Presentations My next talk for the TCC 2015 conference (the 20th one) has me digging in the catacombs of web history; I was looking trough my files for what I had from my talks in 1996. I have a fairly complete archive of stuff I did from my stints at the Maricopa Community Colleges (1992-2006) and […] &amp#x27A1;
  • 2014
    • DS106 Assignment Bank Theme: Now With Syndication Options cc licensed ( BY ) flickr photo shared by Sasquatch I I’m pretty sure which trail I am… My progress on finishing the beta ds106 Assignment Bank as a WordPress Theme proceeds in slow lurches, no need to reach for the glacial metaphor. But it should be nearing a more public ready beta test at […] &amp#x27A1;
  • 2012
    • Code Riffing cc licensed ( BY NC ) flickr photo shared by Thomas Hawk Jim, Zack, Tim, and I have had some loose brainstorms on the idea of free form rapid creation we have seen happen in ds106 that is akin to jamming between musicians. This is the kind of thing the Noiseprofessor in particular excels, to […] &amp#x27A1;
    • On Wisconisin They say it is the state motto — (this is a play with the fabulous flickrsounds mashup crafted by John Johnston). Can you guess what is suggested by the images and sounds? by garryknight Attribution-ShareAlike LicenseYour browser does not support the audio tag.sound1 by bortescristian Attribution LicenseYour browser does not support the audio tag.sound2 by […] &amp#x27A1;
  • 2010
    • Shining Toys I saw Mikhail’s effort of telling the story of The Shining in 6 Frames in response to Jim Groom’s explanation of this as an activity used in his digital storytelling class. But c’mon, how many other ways do you mix up Jack with an Ax, Jack in the Ice, Jack in the Bar, jack poking […] &amp#x27A1;
  • 2009
    • Spinning Discs at Baylor 2009/365/58: One Turntable by cogdogblog posted 27 Feb ’09, 10.38pm MST PST on flickr Baylor University Ray I. Riley Digitization Center. I got a nice tour today of their equipment. See www.baylormag.com/story.php?story=006232 This is a special audio lab set up for the The Black Gospel Music Restoration Project contentdm.baylor.edu/cdm4/index_03gospel.php?CISOROOT=/03… Gardner Campbell, my host, had a […] &amp#x27A1;
  • 2006
    • If Not a Walled Garden, then Something With a Drawbridge? So while some are not happy with the broad label of “walled garden”, I am growing increasingly annoyed at the complete lack of anything substantive, or half substantive, or a sketch on a dirty napkin of just what this Apple iTunes U is all about. As far as I know, it is very vaporous. At […] &amp#x27A1;
    • If I Had More Time… I might have presented a shorter presentation. My timing was not on cue at today’s Podcasting, Schmodcasting demo at GateWay Community College, but we had a full room, folks were wide-eyed, and asking questions. Or they are just nice people. During the session, I had the iRiver running, so have made a huge, “umm”-filled recording […] &amp#x27A1;
  • 2005
    • Site Submission Bookmarklet Maker Hits Tool Number 10 My web site submission multi-tool, which rolls a selected set of JavaScript submission tools into one, has hit its tenth tool. Thanks to those who have made recent suggestions. This means, you can build your own browser bookmark submission tool that includes all or any from: Furl del.icio.us Frassle Connotea Bag of URLs CiteULike Simpy […] &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 *