“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 13 posts previously published on January 30th
- 2023
- It’s as if MarketingGPT is already in play… pooping on the web In Chapter 32 of the “You Cannot Make this**** Up Book of Internet Stupidity” I submit for your disapproval perhaps evidence that GPT AI is in use already for marketing pimple brains. It was more than 10 years ago I began some relentless debunking of the oft-cited 60000 times faster assertion — “Researchers at 3M […]
- 2020
- Does You Know What’s Inside Your Own Cookies? Each week I buy a package of cheap storebrand sugar cookies, I call them my “Horrible Cheap Cookies.” I eat 2 or 3 when my blood sugar dips. My wife laughs at me, but I kind of like those no-name maple cookies. I have no idea what’s in them. I can guess, but do I […]
- 2017
- OPML Is the Alchemy of Following Blogs in an Open Networked Course This post is meant primarily for participants in the Networked Narratives course I am co-teaching with Mia Zamora, where everyone is publishing in their own blog space. Everything here applies as well for the Open Learning ’17 course led by Gardner Campbell; I’m working on both sites at the same time, so things I do […]
- 2014
- Café des Hummer (1890) It’s great to see a lot of folks taking up the Tate Museum 1840s GIF Party, as a ds106 assignment, and on giffight. I could not rest without finding one more to do. Walter Richard Sickert saw the typical tranquility of a French street scene in Café des Tribunaux, Dieppe, only missing the smell of […]
- Me and Ira Hanging Out in Flagstaff cc licensed ( BY SA ) flickr photo shared by Alan Levine To cap off a full weekend, after attending the SCC Tech Talks on Friday I headed north to Flagstaff to catch the show by Ira Glass at Northern Arizona University. The great irony is that I found out about this show via a […]
- 2013
- Author, Author, Me? Are You Talking to Me? Fresh off the electronic press, dripping with electronic ink and smelling faintly of dittos, my words are in the Jauanry/february 2013 issue of Educause Review in the New Horizons department (yawn, horizons) (oops). Look ma, a citation! ds106: Not a Course, Not Like Any MOOC: Looking for something different from the current hysteria of Massive […]
- 2010
- What Are My Friends doing in My Google Search Results? Here’s another episode where Alan Discovers Something That Has Been Out A While and Maybe Everyone Else Calls it Old News but….. This morning I was doing a Google Image search (more often these days I am using the advanced options to filter out images licensed for re-use) and was surprised/curious about what I saw […]
- 2008
- ELILATE I’m woefully, no utterly, no massively badly behind on any sense of conference blogging at EDUCAUSE ELI Conference, but am eager for some plan time tomorrow to support back posting from the plane Share this barking on social media
- Blow Up Your Photos With Piclens No, the title is not a bad TSA joke (are there any good ones?), but a lovingly statement of joy for yet another cool photo tool. Piclens has been around a while but only for Safari on Max OS X, but now it works as an extension for Firefox on Mac or Windows. Piclens turns […]
- 2006
- Fish Tacos Served TACO HOUSE! Originally uploaded by larowebr. Brian and I had a filled room for our session on Beyond Blogs. It was a blast and we were honored to have a great audience, many of them bloggers we’ve only had virtual connections to… but since I am trying to listen t other sesstions, the post game […]
- ELI Keynote Marc Prensky Engage Me or Enrage Me: Education Today’s Digital Native LearnersMarc PrenskyGames2Train [ed: I heard Prensky’s message several years ago– the message is good, but not all that different. He has a strong message, does it with passion, shows on the screen a lot of “bumper sticker” statements. We’re almost 45 minutes in, maybe 50 slides, […]
- Conference In a Bag Sunny San Diego, fresh ocean breeze, how much better can it get? I slipped into town this afternoon for the EDUCAUSE ELI Annual conference, picked up the bag, and performed a past ritual. But bags aside, it’s off to a galactic start. I met up Brian Lamb this afternonn and we mulled over our session […]
- 2004
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 13 posts previously published on January 30th
- 2023
- It’s as if MarketingGPT is already in play… pooping on the web In Chapter 32 of the “You Cannot Make this**** Up Book of Internet Stupidity” I submit for your disapproval perhaps evidence that GPT AI is in use already for marketing pimple brains. It was more than 10 years ago I began some relentless debunking of the oft-cited 60000 times faster assertion — “Researchers at 3M […] ➡
- 2020
- Does You Know What’s Inside Your Own Cookies? Each week I buy a package of cheap storebrand sugar cookies, I call them my “Horrible Cheap Cookies.” I eat 2 or 3 when my blood sugar dips. My wife laughs at me, but I kind of like those no-name maple cookies. I have no idea what’s in them. I can guess, but do I […] ➡
- 2017
- OPML Is the Alchemy of Following Blogs in an Open Networked Course This post is meant primarily for participants in the Networked Narratives course I am co-teaching with Mia Zamora, where everyone is publishing in their own blog space. Everything here applies as well for the Open Learning ’17 course led by Gardner Campbell; I’m working on both sites at the same time, so things I do […] ➡
- 2014
- Café des Hummer (1890) It’s great to see a lot of folks taking up the Tate Museum 1840s GIF Party, as a ds106 assignment, and on giffight. I could not rest without finding one more to do. Walter Richard Sickert saw the typical tranquility of a French street scene in Café des Tribunaux, Dieppe, only missing the smell of […] ➡
- Me and Ira Hanging Out in Flagstaff cc licensed ( BY SA ) flickr photo shared by Alan Levine To cap off a full weekend, after attending the SCC Tech Talks on Friday I headed north to Flagstaff to catch the show by Ira Glass at Northern Arizona University. The great irony is that I found out about this show via a […] ➡
- 2013
- Author, Author, Me? Are You Talking to Me? Fresh off the electronic press, dripping with electronic ink and smelling faintly of dittos, my words are in the Jauanry/february 2013 issue of Educause Review in the New Horizons department (yawn, horizons) (oops). Look ma, a citation! ds106: Not a Course, Not Like Any MOOC: Looking for something different from the current hysteria of Massive […] ➡
- 2010
- What Are My Friends doing in My Google Search Results? Here’s another episode where Alan Discovers Something That Has Been Out A While and Maybe Everyone Else Calls it Old News but….. This morning I was doing a Google Image search (more often these days I am using the advanced options to filter out images licensed for re-use) and was surprised/curious about what I saw […] ➡
- 2008
- ELILATE I’m woefully, no utterly, no massively badly behind on any sense of conference blogging at EDUCAUSE ELI Conference, but am eager for some plan time tomorrow to support back posting from the plane Share this barking on social media ➡
- Blow Up Your Photos With Piclens No, the title is not a bad TSA joke (are there any good ones?), but a lovingly statement of joy for yet another cool photo tool. Piclens has been around a while but only for Safari on Max OS X, but now it works as an extension for Firefox on Mac or Windows. Piclens turns […] ➡
- 2006
- Fish Tacos Served TACO HOUSE! Originally uploaded by larowebr. Brian and I had a filled room for our session on Beyond Blogs. It was a blast and we were honored to have a great audience, many of them bloggers we’ve only had virtual connections to… but since I am trying to listen t other sesstions, the post game […] ➡
- ELI Keynote Marc Prensky Engage Me or Enrage Me: Education Today’s Digital Native LearnersMarc PrenskyGames2Train [ed: I heard Prensky’s message several years ago– the message is good, but not all that different. He has a strong message, does it with passion, shows on the screen a lot of “bumper sticker” statements. We’re almost 45 minutes in, maybe 50 slides, […] ➡
- Conference In a Bag Sunny San Diego, fresh ocean breeze, how much better can it get? I slipped into town this afternoon for the EDUCAUSE ELI Annual conference, picked up the bag, and performed a past ritual. But bags aside, it’s off to a galactic start. I met up Brian Lamb this afternonn and we mulled over our session […] ➡
- 2004
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.