“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.

Red arrow points to missing number where the page output reads "There are posts previously published on December 29th"

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.

https://twitter.com/djwudi/status/1212871226953101313

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 23 posts previously published on February 2nd

  • 2025
    • Nifty Simple Web Archive Tool The days of lamenting linkrot seem quaint and prosaic. Right now, as I type, the world is witnessing the wholesale strip mine clearcutting of the web for the ego-flexing kicks of the lunatic in charge. Not many of us can do much as individuals (besides feel the musky stench weight) but luckily many Good People […]
  • 2020
    • My First Book (Levine, 1971) I forgot what I was looking for in my flickr photos, but the browser tab has been open to this one for a while. “A Book About Me” would have been published (by crayon) in 1971, as I gather a second grade assignment. That would have been in Ms. Foreman’s class. I was diagnosed as […]
    • An Old Pineapple Saves iMovie’s Fixed Video Aspect Ratios The internet is big enough I can nearly always find any answer when my software does not do what I want it to do. I know video guru Andy Rush my snicker but I use Apple’s iMovie for all my video editing. It’s been years, maybe a decade since I used Final Cut Pro (so […]
  • 2019
    • Duct Taping A Hypothes.is RSS Feed Widget Do you remember the scene of Web Apocalypse Not Now where Lieutenant Colonel Bill Feedmore boasts, “I love the smell of an RSS feed in the morning!” I hope not. But tinkering with RSS never tires, the technology that is always declared dead, but just keeps working. A current project I am doing with Gardner […]
  • 2017
    • New Assignment Bank Features Are Like Elvis on the Dashboard I have but a fuzzy idea what I mean in the title of this post; I was looking for images about polishing / waxing cars and I all I got was pictures of shiny cars until I stumbled onto this one. Lucky for me and maybe the 8 other people who use it, but in […]
  • 2015
    • Sitting in on Stormy Mondays Blues Radio Show at CFBX After last December’s visit to the CFBX radio station on campus here at TRU I signed up for their program to be trained as a DJ. While my time here is likely too short to put the name on the schedule, I wanted to learn some about how it works. Brant and station manager Steve […]
  • 2014
    • Speaking of Mosaic: The Web 1994 Style Speaking of the Mosaic era of the web I was reminded of that time via a tweet by my colleague Liz Dorland, who was a chemistry faculty from Mesa Community College at the time: @cogdog Seeing us around laptop at District in '93. You & Jim Walters saying "Mosaic LofC would look like this…if it […]
    • How Do Learners Advocate for Themselves in a Class of 16,000? cc licensed ( BY SA ) flickr photo shared by Romain Guy Teaching a class of tens, hundreds of thousands has shown to be newsworthy, but what about at the other end of the telescope? How do people perhaps new, or not, to such a massive environment manage if they feel they cannot be heard? […]
  • 2013
    • Pechaflickring at SCC Tech Talks cc licensed ( BY SD ) flickr photo shared by cogdogblog For many reasons it was exciting today to visit with friends and former colleagies at the Maricopa Community Colleges, visiting Scottsdale Community College today for a fantastic format idea for an event they came up with for TechTalks 13. It is vaguely familair to […]
  • 2012
    • More Vinyl with Gardner cc licensed ( BY ) flickr photo shared by cogdogblog My last stop before arriving in Fredericksburg was an overnight visit with Gardner Campbell, in Blacksburg VA, and what evening of great food and conversation does not get greater when he says, “Do you want to hear some vinyl?” Is the sky up there? Of […]
    • Slice 007: Driving Down to Cottonwood cc licensed ( BY ) flickr photo shared by cogdogblog I’m catching up on my audio reflections, this one is from before I left Arizona. On January 22, the weekend before I left, I drove down to Cottonwood Arizona to visit Todd Conaway. It’s a majestic drive down Highway 260, falling off of the top […]
    • Parked. Finally. cc licensed ( BY ) flickr photo shared by michale Red Dog parked in Fredericksburg, Virginia on Monday afternoon, and has not moved since. It feels both odd and rewarding to not be in motion, yet I am still very much in a place of transition. Here is the place to insert the standard apology […]
  • 2011
    • Putting History in Your Scale, Your Map with BBC Dimensions There is a lot of new stuff happening with web technology every day, hour, minute, and then there ones that just make you stand back, like Neo, and say , “Woah” I just had that after playing with the BBC Dimensions site http://howbigreally.com/ – it describes itself well: Dimensions takes important places, events and things, […]
    • #lessThanEnthusiasticSongs “Twitter is a waste of time” — yeah, time I could better spend reading dull emails, clipping my toenails, filing my taxes. Pfooooey. Yesterday, I got caught up in a mini burst of twitter spontaneity that was pure fun… and is still gurgling along today. IOt was the opposite end of the tail from trending, […]
    • Stir Up ds106: Thursday Tweetathon cc licensed flickr photo shared by 尽在不言中 There might be other things to blog about, but nothing seems as exciting or interesting as the Mad Camp Adventures of Digital Storytelling Open Course aka ds106. There is a rive of creativity shared via the distributed blogs, the free form ds106 radio (by the people, for the […]
  • 2010
    • New Spam Policy Dear CogDogBlog Spammers, Thank you for your loyalty over the last 7 years, your patronage was never wavered, and your activity has continued to grow over the years. Your work is a tribute to perseverance in your discipline, and I am sure your clients, the various pill retailers, online gambling parlors, body enhancement providers all […]
  • 2009
    • Not Postal 2009/365/33: Drinking and Picking Up Your Mail Do Not Mix by cogdogblog posted 2 Feb ’09, 8.46pm MST PST on flickr On my walk down to the mailbox today I was challenged as I had not found anything near interesting in my yard to make for a Flickr 365 photo. And sometimes, pictures just find […]
  • 2008
    • Its February, So It Means Time To Stop Blogging This is the third year I am doing my roughly annual tradition of taking a week with the blog posting on this site put on “mute” (or muzzle) as I will take all my writing to blog via the comment space of other sites. This is the notion of “comment blogging” I found long ago, […]
    • No LinkedIn For You It’s been a while since I barked about the clumsiness of LinkedIn but just had another one of those near deaths by lame interface design. But before that, i am still trying to fathom what LinkedIn offers beyond the ability to just link. It seems utterly recursive with no ending condition to stop the loop. […]
  • 2007
    • LimitedIn After a few more days following my foray into two social network apps, I have a completely, non-scientific, suspect, un-analytical conclusion no one should take seriously. Twitter is a heck of a lot more fun and gratifying than LinkedIn. I’ve heard the comments, and accept them as true for them, that people get a lot […]
    • Unsnapped The CogDogBlog has been un-snapped. Back in December I experimented with adding the capability offered by Snap.com that with some additional calls to a remote JavaScript library in your blog templates, it adds a small web site preview when you mouse-over a link external from your site. I found it interesting, sometimes in the way […]
  • 2006
    • Spam Roaches Dig Deeper: Dr Dave’s SK2 Not Sitting Still You just cannot sit back too long in confidence with blog comment spam roaches. They multiply, mutate, miniaturize, and just keep pecking at the castle door. If you have a WordPress blog that has hummed along nicely using Dr. Dave’s Spam Karma 2, you may have noticed a spate of roaches has been lining up […]
  • 2005
    • Feed2JS Feature Testers Wanted Following a recent a brief server outage I have been tinkering with an approach to solve problems that might occur on external sites using our Feed2JS service. I’m lookng for some folks willing to test some extra JavaScript aimed at preventing page hangs should we blink out on you. Here is the issue. The whole […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 23 posts previously published on February 2nd

  • 2025
    • Nifty Simple Web Archive Tool The days of lamenting linkrot seem quaint and prosaic. Right now, as I type, the world is witnessing the wholesale strip mine clearcutting of the web for the ego-flexing kicks of the lunatic in charge. Not many of us can do much as individuals (besides feel the musky stench weight) but luckily many Good People […] &amp#x27A1;
  • 2020
    • My First Book (Levine, 1971) I forgot what I was looking for in my flickr photos, but the browser tab has been open to this one for a while. “A Book About Me” would have been published (by crayon) in 1971, as I gather a second grade assignment. That would have been in Ms. Foreman’s class. I was diagnosed as […] &amp#x27A1;
    • An Old Pineapple Saves iMovie’s Fixed Video Aspect Ratios The internet is big enough I can nearly always find any answer when my software does not do what I want it to do. I know video guru Andy Rush my snicker but I use Apple’s iMovie for all my video editing. It’s been years, maybe a decade since I used Final Cut Pro (so […] &amp#x27A1;
  • 2019
    • Duct Taping A Hypothes.is RSS Feed Widget Do you remember the scene of Web Apocalypse Not Now where Lieutenant Colonel Bill Feedmore boasts, “I love the smell of an RSS feed in the morning!” I hope not. But tinkering with RSS never tires, the technology that is always declared dead, but just keeps working. A current project I am doing with Gardner […] &amp#x27A1;
  • 2017
  • 2015
    • Sitting in on Stormy Mondays Blues Radio Show at CFBX After last December’s visit to the CFBX radio station on campus here at TRU I signed up for their program to be trained as a DJ. While my time here is likely too short to put the name on the schedule, I wanted to learn some about how it works. Brant and station manager Steve […] &amp#x27A1;
  • 2014
    • Speaking of Mosaic: The Web 1994 Style Speaking of the Mosaic era of the web I was reminded of that time via a tweet by my colleague Liz Dorland, who was a chemistry faculty from Mesa Community College at the time: @cogdog Seeing us around laptop at District in '93. You & Jim Walters saying "Mosaic LofC would look like this…if it […] &amp#x27A1;
    • How Do Learners Advocate for Themselves in a Class of 16,000? cc licensed ( BY SA ) flickr photo shared by Romain Guy Teaching a class of tens, hundreds of thousands has shown to be newsworthy, but what about at the other end of the telescope? How do people perhaps new, or not, to such a massive environment manage if they feel they cannot be heard? […] &amp#x27A1;
  • 2013
    • Pechaflickring at SCC Tech Talks cc licensed ( BY SD ) flickr photo shared by cogdogblog For many reasons it was exciting today to visit with friends and former colleagies at the Maricopa Community Colleges, visiting Scottsdale Community College today for a fantastic format idea for an event they came up with for TechTalks 13. It is vaguely familair to […] &amp#x27A1;
  • 2012
    • More Vinyl with Gardner cc licensed ( BY ) flickr photo shared by cogdogblog My last stop before arriving in Fredericksburg was an overnight visit with Gardner Campbell, in Blacksburg VA, and what evening of great food and conversation does not get greater when he says, “Do you want to hear some vinyl?” Is the sky up there? Of […] &amp#x27A1;
    • Slice 007: Driving Down to Cottonwood cc licensed ( BY ) flickr photo shared by cogdogblog I’m catching up on my audio reflections, this one is from before I left Arizona. On January 22, the weekend before I left, I drove down to Cottonwood Arizona to visit Todd Conaway. It’s a majestic drive down Highway 260, falling off of the top […] &amp#x27A1;
    • Parked. Finally. cc licensed ( BY ) flickr photo shared by michale Red Dog parked in Fredericksburg, Virginia on Monday afternoon, and has not moved since. It feels both odd and rewarding to not be in motion, yet I am still very much in a place of transition. Here is the place to insert the standard apology […] &amp#x27A1;
  • 2011
    • Putting History in Your Scale, Your Map with BBC Dimensions There is a lot of new stuff happening with web technology every day, hour, minute, and then there ones that just make you stand back, like Neo, and say , “Woah” I just had that after playing with the BBC Dimensions site http://howbigreally.com/ – it describes itself well: Dimensions takes important places, events and things, […] &amp#x27A1;
    • #lessThanEnthusiasticSongs “Twitter is a waste of time” — yeah, time I could better spend reading dull emails, clipping my toenails, filing my taxes. Pfooooey. Yesterday, I got caught up in a mini burst of twitter spontaneity that was pure fun… and is still gurgling along today. IOt was the opposite end of the tail from trending, […] &amp#x27A1;
    • Stir Up ds106: Thursday Tweetathon cc licensed flickr photo shared by 尽在不言中 There might be other things to blog about, but nothing seems as exciting or interesting as the Mad Camp Adventures of Digital Storytelling Open Course aka ds106. There is a rive of creativity shared via the distributed blogs, the free form ds106 radio (by the people, for the […] &amp#x27A1;
  • 2010
    • New Spam Policy Dear CogDogBlog Spammers, Thank you for your loyalty over the last 7 years, your patronage was never wavered, and your activity has continued to grow over the years. Your work is a tribute to perseverance in your discipline, and I am sure your clients, the various pill retailers, online gambling parlors, body enhancement providers all […] &amp#x27A1;
  • 2009
    • Not Postal 2009/365/33: Drinking and Picking Up Your Mail Do Not Mix by cogdogblog posted 2 Feb ’09, 8.46pm MST PST on flickr On my walk down to the mailbox today I was challenged as I had not found anything near interesting in my yard to make for a Flickr 365 photo. And sometimes, pictures just find […] &amp#x27A1;
  • 2008
    • Its February, So It Means Time To Stop Blogging This is the third year I am doing my roughly annual tradition of taking a week with the blog posting on this site put on “mute” (or muzzle) as I will take all my writing to blog via the comment space of other sites. This is the notion of “comment blogging” I found long ago, […] &amp#x27A1;
    • No LinkedIn For You It’s been a while since I barked about the clumsiness of LinkedIn but just had another one of those near deaths by lame interface design. But before that, i am still trying to fathom what LinkedIn offers beyond the ability to just link. It seems utterly recursive with no ending condition to stop the loop. […] &amp#x27A1;
  • 2007
    • LimitedIn After a few more days following my foray into two social network apps, I have a completely, non-scientific, suspect, un-analytical conclusion no one should take seriously. Twitter is a heck of a lot more fun and gratifying than LinkedIn. I’ve heard the comments, and accept them as true for them, that people get a lot […] &amp#x27A1;
    • Unsnapped The CogDogBlog has been un-snapped. Back in December I experimented with adding the capability offered by Snap.com that with some additional calls to a remote JavaScript library in your blog templates, it adds a small web site preview when you mouse-over a link external from your site. I found it interesting, sometimes in the way […] &amp#x27A1;
  • 2006
    • Spam Roaches Dig Deeper: Dr Dave’s SK2 Not Sitting Still You just cannot sit back too long in confidence with blog comment spam roaches. They multiply, mutate, miniaturize, and just keep pecking at the castle door. If you have a WordPress blog that has hummed along nicely using Dr. Dave’s Spam Karma 2, you may have noticed a spate of roaches has been lining up […] &amp#x27A1;
  • 2005
    • Feed2JS Feature Testers Wanted Following a recent a brief server outage I have been tinkering with an approach to solve problems that might occur on external sites using our Feed2JS service. I’m lookng for some folks willing to test some extra JavaScript aimed at preventing page hangs should we blink out on you. Here is the issue. The whole […] &amp#x27A1;
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.

    If this kind of stuff has value, please support me by tossing a one time PayPal kibble or monthly on Patreon
    Become a patron at Patreon!
    Profile Picture for CogDog The Blog
    An early 90s builder of web stuff and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person. And he is 100% into the Fediverse (or tells himself so) Tooting as @cogdog@cosocial.ca

    Leave a Reply

    Your email address will not be published. Required fields are marked *