“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 19 posts previously published on September 8th
- 2024
- I [Still] Blog Therefore I [Still] Am To break my own languishing of writing here (to which nobody notices), I reach for the bloggers oldest topic, blogging about blogging. Right? And so I reach back, way back, to my own Pre-Cambrian blogging era, the first post, to which, true to form, I pun[t] on the descriptive title for what I think might […]
- 2022
- The Fortune Cookie of WP-Dimension I have a negligible update for a favorite of my WordPress Calling Card themes. WP-Dimension was the first of several I first made a WordPress theme out of an HTML5-up template. It appeared in this dimension in February 2017. This theme is also special as I use it dog-fooding style (which I have been told […]
- 2021
- Godzilla Eats All the Images Missing ALT Tags Well it’s more like a day dream that Gojira would rise up with a roar and — this started as a bit of a rant and play at the way Twitter quote / unquote addresses accessibility for tweeted images. I can’t fix twitter. Even Twitter can’t really fix Twitter. But I can do something about […]
- 2017
- Proudly Unverified Oh twitter, Audrey truly wants to be verified https://twitter.com/audreywatters/status/906187941147549696 She has tried several times. In protest I am taking the bold move of adding my own signal of un-verifiability to my twitter name (and I loathe emojis) As if anything in twitter really matters…. Feature Image: Photoshop modified from Wikimedia Commons image by JJ12880 shared […]
- Relieving Gravity Forms Field Fatigue Have you filled out a lifetime of forms? Surely there are some things we can do to reduce Repetitive Form Entry Fatigue (no I will won’t call you Shirley). While I have it used it super extensively, one of my favorite WordPress plugins Worth Paying for is Gravity Forms. Beyond all the features in packs […]
- 2015
- I Sort By Code With a Little From My Friends I Do Not Know This is a story of near invisible amounts of satisfaction that are not insignificant. Dare I not insert more half double negatives? It makes sense, I think, to people who “code” in that are in the fuzzy netherland between having surfed through some series of tutorials because People On Medium Say Everyone Should Code and […]
- 2014
- What’s [Not] in Your Feed Channel? While RSS is still a dying technology, I offer some insight into its innards. If the mundane details of feed data make you queasy, carry on. If you want to know what’s going on under the hood of your blog and the Connected Courses syndication hub, then trudge on. This started with a reasonable request […]
- From Javier to Norbert It’s raining today in Arizona. As “Bone Mama” Mary McCann used to say on KUKQ radio in Phoenix, we are having an outbreak of weather. Today’s outbreak is courtesy of Hurrican Norbert taking a wet trip up the west coast. It reminded me of something. Almost exactly 10 years ago, another hurricane named Javier made […]
- The Guts of the New StoryBox are Set creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog Having found the perfect container for my new PirateBox, I now have the desired wiring in place (thanks to my friend Ken in Colorado) to operate what I will put into play soon as a new iteration of the 2011 Storybox. What you see […]
- Beyond Lies The Web My mind works by strange associations, free formed links, connecting, unconnecting, often ending up in the neural equivalent of “page not found”. So on reading this tweet in the Connected Courses twitter flow: MT @papahazama: Why we need to go beyond the #LMS by @audreywatters http://t.co/mML8PRo46i #ccourses @greenstratdoc — jeremy b williams (@jeremybwilliams) September 8, […]
- 2012
- Freedom in Five Photos In prep for doing next week’s introduction to storytelling for my ds106 class, yesterday’s sequence of events compelled me to try the Tell a Story in Five Frames flickr group, making a story titled “Freed” This are an interesting challenge, it is easy perhaps to illustrate a series of events. The trick to level up […]
- 2011
- The Infamous Grilled Cheese Incident In our family lore is the battle of the grilled cheese sandwich, waged between my sisters and I one summer day when I was maybe 8. The record is muddy as the accounts of the conflict disagree. Mom had preserved some of the artifacts, which now come to light and judgement. The evidence is found […]
- 2009
- The CogDog Abides cc licensed flickr photo shared by mnlamberson Thanks to the Jimbo Groom for pointing me to this priceless photo at the Open Education Conference last month in Vancouver (and thank Michelle for grabbing a great moment). it’s a fake prayer, the Reverend knows, and Gardner just want us to read a poem 😉 Share this […]
- 2008
- Five Card Photo Story (a super crude prototype…) Wow are my PHP coding pencils dull, but I’ve had some fun last 2 nights getting them back (we’ll see how sharp they really). I have a really crude, ugly, unformatted demo of a tool I want to use later this month for a session at the Learning 2.008 conference. So I am asking (a) […]
- 2006
- Grnad Opening of Clockwise US Tour flickr foto Grnad Openingavailable on flickr Typos as art! This welcome sign at the Tang Museum is Nina Katchadourian‘s work inspired by a sign at her local deli. I gotta get a job as an artist. I’m on the first leg of a large circle trip around the US, currently in Saratoga Springs, NY, for […]
- 2005
- Back to the Plates: Ocotillo GPS Response System flickr foto Nov_04_I-Ate-This-Squaredavailable on lenny’s flickr (not my meal, but found in the flickr Creative Commons By Attribution collection) Getting back to documenting what’s been sitting on my project plate, is a heaping pile of … well, not the cholesteral special in this Creative Commons flickr photo, but a heaping pile of mySQL, PHP, and […]
- Can Your ePortfolio Do This (RSS)? Mmmmm….feeds… in an eportfolio…. mmmmm… Audree has released another new exciting feature for the MyEport software used at her Chandler-Gilbert Community College and the Maricopa wide service we host for the rest of our system. It has had already for months or more, the ability to syndicate content out from an a publish eportfolio (e.g. […]
- Helen’s Down the Hall! What a nice surprise this morning when a colleague mentioned Helen Barrett, the “grandmother of eportfolios” was just down the hall! She is here one day to do an eportfolio/Taskstream workshop with our Teacher Education program. Being in need of some good audio speakers for her demo, I loaned her my Harmon Kardon Sound Sticks, […]
- 2004
- One of the Stranger Blog Spams From a recent comment blog spam cleansed this morning. I think the spam author needs his own product (spammers URL intentionaly deleted) prozac http://anxietyXXXXXXX.xxx/ Blackmail Error: Send $200 to Bill Gates or your computer will get so messed up it will never work again. prozac online Jim, it’s Grace at the bank. I checked your […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 19 posts previously published on September 8th
- 2024
- I [Still] Blog Therefore I [Still] Am To break my own languishing of writing here (to which nobody notices), I reach for the bloggers oldest topic, blogging about blogging. Right? And so I reach back, way back, to my own Pre-Cambrian blogging era, the first post, to which, true to form, I pun[t] on the descriptive title for what I think might […] ➡
- 2022
- The Fortune Cookie of WP-Dimension I have a negligible update for a favorite of my WordPress Calling Card themes. WP-Dimension was the first of several I first made a WordPress theme out of an HTML5-up template. It appeared in this dimension in February 2017. This theme is also special as I use it dog-fooding style (which I have been told […] ➡
- 2021
- Godzilla Eats All the Images Missing ALT Tags Well it’s more like a day dream that Gojira would rise up with a roar and — this started as a bit of a rant and play at the way Twitter quote / unquote addresses accessibility for tweeted images. I can’t fix twitter. Even Twitter can’t really fix Twitter. But I can do something about […] ➡
- 2017
- Proudly Unverified Oh twitter, Audrey truly wants to be verified https://twitter.com/audreywatters/status/906187941147549696 She has tried several times. In protest I am taking the bold move of adding my own signal of un-verifiability to my twitter name (and I loathe emojis) As if anything in twitter really matters…. Feature Image: Photoshop modified from Wikimedia Commons image by JJ12880 shared […] ➡
- Relieving Gravity Forms Field Fatigue Have you filled out a lifetime of forms? Surely there are some things we can do to reduce Repetitive Form Entry Fatigue (no I will won’t call you Shirley). While I have it used it super extensively, one of my favorite WordPress plugins Worth Paying for is Gravity Forms. Beyond all the features in packs […] ➡
- 2015
- I Sort By Code With a Little From My Friends I Do Not Know This is a story of near invisible amounts of satisfaction that are not insignificant. Dare I not insert more half double negatives? It makes sense, I think, to people who “code” in that are in the fuzzy netherland between having surfed through some series of tutorials because People On Medium Say Everyone Should Code and […] ➡
- 2014
- What’s [Not] in Your Feed Channel? While RSS is still a dying technology, I offer some insight into its innards. If the mundane details of feed data make you queasy, carry on. If you want to know what’s going on under the hood of your blog and the Connected Courses syndication hub, then trudge on. This started with a reasonable request […] ➡
- From Javier to Norbert It’s raining today in Arizona. As “Bone Mama” Mary McCann used to say on KUKQ radio in Phoenix, we are having an outbreak of weather. Today’s outbreak is courtesy of Hurrican Norbert taking a wet trip up the west coast. It reminded me of something. Almost exactly 10 years ago, another hurricane named Javier made […] ➡
- The Guts of the New StoryBox are Set creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog Having found the perfect container for my new PirateBox, I now have the desired wiring in place (thanks to my friend Ken in Colorado) to operate what I will put into play soon as a new iteration of the 2011 Storybox. What you see […] ➡
- Beyond Lies The Web My mind works by strange associations, free formed links, connecting, unconnecting, often ending up in the neural equivalent of “page not found”. So on reading this tweet in the Connected Courses twitter flow: MT @papahazama: Why we need to go beyond the #LMS by @audreywatters http://t.co/mML8PRo46i #ccourses @greenstratdoc — jeremy b williams (@jeremybwilliams) September 8, […] ➡
- 2012
- Freedom in Five Photos In prep for doing next week’s introduction to storytelling for my ds106 class, yesterday’s sequence of events compelled me to try the Tell a Story in Five Frames flickr group, making a story titled “Freed” This are an interesting challenge, it is easy perhaps to illustrate a series of events. The trick to level up […] ➡
- 2011
- The Infamous Grilled Cheese Incident In our family lore is the battle of the grilled cheese sandwich, waged between my sisters and I one summer day when I was maybe 8. The record is muddy as the accounts of the conflict disagree. Mom had preserved some of the artifacts, which now come to light and judgement. The evidence is found […] ➡
- 2009
- The CogDog Abides cc licensed flickr photo shared by mnlamberson Thanks to the Jimbo Groom for pointing me to this priceless photo at the Open Education Conference last month in Vancouver (and thank Michelle for grabbing a great moment). it’s a fake prayer, the Reverend knows, and Gardner just want us to read a poem 😉 Share this […] ➡
- 2008
- Five Card Photo Story (a super crude prototype…) Wow are my PHP coding pencils dull, but I’ve had some fun last 2 nights getting them back (we’ll see how sharp they really). I have a really crude, ugly, unformatted demo of a tool I want to use later this month for a session at the Learning 2.008 conference. So I am asking (a) […] ➡
- 2006
- Grnad Opening of Clockwise US Tour flickr foto Grnad Openingavailable on flickr Typos as art! This welcome sign at the Tang Museum is Nina Katchadourian‘s work inspired by a sign at her local deli. I gotta get a job as an artist. I’m on the first leg of a large circle trip around the US, currently in Saratoga Springs, NY, for […] ➡
- 2005
- Back to the Plates: Ocotillo GPS Response System flickr foto Nov_04_I-Ate-This-Squaredavailable on lenny’s flickr (not my meal, but found in the flickr Creative Commons By Attribution collection) Getting back to documenting what’s been sitting on my project plate, is a heaping pile of … well, not the cholesteral special in this Creative Commons flickr photo, but a heaping pile of mySQL, PHP, and […] ➡
- Can Your ePortfolio Do This (RSS)? Mmmmm….feeds… in an eportfolio…. mmmmm… Audree has released another new exciting feature for the MyEport software used at her Chandler-Gilbert Community College and the Maricopa wide service we host for the rest of our system. It has had already for months or more, the ability to syndicate content out from an a publish eportfolio (e.g. […] ➡
- Helen’s Down the Hall! What a nice surprise this morning when a colleague mentioned Helen Barrett, the “grandmother of eportfolios” was just down the hall! She is here one day to do an eportfolio/Taskstream workshop with our Teacher Education program. Being in need of some good audio speakers for her demo, I loaned her my Harmon Kardon Sound Sticks, […] ➡
- 2004
- One of the Stranger Blog Spams From a recent comment blog spam cleansed this morning. I think the spam author needs his own product (spammers URL intentionaly deleted) prozac http://anxietyXXXXXXX.xxx/ Blackmail Error: Send $200 to Bill Gates or your computer will get so messed up it will never work again. prozac online Jim, it’s Grace at the bank. I checked your […] ➡
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