“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 22 posts previously published on August 25th

  • 2017
    • #ResNetSem: Where It’s At (Got a WordPress Site and a Logo) Cue it up, [midi cover of] Beck. There's a thesis seminar just up the road From the academic ones that we may know A place we see the networks glow The hashtag jazz and the fresh blog flow Pulling out noun project and syndication plugins Gotta Wordpress site and a new logo Hawksey sheet just […]
  • 2016
    • Machinations of a Certificate Design Flow The efforts of our Creative Commons Certification design team are aimed at producing a first draft version of a structured outline of what will be included and also to solicit input, ideas, and resources we should include. We have on the table a “core” portion of Creative Commons understanding that all certificates should cover, plus […]
  • 2015
    • Gimme a Badge! My First Discourse Feature Suggestion Baked In A totally inconsequential blog post. Because I can. A total key to learning how to work with / deal with the discourse discussion software we are using for the Udg Agora project (hey there was a BLOG POST on this) … has been the discourse meta site. This is where the developers hang out, and […]
  • 2014
    • Looking for a StoryBox Light Hack I’m pretty excited to work out my newest Storybox, a PirateBox device hidden inside an old Brownie camera I’ve seen some hacks on the PirateBox forums where people have set up enclosures with lights the activate when the thing is on. I was looking yesterday at the shutter mechanism in the front of the camera, […]
    • Back on the Road for a Spin creative commons licensed ( BY ) flickr photo shared by 43studio Red Dog truck is loaded with camping gear and mountain bike, and ready to hit the road for a ~2 week road excursion. It’s time to get out of Strawberry a bit, and visit some friends. Plus, this is the warm up for a […]
  • 2013
    • Creating a Page for Last 100 Posts in your WordPress Site Because she’s #ds106 #4life and an awesome grandma… #ds106 I'm looking for a way in WP to add a page that shows all of my blog posts. HELP? @cogdog @timmmmyboy http://t.co/CFxbAwhm6y — Rochelle Lockridge (@Rockylou22) August 25, 2013 I do have one of these on CogDogBlog- mainly because I wanted a reference way to be […]
    • Even Chickens Go Headless In about 10 hours the first week of Headless ds106 launches– the first week’s assignment will be published at one minute past midnight (PST) and will appear at http://ds106.us/category/the-site/fall-2013-headless/. We already have 38 blogs in the mix- check out all the posts from participants. If you are new to ds106, your task this week is […]
    • Keep Moving Along As I was mucking about the yard yesterday, I noticed this brightly colored caterpillar trying to climb the wall at the base of my house: cc licensed ( BY SA ) flickr photo shared by Alan Levine After spooking him/her with the camera click, I took a series of shots as it walked along the […]
  • 2012
    • Scottlo of Arabia Our new old radio friend is off to tame the Arabian penninsula https://twitter.com/scottlo/status/239383608970850304 It seems only fitting to make a movie poster: A mighty spectacle of action and adventure! Prince Feisal: My friend Scottlo, if I may call him that. “My friend Scottlo”. How many men will claim the right to use that phrase? How […]
    • The Last Place We Should Be Private and Protected cc licensed ( BY NC SD ) flickr photo shared by onkel_wart (thomas lieser) Last week I sat in a demonstration of a new sort of academic social networking environment that has many levels for privacy and permission. This is not a criticism at all of the software, but more at the curious attitudes of […]
    • Google and GIFs: You Can Upload But Ye Shall Not Animate cc licensed ( BY ) flickr photo shared by Victor Bezrukov I am among the many afflicted by the ds1o6 fever of animated GIFs. Riddle me this; why oh why, Grand Oracle of Google, can one actually upload an ainamted GIF to Google Drive but not be allowed to use it? Here is an animated […]
  • 2011
    • A PS For an Amazing Story As a followup to the May 2011 version of Amazing Stories of Openness, I got an email a few weeks back from Wendy Farmer with a nice post script. Her story was about a blog she had created with her kids to write about dinosaurs and how they connected with a professional paleontologist (click through […]
  • 2009
    • Off The Grid cc licensed flickr photo shared by cindy47452 I cannot recall who it was, but I knew someone in the tech biz who talked about taking an occasional “Amish weekend” where he and his spouse turned off their computers, cell phones, TVs etc for 2 days as a means of focusing on life, free of gadgets. […]
  • 2008
    • Flying Pigs, Iron Balloons, and Top Down Tagging I love tagging and still persist in vain hopes that I can encourage others to do some shared tagging, but feel lucky if I can get a handful of people to use a single tag. I am regularly tagging web sites in delicious with tags destined to be repurposed on at least 10 different web […]
    • Holy iPhone Screen Shots Holy iPhone Screen Shots by cogdogblog posted 25 Aug ’08, 11.56pm MDT PST on flickr Enough n00b me trying to capture iPhone screens via a photo from my camera. Via comment by Guy K just press Power and Home button together: blog.guykawasaki.com/2008/08/the-art-of-ipho.html Compare to flickr.com/photos/cogdog/2798321033/ Emailed as if magic from my iPhone  Share this barking […]
    • Your Camera Phone is a Document Scanner with Qipit Almost be sheer accident I just came across Qipit a service that allows you to take photos of sketches or whiteboards with your camera phone, email it to their site, and then have it available as a PDF or even be able to fax it. Chances are, you carry a cell phone with you everywhere […]
    • Stories From the Dead Letter Inbox photo credit: *TreMichLan* When you send an email (and it does not bounce back) you likely have the assumption it got to the intended person. If they never respond, do you begin conjuring stories? “Why did he ignore my request?” … “I hate companies that don’t reply to consumer”… “I guess she does not like […]
  • 2005
    • Blog Trackbackcorn Must Die Cue up your 1970 dusty, scratch ridden version of the classic John Barleycorn tune long ago wafted by Traffic: There were three bloggers [1], [2], [3] came out of the West, Their fortunes for to try, And these three bloggers made a solemn vow: Blog Trackback must die. They’ve wrote, they’ve dug, they’ve harrowed it […]
  • 2004
    • Todd’s Big IDEA: Firefox search plugin for MLX Todd has done something cool. He published a search plugin for Mozilla/Firefox web browsers that provides a direct keyword search into the Maricopa Learning eXchange (MLX). I don’t do a lot of browser hopping beyond testing on the major brands. I’ve taken the cues from the Zeldmans out there to develop and test for on […]
    • The Weeks Prep for “The” Canyon Completely irrelevant to technology… but I am in a 3 week physical ramp up in preparation for a Grand Canyon backpack, 3 days, 2 nights down the Hermit Trail. I’m getting my 2-3 day a week bike commute, some good weekend climbs, like Camelback Mountain. The park service issues lots of dire warnings about people […]
  • 2003
    • Blogging Across the Curriculm From Quinnipiac University comes this gem: Blogging Across the Curriculum. Pattie Belle Hastings from the Interactive Design Department shares this resource that rose from her 2002 experiments on using student weblogs as alternatives to paper design jounrals. Her site provides a nice overview of blogging, how to blog, the role of blogs in teaching, lots […]
    • RSS Primer from EEVL A very well written introduction to RSS: RSS – A Primer for Publishers and Content Providers (I cannot locate quickly what the “EEVL” acronym stands for but it is a UK resource for engineers). I like the plain language yet the forways into some of the details of producing RSS. <tiphat>Tip of the blog hat […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 22 posts previously published on August 25th

  • 2017
    • #ResNetSem: Where It’s At (Got a WordPress Site and a Logo) Cue it up, [midi cover of] Beck. There's a thesis seminar just up the road From the academic ones that we may know A place we see the networks glow The hashtag jazz and the fresh blog flow Pulling out noun project and syndication plugins Gotta Wordpress site and a new logo Hawksey sheet just […] &amp#x27A1;
  • 2016
    • Machinations of a Certificate Design Flow The efforts of our Creative Commons Certification design team are aimed at producing a first draft version of a structured outline of what will be included and also to solicit input, ideas, and resources we should include. We have on the table a “core” portion of Creative Commons understanding that all certificates should cover, plus […] &amp#x27A1;
  • 2015
    • Gimme a Badge! My First Discourse Feature Suggestion Baked In A totally inconsequential blog post. Because I can. A total key to learning how to work with / deal with the discourse discussion software we are using for the Udg Agora project (hey there was a BLOG POST on this) … has been the discourse meta site. This is where the developers hang out, and […] &amp#x27A1;
  • 2014
    • Looking for a StoryBox Light Hack I’m pretty excited to work out my newest Storybox, a PirateBox device hidden inside an old Brownie camera I’ve seen some hacks on the PirateBox forums where people have set up enclosures with lights the activate when the thing is on. I was looking yesterday at the shutter mechanism in the front of the camera, […] &amp#x27A1;
    • Back on the Road for a Spin creative commons licensed ( BY ) flickr photo shared by 43studio Red Dog truck is loaded with camping gear and mountain bike, and ready to hit the road for a ~2 week road excursion. It’s time to get out of Strawberry a bit, and visit some friends. Plus, this is the warm up for a […] &amp#x27A1;
  • 2013
    • Creating a Page for Last 100 Posts in your WordPress Site Because she’s #ds106 #4life and an awesome grandma… #ds106 I'm looking for a way in WP to add a page that shows all of my blog posts. HELP? @cogdog @timmmmyboy http://t.co/CFxbAwhm6y — Rochelle Lockridge (@Rockylou22) August 25, 2013 I do have one of these on CogDogBlog- mainly because I wanted a reference way to be […] &amp#x27A1;
    • Even Chickens Go Headless In about 10 hours the first week of Headless ds106 launches– the first week’s assignment will be published at one minute past midnight (PST) and will appear at http://ds106.us/category/the-site/fall-2013-headless/. We already have 38 blogs in the mix- check out all the posts from participants. If you are new to ds106, your task this week is […] &amp#x27A1;
    • Keep Moving Along As I was mucking about the yard yesterday, I noticed this brightly colored caterpillar trying to climb the wall at the base of my house: cc licensed ( BY SA ) flickr photo shared by Alan Levine After spooking him/her with the camera click, I took a series of shots as it walked along the […] &amp#x27A1;
  • 2012
    • Scottlo of Arabia Our new old radio friend is off to tame the Arabian penninsula https://twitter.com/scottlo/status/239383608970850304 It seems only fitting to make a movie poster: A mighty spectacle of action and adventure! Prince Feisal: My friend Scottlo, if I may call him that. “My friend Scottlo”. How many men will claim the right to use that phrase? How […] &amp#x27A1;
    • The Last Place We Should Be Private and Protected cc licensed ( BY NC SD ) flickr photo shared by onkel_wart (thomas lieser) Last week I sat in a demonstration of a new sort of academic social networking environment that has many levels for privacy and permission. This is not a criticism at all of the software, but more at the curious attitudes of […] &amp#x27A1;
    • Google and GIFs: You Can Upload But Ye Shall Not Animate cc licensed ( BY ) flickr photo shared by Victor Bezrukov I am among the many afflicted by the ds1o6 fever of animated GIFs. Riddle me this; why oh why, Grand Oracle of Google, can one actually upload an ainamted GIF to Google Drive but not be allowed to use it? Here is an animated […] &amp#x27A1;
  • 2011
    • A PS For an Amazing Story As a followup to the May 2011 version of Amazing Stories of Openness, I got an email a few weeks back from Wendy Farmer with a nice post script. Her story was about a blog she had created with her kids to write about dinosaurs and how they connected with a professional paleontologist (click through […] &amp#x27A1;
  • 2009
    • Off The Grid cc licensed flickr photo shared by cindy47452 I cannot recall who it was, but I knew someone in the tech biz who talked about taking an occasional “Amish weekend” where he and his spouse turned off their computers, cell phones, TVs etc for 2 days as a means of focusing on life, free of gadgets. […] &amp#x27A1;
  • 2008
    • Flying Pigs, Iron Balloons, and Top Down Tagging I love tagging and still persist in vain hopes that I can encourage others to do some shared tagging, but feel lucky if I can get a handful of people to use a single tag. I am regularly tagging web sites in delicious with tags destined to be repurposed on at least 10 different web […] &amp#x27A1;
    • Holy iPhone Screen Shots Holy iPhone Screen Shots by cogdogblog posted 25 Aug ’08, 11.56pm MDT PST on flickr Enough n00b me trying to capture iPhone screens via a photo from my camera. Via comment by Guy K just press Power and Home button together: blog.guykawasaki.com/2008/08/the-art-of-ipho.html Compare to flickr.com/photos/cogdog/2798321033/ Emailed as if magic from my iPhone  Share this barking […] &amp#x27A1;
    • Your Camera Phone is a Document Scanner with Qipit Almost be sheer accident I just came across Qipit a service that allows you to take photos of sketches or whiteboards with your camera phone, email it to their site, and then have it available as a PDF or even be able to fax it. Chances are, you carry a cell phone with you everywhere […] &amp#x27A1;
    • Stories From the Dead Letter Inbox photo credit: *TreMichLan* When you send an email (and it does not bounce back) you likely have the assumption it got to the intended person. If they never respond, do you begin conjuring stories? “Why did he ignore my request?” … “I hate companies that don’t reply to consumer”… “I guess she does not like […] &amp#x27A1;
  • 2005
    • Blog Trackbackcorn Must Die Cue up your 1970 dusty, scratch ridden version of the classic John Barleycorn tune long ago wafted by Traffic: There were three bloggers [1], [2], [3] came out of the West, Their fortunes for to try, And these three bloggers made a solemn vow: Blog Trackback must die. They’ve wrote, they’ve dug, they’ve harrowed it […] &amp#x27A1;
  • 2004
    • Todd’s Big IDEA: Firefox search plugin for MLX Todd has done something cool. He published a search plugin for Mozilla/Firefox web browsers that provides a direct keyword search into the Maricopa Learning eXchange (MLX). I don’t do a lot of browser hopping beyond testing on the major brands. I’ve taken the cues from the Zeldmans out there to develop and test for on […] &amp#x27A1;
    • The Weeks Prep for “The” Canyon Completely irrelevant to technology… but I am in a 3 week physical ramp up in preparation for a Grand Canyon backpack, 3 days, 2 nights down the Hermit Trail. I’m getting my 2-3 day a week bike commute, some good weekend climbs, like Camelback Mountain. The park service issues lots of dire warnings about people […] &amp#x27A1;
  • 2003
    • Blogging Across the Curriculm From Quinnipiac University comes this gem: Blogging Across the Curriculum. Pattie Belle Hastings from the Interactive Design Department shares this resource that rose from her 2002 experiments on using student weblogs as alternatives to paper design jounrals. Her site provides a nice overview of blogging, how to blog, the role of blogs in teaching, lots […] &amp#x27A1;
    • RSS Primer from EEVL A very well written introduction to RSS: RSS – A Primer for Publishers and Content Providers (I cannot locate quickly what the “EEVL” acronym stands for but it is a UK resource for engineers). I like the plain language yet the forways into some of the details of producing RSS. <tiphat>Tip of the blog hat […] &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 *