“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 14 posts previously published on August 13th
- 2016
- Choral Explanations and Leaky Faucets I get so much out of the way Mike Caulfield shares his thinking, out loud, in his own blog. His ideas of federated wiki, stream mode, gardens and streams, continue to push my own thinking into unexpected (good) places. As has his recent piece on choral explanations and OERs. I won’t summarize, that’s on you. […]
- 2015
- 2084 Starring Jim Groom Thanks to Bonnie Stewart periscoping, I got a chance to catch Jim Groom’s presence today at the Digital Pedagogy Lab. There was something kind of familiar about Jim being all looming large on the screen… For some sick reason I imagine a woman with red shorts running up with a hammer to larger than life […]
- Hands Across Time That photo is my Mom’s hand, taken in December 2010 when she was visiting me here in Arizona. How would I know it would be her last visit here? That was not part of the plan. She was sitting out on the back deck reading a book (I think it was some kind of low […]
- 2013
- That Was Bowling – My First #GIFfight Before I took on some coding projects today I was compelled to GIF. I hope someone other than me can explain it to Sandy Jensen Brown (you get a daily create chance for that on August 21). As often, I was motivated by Michael Bransom Smith’s response to something called GIFfight Dark Side Around the […]
- 2012
- My Biggest Published Photo It was more than a year ago that I got an email request from Millenium House publishers in Australia asking about license to use one of my Gigapan images for what sounded like an interesting project- they have published the world’s largest atlas of the world. Earth Platinum is a printed atlas that is 6 […]
- 2010
- Rolling New Tweet Button into WordPress UPDATE Jan 6 2012: While the code should still work, I have disabled this approach on my own blog, instead using the Sharing tool built into the JetPack plugin. Twitter has created a new widget that makes it more friendly to provide a tweet this button from your own web sites, blogs, etc. The benefit […]
- 2008
- Slick Flickr Browser I was just IMing with Nick Noakes who asked if I had tried pictobrowser, a flickr web widget thingie. Like other tools that allow you to embed flickr content, you just need to provide your flickr handle and select a set or tag to display your photos, embedded in another site. Share this barking on […]
- Dog Tags / Dog-egories Are tag clouds, as Read/Write Web suggests, entombed? dead? On my fleet of NMC WordPress site I am shifting to using tags more on posts as an organizer, and tossing some clouds on the pages (see lower right sidebar of Pachyderm Services). Its a bit easier on these sites that have a relatively low number […]
- 2007
- Rolling Out a Second Life Conference Talking About Machinima posted 12 Aug ’07, 11.49pm MDT PST on flickr NMC Symposium on Creativity in Second Life, Aug 12-18, 2007 I know folks are rather polarized in terms of being wildly excited about Second Life or being totally dismissive of it. Rather than just pontificating or bikcering about it, I’m more excited to […]
- 2006
- Animator vs Animation Fight it Out in Flash Interface Just plain fun, and original by Alan Becker, posted on DeviantArt- Animator vs Animation: An animator faces his own animation in deadly combat. The battlefield? The Flash interface itself. A stick figure is created by an animator with the intent to torture. The stick figure drawn by the animator will be using everything he can […]
- 2004
- IndyJunior – maps of travels per year It’s been a while since I updated my data files for the nifty Flash mapping app- IndyJunior. This application reads coordinate data from an XML file, and maps locations and current geographic location. Check out the CDB travel maps for 2003 and 2004. By turning the template for this MT page from a *.html to […]
- XSLT + RSS: Why Pretty for only some browsers or is some implementations? I’ve been mildly curious about some of the new attempts at making RSS feeds more human readable at first click- rather than seeing ugly XML code, these “new” feed displays use CSS (Style sheets) and some sort of magical transform method called XSLT — basically it means if you click a link that points to […]
- 2003
- Free! Online! Building Accessible Websites Bless Joe Clark. Not only does he write a stunningly useful book, but he also provides all of the chapters (for free) to Building Accessible Websites. When you buy the book, you get the entire text (but no graphics) on the included CD-ROM, along with a few extras, like fonts and utilities. Now the whole […]
- RSS Feeds from SourceForge.net Yet another useful avenue for RSS- stay in tune with all or part of the open source software projects at
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 14 posts previously published on August 13th
- 2016
- Choral Explanations and Leaky Faucets I get so much out of the way Mike Caulfield shares his thinking, out loud, in his own blog. His ideas of federated wiki, stream mode, gardens and streams, continue to push my own thinking into unexpected (good) places. As has his recent piece on choral explanations and OERs. I won’t summarize, that’s on you. […] ➡
- 2015
- 2084 Starring Jim Groom Thanks to Bonnie Stewart periscoping, I got a chance to catch Jim Groom’s presence today at the Digital Pedagogy Lab. There was something kind of familiar about Jim being all looming large on the screen… For some sick reason I imagine a woman with red shorts running up with a hammer to larger than life […] ➡
- Hands Across Time That photo is my Mom’s hand, taken in December 2010 when she was visiting me here in Arizona. How would I know it would be her last visit here? That was not part of the plan. She was sitting out on the back deck reading a book (I think it was some kind of low […] ➡
- 2013
- That Was Bowling – My First #GIFfight Before I took on some coding projects today I was compelled to GIF. I hope someone other than me can explain it to Sandy Jensen Brown (you get a daily create chance for that on August 21). As often, I was motivated by Michael Bransom Smith’s response to something called GIFfight Dark Side Around the […] ➡
- 2012
- My Biggest Published Photo It was more than a year ago that I got an email request from Millenium House publishers in Australia asking about license to use one of my Gigapan images for what sounded like an interesting project- they have published the world’s largest atlas of the world. Earth Platinum is a printed atlas that is 6 […] ➡
- 2010
- Rolling New Tweet Button into WordPress UPDATE Jan 6 2012: While the code should still work, I have disabled this approach on my own blog, instead using the Sharing tool built into the JetPack plugin. Twitter has created a new widget that makes it more friendly to provide a tweet this button from your own web sites, blogs, etc. The benefit […] ➡
- 2008
- Slick Flickr Browser I was just IMing with Nick Noakes who asked if I had tried pictobrowser, a flickr web widget thingie. Like other tools that allow you to embed flickr content, you just need to provide your flickr handle and select a set or tag to display your photos, embedded in another site. Share this barking on […] ➡
- Dog Tags / Dog-egories Are tag clouds, as Read/Write Web suggests, entombed? dead? On my fleet of NMC WordPress site I am shifting to using tags more on posts as an organizer, and tossing some clouds on the pages (see lower right sidebar of Pachyderm Services). Its a bit easier on these sites that have a relatively low number […] ➡
- 2007
- Rolling Out a Second Life Conference Talking About Machinima posted 12 Aug ’07, 11.49pm MDT PST on flickr NMC Symposium on Creativity in Second Life, Aug 12-18, 2007 I know folks are rather polarized in terms of being wildly excited about Second Life or being totally dismissive of it. Rather than just pontificating or bikcering about it, I’m more excited to […] ➡
- 2006
- Animator vs Animation Fight it Out in Flash Interface Just plain fun, and original by Alan Becker, posted on DeviantArt- Animator vs Animation: An animator faces his own animation in deadly combat. The battlefield? The Flash interface itself. A stick figure is created by an animator with the intent to torture. The stick figure drawn by the animator will be using everything he can […] ➡
- 2004
- IndyJunior – maps of travels per year It’s been a while since I updated my data files for the nifty Flash mapping app- IndyJunior. This application reads coordinate data from an XML file, and maps locations and current geographic location. Check out the CDB travel maps for 2003 and 2004. By turning the template for this MT page from a *.html to […] ➡
- XSLT + RSS: Why Pretty for only some browsers or is some implementations? I’ve been mildly curious about some of the new attempts at making RSS feeds more human readable at first click- rather than seeing ugly XML code, these “new” feed displays use CSS (Style sheets) and some sort of magical transform method called XSLT — basically it means if you click a link that points to […] ➡
- 2003
- Free! Online! Building Accessible Websites Bless Joe Clark. Not only does he write a stunningly useful book, but he also provides all of the chapters (for free) to Building Accessible Websites. When you buy the book, you get the entire text (but no graphics) on the included CD-ROM, along with a few extras, like fonts and utilities. Now the whole […] ➡
- RSS Feeds from SourceForge.net Yet another useful avenue for RSS- stay in tune with all or part of the open source software projects at ➡
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.
Share this barking on social media