“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 February 21st

  • 2023
    • Fetching Stuff from Mastodon (simplest brute force approach) The clock is ticking for me to modify the WordPress theme that powers the DS106 Daily Create given that the slippery slope timeline for free, unfettered access to the Twitter API will sooner? later? tomorrow? hit the bottom. Just to be clear, nothing here stop the DS106 Daily Create site from publishing it’s 4050+ day […]
  • 2017
    • The Challenge of Non-Disposable Assignments I might not refer to making Open Educational Resources (OERs) as “easier” but it is more familiar to educators than the idea of creating Assignments that are not “disposable”. David Wiley described the term “disposable assignments” in a 2013 post on Open Pedagogy. It’s a brilliant approach to talk to educators about designing open materials, […]
    • Get Centered, WordPress Auto Embedded Tweets! Oh web design vanity, thy name is obscure CSS class. This is something really really visually petty, but, you hopefully know you can in WordPress you can embed a single tweet by just finding it’s URL (it’s the link on the time/date stamp) and putting it on a blank line: blah blah blah blah blah […]
  • 2016
    • #HEYFACEBOOK Why Won’t You Talk About Catfishing? It’s just another night, and just another email from someone who did a reverse image search on a man she was being courted by online only to discover all his photos belong to a guy named Alan Levine. These victims emphasize their shame at being fooled and seem focused on feeling bad for me as […]
  • 2015
    • A Long Running Project Revisiting Net Art Almost a year ago I started a project that has no real purpose beyond my own curiosity and interest in web history (if I were to invent a new dream job it would be something like Web Archeologist). During a […]
    • BorderXing Guide Keith Bunting and Kayle Brandon’s project challenged ideas of boundary crossing in the physical world (supposedly made freer by formation of the European Union) as well as the online world (supposedly made freer by open, global access). But this freedom is not equitable, it comes with social and economic privilege, and not for activists or those seeking asylum. 
  • 2013
  • 2012
    • Slice 12: Playing for Team Celsius cc licensed ( BY ) flickr photo shared by olga.palma The title here has no real reference to anything I talk about, besides me babbling as I talk, walking in to campus on February 14 at the “crack of 10:00am”. The class is consuming me, and at least one person about there is wondering, “Will […]
    • Slice 11: Sigh cc licensed ( BY NC ) flickr photo shared by Bondseye This was from two weeks ago, still catching up on my back(b)log of audio reflections, back in my second week of being here at the University of Mary Washington teaching my section of ds106. I can give you a prelude that the next episodes […]
  • 2011
    • Through the Lens cc licensed ( BY NC ) flickr photo shared by Derek K. Miller I had way, way too much fun (as if there is really such a measurement) with my presentation yesterday for the ITC 2011 conference here in Florida. On the beach. Under the sun. Maybe it was because this was all brand new […]
  • 2008
    • Window Closing Soon on Proposals for NMC Symposium on Mashups Hurry up and submit your session proposals for the Apr 1-3 NMC Symposium on Mashups! This online conference will take place in both Second Life and on the web at LearningTimes. Creative Commons licensed flickr image from lantzilla Data mashups were featured on the mid-term slot for the 2008 NMC Horizon Report. And we now […]
    • Look Out Canadian Gulls, CogDog Has Landed Serious Gulls They Have Here in Vancouver by cogdogblog posted 21 Feb ’08, 12.17am MST PST on flickr Gonna give the gulls something to worry about, I landed today in Vancouver, in an early landing move of Operation Northern Voice. My role is to represent the blogging interests of the Great Unknown Canadian Southern Province […]
  • 2006
    • Reading Spammerish Among the steady stream of spam for acne treatments, continued gambling and substance fetishes, apartment rentals, disaster recovery software is a new variety that I am left dumfounded in trying to interpret– these are one line messages of unintelligible alpha numerics. e.g. JKzw7GIFFsiglB wfedcfy80EZR FXku7fmkbyn0t or SABok8o1e5aYn A9CuXC4vvFU8c YbMFRUk A23NLhe
    • Social Software In Action (no real software required) Actions speak much more clearly than definitions. It was D’Arcy at the UBC Social Software Salon who described it something like being removing or downplaying the “software” portion of online social interaction. Whatever your way of describing what “social software” is how, submitted below is a nice example of the informal way the web, blogs, […]
    • Podcasting Demo Call For Help (The Lamb Approach) I’m scheduled to do next week two demos at our colleges on the latest buzzword sweeping the educational technology landscape… podcasting. Following a cue from Brian Lamb in asking the internet for help, I’ll put out my own call (imitation == flattery). This is just an overview (I think) of what podcasting offers for educators, […]
  • 2005
    • Another Bookmarklet Tool- Quick Furl Search I cannot claim this was an Urgent/Important task, but my curiosity got the better of me… I made a new bookmarklet tool that allows me to run a search against my furl-ed sites either by entering the search terms or by highlighting the words in any web mouse-selectable content. This avoids having to load a […]
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 February 21st

  • 2023
    • Fetching Stuff from Mastodon (simplest brute force approach) The clock is ticking for me to modify the WordPress theme that powers the DS106 Daily Create given that the slippery slope timeline for free, unfettered access to the Twitter API will sooner? later? tomorrow? hit the bottom. Just to be clear, nothing here stop the DS106 Daily Create site from publishing it’s 4050+ day […] &amp#x27A1;
  • 2017
    • The Challenge of Non-Disposable Assignments I might not refer to making Open Educational Resources (OERs) as “easier” but it is more familiar to educators than the idea of creating Assignments that are not “disposable”. David Wiley described the term “disposable assignments” in a 2013 post on Open Pedagogy. It’s a brilliant approach to talk to educators about designing open materials, […] &amp#x27A1;
    • Get Centered, WordPress Auto Embedded Tweets! Oh web design vanity, thy name is obscure CSS class. This is something really really visually petty, but, you hopefully know you can in WordPress you can embed a single tweet by just finding it’s URL (it’s the link on the time/date stamp) and putting it on a blank line: blah blah blah blah blah […] &amp#x27A1;
  • 2016
    • #HEYFACEBOOK Why Won’t You Talk About Catfishing? It’s just another night, and just another email from someone who did a reverse image search on a man she was being courted by online only to discover all his photos belong to a guy named Alan Levine. These victims emphasize their shame at being fooled and seem focused on feeling bad for me as […] &amp#x27A1;
  • 2015
    • A Long Running Project Revisiting Net Art Almost a year ago I started a project that has no real purpose beyond my own curiosity and interest in web history (if I were to invent a new dream job it would be something like Web Archeologist). During a […] &amp#x27A1;
    • BorderXing Guide Keith Bunting and Kayle Brandon’s project challenged ideas of boundary crossing in the physical world (supposedly made freer by formation of the European Union) as well as the online world (supposedly made freer by open, global access). But this freedom is not equitable, it comes with social and economic privilege, and not for activists or those seeking asylum.  &amp#x27A1;
  • 2013
  • 2012
    • Slice 12: Playing for Team Celsius cc licensed ( BY ) flickr photo shared by olga.palma The title here has no real reference to anything I talk about, besides me babbling as I talk, walking in to campus on February 14 at the “crack of 10:00am”. The class is consuming me, and at least one person about there is wondering, “Will […] &amp#x27A1;
    • Slice 11: Sigh cc licensed ( BY NC ) flickr photo shared by Bondseye This was from two weeks ago, still catching up on my back(b)log of audio reflections, back in my second week of being here at the University of Mary Washington teaching my section of ds106. I can give you a prelude that the next episodes […] &amp#x27A1;
  • 2011
    • Through the Lens cc licensed ( BY NC ) flickr photo shared by Derek K. Miller I had way, way too much fun (as if there is really such a measurement) with my presentation yesterday for the ITC 2011 conference here in Florida. On the beach. Under the sun. Maybe it was because this was all brand new […] &amp#x27A1;
  • 2008
    • Window Closing Soon on Proposals for NMC Symposium on Mashups Hurry up and submit your session proposals for the Apr 1-3 NMC Symposium on Mashups! This online conference will take place in both Second Life and on the web at LearningTimes. Creative Commons licensed flickr image from lantzilla Data mashups were featured on the mid-term slot for the 2008 NMC Horizon Report. And we now […] &amp#x27A1;
    • Look Out Canadian Gulls, CogDog Has Landed Serious Gulls They Have Here in Vancouver by cogdogblog posted 21 Feb ’08, 12.17am MST PST on flickr Gonna give the gulls something to worry about, I landed today in Vancouver, in an early landing move of Operation Northern Voice. My role is to represent the blogging interests of the Great Unknown Canadian Southern Province […] &amp#x27A1;
  • 2006
    • Reading Spammerish Among the steady stream of spam for acne treatments, continued gambling and substance fetishes, apartment rentals, disaster recovery software is a new variety that I am left dumfounded in trying to interpret– these are one line messages of unintelligible alpha numerics. e.g. JKzw7GIFFsiglB wfedcfy80EZR FXku7fmkbyn0t or SABok8o1e5aYn A9CuXC4vvFU8c YbMFRUk A23NLhe &amp#x27A1;
    • Social Software In Action (no real software required) Actions speak much more clearly than definitions. It was D’Arcy at the UBC Social Software Salon who described it something like being removing or downplaying the “software” portion of online social interaction. Whatever your way of describing what “social software” is how, submitted below is a nice example of the informal way the web, blogs, […] &amp#x27A1;
    • Podcasting Demo Call For Help (The Lamb Approach) I’m scheduled to do next week two demos at our colleges on the latest buzzword sweeping the educational technology landscape… podcasting. Following a cue from Brian Lamb in asking the internet for help, I’ll put out my own call (imitation == flattery). This is just an overview (I think) of what podcasting offers for educators, […] &amp#x27A1;
  • 2005
    • Another Bookmarklet Tool- Quick Furl Search I cannot claim this was an Urgent/Important task, but my curiosity got the better of me… I made a new bookmarklet tool that allows me to run a search against my furl-ed sites either by entering the search terms or by highlighting the words in any web mouse-selectable content. This avoids having to load a […] &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 *