“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.
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.
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 July 12th
- 2023
- No Sad Eyes For Reused Photo Number 300 Look at the pup’s photo. Why so sad, Kay? This flickr photo of you I took in 2014 while visiting your human, Richard Elliot, at his home in Auckland, has just been added to the home grown collection of my flickr photos that have been reused elsewhere. Maybe it’s boasting or self vanity, but discovering […]
- 2021
- Digital Structures: Institutions Abandon / Individuals Preserve I’ve already written this blog post! Shall I cite myself, ibid infinitum? But just to show as an example, in my previous post I was able to reference the 2018 Mural UDG Project I was part of. A few days ago that was not possible, and also on the digital chopping block was years of […]
- Unconformities, the Wikicene Era, and the Wikidata Formation There’s no magic beyond my fervent clutch to the discarded in lieu of social media the fully functional tools of RSS and News readers. But I will perk up at a geological metaphor in a blog post. Thus it was Irwin Devries’s dusting off of the publish button on his blog with a great new […]
- 2016
- Looking for Stuff Here That Lands You in the 404 Zone For the sake of keeping it not found, it is so extremely unlikely (our Department of You Never Know restricts us from saying “never”) to find mention here of that new AR mobile back to retro 1990s game that you are much better putting your money on hell freezing over the Cubs World Series award. […]
- i love to share — My CC Certification What If Video That photo is not only a favorite t-shirt, I’d like to make it my professional tag line. Well, maybe right after Defender of the Commons: To the people who defend our creative commons – I salute you 🙂@cogdog @mweller @amyburvall @dajbelshaw pic.twitter.com/7Js0ZSwDb1 — Bryan Mathers – @bryanmmathers (@BryanMMathers) May 12, 2016 The collection of videos […]
- 2015
- En México, Recordando a mi Abuela Today marks the calendar lap of my grandmother’s passing in 2003. “Granny” was a one of a kind person, to me as a kid she was the emblem of someone full of life, a sense of sophistication she was always go go go. Even if my perceptions were not true to life, I still adored […]
- 2014
- Image Bending in Audacity Trippy. The frames of this gif (image data) were edited in audio editing software. It’s in the realm of glitch art as the effects created are largely unpredictable. It’s a matter of saving an image in an uncompressed format, importing into Audacity, applying an effect or two, and exporting back again. I saw a link […]
- The Day I Cried in a Canyon A tweet from someone (sorry there goes my weak citation) led my to Mike Wesch’s Learning Worth Crying About: For those of you who watched my most recent talk, Learning as soul-making, you know that I have become interested in moments of profound transformation and growth among students that I call “Learning worth crying about.” […]
- 2012
- Day 1: A Twister of a Daily Create Challenge I could not be more excited then to see all 36 drawings of tornados for the first day of the Seven Day Daily Create Challenge (and I realize my tweets and blog posts may be bordering on annoying in frequency, but hey, go take it up with my Drill Sergeants). I hope to see y’all […]
- 2007
- 2005
- gCensus: A Tale of Two Cities If you have been blown away my zooming around Google Maps, the possibilities of combing that data with other data is starting to become wonderfully dizzying. Crime data and Google Maps. Housing and Google Maps. Well here is another one– gCensus nicely combines US census data and Google Maps. As you zoom and pan you […]
- 2004
- 3 Steves And a Blog I could not resist coming up with a cute name for a blogspace for Steve Gilbert, Stephen Ehrmann, and Steve Saltzberg, all with the TLTGroup (Teaching, Learning, Technology Group)- hence 3 Steves And a Blog. This started when I proposed to the Charles Ansorge, the current maintainer of the TLTGroup’s “Low Threshold Applications of the […]
- FlipSite: 5, 6 years of Coin Flip Simulations I just cleaned up a bug in a golden oldie web site, and it is playing music again. The Interactive FlipSite was created so long ago I cannot remember exactly for sure, at least before 1998. The purpose was to create a site to illustrate simple probability for basic mathematics using the most simple of […]
- 2003
- Thanks IDBlog for Pointer on Adding Comments… Thankls to Beth Mazur and her post on IDblog: Spotlighting comments that had the MovableType code for adding the excerpts of the 5 most recent comments to this blog, now visible on the right under the heading “Others Bark Back” Just another small way to bring bits of information from within the weblog to the […]
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 July 12th
- 2023
- No Sad Eyes For Reused Photo Number 300 Look at the pup’s photo. Why so sad, Kay? This flickr photo of you I took in 2014 while visiting your human, Richard Elliot, at his home in Auckland, has just been added to the home grown collection of my flickr photos that have been reused elsewhere. Maybe it’s boasting or self vanity, but discovering […] ➡
- 2021
- 2016
- Looking for Stuff Here That Lands You in the 404 Zone For the sake of keeping it not found, it is so extremely unlikely (our Department of You Never Know restricts us from saying “never”) to find mention here of that new AR mobile back to retro 1990s game that you are much better putting your money on hell freezing over the Cubs World Series award. […] ➡
- i love to share — My CC Certification What If Video That photo is not only a favorite t-shirt, I’d like to make it my professional tag line. Well, maybe right after Defender of the Commons: To the people who defend our creative commons – I salute you 🙂@cogdog @mweller @amyburvall @dajbelshaw pic.twitter.com/7Js0ZSwDb1 — Bryan Mathers – @bryanmmathers (@BryanMMathers) May 12, 2016 The collection of videos […] ➡
- 2015
- En México, Recordando a mi Abuela Today marks the calendar lap of my grandmother’s passing in 2003. “Granny” was a one of a kind person, to me as a kid she was the emblem of someone full of life, a sense of sophistication she was always go go go. Even if my perceptions were not true to life, I still adored […] ➡
- 2014
- Image Bending in Audacity Trippy. The frames of this gif (image data) were edited in audio editing software. It’s in the realm of glitch art as the effects created are largely unpredictable. It’s a matter of saving an image in an uncompressed format, importing into Audacity, applying an effect or two, and exporting back again. I saw a link […] ➡
- The Day I Cried in a Canyon A tweet from someone (sorry there goes my weak citation) led my to Mike Wesch’s Learning Worth Crying About: For those of you who watched my most recent talk, Learning as soul-making, you know that I have become interested in moments of profound transformation and growth among students that I call “Learning worth crying about.” […] ➡
- 2012
- Day 1: A Twister of a Daily Create Challenge I could not be more excited then to see all 36 drawings of tornados for the first day of the Seven Day Daily Create Challenge (and I realize my tweets and blog posts may be bordering on annoying in frequency, but hey, go take it up with my Drill Sergeants). I hope to see y’all […] ➡
- 2007
- 2005
- gCensus: A Tale of Two Cities If you have been blown away my zooming around Google Maps, the possibilities of combing that data with other data is starting to become wonderfully dizzying. Crime data and Google Maps. Housing and Google Maps. Well here is another one– gCensus nicely combines US census data and Google Maps. As you zoom and pan you […] ➡
- 2004
- 3 Steves And a Blog I could not resist coming up with a cute name for a blogspace for Steve Gilbert, Stephen Ehrmann, and Steve Saltzberg, all with the TLTGroup (Teaching, Learning, Technology Group)- hence 3 Steves And a Blog. This started when I proposed to the Charles Ansorge, the current maintainer of the TLTGroup’s “Low Threshold Applications of the […] ➡
- FlipSite: 5, 6 years of Coin Flip Simulations I just cleaned up a bug in a golden oldie web site, and it is playing music again. The Interactive FlipSite was created so long ago I cannot remember exactly for sure, at least before 1998. The purpose was to create a site to illustrate simple probability for basic mathematics using the most simple of […] ➡
- 2003
- Thanks IDBlog for Pointer on Adding Comments… Thankls to Beth Mazur and her post on IDblog: Spotlighting comments that had the MovableType code for adding the excerpts of the 5 most recent comments to this blog, now visible on the right under the heading “Others Bark Back” Just another small way to bring bits of information from within the weblog to the […] ➡
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.