“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 19 posts previously published on February 1st

  • 2023
    • Daily Double January 2023 With grand intentions to stick to a schedule of daily challenges, by skin of my calendar teeth I am 31 for 31 days in both daily flickr photos and ds106 Daily Creates. I’ve held this pace before maybe 2 months? Does it really matter to get a perfect score (no)? But parsing some time to […]
  • 2022
    • The WordPress Hyperlink Pour Over Trick Yes, an old Cogdog can learn a new WordPress Trick. I’ve long gotten over the move to the Block Editor. I almost chuckle like seeing an 8-track player in a thrift store when I see Ye Olde Classic Editor (e.g. in Pressbooks). But there are things I continually fumble over. It seems very frequent when […]
  • 2016
    • A New Wave For Pechaflickr Thanks to the way the open web works, I just put into play a fun new option for my pechaflickr site/game/thing. Nothing is changed with the way it has worked. At the bottom of the site is a link to a Google form that collects info from those willing to to share of how they […]
  • 2014
    • Cloudharing the Tortoise CogDogBlog Do you really buy into that old fable? Slow and steady wins the race? Maybe for foot races, but for a web server, I want it all hare speed. Make that flare speed. Both CogDogBlog and ds106 (we are neighbors on the server farm) were suffering recently from the dreaded “over usage of resources”. Thanks […]
  • 2013
    • CogDog’s Guitar Hello It’s really late and I need to wake up stupid early, but when I saw Jabiz’s tweet, and his video, and his stack of papers.. I said I’m in. I blabbed a bot in the video, compeltely leaving out that I live in a tiny town in Arizona called Strawberry (yes its real, look it […]
  • 2011
    • Blog Tips from Grandpa CogDog cc licensed flickr photo shared by x-ray delta one This image is not exactly relevant, but was so bizarre I could not resist- who would not want a “Dual Head-mounted listening Device”? It looks like the perfect audio set up to enjoy radio ds106. I’ve been spending a chunk of time combing through the projects […]
    • Not One Tech Extinction cc licensed flickr photo shared by John Kannenberg A few weeks ago we had author Kevin Kelly appear as a guest on the Connect@NMC webinars to talk about his book “What Technology Wants” (a full archive is available). In his work, Kelly uses a broad umbrella to include what is technology, and suggests an ecosystem/evolution […]
    • Geeking the Keynote Tweet cc licensed flickr photo shared by Jacob Whittaker UPDATE (Sep 21, 2013): These instructions are a bit dated– see the updated instructions. Last year I used for the first time a nifty AppleScript that allows you to embed a code in the notes of your Keynote presentation that will trigger a twitter message with the […]
    • Real LMS Revolutionaries Burn Zombies This morning’s RSS buzz, or rippling murmur, is the web video from upstart LMS Instructure announcing the open-sourceness of their Canvas platform, and with it, a literal parody of Apple’s then ground breaking 1984 video: As a frequently off target metaphor users, I step blindly into pot calling kettle black, but is the 1984 really […]
  • 2009
  • 2008
    • January Crop of 366 photos January Crop of 366 photos posted 1 Feb ’08, 10.20pm MST PST on flickr One month down for the year’s pledge of 366 daily photos posted to flickr (plus one into February), 8.1% done! This has been so much fun to do; making time and effort each day to think visually, and look for novel […]
    • My WiLD SeLF My WiLD SeLF posted 1 Feb ’08, 8.59pm MST PST on flickr Attractive, eh? I made this with www.buildyourwildself.com/ a site apparently sponsored my the New York Zoo and Aquarium, more likely aimed at kids than people my age. its a flash based avatar creation web app, you starte with basic choices of adding hair, […]
    • Horizon Report 2008 at ELI- Dog Bites Elwood This past tuesday was the official release of the NMC 2008 Horizon Report like we do every year at the EDUCAUSE ELI Conference (hey Chronicle, that is TUESDAY, JANUARY 29 2008!). The full report is available, for free, as a 256k Creative Commons sprinkled PDF. Please download and share pervasively. As somewhat of an experiment, […]
    • So What is Web 2.0 Storytelling? If I am not President, I sure am on the Board of Directors of the Bryan Alexander Fan Club. So it becomes even more amazing when he wants to dine with me before his workshop and get feedback on his plans for the session he did at the EDUCAUSE ELI conference on Web 2.0 Storytelling. […]
  • 2006
    • Listen/Speak Web It’s podcast mania out there. I’m getting more requests for information, demos, etc internally. People are wondering what the implications are for the Apple iTunes U offer (I signed up, what’s to lose?). I have weak optimistic hopes we can move quickly past the “Oh, I can put my lectures online” flash of brilliance. Just […]
  • 2005
    • Warming The Hands Over the Flames of Email E-mail flame wars (a torrent of angry, differing viewpoint exchanges) must be as old as the first listserv with more than 20 people on it. Whether you want to classify participants according to some phylum/species or not not, it is just human nature, and what happens in the loosely structured online environment. A reading of […]
    • Six Figures, A Jaguar– the Luxurious Life of a Spammer (Thanks to James Farmer for popping this article our way). The Register today unveils the life of the rich and infamous, “Interview with a link spammer”: Sam – let’s call our interviewee Sam, it’s suitably anonymous – lives in a three-bedroom semi-detached house in London, drives a vintage Jaguar and runs his own company. But […]
  • 2004
    • Wah Hoo! Old LEE Software Glides on By One of my procrastinated pending projects was updating our Learning English Electronically (LEE) CD-ROM software, a still well-used English Grammar coded with Macromedia Director 5.0 in 1998 and updated last in 2000. I had read some time ago that Director Apps needed to be authored in at least version 8.5.1 to run in Windows XP […]
    • MLX Package of the Week: The View from Where I Sit Trying another “new aiming to be regular” CDB feature, highlighting an interesting “”package” from the Maricopa Learning eXchange. This is is special because it is not a “reusable learning object” (RLO) but a ‘reusable idea object” (RIO?) Maybe we can breed a whole raft of meaningless acronyms, like RCA (re-usable classroom activity), RCS (reusable communication […]
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 February 1st

  • 2023
    • Daily Double January 2023 With grand intentions to stick to a schedule of daily challenges, by skin of my calendar teeth I am 31 for 31 days in both daily flickr photos and ds106 Daily Creates. I’ve held this pace before maybe 2 months? Does it really matter to get a perfect score (no)? But parsing some time to […] &amp#x27A1;
  • 2022
    • The WordPress Hyperlink Pour Over Trick Yes, an old Cogdog can learn a new WordPress Trick. I’ve long gotten over the move to the Block Editor. I almost chuckle like seeing an 8-track player in a thrift store when I see Ye Olde Classic Editor (e.g. in Pressbooks). But there are things I continually fumble over. It seems very frequent when […] &amp#x27A1;
  • 2016
    • A New Wave For Pechaflickr Thanks to the way the open web works, I just put into play a fun new option for my pechaflickr site/game/thing. Nothing is changed with the way it has worked. At the bottom of the site is a link to a Google form that collects info from those willing to to share of how they […] &amp#x27A1;
  • 2014
    • Cloudharing the Tortoise CogDogBlog Do you really buy into that old fable? Slow and steady wins the race? Maybe for foot races, but for a web server, I want it all hare speed. Make that flare speed. Both CogDogBlog and ds106 (we are neighbors on the server farm) were suffering recently from the dreaded “over usage of resources”. Thanks […] &amp#x27A1;
  • 2013
    • CogDog’s Guitar Hello It’s really late and I need to wake up stupid early, but when I saw Jabiz’s tweet, and his video, and his stack of papers.. I said I’m in. I blabbed a bot in the video, compeltely leaving out that I live in a tiny town in Arizona called Strawberry (yes its real, look it […] &amp#x27A1;
  • 2011
    • Blog Tips from Grandpa CogDog cc licensed flickr photo shared by x-ray delta one This image is not exactly relevant, but was so bizarre I could not resist- who would not want a “Dual Head-mounted listening Device”? It looks like the perfect audio set up to enjoy radio ds106. I’ve been spending a chunk of time combing through the projects […] &amp#x27A1;
    • Not One Tech Extinction cc licensed flickr photo shared by John Kannenberg A few weeks ago we had author Kevin Kelly appear as a guest on the Connect@NMC webinars to talk about his book “What Technology Wants” (a full archive is available). In his work, Kelly uses a broad umbrella to include what is technology, and suggests an ecosystem/evolution […] &amp#x27A1;
    • Geeking the Keynote Tweet cc licensed flickr photo shared by Jacob Whittaker UPDATE (Sep 21, 2013): These instructions are a bit dated– see the updated instructions. Last year I used for the first time a nifty AppleScript that allows you to embed a code in the notes of your Keynote presentation that will trigger a twitter message with the […] &amp#x27A1;
    • Real LMS Revolutionaries Burn Zombies This morning’s RSS buzz, or rippling murmur, is the web video from upstart LMS Instructure announcing the open-sourceness of their Canvas platform, and with it, a literal parody of Apple’s then ground breaking 1984 video: As a frequently off target metaphor users, I step blindly into pot calling kettle black, but is the 1984 really […] &amp#x27A1;
  • 2009
  • 2008
    • January Crop of 366 photos January Crop of 366 photos posted 1 Feb ’08, 10.20pm MST PST on flickr One month down for the year’s pledge of 366 daily photos posted to flickr (plus one into February), 8.1% done! This has been so much fun to do; making time and effort each day to think visually, and look for novel […] &amp#x27A1;
    • My WiLD SeLF My WiLD SeLF posted 1 Feb ’08, 8.59pm MST PST on flickr Attractive, eh? I made this with www.buildyourwildself.com/ a site apparently sponsored my the New York Zoo and Aquarium, more likely aimed at kids than people my age. its a flash based avatar creation web app, you starte with basic choices of adding hair, […] &amp#x27A1;
    • Horizon Report 2008 at ELI- Dog Bites Elwood This past tuesday was the official release of the NMC 2008 Horizon Report like we do every year at the EDUCAUSE ELI Conference (hey Chronicle, that is TUESDAY, JANUARY 29 2008!). The full report is available, for free, as a 256k Creative Commons sprinkled PDF. Please download and share pervasively. As somewhat of an experiment, […] &amp#x27A1;
    • So What is Web 2.0 Storytelling? If I am not President, I sure am on the Board of Directors of the Bryan Alexander Fan Club. So it becomes even more amazing when he wants to dine with me before his workshop and get feedback on his plans for the session he did at the EDUCAUSE ELI conference on Web 2.0 Storytelling. […] &amp#x27A1;
  • 2006
    • Listen/Speak Web It’s podcast mania out there. I’m getting more requests for information, demos, etc internally. People are wondering what the implications are for the Apple iTunes U offer (I signed up, what’s to lose?). I have weak optimistic hopes we can move quickly past the “Oh, I can put my lectures online” flash of brilliance. Just […] &amp#x27A1;
  • 2005
    • Warming The Hands Over the Flames of Email E-mail flame wars (a torrent of angry, differing viewpoint exchanges) must be as old as the first listserv with more than 20 people on it. Whether you want to classify participants according to some phylum/species or not not, it is just human nature, and what happens in the loosely structured online environment. A reading of […] &amp#x27A1;
    • Six Figures, A Jaguar– the Luxurious Life of a Spammer (Thanks to James Farmer for popping this article our way). The Register today unveils the life of the rich and infamous, “Interview with a link spammer”: Sam – let’s call our interviewee Sam, it’s suitably anonymous – lives in a three-bedroom semi-detached house in London, drives a vintage Jaguar and runs his own company. But […] &amp#x27A1;
  • 2004
    • Wah Hoo! Old LEE Software Glides on By One of my procrastinated pending projects was updating our Learning English Electronically (LEE) CD-ROM software, a still well-used English Grammar coded with Macromedia Director 5.0 in 1998 and updated last in 2000. I had read some time ago that Director Apps needed to be authored in at least version 8.5.1 to run in Windows XP […] &amp#x27A1;
    • MLX Package of the Week: The View from Where I Sit Trying another “new aiming to be regular” CDB feature, highlighting an interesting “”package” from the Maricopa Learning eXchange. This is is special because it is not a “reusable learning object” (RLO) but a ‘reusable idea object” (RIO?) Maybe we can breed a whole raft of meaningless acronyms, like RCA (re-usable classroom activity), RCS (reusable communication […] &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 *