“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 May 13th
- 2018
- Class Exploder: NetNarr Lesson on the Gameboard of Digital Redlining On a long distance driving trip this week I’m getting a good chunk podcast listening time. One of my favorite ones is Song Exploder: Song Exploder is a podcast where musicians take apart their songs, and piece by piece, tell the story of how they were made. Each episode is produced and edited by host […]
- 2016
- Keying In on Three Numbers I have an obsession with a 3 digital number. Of course it’s 106 for the greatest ed-tech thing that’s ever happened. But I’m just talking here about the 3 digit number. Since January 2011, I have collected 367 photos of finding 106’s in the world. Milepost markers. Scale measurements. Fuel prices (Canadian liters). Addresses. Time. […]
- 2015
- Ketching Up With Darren, Telling and Making Stories It’s been almost a year since I caught up with Darren Kuropatwa, last was a year ago following up visiting Gimli Manitoba for the Riding the Wave conference. At request of Donna Fry, we teamed up for a live web session on Digital Storytelling last night for the Ontario School and System Leaders Edtech MOOC […]
- Hotel LinkedIn: You Can Delete Your Account But You Can Never Leave Sometime after I ejected myself from Facebook I also deleted my LinkedIn account. I checked in to Hotel LinkedIn when they first started, and as it grew, it consumed services like Slideshare. I have heard of people making important connections via the service, so I do not discount its value for some, to me, I […]
- 2013
- How Refreshing: Spaceflight, Optimism, Inspiration from Commander Hadfield As elementary school student in the early 1970s, our schedules at Bedford Elementary (like schools everywhere likely) were periodically interrupted for full school assemblies. We’d line up our chairs in the gymnasium trying to see the activity on what then were giant TVs mounted on carts. We did this for all of the Apollo mission […]
- 2012
- Motherless Children If you are looking for a post about MOOCs or techie stuff, come back another day. Today was… well I don’t have to say much beyond Motherless children have a hard time When the mother is gone Motherless children have a hard time When the mother is gone Motherless children have a hard time There’s […]
- 2011
- Last Night in Jamcamp cc licensed ( BY ) flickr photo shared by cogdogblog It was loud, loud, loud, and rocking in East Vancouver at the ds106 Jamcamp studios set up by Grant Potter and Brian Lamb. Ears still ringing, and we;ve got some amazing talent in the room, including @dlnorman, @sleslie, @grantpotter, @brnajack, @brlamb, @noiseprofessor, @DrGarcia, @draggin, and […]
- 2007
- For Moms Everywhere Iris Color Explosion posted 13 May ’07, 8.10am MDT PST on flickr At our cabni in Strawberry, AZ, the annual spring eruption of bearded irises seems even more glorious then ever. Just where would we be without you?… Share this barking on social media
- 2005
- Suns Are The Real Deal Something unusual happened in the NBA this year. The game actually got exciting. There is action, points are being scored. I went to a Phoenix Suns game about 3 years ago (someone felt bad because they forgot to show up for a meeting and offered to share me his ticket, I encouraged him to miss […]
- Holy Flickr! (Again) Holy _____. Flickr has done it again, rolling some cool interface features. First of all, great news for folks like Stephen, flickr photos are no longer rendered in Flash, but in DHTML; see From Flash to DHTML (on some pages!). Also, they have expanded the in-page editing to the Blog This and Send button functionalities. […]
- Podcast in My Queue Since I am up in Strawberry on my 28 kbps straw to the internet, I will not be able to grab this cast, but from the description, looks worth a listen (as well as the Y.uk? blog itself: “Well the answer is – Why Not or Y.not? I guess it is a tongue in cheek […]
- Not Available in Stores From a recent email discussion came a request for a simple “howto” for using bitTorrent. I’ve been peripherally interested in BT for a while, mentioning it in my Harry Mudd Future Peeking presentation. So with much better things to with my time, I whipped up this ad for a book not yet in stores: If […]
- A Real Technologist This weekend my wife and I are taking care of a friend’s 10 year old daughter, and in just 24 hours it has been a mind opening opportunity to see how she uses/absorbs technology among other things- to a 10 year old, it seems like everything is fascinating and worth exploring (where do we lose […]
- 2004
- openMLX: Thumbs Up From Legal Our legal department was supportive, even enthusiastic, about our plans to provide an openMLX, the propose open source version of the Maricopa Learning eXchange. They were not overly familiar with the details of open source licenses (they first proposed drafting up a new license), but seemed to understand our rationale for going GPL. Anyhow our […]
- Prototype for New RSS to JavaScript Code I ought to be something else, but have been bothered by two items regarding our often used RSS2JS (allows humans to use RSS by cut and past JavaScript, processed by a PHP middle ware script). It hinged upon the defunct, gone, and un-documented OnyxRSS Parser. It could not handle Atom feeds, and since Blogger is […]
- 2003
- RSS to JS update A quick update to the PHP script for the RSS to Javascript demo posted here May 7. For a reminder, this is a strategy for incorporating RSS feeds into ANY web page (HTML, Blackboard, WebCT) via a reference to a single line of JavaScript code. Share this barking on social media
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 May 13th
- 2018
- 2016
- Keying In on Three Numbers I have an obsession with a 3 digital number. Of course it’s 106 for the greatest ed-tech thing that’s ever happened. But I’m just talking here about the 3 digit number. Since January 2011, I have collected 367 photos of finding 106’s in the world. Milepost markers. Scale measurements. Fuel prices (Canadian liters). Addresses. Time. […] ➡
- 2015
- Ketching Up With Darren, Telling and Making Stories It’s been almost a year since I caught up with Darren Kuropatwa, last was a year ago following up visiting Gimli Manitoba for the Riding the Wave conference. At request of Donna Fry, we teamed up for a live web session on Digital Storytelling last night for the Ontario School and System Leaders Edtech MOOC […] ➡
- Hotel LinkedIn: You Can Delete Your Account But You Can Never Leave Sometime after I ejected myself from Facebook I also deleted my LinkedIn account. I checked in to Hotel LinkedIn when they first started, and as it grew, it consumed services like Slideshare. I have heard of people making important connections via the service, so I do not discount its value for some, to me, I […] ➡
- 2013
- 2012
- Motherless Children If you are looking for a post about MOOCs or techie stuff, come back another day. Today was… well I don’t have to say much beyond Motherless children have a hard time When the mother is gone Motherless children have a hard time When the mother is gone Motherless children have a hard time There’s […] ➡
- 2011
- Last Night in Jamcamp cc licensed ( BY ) flickr photo shared by cogdogblog It was loud, loud, loud, and rocking in East Vancouver at the ds106 Jamcamp studios set up by Grant Potter and Brian Lamb. Ears still ringing, and we;ve got some amazing talent in the room, including @dlnorman, @sleslie, @grantpotter, @brnajack, @brlamb, @noiseprofessor, @DrGarcia, @draggin, and […] ➡
- 2007
- For Moms Everywhere Iris Color Explosion posted 13 May ’07, 8.10am MDT PST on flickr At our cabni in Strawberry, AZ, the annual spring eruption of bearded irises seems even more glorious then ever. Just where would we be without you?… Share this barking on social media ➡
- 2005
- Suns Are The Real Deal Something unusual happened in the NBA this year. The game actually got exciting. There is action, points are being scored. I went to a Phoenix Suns game about 3 years ago (someone felt bad because they forgot to show up for a meeting and offered to share me his ticket, I encouraged him to miss […] ➡
- Holy Flickr! (Again) Holy _____. Flickr has done it again, rolling some cool interface features. First of all, great news for folks like Stephen, flickr photos are no longer rendered in Flash, but in DHTML; see From Flash to DHTML (on some pages!). Also, they have expanded the in-page editing to the Blog This and Send button functionalities. […] ➡
- Podcast in My Queue Since I am up in Strawberry on my 28 kbps straw to the internet, I will not be able to grab this cast, but from the description, looks worth a listen (as well as the Y.uk? blog itself: “Well the answer is – Why Not or Y.not? I guess it is a tongue in cheek […] ➡
- Not Available in Stores From a recent email discussion came a request for a simple “howto” for using bitTorrent. I’ve been peripherally interested in BT for a while, mentioning it in my Harry Mudd Future Peeking presentation. So with much better things to with my time, I whipped up this ad for a book not yet in stores: If […] ➡
- A Real Technologist This weekend my wife and I are taking care of a friend’s 10 year old daughter, and in just 24 hours it has been a mind opening opportunity to see how she uses/absorbs technology among other things- to a 10 year old, it seems like everything is fascinating and worth exploring (where do we lose […] ➡
- 2004
- openMLX: Thumbs Up From Legal Our legal department was supportive, even enthusiastic, about our plans to provide an openMLX, the propose open source version of the Maricopa Learning eXchange. They were not overly familiar with the details of open source licenses (they first proposed drafting up a new license), but seemed to understand our rationale for going GPL. Anyhow our […] ➡
- Prototype for New RSS to JavaScript Code I ought to be something else, but have been bothered by two items regarding our often used RSS2JS (allows humans to use RSS by cut and past JavaScript, processed by a PHP middle ware script). It hinged upon the defunct, gone, and un-documented OnyxRSS Parser. It could not handle Atom feeds, and since Blogger is […] ➡
- 2003
- RSS to JS update A quick update to the PHP script for the RSS to Javascript demo posted here May 7. For a reminder, this is a strategy for incorporating RSS feeds into ANY web page (HTML, Blackboard, WebCT) via a reference to a single line of JavaScript code. Share this barking on social media ➡
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.