“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 March 28th

  • 2021
    • Playing Clue with Professor WordPress for #PressEdConf21 On Thursday I managed to do a presentation for the 2021 PressEd Conference (WordPress in Education) at the same time I was co-hosting a BCcampus H5P Kitchen webinar. The former was easy because of the refreshingly unique mode of this conference as all “presentations” are done as a series of tweets in a 15 minute […]
  • 2018
    • Digg Shrugg Talk about recursive web history… Digg Reader bit the dust this week, five years after it came to be in the aftermath of Google burying its own RSS reader. I won’t even search my own blog, I know there are many rants about Google’s decision. Yet on seeing the notice just two weeks ago that […]
  • 2017
    • For #OpenEducationWk Take a CC Certification Unit for a Test Drive During our recent project team meeting we had an idea to share the status of the Creative Commons Certification for Open Education Week: You are free to browse the current completed Core Certification units published here in WordPress or the same source content that originates in GitHub. But we are asking as one that fits […]
  • 2016
    • Playing With Programmable URLs One of my weird hobbies is figuring out web tools I can manipulate from just changing something in the URL. In my just ranted piece on Instagram I sought out a thing that would tell me when in time a certain date was that was like 247 weeks ago. Research Maniacs had just the thing, […]
    • Instagrump: Share Give Away Photos You Cannot Find, Search, or License In the affirming spirit of the US elections, let’s talk about winning. By the metrics of internet success, one might say that Instagram pretty much is winning the photo sharing corner of the internet. Gulp their own sheer numbers: Instagram should be the poster child for what Mike Caulfield characterizes as StreamMode: I’ve been talking […]
  • 2013
    • Coming Soon to TCC 2013: The ds106 Show I’m bringing ds106 to the 2013 TCC Online Conference (the 18th Annual “Technology, Colleges and Community” Online Conference). This keynote session (look at my along side Terry Anderson, I cannot wait for some of his trademark jokes) is listed as Dim the Lights: The ds106 Show. My original thought was to build a presentation metaphor […]
  • 2012
    • No MOOC Respect When I was a kid I got no respect. When my parents got divorced there was a custody fight over me… and no one showed up. MOOCs are on fire. They are a tool for democratizing education. They are crumbling the Higher Education Monopoly. And you know what hear? Stanford. Udacity. MIT. Massive. Numbers. And […]
    • teh awesome ds106 video work My wild ride of teaching ds106 has been a bit like riding a crazy horse on speed. We are in the intense part of the course where students are working in video, and while they talk about how hard/challenging it is, I am seeing in many of them that fiery drive to create. In already […]
    • YouTube Genres cc licensed ( BY NC ND ) flickr photo shared by francescominciotti From YouTube Press Stats 60 hours of video are uploaded every minute, or one hour of video is uploaded to YouTube every second. 70% of YouTube traffic comes from outside the US In 2011, YouTube had more than 1 trillion views or almost […]
  • 2010
    • Join Me- Ban Spam Supporters Ubiquity Hosting From Your Sites I am not a happy pup. The volume of blog comment spam coming into my quiet little dog house is has reached DEFCON 4 on the scale of annoyance. So I am taking action against one company, Ubiquity Server Solutions which coddles spammers (see the updates and comments below- I cannot stand by this initial […]
  • 2006
    • Spammer Leaks Secret Among the cleanup I am doing here is continual emptying of the comment spam on a site I created, blogged about, but will not link directly, but it is more or less a publication, perhaps even, a “forum” that “i” created at MCLI. But I am not writing about the content. Nooooooooo, when would I […]
    • Blog + Furl + RSS: Cinema Class Glu’d Where did all the conversations go about “EduGlu” apps? Maybe people are doing it rather than writing about it… Well, here is a nice example from the Maricopa trenches– Shelley Rodrigo teachers a Cinema Class at Mesa Community College and has pretty much set up her class across a trio of Web X.0 tools. The […]
    • Why Did I Ever Waste Time Studying in College? I could have done something in those four, make it, five, make it several college years, when wonderful offers like today’s email spam brings: Obtaining a DIPLOMA has never been so easy! Call today and find out how you could get your DIPLOMA from a highly credible college, Full Transcripts, A Letter of Recommendations, and […]
  • 2004
    • Tell John about Do Not Call About every three-four works, my non-friend John leaves a message offering his services from “Credit Foundation of America”. His recorded voice has a faux concern about why I have not called him back regarding their debt consolidation services (did I ever tell anyone I needed this? noooooo. Do I now John? Noooooo. Why does he […]
    • SciencePORT: Scientists Get Fed Here I think that SciencePORT is a directory/search site of RSS feeds in the sciences. It is hard to tell since the “About” link is just a bunch of links to RSS aggregator downloads. Well it does have “bugs” on the logo and a BETA stamp. Nuff said. But they have a directory structure that lists […]
    • The Lost Art of Reading Directions We are coming into Week 7 of our 12 week faculty course, Web Based Teaching, and thanks to the return of my co-teacher, we are mostly caught up on back grading of assignments. We had to provide some mea-culpas as our stated turn around on grading had lapsed– a good part as I had to […]
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 March 28th

  • 2021
    • Playing Clue with Professor WordPress for #PressEdConf21 On Thursday I managed to do a presentation for the 2021 PressEd Conference (WordPress in Education) at the same time I was co-hosting a BCcampus H5P Kitchen webinar. The former was easy because of the refreshingly unique mode of this conference as all “presentations” are done as a series of tweets in a 15 minute […] &amp#x27A1;
  • 2018
    • Digg Shrugg Talk about recursive web history… Digg Reader bit the dust this week, five years after it came to be in the aftermath of Google burying its own RSS reader. I won’t even search my own blog, I know there are many rants about Google’s decision. Yet on seeing the notice just two weeks ago that […] &amp#x27A1;
  • 2017
    • For #OpenEducationWk Take a CC Certification Unit for a Test Drive During our recent project team meeting we had an idea to share the status of the Creative Commons Certification for Open Education Week: You are free to browse the current completed Core Certification units published here in WordPress or the same source content that originates in GitHub. But we are asking as one that fits […] &amp#x27A1;
  • 2016
    • Playing With Programmable URLs One of my weird hobbies is figuring out web tools I can manipulate from just changing something in the URL. In my just ranted piece on Instagram I sought out a thing that would tell me when in time a certain date was that was like 247 weeks ago. Research Maniacs had just the thing, […] &amp#x27A1;
    • Instagrump: Share Give Away Photos You Cannot Find, Search, or License In the affirming spirit of the US elections, let’s talk about winning. By the metrics of internet success, one might say that Instagram pretty much is winning the photo sharing corner of the internet. Gulp their own sheer numbers: Instagram should be the poster child for what Mike Caulfield characterizes as StreamMode: I’ve been talking […] &amp#x27A1;
  • 2013
    • Coming Soon to TCC 2013: The ds106 Show I’m bringing ds106 to the 2013 TCC Online Conference (the 18th Annual “Technology, Colleges and Community” Online Conference). This keynote session (look at my along side Terry Anderson, I cannot wait for some of his trademark jokes) is listed as Dim the Lights: The ds106 Show. My original thought was to build a presentation metaphor […] &amp#x27A1;
  • 2012
    • No MOOC Respect When I was a kid I got no respect. When my parents got divorced there was a custody fight over me… and no one showed up. MOOCs are on fire. They are a tool for democratizing education. They are crumbling the Higher Education Monopoly. And you know what hear? Stanford. Udacity. MIT. Massive. Numbers. And […] &amp#x27A1;
    • teh awesome ds106 video work My wild ride of teaching ds106 has been a bit like riding a crazy horse on speed. We are in the intense part of the course where students are working in video, and while they talk about how hard/challenging it is, I am seeing in many of them that fiery drive to create. In already […] &amp#x27A1;
    • YouTube Genres cc licensed ( BY NC ND ) flickr photo shared by francescominciotti From YouTube Press Stats 60 hours of video are uploaded every minute, or one hour of video is uploaded to YouTube every second. 70% of YouTube traffic comes from outside the US In 2011, YouTube had more than 1 trillion views or almost […] &amp#x27A1;
  • 2010
    • Join Me- Ban Spam Supporters Ubiquity Hosting From Your Sites I am not a happy pup. The volume of blog comment spam coming into my quiet little dog house is has reached DEFCON 4 on the scale of annoyance. So I am taking action against one company, Ubiquity Server Solutions which coddles spammers (see the updates and comments below- I cannot stand by this initial […] &amp#x27A1;
  • 2006
    • Spammer Leaks Secret Among the cleanup I am doing here is continual emptying of the comment spam on a site I created, blogged about, but will not link directly, but it is more or less a publication, perhaps even, a “forum” that “i” created at MCLI. But I am not writing about the content. Nooooooooo, when would I […] &amp#x27A1;
    • Blog + Furl + RSS: Cinema Class Glu’d Where did all the conversations go about “EduGlu” apps? Maybe people are doing it rather than writing about it… Well, here is a nice example from the Maricopa trenches– Shelley Rodrigo teachers a Cinema Class at Mesa Community College and has pretty much set up her class across a trio of Web X.0 tools. The […] &amp#x27A1;
    • Why Did I Ever Waste Time Studying in College? I could have done something in those four, make it, five, make it several college years, when wonderful offers like today’s email spam brings: Obtaining a DIPLOMA has never been so easy! Call today and find out how you could get your DIPLOMA from a highly credible college, Full Transcripts, A Letter of Recommendations, and […] &amp#x27A1;
  • 2004
    • Tell John about Do Not Call About every three-four works, my non-friend John leaves a message offering his services from “Credit Foundation of America”. His recorded voice has a faux concern about why I have not called him back regarding their debt consolidation services (did I ever tell anyone I needed this? noooooo. Do I now John? Noooooo. Why does he […] &amp#x27A1;
    • SciencePORT: Scientists Get Fed Here I think that SciencePORT is a directory/search site of RSS feeds in the sciences. It is hard to tell since the “About” link is just a bunch of links to RSS aggregator downloads. Well it does have “bugs” on the logo and a BETA stamp. Nuff said. But they have a directory structure that lists […] &amp#x27A1;
    • The Lost Art of Reading Directions We are coming into Week 7 of our 12 week faculty course, Web Based Teaching, and thanks to the return of my co-teacher, we are mostly caught up on back grading of assignments. We had to provide some mea-culpas as our stated turn around on grading had lapsed– a good part as I had to […] &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 *