“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 15 posts previously published on April 20th
- 2021
- Two Old Folks in the Park Waxing On About Bookmarklets This was how things worked on the connected internet before people’s attention span got distilled down to 280 characters, clicking like buttons or reacting with emojis. I shot out a post here about some play with rather old tech, browser bookmarklet tools, all to be craftier at Google Image searches. In hours, Tony Hirst blogged […]
- 2019
- Glitch-a-SPLOT I cannot say I have the itch to glitch, but have always dug the kinds of things my colleague John Johnston does with adding glitch effects to digital stuff. But one link leads to another, and an idea sparks, and then next thing you have been dabbling a bit long, it’s been an unknown amount […]
- Big Fish / Small Search Pond Oh stats. I don’t typically look at the WordPress admin dashboard site stats, but it’s there. Sometimes a funny item pops out of the “top searches” display. What the heck was someone looking for when they put that into the google box? And how did they end up here? This I saw last night: I […]
- 2016
- You Can’t Catch the Catfishers… But You Can Play Out the Line And Waste Their Time I’ve dialed back the level energy I spent in January and February writing about catfishing. It consumes me with negativeness, and frankly– nothing is really going to ever change at a systemic scale. Do you really think Facebook is unaware of this problem? Given the number of reports that happen, the presence of catfishing support […]
- 2015
- All of Twitter to #DrBon A late congratulations to Bonnie Stewart for defending her dissertation on Friday. I am little peeved she scheduled it the morning I left for a 4 day backpack to the Grand Canyon, so I missed the live video stream and all of the twitter live action support. Through emails I did not see until today, […]
- 2014
- Eleven in Blog Years creative commons licensed ( BY-NC-SA ) flickr photo shared by chrisinplymouth Yikes, I missed my own blog birthday yesterday. This pile of typos, rants, and code jabbering started on April 19, 2003 with I Blog, Therefor I Am. This first post, which also defines the source of the name of this space, was posted using […]
- Remembering Sherman Lake With what seems like 95% of the comments that squiggle through Akismet to the moderation queue still spammy, it seems almost like your first blog comment when a legitimate one comes through (as most online conversations slither down the vat of twitter/facebook/google+ spaces). I got that today when Mark left a note of an experience […]
- 2013
- Happy Blog Day To Me… cc licensed ( BY ) flickr photo shared by Randy Pertiet I forgot my own birthday. No, not the human me, the blog me. Yesterday this pile of crud turned 10 years old. like Lorne Green would say in an Alpo commercial, “That’s 79 for you and me!”. The first blog post here was I […]
- 2011
- Jason the Red Cross Guy cc licensed flickr photo shared by cogdogblog He was persistent and wore me down for a donation to Red Cross; my concession was asking for a photo, not quite the full Stranger Photo process, but in that direction. This was my lukewarm attempt at a ds106 Stranger Portrait. Jason cornered my over on Green Street, […]
- 2009
- Lend a Hand to 50 Web 2.0 Ways to Tell a Story Help! Please. I am taking 50 Web 2.0 Ways to Tell a Story on a spurt of road shows over next 2 months- Barcuch College, Penn State University, Salem State College, and online version for Wooster College, and then a session at Ed-Media. Gulp, am I becoming one of those shlock presenters that milks a […]
- 2007
- Google Reader Offline Bonus Bet yer Bloglines cannot do this! One of the features I treasured in my desktop RSS reader (back when I used NetNewsWire) was that it would periodically download the lastest feeds and store the content on my computer. This meant then if I was offline (e.g. on a plane), I could still browse and read […]
- 2006
- Rockin’ in Second Life Today was the rockin’ launch of the NMC Campus opened virtually in Second Life. After much morning prep, we ran two different 2 hour sessions, at 1:00 PM and 5:00 PM PST. I am working on a new NMC site that should server as the primary news outlet (read as blog published, podcast enhanced, tagged, […]
- 2003
- About ePortfolios.. More to come here in the nest few weeks as some new efforts get under way in the area of Electronic Portfiolios. For now, see the 100+ resources collected for our October 18, 2003 ePortfolio Dialogue Day Share this barking on social media
- Google of the Week Part of (maybe) a regular feature here is a preset “Google-link” that produces results relevant to CDB… Coming soon will be a simple guide site to doing this for yourself, but it is just about the easiest, simplest, and most effective way to share external information without researching yourself… Share this barking on social media
- MT Plugins MT Plugins is very useful collection of addition tools for Movable Type for those that are setting up an MT site, all free. I’ve added two so far and plan to go back for more… 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 15 posts previously published on April 20th
- 2021
- Two Old Folks in the Park Waxing On About Bookmarklets This was how things worked on the connected internet before people’s attention span got distilled down to 280 characters, clicking like buttons or reacting with emojis. I shot out a post here about some play with rather old tech, browser bookmarklet tools, all to be craftier at Google Image searches. In hours, Tony Hirst blogged […] ➡
- 2019
- Glitch-a-SPLOT I cannot say I have the itch to glitch, but have always dug the kinds of things my colleague John Johnston does with adding glitch effects to digital stuff. But one link leads to another, and an idea sparks, and then next thing you have been dabbling a bit long, it’s been an unknown amount […] ➡
- Big Fish / Small Search Pond Oh stats. I don’t typically look at the WordPress admin dashboard site stats, but it’s there. Sometimes a funny item pops out of the “top searches” display. What the heck was someone looking for when they put that into the google box? And how did they end up here? This I saw last night: I […] ➡
- 2016
- 2015
- All of Twitter to #DrBon A late congratulations to Bonnie Stewart for defending her dissertation on Friday. I am little peeved she scheduled it the morning I left for a 4 day backpack to the Grand Canyon, so I missed the live video stream and all of the twitter live action support. Through emails I did not see until today, […] ➡
- 2014
- Eleven in Blog Years creative commons licensed ( BY-NC-SA ) flickr photo shared by chrisinplymouth Yikes, I missed my own blog birthday yesterday. This pile of typos, rants, and code jabbering started on April 19, 2003 with I Blog, Therefor I Am. This first post, which also defines the source of the name of this space, was posted using […] ➡
- Remembering Sherman Lake With what seems like 95% of the comments that squiggle through Akismet to the moderation queue still spammy, it seems almost like your first blog comment when a legitimate one comes through (as most online conversations slither down the vat of twitter/facebook/google+ spaces). I got that today when Mark left a note of an experience […] ➡
- 2013
- Happy Blog Day To Me… cc licensed ( BY ) flickr photo shared by Randy Pertiet I forgot my own birthday. No, not the human me, the blog me. Yesterday this pile of crud turned 10 years old. like Lorne Green would say in an Alpo commercial, “That’s 79 for you and me!”. The first blog post here was I […] ➡
- 2011
- Jason the Red Cross Guy cc licensed flickr photo shared by cogdogblog He was persistent and wore me down for a donation to Red Cross; my concession was asking for a photo, not quite the full Stranger Photo process, but in that direction. This was my lukewarm attempt at a ds106 Stranger Portrait. Jason cornered my over on Green Street, […] ➡
- 2009
- Lend a Hand to 50 Web 2.0 Ways to Tell a Story Help! Please. I am taking 50 Web 2.0 Ways to Tell a Story on a spurt of road shows over next 2 months- Barcuch College, Penn State University, Salem State College, and online version for Wooster College, and then a session at Ed-Media. Gulp, am I becoming one of those shlock presenters that milks a […] ➡
- 2007
- Google Reader Offline Bonus Bet yer Bloglines cannot do this! One of the features I treasured in my desktop RSS reader (back when I used NetNewsWire) was that it would periodically download the lastest feeds and store the content on my computer. This meant then if I was offline (e.g. on a plane), I could still browse and read […] ➡
- 2006
- Rockin’ in Second Life Today was the rockin’ launch of the NMC Campus opened virtually in Second Life. After much morning prep, we ran two different 2 hour sessions, at 1:00 PM and 5:00 PM PST. I am working on a new NMC site that should server as the primary news outlet (read as blog published, podcast enhanced, tagged, […] ➡
- 2003
- About ePortfolios.. More to come here in the nest few weeks as some new efforts get under way in the area of Electronic Portfiolios. For now, see the 100+ resources collected for our October 18, 2003 ePortfolio Dialogue Day Share this barking on social media ➡
- Google of the Week Part of (maybe) a regular feature here is a preset “Google-link” that produces results relevant to CDB… Coming soon will be a simple guide site to doing this for yourself, but it is just about the easiest, simplest, and most effective way to share external information without researching yourself… Share this barking on social media ➡
- MT Plugins MT Plugins is very useful collection of addition tools for Movable Type for those that are setting up an MT site, all free. I’ve added two so far and plan to go back for more… 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.