“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 18 posts previously published on October 14th
- 2022
- The Good, Bad, and Ugly Get a #ds106 Walk of Life Yikes, I had to dig deep in the archives to find the last time I did a DS106 Assignment. I would like to think there is one in there about making an excuse for not doing them. Well there was one in 2020 when I made a DS106 Assignment for NetNarr, then the assignment timeline […]
- Open Your CC Image Search Eyes to Openverse Enough energy has been spent here combing through what Google Image Search excretes for Creative Commons licensed images. So much that it merited a new tag. And yes, they seem to have twiddled a few knobs the results have ascended from only 3 CC licensed dog images found September 27 to an astounding 114 just […]
- 2020
- From Hakatai On: My 1990s Web Servers Was there a request for more web nostalgia? Bueller? Bueller? Oh, I mean… Weller! Martin Weller has his own cottage industry of 25 years of _______ going strong… heck he has books, swag, and now a podcast. All I got are some blog posts getting tagged thewebandme but I’m going for a 27 here. Because […]
- 2018
- Modernizing the Dog House: SSL & Gutenberg I’m a bit late to getting this blog ready for the next era. But there is no time like now to get started. First, and frankly forced by Google for reasons I am not clear, this site is no longer insecure. That’s right, CogDogBlog is fully safe, even for cockroach spammers like Glen to have an […]
- Celebrating a 50 Year Old Demo And readers think I may go on and on about my old technologies. This guy did a big demo 50 years ago that makes all other demos, including mine, look tiny. If you do not know about the Mother of All Demos, put down the computing device you use every day without much thinking of […]
- Daily Blank Sites Now Equipped With Low Supply Gauges (and more) Just rolled a new feature into the Daily Blank WordPress theme that’s been on my whiteboard list for a few months (speaking of that, where is my whiteboard?). Note: I just found this post sitting in my drafts, written like 5 months ago. Oops. This is the theme built for sites like the DS106 Daily […]
- Glen Gets the Treatment I’d like to think it’s rather clear if anyone glances at this blog that despite it’s title, it does not sell dog products, and definitely is not in the genre of home improvement tips. Plus, there is a clear statement on the bottom of every page. The exact statement is: Here I bark and growl […]
- 2016
- Spiraling Down Minuscule DS106 History Details I have increasing respect for historians who try to decipher events from hundreds of years ago. They have shreds to work with. What I am writing about is from only five years ago. I was part of it. I have my story of what happened. But still, it’s not always so clear. Nor might it […]
- 2015
- Granny’s Approximate Birthday Today, Oct 15. was approximately my grandmother’s birthday. She would have been 110 today. That top photo is me recording her stories (on a micro-cassette tape) in 1994 at my sister’s house in Baltimore. That’s been digitized and blogged here before, but heck, I still like just the first 5 minutes of that I made […]
- Memory Walk To School I was out of ideas so for today’s UdG Agora Daily Try I went back to the well of DS106 Daily Create number 932 on July 28, 2014: From Memory, Draw The Path Traveled to Your First School Go back to your first days of school; draw a map of the epic journey to get […]
- 2014
- Is The Internet Party Over? In my recent, somewhat nostalgic, presentations I show an image of a street party, people blowing bubbles. That’s how I felt about the internet when I first stumbled onto it. The web too. It was all discovery. In the early 1990s I put my name and email address on thousands of web pages. There were […]
- 2010
- Dear United… cc licensed flickr photo shared by bored-now Dear United Airlines, Coming from a satisfying long relationship with Continental Airlines (where I am Platinum Elite, flying 60,000 – 75,000 per year for work and vacation), given the merger with my former partner, I tried to enter this new situation with an open mind. But not only […]
- 2008
- PhotoSynth Strike Two PhotoSynth Strike Two by cogdogblog posted 14 Oct ’08, 11.32pm MDT PST on flickr After my first miserable attempt to create a PhotoSynth in my living room, I sat down and read the RTFM, took 300 photos, but only got to 70% synthy. Needed more angles and connectors. This one took 2.5 hours. See Strawberry […]
- CCK08: Complexity is Complex, Ain’t It? With travel, work-load, and self-imposed laziness, I maintain my firm position on the very far edges of participation in the Connectivism & Connective Knowledge. But as I intuit from the Stephen and George show, that really does not matter, and we need to get over that. photo credit: Pulpolux !!! Week 6 is Complexity, Chaos […]
- 2004
- Syllabus Magazine Drops Faculty Audience for Presidents/CIOs I’ve been reading Syllabus magazine for quite some time, not always agreeing with everything in print, but I found good stories on instructional technology, case studies, review of technology that faculty use. But all that has been flushed. Syllabus has morphed to “Campus Technology” …the complete resource for leaders in higher education. Campus Technology offers […]
- 2003
- More Fixes for RSS2JS Wow, once you start tinkering with code, the worm can opens up. I made a few more adjustments to the RSS to JS demo due to the worminess of RSS 2.0 versus 1.0. After comments in yesterday’s announced fix, I became aware that the code would not deal successfully with RSS 2.0 feeds that use […]
- Jay Allen for Saint: MT-Blacklist Plugin Thank you, thank you, THANK YOU to Jay Allen, for those 40 hours of blogged sleepless programming that produced MT-Blacklist – A Movable Type Anti-spam Plugin. The war againt spammers has been ratched-up considerably with this new valuable tool (it is beta, but works sweet so far). It allows easy maintaince of your blacklist, deleting […]
- Those low down dirty Bloogz We always need more search engines, eh? Here is Blloogz which has no “about screen” but apparently walks many blogs to fuel the search tool. Not being sure, if this cogdog was “bloogz-ed”, we added our URL to the crawl. Searches produces long lists, but page loads were a bit on the slow side, some […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 18 posts previously published on October 14th
- 2022
- The Good, Bad, and Ugly Get a #ds106 Walk of Life Yikes, I had to dig deep in the archives to find the last time I did a DS106 Assignment. I would like to think there is one in there about making an excuse for not doing them. Well there was one in 2020 when I made a DS106 Assignment for NetNarr, then the assignment timeline […] ➡
- Open Your CC Image Search Eyes to Openverse Enough energy has been spent here combing through what Google Image Search excretes for Creative Commons licensed images. So much that it merited a new tag. And yes, they seem to have twiddled a few knobs the results have ascended from only 3 CC licensed dog images found September 27 to an astounding 114 just […] ➡
- 2020
- From Hakatai On: My 1990s Web Servers Was there a request for more web nostalgia? Bueller? Bueller? Oh, I mean… Weller! Martin Weller has his own cottage industry of 25 years of _______ going strong… heck he has books, swag, and now a podcast. All I got are some blog posts getting tagged thewebandme but I’m going for a 27 here. Because […] ➡
- 2018
- Modernizing the Dog House: SSL & Gutenberg I’m a bit late to getting this blog ready for the next era. But there is no time like now to get started. First, and frankly forced by Google for reasons I am not clear, this site is no longer insecure. That’s right, CogDogBlog is fully safe, even for cockroach spammers like Glen to have an […] ➡
- Celebrating a 50 Year Old Demo And readers think I may go on and on about my old technologies. This guy did a big demo 50 years ago that makes all other demos, including mine, look tiny. If you do not know about the Mother of All Demos, put down the computing device you use every day without much thinking of […] ➡
- Daily Blank Sites Now Equipped With Low Supply Gauges (and more) Just rolled a new feature into the Daily Blank WordPress theme that’s been on my whiteboard list for a few months (speaking of that, where is my whiteboard?). Note: I just found this post sitting in my drafts, written like 5 months ago. Oops. This is the theme built for sites like the DS106 Daily […] ➡
- Glen Gets the Treatment I’d like to think it’s rather clear if anyone glances at this blog that despite it’s title, it does not sell dog products, and definitely is not in the genre of home improvement tips. Plus, there is a clear statement on the bottom of every page. The exact statement is: Here I bark and growl […] ➡
- 2016
- Spiraling Down Minuscule DS106 History Details I have increasing respect for historians who try to decipher events from hundreds of years ago. They have shreds to work with. What I am writing about is from only five years ago. I was part of it. I have my story of what happened. But still, it’s not always so clear. Nor might it […] ➡
- 2015
- Granny’s Approximate Birthday Today, Oct 15. was approximately my grandmother’s birthday. She would have been 110 today. That top photo is me recording her stories (on a micro-cassette tape) in 1994 at my sister’s house in Baltimore. That’s been digitized and blogged here before, but heck, I still like just the first 5 minutes of that I made […] ➡
- Memory Walk To School I was out of ideas so for today’s UdG Agora Daily Try I went back to the well of DS106 Daily Create number 932 on July 28, 2014: From Memory, Draw The Path Traveled to Your First School Go back to your first days of school; draw a map of the epic journey to get […] ➡
- 2014
- Is The Internet Party Over? In my recent, somewhat nostalgic, presentations I show an image of a street party, people blowing bubbles. That’s how I felt about the internet when I first stumbled onto it. The web too. It was all discovery. In the early 1990s I put my name and email address on thousands of web pages. There were […] ➡
- 2010
- Dear United… cc licensed flickr photo shared by bored-now Dear United Airlines, Coming from a satisfying long relationship with Continental Airlines (where I am Platinum Elite, flying 60,000 – 75,000 per year for work and vacation), given the merger with my former partner, I tried to enter this new situation with an open mind. But not only […] ➡
- 2008
- PhotoSynth Strike Two PhotoSynth Strike Two by cogdogblog posted 14 Oct ’08, 11.32pm MDT PST on flickr After my first miserable attempt to create a PhotoSynth in my living room, I sat down and read the RTFM, took 300 photos, but only got to 70% synthy. Needed more angles and connectors. This one took 2.5 hours. See Strawberry […] ➡
- CCK08: Complexity is Complex, Ain’t It? With travel, work-load, and self-imposed laziness, I maintain my firm position on the very far edges of participation in the Connectivism & Connective Knowledge. But as I intuit from the Stephen and George show, that really does not matter, and we need to get over that. photo credit: Pulpolux !!! Week 6 is Complexity, Chaos […] ➡
- 2004
- Syllabus Magazine Drops Faculty Audience for Presidents/CIOs I’ve been reading Syllabus magazine for quite some time, not always agreeing with everything in print, but I found good stories on instructional technology, case studies, review of technology that faculty use. But all that has been flushed. Syllabus has morphed to “Campus Technology” …the complete resource for leaders in higher education. Campus Technology offers […] ➡
- 2003
- More Fixes for RSS2JS Wow, once you start tinkering with code, the worm can opens up. I made a few more adjustments to the RSS to JS demo due to the worminess of RSS 2.0 versus 1.0. After comments in yesterday’s announced fix, I became aware that the code would not deal successfully with RSS 2.0 feeds that use […] ➡
- Jay Allen for Saint: MT-Blacklist Plugin Thank you, thank you, THANK YOU to Jay Allen, for those 40 hours of blogged sleepless programming that produced MT-Blacklist – A Movable Type Anti-spam Plugin. The war againt spammers has been ratched-up considerably with this new valuable tool (it is beta, but works sweet so far). It allows easy maintaince of your blacklist, deleting […] ➡
- Those low down dirty Bloogz We always need more search engines, eh? Here is Blloogz which has no “about screen” but apparently walks many blogs to fuel the search tool. Not being sure, if this cogdog was “bloogz-ed”, we added our URL to the crawl. Searches produces long lists, but page loads were a bit on the slow side, some […] ➡
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.