“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 19 posts previously published on May 16th

  • 2018
    • The Little “b” and the Big “C” Even after 15 years of cogdogblogging there’s nothing like the smell of a blog post about blogging in the morning. I’m thinking today of the people entering into the blog network of Ontario Extend. Some obviously are not new to web writing, but I’d best in many cases, seated in front of that keyboard, many […]
  • 2016
    • Magic, Misdirection, Sleight of Hand, Facebook You might believe in magic, I sometimes do, but the kind you see performed is technically a method of visual perception mind-messup. More properly known as sleight of hand, where sleight is on Old Norse word for “the use of dexterity or cunning, especially so as to deceive.” My dislike of Facebook extends farther back […]
  • 2015
    • Technology, Equity, and a Town That Fought off a Volcanic Disturbance @audreywatters Ditto, I feel like Willa Wonka getting the golden ticket — Alan Levine (@cogdog) May 15, 2015 It truly felt like getting the golden ticket yesterday for the opportunity to host a one hour conversation with Audrey Watters as one of the Connected Learning sessions focused on the Design by Equity theme of the […]
  • 2010
    • It’s a Phone and an Audio Recorder cc licensed flickr photo shared by cogdogblog I’ve had a string of audio recorder devices over the years- one of the first portable MP3 recorders by iRiver, another white plastic one I already forgot the name, a great workhorse in an Edirol R-09. I don’t think I need hardware anymore, though, for basic interviews and […]
    • Obligatory Why I am ________ing Facebook Wouldn’t you give anything to be the fly on the wall in the Facebook boardroom as they scramble to put of the little sparks of fire? I’m not even going to dredge up all the links of people citing why they are quitting facebook, why they are not, why they are begrudgingly staying. I think […]
  • 2009
    • My Yard Told Me a Story It is May But… by cogdogblog posted 16 May ’09, 6.00pm MDT PST on flickr Usually in May, I see a glorious visual chorus of flowering irises— blues, purples, yellow, reds, and shades in between I did not know existed. Yet today, where I year ago I was snapping photos of blossoms, I see very […]
    • WolframAlpha Hooks Me WolframAlpha Knows It All by cogdogblog posted 16 May ’09, 8.44am MDT PST on flickr This is one smart thing! I now know that the meaning life has no quantity 😉 I’ve ignored following most of the pre-release on
  • 2008
    • Got My ServerMojo Working This week I tried the free ServerMojo service which provides reports of uptime for your web servers (or databases) or pings you when they are down. The cool thing is you can get alerts the old fashioned grandma way (email) or as direct messages via twitter (which can then be pushed your phone). So ServerMojo […]
    • One More Twitter Love Log For the Fire Most people who have reached the high vistas of the Twitter Life Cycle curve have at least one, if not many small stories where they got information, a contact, a resource from twitter that they would not have gotten anywhere else. Or in such a timely fashion. So here is one more, how I long […]
  • 2007
    • Twitter by Blog Proxy @ Faculty Academy Hmmm. seems to be some blockages or bottlenecks in public network here at Faculty Academy- cannot post to twitter, tweets are getting munched in the network. Attempting to tweet via blog post. Update: The local network here was not to blame. Twitter itself has been/is very flaky. That darn cat messing with the server was […]
    • Barbara Ganley on Deep Learning, Slow Blogging, and Tensions of Web 2.0 Live from Faculty Academy at University of Mary Washington… Barbara Ganley is tasking us about how we use web technology– responding to some of the opening panel remarks of reluctance to blogging about their project. She asks us What is the correlation between your own personal use of web technologies and the way you use […]
  • 2006
    • Outta Beta It only took like 2+ years, a big Yahoo buy out, and finally they have gotten enough kinks out of flickr to drop the “beta” form the logo– now they are “gamma”: It caught my eye as soon as I loaded my photos. The changes are subtle (more previews per page, drop down menus to […]
    • Another New Tech Device flickr foto New Tech Deviceavailable on flickr No, this is not another cool mini MP3 recorder– this is an insulin pump that is tethered to my belly. I am getting up to speed with the functionality before I put it in action. It’s a bit larger than the MP3 recorders I’ve been researching, but this […]
    • Pachyderms Romp Through Austin Hotel The clever blog post entry title not used here was “Museum People Have Great Assets”. Last week I was in Austin all week, not to soak up cool music or wander aimlessly down 6th Street, but holed up in an anonymous, freeway junction hotel for the first of several NMC training sessions in support a […]
  • 2005
    • “Dominoe”: Digital Story Screencast I should be working on other things, but I get a technology bug under my skin. After publishing my first screencast and getting some quick feedback, some of my own, I wanted to take myself to task and do something beyong screencasting as just tours of software. Creating “How-tos” for using RSS, or a course […]
    • They Shoot Lectures, Don’t They? Don’t be confused by a stretched attempt to create a clever title, tilting back to the 1969 movie by Sydney Pollack. And I am not advocating violence… For a fun romp, see what else pops up on Google for this search: * They Shoot Horses but Vaccinate Dogs Immune deficiency diseases in animals – are […]
    • Screencasting and the Tools After posting about my first (sloppy) screencast, I emailed Jon Udell via his blog to ask about his tools. An impressive sidenote- he responded directly less than 2 hours after I sent, as compared to a feedback form on say a phone company or other mega corporate site staffed with hundreds where they reply with […]
  • 2004
    • Blog As a Web Publishing Platform: LTA Demo A perception is that weblogs are primarily for teen angst diaries, obsessions on favorite pets, or rantings of the extreme lunatic fringe (hey, I think pretty much describes my blog!). I’ve been tinkering here and there with a demonstration case that the tools and features blog can be harnessed to simplify the creation of beautiful […]
    • “Woe is Me” and MT3 Oh the wailing and despair that is bleating across the blogscape about MovableType’s announcement of the fee$$$$$$$ for MT 3.0. I’ve not bothered too much as I prefer to wait until the dust settles, but I am reading of mad rushes to rampage, rapid switches to other platforms such as WordPress, Bloxsum, heck, maybe folks […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 19 posts previously published on May 16th

  • 2018
    • The Little “b” and the Big “C” Even after 15 years of cogdogblogging there’s nothing like the smell of a blog post about blogging in the morning. I’m thinking today of the people entering into the blog network of Ontario Extend. Some obviously are not new to web writing, but I’d best in many cases, seated in front of that keyboard, many […] &amp#x27A1;
  • 2016
    • Magic, Misdirection, Sleight of Hand, Facebook You might believe in magic, I sometimes do, but the kind you see performed is technically a method of visual perception mind-messup. More properly known as sleight of hand, where sleight is on Old Norse word for “the use of dexterity or cunning, especially so as to deceive.” My dislike of Facebook extends farther back […] &amp#x27A1;
  • 2015
    • Technology, Equity, and a Town That Fought off a Volcanic Disturbance @audreywatters Ditto, I feel like Willa Wonka getting the golden ticket — Alan Levine (@cogdog) May 15, 2015 It truly felt like getting the golden ticket yesterday for the opportunity to host a one hour conversation with Audrey Watters as one of the Connected Learning sessions focused on the Design by Equity theme of the […] &amp#x27A1;
  • 2010
    • It’s a Phone and an Audio Recorder cc licensed flickr photo shared by cogdogblog I’ve had a string of audio recorder devices over the years- one of the first portable MP3 recorders by iRiver, another white plastic one I already forgot the name, a great workhorse in an Edirol R-09. I don’t think I need hardware anymore, though, for basic interviews and […] &amp#x27A1;
    • Obligatory Why I am ________ing Facebook Wouldn’t you give anything to be the fly on the wall in the Facebook boardroom as they scramble to put of the little sparks of fire? I’m not even going to dredge up all the links of people citing why they are quitting facebook, why they are not, why they are begrudgingly staying. I think […] &amp#x27A1;
  • 2009
    • My Yard Told Me a Story It is May But… by cogdogblog posted 16 May ’09, 6.00pm MDT PST on flickr Usually in May, I see a glorious visual chorus of flowering irises— blues, purples, yellow, reds, and shades in between I did not know existed. Yet today, where I year ago I was snapping photos of blossoms, I see very […] &amp#x27A1;
    • WolframAlpha Hooks Me WolframAlpha Knows It All by cogdogblog posted 16 May ’09, 8.44am MDT PST on flickr This is one smart thing! I now know that the meaning life has no quantity 😉 I’ve ignored following most of the pre-release on &amp#x27A1;
  • 2008
    • Got My ServerMojo Working This week I tried the free ServerMojo service which provides reports of uptime for your web servers (or databases) or pings you when they are down. The cool thing is you can get alerts the old fashioned grandma way (email) or as direct messages via twitter (which can then be pushed your phone). So ServerMojo […] &amp#x27A1;
    • One More Twitter Love Log For the Fire Most people who have reached the high vistas of the Twitter Life Cycle curve have at least one, if not many small stories where they got information, a contact, a resource from twitter that they would not have gotten anywhere else. Or in such a timely fashion. So here is one more, how I long […] &amp#x27A1;
  • 2007
    • Twitter by Blog Proxy @ Faculty Academy Hmmm. seems to be some blockages or bottlenecks in public network here at Faculty Academy- cannot post to twitter, tweets are getting munched in the network. Attempting to tweet via blog post. Update: The local network here was not to blame. Twitter itself has been/is very flaky. That darn cat messing with the server was […] &amp#x27A1;
    • Barbara Ganley on Deep Learning, Slow Blogging, and Tensions of Web 2.0 Live from Faculty Academy at University of Mary Washington… Barbara Ganley is tasking us about how we use web technology– responding to some of the opening panel remarks of reluctance to blogging about their project. She asks us What is the correlation between your own personal use of web technologies and the way you use […] &amp#x27A1;
  • 2006
    • Outta Beta It only took like 2+ years, a big Yahoo buy out, and finally they have gotten enough kinks out of flickr to drop the “beta” form the logo– now they are “gamma”: It caught my eye as soon as I loaded my photos. The changes are subtle (more previews per page, drop down menus to […] &amp#x27A1;
    • Another New Tech Device flickr foto New Tech Deviceavailable on flickr No, this is not another cool mini MP3 recorder– this is an insulin pump that is tethered to my belly. I am getting up to speed with the functionality before I put it in action. It’s a bit larger than the MP3 recorders I’ve been researching, but this […] &amp#x27A1;
    • Pachyderms Romp Through Austin Hotel The clever blog post entry title not used here was “Museum People Have Great Assets”. Last week I was in Austin all week, not to soak up cool music or wander aimlessly down 6th Street, but holed up in an anonymous, freeway junction hotel for the first of several NMC training sessions in support a […] &amp#x27A1;
  • 2005
    • “Dominoe”: Digital Story Screencast I should be working on other things, but I get a technology bug under my skin. After publishing my first screencast and getting some quick feedback, some of my own, I wanted to take myself to task and do something beyong screencasting as just tours of software. Creating “How-tos” for using RSS, or a course […] &amp#x27A1;
    • They Shoot Lectures, Don’t They? Don’t be confused by a stretched attempt to create a clever title, tilting back to the 1969 movie by Sydney Pollack. And I am not advocating violence… For a fun romp, see what else pops up on Google for this search: * They Shoot Horses but Vaccinate Dogs Immune deficiency diseases in animals – are […] &amp#x27A1;
    • Screencasting and the Tools After posting about my first (sloppy) screencast, I emailed Jon Udell via his blog to ask about his tools. An impressive sidenote- he responded directly less than 2 hours after I sent, as compared to a feedback form on say a phone company or other mega corporate site staffed with hundreds where they reply with […] &amp#x27A1;
  • 2004
    • Blog As a Web Publishing Platform: LTA Demo A perception is that weblogs are primarily for teen angst diaries, obsessions on favorite pets, or rantings of the extreme lunatic fringe (hey, I think pretty much describes my blog!). I’ve been tinkering here and there with a demonstration case that the tools and features blog can be harnessed to simplify the creation of beautiful […] &amp#x27A1;
    • “Woe is Me” and MT3 Oh the wailing and despair that is bleating across the blogscape about MovableType’s announcement of the fee$$$$$$$ for MT 3.0. I’ve not bothered too much as I prefer to wait until the dust settles, but I am reading of mad rushes to rampage, rapid switches to other platforms such as WordPress, Bloxsum, heck, maybe folks […] &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 *