“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 April 4th
- 2022
- 6x6x4 Chasing Blurry Bigfoot Down the Rabbit Hole I have a problem. Last week, instead of investigating an issue with one of my project platforms, I was exploring via Google Streetview a town in British Columbia verifying that photos of certain mysterious creatures inexplicably had their faces blurred by Uncle Google’s algorithms. In an upcoming “thing” in a few weeks I hope to […]
- 2020
- The View From Where I Sit (a 15 year jump) I so loved the OER20 Conference #ThisIsMe activity- they encouraged participants in this online conference (I write this as if there are any other kinds now) to tweet and photo of their participation location. You get great windows into participants from both the top tweets (hi Martin) and the latest tweets. It’s a very small […]
- 2018
- At Least The Web Is Not Completely a Vat of Poop… I keep suggesting to Felix that he should become the family breadwinner and pick up some modeling work. “Hey, someone should pay for all those Milkbones!” He just gives me that dismissive silent stare. 2018 sure seems the year that a lot of people are focused on how broken the internet is, as we wake […]
- 2017
- NOBODY Blogs it Better There was absolutely no reason to do this. I blame the iTunes shuffle which spun me through Carly Simon. I was working away on other stuff, thinking in the back of my mind about all the friends and colleagues getting ready to wake up for the first day of OERR17. Boom. Nobody blogs it better, […]
- 2016
- We’ll Get You on the Web… Even If It Takes US 20 Years! Long ago, long before the web, as a Geology student, I was on a trip to Los Angeles. On the return drive along I-10 I saw this billboard that read: Barry’s Bail Bonds: We’ll get You Out… Even if it Takes Us 20 Years! Why does this memory stay in my little brain some 30 […]
- 2014
- Math and Blues with Dylan Uh oh. Two days in a row. I’ve been messing around with a cover version of Bob Dylan’s Rainy Day Women 12 and 35. I was driving a few weeks ago when it came up on my music shuffle– a song I’ve heard plenty of times, but this was the first time I said- wow, […]
- Standard Advertising Rates Apply We here at CogDogBlog Enterprises, Inc Ltd have a clear policy and standard for advertising. This is a serious blog. On Fri, Apr 4, 2014 at 1:03 AM, Xxx Xxxx wrote: Hello, I’d like to inquire if it’s possible to purchase advertising space on your website. As you can readily see from your thorough inspection […]
- 2013
- Recap Week 1/3 in Asia: Japan (part b, The Flat Classroom Part) Picking up last month’s 3 week tour of Asia, I still not have finished blogging my way out of the first leg, in Yokohama, Japan, which started with 2 days of workshops and stuff at Yokohama International School. The rest of the week here was devoted to the 2013 Flat Classroom Conference, actually the event […]
- 2012
- ds106 Mystery Machine May Be in Motion cc licensed ( BY ) flickr photo shared by cogdogblog Just tonight on The ds106 radio, Scottlo was scoffing at the idea that the ds106 Kickstarter could fund a bus “What kind of bus can you get for under 2 grand?” Why a groovy Mystery Machine, of course! May the hippie force roll into your […]
- 2011
- Stealing Stealing cc licensed ( BY NC ) flickr photo shared by ryancr We learn early and repeatedly that stealing is bad (and it is if we are talking about malicious theft), but perhaps as we grow older? wiser? that there are layers to this concept, and I am just loving How to Steal Like an Artist […]
- 2010
- Reply:None cc licensed flickr photo shared by Luca Zappa This is more of a narrowly constructed and certainly not data-driven observation, and I admit at the front that I am just as much a part of the problem as the next node, but I am seeing in my own streams of communications more dropped connections all […]
- 2008
- Order Before Midnight! Invites for Toufee Beta There is a new private beta for Toufee, one of the online video editor site listed at slot 41 on my 50 Web 2.0 Ways to Tell a Story (the order means nothing). I’ve not had time to do much with it, but San, the guy behind the software, is offering me to share invites […]
- 2007
- Best Reason for Delay in Posting to Discussion Forum Will trying to track down some info on Apache and virtual hosts on a technical discussion forum, I found this explanation from one writer who was trying to explain the delay in responding: Yep, I started describing the steps to enable split access logs, and decided to run out and paint the doors. Yep. Sounds […]
- Is It a Blog? Is it A Wiki? Looks Cannot Tell A quick shout-out to Andy Rush for sharing his work on theming and connecting together the UMW New Media Center site using a common theme deployed in WordPress and MediaWiki. It’s very elegant design, and as you navigate back and forth, perhaps the distinction of “this is a wiki” and “this is a blog” blur […]
- For the Last Lonely Reader Here’s a toast to the last reader of this blog, after most others likely have chucked it from their RSS boxes and scooted it off the blog rolls. Heck, and my list of unread feed items stretches down to Ecuador. So hello to the last lonely reader of this dog tired blog…… It’s coming up […]
- 2006
- Where Did That Server Go? flickr foto Where Did That Server Go?available on my flickr Our Apple XServe that hosts Feed2JS and some QuickTime streaming has moved upstairs to the main office server area; it previously occupied a spot in our office (see the server farm). It had been "book mounted" — propped up on some Shockwave programming collector item […]
- 2005
- Join Us- Ocotillo Learning Objects Online Discussion With Scott Leslie This week we are fortunate to have as a Scott Leslie as a “virtual guest: for our Ocotillo Learning Objects Groups discussions: http://zircon.mcli.dist.maricopa.edu/ocotillo/bb/viewforum.php?f=20 Our internal participation is so far…. well…. light… so we are hoping some other voices in the mix might make things move along. Our discussion boards ar eopen for anyone to read, […]
- Brian Lamb, Learning Objects, Wikis, Flickr, RSS– They Wanted it All (No Fooling) Last Friday we had an eager audience for Brian Lamb’s visit for our Dialogue Day on Learning Objects, Wikis, And Other Curious Things. I’d say this blog summary is delayed as some people really despise things posted on April 1, but I have some other excuses. First of all, you can find Brian’s presentation materials […]
- 2004
- Blogs Quiet on the Western Front The cogdog has been busy, and hopes to be back barking soon. As a reprieve of insane early heat and sun in Phoenix (97 in late March is a bit much, and early), we have enjoyed a rare outbreak of weather with a few days of major, very much needed rain. Up here in my […]
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 April 4th
- 2022
- 6x6x4 Chasing Blurry Bigfoot Down the Rabbit Hole I have a problem. Last week, instead of investigating an issue with one of my project platforms, I was exploring via Google Streetview a town in British Columbia verifying that photos of certain mysterious creatures inexplicably had their faces blurred by Uncle Google’s algorithms. In an upcoming “thing” in a few weeks I hope to […] ➡
- 2020
- The View From Where I Sit (a 15 year jump) I so loved the OER20 Conference #ThisIsMe activity- they encouraged participants in this online conference (I write this as if there are any other kinds now) to tweet and photo of their participation location. You get great windows into participants from both the top tweets (hi Martin) and the latest tweets. It’s a very small […] ➡
- 2018
- At Least The Web Is Not Completely a Vat of Poop… I keep suggesting to Felix that he should become the family breadwinner and pick up some modeling work. “Hey, someone should pay for all those Milkbones!” He just gives me that dismissive silent stare. 2018 sure seems the year that a lot of people are focused on how broken the internet is, as we wake […] ➡
- 2017
- NOBODY Blogs it Better There was absolutely no reason to do this. I blame the iTunes shuffle which spun me through Carly Simon. I was working away on other stuff, thinking in the back of my mind about all the friends and colleagues getting ready to wake up for the first day of OERR17. Boom. Nobody blogs it better, […] ➡
- 2016
- We’ll Get You on the Web… Even If It Takes US 20 Years! Long ago, long before the web, as a Geology student, I was on a trip to Los Angeles. On the return drive along I-10 I saw this billboard that read: Barry’s Bail Bonds: We’ll get You Out… Even if it Takes Us 20 Years! Why does this memory stay in my little brain some 30 […] ➡
- 2014
- Math and Blues with Dylan Uh oh. Two days in a row. I’ve been messing around with a cover version of Bob Dylan’s Rainy Day Women 12 and 35. I was driving a few weeks ago when it came up on my music shuffle– a song I’ve heard plenty of times, but this was the first time I said- wow, […]
➡ - Standard Advertising Rates Apply We here at CogDogBlog Enterprises, Inc Ltd have a clear policy and standard for advertising. This is a serious blog. On Fri, Apr 4, 2014 at 1:03 AM, Xxx Xxxx wrote: Hello, I’d like to inquire if it’s possible to purchase advertising space on your website. As you can readily see from your thorough inspection […] ➡
- 2013
- Recap Week 1/3 in Asia: Japan (part b, The Flat Classroom Part) Picking up last month’s 3 week tour of Asia, I still not have finished blogging my way out of the first leg, in Yokohama, Japan, which started with 2 days of workshops and stuff at Yokohama International School. The rest of the week here was devoted to the 2013 Flat Classroom Conference, actually the event […] ➡
- 2012
- ds106 Mystery Machine May Be in Motion cc licensed ( BY ) flickr photo shared by cogdogblog Just tonight on The ds106 radio, Scottlo was scoffing at the idea that the ds106 Kickstarter could fund a bus “What kind of bus can you get for under 2 grand?” Why a groovy Mystery Machine, of course! May the hippie force roll into your […] ➡
- 2011
- Stealing Stealing cc licensed ( BY NC ) flickr photo shared by ryancr We learn early and repeatedly that stealing is bad (and it is if we are talking about malicious theft), but perhaps as we grow older? wiser? that there are layers to this concept, and I am just loving How to Steal Like an Artist […] ➡
- 2010
- Reply:None cc licensed flickr photo shared by Luca Zappa This is more of a narrowly constructed and certainly not data-driven observation, and I admit at the front that I am just as much a part of the problem as the next node, but I am seeing in my own streams of communications more dropped connections all […] ➡
- 2008
- Order Before Midnight! Invites for Toufee Beta There is a new private beta for Toufee, one of the online video editor site listed at slot 41 on my 50 Web 2.0 Ways to Tell a Story (the order means nothing). I’ve not had time to do much with it, but San, the guy behind the software, is offering me to share invites […] ➡
- 2007
- Best Reason for Delay in Posting to Discussion Forum Will trying to track down some info on Apache and virtual hosts on a technical discussion forum, I found this explanation from one writer who was trying to explain the delay in responding: Yep, I started describing the steps to enable split access logs, and decided to run out and paint the doors. Yep. Sounds […] ➡
- Is It a Blog? Is it A Wiki? Looks Cannot Tell A quick shout-out to Andy Rush for sharing his work on theming and connecting together the UMW New Media Center site using a common theme deployed in WordPress and MediaWiki. It’s very elegant design, and as you navigate back and forth, perhaps the distinction of “this is a wiki” and “this is a blog” blur […] ➡
- For the Last Lonely Reader Here’s a toast to the last reader of this blog, after most others likely have chucked it from their RSS boxes and scooted it off the blog rolls. Heck, and my list of unread feed items stretches down to Ecuador. So hello to the last lonely reader of this dog tired blog…… It’s coming up […] ➡
- 2006
- Where Did That Server Go? flickr foto Where Did That Server Go?available on my flickr Our Apple XServe that hosts Feed2JS and some QuickTime streaming has moved upstairs to the main office server area; it previously occupied a spot in our office (see the server farm). It had been "book mounted" — propped up on some Shockwave programming collector item […] ➡
- 2005
- Join Us- Ocotillo Learning Objects Online Discussion With Scott Leslie This week we are fortunate to have as a Scott Leslie as a “virtual guest: for our Ocotillo Learning Objects Groups discussions: http://zircon.mcli.dist.maricopa.edu/ocotillo/bb/viewforum.php?f=20 Our internal participation is so far…. well…. light… so we are hoping some other voices in the mix might make things move along. Our discussion boards ar eopen for anyone to read, […] ➡
- Brian Lamb, Learning Objects, Wikis, Flickr, RSS– They Wanted it All (No Fooling) Last Friday we had an eager audience for Brian Lamb’s visit for our Dialogue Day on Learning Objects, Wikis, And Other Curious Things. I’d say this blog summary is delayed as some people really despise things posted on April 1, but I have some other excuses. First of all, you can find Brian’s presentation materials […] ➡
- 2004
- Blogs Quiet on the Western Front The cogdog has been busy, and hopes to be back barking soon. As a reprieve of insane early heat and sun in Phoenix (97 in late March is a bit much, and early), we have enjoyed a rare outbreak of weather with a few days of major, very much needed rain. Up here in 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.