“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 March 3rd
- 2025
- That’s Two (months of daily photos) Bring on the victory cheer! Now two months into the 18th round of Daily Photos posted to flickr and keeping pace with a 28/28 February on top of 31/31 January. The 2025/365 photo games remains STRONG. The month shows the winter scenes (a long stretch where we saw the place where Fahrenheit meets Celsius), yet […]
- 2018
- Over the Map Line My favorite thing to do in a plane is not the typical screen time– it’s window time, trying to read the textures and details of the land we fly over with the aid of machines as routinely as sitting in a car. And flying out of Phoenix, you typically get a full open view of […]
- 2016
- The Logic of Facebook Fake Account Reviews: It Just Does Not Add Up I’ve always heard that the Gila Monster, a Sonoran desert reptile (hey Canada, you have NO Sonoran desert) is notorious for a bite that is never released. I am going to be the same way with Facebook until they come out of their blue castle and explain they illogical, inconsistent, way they attend to reports […]
- 2015
- The Making of You Show Episode 6 Maybe more polished? With the help of Jon Fulton on camera and set up, Brian and Alan take the You Show to an auditorium (a long way from the first episode using the couch in Brian’s apartment). They have screen … Continued
- 2014
- Join in as DS106 Goes to Work If you have been looking for a DS106 experience to join, your boat comes in March 18. That is when an online course I have been invited to teach in DS106 style starts. EDIT 572: Digital Audio/Video Design and Applications is part of a graduate certificate Instructional Design and Technology (IDT) Program at George Mason […]
- 2009
- Arizona Government Stupidity in Action 2009/365/62: Short Sighted Government Stupidity in Action by cogdogblog posted 3 Mar ’09, 10.54pm MST PST on flickr Hmmm, I’ve been waiting for a local cause and here it is. The far seeing Arizona state legislature has slashed $35 million from state parks, which are closing like falling dominoes across the state. Tonto Natural Bridge […]
- Three Ways to Knead RSS cc licensed flickr image by yarnivore As someone who cannot make bread, I have no right to toss this metaphor in the air, but who’s gonna stop me? Yet I feel that using RSS, is simple in terms of ingredients (flour, water, yeast, and something to give it taste), and if you do know what […]
- 2008
- Dog (rightfully) Called An aspect if blogging I find essential is shying away from a “please the world” view, meaning stepping out on limbs, and thus sometimes, being outright foolish, wrong, even “stupid”. And I welcome being called on my shit. So sometimes, or often, I spout something before thinking it through. So here is my public service […]
- iPod Touching I have gone deep into the iPod touch loveness. It is a thing of sweetness to not only touch but to use functionally. Plus until now my iPods have been bottom of the rack cheapies. It was watching D’arcy Norman blog and twitter (and who knows, code drupal?) at Northern Voice that pushed me over […]
- 2006
- Web X.X and Our History of Collecting URLs Since not long after the day in October 1993 when a colleague handed my a floppy disk (remember those?) labeled “Mosaic”, our office has had a continuously running web server. We have gone through several iterations of trying to build collections of web resources for educators, and in going through some old files, I got […]
- Immigrants / Natives and the Dharma Initiative Small, insignificant observational note of no consequence: In my two podcasting demos this week for faculty and staff at our colleges, I showed as a video example an episode from the TV show Lost that I had bought on the Apple Store for $1.99. Before I showed a small bit of it, I asked how […]
- 2005
- Mothers Guard Your RSS Feeds, Someone Wants to “Monetize” Them Look out for your RSS– as warned the vultures are still circling, and maybe hovering closer to your feeds. It’s interesting, curious, and quirky when the PR factories roll new verbs off the assembly line- Moreover’s FeedRSSDirect Ads offer this savory description: Moreover Technologies, the premier provider of aggregated online current awareness information, today announced […]
- 2004
- Meta-Data Yeti-Data My position have been made too many times regarding the apparent over-obsession with learning object meta-data, 4 words guaranteed used together will put most ordinary humans into a mild coma. I’ve given thought to meta-data and our Maricopa Learning eXchange, where the “M-D” words will never appear, but certainly lurk under the cover of our […]
- 31 Vanillas This will likely be a first and last blog entry referencing politics. I might be judged as apathetic, but I do my research quietly, make my decisions, and vote, without foaming at the mouth or making it an obsession. However, after some hasty mulling, I decided to share my summary of the political scene. We […]
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 March 3rd
- 2025
- That’s Two (months of daily photos) Bring on the victory cheer! Now two months into the 18th round of Daily Photos posted to flickr and keeping pace with a 28/28 February on top of 31/31 January. The 2025/365 photo games remains STRONG. The month shows the winter scenes (a long stretch where we saw the place where Fahrenheit meets Celsius), yet […] ➡
- 2018
- Over the Map Line My favorite thing to do in a plane is not the typical screen time– it’s window time, trying to read the textures and details of the land we fly over with the aid of machines as routinely as sitting in a car. And flying out of Phoenix, you typically get a full open view of […] ➡
- 2016
- The Logic of Facebook Fake Account Reviews: It Just Does Not Add Up I’ve always heard that the Gila Monster, a Sonoran desert reptile (hey Canada, you have NO Sonoran desert) is notorious for a bite that is never released. I am going to be the same way with Facebook until they come out of their blue castle and explain they illogical, inconsistent, way they attend to reports […] ➡
- 2015
- The Making of You Show Episode 6 Maybe more polished? With the help of Jon Fulton on camera and set up, Brian and Alan take the You Show to an auditorium (a long way from the first episode using the couch in Brian’s apartment). They have screen … Continued ➡
- 2014
- Join in as DS106 Goes to Work If you have been looking for a DS106 experience to join, your boat comes in March 18. That is when an online course I have been invited to teach in DS106 style starts. EDIT 572: Digital Audio/Video Design and Applications is part of a graduate certificate Instructional Design and Technology (IDT) Program at George Mason […] ➡
- 2009
- Arizona Government Stupidity in Action 2009/365/62: Short Sighted Government Stupidity in Action by cogdogblog posted 3 Mar ’09, 10.54pm MST PST on flickr Hmmm, I’ve been waiting for a local cause and here it is. The far seeing Arizona state legislature has slashed $35 million from state parks, which are closing like falling dominoes across the state. Tonto Natural Bridge […] ➡
- Three Ways to Knead RSS cc licensed flickr image by yarnivore As someone who cannot make bread, I have no right to toss this metaphor in the air, but who’s gonna stop me? Yet I feel that using RSS, is simple in terms of ingredients (flour, water, yeast, and something to give it taste), and if you do know what […] ➡
- 2008
- Dog (rightfully) Called An aspect if blogging I find essential is shying away from a “please the world” view, meaning stepping out on limbs, and thus sometimes, being outright foolish, wrong, even “stupid”. And I welcome being called on my shit. So sometimes, or often, I spout something before thinking it through. So here is my public service […] ➡
- iPod Touching I have gone deep into the iPod touch loveness. It is a thing of sweetness to not only touch but to use functionally. Plus until now my iPods have been bottom of the rack cheapies. It was watching D’arcy Norman blog and twitter (and who knows, code drupal?) at Northern Voice that pushed me over […] ➡
- 2006
- Web X.X and Our History of Collecting URLs Since not long after the day in October 1993 when a colleague handed my a floppy disk (remember those?) labeled “Mosaic”, our office has had a continuously running web server. We have gone through several iterations of trying to build collections of web resources for educators, and in going through some old files, I got […] ➡
- Immigrants / Natives and the Dharma Initiative Small, insignificant observational note of no consequence: In my two podcasting demos this week for faculty and staff at our colleges, I showed as a video example an episode from the TV show Lost that I had bought on the Apple Store for $1.99. Before I showed a small bit of it, I asked how […] ➡
- 2005
- Mothers Guard Your RSS Feeds, Someone Wants to “Monetize” Them Look out for your RSS– as warned the vultures are still circling, and maybe hovering closer to your feeds. It’s interesting, curious, and quirky when the PR factories roll new verbs off the assembly line- Moreover’s FeedRSSDirect Ads offer this savory description: Moreover Technologies, the premier provider of aggregated online current awareness information, today announced […] ➡
- 2004
- Meta-Data Yeti-Data My position have been made too many times regarding the apparent over-obsession with learning object meta-data, 4 words guaranteed used together will put most ordinary humans into a mild coma. I’ve given thought to meta-data and our Maricopa Learning eXchange, where the “M-D” words will never appear, but certainly lurk under the cover of our […] ➡
- 31 Vanillas This will likely be a first and last blog entry referencing politics. I might be judged as apathetic, but I do my research quietly, make my decisions, and vote, without foaming at the mouth or making it an obsession. However, after some hasty mulling, I decided to share my summary of the political scene. We […] ➡
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.