“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 17 posts previously published on October 15th

  • 2021
    • Wrangling an Online Conference in the Discourse Platform Last week this time I was just sliding off of adrenaline mountain after my Open Education Global colleagues and I ended the week long OEGlobal 2021 Conference. I’ve railed long and repeatedly here about the conference format, but then again when it’s your own affair, it’s different. And I like almost all others I hear […]
  • 2019
    • Reclaim or Be Reclaimed From free web sites biting the dust to the rise of the deleters the web is one precarious pile of links. My lonely ongoing struggle has been preserving the webs I’m responsible for, which could be a full time job if it paid anything. One of the more shameful, thanks for creating all this web […]
    • Grandma’s Indefinite Birthday The calendar reminder today, October 15, is rather precise. My grandmother would have been 114 today. So it’s one of the reasons I love and miss her stories, is that she never knew for sure the exact day of her birth. How is that possible? Things were rather different in 1905, in urban Newark, New […]
  • 2018
    • This Old Catfish I pretty much gave up on writing about and hoping that writing about catfishing might have some impact (yup just checked, more than 2 years since last post on it). Of course that hardly means that anything has changed; the scamming of people luring into false romance contact using my photos on fake profiles and […]
  • 2016
    • Maybe 100 Years Ago My Grandmother Learned to Play Piano According to a calendar, today my grandmother should be celebrating her 111th birthday, such a symmetrical (and big) number. I will do it for her. One of my favorite stories she told was of not having a birth certificate, but as an adult, she was able to get one from census records that provided enough […]
  • 2015
  • 2014
    • Packed! This Hound is Kamloops Bound creative commons licensed ( BY-NC-ND ) flickr photo shared by alee_04 The suitcases are packed with winter clothes and secured. Computer gear? Check. Camera Stuff? Ditto. Guitar? Got it. Medical supplies (well what my lame oh insurance will provide)? Yep. iPod? Loaded. Having been home a whole five days after two weeks in New Zealand, […]
    • How Does It Feel to Be 107, Grandma? My grandmother was born today, in 1907. Or sometime around this date. One of her stories is that she never had a birth certificate. Born into a large family, and with her Mom passing away when grandma was a child, there was no official birth record. At some time later, she was able to prove […]
    • On Those Old Webs creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog I’m reading with warm nostalgia Andy Carvin’s celebrating 20 years ago today, I published my first website. But the real epiphany came afterwards. Andy did this as a post-grad internship, studying telecommunications policy and finding his way into the early Cambrian era of the […]
  • 2013
    • memorable / unmemorable I am humbly honored to have been part of a stellar invited panel for Monday’s Minding The Future event at the University of Mary Washington (I don’t mind it at all BTW). Along with Audrey Watters, Kin Lane (first time meeting, he is a genius), David Wiley, and Gardner Campbell (subbing eminently for Jon Udell, […]
  • 2011
    • Dispatch from Somewhere Hello everyone, I appreciate the concern and worry from the tweets sent over the last 36 hours. I am ok, and at least have had some communication with the people who brought me to this place. I think. This is somehow connected to the computer issues I have been having, I am thinking I have […]
  • 2008
    • If a Houseplant can Blog… A japanese houseplant has its own blog, and updates it on a regular basis: If houseplants could blog, what would they say? To find out, Kamakura-based IT company KAYAC Co., Ltd. has developed a sophisticated botanical interface system that lets plants post their thoughts online. A succulent Sweetheart Hoya (Hoya kerii) named “Midori-san” is now […]
  • 2006
    • Wikispace Wonkiness? Is it just me or is anyone else having trouble accessing their Wikispaces sites? I am scrammbling to post content for a session I am doing next week for the K12 Online Conference, and for the last few days, Wikispaces is unable to keep track of any of my wikis- in editing, I am asked […]
  • 2004
    • PowerPointLess: Eric Meyer’s Full-On CSS Slide Show I think I got here via scanning RSS from Roland Tanglao – one of the Gods of Explaining CSS to Mere Mortals, Eric Meyer has rolled out a nifty way to assemble a presentation without any touching and software from Redmond. S5 is a fully web standards compliant XHMTL slide show creator- you can assemble […]
    • Ocotillo Spotlight on Media Services Another arm of our Ocotillo is the Spotlight on Instructional Technology where we try and highlight once a month an interesting use of technology at each of our colleges. We ask a rep from each college’s technology group to provide text and photos for a story, but sometimes it just takes a long time to […]
    • October Online Learning Group Catchup Our Ocotillo Online Learning Group meetings have really taken off nicely this year. This group, now its fifth year, began as a “Blackboard Users Group” but we have broadened it to include demos and exchanges for people using any sort of online technology. I recall in the old days a few meetings with an audience […]
  • 2003
    • Derivative or Relating MLX Packages I am just trying to flesh out a new idea for the Maricopa Learning eXchange. Since we have now real stories of how our faculty are using and modifying MLX content. I am hoping we can set up some new tools that can allow someone to create a new MLX item, and add that it […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 17 posts previously published on October 15th

  • 2021
    • Wrangling an Online Conference in the Discourse Platform Last week this time I was just sliding off of adrenaline mountain after my Open Education Global colleagues and I ended the week long OEGlobal 2021 Conference. I’ve railed long and repeatedly here about the conference format, but then again when it’s your own affair, it’s different. And I like almost all others I hear […] &amp#x27A1;
  • 2019
    • Reclaim or Be Reclaimed From free web sites biting the dust to the rise of the deleters the web is one precarious pile of links. My lonely ongoing struggle has been preserving the webs I’m responsible for, which could be a full time job if it paid anything. One of the more shameful, thanks for creating all this web […] &amp#x27A1;
    • Grandma’s Indefinite Birthday The calendar reminder today, October 15, is rather precise. My grandmother would have been 114 today. So it’s one of the reasons I love and miss her stories, is that she never knew for sure the exact day of her birth. How is that possible? Things were rather different in 1905, in urban Newark, New […] &amp#x27A1;
  • 2018
    • This Old Catfish I pretty much gave up on writing about and hoping that writing about catfishing might have some impact (yup just checked, more than 2 years since last post on it). Of course that hardly means that anything has changed; the scamming of people luring into false romance contact using my photos on fake profiles and […] &amp#x27A1;
  • 2016
    • Maybe 100 Years Ago My Grandmother Learned to Play Piano According to a calendar, today my grandmother should be celebrating her 111th birthday, such a symmetrical (and big) number. I will do it for her. One of my favorite stories she told was of not having a birth certificate, but as an adult, she was able to get one from census records that provided enough […] &amp#x27A1;
  • 2015
  • 2014
    • Packed! This Hound is Kamloops Bound creative commons licensed ( BY-NC-ND ) flickr photo shared by alee_04 The suitcases are packed with winter clothes and secured. Computer gear? Check. Camera Stuff? Ditto. Guitar? Got it. Medical supplies (well what my lame oh insurance will provide)? Yep. iPod? Loaded. Having been home a whole five days after two weeks in New Zealand, […] &amp#x27A1;
    • How Does It Feel to Be 107, Grandma? My grandmother was born today, in 1907. Or sometime around this date. One of her stories is that she never had a birth certificate. Born into a large family, and with her Mom passing away when grandma was a child, there was no official birth record. At some time later, she was able to prove […] &amp#x27A1;
    • On Those Old Webs creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog I’m reading with warm nostalgia Andy Carvin’s celebrating 20 years ago today, I published my first website. But the real epiphany came afterwards. Andy did this as a post-grad internship, studying telecommunications policy and finding his way into the early Cambrian era of the […] &amp#x27A1;
  • 2013
    • memorable / unmemorable I am humbly honored to have been part of a stellar invited panel for Monday’s Minding The Future event at the University of Mary Washington (I don’t mind it at all BTW). Along with Audrey Watters, Kin Lane (first time meeting, he is a genius), David Wiley, and Gardner Campbell (subbing eminently for Jon Udell, […] &amp#x27A1;
  • 2011
    • Dispatch from Somewhere Hello everyone, I appreciate the concern and worry from the tweets sent over the last 36 hours. I am ok, and at least have had some communication with the people who brought me to this place. I think. This is somehow connected to the computer issues I have been having, I am thinking I have […] &amp#x27A1;
  • 2008
    • If a Houseplant can Blog… A japanese houseplant has its own blog, and updates it on a regular basis: If houseplants could blog, what would they say? To find out, Kamakura-based IT company KAYAC Co., Ltd. has developed a sophisticated botanical interface system that lets plants post their thoughts online. A succulent Sweetheart Hoya (Hoya kerii) named “Midori-san” is now […] &amp#x27A1;
  • 2006
    • Wikispace Wonkiness? Is it just me or is anyone else having trouble accessing their Wikispaces sites? I am scrammbling to post content for a session I am doing next week for the K12 Online Conference, and for the last few days, Wikispaces is unable to keep track of any of my wikis- in editing, I am asked […] &amp#x27A1;
  • 2004
    • PowerPointLess: Eric Meyer’s Full-On CSS Slide Show I think I got here via scanning RSS from Roland Tanglao – one of the Gods of Explaining CSS to Mere Mortals, Eric Meyer has rolled out a nifty way to assemble a presentation without any touching and software from Redmond. S5 is a fully web standards compliant XHMTL slide show creator- you can assemble […] &amp#x27A1;
    • Ocotillo Spotlight on Media Services Another arm of our Ocotillo is the Spotlight on Instructional Technology where we try and highlight once a month an interesting use of technology at each of our colleges. We ask a rep from each college’s technology group to provide text and photos for a story, but sometimes it just takes a long time to […] &amp#x27A1;
    • October Online Learning Group Catchup Our Ocotillo Online Learning Group meetings have really taken off nicely this year. This group, now its fifth year, began as a “Blackboard Users Group” but we have broadened it to include demos and exchanges for people using any sort of online technology. I recall in the old days a few meetings with an audience […] &amp#x27A1;
  • 2003
    • Derivative or Relating MLX Packages I am just trying to flesh out a new idea for the Maricopa Learning eXchange. Since we have now real stories of how our faculty are using and modifying MLX content. I am hoping we can set up some new tools that can allow someone to create a new MLX item, and add that it […] &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 *