“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 17 posts previously published on May 11th
- 2021
- Blogging about WordPress Shortcodes without Rendering WordPress Shortcodes This post is here mostly as I expect to forget this tidbit. Human memory freshness dwindles exponentially. Over in my work at the OpenETC I wrote a guide for using the Display Posts plugin. This most handy plugin lets you take control of where and how to display dynamically a list of posts, rather than […]
- 2017
- A 60,000 Times Challenge for NMCers If you are attending the NMC 2017 Summer Conference in Boston, I have a media/fake factoid challenge for you. By taking it on you can finally solve a vexing (what I believe is a) chimerical myth. And you can win CASH money. I have been chasing down this media myth since 2012, the oft repeated, […]
- 2016
- There’s Probably No Place on the Algorithmic Chat Interface Blockchain Secured Web For Roadtrip-’62 I don’t care if it’s just me, but the things that make the web so wonderful in a Keep Austin weird sense are the niche interest sites feverishly maintained by individuals. Coming across a site like Roadtrip-62′ reinforces that, for now, this internet feels as neat to infinite space we can ever freely inhabit. Like […]
- Why I Can’t Remember When We Met is a Good Thing A comment from Claudia made me remember this fledgling post idea. She, whom I have etched into my memories of sharing, at a time I needed it most, a beautiful parable of the internet as like a dream, being a place where we hang out with friends we have yet to meet, repeated this in […]
- 2015
- Metaphor For What’s Obvious To You: 15 Second Video Ask Tomorrow at 8pm ET I join my long time colleague and good friend Darren Kuropatwa for an OSSEMOOC webinar session on Storytelling, by request of Donna Fry. There is a story in that sentence, because during my cross Canada leg of my 2011 Odyssey I met Darren for the first time in Winnipeg, and it […]
- 2012
- Exploring Lake Macguffin Things are shaping up nicely for the summer course of ds106 I am co-teaching with Martha Burtis, we have been super busy supervising and doing a lot of the work at Camp Magic Mcguffin. If you have every mused about trying to take ds106 as an open participant, this is perhaps the best time, during […]
- 2010
- United Mess cc licensed flickr photo shared by cogdogblog Like ISPs, cell phone companies, I am fairly convinced that ask enough people or fly long enough, and you will find that All Airlines Suck– sooner or later they will jerk you around, lose your luggage, route you through North Dakota when flying from New York to Miami. […]
- 2009
- Spell With Google Maps Rhett Dashwood, a Creative Director in Melbourne Australia, has scoured Google Maps Satellite images to create an alphabet of landmarks found in his home state of Victoria. On Google Maps Typography, he describes it: Over the course of several months beginning October 2008 to April 2009 I’ve spent some of my spare time between commercial […]
- 2008
- Family Blogging Effect I know a number of bloggers who regularly write about their family, or have gotten family members into blogging. That’s neat by me, but largely, in my case, its been pretty much a case of avoiding Where Worlds Collide, not for any really good reason; they just seem pretty separate spheres of my own life. […]
- 2006
- See Polly Translate Language translation via Babelfish? That is soooooo Web 1.0. Check out Polly Glotta, the text to speech language translator: You type a phrase in the top form, select a language translation pair (English to Dutch, French to Italian, etc). Polly not only translate the text of the phrase, she also speaks it out loud! She’s […]
- 2005
- Another Udell Screencast Gem If you’ve not been tapping into some of the screencasts being published by Jon Udell, you are missing out on a great phenomena achieved with free desktop software. This under 3 minute piece documents very clearly the power of a simple JavaScript / bookmarklet tool for managing web site password logins. But the subject, while […]
- Return of Biff Cantrell (Blabbing about RSS and Maricopa Learning eXchange). He’s baaaaaaaaaaack. That Biff Cantrell dude who chalked up a March 2004 hour long Breezed tour of the Maricopa Learning eXchange (MLX). He chopped out a lot of stuff, updated some images and links, and created a mini tour of the different kinds of RSS feeds in the MLX as a demo for the May […]
- One Week Out: Ocotillo Retreat 2005 “Lost in Technology” We’re one week away from my biggest yearly event responsibility, our annual Ocotillo Retreat. These go back before I started at Maricopa, though my first week on the job was the 1992 retreat at Mormon Lake, AZ. For those not familiar with Ocotillo (go ahead, try and pronounce it 😉 it is our long standing […]
- 2004
- Faculty ePortfolio, Google, and Kaching! Newly Registered Online Students I mentioned recently how one of our faculty members had created an electronic portfolio for his faculty evaluation process. Well something funny happened in a very short time span. John was contacted by the link in his eportfolio by two students on the east coast who had searched Google for “online anatomy physiology course” and […]
- Introducing “Sharebacks”- the MLX Implementation of Trackback The web elves have been doing some refining of our Maricopa Learning eXchange “packing slips”- mainly in the lower portions. For reference as we blog, see the MLX slip for the Correlation Meter. We wanted to make the commenting function for apparent by embedding the comment form directly in the packing slip, and using what […]
- Ideal Use of Internet Technology: Turning The Pages (yes, something not related to spam) I had seen and recommended before the British Library’s Turning the Pages site, but was recently reminded of it in an email exchange. To me this is one of the prime examples of what the Internet can provide- a rich interactive experience with a resource that would not be […]
- Rolling Up the Sleeves On Spam War Front Yes, fighting blog spam has been a huge distraction. I would rather be creating things than roach stomping. But I refuse to close off comments completely; it runs dead against what blogs should do to foster community building. About 36 hours ago, I took the approach of renaming my mt-comments.cgi script. The new name was […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 17 posts previously published on May 11th
- 2021
- 2017
- A 60,000 Times Challenge for NMCers If you are attending the NMC 2017 Summer Conference in Boston, I have a media/fake factoid challenge for you. By taking it on you can finally solve a vexing (what I believe is a) chimerical myth. And you can win CASH money. I have been chasing down this media myth since 2012, the oft repeated, […] ➡
- 2016
- 2015
- Metaphor For What’s Obvious To You: 15 Second Video Ask Tomorrow at 8pm ET I join my long time colleague and good friend Darren Kuropatwa for an OSSEMOOC webinar session on Storytelling, by request of Donna Fry. There is a story in that sentence, because during my cross Canada leg of my 2011 Odyssey I met Darren for the first time in Winnipeg, and it […] ➡
- 2012
- Exploring Lake Macguffin Things are shaping up nicely for the summer course of ds106 I am co-teaching with Martha Burtis, we have been super busy supervising and doing a lot of the work at Camp Magic Mcguffin. If you have every mused about trying to take ds106 as an open participant, this is perhaps the best time, during […] ➡
- 2010
- United Mess cc licensed flickr photo shared by cogdogblog Like ISPs, cell phone companies, I am fairly convinced that ask enough people or fly long enough, and you will find that All Airlines Suck– sooner or later they will jerk you around, lose your luggage, route you through North Dakota when flying from New York to Miami. […] ➡
- 2009
- Spell With Google Maps Rhett Dashwood, a Creative Director in Melbourne Australia, has scoured Google Maps Satellite images to create an alphabet of landmarks found in his home state of Victoria. On Google Maps Typography, he describes it: Over the course of several months beginning October 2008 to April 2009 I’ve spent some of my spare time between commercial […] ➡
- 2008
- Family Blogging Effect I know a number of bloggers who regularly write about their family, or have gotten family members into blogging. That’s neat by me, but largely, in my case, its been pretty much a case of avoiding Where Worlds Collide, not for any really good reason; they just seem pretty separate spheres of my own life. […] ➡
- 2006
- See Polly Translate Language translation via Babelfish? That is soooooo Web 1.0. Check out Polly Glotta, the text to speech language translator: You type a phrase in the top form, select a language translation pair (English to Dutch, French to Italian, etc). Polly not only translate the text of the phrase, she also speaks it out loud! She’s […] ➡
- 2005
- Another Udell Screencast Gem If you’ve not been tapping into some of the screencasts being published by Jon Udell, you are missing out on a great phenomena achieved with free desktop software. This under 3 minute piece documents very clearly the power of a simple JavaScript / bookmarklet tool for managing web site password logins. But the subject, while […] ➡
- Return of Biff Cantrell (Blabbing about RSS and Maricopa Learning eXchange). He’s baaaaaaaaaaack. That Biff Cantrell dude who chalked up a March 2004 hour long Breezed tour of the Maricopa Learning eXchange (MLX). He chopped out a lot of stuff, updated some images and links, and created a mini tour of the different kinds of RSS feeds in the MLX as a demo for the May […] ➡
- One Week Out: Ocotillo Retreat 2005 “Lost in Technology” We’re one week away from my biggest yearly event responsibility, our annual Ocotillo Retreat. These go back before I started at Maricopa, though my first week on the job was the 1992 retreat at Mormon Lake, AZ. For those not familiar with Ocotillo (go ahead, try and pronounce it 😉 it is our long standing […] ➡
- 2004
- Faculty ePortfolio, Google, and Kaching! Newly Registered Online Students I mentioned recently how one of our faculty members had created an electronic portfolio for his faculty evaluation process. Well something funny happened in a very short time span. John was contacted by the link in his eportfolio by two students on the east coast who had searched Google for “online anatomy physiology course” and […] ➡
- Introducing “Sharebacks”- the MLX Implementation of Trackback The web elves have been doing some refining of our Maricopa Learning eXchange “packing slips”- mainly in the lower portions. For reference as we blog, see the MLX slip for the Correlation Meter. We wanted to make the commenting function for apparent by embedding the comment form directly in the packing slip, and using what […] ➡
- Ideal Use of Internet Technology: Turning The Pages (yes, something not related to spam) I had seen and recommended before the British Library’s Turning the Pages site, but was recently reminded of it in an email exchange. To me this is one of the prime examples of what the Internet can provide- a rich interactive experience with a resource that would not be […] ➡
- Rolling Up the Sleeves On Spam War Front Yes, fighting blog spam has been a huge distraction. I would rather be creating things than roach stomping. But I refuse to close off comments completely; it runs dead against what blogs should do to foster community building. About 36 hours ago, I took the approach of renaming my mt-comments.cgi script. The new name was […] ➡
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.