“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 4th

  • 2024
    • Applying A Little Jigaloo to the 2024 Daily Photos Sometimes we just need a little magic spray to unstick ourselves. Of course in many cases, no one beyond our own inner critic sees the stuckness. 2023 was a low success rate for my self-inflicted efforts of daily flickr photo posting and might leave some games in my claims of self timelining (me, a few […]
  • 2020
    • The Long Job of Cleaning Up Password Rubble I’m gonna need a bigger tool. And I have been dragging my heels for a while, despite warnings from being registered on Have I Been pwned? (which I think now also sends warnings via Firefox). Yes, for many years I did that lazy thing of using the same password on many a free web site. […]
  • 2018
    • Keynote Tweet *Might* Be Working from the Big Mountain OS I don’t do a wacksock of presentations these days. When I do, I like running them on the web, from the web, a la SPLOT fashion. But I did/do like the approach of being able to send out tweets during presentations, something I figured out in 2011 with Keynote Tweet. To be clear, I did […]
  • 2015
    • The MOOCing Machine (and making thereof) It starts, as often it does, with a tweet… https://twitter.com/audreywatters/status/563176357576712192 Audrey’s series on The History of the Future of Education is more than book worthy. In her latest, The Automatic Machine, Audrey takes us more into this past future history. I’ve read previous bits by her about Sidney Presser and claims for inventions of machines […]
    • Verizon’s Modern Telephone Network… if this was 1895 I’m willing to even give them some slack, like maybe 1945. It’s not just Verizon, but that is who I pay every month for operating a network that allows computers to generate phone calls to me from numbers that do not exist. I plan to write Verizon often in this post, just in case they […]
    • I Hear There is a Noisy SPLOT in Town… In prep for Tuesday’s You Show workshop session on audio I worked feverishly about 4 hours Monday night and 3 hours Tuesday morning to create the newest SPLOT tool, the Sound Pool. This is a place to share audio clips, tracks, either MP3 audio either found on the web (via a URL) or uploaded to […]
  • 2014
    • Alan’s Old Guitar I’m back again for Intro to Guitar, with not much progress in a year, but I still love strumming around. I pretty much told the story of my Takamine last year (and it sounds similar to Irwin’s story). Those who have guitars they have held a lot know that familiar feeling. Mine has its share […]
  • 2013
    • The Joy of Cooking #ds106radio cc licensed ( BY SD ) flickr photo shared by cogdogblog I rather enjoy spotting juxtapositions, as when I opened a cabinet in a friend’s kitchen, and noticed a tupperware containeer with a #ds106radio sticker sitting atop a copy of The Joy of Cooking. That’s whats happening in a few hours, when I try out […]
    • A Blog Request So Dorky I Don’t Even Need to Mock It I get tired of those emails form people asking to blog about their product, or to include their infographic, or to buy ad space (for the latter I sometimes reply that my starting price is $10,000 per url per month, they usually do not reply). The best are people who gush on how they love […]
    • Guitars I Don’t Have Somehow I managed to do my homework ahead of time, since my intro video included the story of main main guitar, an acoustic I’ve had since age 15. I thought I would turn this inside out and talk about 2 guitars I do not have, since they have stories too. Once in a year or […]
    • The Bavatag Repairman cc licensed ( BY NC SD ) flickr photo shared by NoiseProfessor This still cracks me up, and I had rustling around my iMovie a certain comercial that I wanted to mashup, so here it is, featuring the lonliest edtech repairman (note one f-bomb in the audio).  Share this barking on social media
  • 2012
    • In With the New (Hard Drive) cc licensed (BY) flickr photo shared by cogdogblog The new hard drive is ready to go in my Macbook Pro. Closed her up. I booted from my Leopard startup disk, erased the new drive, and ran an install from a backup on my Time Machine drive. It works like a champ. I am using it […]
  • 2009
    • TypePad = CrapPad TypePad Can Kiss My Hairy ____ by cogdogblog posted 4 Feb ’09, 11.36pm MST PST on flickr Good &#*$ing grief! Isn’t enough that I login to TypePad’s TypeKey authentication service? Isn;t enough that I monkey type in the letters in the captcha? And it still chokes on a comment with one freaking URL? TypePad kiss […]
  • 2007
    • Scratch All Future Conference Presentations on Web 2.0 And maybe instead, we can get it with 5 minutes, no bullet points, no lecturing in Web 2.0 … The Machine is Us/ing Us, a YouTube gem: This comes from Digital Ethnography @ Kansas State University, “a working group of Kansas State University students and faculty dedicated to exploring and extending the possibilities of digital […]
  • 2005
    • When Using the Web is the Reflex Does anyone still look up number, business names in a big thick yellow pages phone book? Is that still the first reflex when a net connected computer is in reach? Two recent observations indicate that for many folks, not just techies, but Jane and Joe Citizen, the web is becoming the reflex. We have a […]
    • IT Helpdesks: Theory And Practice I keep a pad of frequently called numbers near my office phone- there is a number next to a label called “Helpless desk”. In theory, this is how our helpdesk works. I go to a web site and fill submit a problem request form. It gets routed electronically to someone who addresses the issue. The […]
  • 2004
    • Catwalk? SiteBites?Nufo? This is better than “RSS”? According to Amy Gahran, RSS needs a better name. These are suggestions for a new colloquial name for RSS, since acronyms are inherently geeky and tend to alienate nontechnical people. The intention of this contest is to come up with a common-usage term that will help make RSS more accessible to a mass audience – […]
    • PubSub Offers a Neat Twist on Eating RSS Feeds I’ve just taken a brief look at PubSub following some mentions at the RSS Winterfest. This service takes a different angle on aggregating feeds, almost “Downse-ian” like EduRSS in that you can track among thousands (they say) of RSS feeds for particular keyword searches. And the results are presented to you via RSS! PubSub lets […]
    • Repositories Folly (FoD Syndrome) Previously on CDB, on the doubts of “Learning object repositories”… “The folly is that educators will give up some time to share information about resources they have created or used”. Now a different slant. I had lunch recently with a colleague working on a new grant funded project– creating discipline-specific “learning objects” and yes, their […]
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 4th

  • 2024
    • Applying A Little Jigaloo to the 2024 Daily Photos Sometimes we just need a little magic spray to unstick ourselves. Of course in many cases, no one beyond our own inner critic sees the stuckness. 2023 was a low success rate for my self-inflicted efforts of daily flickr photo posting and might leave some games in my claims of self timelining (me, a few […] &amp#x27A1;
  • 2020
    • The Long Job of Cleaning Up Password Rubble I’m gonna need a bigger tool. And I have been dragging my heels for a while, despite warnings from being registered on Have I Been pwned? (which I think now also sends warnings via Firefox). Yes, for many years I did that lazy thing of using the same password on many a free web site. […] &amp#x27A1;
  • 2018
    • Keynote Tweet *Might* Be Working from the Big Mountain OS I don’t do a wacksock of presentations these days. When I do, I like running them on the web, from the web, a la SPLOT fashion. But I did/do like the approach of being able to send out tweets during presentations, something I figured out in 2011 with Keynote Tweet. To be clear, I did […] &amp#x27A1;
  • 2015
    • The MOOCing Machine (and making thereof) It starts, as often it does, with a tweet… https://twitter.com/audreywatters/status/563176357576712192 Audrey’s series on The History of the Future of Education is more than book worthy. In her latest, The Automatic Machine, Audrey takes us more into this past future history. I’ve read previous bits by her about Sidney Presser and claims for inventions of machines […] &amp#x27A1;
    • Verizon’s Modern Telephone Network… if this was 1895 I’m willing to even give them some slack, like maybe 1945. It’s not just Verizon, but that is who I pay every month for operating a network that allows computers to generate phone calls to me from numbers that do not exist. I plan to write Verizon often in this post, just in case they […] &amp#x27A1;
    • I Hear There is a Noisy SPLOT in Town… In prep for Tuesday’s You Show workshop session on audio I worked feverishly about 4 hours Monday night and 3 hours Tuesday morning to create the newest SPLOT tool, the Sound Pool. This is a place to share audio clips, tracks, either MP3 audio either found on the web (via a URL) or uploaded to […] &amp#x27A1;
  • 2014
    • Alan’s Old Guitar I’m back again for Intro to Guitar, with not much progress in a year, but I still love strumming around. I pretty much told the story of my Takamine last year (and it sounds similar to Irwin’s story). Those who have guitars they have held a lot know that familiar feeling. Mine has its share […] &amp#x27A1;
  • 2013
    • The Joy of Cooking #ds106radio cc licensed ( BY SD ) flickr photo shared by cogdogblog I rather enjoy spotting juxtapositions, as when I opened a cabinet in a friend’s kitchen, and noticed a tupperware containeer with a #ds106radio sticker sitting atop a copy of The Joy of Cooking. That’s whats happening in a few hours, when I try out […] &amp#x27A1;
    • A Blog Request So Dorky I Don’t Even Need to Mock It I get tired of those emails form people asking to blog about their product, or to include their infographic, or to buy ad space (for the latter I sometimes reply that my starting price is $10,000 per url per month, they usually do not reply). The best are people who gush on how they love […] &amp#x27A1;
    • Guitars I Don’t Have Somehow I managed to do my homework ahead of time, since my intro video included the story of main main guitar, an acoustic I’ve had since age 15. I thought I would turn this inside out and talk about 2 guitars I do not have, since they have stories too. Once in a year or […] &amp#x27A1;
    • The Bavatag Repairman cc licensed ( BY NC SD ) flickr photo shared by NoiseProfessor This still cracks me up, and I had rustling around my iMovie a certain comercial that I wanted to mashup, so here it is, featuring the lonliest edtech repairman (note one f-bomb in the audio).  Share this barking on social media &amp#x27A1;
  • 2012
    • In With the New (Hard Drive) cc licensed (BY) flickr photo shared by cogdogblog The new hard drive is ready to go in my Macbook Pro. Closed her up. I booted from my Leopard startup disk, erased the new drive, and ran an install from a backup on my Time Machine drive. It works like a champ. I am using it […] &amp#x27A1;
  • 2009
    • TypePad = CrapPad TypePad Can Kiss My Hairy ____ by cogdogblog posted 4 Feb ’09, 11.36pm MST PST on flickr Good &#*$ing grief! Isn’t enough that I login to TypePad’s TypeKey authentication service? Isn;t enough that I monkey type in the letters in the captcha? And it still chokes on a comment with one freaking URL? TypePad kiss […] &amp#x27A1;
  • 2007
    • Scratch All Future Conference Presentations on Web 2.0 And maybe instead, we can get it with 5 minutes, no bullet points, no lecturing in Web 2.0 … The Machine is Us/ing Us, a YouTube gem: This comes from Digital Ethnography @ Kansas State University, “a working group of Kansas State University students and faculty dedicated to exploring and extending the possibilities of digital […] &amp#x27A1;
  • 2005
    • When Using the Web is the Reflex Does anyone still look up number, business names in a big thick yellow pages phone book? Is that still the first reflex when a net connected computer is in reach? Two recent observations indicate that for many folks, not just techies, but Jane and Joe Citizen, the web is becoming the reflex. We have a […] &amp#x27A1;
    • IT Helpdesks: Theory And Practice I keep a pad of frequently called numbers near my office phone- there is a number next to a label called “Helpless desk”. In theory, this is how our helpdesk works. I go to a web site and fill submit a problem request form. It gets routed electronically to someone who addresses the issue. The […] &amp#x27A1;
  • 2004
    • Catwalk? SiteBites?Nufo? This is better than “RSS”? According to Amy Gahran, RSS needs a better name. These are suggestions for a new colloquial name for RSS, since acronyms are inherently geeky and tend to alienate nontechnical people. The intention of this contest is to come up with a common-usage term that will help make RSS more accessible to a mass audience – […] &amp#x27A1;
    • PubSub Offers a Neat Twist on Eating RSS Feeds I’ve just taken a brief look at PubSub following some mentions at the RSS Winterfest. This service takes a different angle on aggregating feeds, almost “Downse-ian” like EduRSS in that you can track among thousands (they say) of RSS feeds for particular keyword searches. And the results are presented to you via RSS! PubSub lets […] &amp#x27A1;
    • Repositories Folly (FoD Syndrome) Previously on CDB, on the doubts of “Learning object repositories”… “The folly is that educators will give up some time to share information about resources they have created or used”. Now a different slant. I had lunch recently with a colleague working on a new grant funded project– creating discipline-specific “learning objects” and yes, their […] &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 *