“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 May 28th
- 2025
- HTML is Back in Black Bring on the crashing sounds of ACDC to be heard around the web… For Those About To Write HTML Tags (I Salute You)! Stand up and be countedFor what you are about to receiveWe are the web makersHTML gives you everything you needHail, hail to the basic tags‘Cause the web has got the right of […]
- 2018
- Summer of Extending: Filling in For DJ Terry Greene at CBEX As noted by Terry Greene, for June, July, and August I am aiming to fill his shoes in managing the Ontario Extend faculty development/enrichment experience. He’s on holiday leave to be a dad again. For those who know and get to work with Terry, those are some extra large sized shoes. I try on Terry’s […]
- Napping No More; On Credential Stuffing In 2018, it’s time to get off the floor, stop yawning, stop ignoring the open bowl on the floor and get serious about your passwords. At least it is for me. Don’t be stuffing my creds! As supposedly a technologist, I’ve been putting this off way too long. Warning lights flicked on for me earlier […]
- 2015
- A Future Twitter Full of Bots The business dudes keep wringing that twitter cannot succeed while not growing its number of users, so strike up the Google is Buying rumor. Meanwhile Rod Serling smiles in the corner, smoke curling up from his cigarette. I just spotted a growth spurt. Did anyone say twitter needs more human users? Some mornings when I […]
- The cMOOC That Would Not Die Someone never told the folks who participated in the 2013 Educational Technology and Media MOOC that it was over. They are still at it. FYI: @courosa @cogdog just to let you know #Etmooc in 30 in case you know anyone wanting to join in ? ALL welcome — Susan Spellman Cann (@SSpellmanCann) May 28, 2015 […]
- 2013
- Two Frame GIFfing For reasons I fail to devise, on my trip I’ve had an eye for making GIFs, maybe it is traveling be train in that motion that is repeated. I’ve been collecting photos that seem like they might work. sometimes I try to adjust the angle to make a pair that might work well as a […]
- 2012
- Amazing Stories Redux at UBC cc licensed ( BY ) flickr photo shared by cogdogblog Here is a super appreciation thanks to Brian Lamb for asking me to do a reprise of Amazing Stories of Openness last presented a year ago at for the CTLT Summer Institute at UBC, part of a panel session called Going Public Into the Great […]
- Daily Create Recaps: Week 1 of Magic Macguffin The summer of Unicorn Love ds106 Camp Magic Macguffin has started, and our campers seem to be happily making art and stuff. In keeping up with them, here is my weekly run down of Daily Create activity- it is refreshing to see the new surge of activity here, and this is one easy way to […]
- ds106 It’s Own Space cc licensed ( BY ) flickr photo shared by cogdogblog Even before coming to work at University of Mary Washington I carried a large bias towards the force that is ds106; having taught in and doing it again (hey the doors are open for the summer version a la Camp Magic Macguffin), I am in […]
- 2011
- Silos or Dance Halls? cc licensed ( BY NC ND ) flickr photo shared by *w* cc licensed ( BY NC ) flickr photo shared by arsheffield People I greatly respect (and I repeat, am not criticizing their choices), D’Arcy, Boone, Stephen are on a mission to do as much as possible to free themselves of “corporate silos”, e.g., […]
- 2010
- Setting up Custom Content Types in WordPress 3.0 cc licensed flickr photo shared by TakenByTina My previous post just outlined the kinds of things I put into a new site created with a beta version of WordPress 3 (I started with the first beta and honestly, it had more polish than most finished products) – I actually did not tell you much. Now […]
- Building a Site with New WordPress 3.0 Content Types: Part 1 of Several I’ve been happily tinkering with the beta version of WordPress 3, down in the bowels of the code, mixing unmarked vials of PHP over open flames, etc for a brand new NMC site. The main thing I have been working on are exploiting the feature to create my own types of content with their own […]
- 2007
- Al Goring The House Today posted 16 Jan ’06, 3.02pm MST PST on flickr And now for something not related at all to blogging, twittering, or education technology at all. Way too long after Al’s Keynote jived movie, I finally got around to doing my small bit and swapping out some of our incandescent light bulbs for fluorescent ones. We’d […]
- Viva La Blog This has nothing to do with McDonalds, but I loved the flickr image so much, I’m making a metaphorical stretch. No, this is a clarion call to Remember the Blog! As we get more distributed in where our e-attention goes, be it various social networks, virtual worlds, and more recently twitter, I’m wondering, as are […]
- Web X.0 Road Rules This barking is only partly about twitter. Well, actually its not about twitter at all, but I think I can satisfy some sanity overload by mentioning twitter 3 times in my first three sentences. Over the long Memorial Day weekend here in the states, I’ve spent almost no time on the computer, and not much […]
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 May 28th
- 2025
- HTML is Back in Black Bring on the crashing sounds of ACDC to be heard around the web… For Those About To Write HTML Tags (I Salute You)! Stand up and be countedFor what you are about to receiveWe are the web makersHTML gives you everything you needHail, hail to the basic tags‘Cause the web has got the right of […] ➡
- 2018
- Summer of Extending: Filling in For DJ Terry Greene at CBEX As noted by Terry Greene, for June, July, and August I am aiming to fill his shoes in managing the Ontario Extend faculty development/enrichment experience. He’s on holiday leave to be a dad again. For those who know and get to work with Terry, those are some extra large sized shoes. I try on Terry’s […] ➡
- Napping No More; On Credential Stuffing In 2018, it’s time to get off the floor, stop yawning, stop ignoring the open bowl on the floor and get serious about your passwords. At least it is for me. Don’t be stuffing my creds! As supposedly a technologist, I’ve been putting this off way too long. Warning lights flicked on for me earlier […] ➡
- 2015
- A Future Twitter Full of Bots The business dudes keep wringing that twitter cannot succeed while not growing its number of users, so strike up the Google is Buying rumor. Meanwhile Rod Serling smiles in the corner, smoke curling up from his cigarette. I just spotted a growth spurt. Did anyone say twitter needs more human users? Some mornings when I […] ➡
- The cMOOC That Would Not Die Someone never told the folks who participated in the 2013 Educational Technology and Media MOOC that it was over. They are still at it. FYI: @courosa @cogdog just to let you know #Etmooc in 30 in case you know anyone wanting to join in ? ALL welcome — Susan Spellman Cann (@SSpellmanCann) May 28, 2015 […] ➡
- 2013
- Two Frame GIFfing For reasons I fail to devise, on my trip I’ve had an eye for making GIFs, maybe it is traveling be train in that motion that is repeated. I’ve been collecting photos that seem like they might work. sometimes I try to adjust the angle to make a pair that might work well as a […] ➡
- 2012
- Amazing Stories Redux at UBC cc licensed ( BY ) flickr photo shared by cogdogblog Here is a super appreciation thanks to Brian Lamb for asking me to do a reprise of Amazing Stories of Openness last presented a year ago at for the CTLT Summer Institute at UBC, part of a panel session called Going Public Into the Great […] ➡
- Daily Create Recaps: Week 1 of Magic Macguffin The summer of Unicorn Love ds106 Camp Magic Macguffin has started, and our campers seem to be happily making art and stuff. In keeping up with them, here is my weekly run down of Daily Create activity- it is refreshing to see the new surge of activity here, and this is one easy way to […] ➡
- ds106 It’s Own Space cc licensed ( BY ) flickr photo shared by cogdogblog Even before coming to work at University of Mary Washington I carried a large bias towards the force that is ds106; having taught in and doing it again (hey the doors are open for the summer version a la Camp Magic Macguffin), I am in […] ➡
- 2011
- Silos or Dance Halls? cc licensed ( BY NC ND ) flickr photo shared by *w* cc licensed ( BY NC ) flickr photo shared by arsheffield People I greatly respect (and I repeat, am not criticizing their choices), D’Arcy, Boone, Stephen are on a mission to do as much as possible to free themselves of “corporate silos”, e.g., […] ➡
- 2010
- Setting up Custom Content Types in WordPress 3.0 cc licensed flickr photo shared by TakenByTina My previous post just outlined the kinds of things I put into a new site created with a beta version of WordPress 3 (I started with the first beta and honestly, it had more polish than most finished products) – I actually did not tell you much. Now […] ➡
- Building a Site with New WordPress 3.0 Content Types: Part 1 of Several I’ve been happily tinkering with the beta version of WordPress 3, down in the bowels of the code, mixing unmarked vials of PHP over open flames, etc for a brand new NMC site. The main thing I have been working on are exploiting the feature to create my own types of content with their own […] ➡
- 2007
- Al Goring The House Today posted 16 Jan ’06, 3.02pm MST PST on flickr And now for something not related at all to blogging, twittering, or education technology at all. Way too long after Al’s Keynote jived movie, I finally got around to doing my small bit and swapping out some of our incandescent light bulbs for fluorescent ones. We’d […] ➡
- Viva La Blog This has nothing to do with McDonalds, but I loved the flickr image so much, I’m making a metaphorical stretch. No, this is a clarion call to Remember the Blog! As we get more distributed in where our e-attention goes, be it various social networks, virtual worlds, and more recently twitter, I’m wondering, as are […] ➡
- Web X.0 Road Rules This barking is only partly about twitter. Well, actually its not about twitter at all, but I think I can satisfy some sanity overload by mentioning twitter 3 times in my first three sentences. Over the long Memorial Day weekend here in the states, I’ve spent almost no time on the computer, and not much […] ➡
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.