“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 June 15th
- 2023
- Documenting the Web as Documents Oi. My clever blog post title generator is not really jelling this morning (the unArtificial quasiIntelligence needs more coffee). The VHS tape for #ReclaimOpen 2023 has reached the end spool, and people are dusting their blogs off to reflect on the tri-part questions of the Open Web: How We Got There, Where We Are, and […]
- 2021
- Curious About Curiosity After many years of being a first grade teacher, my sister Judy has certainly earned the freedom of retirement days doing what she wants. She has been messaging this week as she is sorting through many boxes of family memories, sharing a gem every day. She sent this photo asking if I remembered it: But […]
- Still Dreaming of Filling those Collection Sites [Database] of Dreams Note: It’s rare around this blog that something lingers in draft as long as this post. There is a reason for everything, right? But this one needs to get squeezed out of the Easy Blog Oven for another one to follow. The very same desire I heard in my first week (1992) as an instructional […]
- 2017
- Get Back (to where you once did blog) The name of the band is subject to argument, but like those Brits in 1970 rocking atop a roof, at the Domains 2017 Conference something happened atop a rooftop in Oklahoma City. And then after the conference, weirder stuff happened — people went home and fired up good old fashioned blog posts. Just like it […]
- 2015
- The Ize Has It It started as just some tweets, making fun of buzz words with Laura Gibbs and Bill Fitzgerald @cogdog @funnymonkey I'm nervous around words that don't rhyme with other words. like monetize. 🙂 — Laura Gibbs (@OnlineCrsLady) June 9, 2015 https://twitter.com/funnymonkey/status/608316228520837122 This the day before I left for DML 2015, and an idea to do something […]
- 2014
- A Probably Not So Wonderful Email Contact Form UPDATE: One day after updating my code, I got some crappo spam email via the contact form for stupid hand bags. I am done with email forms. If you cannot figure out how to reach me, I am not sure I want to hear from you. Don’t even bother with what follows! Email contact forms, […]
- The CLMOOC Bank: It Flies! creative commons licensed ( BY ) flickr photo shared by martinjetpack A few weeks (or more) ago Karen Fasimpaur asked me if the new DS106 Assignment Bank as a WordPress theme was reliable enough to be used for the 2014 Making Learning Connected MOOC. I forget her exact words, but something like, “Can you re-assure […]
- Dear Dad Dad, This is your long awaited letter that’s taken more than a semester to write. It’s nice to hear you talk more openly in your letter and hope we can talk more in person. I’ve found sometimes it’s easier to write your feelings than say them, but I think it’s better to be able to […]
- 2013
- The Exercism of @IAmTalkyTina cc licensed ( BY SA ) flickr photo shared by Alan Levine At 3:18 am june 14, 2013, the annoying presence of IamTalkyTina, documented previously in my confessed creation story, has disappeared completely. An intense Rim to Rim Grand Canyon hike, 24 miles hiked in 18 hours, 11000 feet of elevation gain/loss, did the trick. […]
- <3 Google They may “Do No Evil”â„¢ but they can “Take Away Web Stuff That Works For No Credible Reason”. There is goes. Bye bye Reader. #GoogleNot4Life pic.twitter.com/2Yt4X7xuje — Alan Levine (@cogdog) April 6, 2013 If Google cannot afford the expenditure or running a web service, how are they funding the raft of experimentation? This is but […]
- 2012
- Community Enthusiasts, Hackerspacing, Dead Drops cc licensed ( BY ) flickr photo shared by cogdogblog As prelude to Northern Voice 2012, today I attended the ScOPE Online Community Enthusiasts meeting, a meeting I got much out of last year. IN her inimitable way, Nancy White shared the sketched agenda by laying on the floor and spinning herself around like a […]
- 2011
- Working Your Virtuous Circles cc licensed ( BY NC ND ) flickr photo shared by giveawayboy Taking the swirl metaphor of real life/online connections in a different direction, what follows might be patently obvious. But first, here is some secret insight- If you find that 140 characters cramps your communication style (and please avoid the hokey pokey longer tweet […]
- Quotables cc licensed ( BY NC ND ) flickr photo shared by Jess Gambacurta For the last four? five years? I’ve sported the same old quote on the top right of this blog, under “What the CDB”, a slight rewording of my favorite desert author. Time it was to change out the quote, and I found […]
- The StoryBox is Open I just created a new page to explain and invite participating in the StoryBoax/PirateBox idea sketched out earlier — you can see the info at the project’s new home http://cogdogblog.com/storybox/. it has instructions there on how you can contribute to the project via a dropbox site, just in case I do not cross paths with […]
- 2008
- Button for Jim Groom Button for Jim Groom by cogdogblog posted 15 Jun ’08, 7.54pm MDT PST on flickr Her ya go, Reverend Jim, fresh off the Photoshop machine, courtesy of a "punk rock saved my life" pin found at Wooden Shoes Books and Records on 4th Street in Philly. As if we needed more blog fluff for edupunk, […]
- 2006
- Final (Maybe) From Flickr I cannot say anymore that flickr is not being responsive, after the knock knock post, I got a rather long, and detailed message, with some clarification of NIPSA, why it is there, and some re-assurrances that they are working on ways to flag things with categories for ones that are not photos. NIPSA is all […]
- 2005
- I Rode the Wiki! flickr foto Obligatory WIki Photoavailable on my flickr Having landed at the Honolulu airport, I paid the computer technogeek’s homage to Ward Cunningham by taking the obligatory photo of the "Wiki Wiki" bus. Wow, is Hawaii heavenly on what? And I get the honor of shuttling between airport terminals on the legendary Wiki Wiki busses, […]
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 June 15th
- 2023
- Documenting the Web as Documents Oi. My clever blog post title generator is not really jelling this morning (the unArtificial quasiIntelligence needs more coffee). The VHS tape for #ReclaimOpen 2023 has reached the end spool, and people are dusting their blogs off to reflect on the tri-part questions of the Open Web: How We Got There, Where We Are, and […] &#x27A1;
- 2021
- Curious About Curiosity After many years of being a first grade teacher, my sister Judy has certainly earned the freedom of retirement days doing what she wants. She has been messaging this week as she is sorting through many boxes of family memories, sharing a gem every day. She sent this photo asking if I remembered it: But […] &#x27A1;
- Still Dreaming of Filling those Collection Sites [Database] of Dreams Note: It’s rare around this blog that something lingers in draft as long as this post. There is a reason for everything, right? But this one needs to get squeezed out of the Easy Blog Oven for another one to follow. The very same desire I heard in my first week (1992) as an instructional […] &#x27A1;
- 2017
- Get Back (to where you once did blog) The name of the band is subject to argument, but like those Brits in 1970 rocking atop a roof, at the Domains 2017 Conference something happened atop a rooftop in Oklahoma City. And then after the conference, weirder stuff happened — people went home and fired up good old fashioned blog posts. Just like it […] &#x27A1;
- 2015
- The Ize Has It It started as just some tweets, making fun of buzz words with Laura Gibbs and Bill Fitzgerald @cogdog @funnymonkey I'm nervous around words that don't rhyme with other words. like monetize. 🙂 — Laura Gibbs (@OnlineCrsLady) June 9, 2015 https://twitter.com/funnymonkey/status/608316228520837122 This the day before I left for DML 2015, and an idea to do something […] &#x27A1;
- 2014
- A Probably Not So Wonderful Email Contact Form UPDATE: One day after updating my code, I got some crappo spam email via the contact form for stupid hand bags. I am done with email forms. If you cannot figure out how to reach me, I am not sure I want to hear from you. Don’t even bother with what follows! Email contact forms, […] &#x27A1;
- The CLMOOC Bank: It Flies! creative commons licensed ( BY ) flickr photo shared by martinjetpack A few weeks (or more) ago Karen Fasimpaur asked me if the new DS106 Assignment Bank as a WordPress theme was reliable enough to be used for the 2014 Making Learning Connected MOOC. I forget her exact words, but something like, “Can you re-assure […] &#x27A1;
- Dear Dad Dad, This is your long awaited letter that’s taken more than a semester to write. It’s nice to hear you talk more openly in your letter and hope we can talk more in person. I’ve found sometimes it’s easier to write your feelings than say them, but I think it’s better to be able to […] &#x27A1;
- 2013
- The Exercism of @IAmTalkyTina cc licensed ( BY SA ) flickr photo shared by Alan Levine At 3:18 am june 14, 2013, the annoying presence of IamTalkyTina, documented previously in my confessed creation story, has disappeared completely. An intense Rim to Rim Grand Canyon hike, 24 miles hiked in 18 hours, 11000 feet of elevation gain/loss, did the trick. […] &#x27A1;
- <3 Google They may “Do No Evil”â„¢ but they can “Take Away Web Stuff That Works For No Credible Reason”. There is goes. Bye bye Reader. #GoogleNot4Life pic.twitter.com/2Yt4X7xuje — Alan Levine (@cogdog) April 6, 2013 If Google cannot afford the expenditure or running a web service, how are they funding the raft of experimentation? This is but […] &#x27A1;
- 2012
- Community Enthusiasts, Hackerspacing, Dead Drops cc licensed ( BY ) flickr photo shared by cogdogblog As prelude to Northern Voice 2012, today I attended the ScOPE Online Community Enthusiasts meeting, a meeting I got much out of last year. IN her inimitable way, Nancy White shared the sketched agenda by laying on the floor and spinning herself around like a […] &#x27A1;
- 2011
- Working Your Virtuous Circles cc licensed ( BY NC ND ) flickr photo shared by giveawayboy Taking the swirl metaphor of real life/online connections in a different direction, what follows might be patently obvious. But first, here is some secret insight- If you find that 140 characters cramps your communication style (and please avoid the hokey pokey longer tweet […] &#x27A1;
- Quotables cc licensed ( BY NC ND ) flickr photo shared by Jess Gambacurta For the last four? five years? I’ve sported the same old quote on the top right of this blog, under “What the CDB”, a slight rewording of my favorite desert author. Time it was to change out the quote, and I found […] &#x27A1;
- The StoryBox is Open I just created a new page to explain and invite participating in the StoryBoax/PirateBox idea sketched out earlier — you can see the info at the project’s new home http://cogdogblog.com/storybox/. it has instructions there on how you can contribute to the project via a dropbox site, just in case I do not cross paths with […] &#x27A1;
- 2008
- Button for Jim Groom Button for Jim Groom by cogdogblog posted 15 Jun ’08, 7.54pm MDT PST on flickr Her ya go, Reverend Jim, fresh off the Photoshop machine, courtesy of a "punk rock saved my life" pin found at Wooden Shoes Books and Records on 4th Street in Philly. As if we needed more blog fluff for edupunk, […] &#x27A1;
- 2006
- Final (Maybe) From Flickr I cannot say anymore that flickr is not being responsive, after the knock knock post, I got a rather long, and detailed message, with some clarification of NIPSA, why it is there, and some re-assurrances that they are working on ways to flag things with categories for ones that are not photos. NIPSA is all […] &#x27A1;
- 2005
- I Rode the Wiki! flickr foto Obligatory WIki Photoavailable on my flickr Having landed at the Honolulu airport, I paid the computer technogeek’s homage to Ward Cunningham by taking the obligatory photo of the "Wiki Wiki" bus. Wow, is Hawaii heavenly on what? And I get the honor of shuttling between airport terminals on the legendary Wiki Wiki busses, […] &#x27A1;
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.