“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 22 posts previously published on October 23rd

  • 2022
    • Bookmarklet to find Edyth and Friends in the Flickr Commons “Does Alan only blog these days about Creative Commons images?” It. Seems. That. Way. But it’s a break from SPLOT, SPLOT, SPLOT. But look, for this one you get a tool out of the deal, here it is before you have to wade through all my type-ridden, long-winded, whinge tinged verbiage. Because it’s been around […]
  • 2019
  • 2018
    • Creative Commons Irony for 500, Alex It was one thing to be in a discussion about Creative Commons license and then right after, get an email request to use one of my CC licensed flickr photos for a music group’s release, but last night’s email brought even more wonderful irony. A rep from an ad agency asked if their client could […]
  • 2012
    • GIFs from the Road Gotta feed the animated GIF bacteria that lives in my gut. I had a few sets of photos I have taken over the travel span that I took series of things in motion for the express purpose of making them animated. I did these in PhotoShop via the method blogged earlier – essentially importing files […]
    • Come Gather Around the ds106 Radio This was week marks one of the highlights (for me at least as a teacher) of ds106 where we do a live radio broadcast of the student audio projects. This is where they work in groups to produce a 30 minute radio show, and is likely one of the most challenging projects. The challenge is […]
    • Storytelling in Storify: I Have a Secret This week in ds106 we are returning to something we have not done since the Spring of 2011, the idea of telling stories within the web – you can find more information in this week’s assignment. While we have been publishing stories on the web, in our blogs, these assignments are meant to get you […]
    • A Page By Any Other Name A test of web html upload.. Time for This
    • Feed2JS Keeps Chugging Along It still is going, almost 10 years since fiddling with some PHP script that converted RSS to javascript (and not even sure if proper credit was given to David Carter-Tod who’s earlier Wytheville News service inspired me) – Feed2JS is still motoring along, made available for free and wide open for making RSS content as […]
    • Reusable Imagery: Half Empty or Half Full? or perhaps the subtitle is “A Funny Thing Happened On My Way Through the Image Search” cc licensed ( BY NC SD ) flickr photo shared by Jin_sama Maybe the philosophical question hinges on how thirsty one is… welcome to what happens when the rabbit hole falls under your foot. So I am wanting to […]
  • 2011
    • Flag a GIFs Flags make for great animated GIFs- I spotted this set of flags in Cookesville Tennessee, a US flag at half mast and a MIA flag. The first one is only 2 frames, the second 4. I was not even planning to GIF these, but the camera was in the mode of rapid fire shooting. And […]
    • Blues Harp Lesson 3 Not much of a lesson, just me making some harmonica noise while camping in Kentucky. I play a bit of great harmonica from Hans Olson “Where’s the Grey?” and dream of being able to play like that.  Share this barking on social media
    • Road Stats Week 18 cc licensed ( BY ) flickr photo shared by cogdogblog As usual, stats through last Thursday posted a tad late! These week includes the gap of time during my falling into a rabbit hole of internet fiction Number of days on the road: 119 Miles Driven: 11,035 Most Recent 1000 mile marker: 11,000 miles, east […]
  • 2008
    • Proud of my Blogging Big Little Sister I’m so proud of my big (cause she’s 6 years older) little (cause she is shorter than me) sister who has taken up blogging in the best way. Having just retired from 30+ years of governemtn work, she and her husband are off on a real adventure. Having been active sail boat explorers up and […]
    • Back in Black ASCII: ACDC Video in Excel Talk about dusting off my memory neurons; one of my first real rock concert experiences was seeing ACDC at some giant venue in DC. The “boys” from down under are still kicking- just found via mashable something really wacky and thus of interest here at CogDogBlog- the first rock video played out in an Excel […]
    • Rock the Academy! image based on Creative Commons licensed flickr photo by Kevin Lim The next NMC Virtual Symposium is Nov 4-6, but early registration ends tomorrow, so don’t miss out. Rock the Academy, the twelfth in the NMC’s Series of Virtual Symposia, will explore the kinds of ideas and activities that are changing the shape of education […]
  • 2006
    • Third Life After 12 straight days of organizing and documenting Second Life activities for the NMC Impact of Digital Media Symposium, I am ready for an upgrade. One things that worked well in this event was
    • Small Presentations Loosely Joined In some sense to parody myself (why not be the first in line?), I am writing here about a “presentation” in its most convoluted, extruded definition I recently unleashed for the K12 Online Conference… this being a request a few months ago from Darren to do a segment on “Basic/Advanced Training”. I started out on […]
  • 2005
    • Feedster Ads in RSS I got an email recently from someone trying to suggest we were inserting adds into a feed displayed with Feed2JS falsely suggested on pappamashkin blog. Nothing could be further from the truth. Heck we do not even insert a credit back link in the free service we provide. But curious, I dug deeper. The culprit […]
    • Big Conference / Nary A Blog Ripple / Spam Nibbles This semester I am taking a complete respite from the usual big ed tech conferences… well, I am taking a break from all of them. The time spent traveling, the cost of travel, really do not balance for the things gained. That said, online conference have yet to really find a niche yet that provides […]
    • Can I Have That in Small, Unmarked Bills Please? Oh, what I would do with $72,000,000 of blog bucks! From How Much Is My Blog Worth?: Inspired by Tristan Louis’s research into the value of each link to Weblogs Inc, I’ve created this little applet using Technorati’s API which computes and displays your blog’s worth using the same link to dollar ratio as the […]
  • 2004
    • Blog Brownout This blog will go into a period of non-activity the next few days as I work on a project requiring me to pretend to be a tourist in the Rocky Mountains. There will not be anything else posted on “project mini vacation”  Share this barking on social media
  • 2003
    • Testing MT-Blacklist Alpha I have been testing an alpha version of the next update to Jay Allen’s MT-Blacklist plugin. The changes coming are impressive and make it easier to filter and easily de-spam weblog crud. You can check and protect both comments and/or trackbacks, and it makes it a one clikc operation. Lots of new options coming in […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 22 posts previously published on October 23rd

  • 2022
    • Bookmarklet to find Edyth and Friends in the Flickr Commons “Does Alan only blog these days about Creative Commons images?” It. Seems. That. Way. But it’s a break from SPLOT, SPLOT, SPLOT. But look, for this one you get a tool out of the deal, here it is before you have to wade through all my type-ridden, long-winded, whinge tinged verbiage. Because it’s been around […] &amp#x27A1;
  • 2019
  • 2018
    • Creative Commons Irony for 500, Alex It was one thing to be in a discussion about Creative Commons license and then right after, get an email request to use one of my CC licensed flickr photos for a music group’s release, but last night’s email brought even more wonderful irony. A rep from an ad agency asked if their client could […] &amp#x27A1;
  • 2012
    • GIFs from the Road Gotta feed the animated GIF bacteria that lives in my gut. I had a few sets of photos I have taken over the travel span that I took series of things in motion for the express purpose of making them animated. I did these in PhotoShop via the method blogged earlier – essentially importing files […] &amp#x27A1;
    • Come Gather Around the ds106 Radio This was week marks one of the highlights (for me at least as a teacher) of ds106 where we do a live radio broadcast of the student audio projects. This is where they work in groups to produce a 30 minute radio show, and is likely one of the most challenging projects. The challenge is […] &amp#x27A1;
    • Storytelling in Storify: I Have a Secret This week in ds106 we are returning to something we have not done since the Spring of 2011, the idea of telling stories within the web – you can find more information in this week’s assignment. While we have been publishing stories on the web, in our blogs, these assignments are meant to get you […] &amp#x27A1;
    • A Page By Any Other Name A test of web html upload.. Time for This &amp#x27A1;
    • Feed2JS Keeps Chugging Along It still is going, almost 10 years since fiddling with some PHP script that converted RSS to javascript (and not even sure if proper credit was given to David Carter-Tod who’s earlier Wytheville News service inspired me) – Feed2JS is still motoring along, made available for free and wide open for making RSS content as […] &amp#x27A1;
    • Reusable Imagery: Half Empty or Half Full? or perhaps the subtitle is “A Funny Thing Happened On My Way Through the Image Search” cc licensed ( BY NC SD ) flickr photo shared by Jin_sama Maybe the philosophical question hinges on how thirsty one is… welcome to what happens when the rabbit hole falls under your foot. So I am wanting to […] &amp#x27A1;
  • 2011
    • Flag a GIFs Flags make for great animated GIFs- I spotted this set of flags in Cookesville Tennessee, a US flag at half mast and a MIA flag. The first one is only 2 frames, the second 4. I was not even planning to GIF these, but the camera was in the mode of rapid fire shooting. And […] &amp#x27A1;
    • Blues Harp Lesson 3 Not much of a lesson, just me making some harmonica noise while camping in Kentucky. I play a bit of great harmonica from Hans Olson “Where’s the Grey?” and dream of being able to play like that.  Share this barking on social media &amp#x27A1;
    • Road Stats Week 18 cc licensed ( BY ) flickr photo shared by cogdogblog As usual, stats through last Thursday posted a tad late! These week includes the gap of time during my falling into a rabbit hole of internet fiction Number of days on the road: 119 Miles Driven: 11,035 Most Recent 1000 mile marker: 11,000 miles, east […] &amp#x27A1;
  • 2008
    • Proud of my Blogging Big Little Sister I’m so proud of my big (cause she’s 6 years older) little (cause she is shorter than me) sister who has taken up blogging in the best way. Having just retired from 30+ years of governemtn work, she and her husband are off on a real adventure. Having been active sail boat explorers up and […] &amp#x27A1;
    • Back in Black ASCII: ACDC Video in Excel Talk about dusting off my memory neurons; one of my first real rock concert experiences was seeing ACDC at some giant venue in DC. The “boys” from down under are still kicking- just found via mashable something really wacky and thus of interest here at CogDogBlog- the first rock video played out in an Excel […] &amp#x27A1;
    • Rock the Academy! image based on Creative Commons licensed flickr photo by Kevin Lim The next NMC Virtual Symposium is Nov 4-6, but early registration ends tomorrow, so don’t miss out. Rock the Academy, the twelfth in the NMC’s Series of Virtual Symposia, will explore the kinds of ideas and activities that are changing the shape of education […] &amp#x27A1;
  • 2006
    • Third Life After 12 straight days of organizing and documenting Second Life activities for the NMC Impact of Digital Media Symposium, I am ready for an upgrade. One things that worked well in this event was &amp#x27A1;
    • Small Presentations Loosely Joined In some sense to parody myself (why not be the first in line?), I am writing here about a “presentation” in its most convoluted, extruded definition I recently unleashed for the K12 Online Conference… this being a request a few months ago from Darren to do a segment on “Basic/Advanced Training”. I started out on […] &amp#x27A1;
  • 2005
    • Feedster Ads in RSS I got an email recently from someone trying to suggest we were inserting adds into a feed displayed with Feed2JS falsely suggested on pappamashkin blog. Nothing could be further from the truth. Heck we do not even insert a credit back link in the free service we provide. But curious, I dug deeper. The culprit […] &amp#x27A1;
    • Big Conference / Nary A Blog Ripple / Spam Nibbles This semester I am taking a complete respite from the usual big ed tech conferences… well, I am taking a break from all of them. The time spent traveling, the cost of travel, really do not balance for the things gained. That said, online conference have yet to really find a niche yet that provides […] &amp#x27A1;
    • Can I Have That in Small, Unmarked Bills Please? Oh, what I would do with $72,000,000 of blog bucks! From How Much Is My Blog Worth?: Inspired by Tristan Louis’s research into the value of each link to Weblogs Inc, I’ve created this little applet using Technorati’s API which computes and displays your blog’s worth using the same link to dollar ratio as the […] &amp#x27A1;
  • 2004
    • Blog Brownout This blog will go into a period of non-activity the next few days as I work on a project requiring me to pretend to be a tourist in the Rocky Mountains. There will not be anything else posted on “project mini vacation”  Share this barking on social media &amp#x27A1;
  • 2003
    • Testing MT-Blacklist Alpha I have been testing an alpha version of the next update to Jay Allen’s MT-Blacklist plugin. The changes coming are impressive and make it easier to filter and easily de-spam weblog crud. You can check and protect both comments and/or trackbacks, and it makes it a one clikc operation. Lots of new options coming in […] &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 *