“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 19th
- 2023
- Lifesaving Candy and the Dex-4 Mystery For perhaps the first half of my Type-1 diabetic life (October marks 53 years without a properly functioning pancreas) I invariably walked around with a roll of these in my pocket. Yes, it did take some explanation to other school kids when suddenly I started shoving them in my mouth “Hey! You’re diabetic, you can’t […]
- 2018
- Righting Mobile Phone Photos When they Go Sideways I’ve seen and ignored a thing with photos from my mobile phone for years. Since I’m in the minority that views the web on a device other than a smart phone, maybe it’s not a big deal. It’s when the photos look as you took them on your phone, but when uploaded to a site […]
- 2016
- I Get You, Lawnman My Dad spent a lot of time in the yard. Pushing the lawnmower. Raking leaves. Trimming the forsythia bushes. I want to say I pondered him doing that and wondered what he thought about spending all those hours out there, but maybe that is more hindsight memory. But he definitely found his own rewards from […]
- 2015
- Bringing the BS of Storytelling to CALIcon15 “BS? How Can you say that? You’ve been promoting digital storytelling for 10 years!” Today’s keynote was a play on perception, I never explicitly defined what BS stood for, did I? Sometime in April, after the return from 5 months in British Columbia, I was catching up with Barbara Ganley vis Skype and said something […]
- 2014
- Stick a Fork in that Assignment Bank Theme creative commons licensed ( BY-SA ) flickr photo shared by RiverRatt3 Given a smooth rollout (as far as I can tell) for the Connected Learning MOOC Make Bank, I’m wrapping for now the work on the ds106 Assignment Bank WordPress Theme, having just updated the internal options documentation and the github Readme. The project that […]
- Zombies Bore Me I know that zombie culture is a thing, that in pop culture they signify our fears, dystopia, sense of future worry. But personally I just don’t find them interesting. They are pretty one-dimensional (by design?), they likely are never developed as characters, and they always lose. This was meant more as a conversational poke, not […]
- The Intruder Natalie Bookchin created this interpretation of Jorge Luis Borges story The Intruder (1966) —
 a grim tale of prostitution, fraternal jealousy, and violence against women in which two brothers fall in love with the same woman, share her, and sell her to a brothel. The narrative ends with the woman’s murder and the brothers’ reconciliation.
- 2013
- Calling the Lo: ds106zone LoDown 032 cc licensed ( BY NC SA ) flickr photo shared by Ed Scottlo! Scottlo!…. SCOTTLOOOOOOOOOOOOOoooooo Silence. He seems gone. Lucky for him, Rochelle has stepped up in a big way, completely taking over the LoDown show, evolving it so much, that the old pencil head is completely gone from the logo. I volunteered to put […]
- 2012
- Did You Get My Postcard Mom? I’m late with my ds106 design stuff, but you will not catch me saying I am sorry. cc licensed ( BY ) flickr photo shared by cogdogblog I did assemble this for the Postcards from Magical Places assignment, which we had our UMW students with a requirement that the image come from Minecraft. Design the […]
- 2011
- I Want to be a Retronaut A bad link click turns up some stuff from that Bag of Gold- the link was in the twitter river, for something I forget, and ot was not found on the site, but the site itself caught my interest– http://www.howtobearetronaut.com/, where the subtitle is “Ever get the feeling you’re living in the wrong time?”. It […]
- The Stung Since I’ll be on the road alot soon, I’m doubtful I will get to play on the next Dr. Oblivion round of ds106, but while I have time, I wanted to dip my paws again into animated GIF creations. Now having done a few, I am trying to think more ahead of time what might […]
- StoryBox Video Recently “on The Twitter”, Scott Leslie rightfully chided me because my web page describing the concept for the StoryBox was long — Don’t apologize Scott, I like you because you say it like it is, cause you carry the card. My response was, :”it’s a first draft!” but I had been trying to do something […]
- The Man with the Raft It’s just a Sunday, lazier morning in, longer coffee time at the kitchen table. The phone rang and Mom said, “Happy Father’s Day!” “But Mom, I’m not a father…” “Yes, but you have one.” She says it in present tense, darn she is savvy. If I was thinking of today, I might call it Father-less […]
- 2009
- I Believe in Blogging (again). One dog tired blog trend here is kicking the cat about whether “blogging is dead”. After last week’s 2009 NMC Summer Conference, I have a resurgent optimism for the old long form (that is greater than 140 characters). cc licensed flickr photo shared by cogdogblog After our 2008 conference at Princeton, I was interested in […]
- 2006
- Eenie Meanie Minie Moe- Pick a Video By The … On a few project front I am wrestling with trying to pick the “best” web video format. Some have boiled it down to selecting the “elusive” best format. In my previous work at Maricopa, e.g. for our digital storytelling collection, I had settled on providing video as streaming Quicktime, .mov, (we had an X-serve server […]
- 2003
- What’s the Fuss about RSS? a blog/wiki paper for the July 11, 2003 Learning Objects Virtual Community of Practice (LOVCOP) teleconference Casting aside stuffy academic papers and endless PowerPoint bullets, we will present our ideas on RSS and learning objects via a collection of connected blog entries assembled in a wiki. Use the medium to communicate about the medium. Abstract: […]
- Learning Objects Luau Ahhhh, it is a tough job but someone (not me) has to go to Hawaii for the Learning Objects Symposium 2003, part of the ED-MEDIA 2003 conference. Learning Objects on the beach. Awesome. Actually this looks like a worthy all day focus on LOs with some world experts, and this site has all of the […]
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 19th
- 2023
- Lifesaving Candy and the Dex-4 Mystery For perhaps the first half of my Type-1 diabetic life (October marks 53 years without a properly functioning pancreas) I invariably walked around with a roll of these in my pocket. Yes, it did take some explanation to other school kids when suddenly I started shoving them in my mouth “Hey! You’re diabetic, you can’t […] ➡
- 2018
- Righting Mobile Phone Photos When they Go Sideways I’ve seen and ignored a thing with photos from my mobile phone for years. Since I’m in the minority that views the web on a device other than a smart phone, maybe it’s not a big deal. It’s when the photos look as you took them on your phone, but when uploaded to a site […] ➡
- 2016
- I Get You, Lawnman My Dad spent a lot of time in the yard. Pushing the lawnmower. Raking leaves. Trimming the forsythia bushes. I want to say I pondered him doing that and wondered what he thought about spending all those hours out there, but maybe that is more hindsight memory. But he definitely found his own rewards from […] ➡
- 2015
- Bringing the BS of Storytelling to CALIcon15 “BS? How Can you say that? You’ve been promoting digital storytelling for 10 years!” Today’s keynote was a play on perception, I never explicitly defined what BS stood for, did I? Sometime in April, after the return from 5 months in British Columbia, I was catching up with Barbara Ganley vis Skype and said something […] ➡
- 2014
- Stick a Fork in that Assignment Bank Theme creative commons licensed ( BY-SA ) flickr photo shared by RiverRatt3 Given a smooth rollout (as far as I can tell) for the Connected Learning MOOC Make Bank, I’m wrapping for now the work on the ds106 Assignment Bank WordPress Theme, having just updated the internal options documentation and the github Readme. The project that […] ➡
- Zombies Bore Me I know that zombie culture is a thing, that in pop culture they signify our fears, dystopia, sense of future worry. But personally I just don’t find them interesting. They are pretty one-dimensional (by design?), they likely are never developed as characters, and they always lose. This was meant more as a conversational poke, not […] ➡
- The Intruder Natalie Bookchin created this interpretation of Jorge Luis Borges story The Intruder (1966) —
 a grim tale of prostitution, fraternal jealousy, and violence against women in which two brothers fall in love with the same woman, share her, and sell her to a brothel. The narrative ends with the woman’s murder and the brothers’ reconciliation. ➡
- 2013
- Calling the Lo: ds106zone LoDown 032 cc licensed ( BY NC SA ) flickr photo shared by Ed Scottlo! Scottlo!…. SCOTTLOOOOOOOOOOOOOoooooo Silence. He seems gone. Lucky for him, Rochelle has stepped up in a big way, completely taking over the LoDown show, evolving it so much, that the old pencil head is completely gone from the logo. I volunteered to put […] ➡
- 2012
- Did You Get My Postcard Mom? I’m late with my ds106 design stuff, but you will not catch me saying I am sorry. cc licensed ( BY ) flickr photo shared by cogdogblog I did assemble this for the Postcards from Magical Places assignment, which we had our UMW students with a requirement that the image come from Minecraft. Design the […] ➡
- 2011
- I Want to be a Retronaut A bad link click turns up some stuff from that Bag of Gold- the link was in the twitter river, for something I forget, and ot was not found on the site, but the site itself caught my interest– http://www.howtobearetronaut.com/, where the subtitle is “Ever get the feeling you’re living in the wrong time?”. It […] ➡
- The Stung Since I’ll be on the road alot soon, I’m doubtful I will get to play on the next Dr. Oblivion round of ds106, but while I have time, I wanted to dip my paws again into animated GIF creations. Now having done a few, I am trying to think more ahead of time what might […] ➡
- StoryBox Video Recently “on The Twitter”, Scott Leslie rightfully chided me because my web page describing the concept for the StoryBox was long — Don’t apologize Scott, I like you because you say it like it is, cause you carry the card. My response was, :”it’s a first draft!” but I had been trying to do something […] ➡
- The Man with the Raft It’s just a Sunday, lazier morning in, longer coffee time at the kitchen table. The phone rang and Mom said, “Happy Father’s Day!” “But Mom, I’m not a father…” “Yes, but you have one.” She says it in present tense, darn she is savvy. If I was thinking of today, I might call it Father-less […] ➡
- 2009
- I Believe in Blogging (again). One dog tired blog trend here is kicking the cat about whether “blogging is dead”. After last week’s 2009 NMC Summer Conference, I have a resurgent optimism for the old long form (that is greater than 140 characters). cc licensed flickr photo shared by cogdogblog After our 2008 conference at Princeton, I was interested in […] ➡
- 2006
- Eenie Meanie Minie Moe- Pick a Video By The … On a few project front I am wrestling with trying to pick the “best” web video format. Some have boiled it down to selecting the “elusive” best format. In my previous work at Maricopa, e.g. for our digital storytelling collection, I had settled on providing video as streaming Quicktime, .mov, (we had an X-serve server […] ➡
- 2003
- What’s the Fuss about RSS? a blog/wiki paper for the July 11, 2003 Learning Objects Virtual Community of Practice (LOVCOP) teleconference Casting aside stuffy academic papers and endless PowerPoint bullets, we will present our ideas on RSS and learning objects via a collection of connected blog entries assembled in a wiki. Use the medium to communicate about the medium. Abstract: […] ➡
- Learning Objects Luau Ahhhh, it is a tough job but someone (not me) has to go to Hawaii for the Learning Objects Symposium 2003, part of the ED-MEDIA 2003 conference. Learning Objects on the beach. Awesome. Actually this looks like a worthy all day focus on LOs with some world experts, and this site has all of the […] ➡
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.