“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 January 11th
- 2024
- 2023
- Knitting a Quick Fix for the Free to Use Browser Extension Oh noes! A favorite thing was broken today. The subject or object of a number of posts here I think of as the Opener of Glorious Rabbit Holes is the Library of Congress Free to Use Browser Extension. Each time I open a new tab in my browser (like 50 times a day), rather than […]
- 2021
- Generating Generators (cows indirectly involved) I love the idea of digital generators of stuff especially with a whiff of randomness and whimsy. Previously on this blog… This was a time when I recrafted a thing Martin Weller had found for a randomizing tech generator that spit out funny, but maybe idea prompting edtech metaphors. You can’t be more proud when […]
- A Few Wire Twists and BAM! SPLOTBox Now Supports Vocaroo This was done pretty much over breakfast and I bet I spend more time writing this blog post than it took to code a new addition to the media supported by the SPLOTbox WordPress theme. Blame/Credit DS106. I’m on a little self dare to try and do the DS106 Daily Create every day, done over […]
- 2017
- At The Creative Commons Fireside Chat Two great minds around a fire on an laptop, on a not very chilly night in Toronto… tonight was a “fireside chat” co-hosted by Creative Commons Canada and E-Campus Ontario. Creative Commons CEO Ryan Merkley interviewed David Wiley for 90 minutes on a wide range of topics from CC licenses to open education to Lumen […]
- 2016
- Dad’s Mighty Little Hammer That toy hammer in the photo above belonged to my Dad. It’s handle is worn wood, and the tiny hammer is corroded metal (metal toys are long passé). I question my own memory; I seem to have this story that he gave it to me when I was young. That’s possible. But a competing memory […]
- Introducin’ Western106 High Noon Ray-Dee-Oh Hour
With western106 blastin’ out of the gate like a wild bucking bronco we’re gonna spring something else on ya that starts this week.
Ray-dee-oh.
Sure radio did not exist until the very late or even past ...
- One Frozen Pine Needle This week’s major winter storm of almost 2 feet of snow is not unusual for where I live in northern Arizona.. except it has not happened in a few years. This photo was taken on the first clear day after the 4 days of heavy clouds, and the light under the blue sky was brilliant. […]
- 2014
- “Can’t” Without “Try” cc licensed ( BY NC SA ) flickr photo shared by Lukas Vermeer Few people can playful banter online as well as Dean Shareski, and I enjoy regular doses of Dean tweaking. Good gravy, he lives in a town named “Moose Jaw” that alone is material enough (and I have visited him there). He is […]
- 2012
- There is No Such Thing as Serendipity I do believe in the Six Million Dollar Man, but not Bigfoot… Now hold on to your comments, kids. I believe in Serendipity, I live and breathe its fumes for all of my online career.. How else might I have gotten to house sit for a month in Iceland, have a German Rock Band use […]
- How to be an eLearning Marketing Dust Bunny* cc licensed ( BY ND ) flickr photo shared by Mom Smackley Maybe this is a series, but today’s rant is a follow-up on How to Be a Social Media Dust Bunny*. Spam by email is likely now about 15+ years old, and has become such a commonality that many of us take it as […]
- 2011
- “Play” is a Four Letter Word cc licensed flickr photo shared by ouyea… “That’s for kids.” “It’s just a game.” “Cute. Now let me know when you do something academically valuable.” “Grow up.” “(I can’t do that, people will laugh).” With senseless violence becoming a sad norm, with the weight of a world dying of overheating or exterminating its own biosphere, […]
- 2010
- Digging Out from a Blog Crash cc licensed flickr photo shared by foreversouls My blog crashed this afternoon. I was not driving, but with some lucky bits of intervention and guessing, I was able to roll it over and get it back on the road. This was after spending a good chunk on Sunday on a side blog that had gotten […]
- 2009
- What Mean Ye “Blogging?” In preparation for an upcoming presentation at the 2009 EDUCAUSE ELI annual conference, I’ve been noodling away at this question that may seem rather pointless or obvious. I’ve been at this very same blog since April 2003, so maybe it is “just what I do here”. cc licensed flickr photo by Earl – What I […]
- 2008
- A D- For Twitter Interface Design A D- For Twitter Interface Design posted 11 Jan ’08, 8.29am MST PST on flickr I challenge anyone to convince me they can regularly use this drop down menu in twitter to send direct messages. Try it yourself. This interface item contains all of the people I follow, but it is presented in some random […]
- 2005
- Tinkering Again With Feed2JS – Help With Char Sets? For those the care to feed, I have been doing more minor tweaks to Feed2JS, and inside you will find I use the very same to display the latest updates to that site, since it now has its own feed. The main thing to look for (beyond coverups for my typos) was Seb Paquet’s suggestion […]
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 January 11th
- 2024
- 2023
- Knitting a Quick Fix for the Free to Use Browser Extension Oh noes! A favorite thing was broken today. The subject or object of a number of posts here I think of as the Opener of Glorious Rabbit Holes is the Library of Congress Free to Use Browser Extension. Each time I open a new tab in my browser (like 50 times a day), rather than […] ➡
- 2021
- Generating Generators (cows indirectly involved) I love the idea of digital generators of stuff especially with a whiff of randomness and whimsy. Previously on this blog… This was a time when I recrafted a thing Martin Weller had found for a randomizing tech generator that spit out funny, but maybe idea prompting edtech metaphors. You can’t be more proud when […] ➡
- A Few Wire Twists and BAM! SPLOTBox Now Supports Vocaroo This was done pretty much over breakfast and I bet I spend more time writing this blog post than it took to code a new addition to the media supported by the SPLOTbox WordPress theme. Blame/Credit DS106. I’m on a little self dare to try and do the DS106 Daily Create every day, done over […] ➡
- 2017
- At The Creative Commons Fireside Chat Two great minds around a fire on an laptop, on a not very chilly night in Toronto… tonight was a “fireside chat” co-hosted by Creative Commons Canada and E-Campus Ontario. Creative Commons CEO Ryan Merkley interviewed David Wiley for 90 minutes on a wide range of topics from CC licenses to open education to Lumen […] ➡
- 2016
- Dad’s Mighty Little Hammer That toy hammer in the photo above belonged to my Dad. It’s handle is worn wood, and the tiny hammer is corroded metal (metal toys are long passé). I question my own memory; I seem to have this story that he gave it to me when I was young. That’s possible. But a competing memory […] ➡
- Introducin’ Western106 High Noon Ray-Dee-Oh Hour
With western106 blastin’ out of the gate like a wild bucking bronco we’re gonna spring something else on ya that starts this week.
Ray-dee-oh.
Sure radio did not exist until the very late or even past ...
➡ - One Frozen Pine Needle This week’s major winter storm of almost 2 feet of snow is not unusual for where I live in northern Arizona.. except it has not happened in a few years. This photo was taken on the first clear day after the 4 days of heavy clouds, and the light under the blue sky was brilliant. […] ➡
- 2014
- “Can’t” Without “Try” cc licensed ( BY NC SA ) flickr photo shared by Lukas Vermeer Few people can playful banter online as well as Dean Shareski, and I enjoy regular doses of Dean tweaking. Good gravy, he lives in a town named “Moose Jaw” that alone is material enough (and I have visited him there). He is […] ➡
- 2012
- There is No Such Thing as Serendipity I do believe in the Six Million Dollar Man, but not Bigfoot… Now hold on to your comments, kids. I believe in Serendipity, I live and breathe its fumes for all of my online career.. How else might I have gotten to house sit for a month in Iceland, have a German Rock Band use […] ➡
- How to be an eLearning Marketing Dust Bunny* cc licensed ( BY ND ) flickr photo shared by Mom Smackley Maybe this is a series, but today’s rant is a follow-up on How to Be a Social Media Dust Bunny*. Spam by email is likely now about 15+ years old, and has become such a commonality that many of us take it as […] ➡
- 2011
- “Play” is a Four Letter Word cc licensed flickr photo shared by ouyea… “That’s for kids.” “It’s just a game.” “Cute. Now let me know when you do something academically valuable.” “Grow up.” “(I can’t do that, people will laugh).” With senseless violence becoming a sad norm, with the weight of a world dying of overheating or exterminating its own biosphere, […] ➡
- 2010
- Digging Out from a Blog Crash cc licensed flickr photo shared by foreversouls My blog crashed this afternoon. I was not driving, but with some lucky bits of intervention and guessing, I was able to roll it over and get it back on the road. This was after spending a good chunk on Sunday on a side blog that had gotten […] ➡
- 2009
- What Mean Ye “Blogging?” In preparation for an upcoming presentation at the 2009 EDUCAUSE ELI annual conference, I’ve been noodling away at this question that may seem rather pointless or obvious. I’ve been at this very same blog since April 2003, so maybe it is “just what I do here”. cc licensed flickr photo by Earl – What I […] ➡
- 2008
- A D- For Twitter Interface Design A D- For Twitter Interface Design posted 11 Jan ’08, 8.29am MST PST on flickr I challenge anyone to convince me they can regularly use this drop down menu in twitter to send direct messages. Try it yourself. This interface item contains all of the people I follow, but it is presented in some random […] ➡
- 2005
- Tinkering Again With Feed2JS – Help With Char Sets? For those the care to feed, I have been doing more minor tweaks to Feed2JS, and inside you will find I use the very same to display the latest updates to that site, since it now has its own feed. The main thing to look for (beyond coverups for my typos) was Seb Paquet’s suggestion […] ➡
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.