“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 23rd

  • 2017
    • Break Away (3 sound #netnarr story remix) This is somewhat for Alex, who asked for an example on how to do the 3 sound remix assignment for Networked Narratives. He’s spinning his audio wheels, which I said would likely happen. DONT PANIC! We asked students to record and share three sounds of their morning routine, representing their preparation, transportation, and arrival at […]
  • 2016
    • Not Holding My Breath Waiting For Facebook’s New Account Impersonation Detection Several people have shared these stories about what Facebook is (here comes the scare quotes) “doing” about fake accounts.– Facebook is testing a feature that alerts you if someone is impersonating your account (from mashaable.com) and Facebook is reportedly testing a tool for detecting profile imposters (The Verge)… and everyone else is re-reporting it– Facebook’s […]
    • VConnecting Today to #DigPed Cairo: “Fermenting Ideas in the Middle Yeast” Don’t ask about the yeast. Ok, I would ask about it. I was awake at 5:30am today to turn on the lights for the Google Hangout session with folks at the Digital Pedagogy Lab Cairo held at the American University Cairo (AUC). In the warm up time before the hangout goes live, the virtual buddies […]
  • 2015
    • Our Approach to Tracking and Cookies Oh, the innocent and wide open hippie romping internet lost! Now we diligently must make sure we are not infecting our own sites with those nasty cloaked tracking devices, not only the googly analytical stuff, but others crumbs of cookies we may not even be aware of. Audrey Watters, as she does so well, outlines […]
  • 2011
    • Longsong Thursday on ds106 Radio cc licensed ( BY NC ) flickr photo shared by deep_schismic I don’t know if this will be picked up by anyone else, but I wanted to try and propose a theme for a day on ds106 radio — it probably hinges on someone pushing for it in the morning. But oh well, you can’t […]
    • Now What?… Taking on the C of P cc licensed ( BY NC ND ) flickr photo shared by KLK Photos I’ve been un-employed a week, and still soaking in the incredible response to my announcement and road plans… and now there are even more dots on the map to connect. That adventure will start sometime in June. I have yet to spend […]
  • 2010
    • Stomped by Lawyers cc licensed flickr photo shared by Jeremy Brooks There is a imprint from that boot labeled “copyright violation” across my face. I got stomped… and likely deserved it. I had a eight-baked idea to do a video response to Dave Cormier and George Siemens in their call for videos about the future of education for […]
  • 2009
    • Creative Commons or Not? cc licensed flickr photo by Laurie :: Liquid Paper You see that cute photo I used? You know the routine. I use compfight to search tags on creative commons licensed flickr photos with the tag peekabo. Then I download a copy, upload to my server, include in this post, provide attribution, and that is how […]
    • Better with Pie: Feed2JS 2.0! Testers Wanted This is long overdue for users of my Feed2JS service, which allows you to place a dynamic feed in your web page without having to know anything about RSS or parsing XML. This has been around since 2003 and seems to still be used a lot. I’ve hardly done much on the code for 2+ […]
  • 2008
    • For Such Smart Tools, GoogleApps Have Pretty Stupid Menus I am a die hard Google junkie. For more than 2 years, iGoogle has been home on every computer I use, while others clamor about their RSS tools, I just dig and dig Google reader, Gmail is my hub for all my non-twitter communication 😉 and I put all my time into Google calendar. Yet, […]
  • 2006
    • Office Artifacts flickr foto Wow, This Web Thing Might be BIGavailable on my flickr Our site got featured in one of the early books about the web, The World Wide Web Unleashed by John December (1994). As I winnow down the last 2 weeks on the job at Maricopa, I am unearthing a lot of nostalgic artifacts […]
    • Speed Social Softwaring I feel like I just finished a double marathon. Kind of like the trendy “speed dating” events (no first hand experience here), I spent two hours this morning doing demos at Rio Salado College, the Maricopa college that specializes in online learning. Inspired by a session at the EDUCAUSE ELI 2006 Conference where presenters used […]
  • 2005
    • Second Shift Job: 20 Tons of Minus My self-imposed sentence of hard labor is not over. The next phase of our backyard landscaping project involved a delivery of 20 tons of 3/8 inch minus coral granite on our driveway. This is everything that passes through the finest sieve at the rock quarry (folks in the know just call it “minus”), so it […]
    • Skyperview Number 16 I ought to stop, but this is too much fun.. today I completed my 16th mini “Skyperview” with folks near and far about their use and ideas for digital audio over the net. I’ll be scraping a few more before the end of the week, but I need to get around to actually writing my […]
  • 2004
    • Two Rivers Mix: RSS and e-Portfolios I do not want to go out on a limb, but I think we have done something for the first time- a combination of two technologiies I have had my paws in this year, electronic portfolios and RSS. It reminds me of a trip to the Lee’s Ferry crossing of the Grand Canyon, when the […]
    • Confused on the Trail to the Learning Objects Summit Following Stephen Downes’ recent announcement, I was eager to tune into the webcast for the March 29-30 EduSource Learning Objects Summit— the agenda seems a fair mix of high level overview (yea!) and a pile of technical acronym soup sessions (pass the bowl to someone else). The Canadians really have their act together as far […]
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 23rd

  • 2017
    • Break Away (3 sound #netnarr story remix) This is somewhat for Alex, who asked for an example on how to do the 3 sound remix assignment for Networked Narratives. He’s spinning his audio wheels, which I said would likely happen. DONT PANIC! We asked students to record and share three sounds of their morning routine, representing their preparation, transportation, and arrival at […] &amp#x27A1;
  • 2016
  • 2015
    • Our Approach to Tracking and Cookies Oh, the innocent and wide open hippie romping internet lost! Now we diligently must make sure we are not infecting our own sites with those nasty cloaked tracking devices, not only the googly analytical stuff, but others crumbs of cookies we may not even be aware of. Audrey Watters, as she does so well, outlines […] &amp#x27A1;
  • 2011
    • Longsong Thursday on ds106 Radio cc licensed ( BY NC ) flickr photo shared by deep_schismic I don’t know if this will be picked up by anyone else, but I wanted to try and propose a theme for a day on ds106 radio — it probably hinges on someone pushing for it in the morning. But oh well, you can’t […] &amp#x27A1;
    • Now What?… Taking on the C of P cc licensed ( BY NC ND ) flickr photo shared by KLK Photos I’ve been un-employed a week, and still soaking in the incredible response to my announcement and road plans… and now there are even more dots on the map to connect. That adventure will start sometime in June. I have yet to spend […] &amp#x27A1;
  • 2010
    • Stomped by Lawyers cc licensed flickr photo shared by Jeremy Brooks There is a imprint from that boot labeled “copyright violation” across my face. I got stomped… and likely deserved it. I had a eight-baked idea to do a video response to Dave Cormier and George Siemens in their call for videos about the future of education for […] &amp#x27A1;
  • 2009
    • Creative Commons or Not? cc licensed flickr photo by Laurie :: Liquid Paper You see that cute photo I used? You know the routine. I use compfight to search tags on creative commons licensed flickr photos with the tag peekabo. Then I download a copy, upload to my server, include in this post, provide attribution, and that is how […] &amp#x27A1;
    • Better with Pie: Feed2JS 2.0! Testers Wanted This is long overdue for users of my Feed2JS service, which allows you to place a dynamic feed in your web page without having to know anything about RSS or parsing XML. This has been around since 2003 and seems to still be used a lot. I’ve hardly done much on the code for 2+ […] &amp#x27A1;
  • 2008
    • For Such Smart Tools, GoogleApps Have Pretty Stupid Menus I am a die hard Google junkie. For more than 2 years, iGoogle has been home on every computer I use, while others clamor about their RSS tools, I just dig and dig Google reader, Gmail is my hub for all my non-twitter communication 😉 and I put all my time into Google calendar. Yet, […] &amp#x27A1;
  • 2006
    • Office Artifacts flickr foto Wow, This Web Thing Might be BIGavailable on my flickr Our site got featured in one of the early books about the web, The World Wide Web Unleashed by John December (1994). As I winnow down the last 2 weeks on the job at Maricopa, I am unearthing a lot of nostalgic artifacts […] &amp#x27A1;
    • Speed Social Softwaring I feel like I just finished a double marathon. Kind of like the trendy “speed dating” events (no first hand experience here), I spent two hours this morning doing demos at Rio Salado College, the Maricopa college that specializes in online learning. Inspired by a session at the EDUCAUSE ELI 2006 Conference where presenters used […] &amp#x27A1;
  • 2005
    • Second Shift Job: 20 Tons of Minus My self-imposed sentence of hard labor is not over. The next phase of our backyard landscaping project involved a delivery of 20 tons of 3/8 inch minus coral granite on our driveway. This is everything that passes through the finest sieve at the rock quarry (folks in the know just call it “minus”), so it […] &amp#x27A1;
    • Skyperview Number 16 I ought to stop, but this is too much fun.. today I completed my 16th mini “Skyperview” with folks near and far about their use and ideas for digital audio over the net. I’ll be scraping a few more before the end of the week, but I need to get around to actually writing my […] &amp#x27A1;
  • 2004
    • Two Rivers Mix: RSS and e-Portfolios I do not want to go out on a limb, but I think we have done something for the first time- a combination of two technologiies I have had my paws in this year, electronic portfolios and RSS. It reminds me of a trip to the Lee’s Ferry crossing of the Grand Canyon, when the […] &amp#x27A1;
    • Confused on the Trail to the Learning Objects Summit Following Stephen Downes’ recent announcement, I was eager to tune into the webcast for the March 29-30 EduSource Learning Objects Summit— the agenda seems a fair mix of high level overview (yea!) and a pile of technical acronym soup sessions (pass the bowl to someone else). The Canadians really have their act together as far […] &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 *