“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 January 8th

  • 2022
    • 30% Misunderstood is the New 60000 Times Faster? Almost 10 years ago I fell into likely a vain pursuit of any shred of fact to support the contention that “humans process visual information 60,000 times faster than text.” And despite trying every approach I could conjure, including offering a cash prize, the trail ran cold back to 1982 (all the blogged efforts are […]
  • 2019
    • Turning Up the SPLOTbox Amp to 11.5: New Features It’s felt like maybe as long as a week since I blogged something about SPLOTs… that’s a long span 😉 But in that time I have been doing some major banging on the tubes and pedals to add big new features to the SPLOTbox theme. This theme was one of the later ones done, and […]
  • 2018
    • Objects With Meaning Yesterday I lost a dog leash in the woods. What’s the big deal? I took my friend Kevin who was visiting, on one of my specialty semi brutal hikes, a near 7 mile bushwack, up the top of the mountain we see from my house. We were working our way around a steep section, the […]
  • 2016
    • On Medium a Title is Often the Entire Story To totally mangle McLuhan is medium.com the message? Does it control the message? What is the message? I will unfairly pick on one story in my assertion that for a lot of what people publish on medium- the entire arc of the story is contained within a click bait title. And this has a lot […]
    • Corralling and TAG Branding #Western106 Tweets

      Me: Holy frijole! (slaps head)

      I’ve been yawing and yammering out in Twitter Land with the #western106 hashtag and plum forgot to set up a corral collectin’ pen with the Twitter TAGS Tool by

    • Apparently A Man Without A Map for #Western106

      There shure is plenty of whooping it up out there in the riding pen, with all these folks coming in with all shiny intentions of doing Western106 with this outfit.

      Lots of that action is ...

  • 2014
    • An Interview with the Wiki Gardener I spent 3 weeks in June 2012 in Vancouver (never a bad destination) in large part to learn from the great tech gurus at UBC. I was reminded of something I did during that experience that somehow never got blogged. It started with a fantastic, impromptu twitter exchange started today by Mike Caulfield TWEET DELETED! […]
    • Happy Second Birthday, ds106 Daily Create cc licensed ( BY NC ND ) flickr photo shared by Vanessa Pike-Russell Two years ago today the ds106 Daily Create was launched with its first challenge, TDC1, “Create a Photograph that features a repeating pattern”. In honor of that, this is one of the rare times we repeat the same prompt, for TDC731: We’ve […]
  • 2013
    • Call Me Mr Lucky cc licensed (BY) flickr photo shared by cogdogblog Meet Lucky, one of the two dogs I am housesitting for three weeks; my friend Sabra is off for a vacation in Italy. Lucky and Gunner are big mixed breed rescue dogs, very mellow and affectionate. Lucky, is not so lucky with some problems of his rear […]
  • 2012
    • Before the Shark There was the Tuber Only because @echoln tweeted her extra large yam comes this un-necessary Yam Yarn assignment for ds106 Yeah, yeah, yam sharks might be a little scary, but nothing is more terrifying than the Great Orange Tuber, the classic story of all times. This was a quick PhotoShop cut and layer job, based on a movie poster […]
    • Get in Creative Shape   It’s simple. Do something every day, and you get better at it. Easier said than done? Well, let’s look at what’s happening at the ds106 DailyCreate and maybe it will take the pressure off. Jim has already written up how it has progressed so far; this is something we talked about last year before […]
    • Dead Dropping The day before yesterday, I journeyed with my partner in art crime to a brick wall on a side street of Fort Erie, Ontario, and cemented a USB thumb drive into the wall: cc licensed ( BY ) flickr photo shared by cogdogblog Why? Because, very much like the PirateBox, it is public digital art […]
  • 2010
    • Gump On Openness cc licensed flickr photo shared by ryancr While the blogs continue to bounce more banter on openness and open education, one more oblique suggestion based on the deep philosophical musings of The Gumped One: Open is as Open does.  Share this barking on social media
    • Peeking At Code: Tynt Tool for Linktribution cc licensed flickr photo shared by hangdog Ah, there is nothing like the smell of serendipity in the morning… One of my favorite things in looking at web sites is finding some secret or some method entangled in the HTML of the source code of the page. I love view source. I love the tags. […]
  • 2008
    • Yep, More Flickr Love Oh flickr, how I adore thee! my love runneth over… But after a lot of blog rants, its just so nice to say some nice things about nice people. Nice! I always get extra excited when my RSS feed for comments on my pix lights up in that “unread” color, so I checked out a […]
  • 2006
    • Faculty Convocation, Tinto, Podcasts and Media Coming This past Friday was the largest event our office coordinates, Faculty Convocation 2006, held the first day of faculty accountability for Spring semester. We had 630 people pre-registered (online via our database system) plus well over 120 walk-in registrants. This has been a Maricopa event dating back to the era of chalk… I am not […]
    • Flickr DVD Ordered For what its worth, I decided to give the Englaze Flickr Backup to DVD service a try. Ordering was pretty easy- pick one of the last 200 photos to be printed on the label (I chose my hammock perspective), enter a title, etc, and provide a credit card. I had a shade under 1000 photos, […]
  • 2005
    • For Computer Games Let’s Hear it for the Underdogs (And Another Long Tail?) Here is a CDB “web good dog” nod to “Home of the Underdogs” a site devoted to preserving “underrated” computer games many, but not all of the being “ambandonware” or titles no longer available: Home of the Underdogs is a non-profit site dedicated to the preservation and promotion of underrated PC games (and a few […]
  • 2004
    • The Ray of MLX Hope: Nutrition Faculty As a brighter followup to the repository folly, I am excited by an event planned next week by a lead faculty member in the Nutrition area at one of our colleges. As she explained, there are not a large number of faculty in this discipline across of colleges and many of the classroom teachers are […]
    • Repository Folly… By rule, I usually avoid use of the “R-word” (repository, too close to the “S-word”), but wanted to launch, here just a few notches into a new calendar, my pessimism on the aspirations of those creating these magical collections of “learning objects.” The folly is that educators will give up some time to share information […]
    • How Shapers of Your Future Write Ahhh, there is nothing like literate, thoughtful email feedback… if only it happened more often than Arizona blizzards. For more than 9 years, we have gotten a stream of emails via our free, online Writing HTML Tutorial, most coming from lesson 12 where we teach you how to write a hyperlink that triggers an email. […]
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 January 8th

  • 2022
    • 30% Misunderstood is the New 60000 Times Faster? Almost 10 years ago I fell into likely a vain pursuit of any shred of fact to support the contention that “humans process visual information 60,000 times faster than text.” And despite trying every approach I could conjure, including offering a cash prize, the trail ran cold back to 1982 (all the blogged efforts are […] &amp#x27A1;
  • 2019
    • Turning Up the SPLOTbox Amp to 11.5: New Features It’s felt like maybe as long as a week since I blogged something about SPLOTs… that’s a long span 😉 But in that time I have been doing some major banging on the tubes and pedals to add big new features to the SPLOTbox theme. This theme was one of the later ones done, and […] &amp#x27A1;
  • 2018
    • Objects With Meaning Yesterday I lost a dog leash in the woods. What’s the big deal? I took my friend Kevin who was visiting, on one of my specialty semi brutal hikes, a near 7 mile bushwack, up the top of the mountain we see from my house. We were working our way around a steep section, the […] &amp#x27A1;
  • 2016
  • 2014
    • An Interview with the Wiki Gardener I spent 3 weeks in June 2012 in Vancouver (never a bad destination) in large part to learn from the great tech gurus at UBC. I was reminded of something I did during that experience that somehow never got blogged. It started with a fantastic, impromptu twitter exchange started today by Mike Caulfield TWEET DELETED! […] &amp#x27A1;
    • Happy Second Birthday, ds106 Daily Create cc licensed ( BY NC ND ) flickr photo shared by Vanessa Pike-Russell Two years ago today the ds106 Daily Create was launched with its first challenge, TDC1, “Create a Photograph that features a repeating pattern”. In honor of that, this is one of the rare times we repeat the same prompt, for TDC731: We’ve […] &amp#x27A1;
  • 2013
    • Call Me Mr Lucky cc licensed (BY) flickr photo shared by cogdogblog Meet Lucky, one of the two dogs I am housesitting for three weeks; my friend Sabra is off for a vacation in Italy. Lucky and Gunner are big mixed breed rescue dogs, very mellow and affectionate. Lucky, is not so lucky with some problems of his rear […] &amp#x27A1;
  • 2012
    • Before the Shark There was the Tuber Only because @echoln tweeted her extra large yam comes this un-necessary Yam Yarn assignment for ds106 Yeah, yeah, yam sharks might be a little scary, but nothing is more terrifying than the Great Orange Tuber, the classic story of all times. This was a quick PhotoShop cut and layer job, based on a movie poster […] &amp#x27A1;
    • Get in Creative Shape   It’s simple. Do something every day, and you get better at it. Easier said than done? Well, let’s look at what’s happening at the ds106 DailyCreate and maybe it will take the pressure off. Jim has already written up how it has progressed so far; this is something we talked about last year before […] &amp#x27A1;
    • Dead Dropping The day before yesterday, I journeyed with my partner in art crime to a brick wall on a side street of Fort Erie, Ontario, and cemented a USB thumb drive into the wall: cc licensed ( BY ) flickr photo shared by cogdogblog Why? Because, very much like the PirateBox, it is public digital art […] &amp#x27A1;
  • 2010
    • Gump On Openness cc licensed flickr photo shared by ryancr While the blogs continue to bounce more banter on openness and open education, one more oblique suggestion based on the deep philosophical musings of The Gumped One: Open is as Open does.  Share this barking on social media &amp#x27A1;
    • Peeking At Code: Tynt Tool for Linktribution cc licensed flickr photo shared by hangdog Ah, there is nothing like the smell of serendipity in the morning… One of my favorite things in looking at web sites is finding some secret or some method entangled in the HTML of the source code of the page. I love view source. I love the tags. […] &amp#x27A1;
  • 2008
    • Yep, More Flickr Love Oh flickr, how I adore thee! my love runneth over… But after a lot of blog rants, its just so nice to say some nice things about nice people. Nice! I always get extra excited when my RSS feed for comments on my pix lights up in that “unread” color, so I checked out a […] &amp#x27A1;
  • 2006
    • Faculty Convocation, Tinto, Podcasts and Media Coming This past Friday was the largest event our office coordinates, Faculty Convocation 2006, held the first day of faculty accountability for Spring semester. We had 630 people pre-registered (online via our database system) plus well over 120 walk-in registrants. This has been a Maricopa event dating back to the era of chalk… I am not […] &amp#x27A1;
    • Flickr DVD Ordered For what its worth, I decided to give the Englaze Flickr Backup to DVD service a try. Ordering was pretty easy- pick one of the last 200 photos to be printed on the label (I chose my hammock perspective), enter a title, etc, and provide a credit card. I had a shade under 1000 photos, […] &amp#x27A1;
  • 2005
  • 2004
    • The Ray of MLX Hope: Nutrition Faculty As a brighter followup to the repository folly, I am excited by an event planned next week by a lead faculty member in the Nutrition area at one of our colleges. As she explained, there are not a large number of faculty in this discipline across of colleges and many of the classroom teachers are […] &amp#x27A1;
    • Repository Folly… By rule, I usually avoid use of the “R-word” (repository, too close to the “S-word”), but wanted to launch, here just a few notches into a new calendar, my pessimism on the aspirations of those creating these magical collections of “learning objects.” The folly is that educators will give up some time to share information […] &amp#x27A1;
    • How Shapers of Your Future Write Ahhh, there is nothing like literate, thoughtful email feedback… if only it happened more often than Arizona blizzards. For more than 9 years, we have gotten a stream of emails via our free, online Writing HTML Tutorial, most coming from lesson 12 where we teach you how to write a hyperlink that triggers an email. […] &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 *