“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 21 posts previously published on October 6th

  • 2024
    • 106 Photos… 506 of Them I always thought it was clever that when talking about my favorite creative act (taking/making photos) that I described photography as an act of deletion. In putting that rectangular frame around an object, landscape, animal, person, you are essentially removing everything outside the frame. With so much fervor of the “power” of generative AI to […]
  • 2022
    • The More You Dig Into Google Search Results, the Worse the Smell Beware of impending clichés of deceased horse attacks (sidebar: why does anyone worry about how many stones it takes and never ask why the fascination with killing birds?) Having made the call for the broken state of Google’s touted ability to locate open licensed images getting some notice (my peak Hacker News hit) and followed […]
  • 2021
    • Branching into, around, about H5P I have an oft-expressed aversion to presenting with slides, especially when presenting about the web… It seems really counterproductive to do slide decks when sharing about the deeply interactive space of H5P. When I was asked to do a 20-25 minute talk on H5P for the Midwestern Higher Education Compact this idea went off in […]
  • 2019
  • 2016
    • Crafting Connected Courses: How The Web Is Won at DML2016 It’s after 11:00PM, hours after co-leading a 6+ hour pre-conference workshop at the 2016 DML Conference, and my adrenaline is still pumping. And feeling a bit daunted in how to summarize this, an off the cuff tweet sort of says it: I did an 8 hour commercial for them today at #2016dml To be blogged… […]
  • 2014
    • 2014 Kiwi Tour: Victoria University of Wellington creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog Day two in Wellington took us up to the top of the Terrace, where the Victoria University of Wellington is perched. A bit of traffic direction confusion provided a detour though downtown, a place I have wandered before, but we were on track once […]
    • 2014 Kiwi Tour: Open Polytechnic of New Zealand After the end of the Tuesday sessions of the Shar-E-Fest conference in Hamilton, Richard (my host, driver, and handler) drove us to the lovely small airport where we boarded a plane to Wellington, about an hour by the beats of the propellers. It was a cloudless day and dramatic to be over the rugged hills and mountains, not to mention flying into a city that is sprinkled like sugar crystals on the craggy hills overlooking the sea.
    • Automated WordPress Blog Comment Spam Emptying creative commons licensed ( BY-NC-SA ) flickr photo shared by maol Frequent words I heard as a kid was reminding me of my household chore– “TAKE OUT THE TRASH!!!” I’m finally getting around to doing it regularly. Even with Akismet running on this blog, I have seen it accumulate more than 1000 trapped spams per […]
  • 2011
    • The Road Ahead for Feed2JS cc licensed ( BY NC SD ) flickr photo shared by Wavy1 This has been beyond my expectations as a response to my call for help to keep Feed2JS going. I actually had never looked much to see where it was being used (D’Arcy would claim its mostly spam), since the site does not track […]
    • Road Stats: Week 16 cc licensed ( BY ) flickr photo shared by cogdogblog Number of days on the road: 105 Miles Driven: 9856 Number of States/Provinces driven in: 17 Number of US/Canadian Border Crossings: 2 Money spent on gas: $2678 Cheapest gas price: $3.25/gallon (Fredericksburg, VA). Highest gas price: $5.64/gallon (1.39/liter) (Wawa, ON). Amount of time required to […]
    • Rivers and Oceans cc licensed ( BY ) flickr photo shared by cogdogblog Among the scattered notes scribbled illegibly in my journal, tapped into the app on my phone, and mainly swirling through my head was the image of the quiet powerful earth moving force of the Salmon River I saw in northern Idaho. I had followed this […]
  • 2009
    • Have Bowl, Need Dog cc licensed flickr photo shared by cogdogblog Yes, sadly, I remain dogless. It’s not for lack of desire for canine company; it’s that my schedule keeps getting more filled with travel that make it feel unfair to take in a dog and then be boarding him/her 50% of the time. It’s hard to avoid the […]
    • Twiticons Gone All Human Twitter is being taken over by humans. I’ve asked a lot of people, even people who do serious research on twitter activity, about something I’ve casually observed over the last few months. I have no data, no real backing to what is merely a casual observation. It seemed a while back, that the icons people […]
  • 2008
    • Paging @KathySierra… cc licensed flickr photo by laffy4k Dear @KathySierra, I realize that you are, like, a big internet A-list star with lots to do and horses to tend, but am a bit saddened my twitter direct message to you has not generated a reply. We are really, really, really interested in enticing you to keynote at […]
  • 2005
    • Not So Great Moments In Web Design It’s some very small things in web sites that clearly point out to me that they were (a) designed by programmers; or (b) never run through usability testing by humans. Here is today’s morsel… An email notification arrived telling of a new message posted to some discussion forum I cannot recall visiting for a project […]
    • MLX Collection / Comments / Search A few posts back I asked for some help to Convince Curmudgeons with Comments — this is in reference to a few vocal critics of our online report tool for a faculty summer project professional growth program who did not want copies of their projects to be cross listed in our Maricopa Learning eXchange. As […]
    • Question Everything Harriet’s blog is pink, peppy, and personal. Is it “real” (and what is “real”?)  Share this barking on social media
    • Me, Nonaggressive? According to CollaborativeRank, the new tool that analyzes social bookmark activity on del.icio.us, my own tagging activity is ranked “nonaggressive” (at least I am in 143nd place): What is CollaborativeRank? It’sl like GoogleRank for del.icio.us tagging: Del.icio.us users who bookmark helpful/timely URLs (as evidenced by others subsequently bookmarking those URLs) will be rewarded with higher […]
  • 2004
    • Chipping Away at the openMLX I actually managed to grab a few hourts the last few days to focus on the openMLX, the supposed open source version of our Maricopa Learning eXchange. We have a “de-Maricopized” version running (this does not have the latest changes), but I am doing the new developments on another copy of the MLX. This works […]
    • 3 Bookmark Tools in One Based on the descriptions elsewhere, in addition to the web bookmark service Furl I am starting to also use the social bookmarking site del.icio.us – the latter for its rip-mix use of free form “:tags” to collect bookmarks made bu other del.icio.us-ers (sidebar, I enjoy “furling” sites but do you say “del.icio.us-ing” a site?). In […]
  • 2003
    • Ratchet Up (Digital Arts and Culture Blog) Wow, these TypePad blogs just continue to pop up, all nicely organized. Here is Ratchet Up “is John Schott & friends, featuring links, often daily, to something of interest in digital culture and the arts.” These are not just your typical blog echoes from elsewhere, each story is originally written and tastefully illustrated. The Ratchet […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 21 posts previously published on October 6th

  • 2024
    • 106 Photos… 506 of Them I always thought it was clever that when talking about my favorite creative act (taking/making photos) that I described photography as an act of deletion. In putting that rectangular frame around an object, landscape, animal, person, you are essentially removing everything outside the frame. With so much fervor of the “power” of generative AI to […] &amp#x27A1;
  • 2022
    • The More You Dig Into Google Search Results, the Worse the Smell Beware of impending clichés of deceased horse attacks (sidebar: why does anyone worry about how many stones it takes and never ask why the fascination with killing birds?) Having made the call for the broken state of Google’s touted ability to locate open licensed images getting some notice (my peak Hacker News hit) and followed […] &amp#x27A1;
  • 2021
    • Branching into, around, about H5P I have an oft-expressed aversion to presenting with slides, especially when presenting about the web… It seems really counterproductive to do slide decks when sharing about the deeply interactive space of H5P. When I was asked to do a 20-25 minute talk on H5P for the Midwestern Higher Education Compact this idea went off in […] &amp#x27A1;
  • 2019
  • 2016
    • Crafting Connected Courses: How The Web Is Won at DML2016 It’s after 11:00PM, hours after co-leading a 6+ hour pre-conference workshop at the 2016 DML Conference, and my adrenaline is still pumping. And feeling a bit daunted in how to summarize this, an off the cuff tweet sort of says it: I did an 8 hour commercial for them today at #2016dml To be blogged… […] &amp#x27A1;
  • 2014
    • 2014 Kiwi Tour: Victoria University of Wellington creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog Day two in Wellington took us up to the top of the Terrace, where the Victoria University of Wellington is perched. A bit of traffic direction confusion provided a detour though downtown, a place I have wandered before, but we were on track once […] &amp#x27A1;
    • 2014 Kiwi Tour: Open Polytechnic of New Zealand After the end of the Tuesday sessions of the Shar-E-Fest conference in Hamilton, Richard (my host, driver, and handler) drove us to the lovely small airport where we boarded a plane to Wellington, about an hour by the beats of the propellers. It was a cloudless day and dramatic to be over the rugged hills and mountains, not to mention flying into a city that is sprinkled like sugar crystals on the craggy hills overlooking the sea. &amp#x27A1;
    • Automated WordPress Blog Comment Spam Emptying creative commons licensed ( BY-NC-SA ) flickr photo shared by maol Frequent words I heard as a kid was reminding me of my household chore– “TAKE OUT THE TRASH!!!” I’m finally getting around to doing it regularly. Even with Akismet running on this blog, I have seen it accumulate more than 1000 trapped spams per […] &amp#x27A1;
  • 2011
    • The Road Ahead for Feed2JS cc licensed ( BY NC SD ) flickr photo shared by Wavy1 This has been beyond my expectations as a response to my call for help to keep Feed2JS going. I actually had never looked much to see where it was being used (D’Arcy would claim its mostly spam), since the site does not track […] &amp#x27A1;
    • Road Stats: Week 16 cc licensed ( BY ) flickr photo shared by cogdogblog Number of days on the road: 105 Miles Driven: 9856 Number of States/Provinces driven in: 17 Number of US/Canadian Border Crossings: 2 Money spent on gas: $2678 Cheapest gas price: $3.25/gallon (Fredericksburg, VA). Highest gas price: $5.64/gallon (1.39/liter) (Wawa, ON). Amount of time required to […] &amp#x27A1;
    • Rivers and Oceans cc licensed ( BY ) flickr photo shared by cogdogblog Among the scattered notes scribbled illegibly in my journal, tapped into the app on my phone, and mainly swirling through my head was the image of the quiet powerful earth moving force of the Salmon River I saw in northern Idaho. I had followed this […] &amp#x27A1;
  • 2009
    • Have Bowl, Need Dog cc licensed flickr photo shared by cogdogblog Yes, sadly, I remain dogless. It’s not for lack of desire for canine company; it’s that my schedule keeps getting more filled with travel that make it feel unfair to take in a dog and then be boarding him/her 50% of the time. It’s hard to avoid the […] &amp#x27A1;
    • Twiticons Gone All Human Twitter is being taken over by humans. I’ve asked a lot of people, even people who do serious research on twitter activity, about something I’ve casually observed over the last few months. I have no data, no real backing to what is merely a casual observation. It seemed a while back, that the icons people […] &amp#x27A1;
  • 2008
    • Paging @KathySierra… cc licensed flickr photo by laffy4k Dear @KathySierra, I realize that you are, like, a big internet A-list star with lots to do and horses to tend, but am a bit saddened my twitter direct message to you has not generated a reply. We are really, really, really interested in enticing you to keynote at […] &amp#x27A1;
  • 2005
    • Not So Great Moments In Web Design It’s some very small things in web sites that clearly point out to me that they were (a) designed by programmers; or (b) never run through usability testing by humans. Here is today’s morsel… An email notification arrived telling of a new message posted to some discussion forum I cannot recall visiting for a project […] &amp#x27A1;
    • MLX Collection / Comments / Search A few posts back I asked for some help to Convince Curmudgeons with Comments — this is in reference to a few vocal critics of our online report tool for a faculty summer project professional growth program who did not want copies of their projects to be cross listed in our Maricopa Learning eXchange. As […] &amp#x27A1;
    • Question Everything Harriet’s blog is pink, peppy, and personal. Is it “real” (and what is “real”?)  Share this barking on social media &amp#x27A1;
    • Me, Nonaggressive? According to CollaborativeRank, the new tool that analyzes social bookmark activity on del.icio.us, my own tagging activity is ranked “nonaggressive” (at least I am in 143nd place): What is CollaborativeRank? It’sl like GoogleRank for del.icio.us tagging: Del.icio.us users who bookmark helpful/timely URLs (as evidenced by others subsequently bookmarking those URLs) will be rewarded with higher […] &amp#x27A1;
  • 2004
    • Chipping Away at the openMLX I actually managed to grab a few hourts the last few days to focus on the openMLX, the supposed open source version of our Maricopa Learning eXchange. We have a “de-Maricopized” version running (this does not have the latest changes), but I am doing the new developments on another copy of the MLX. This works […] &amp#x27A1;
    • 3 Bookmark Tools in One Based on the descriptions elsewhere, in addition to the web bookmark service Furl I am starting to also use the social bookmarking site del.icio.us – the latter for its rip-mix use of free form “:tags” to collect bookmarks made bu other del.icio.us-ers (sidebar, I enjoy “furling” sites but do you say “del.icio.us-ing” a site?). In […] &amp#x27A1;
  • 2003
    • Ratchet Up (Digital Arts and Culture Blog) Wow, these TypePad blogs just continue to pop up, all nicely organized. Here is Ratchet Up “is John Schott & friends, featuring links, often daily, to something of interest in digital culture and the arts.” These are not just your typical blog echoes from elsewhere, each story is originally written and tastefully illustrated. The Ratchet […] &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.

    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 *