“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 19 posts previously published on January 7th
- 2025
- 2024
- Good Fortune with the WP-Dimension Calling Card Theme According to Colo…Coloph-Thing I’m in the stretch of coming up doing 19 years of WordPressing, which started with this here blog. I might emulate the SNL Chico Esceula character to say, “WordPress has been vedddy vedddy good to me.” This is not the post to wax or moan about the new phases of WordPress, but […]
- 2023
- Someone is right on the internet I’m playing with words. As usual. I ain’t no chat ai thing just a frail human. “Right” here is not in the sense of correct or justified (although someone on the internet might be correct at this very moment), but right as plugged in to its essence, the original wizards staying up late sense, as […]
- 2022
- 2021
- Sharpening The Trailing Edge Technology of Google Custom Search Engine … in which I humbly pay respects to Jon Udell, as it reads in his Twitter bio, the “Patron saint of trailing-edge technologies.” And one of the endless reasons I respect Jon is his embodiment of being the antithesis to the Silicon Valley holy devotion to the cutting edge, is his devotion to the other […]
- 2020
- SPLOTbox With Internet Archive Media Detection Seven days into a new year and nary a SPLOT related blog post… what’s going on around here? Thar be rabbit holing in the code warren. I’ve still got a big surprise to add to SPLOTbox, which now has maybe all the features of three SPLOTs in one. This little bit blogged here is just […]
- 2019
- The #Netnarr Team is Back for 2019 One of the most rewarding things I have gotten to do the last few years (and this may be a blog post lacking mention of SPLOTs, hah!) has been teaching co-teaching the Networked Narratives open course with Mia Zamora. In first version in 2017, Mia was present with the class at Kean University and I […]
- 2018
- A New One is Born: SPLOTbox A poorly wrapped present for 2018, a new SPLOT. It’s really more of an extension, the SPLOT Box is an extension/update of the older TRU Sounder one (made for building collections of audio content). As a media “jukebox-ish” thing, this one can offer a site to share/collection audio content (uploaded mp3, ogg, m4a), URL links […]
- 2016
- A Tweetdeck Column Trick It’s very rare that I go to the twitter web interface to read tweets (in their soon to be quaint 140 character limit form); like many I rely heavily on the multiple stream view of columns in Tweetdeck. Left side is my full stream which I barely look at; next is a column for a […]
- 2014
- This is How My Kind of Internet Works Some people think this is the model how information on the internet works This is how we get things like walled LMS’s and rigid online HR applications that enforce ambiguous deadlines of “due at midnight” (oops that is my own beef, quick question is midnight at the end if the day or the beginning?). Everything […]
- 2013
- 2012
- What the Blog? I totally forgot I even had this blog. What is it here for?
Someone tell me.
- 2010
- Computer, I am Talking to You? cc licensed flickr photo shared by clarksworth Holy smokes, it is 2010, and despite all of the dreams (the heck with flying cars) we are still typing on keyboards designed to make typing difficult… so aren’t we supposed to be far into the future where we talk to our computers? Voice recognition and identification software […]
- Parsing the So Called News cc licensed flickr photo shared by Photo Phiend I had this fantastic part time job in the late 1980s during my senior year at the University of Delaware- I worked an evening shift at a Dupont lab running samples through an electron microscope. It was a whole new world up close. I never knew what […]
- 2009
- Getting for Giving I got something in the mail yesterday that moved me so much, it has taken another day to get to blog about it (is that slow enough for the slow blogging crowd). I have to weave a back story before I get to the punch line about getting something back (not tangible, but emotional) for […]
- 2005
- Larry, Curly, or Moe on the Server Install I had planned this afternoon to be a good quiet time to do a clean install on our office’s in house server. I cannot complain about the sorts of problems Brian wrote about as mine seem a bit, well self inflicted. The server in question is a G4 OS X server that is mainly for […]
- Email Signature of the Day Lurking at the bottom of another email message today: “Outside of a dog, a book is a man’s best friend. Inside of a dog it is too dark to read.” —Groucho Marx Now where is my flashlight? I cannot read that that mysql manual…. Share this barking on social media
- Macromedia! Cease and Desist! I got a cryptic e-mail message recently, that barely made a ripple among the daily spam flood: How come you pop up on my computre without invitation. Get lost you MF As you can see there is not much we need to do to educate written communications skills these days… So being curious about the […]
- 2004
- Wiki Up (southeast of Wikieup) I spent too much of today fiddling around with setting up a wiki on our new Jade server. This was at the request of one of our most intrpeid and adventurous faculty members, one I hooked on HTML in 1994, roped into blogs last year, and he’s already to push the envelope out past Mars. […]
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 January 7th
- 2025
- 2024
- Good Fortune with the WP-Dimension Calling Card Theme According to Colo…Coloph-Thing I’m in the stretch of coming up doing 19 years of WordPressing, which started with this here blog. I might emulate the SNL Chico Esceula character to say, “WordPress has been vedddy vedddy good to me.” This is not the post to wax or moan about the new phases of WordPress, but […] ➡
- 2023
- Someone is right on the internet I’m playing with words. As usual. I ain’t no chat ai thing just a frail human. “Right” here is not in the sense of correct or justified (although someone on the internet might be correct at this very moment), but right as plugged in to its essence, the original wizards staying up late sense, as […] ➡
- 2022
- 2021
- 2020
- SPLOTbox With Internet Archive Media Detection Seven days into a new year and nary a SPLOT related blog post… what’s going on around here? Thar be rabbit holing in the code warren. I’ve still got a big surprise to add to SPLOTbox, which now has maybe all the features of three SPLOTs in one. This little bit blogged here is just […] ➡
- 2019
- The #Netnarr Team is Back for 2019 One of the most rewarding things I have gotten to do the last few years (and this may be a blog post lacking mention of SPLOTs, hah!) has been teaching co-teaching the Networked Narratives open course with Mia Zamora. In first version in 2017, Mia was present with the class at Kean University and I […] ➡
- 2018
- A New One is Born: SPLOTbox A poorly wrapped present for 2018, a new SPLOT. It’s really more of an extension, the SPLOT Box is an extension/update of the older TRU Sounder one (made for building collections of audio content). As a media “jukebox-ish” thing, this one can offer a site to share/collection audio content (uploaded mp3, ogg, m4a), URL links […] ➡
- 2016
- A Tweetdeck Column Trick It’s very rare that I go to the twitter web interface to read tweets (in their soon to be quaint 140 character limit form); like many I rely heavily on the multiple stream view of columns in Tweetdeck. Left side is my full stream which I barely look at; next is a column for a […] ➡
- 2014
- This is How My Kind of Internet Works Some people think this is the model how information on the internet works This is how we get things like walled LMS’s and rigid online HR applications that enforce ambiguous deadlines of “due at midnight” (oops that is my own beef, quick question is midnight at the end if the day or the beginning?). Everything […] ➡
- 2013
- 2012
- 2010
- Computer, I am Talking to You? cc licensed flickr photo shared by clarksworth Holy smokes, it is 2010, and despite all of the dreams (the heck with flying cars) we are still typing on keyboards designed to make typing difficult… so aren’t we supposed to be far into the future where we talk to our computers? Voice recognition and identification software […] ➡
- Parsing the So Called News cc licensed flickr photo shared by Photo Phiend I had this fantastic part time job in the late 1980s during my senior year at the University of Delaware- I worked an evening shift at a Dupont lab running samples through an electron microscope. It was a whole new world up close. I never knew what […] ➡
- 2009
- Getting for Giving I got something in the mail yesterday that moved me so much, it has taken another day to get to blog about it (is that slow enough for the slow blogging crowd). I have to weave a back story before I get to the punch line about getting something back (not tangible, but emotional) for […] ➡
- 2005
- Larry, Curly, or Moe on the Server Install I had planned this afternoon to be a good quiet time to do a clean install on our office’s in house server. I cannot complain about the sorts of problems Brian wrote about as mine seem a bit, well self inflicted. The server in question is a G4 OS X server that is mainly for […] ➡
- Email Signature of the Day Lurking at the bottom of another email message today: “Outside of a dog, a book is a man’s best friend. Inside of a dog it is too dark to read.” —Groucho Marx Now where is my flashlight? I cannot read that that mysql manual…. Share this barking on social media ➡
- Macromedia! Cease and Desist! I got a cryptic e-mail message recently, that barely made a ripple among the daily spam flood: How come you pop up on my computre without invitation. Get lost you MF As you can see there is not much we need to do to educate written communications skills these days… So being curious about the […] ➡
- 2004
- Wiki Up (southeast of Wikieup) I spent too much of today fiddling around with setting up a wiki on our new Jade server. This was at the request of one of our most intrpeid and adventurous faculty members, one I hooked on HTML in 1994, roped into blogs last year, and he’s already to push the envelope out past Mars. […] ➡
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.