“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 20 posts previously published on December 21st

  • 2021
    • Photos @ WordPress Of course the WordPress platform (it’s right under the hood hear) can do much with photos. It’s always been a thing I have loved about the platform is that it lends itself to writing with, surrounded by media, not just rovers of text. But I’ve not opened this WordPress post in my WordPress blog to […]
  • 2019
    • Snow Dune Explored As always, getting notice of a photo added to Flickr Explore is a wonderful surprise, as it is often unanticipated. It’s been a while (well not that long, since early August) that it happened. But I never expect a photo to land there, unlike many in the group discussions which sound like “Wahhhh Why Are […]
  • 2015
    • Solo Rider for #Western106 I sure were excited ’bout leadin’ a new herd of ds106 calves from the Kansas State University ranch. Me ‘n Bill even planned stuff over beans and a fire and even ole Hatchet Jack was ready to become unfrozen to be doing a new round of DS106. And when I got word from the KSU […]
  • 2014
    • Federated Index Cards I vaguely remember the way we were taught in high school to research and write a paper. After formulating the topic/hypothesis, we constructed outlines. Then off we would trudge to the library, and use things like the antique card catalog, Citations index to find our sources. As we read books, rolled microfilm, we would use […]
  • 2012
    • The Eight Nights of GIFannukah My menorah is put away, but it seems such a nice symbol to GIF, maybe have to slip it in under Ben Rimes’ GIFmas Card assignment (the first rule of ds106 I tell my students is to change up and break the rules of an assignment, if it makes for good art). Do you need […]
    • MOO(c) MOO(c) MOO(c) Stanford is doing it. Harvard is doing it. MIT is doing it. We better do it. Just keep mooing along. Giulia got the GIF going this before me (and cleverly wrapped it into an Instagram-like GIF with dancing panda, speaking of herding behavior, look at the stampeded over to flickr). I knew when I saw […]
  • 2010
    • BBFWLLT cc licensed flickr photo shared by cogdogblog My Mom is too much… too much goodness. She loves giving little presents. This big boxed arrived via FedEx; in it were some holiday gifts for a friend’s son, but Mom also stuffed it full of kitchen gadgets she claimed were laying arounf un-used in her kitchen. And […]
  • 2009
    • In Creation, Hope. And Then? cc licensed flickr photo shared by alicepopkorn That title may not stick for this post, it may connote something of a religious message. Which it is not. I rarely do blog posts by request, but with the right reason and carrot, I may respond (see below). For the benefit of Donors Choose, a project I […]
  • 2008
    • Downsizing the Answer to a Deep Childhood Philosophical Question I will tap into a generational nerve (if you get no response, read someone else’s blog post) with a curiosity as to how, over time, the answer to that sacred answer was changed: Yes, I never liked the Owl’s cheap answer, and always thought the number of licks to get to the center of a […]
  • 2007
    • Morning Online With 8th Graders Morning With 8th Graders posted 21 Dec ’07, 11.56am MST PST on flickr I got an invite yesterday to join in on a WorldBridges session with 8th grade students of Lee Baber (Western part of Virginia), Paul Allison (New York City), and Madeline ? (also new York) in completely chaotic, open discussion about "the future […]
  • 2006
    • WeatherBonk – Weather / Maps Mashed Up More nifty sites marrying live data to maps – WeatherBonk Weather Bonk is a mashup that lets you view real time weather information on a map. This can provide some very interesting information, particularly in areas with microclimates, such as San Francisco. For example, summer in San Francisco can be particularly cold and foggy, and […]
    • fauxtoShop Woah, and before I thought gliffy was the best thing since (well I still like it for doing flow charts)… but the new fauxto (in beta, but open to play) is way beyond what I ever thought you might be able to have for paint tools as a web app. It is PhotoShop (lite) in […]
    • Got Me a Badge Who remembers the crazy of web badges in the mid 1990s… “Top 5%”! Back at Maricopa, I had slapped together my “stinking web badges” page (wow what old stuff). Got a new one today, but I am humbly flattered… This stinking web dog blog got listed as one of the top 100 educational educational blogs […]
  • 2005
    • So That is What The Icon Does I’ve been wondering about an interesting orange icon I have seen on the right hand side of the URL display in Firefox, which seemed to always be there for WordPress sites. Thanks to Tom at TuttleSVC, I know it is now implemented in Mozilla and Microoft browsers to indicate a site has an RSS feed […]
    • Inward / Outward Aggregating (RipMix Fever) And That Fresh Smell of Ajax I’ve been eyeballing an ever increasing amount of web-based platforms for bringing together content (or microcontent, or nanocontent) from multiple sources, the echo again of Small Technologies (Pieces) Loosely Joined (note- if the content there is replaces by a wiki spam link, just wait until the bot resets the mess. Brian- you may want to […]
    • Comments (Spam-less) Desired It’s been 2 few weeks since we released the first online version of our MCLI iForum publication (see the background info blogged nearby). We are hoping to push the publication envelope to go completely online (the print button is in the reader’s hands) and using WordPress as a publishing platform. Our timing was not optimal […]
  • 2004
    • Do not callto://me Disregard my recent suggestion for making Skype links written has callto:/myskypename– My new Finnish colleague Teemu just noted that it conflicts with the ugh-ly Netmeeting. There is supposed to be a way from the Skype Site to create a “Shype Me Button” ( could not find it there and had to Google to get close): […]
    • MovableType Multiple Author Blogs / Contribution Lists As reported a few times before, I have been prying time here and there to work on a prototype web site, that replaces a current, hand edited Low Threshold Applications web site with a dynamic one authored in MovableType. I am just polishing off a new add-on hack that uses PHP and mySQL to dome […]
    • I Skyped, We Skyped … and then Shazam! from Finland My call for some skypers paid off this time, the phone has been ringing off the hook… Just as I was checking email this monrning, I got the notice of Will’s comment that he had just downloaded Skype, and just as I was adding him to my Skype contact list, he called! The audio quality […]
    • What a Maroon Oi, have the spammers gone wacko. Bonkers. What are they smokin’? Got a notice yesterday one tried to insert a bunch of typical “win poker cialis v*iagra celebrity beastiality pix enlarge your _____ shrink your ______ bad credit erased” URLs into one of our sites that allows honest people to design a customized style sheet. […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 20 posts previously published on December 21st

  • 2021
    • Photos @ WordPress Of course the WordPress platform (it’s right under the hood hear) can do much with photos. It’s always been a thing I have loved about the platform is that it lends itself to writing with, surrounded by media, not just rovers of text. But I’ve not opened this WordPress post in my WordPress blog to […] &amp#x27A1;
  • 2019
    • Snow Dune Explored As always, getting notice of a photo added to Flickr Explore is a wonderful surprise, as it is often unanticipated. It’s been a while (well not that long, since early August) that it happened. But I never expect a photo to land there, unlike many in the group discussions which sound like “Wahhhh Why Are […] &amp#x27A1;
  • 2015
    • Solo Rider for #Western106 I sure were excited ’bout leadin’ a new herd of ds106 calves from the Kansas State University ranch. Me ‘n Bill even planned stuff over beans and a fire and even ole Hatchet Jack was ready to become unfrozen to be doing a new round of DS106. And when I got word from the KSU […] &amp#x27A1;
  • 2014
    • Federated Index Cards I vaguely remember the way we were taught in high school to research and write a paper. After formulating the topic/hypothesis, we constructed outlines. Then off we would trudge to the library, and use things like the antique card catalog, Citations index to find our sources. As we read books, rolled microfilm, we would use […] &amp#x27A1;
  • 2012
    • The Eight Nights of GIFannukah My menorah is put away, but it seems such a nice symbol to GIF, maybe have to slip it in under Ben Rimes’ GIFmas Card assignment (the first rule of ds106 I tell my students is to change up and break the rules of an assignment, if it makes for good art). Do you need […] &amp#x27A1;
    • MOO(c) MOO(c) MOO(c) Stanford is doing it. Harvard is doing it. MIT is doing it. We better do it. Just keep mooing along. Giulia got the GIF going this before me (and cleverly wrapped it into an Instagram-like GIF with dancing panda, speaking of herding behavior, look at the stampeded over to flickr). I knew when I saw […] &amp#x27A1;
  • 2010
    • BBFWLLT cc licensed flickr photo shared by cogdogblog My Mom is too much… too much goodness. She loves giving little presents. This big boxed arrived via FedEx; in it were some holiday gifts for a friend’s son, but Mom also stuffed it full of kitchen gadgets she claimed were laying arounf un-used in her kitchen. And […] &amp#x27A1;
  • 2009
    • In Creation, Hope. And Then? cc licensed flickr photo shared by alicepopkorn That title may not stick for this post, it may connote something of a religious message. Which it is not. I rarely do blog posts by request, but with the right reason and carrot, I may respond (see below). For the benefit of Donors Choose, a project I […] &amp#x27A1;
  • 2008
  • 2007
    • Morning Online With 8th Graders Morning With 8th Graders posted 21 Dec ’07, 11.56am MST PST on flickr I got an invite yesterday to join in on a WorldBridges session with 8th grade students of Lee Baber (Western part of Virginia), Paul Allison (New York City), and Madeline ? (also new York) in completely chaotic, open discussion about "the future […] &amp#x27A1;
  • 2006
    • WeatherBonk – Weather / Maps Mashed Up More nifty sites marrying live data to maps – WeatherBonk Weather Bonk is a mashup that lets you view real time weather information on a map. This can provide some very interesting information, particularly in areas with microclimates, such as San Francisco. For example, summer in San Francisco can be particularly cold and foggy, and […] &amp#x27A1;
    • fauxtoShop Woah, and before I thought gliffy was the best thing since (well I still like it for doing flow charts)… but the new fauxto (in beta, but open to play) is way beyond what I ever thought you might be able to have for paint tools as a web app. It is PhotoShop (lite) in […] &amp#x27A1;
    • Got Me a Badge Who remembers the crazy of web badges in the mid 1990s… “Top 5%”! Back at Maricopa, I had slapped together my “stinking web badges” page (wow what old stuff). Got a new one today, but I am humbly flattered… This stinking web dog blog got listed as one of the top 100 educational educational blogs […] &amp#x27A1;
  • 2005
    • So That is What The Icon Does I’ve been wondering about an interesting orange icon I have seen on the right hand side of the URL display in Firefox, which seemed to always be there for WordPress sites. Thanks to Tom at TuttleSVC, I know it is now implemented in Mozilla and Microoft browsers to indicate a site has an RSS feed […] &amp#x27A1;
    • Inward / Outward Aggregating (RipMix Fever) And That Fresh Smell of Ajax I’ve been eyeballing an ever increasing amount of web-based platforms for bringing together content (or microcontent, or nanocontent) from multiple sources, the echo again of Small Technologies (Pieces) Loosely Joined (note- if the content there is replaces by a wiki spam link, just wait until the bot resets the mess. Brian- you may want to […] &amp#x27A1;
    • Comments (Spam-less) Desired It’s been 2 few weeks since we released the first online version of our MCLI iForum publication (see the background info blogged nearby). We are hoping to push the publication envelope to go completely online (the print button is in the reader’s hands) and using WordPress as a publishing platform. Our timing was not optimal […] &amp#x27A1;
  • 2004
    • Do not callto://me Disregard my recent suggestion for making Skype links written has callto:/myskypename– My new Finnish colleague Teemu just noted that it conflicts with the ugh-ly Netmeeting. There is supposed to be a way from the Skype Site to create a “Shype Me Button” ( could not find it there and had to Google to get close): […] &amp#x27A1;
    • MovableType Multiple Author Blogs / Contribution Lists As reported a few times before, I have been prying time here and there to work on a prototype web site, that replaces a current, hand edited Low Threshold Applications web site with a dynamic one authored in MovableType. I am just polishing off a new add-on hack that uses PHP and mySQL to dome […] &amp#x27A1;
    • I Skyped, We Skyped … and then Shazam! from Finland My call for some skypers paid off this time, the phone has been ringing off the hook… Just as I was checking email this monrning, I got the notice of Will’s comment that he had just downloaded Skype, and just as I was adding him to my Skype contact list, he called! The audio quality […] &amp#x27A1;
    • What a Maroon Oi, have the spammers gone wacko. Bonkers. What are they smokin’? Got a notice yesterday one tried to insert a bunch of typical “win poker cialis v*iagra celebrity beastiality pix enlarge your _____ shrink your ______ bad credit erased” URLs into one of our sites that allows honest people to design a customized style sheet. […] &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 *