“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 16 posts previously published on October 25th

  • 2023
    • The Life Cycle, as it Should, Returns to Where It Started Hello blog it’s been a while, and his post has been idling in neutral. Just about everyone has written their bird song post for Twitter. I won’t refer to it by some algebraic like single letter, nor to “The platform previously known as Twitter”- it always was, is, and in death spiral, just silly Twitter. […]
  • 2020
    • Backblogging: The OE Global Work Where did 7 months go? In January and February of this year, my consulting work was getting worrisome t-h-i-n. Starting in March, though, things picked up. A lot. And I’ve been behind on blogging about much of it. Gotta pick up the blog. Sometime before March I got a message from Paul Stacey, who I’ve […]
  • 2018
    • Twitter Life Cycle reclaimed from Wikispaces Self Annihilation There’s little end in sight for fixing all the dead links I have to Content Previously Housed on Wikispaces since they went and pooped their own web bed. Another one today when Ken Bauer tweeted an old image: Working on finding the original but this is better. #Conisoft2018 pic.twitter.com/YQ3Z251AMj — Ken Bauer Favel (@ken_bauer) October […]
  • 2017
    • Your Licenses? Frankly My Dear… I may be entering my curmudgeon era. On recent conversations with ed-tech friends, one in person, one by email, I recognize there are many things in our field that are likely very important, that, frankly I don’t give a damn about. These are things important to others that I find myself totally uninterested in: Virtual […]
  • 2016
    • What if YouTube Was Run By People Who Know Internet Search? Of course I am being facetious. This is CogDogBlog after all. And yes, we mostly all know who owns YouTube. But for being the company that pretty much rose like a behemoth from the litter of Altavista, Lycos, Ask Jeeves, Yahoo, Web Crawler, Dogpile (my favorite name), why is the search functionality in YouTube so… […]
  • 2015
    • Adding on to Removed as a Daily Create A big hat tip to Mariana Funes for cleverly taking an idea for a DS106 Daily Create into the next level of interestingness. The one for TDC 1384 is called just “Removed”: US photographer Eric Pickersgill created “Removed” a series of powerful black and white photos. Inspired by this, your prompt for today comes from […]
    • Seeking VConnecting Buddies for EDUCAUSE 2015 Over the past year, what started as a small experiment to extend the presence of academic conferences beyond the badged entrance to those who cannot attend, has grown into a cool collaborative loosely organized project called Virtually Connecting. Many people have been joining in and the Slack channel is constantly buzzing. This is not about […]
  • 2011
    • Honestly! My iPhone Jumped Out of My Hand I swear, honestly, this really happened to me yesterday. What can a swear on a stack of? On the trip from Daniel Boone National Forest (Kentucky) headed towards Blacksburg, Virginia, I enjoyed some beautiful two lane driving over the autumn doused mountains. cc licensed ( BY ) flickr photo shared by cogdogblog Heading west to […]
  • 2009
    • Camden Yards Tilt Shifted cc licensed flickr photo shared by cogdogblog On a recent flight I got to playing around with the TiltShift iPhone app, a really fun way to do convert normal photos to something that looks like a miniature train set like model by a clever blur that imposes a false depth of field, and yanking up […]
    • “What Language is That?” cc licensed flickr photo shared by cogdogblog I went to the local Chili Cook Off contest today wearing my Open Education 2009 conference t-shirt with this logo. One local guy dishing out his chili looked at it and asked me, "What language is that written in?" I was stunned a moment, trying to sort out […]
  • 2008
    • WP LastPosts: Cause I Keep Forgetting My Own URLs I just whipped up the puniest of WordPress hacks for the ultimate reasons, to serve myself. If I knew what I was doing, it would be a plugin, but I’ll leave that as an exercise for the reader. Here’s the thing. Whenever I write something, i like to reference by link a previous post. So […]
    • No Political Posts at CogDogBlog As a rule (and you know how rules go), the editorial team at CogDogBlog does not delve into political posts, we are too busy pursuing weird web sites and complaining about important things. And certainly the current political election has been an ultra marathon, and I, will miss the finish line while I am in […]
    • Peering Through MarketSpeak at Veeple- Annotated Hyperlinked Video In looking for interesting technologies, sometimes you have to forge past what at looks like something hardly relevant to education, much the case with what I think is a powerful form of web video technology in Veeple. I stumpled upon this literally about two links of some casual wandering down my RSS feeds. As an […]
  • 2006
    • Linktribution I am about zero for life ([1], [2]) starting an internet meme, but some folks had a nice reaction today to a word I made up 😉 It happened today, during a session on Remix Culture: Building a Digital Divide Between Students and Teachers at the NMC Online Conference. The backchannel chat was bubbling out […]
  • 2005
    • Web 0.02 While updating one of our projects and searching for web links to a mentioned organization, I came across a site proudly displaying this lovely disclaimer: Needless to say, no content beyond the patheticly sad home page was rendered in FireFox (or Safari). Someone please load up a gun with some Zeldman and squeeze the trigger. […]
  • 2003
    • Syndicating “Best of Show” I’ve took a little twist on RSS to deploy it in another fashion here at CDB. This was partly to response to a post by James Farmer as he tried to find an alternative approach to blogrolling. Maybe not understanding Radio as much as I should, I commented that it might be feasible to create […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 16 posts previously published on October 25th

  • 2023
    • The Life Cycle, as it Should, Returns to Where It Started Hello blog it’s been a while, and his post has been idling in neutral. Just about everyone has written their bird song post for Twitter. I won’t refer to it by some algebraic like single letter, nor to “The platform previously known as Twitter”- it always was, is, and in death spiral, just silly Twitter. […] &amp#x27A1;
  • 2020
    • Backblogging: The OE Global Work Where did 7 months go? In January and February of this year, my consulting work was getting worrisome t-h-i-n. Starting in March, though, things picked up. A lot. And I’ve been behind on blogging about much of it. Gotta pick up the blog. Sometime before March I got a message from Paul Stacey, who I’ve […] &amp#x27A1;
  • 2018
    • Twitter Life Cycle reclaimed from Wikispaces Self Annihilation There’s little end in sight for fixing all the dead links I have to Content Previously Housed on Wikispaces since they went and pooped their own web bed. Another one today when Ken Bauer tweeted an old image: Working on finding the original but this is better. #Conisoft2018 pic.twitter.com/YQ3Z251AMj — Ken Bauer Favel (@ken_bauer) October […] &amp#x27A1;
  • 2017
    • Your Licenses? Frankly My Dear… I may be entering my curmudgeon era. On recent conversations with ed-tech friends, one in person, one by email, I recognize there are many things in our field that are likely very important, that, frankly I don’t give a damn about. These are things important to others that I find myself totally uninterested in: Virtual […] &amp#x27A1;
  • 2016
    • What if YouTube Was Run By People Who Know Internet Search? Of course I am being facetious. This is CogDogBlog after all. And yes, we mostly all know who owns YouTube. But for being the company that pretty much rose like a behemoth from the litter of Altavista, Lycos, Ask Jeeves, Yahoo, Web Crawler, Dogpile (my favorite name), why is the search functionality in YouTube so… […] &amp#x27A1;
  • 2015
    • Adding on to Removed as a Daily Create A big hat tip to Mariana Funes for cleverly taking an idea for a DS106 Daily Create into the next level of interestingness. The one for TDC 1384 is called just “Removed”: US photographer Eric Pickersgill created “Removed” a series of powerful black and white photos. Inspired by this, your prompt for today comes from […] &amp#x27A1;
    • Seeking VConnecting Buddies for EDUCAUSE 2015 Over the past year, what started as a small experiment to extend the presence of academic conferences beyond the badged entrance to those who cannot attend, has grown into a cool collaborative loosely organized project called Virtually Connecting. Many people have been joining in and the Slack channel is constantly buzzing. This is not about […] &amp#x27A1;
  • 2011
    • Honestly! My iPhone Jumped Out of My Hand I swear, honestly, this really happened to me yesterday. What can a swear on a stack of? On the trip from Daniel Boone National Forest (Kentucky) headed towards Blacksburg, Virginia, I enjoyed some beautiful two lane driving over the autumn doused mountains. cc licensed ( BY ) flickr photo shared by cogdogblog Heading west to […] &amp#x27A1;
  • 2009
    • Camden Yards Tilt Shifted cc licensed flickr photo shared by cogdogblog On a recent flight I got to playing around with the TiltShift iPhone app, a really fun way to do convert normal photos to something that looks like a miniature train set like model by a clever blur that imposes a false depth of field, and yanking up […] &amp#x27A1;
    • “What Language is That?” cc licensed flickr photo shared by cogdogblog I went to the local Chili Cook Off contest today wearing my Open Education 2009 conference t-shirt with this logo. One local guy dishing out his chili looked at it and asked me, "What language is that written in?" I was stunned a moment, trying to sort out […] &amp#x27A1;
  • 2008
    • WP LastPosts: Cause I Keep Forgetting My Own URLs I just whipped up the puniest of WordPress hacks for the ultimate reasons, to serve myself. If I knew what I was doing, it would be a plugin, but I’ll leave that as an exercise for the reader. Here’s the thing. Whenever I write something, i like to reference by link a previous post. So […] &amp#x27A1;
    • No Political Posts at CogDogBlog As a rule (and you know how rules go), the editorial team at CogDogBlog does not delve into political posts, we are too busy pursuing weird web sites and complaining about important things. And certainly the current political election has been an ultra marathon, and I, will miss the finish line while I am in […] &amp#x27A1;
    • Peering Through MarketSpeak at Veeple- Annotated Hyperlinked Video In looking for interesting technologies, sometimes you have to forge past what at looks like something hardly relevant to education, much the case with what I think is a powerful form of web video technology in Veeple. I stumpled upon this literally about two links of some casual wandering down my RSS feeds. As an […] &amp#x27A1;
  • 2006
    • Linktribution I am about zero for life ([1], [2]) starting an internet meme, but some folks had a nice reaction today to a word I made up 😉 It happened today, during a session on Remix Culture: Building a Digital Divide Between Students and Teachers at the NMC Online Conference. The backchannel chat was bubbling out […] &amp#x27A1;
  • 2005
    • Web 0.02 While updating one of our projects and searching for web links to a mentioned organization, I came across a site proudly displaying this lovely disclaimer: Needless to say, no content beyond the patheticly sad home page was rendered in FireFox (or Safari). Someone please load up a gun with some Zeldman and squeeze the trigger. […] &amp#x27A1;
  • 2003
    • Syndicating “Best of Show” I’ve took a little twist on RSS to deploy it in another fashion here at CDB. This was partly to response to a post by James Farmer as he tried to find an alternative approach to blogrolling. Maybe not understanding Radio as much as I should, I commented that it might be feasible to create […] &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 *