“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 25 posts previously published on May 5th

  • 2022
    • 19 Years on the 19th Am I off my blog game or what? Can I blame Musk? Nahhh. D’Arcy Norman is on his game, and he observed how old his blog is– 20 years! That was my nudge to check my own blog birth stamp, and find, as often in my career I copied Mr Norman (soon to be Dr?). […]
  • 2018
    • Weaving New SPLOT Features I do take requests for SPLOT features; the whole evolution of them has been propelled by ideas people have sent me. Readers should ask, “What The Hell is a SPLOT?” Good question, I have a SPLOT that answers that question (google recursion). Before plopping the details, I should acknowledge Reclaim Hosting for starting in April, […]
  • 2017
    • Alchemy Us This is the end, though not the end at all, and we have a little informal rule about not using terminating language, of the story of Networked Narratives, a course, and much more than a course. I start here, standing quietly in the dark, in a closet-like room adjacent to the classroom at Kean University […]
  • 2016
    • Making Something From Certification Exam Exhaust I’m doing some prep work for next week’s Washington D.C. meeting (first one) for the Creative Commons Certification project I am now working on, where we are tasked at looking at a range of existing certifications, train the trainer programs to “remix” the best features into a possible vision for what we hope to build. […]
  • 2015
    • Conversations (and Photo Adventures) With Carl Berger Bad Alan. This has been lingering in the to do pile too long. On my route home from Canada last month, I made it a specific point to make my last stop in St George Utah, to visit Carl Berger. He’s been retired from University of Michigan for some time, but that does not mean […]
    • ¿Hay un ágora en Guadalajara? I have fallen in love. With a city. Well, it may have been more of a whirlwind romance last week in Guadalajara, Mexico. But we get to date again in July an December. How this all happened is one of those series of unlikely fortunate chains of serendipity, going back a few months to my […]
  • 2013
    • That Old Maverick Oh how fond is my memory of that 1973 Ford Maverick I drove out to Arizona from Baltimore, it went to the lowest elevations and up into the White Mountains of eastern California. In 1988 I traded it in when I bought a Chevy S-10 pickup. I think they gave me $300 for Martin the […]
  • 2011
    • Story a Day May #5: Five Carded Past 11 I’ve got a busy day here in the Largish Apple, but not too busy that I cannot do a short digital story while sipping coffee. Today, it is using my own Five Card Flickr Stories to weave one from random ds106 flickr photos. Make one yourself! Five Card Story: Webbed Up Past 11 a ds106 […]
  • 2010
    • Loose the Moose cc licensed flickr photo shared by Bachir It’s time! Let ’em loose! Tomorrow I’m on my way to Vancouver for Northern Voice 2010, which, if I may state subtly, is the best fracking conference in the uni-verse. My first fest was 2006, and I’ve been there for 2008, 2009, and now, 2010 “the Post Olympiad” […]
  • 2009
    • Big Cat in Ed Tech 2009/365/125 Yeah That Lion by cogdogblog posted 5 May ’09, 7.36pm MDT PST on flickr After today’s presentations at Penn State, I walked around the corner, and stood face to face with Mr Nittany. Ironic as I borrowed him for the example story prompt in today’s talk on 50+ Web 2.0 Ways to Tell a […]
    • Scoping Out Penn State 2009/365/123 Scoping Out Old Main by cogdogblog posted 3 May ’09, 2.49pm MDT PST on flickr Penn State University- a lovely campus even on a grey rainy day. In a 3 day visit it’s not even close to possible to take in a place like Penn State University. I’d like to say there is a […]
  • 2008
    • TwitterCamp Flies Again.. I Love This Web Thing For the 10 gazillionth time the network (as in the people I am connected to) saves the day again. For some upcoming presentations and conferences, I was hoping to set up TwitterCamp, a desktop app (Mac and PC) that runs in Adobe Air and displays in near real time the incoming tweets for a specific […]
  • 2006
    • Cocommenting On The Rise Or? Cocomment is an interesting web technology that does some neat things but perhaps is not so wide it used to reach a next level of progress. It acts as a service of sorts, to tackle the age old (or 3 year old) problem of not knowing what happens to the “conversations” you leave as comments […]
    • Warnock’s Dilemma and Variants By sheer acts of curious link following, I ended up today learning about Warnock’s Dilemma via Classy’s Kitchen: Warnock’s Dilemma is the situation you face when people don’t comment on your postings: The problem with no response is that there are five possible interpretations: 1. The post is correct, well-written information that needs no follow-up […]
    • My Technorati Feed Smokes Crack Well, not exactly true. I made it up for the purposes of sensationalism. I have a fair idea what Technorati does at a conceptual level, and used it in the past for things like conferences where bloggers may actually use the same tag. Their data lets us know the blogosphere is expanding at a rate […]
  • 2005
    • First Non Maricopa MLX Peek I have been habitually behind in getting our open Source Maricopa Learning eXchange (MLX) into shape for others to use. As some have chided me, there is not much up at SourceForge but a place holder. We have an open demo version that will fold in the new changes as they continue to develop; but […]
    • The Emperor’s New VidCast / VidPod While I am in love with my ipod and am not more intrigued by podcasts than my previous ramblings, I am not one who is taking the leap of assumption that the next great thing is going to be “video” iPods and “VideoCasts”. Nope, I am not convinced at all. I can easily be wrong, […]
    • iLove myPod flickr foto iLove myPodavailable on my flickr I am in love with my iPod Shuffle. Is that sick? I cannot say how cool the little Shuffle is, The experience of biking to work is like a brand new one, and I can even manage to get some joy out of running (which I hate doing). […]
  • 2004
    • Teaching Wiki (Now there’s the beef!) Joe Moxley, English faculty at the University of South Florida created Teaching Wiki, rolling with a good set of examples and specific ideas of how teachers and students might (and are) using wikis: Teaching Wiki aspires to be a community for college-level faculty. We imagine our primary audience to be faculty who are interested in […]
    • Grab Book Page 23 Sentence 5 Meme Spreading to a blog near you: 1. Grab the nearest book. 2. Open the book to page 23. 3. Find the fifth sentence. 4. Post the text of the sentence in your journal along with these instructions. Okay, here goes. I have a copy of Clifford Stoll’s Silicon Snake Oil that I picked up for […]
    • How about some Zempt! for your MovableType Blog Writing Maybe people tire of blogging not because of lack of things to write about, but Interface Fatigue?? Back and forth from the MovableType editing screens, wating for those CGIs to pop, makes one s-l-e-e-p-y… Another stumbling along the blog roads came up with a link to a new desktop editor for MT bloggers- Zempt. I […]
    • Our Motto And now for something completely irrelevant, but dear our heart (see our blog top tagline): Found at Red Ferret’s Dog Blog by way of Smartmobs. But what serendipity again. The Red Ferret Journal is rich with images and cool toys. Better furl it now. The Ferret is a weblog which looks at gadgets, software, web […]
    • openMLX May will be “MLX” month. Or “Mad Mad Mad” month. We will be madly tinkering to try and ready an open source version of the Maricopa Learning eXchange (MLX). It has not been of lack of interest that has kept this from happening, but shortage of time, staff (we are a team of 1.5 developers […]
  • 2003
    • Learing Objects Discovery Workshop An online workshop from Australia’s NET*Working 2002 conference (Ozzies know how to run a great online conference, I have participated in this one was as well as th eone from 2000) designed as an introduction to LOs.  Share this barking on social media
    • RSS Feeds into Blackboard Not to be outdone by Brian (Displaying RSS Feeds in WebCT), I found a niche of time to do the same proof of concept in Blackboard.  Share this barking on social media
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 25 posts previously published on May 5th

  • 2022
    • 19 Years on the 19th Am I off my blog game or what? Can I blame Musk? Nahhh. D’Arcy Norman is on his game, and he observed how old his blog is– 20 years! That was my nudge to check my own blog birth stamp, and find, as often in my career I copied Mr Norman (soon to be Dr?). […] &amp#x27A1;
  • 2018
    • Weaving New SPLOT Features I do take requests for SPLOT features; the whole evolution of them has been propelled by ideas people have sent me. Readers should ask, “What The Hell is a SPLOT?” Good question, I have a SPLOT that answers that question (google recursion). Before plopping the details, I should acknowledge Reclaim Hosting for starting in April, […] &amp#x27A1;
  • 2017
    • Alchemy Us This is the end, though not the end at all, and we have a little informal rule about not using terminating language, of the story of Networked Narratives, a course, and much more than a course. I start here, standing quietly in the dark, in a closet-like room adjacent to the classroom at Kean University […] &amp#x27A1;
  • 2016
    • Making Something From Certification Exam Exhaust I’m doing some prep work for next week’s Washington D.C. meeting (first one) for the Creative Commons Certification project I am now working on, where we are tasked at looking at a range of existing certifications, train the trainer programs to “remix” the best features into a possible vision for what we hope to build. […] &amp#x27A1;
  • 2015
    • Conversations (and Photo Adventures) With Carl Berger Bad Alan. This has been lingering in the to do pile too long. On my route home from Canada last month, I made it a specific point to make my last stop in St George Utah, to visit Carl Berger. He’s been retired from University of Michigan for some time, but that does not mean […] &amp#x27A1;
    • ¿Hay un ágora en Guadalajara? I have fallen in love. With a city. Well, it may have been more of a whirlwind romance last week in Guadalajara, Mexico. But we get to date again in July an December. How this all happened is one of those series of unlikely fortunate chains of serendipity, going back a few months to my […] &amp#x27A1;
  • 2013
    • That Old Maverick Oh how fond is my memory of that 1973 Ford Maverick I drove out to Arizona from Baltimore, it went to the lowest elevations and up into the White Mountains of eastern California. In 1988 I traded it in when I bought a Chevy S-10 pickup. I think they gave me $300 for Martin the […] &amp#x27A1;
  • 2011
    • Story a Day May #5: Five Carded Past 11 I’ve got a busy day here in the Largish Apple, but not too busy that I cannot do a short digital story while sipping coffee. Today, it is using my own Five Card Flickr Stories to weave one from random ds106 flickr photos. Make one yourself! Five Card Story: Webbed Up Past 11 a ds106 […] &amp#x27A1;
  • 2010
    • Loose the Moose cc licensed flickr photo shared by Bachir It’s time! Let ’em loose! Tomorrow I’m on my way to Vancouver for Northern Voice 2010, which, if I may state subtly, is the best fracking conference in the uni-verse. My first fest was 2006, and I’ve been there for 2008, 2009, and now, 2010 “the Post Olympiad” […] &amp#x27A1;
  • 2009
    • Big Cat in Ed Tech 2009/365/125 Yeah That Lion by cogdogblog posted 5 May ’09, 7.36pm MDT PST on flickr After today’s presentations at Penn State, I walked around the corner, and stood face to face with Mr Nittany. Ironic as I borrowed him for the example story prompt in today’s talk on 50+ Web 2.0 Ways to Tell a […] &amp#x27A1;
    • Scoping Out Penn State 2009/365/123 Scoping Out Old Main by cogdogblog posted 3 May ’09, 2.49pm MDT PST on flickr Penn State University- a lovely campus even on a grey rainy day. In a 3 day visit it’s not even close to possible to take in a place like Penn State University. I’d like to say there is a […] &amp#x27A1;
  • 2008
    • TwitterCamp Flies Again.. I Love This Web Thing For the 10 gazillionth time the network (as in the people I am connected to) saves the day again. For some upcoming presentations and conferences, I was hoping to set up TwitterCamp, a desktop app (Mac and PC) that runs in Adobe Air and displays in near real time the incoming tweets for a specific […] &amp#x27A1;
  • 2006
    • Cocommenting On The Rise Or? Cocomment is an interesting web technology that does some neat things but perhaps is not so wide it used to reach a next level of progress. It acts as a service of sorts, to tackle the age old (or 3 year old) problem of not knowing what happens to the “conversations” you leave as comments […] &amp#x27A1;
    • Warnock’s Dilemma and Variants By sheer acts of curious link following, I ended up today learning about Warnock’s Dilemma via Classy’s Kitchen: Warnock’s Dilemma is the situation you face when people don’t comment on your postings: The problem with no response is that there are five possible interpretations: 1. The post is correct, well-written information that needs no follow-up […] &amp#x27A1;
    • My Technorati Feed Smokes Crack Well, not exactly true. I made it up for the purposes of sensationalism. I have a fair idea what Technorati does at a conceptual level, and used it in the past for things like conferences where bloggers may actually use the same tag. Their data lets us know the blogosphere is expanding at a rate […] &amp#x27A1;
  • 2005
    • First Non Maricopa MLX Peek I have been habitually behind in getting our open Source Maricopa Learning eXchange (MLX) into shape for others to use. As some have chided me, there is not much up at SourceForge but a place holder. We have an open demo version that will fold in the new changes as they continue to develop; but […] &amp#x27A1;
    • The Emperor’s New VidCast / VidPod While I am in love with my ipod and am not more intrigued by podcasts than my previous ramblings, I am not one who is taking the leap of assumption that the next great thing is going to be “video” iPods and “VideoCasts”. Nope, I am not convinced at all. I can easily be wrong, […] &amp#x27A1;
    • iLove myPod flickr foto iLove myPodavailable on my flickr I am in love with my iPod Shuffle. Is that sick? I cannot say how cool the little Shuffle is, The experience of biking to work is like a brand new one, and I can even manage to get some joy out of running (which I hate doing). […] &amp#x27A1;
  • 2004
    • Teaching Wiki (Now there’s the beef!) Joe Moxley, English faculty at the University of South Florida created Teaching Wiki, rolling with a good set of examples and specific ideas of how teachers and students might (and are) using wikis: Teaching Wiki aspires to be a community for college-level faculty. We imagine our primary audience to be faculty who are interested in […] &amp#x27A1;
    • Grab Book Page 23 Sentence 5 Meme Spreading to a blog near you: 1. Grab the nearest book. 2. Open the book to page 23. 3. Find the fifth sentence. 4. Post the text of the sentence in your journal along with these instructions. Okay, here goes. I have a copy of Clifford Stoll’s Silicon Snake Oil that I picked up for […] &amp#x27A1;
    • How about some Zempt! for your MovableType Blog Writing Maybe people tire of blogging not because of lack of things to write about, but Interface Fatigue?? Back and forth from the MovableType editing screens, wating for those CGIs to pop, makes one s-l-e-e-p-y… Another stumbling along the blog roads came up with a link to a new desktop editor for MT bloggers- Zempt. I […] &amp#x27A1;
    • Our Motto And now for something completely irrelevant, but dear our heart (see our blog top tagline): Found at Red Ferret’s Dog Blog by way of Smartmobs. But what serendipity again. The Red Ferret Journal is rich with images and cool toys. Better furl it now. The Ferret is a weblog which looks at gadgets, software, web […] &amp#x27A1;
    • openMLX May will be “MLX” month. Or “Mad Mad Mad” month. We will be madly tinkering to try and ready an open source version of the Maricopa Learning eXchange (MLX). It has not been of lack of interest that has kept this from happening, but shortage of time, staff (we are a team of 1.5 developers […] &amp#x27A1;
  • 2003
    • Learing Objects Discovery Workshop An online workshop from Australia’s NET*Working 2002 conference (Ozzies know how to run a great online conference, I have participated in this one was as well as th eone from 2000) designed as an introduction to LOs.  Share this barking on social media &amp#x27A1;
    • RSS Feeds into Blackboard Not to be outdone by Brian (Displaying RSS Feeds in WebCT), I found a niche of time to do the same proof of concept in Blackboard.  Share this barking on social media &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 *