“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 April 16th
- 2022
- The Flickr Sunset Video is Here! Consider this post smack dab in the center of the author extolling themselves… hmmm, that might be nearly all of them, eh? But it’s my blog and it means all my own rules, and I found it nifty through a flickr forum that a photo I shared ended up in a video celebrating their 18th […]
- 2016
- [Almost] A Week Gridding and Gesturing Like many folks, I was interested in comic guru Nick Sousanis’s call for participation in a week of Grids and Gestures Quickly, have a look at your ceiling tiles or other grid-ish things around you. If you then imagine putting these features to music, you might have regular long notes on the tiles, some shorter […]
- 2015
- Going Missing I’m going off the grid tomorrow. Unplugged. Off the net. Dark. Well, only to you, because by this time tomorrow, I will be in a very bright place, way down at the bottom of… I’m heading down the South Kaibab Trail to Bright Angel Campground, hiking down with Todd “Will Be Wearing DS106 Shirts All […]
- Who Are You Online? DML Commons Talk-Show-inar Not related to the cliché about oldest profession, maybe one of the longest running questions we upright hominids ponder is “Who am I?” This was what we tried to explore yesterday in a DML Commons Live session– Who Are We Online?. A bit following on the topic, what we hope people might contribute to after, […]
- 2013
- I’m as MOOCed as Hell and… UPDATE APR 18, 2013: The archive lives! Watch the insanity! A bit of shtick I used in today’s TCC World Online Conference keynote was an idea that settled in my noggin and would not shake loose. Share this barking on social media
- 2012
- Week 13: The End is Near Two more weeks to go for ds106; we are done with doing assignments for stars. This week and tonight’s session (detailed below) is: prepping for having your blog organized to showcase your work (see below) in[SPIRE] a participation effort to share the best of ds106 Between now and end of semester, add 4 examples of […]
- 2010
- Being There Was There This past Thursday I did the dog and doggie show, a keynote for the CATS 2010 Online Conference (CATS = Community of Academic Technology Staff for the California State University system). This was a reincarnation of one I first did for Faculty Academy in 2007, and on the Australia 2007 tour. This time I took […]
- 2008
- Great Design Challenge (hey Mom!) Presentation number two today was my part in the The Great ILS Challenge 2.0 a presentation idea that intrigued me when Mark Oehlert first described it; as a knock off of the Great Design Challenge done at the Game Developers Conference. Last year a roomful of lucky attendees got to watch as three top-notch designers […]
- Too Busy For a Second Life… My first presentation today at the eLearning Guild conference was “I’m Busy Enough.. What do I Need a Second Life For?” a tact I took as I expected SL was rather outside the realm of focus for this conference. Well, that was not fully correct, as there was a fair amount of awareness here of […]
- The Guild Thang I’ve been self chained inside the Hilton in Orlando for 3 mights now. Tomorrow I make my break for the border, over the fence, and will run for the airport. This is mostly my own doing. I am here for the eLearning Guild 2008 Annual Gathering. I have learned that “eLearning” is an umbrella term […]
- 2007
- (CNI): Using Wikipedia to Meet Information Searchers at Their Point of Need Trying my hand at conference blogging, here at the CNI Spring Task Force Meeting in Phoenix (Hey, my flight here was a 20 minute drive from home). Can I blog faster tan Bryan Alexander? Heck no. This first session of the breakouts is from Ann Lally head of digital Initiatives at University of Washington, and […]
- 2006
- Free Places To Hang Your Media? I have some feverish work to do this week on an upcoming presentation on, of all things, podcasting. (A previous post titled Sick of Podcasting was titled as a joke- I am not “sick” or “tired” of the concept, it was my own inertia of having done the same presentation twice in a week, and […]
- 2004
- “The Blog” I am curious if other educators have heard this from students newly introduced to weblogs- from the interviews I did last week for a photoblogging presentation and at other times, I have heard more than one student refer to a blog hosting web site such as TypePad, Blogger, Buzznet, as “The Blog”– like it were […]
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 April 16th
- 2022
- The Flickr Sunset Video is Here! Consider this post smack dab in the center of the author extolling themselves… hmmm, that might be nearly all of them, eh? But it’s my blog and it means all my own rules, and I found it nifty through a flickr forum that a photo I shared ended up in a video celebrating their 18th […] ➡
- 2016
- [Almost] A Week Gridding and Gesturing Like many folks, I was interested in comic guru Nick Sousanis’s call for participation in a week of Grids and Gestures Quickly, have a look at your ceiling tiles or other grid-ish things around you. If you then imagine putting these features to music, you might have regular long notes on the tiles, some shorter […] ➡
- 2015
- Going Missing I’m going off the grid tomorrow. Unplugged. Off the net. Dark. Well, only to you, because by this time tomorrow, I will be in a very bright place, way down at the bottom of… I’m heading down the South Kaibab Trail to Bright Angel Campground, hiking down with Todd “Will Be Wearing DS106 Shirts All […] ➡
- Who Are You Online? DML Commons Talk-Show-inar Not related to the cliché about oldest profession, maybe one of the longest running questions we upright hominids ponder is “Who am I?” This was what we tried to explore yesterday in a DML Commons Live session– Who Are We Online?. A bit following on the topic, what we hope people might contribute to after, […] ➡
- 2013
- I’m as MOOCed as Hell and… UPDATE APR 18, 2013: The archive lives! Watch the insanity! A bit of shtick I used in today’s TCC World Online Conference keynote was an idea that settled in my noggin and would not shake loose. Share this barking on social media ➡
- 2012
- Week 13: The End is Near Two more weeks to go for ds106; we are done with doing assignments for stars. This week and tonight’s session (detailed below) is: prepping for having your blog organized to showcase your work (see below) in[SPIRE] a participation effort to share the best of ds106 Between now and end of semester, add 4 examples of […] ➡
- 2010
- Being There Was There This past Thursday I did the dog and doggie show, a keynote for the CATS 2010 Online Conference (CATS = Community of Academic Technology Staff for the California State University system). This was a reincarnation of one I first did for Faculty Academy in 2007, and on the Australia 2007 tour. This time I took […] ➡
- 2008
- Great Design Challenge (hey Mom!) Presentation number two today was my part in the The Great ILS Challenge 2.0 a presentation idea that intrigued me when Mark Oehlert first described it; as a knock off of the Great Design Challenge done at the Game Developers Conference. Last year a roomful of lucky attendees got to watch as three top-notch designers […] ➡
- Too Busy For a Second Life… My first presentation today at the eLearning Guild conference was “I’m Busy Enough.. What do I Need a Second Life For?” a tact I took as I expected SL was rather outside the realm of focus for this conference. Well, that was not fully correct, as there was a fair amount of awareness here of […] ➡
- The Guild Thang I’ve been self chained inside the Hilton in Orlando for 3 mights now. Tomorrow I make my break for the border, over the fence, and will run for the airport. This is mostly my own doing. I am here for the eLearning Guild 2008 Annual Gathering. I have learned that “eLearning” is an umbrella term […] ➡
- 2007
- 2006
- Free Places To Hang Your Media? I have some feverish work to do this week on an upcoming presentation on, of all things, podcasting. (A previous post titled Sick of Podcasting was titled as a joke- I am not “sick” or “tired” of the concept, it was my own inertia of having done the same presentation twice in a week, and […] ➡
- 2004
- “The Blog” I am curious if other educators have heard this from students newly introduced to weblogs- from the interviews I did last week for a photoblogging presentation and at other times, I have heard more than one student refer to a blog hosting web site such as TypePad, Blogger, Buzznet, as “The Blog”– like it were […] ➡
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.