“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 18 posts previously published on August 19th

  • 2022
    • What’s up, Doc? Docsifying the SPLOT Docs Documentation … chore or joy, or neither? I’ve been wanting to put the nifty Docsify-This publishing tool made by Paul Hibbitts into play. Amongst my sprawl of Github projects are the SPLOT WordPress themes each with a rather sprawling in its own rights README file that includes my efforts at splotware documentation (look at this […]
  • 2021
    • Creek. Time. I am composing this in the way the ancient ones blogged. Archaically, pen to paper. Content-wise, nothing is different than writing here in WordPress, it’s just a jumble of words. In what I conjure as an annual semi-tradition (i have convinced myself I have done this before, now that I think of it, last year’s […]
  • 2020
    • Cooking With/As Metaphor: The H5P/PB Kitchen The opening philosophical question here is, “What is a metaphor for a metaphor?” I leave that riddle for the end of this post, wherever it may end up. The blogging here has been a bit sporadic, I could pull out a sheaf of excuses from the overstuffed drawer- project business? pandemic fatigue? outside gardening? The […]
  • 2019
    • Eventually? Now… a New WordPress Calling Card Theme I’ve had the itch for a while to do another in my series of WordPress themes based on HTML5Up templates. Here is the first demo version of WP-Eventually, built up the original HTML one that calls for hand coding. The compelling feature of the original is the subtle sliding images in the background. I’ve used […]
  • 2016
  • 2015
    • Dilo (Ugh?) Our New Discourse Powered Platform for UdG Agora This week we move into the second phase of the UdG Agora project. After two face to face one week long “studio” sessions of 150 University of Guadalajara faculty, we move into an 8 week online phase where they are asked to develop and implement 3-4 challenges with their courses, creating activities that are student […]
  • 2013
    • ds106 is Stuff That Gets Splogged cc licensed ( BY SA ) flickr photo shared by Alan Levine Back when he made sense, Clay Shirky uttered a clever definition “Social software is stuff that gets spammed.” which, now, in my own brain space, find that ds106 is not “stuff that gets splogged” (What is a splog?) Huh? In reviewing the insides […]
    • No Guru, No Method, No Teacher: #HEADLESS13 Yes, in a week, we will be into the first day of the headless ds106 course. I am not teaching anyone. No one is. Or everyone is. We already have 23 headless participants. Over the next few days, I hope to put the weekly announcements in the scheduled post queue, with the plan they will […]
  • 2012
    • Two Great Creates That Might Go Together I have no idea why I did not think of this before….     PLUS     That is combining the photos submitted for the ds106 Daily Create with Five Card flickr Stories? Now it is in place- if you post your Daily Create photos with the flickr tag dailycreate (along with your regular TDCXXX […]
  • 2010
    • London Barking cc licensed flickr photo shared by cogdogblog I was told London was rainy and gray, but so far (apply jinx here), the weather has been stunning. This is just a brief bit to say, “Yo London”– this is my first visit to the UK and the first few days have gone by in a blur. […]
  • 2008
    • Automatically GeoTagged Photo Hammock as rain gauge by cogdogblog posted 20 Aug ’08, 12.11am MDT PST on flickr Lots of rain in Strawberry this summer; the hammock has been used more to catch water that to catch naps. photo taken with iphone and uploaded with Mobile Fotos app- awesome! it automatically geo locates! The photo here is not […]
    • I Can Has iPhone! I Can Has iPhone! by cogdogblog posted 19 Aug ’08, 6.43pm MDT PST on flickr I’ve been wrong in my assumptions of AT&T service here in Strawberry. You cannot know w/o a phone to be sure. Maybe AT&T has been busy at woprk since I began barking about them. There is no 3G (network is […]
    • Ozh’ Plugin Plugs In Missing Features of WordPress Comment Management I’m sampling now some of my own WordCamp Takeways and am really excited about Ozh’ Absolute Comments plugin recommended by Lorelle. As she mentioned in her WordCamp session, it rather frustrating in the shiny new WP interface where one goes to edit a comment, though it sounds like she does a lot more comment editing […]
  • 2005
    • Stigmergic S5 Presentation: DIY eLearning Systems Very cool.. Rob Wall, who blogs well as StigmergicWeb, shared, in advance, a presentation he did as a nice followup to our Small Technologies Loosely Joined session in Vancouver June, 2004. In Rob’s eLearning Processes Using Small Technologies Loosely Joined, he makes the case for consideration of free, open source tools for creating learning contgent, […]
    • Hello Mesa Community College! A colleague mentioned the other day that they saw this blog on the front of the web site for the Center for Teaching & Learning at Mesa Community College, the biggest of the 10 Maricopa colleges. So surely I had to drop the work I was doing and check it out (egos need feeding, right?): […]
    • “Yea! We’ve Killed the Curly Quotes” WordPress has the annoying habit of displaying single and double quotes using pretty curly quotes (nice little balls on the end) which are fine for the page viewed, but they also shove them in RSS feeds, which can end up rendered as all kinds of odd characters (question marks). It also crops up when you […]
  • 2003
    • RSSlets: Even More Ideas for RSS Wow. If you are just reading some of the buzz (it’s about time!) about RSS, check out RSSlets – Functional RSS Feeds a series of prototypes for getting at RSS content that may be on the fringe of your idea scope. These are a whole raft of new services that are creative ways to syndicate […]
    • 1973 Flashback: Where is the gas in Phoenix? Lines at the gas stations, tempers flaring… Wow- it is almost a flashback to the 1973 oil embargo but this is 2003 in Phoenix, Arizona where a pipeline shutdown fuels gas shortage. The events in ’73 are a bit fuzzy, but I recall my Dad waiting in long lines for hours to get gasoline that […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 18 posts previously published on August 19th

  • 2022
    • What’s up, Doc? Docsifying the SPLOT Docs Documentation … chore or joy, or neither? I’ve been wanting to put the nifty Docsify-This publishing tool made by Paul Hibbitts into play. Amongst my sprawl of Github projects are the SPLOT WordPress themes each with a rather sprawling in its own rights README file that includes my efforts at splotware documentation (look at this […] &amp#x27A1;
  • 2021
    • Creek. Time. I am composing this in the way the ancient ones blogged. Archaically, pen to paper. Content-wise, nothing is different than writing here in WordPress, it’s just a jumble of words. In what I conjure as an annual semi-tradition (i have convinced myself I have done this before, now that I think of it, last year’s […] &amp#x27A1;
  • 2020
    • Cooking With/As Metaphor: The H5P/PB Kitchen The opening philosophical question here is, “What is a metaphor for a metaphor?” I leave that riddle for the end of this post, wherever it may end up. The blogging here has been a bit sporadic, I could pull out a sheaf of excuses from the overstuffed drawer- project business? pandemic fatigue? outside gardening? The […] &amp#x27A1;
  • 2019
    • Eventually? Now… a New WordPress Calling Card Theme I’ve had the itch for a while to do another in my series of WordPress themes based on HTML5Up templates. Here is the first demo version of WP-Eventually, built up the original HTML one that calls for hand coding. The compelling feature of the original is the subtle sliding images in the background. I’ve used […] &amp#x27A1;
  • 2016
  • 2015
    • Dilo (Ugh?) Our New Discourse Powered Platform for UdG Agora This week we move into the second phase of the UdG Agora project. After two face to face one week long “studio” sessions of 150 University of Guadalajara faculty, we move into an 8 week online phase where they are asked to develop and implement 3-4 challenges with their courses, creating activities that are student […] &amp#x27A1;
  • 2013
    • ds106 is Stuff That Gets Splogged cc licensed ( BY SA ) flickr photo shared by Alan Levine Back when he made sense, Clay Shirky uttered a clever definition “Social software is stuff that gets spammed.” which, now, in my own brain space, find that ds106 is not “stuff that gets splogged” (What is a splog?) Huh? In reviewing the insides […] &amp#x27A1;
    • No Guru, No Method, No Teacher: #HEADLESS13 Yes, in a week, we will be into the first day of the headless ds106 course. I am not teaching anyone. No one is. Or everyone is. We already have 23 headless participants. Over the next few days, I hope to put the weekly announcements in the scheduled post queue, with the plan they will […] &amp#x27A1;
  • 2012
    • Two Great Creates That Might Go Together I have no idea why I did not think of this before….     PLUS     That is combining the photos submitted for the ds106 Daily Create with Five Card flickr Stories? Now it is in place- if you post your Daily Create photos with the flickr tag dailycreate (along with your regular TDCXXX […] &amp#x27A1;
  • 2010
    • London Barking cc licensed flickr photo shared by cogdogblog I was told London was rainy and gray, but so far (apply jinx here), the weather has been stunning. This is just a brief bit to say, “Yo London”– this is my first visit to the UK and the first few days have gone by in a blur. […] &amp#x27A1;
  • 2008
    • Automatically GeoTagged Photo Hammock as rain gauge by cogdogblog posted 20 Aug ’08, 12.11am MDT PST on flickr Lots of rain in Strawberry this summer; the hammock has been used more to catch water that to catch naps. photo taken with iphone and uploaded with Mobile Fotos app- awesome! it automatically geo locates! The photo here is not […] &amp#x27A1;
    • I Can Has iPhone! I Can Has iPhone! by cogdogblog posted 19 Aug ’08, 6.43pm MDT PST on flickr I’ve been wrong in my assumptions of AT&T service here in Strawberry. You cannot know w/o a phone to be sure. Maybe AT&T has been busy at woprk since I began barking about them. There is no 3G (network is […] &amp#x27A1;
    • Ozh’ Plugin Plugs In Missing Features of WordPress Comment Management I’m sampling now some of my own WordCamp Takeways and am really excited about Ozh’ Absolute Comments plugin recommended by Lorelle. As she mentioned in her WordCamp session, it rather frustrating in the shiny new WP interface where one goes to edit a comment, though it sounds like she does a lot more comment editing […] &amp#x27A1;
  • 2005
    • Stigmergic S5 Presentation: DIY eLearning Systems Very cool.. Rob Wall, who blogs well as StigmergicWeb, shared, in advance, a presentation he did as a nice followup to our Small Technologies Loosely Joined session in Vancouver June, 2004. In Rob’s eLearning Processes Using Small Technologies Loosely Joined, he makes the case for consideration of free, open source tools for creating learning contgent, […] &amp#x27A1;
    • Hello Mesa Community College! A colleague mentioned the other day that they saw this blog on the front of the web site for the Center for Teaching & Learning at Mesa Community College, the biggest of the 10 Maricopa colleges. So surely I had to drop the work I was doing and check it out (egos need feeding, right?): […] &amp#x27A1;
    • “Yea! We’ve Killed the Curly Quotes” WordPress has the annoying habit of displaying single and double quotes using pretty curly quotes (nice little balls on the end) which are fine for the page viewed, but they also shove them in RSS feeds, which can end up rendered as all kinds of odd characters (question marks). It also crops up when you […] &amp#x27A1;
  • 2003
    • RSSlets: Even More Ideas for RSS Wow. If you are just reading some of the buzz (it’s about time!) about RSS, check out RSSlets – Functional RSS Feeds a series of prototypes for getting at RSS content that may be on the fringe of your idea scope. These are a whole raft of new services that are creative ways to syndicate […] &amp#x27A1;
    • 1973 Flashback: Where is the gas in Phoenix? Lines at the gas stations, tempers flaring… Wow- it is almost a flashback to the 1973 oil embargo but this is 2003 in Phoenix, Arizona where a pipeline shutdown fuels gas shortage. The events in ’73 are a bit fuzzy, but I recall my Dad waiting in long lines for hours to get gasoline that […] &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 *