“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 August 26th
- 2019
- Web Writing… like it was not 1995 Some colleagues are pegging one of the best blogging genres, blogging about blogging or writing about writing. Kate Bowles started a wave with lamenting the weight work related writing, Martin Weller cues the Fab Four , Alyson Indrus is focused on writing writing, and while it’s more indirect, D’Arcy Norman’s observation of Apocalyptic Chic is […]
- 2018
- Cleaning Up The WordPress AdminBar New Menu Tonight the WordPress tinkering I was doing was way down in the weeds, but it never fails me how the codebase let’s you manipulate almost every thing in the interface. So a current project I am doing has a custom post type for something called Artifacts (yes, it’s for a portfolio project). I was showing […]
- 2015
- Imaginary Bestseller! “Tweeting Alone” (and the making thereof) Twas not my plan to make a mocked up book cover, even before breakfast. But so it goes, when the urge worms its way into my cranium. I cannot let go til I try it out. I woke up to back scroll twitter, finding the eminently sarcastic, funny, insightful, and a large number of standard […]
- 2013
- Sometimes Someone Else Has to See The Force Things can be right in front of you and you miss something completely. That’s the beauty, at least one of them, in a place we share things. More eyes, more perspective. Yesterday’s ds106 Daily Create was to make a monster out of your kitchen items. Given my old cheap coffee maker died that very morning, […]
- ds106 Assignment Bank Neuvo: Counts, Shortcodes, Index Flexibility Here is a summary of tweaking made for the prototype of the theme to make a ds106 assignment bank for your own uses. I managed to do this Friday afternoon while waiting for my truck to be serviced; I have to return tomorrow, so maybe the Ford dealership in Star Valley, Arizona is good for […]
- 2012
- Ramping Up for Online ds106 cc licensed ( BY NC ND ) flickr photo shared by Danforth1 My section of ds106 starts tomorrow, I am teaching a section completely online. I just realized I never reflected much on the summer experience, wich was the first time doing it online. The summer version is even more different, because we have room […]
- Stuff to Do cc licensed ( BY NC SD ) flickr photo shared by adesigna It’s been a few clicks since I set out again on the open road and have jumped at least down state from Fredericksburg since leaving UMW. But that’s not important. For my sake, I’m going to list the things I hope to be […]
- Watch That Flame (Seven Day Daily Create Challenge Mashup) Oi, somehow I never published this post, my own answer to my own challenge. I just found it in my unpublished drafts drawer. Bad Dog. The first rule of issuing challenges is be prepared to remix your own dog food. Thus I find myself tonight working at doing my own creation for the Seven Day […]
- 2010
- Semantically Yours (or George) Tweetbeat Firsthand hovers somewhere between subtly amazing and “meh”. But I’ve giving it a whirl. What it is, is a browser plugin/extension (works with Firefox, Chrome, and Safari… there is some irony about the other browser shrinking in the mist of obscurity). What it does is to figure out in the text of a web […]
- The Power of Goofing Off cc licensed flickr photo shared by Jenny P. If we just lived our lives out by setting, pursuing, and meeting objectives, what a sterile world it would be. Here;s to what you learn when you are not expecting too, and for surfing by serendipity. Serendipity is following the curious post titles in your RSS reader, […]
- 2009
- Honing an Aperture Strategy I cannot claim organization as one of my attributes, but have had an interesting process the last few months in getting a tad closer to being more organized in my digital photography. The 12,000+ photos in flickr accumulated since March 2004 are but the tip of a glacier looming in a plastic box in my […]
- Tilt Shift the Easy Way cc licensed flickr photo shared by cogdogblog Turning an original photo of Vancouver from the Burrard Street Bridge into something like a toy train model is now easy! I’ve done some toying around with the tilt-shift effect using various techniques in PhotoShop, but the Tilt Shift Generator is a fun and easy way to create […]
- 2006
- Interpreting the Signs flickr foto no_trespassavailable on flickr I cannot read signs that I do not like. Blog activity subject to severe fluctuation– I am off for 12 days at our cabin retreat in Strawberry, AZ, where yes, Stephen, there are truly forests in Arizona. So I will have my feet on the rail of the deck, or […]
- 2005
- The Cat Ate My Photos Ah a bump in the Mac OS X Tiger upgrade — my vopy of iPhoto is toally stuck in spinning beachball land. I’ve tried rebuilding the library, renmaming, extracing photos with iPhoto extractor, etc. It is still hosed. I might have to get a copy of iLife now and start over. I had a huge […]
- BlogSieve: A New RSS Mix and Match The link came from an actual comment to a blog entry– imagine that, a useful link from a comment! BlogSieve (“Advanced Feed Processing for Atom, RDF, and RSS”) is a new service that is fresh out and has potential for those wanting to mix RSS feed sources and recombine them in new ways: BlogSieve is […]
- 2004
- FIPPers Go GaaGaa for ePort It’s energizing to have an eager workshop audience…. today I demo-ed our Maricopa ePortfolio system for the new interns in our Faculty In Progress Program (FIPP). After a presentation on portfolio-ing by one of our experts from Mesa Community College. I showed them a mocked up fake ePort, and then we just created new content […]
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 August 26th
- 2019
- Web Writing… like it was not 1995 Some colleagues are pegging one of the best blogging genres, blogging about blogging or writing about writing. Kate Bowles started a wave with lamenting the weight work related writing, Martin Weller cues the Fab Four , Alyson Indrus is focused on writing writing, and while it’s more indirect, D’Arcy Norman’s observation of Apocalyptic Chic is […] ➡
- 2018
- Cleaning Up The WordPress AdminBar New Menu Tonight the WordPress tinkering I was doing was way down in the weeds, but it never fails me how the codebase let’s you manipulate almost every thing in the interface. So a current project I am doing has a custom post type for something called Artifacts (yes, it’s for a portfolio project). I was showing […] ➡
- 2015
- 2013
- Sometimes Someone Else Has to See The Force Things can be right in front of you and you miss something completely. That’s the beauty, at least one of them, in a place we share things. More eyes, more perspective. Yesterday’s ds106 Daily Create was to make a monster out of your kitchen items. Given my old cheap coffee maker died that very morning, […] ➡
- ds106 Assignment Bank Neuvo: Counts, Shortcodes, Index Flexibility Here is a summary of tweaking made for the prototype of the theme to make a ds106 assignment bank for your own uses. I managed to do this Friday afternoon while waiting for my truck to be serviced; I have to return tomorrow, so maybe the Ford dealership in Star Valley, Arizona is good for […] ➡
- 2012
- Ramping Up for Online ds106 cc licensed ( BY NC ND ) flickr photo shared by Danforth1 My section of ds106 starts tomorrow, I am teaching a section completely online. I just realized I never reflected much on the summer experience, wich was the first time doing it online. The summer version is even more different, because we have room […] ➡
- Stuff to Do cc licensed ( BY NC SD ) flickr photo shared by adesigna It’s been a few clicks since I set out again on the open road and have jumped at least down state from Fredericksburg since leaving UMW. But that’s not important. For my sake, I’m going to list the things I hope to be […] ➡
- Watch That Flame (Seven Day Daily Create Challenge Mashup) Oi, somehow I never published this post, my own answer to my own challenge. I just found it in my unpublished drafts drawer. Bad Dog. The first rule of issuing challenges is be prepared to remix your own dog food. Thus I find myself tonight working at doing my own creation for the Seven Day […] ➡
- 2010
- Semantically Yours (or George) Tweetbeat Firsthand hovers somewhere between subtly amazing and “meh”. But I’ve giving it a whirl. What it is, is a browser plugin/extension (works with Firefox, Chrome, and Safari… there is some irony about the other browser shrinking in the mist of obscurity). What it does is to figure out in the text of a web […] ➡
- The Power of Goofing Off cc licensed flickr photo shared by Jenny P. If we just lived our lives out by setting, pursuing, and meeting objectives, what a sterile world it would be. Here;s to what you learn when you are not expecting too, and for surfing by serendipity. Serendipity is following the curious post titles in your RSS reader, […] ➡
- 2009
- Honing an Aperture Strategy I cannot claim organization as one of my attributes, but have had an interesting process the last few months in getting a tad closer to being more organized in my digital photography. The 12,000+ photos in flickr accumulated since March 2004 are but the tip of a glacier looming in a plastic box in my […] ➡
- Tilt Shift the Easy Way cc licensed flickr photo shared by cogdogblog Turning an original photo of Vancouver from the Burrard Street Bridge into something like a toy train model is now easy! I’ve done some toying around with the tilt-shift effect using various techniques in PhotoShop, but the Tilt Shift Generator is a fun and easy way to create […] ➡
- 2006
- Interpreting the Signs flickr foto no_trespassavailable on flickr I cannot read signs that I do not like. Blog activity subject to severe fluctuation– I am off for 12 days at our cabin retreat in Strawberry, AZ, where yes, Stephen, there are truly forests in Arizona. So I will have my feet on the rail of the deck, or […] ➡
- 2005
- The Cat Ate My Photos Ah a bump in the Mac OS X Tiger upgrade — my vopy of iPhoto is toally stuck in spinning beachball land. I’ve tried rebuilding the library, renmaming, extracing photos with iPhoto extractor, etc. It is still hosed. I might have to get a copy of iLife now and start over. I had a huge […] ➡
- BlogSieve: A New RSS Mix and Match The link came from an actual comment to a blog entry– imagine that, a useful link from a comment! BlogSieve (“Advanced Feed Processing for Atom, RDF, and RSS”) is a new service that is fresh out and has potential for those wanting to mix RSS feed sources and recombine them in new ways: BlogSieve is […] ➡
- 2004
- FIPPers Go GaaGaa for ePort It’s energizing to have an eager workshop audience…. today I demo-ed our Maricopa ePortfolio system for the new interns in our Faculty In Progress Program (FIPP). After a presentation on portfolio-ing by one of our experts from Mesa Community College. I showed them a mocked up fake ePort, and then we just created new content […] ➡
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.
Share this barking on social media