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

  • 2023
    • Collecting TRU Collector SPLOT Stories I just can’t stop the SPLOT, which has been into my blog veins since late 2014. Speaking of late November, that was when I got a kind email from Daniel Villar Onrubia asking to guest author an article on online infrastructures for open education for the EDUTEC Journal he is co-editing. As he has been […]
  • 2018
    • Archiving Tweets: Are You Missing the Moment? I find myself people missing maybe the easiest and most sensible way to curate, publish sets of curated tweets. When storify announced it was biting the dust/pooping the web, amongst the rush to jump to some other hosted platform or use my arcane tool, what I noticed was about 90% of the ways people talked […]
  • 2017
    • Cowbirding to the End A tweet of ends #digitalstorytelling gem @cowbird to shut down: https://t.co/IRIyymTJcYThis makes me so sad. — Bryan Alexander (@BryanAlexander) February 8, 2017 The standard opening lines here would be my woeful admission of how little I had written in that special storytelling space. It would be wafted with moth-ball scented excuses. You can more or […]
  • 2016
    • #TDC1500: A Daily Create Odyssey Some of the best experiences doing the DS106 Daily Create are taking on one that you think is maybe not all that special, interesting, and falling into a magic shiny rabbit hole… in the act of just letting the mind fly open and also stumbling across the unexpected trigger. I’m responsible for today’s one– I […]
  • 2013
    • Jamming with Light My Fire As it happens, I had just finished lighting the fire in MY woodstove, when I clicked over to Alan’s post and listened to his rockin’ version of Light My Fire.  I retreated to basement, found the tenor guitar, used the Guitar Toolkit app to find a few chords and a Dorian scale in Am. I […]
    • Web Makers / Web Breakers cc licensed ( BY NC ) flickr photo shared by concretecandy The web is a fabric we weave and wear together or tear apart. Posterous yesterday announced a new feature- the web they wove back in 2008? Thrown away in 2013. To you read URLs? I bet they changed the title of the post from […]
    • Natural/Unnatural PhotoGifs Two more for the GIF pile of ones made not by downloading video clips, but using my own photos– the ds106 assignment is Photo it Like Peanut Butter: Rather than making animated GIFs from movie scenes, for this assignment, generate one a real world object/place by using your own series of photographs as the source […]
  • 2011
    • What Other Class Has a Live Call in Radio Show? cc licensed ( BY ) flickr photo shared by cogdogblog The radio studio was in my hotel room in Washington DC on Tuesday– in town for the EDUCAUSE ELI conference, Jim Groom, Martha Burtis, and I (plus friend and guest Steve G) did what we could to keep ds106 radio on schedule — even pushing […]
  • 2009
    • Stingy Facebook Gets None of My Media 2009/365/47: Facebook FAIL by cogdogblog posted 16 Feb ’09, 10.05pm MST PST on flickr Even before the rounds of flack today. about Facebook’s Terms of Services, I’ve contended that Facebook is Stingybook with media — it will suck in your media (flickr, YouTube) etc, do with it what it wants, and then it does not […]
    • The Dog is Back in the House Underwater Camera Fun by Noel back in Zurich posted 23 Mar ’08, 2.45pm MDT PST on flickr My week of no blog and commenting elsewhere has passed, although with most of the week being travel and NMC meetings and then fun at Mardi Gras, I really did not get out as much and spread the […]
  • 2008
    • Be a Blog Mentor for Al Upton’s miniLegends Yesterday I wrote of the power of using twitter as a “CallOut” to get help or participation or just say, “Hey, we’re hanging out over at this cool web place.” And late last night, another example twittered my way- getting a tweet from both Sue Waters and Al Upton. Al does these fantastic web blogging […]
  • 2007
    • A Week of Blog Abstinence (almost) It was almost a year ago I reflected (not the first, not the last), on the subtle power of blog commenting, which to me is still as vital a part of the ecosystem as pounding out new posts (or incessant barking). I was just nicely reminded of this by a comment on a 3 year […]
    • Get Rich from those Unwanted Powerpoints (after winning Norwegian Lottery and cashing in Nigerian Bank Funds) Wow, I really hope PPTExchange is a parody, please say it is so… Are you the kind of person who writes their thoughts down in PowerPoint? Did you ever think that your presentations might be worth sharing -or even worth money? We’re exactly those people, and we thought: Wouldn’t it be nice to have a […]
    • Blog Seeds Sprout “Who is taking a picture of me?” This during my last presentation at UNITEC. This 3+ year old photo was recently discovered by Karen (partially in the left side), and was taken in one of the workshops I did during a visit to New Zealand in November 2004. This workshop, or BlogShop, [link is dead, […]
    • A Pitch for NMC’s Online Conference on Web Video Disclaimer: I work for NMC… We are running our Spring NMC Online Conference with a theme that originally floated through the 2007 Horizon Report, what at one time we were calling “The Small Video”. Just in the last few months, I’ve been tracking how much more prevalent the use of video has become as a […]
  • 2005
    • Colophon of the Week Submitted for the Colophon of the Week (once I look up a definition of what the heck a colophon is), from the Newsdesigner blog: This site was coded with rudimentary HTML, PHP, CSS and BEER. The 3-column CSS layout was adapted from one found at Position Is Everything. BBEdit helped wrangle the alphabet soup, and […]
    • Newest 25 Cent book from the Pine Thrift Store: Bill G and His Road Ahead (10 years later) My latest 25 cent investment from the Pine Arizona Senior Center Thrift Store is “The Road Ahead” by Bill Gates, Nathan Myhrvold, Peter Rinearson. Far from being my hero, I was curious where the road he envisioned back in 1995 actually went. I’ve not read much yet, but flipping through, I have to grudgingly admit […]
    • Not Ready for Prime Time: feed:// I forgot who’s WordPress blog I was surfing this morning, but a mouse hover over their RSS link turned the cursor to a question mark, and clicking the link actually auto subscribed that feed to me aggregator. The link was written differently than the typical link: feed://www.somedude.com/blog/feed/ That is correct, note the feed:// protocol on […]
    • 1000 Monkeys Pecking At PHP… … would likely program my current project more efficiently. This is one of those textbook examples of how not to build software, but in then end, good enough will (hopefully) be good enough. I am working an updates to an online application system we developed last year for one of our professional growth programs (where […]
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 16th

  • 2023
    • Collecting TRU Collector SPLOT Stories I just can’t stop the SPLOT, which has been into my blog veins since late 2014. Speaking of late November, that was when I got a kind email from Daniel Villar Onrubia asking to guest author an article on online infrastructures for open education for the EDUTEC Journal he is co-editing. As he has been […] &amp#x27A1;
  • 2018
    • Archiving Tweets: Are You Missing the Moment? I find myself people missing maybe the easiest and most sensible way to curate, publish sets of curated tweets. When storify announced it was biting the dust/pooping the web, amongst the rush to jump to some other hosted platform or use my arcane tool, what I noticed was about 90% of the ways people talked […] &amp#x27A1;
  • 2017
    • Cowbirding to the End A tweet of ends #digitalstorytelling gem @cowbird to shut down: https://t.co/IRIyymTJcYThis makes me so sad. — Bryan Alexander (@BryanAlexander) February 8, 2017 The standard opening lines here would be my woeful admission of how little I had written in that special storytelling space. It would be wafted with moth-ball scented excuses. You can more or […] &amp#x27A1;
  • 2016
    • #TDC1500: A Daily Create Odyssey Some of the best experiences doing the DS106 Daily Create are taking on one that you think is maybe not all that special, interesting, and falling into a magic shiny rabbit hole… in the act of just letting the mind fly open and also stumbling across the unexpected trigger. I’m responsible for today’s one– I […] &amp#x27A1;
  • 2013
    • Jamming with Light My Fire As it happens, I had just finished lighting the fire in MY woodstove, when I clicked over to Alan’s post and listened to his rockin’ version of Light My Fire.  I retreated to basement, found the tenor guitar, used the Guitar Toolkit app to find a few chords and a Dorian scale in Am. I […] &amp#x27A1;
    • Web Makers / Web Breakers cc licensed ( BY NC ) flickr photo shared by concretecandy The web is a fabric we weave and wear together or tear apart. Posterous yesterday announced a new feature- the web they wove back in 2008? Thrown away in 2013. To you read URLs? I bet they changed the title of the post from […] &amp#x27A1;
    • Natural/Unnatural PhotoGifs Two more for the GIF pile of ones made not by downloading video clips, but using my own photos– the ds106 assignment is Photo it Like Peanut Butter: Rather than making animated GIFs from movie scenes, for this assignment, generate one a real world object/place by using your own series of photographs as the source […] &amp#x27A1;
  • 2011
    • What Other Class Has a Live Call in Radio Show? cc licensed ( BY ) flickr photo shared by cogdogblog The radio studio was in my hotel room in Washington DC on Tuesday– in town for the EDUCAUSE ELI conference, Jim Groom, Martha Burtis, and I (plus friend and guest Steve G) did what we could to keep ds106 radio on schedule — even pushing […] &amp#x27A1;
  • 2009
    • Stingy Facebook Gets None of My Media 2009/365/47: Facebook FAIL by cogdogblog posted 16 Feb ’09, 10.05pm MST PST on flickr Even before the rounds of flack today. about Facebook’s Terms of Services, I’ve contended that Facebook is Stingybook with media — it will suck in your media (flickr, YouTube) etc, do with it what it wants, and then it does not […] &amp#x27A1;
    • The Dog is Back in the House Underwater Camera Fun by Noel back in Zurich posted 23 Mar ’08, 2.45pm MDT PST on flickr My week of no blog and commenting elsewhere has passed, although with most of the week being travel and NMC meetings and then fun at Mardi Gras, I really did not get out as much and spread the […] &amp#x27A1;
  • 2008
    • Be a Blog Mentor for Al Upton’s miniLegends Yesterday I wrote of the power of using twitter as a “CallOut” to get help or participation or just say, “Hey, we’re hanging out over at this cool web place.” And late last night, another example twittered my way- getting a tweet from both Sue Waters and Al Upton. Al does these fantastic web blogging […] &amp#x27A1;
  • 2007
    • A Week of Blog Abstinence (almost) It was almost a year ago I reflected (not the first, not the last), on the subtle power of blog commenting, which to me is still as vital a part of the ecosystem as pounding out new posts (or incessant barking). I was just nicely reminded of this by a comment on a 3 year […] &amp#x27A1;
    • Get Rich from those Unwanted Powerpoints (after winning Norwegian Lottery and cashing in Nigerian Bank Funds) Wow, I really hope PPTExchange is a parody, please say it is so… Are you the kind of person who writes their thoughts down in PowerPoint? Did you ever think that your presentations might be worth sharing -or even worth money? We’re exactly those people, and we thought: Wouldn’t it be nice to have a […] &amp#x27A1;
    • Blog Seeds Sprout “Who is taking a picture of me?” This during my last presentation at UNITEC. This 3+ year old photo was recently discovered by Karen (partially in the left side), and was taken in one of the workshops I did during a visit to New Zealand in November 2004. This workshop, or BlogShop, [link is dead, […] &amp#x27A1;
    • A Pitch for NMC’s Online Conference on Web Video Disclaimer: I work for NMC… We are running our Spring NMC Online Conference with a theme that originally floated through the 2007 Horizon Report, what at one time we were calling “The Small Video”. Just in the last few months, I’ve been tracking how much more prevalent the use of video has become as a […] &amp#x27A1;
  • 2005
    • Colophon of the Week Submitted for the Colophon of the Week (once I look up a definition of what the heck a colophon is), from the Newsdesigner blog: This site was coded with rudimentary HTML, PHP, CSS and BEER. The 3-column CSS layout was adapted from one found at Position Is Everything. BBEdit helped wrangle the alphabet soup, and […] &amp#x27A1;
    • Newest 25 Cent book from the Pine Thrift Store: Bill G and His Road Ahead (10 years later) My latest 25 cent investment from the Pine Arizona Senior Center Thrift Store is “The Road Ahead” by Bill Gates, Nathan Myhrvold, Peter Rinearson. Far from being my hero, I was curious where the road he envisioned back in 1995 actually went. I’ve not read much yet, but flipping through, I have to grudgingly admit […] &amp#x27A1;
    • Not Ready for Prime Time: feed:// I forgot who’s WordPress blog I was surfing this morning, but a mouse hover over their RSS link turned the cursor to a question mark, and clicking the link actually auto subscribed that feed to me aggregator. The link was written differently than the typical link: feed://www.somedude.com/blog/feed/ That is correct, note the feed:// protocol on […] &amp#x27A1;
    • 1000 Monkeys Pecking At PHP… … would likely program my current project more efficiently. This is one of those textbook examples of how not to build software, but in then end, good enough will (hopefully) be good enough. I am working an updates to an online application system we developed last year for one of our professional growth programs (where […] &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 *