“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 27 posts previously published on February 26th
- 2022
- Got Tape Block Style? I am late on the train of exploring WordPress block development; this post at WordPress Tavern looked like a simple way to at least get the paws wet. This little tinkering has not a whole lot of deep or even mild relevance, but the code fingers have been idle lately. And it was so easy […]
- 2020
- Overdue Update for WP Dimension WordPress Theme – More Elegant Boxes I’ve known of some problems with one of my WordPress themes for a while but pushed it aside. WP-Dimension is one of my favorite “Calling Card” WordPress themes. maybe if it was the first one I welded from the HTML5Up original template. A lot of folks use it (including mine at the Best Domain I […]
- 2019
- From Issue to Merge: When the GitHub Machine Works Although I have used GitHub regularly for a few years, it remains mostly to me a Rube Goldberg like machine, I still get push and pull interchanged, and frequently munge up commits. This matters less for my code, where basically I am the only developer. Something like the WordPress JetPack code is a different beast […]
- 2018
- Kibbles for My Patreon Bowl? Here is my shameless shameful plug. More than two years ago a colleague I respect emailed and started a back and forth exchange. He strongly urged me to set up a donation campaign so I could be supported to do more tool and resource building. I gave it some thought, but then landed a good […]
- 2016
- That Crazy Guy on the Corner Yelling #HEYFACEBOOK Looks Familiar “Yeah, wasn’t he involved in educational technology? Blogged a lot?” My recent stream of facebook catfishing rants have had a huge negligible less than zero effect. I got like 10 share in facebooks and 3 retweets. No one apparently wants to comment on the big fbomb rant. Facebook has not even responded to my recent […]
- 2015
- Rules, Attribution, and Doing The Right Thing Add to that sign… “NO STEALING OF ONLINE IMAGES.” In my hobbled opinion the problem about reuse of media is copyright. Duh. No not what you think; our framing of what one should use openly licensed content is nearly always […]
- Another Web Bites the Dust Yeah, those free web services that give you so much if you give them your content. A salute to 35 Dead Web Services. I could have added many kore, but I got tired. Who knows where the idea came from? Maybe it was some media making tool someone tweeted named after nuts. And I got […]
- 2014
- Mum is the Word We do not say the “M” word. We do not say the “M” word. We do not say the “M” word. We do not say the “M” word. We do not say the “M” word. We do not say the “M” word. We do not say the “M” word. We do not say the “M” […]
- New Old New Media Art The LAST thing I should be doing now is tossing out another unpaid project to work on, but oh well, I cannot help myself. cc licensed ( BY SA ) flickr photo shared by Alan Levine I was in Cambridge MA in 2010 for a meeting, and visited the MIT Press bookstore where I got […]
- 2013
- What’s in The Box? GIFed Unboxing! Thanks to Jason Toal, direct from Canada via FedEx, I have this classic turntable that originally belonged to Grant Potter. I’ll be able to spin the teen vinyl I carted back from Mom’s garage cc licensed ( BY SA ) flickr photo shared by cogdogblog but I need to find me an amplifier and some […]
- 2012
- Slice 13: Lucky 13, a Good Slice cc licensed ( BY NC ND ) flickr photo shared by Brian Utesch (shutterBRI) Finally, a good slice, after a really good class. Slice 13: A Good Slice This was recorded after class on Monday February 20, after having returned from a weekend trip to Canada, in which I came back bearing a cough. Tonight’s […]
- Yiddish Buffalo Joke I can never remember any jokes in English much less another language. But a challenge is a challenge, so I have an effort for the ds106 Make ’em Laugh assignment, submitted by my pal Darren Kuropatwa: Find a good, brief joke in a language other than your mother tongue; if you don’t know any other […]
- Coming Up For Air cc licensed (BY) flickr photo shared by cogdogblog I’ve been pretty knocked flat by a cold I picked up on my flight home last Monday, most noticeably not having much energy to do much photography. Having suffered twice in the fall (October in DC, and December after Australia), I am convinced my immune system is […]
- The Chronicle Twelve And then there were twelve… I have no quibbles with the people The Chronicle of Higher Education highlight as people who are innovators, but the old school notion of top x lists continues to baffle me in the internet age. I can barely resist a chance to poke fun at The Chronicle. IMHO, their sole […]
- 2011
- Remixing Mom’s Remix cc licensed ( BY ) flickr photo shared by cogdogblog That photo was one I crafted in November when my Mom visited, and I tried to get her in the same pose as her high school graduation photo. After this past week’s fun of getting my Mom to talk live on ds106 radio, it was […]
- Taking Old WordPress Menus to School cc licensed ( BY NC ND ) flickr photo shared by ailatan With a relaxing day of nothing definite to do, I decided to poke around the corners of the blog house and clean up some dust gathered in the corners of my theme. Themes that predate WordPress 3, like mine, do not take advantage […]
- 2010
- Best. Motley. Postcard. Evah. cc licensed flickr photo shared by cogdogblog I’ve never met Jared Stein I’ve had his blog in my reader a while, see his tweets, and know he swims in same circles as some of my other core online circle. So what do I know? He writes rather deeply and introspectively (e.g. on solitude and metacognition […]
- On My Island cc licensed flickr photo shared by elvis_payne Let’s say you were marooned on the apocryphal desert island that was equipped with a broadband internet connection limited to accessing one web site, what would it be? Well maybe that is not the question I was framing- most people might claim email or twitter, maybe even (eww) […]
- 2008
- Search ‘n Spell Search ‘n Spell by cogdogblog posted 26 Feb ’08, 9.16pm MST PST on flickr Google is so damn smart- it took this mangled low light typing and managed to sort out what I was looking for: www.google.ca/search?q=6+mile+pub+ictgoria a pub in Victoria (not "ictogoria") www.sixmilepub.com Share this barking on social media
- Northern Voice Emergency Warning Northern Voice Emergency Warning by cogdogblog posted 26 Feb ’08, 12.26pm MST PST on flickr The signs at UBC needed some updates One more NV thing- I loved the explicit warnings in the UBC auditorium for Fire and Earthquake, but felt there were not enough warnings for Northern Voice. (edited in flickr with picnik) Share […]
- Moose Thoughts I Saw the Moose by cogdogblog posted 22 Feb ’08, 3.40pm MST PST on flickr I’m relishing the fantabulous reflection on Northern Voice by Chris Lott and Jennifer Jones and Brian Lamb and Jim Groom and … I am not having much more to pile on to say about Northern Voice beyond a meek “me […]
- 2007
- Actually I was Blogging… While I was not blogging here last week did not mean I was not spitting posts elsewhere 😉 For my planned trip next October to Australia, I took Nancy’s Chocolate laced advice to blog the trip by setting up on WordPress.com yet another blog outlet, CogDogRoo. My plan is to not only blog the trip, […]
- Turn That Darn Blog On I ended up taking more than a week off on my self-proclaimed time for writing elsewhere as a commenter only, not posting any new posts here. I really enjoyed the experience and it seemed to resonate with others. My tracks in cocomment indicate 51 different places I left my mark, not really all that huge […]
- 2006
- More Airport Mysteries Some time last year, I posted some of the deep, mysterious questions I came up with while at the airport. Having traveled a bit recently, a few more have risen in my mind: * The Southwest Cattle Call: If you have never flown Southwest Airlines you have missed out on the fun of getting your […]
- Podcasting, Schmodcasting (tomorrow’s demo) I give my utmost appreciation and web shout out to Brian, Cole, and Darren for ideas harked in my call for help on podcast demos scheduled for Monday and Wednesday of this week at 2 of our colleges. What I’ve done for my organizational sanity as well as to provide some links for those in […]
- 2005
- Now the iPodless Podcaster Day number 578 without an iPod… No, I have no intent to start regular podcasts, enough other people with velvety FM radio D.J. type voices that never say “ummm” are at it already. There is no time to jump into this endeavor. But never say never. On the other hand, twice or more or in […]
- To My Spelling And Academic Superiors Way Up North Oh dear, I have a spelling and grammatical error on the introduction of a web page. It is the end of civilization as we know it, and it exemplifies how horribly inadequate, shameful, and without merir the entire US educational system really is. I must humbly apologize to all my US fellow educators, as my […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 27 posts previously published on February 26th
- 2022
- Got Tape Block Style? I am late on the train of exploring WordPress block development; this post at WordPress Tavern looked like a simple way to at least get the paws wet. This little tinkering has not a whole lot of deep or even mild relevance, but the code fingers have been idle lately. And it was so easy […] ➡
- 2020
- 2019
- From Issue to Merge: When the GitHub Machine Works Although I have used GitHub regularly for a few years, it remains mostly to me a Rube Goldberg like machine, I still get push and pull interchanged, and frequently munge up commits. This matters less for my code, where basically I am the only developer. Something like the WordPress JetPack code is a different beast […] ➡
- 2018
- Kibbles for My Patreon Bowl? Here is my shameless shameful plug. More than two years ago a colleague I respect emailed and started a back and forth exchange. He strongly urged me to set up a donation campaign so I could be supported to do more tool and resource building. I gave it some thought, but then landed a good […] ➡
- 2016
- That Crazy Guy on the Corner Yelling #HEYFACEBOOK Looks Familiar “Yeah, wasn’t he involved in educational technology? Blogged a lot?” My recent stream of facebook catfishing rants have had a huge negligible less than zero effect. I got like 10 share in facebooks and 3 retweets. No one apparently wants to comment on the big fbomb rant. Facebook has not even responded to my recent […] ➡
- 2015
- Rules, Attribution, and Doing The Right Thing Add to that sign… “NO STEALING OF ONLINE IMAGES.” In my hobbled opinion the problem about reuse of media is copyright. Duh. No not what you think; our framing of what one should use openly licensed content is nearly always […] ➡
- Another Web Bites the Dust Yeah, those free web services that give you so much if you give them your content. A salute to 35 Dead Web Services. I could have added many kore, but I got tired. Who knows where the idea came from? Maybe it was some media making tool someone tweeted named after nuts. And I got […] ➡
- 2014
- Mum is the Word We do not say the “M” word. We do not say the “M” word. We do not say the “M” word. We do not say the “M” word. We do not say the “M” word. We do not say the “M” word. We do not say the “M” word. We do not say the “M” […]
➡ - New Old New Media Art The LAST thing I should be doing now is tossing out another unpaid project to work on, but oh well, I cannot help myself. cc licensed ( BY SA ) flickr photo shared by Alan Levine I was in Cambridge MA in 2010 for a meeting, and visited the MIT Press bookstore where I got […] ➡
- 2013
- What’s in The Box? GIFed Unboxing! Thanks to Jason Toal, direct from Canada via FedEx, I have this classic turntable that originally belonged to Grant Potter. I’ll be able to spin the teen vinyl I carted back from Mom’s garage cc licensed ( BY SA ) flickr photo shared by cogdogblog but I need to find me an amplifier and some […] ➡
- 2012
- Slice 13: Lucky 13, a Good Slice cc licensed ( BY NC ND ) flickr photo shared by Brian Utesch (shutterBRI) Finally, a good slice, after a really good class. Slice 13: A Good Slice This was recorded after class on Monday February 20, after having returned from a weekend trip to Canada, in which I came back bearing a cough. Tonight’s […] ➡
- Yiddish Buffalo Joke I can never remember any jokes in English much less another language. But a challenge is a challenge, so I have an effort for the ds106 Make ’em Laugh assignment, submitted by my pal Darren Kuropatwa: Find a good, brief joke in a language other than your mother tongue; if you don’t know any other […] ➡
- Coming Up For Air cc licensed (BY) flickr photo shared by cogdogblog I’ve been pretty knocked flat by a cold I picked up on my flight home last Monday, most noticeably not having much energy to do much photography. Having suffered twice in the fall (October in DC, and December after Australia), I am convinced my immune system is […] ➡
- The Chronicle Twelve And then there were twelve… I have no quibbles with the people The Chronicle of Higher Education highlight as people who are innovators, but the old school notion of top x lists continues to baffle me in the internet age. I can barely resist a chance to poke fun at The Chronicle. IMHO, their sole […] ➡
- 2011
- Remixing Mom’s Remix cc licensed ( BY ) flickr photo shared by cogdogblog That photo was one I crafted in November when my Mom visited, and I tried to get her in the same pose as her high school graduation photo. After this past week’s fun of getting my Mom to talk live on ds106 radio, it was […] ➡
- Taking Old WordPress Menus to School cc licensed ( BY NC ND ) flickr photo shared by ailatan With a relaxing day of nothing definite to do, I decided to poke around the corners of the blog house and clean up some dust gathered in the corners of my theme. Themes that predate WordPress 3, like mine, do not take advantage […] ➡
- 2010
- Best. Motley. Postcard. Evah. cc licensed flickr photo shared by cogdogblog I’ve never met Jared Stein I’ve had his blog in my reader a while, see his tweets, and know he swims in same circles as some of my other core online circle. So what do I know? He writes rather deeply and introspectively (e.g. on solitude and metacognition […] ➡
- On My Island cc licensed flickr photo shared by elvis_payne Let’s say you were marooned on the apocryphal desert island that was equipped with a broadband internet connection limited to accessing one web site, what would it be? Well maybe that is not the question I was framing- most people might claim email or twitter, maybe even (eww) […] ➡
- 2008
- Search ‘n Spell Search ‘n Spell by cogdogblog posted 26 Feb ’08, 9.16pm MST PST on flickr Google is so damn smart- it took this mangled low light typing and managed to sort out what I was looking for: www.google.ca/search?q=6+mile+pub+ictgoria a pub in Victoria (not "ictogoria") www.sixmilepub.com Share this barking on social media ➡
- Northern Voice Emergency Warning Northern Voice Emergency Warning by cogdogblog posted 26 Feb ’08, 12.26pm MST PST on flickr The signs at UBC needed some updates One more NV thing- I loved the explicit warnings in the UBC auditorium for Fire and Earthquake, but felt there were not enough warnings for Northern Voice. (edited in flickr with picnik) Share […] ➡
- Moose Thoughts I Saw the Moose by cogdogblog posted 22 Feb ’08, 3.40pm MST PST on flickr I’m relishing the fantabulous reflection on Northern Voice by Chris Lott and Jennifer Jones and Brian Lamb and Jim Groom and … I am not having much more to pile on to say about Northern Voice beyond a meek “me […] ➡
- 2007
- Actually I was Blogging… While I was not blogging here last week did not mean I was not spitting posts elsewhere 😉 For my planned trip next October to Australia, I took Nancy’s Chocolate laced advice to blog the trip by setting up on WordPress.com yet another blog outlet, CogDogRoo. My plan is to not only blog the trip, […] ➡
- Turn That Darn Blog On I ended up taking more than a week off on my self-proclaimed time for writing elsewhere as a commenter only, not posting any new posts here. I really enjoyed the experience and it seemed to resonate with others. My tracks in cocomment indicate 51 different places I left my mark, not really all that huge […] ➡
- 2006
- More Airport Mysteries Some time last year, I posted some of the deep, mysterious questions I came up with while at the airport. Having traveled a bit recently, a few more have risen in my mind: * The Southwest Cattle Call: If you have never flown Southwest Airlines you have missed out on the fun of getting your […] ➡
- Podcasting, Schmodcasting (tomorrow’s demo) I give my utmost appreciation and web shout out to Brian, Cole, and Darren for ideas harked in my call for help on podcast demos scheduled for Monday and Wednesday of this week at 2 of our colleges. What I’ve done for my organizational sanity as well as to provide some links for those in […] ➡
- 2005
- Now the iPodless Podcaster Day number 578 without an iPod… No, I have no intent to start regular podcasts, enough other people with velvety FM radio D.J. type voices that never say “ummm” are at it already. There is no time to jump into this endeavor. But never say never. On the other hand, twice or more or in […] ➡
- To My Spelling And Academic Superiors Way Up North Oh dear, I have a spelling and grammatical error on the introduction of a web page. It is the end of civilization as we know it, and it exemplifies how horribly inadequate, shameful, and without merir the entire US educational system really is. I must humbly apologize to all my US fellow educators, as my […] ➡
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.