“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 October 4th

  • 2021
    • A Tuneup for the WP-Dimension WordPress Theme I’ve been tinkering with some under the hood updates to one of my favorite WordPress Calling Card themes, in fact it was the first one ever, WP-Dimension. I’ve not done much to these themes in a long while (like maybe pre-pre-pre-pre pandemic) but was motivated by a rare but welcome issue submitted to the GitHub […]
  • 2020
    • Putting The Daily Back in Daily Photo It’s still my daily habit. I cannot let go of it. 2020 marks the 13th year I have been posting daily photos to flickr, and dropping them to into the 366photos group — heck the 4th round it’s been a leap year. That first one was a leap, hence it’s a wrong URL 3 years […]
  • 2018
    • WordPress Quick Fixing Again I will spend more time writing up a blog post about some little thing I did than actually doing the little thing. Maybe it’s my vanity, or just trying to capture how I go about my work. It’s my blog and I can blog what I want… Sometimes I take these little self dares […]
  • 2014
    • Ten Years Between New Zealand Visits creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog When I visited New Zealand in 2004, I was excited to find the source of wikis. This being of course, a time when wikis were a platform I was excited about sharing. In going through my flickr photos of that visit, besides guffawing at […]
    • No, You Can’t Use My Photo for Your Fake Identity, and No, I Can’t Prevent It That’s my photo, but that’s not my name or occupation. My mug has been hijacked by someone pretending to be someone who does not exist. Like many of you, I had no idea this kind of thing went on. It’s called Catfishing. Welcome to the dark underbelly of openness. I’ve read with the greatest respect […]
    • I Think They Got More Than Enough of Me at Shar-e-fest creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog Monday and Tuesday of this week was spent at the Shar-E-Fest conference at Wintec in Hamilton. I know I did a workshop here almost 10 years ago, November of 2004. Maybe it was the same topic as this time. This is a relatively small, […]
  • 2013
    • #MoPoCoPa is Mom Powered Comment Patrol We know comments on YouTube are bad. Really bad. And what are the great minds and engineers at Google doing? Bubkhas. Therefore, a small distributed group of technical savvy pissed off Mom’s have developed a new internet protocol invoked by calling #MoPoCoPa. With reverse geolocation DNA gene tracking database realtime quadro facto lookup, an offending […]
  • 2012
    • A Parsnip’s Wild Philosophy Submitted for no one’s approaval, another design example for the ds106 Minimalize Your Philosophy assignment: Pick your favorite quote OR make up your own phrase which describes a philosophy that you try to live by. It can be about love, friendship, family, education, culture, health, charity, etc. Design a minimalist poster depicting the concept. Extra […]
    • Growth Growth It was time tonight to do some ds106 design assignment, this time a Triple Troll Quote. the classic ds106 assignment game of mixup and mis-attribution: Find an image of a well known figure, add to it a famous quote by someone related in some way to the figure in the image and then attribute the […]
  • 2011
    • Not a Bad Trip Cannot resist the ds106 four icon challenges! This one was easy as the images I found were all black and white. Too easy? What’s the movie?  Share this barking on social media
    • From an Iconic Movie It felt time to play a Four Icon Challenge assignment in ds106. it’s always hard to know if you make these too challenging or too easy, I am thinking this one is the latter. My approach, as I usually cannot recall movies all that well, is to watch some YouTube clips to remind me of […]
    • Roadstats: Week 15 cc licensed ( BY ) flickr photo shared by cogdogblog Number of days on the road: 98 Miles Driven: 9661 Number of States/Provinces driven in: 17 Number of US/Canadian Border Crossings: 2 Money spent on gas: $2604 Amount of time required to drive 47 miles from Falls Church VA to Baltimore DC: 2.5 hours (frustration: […]
    • ds106 Radio Parodies Itself cc licensed ( BY ) flickr photo shared by cogdogblog You had to be there. Well, I am glad I was there. GNA Garcia and Jim Groom here are having too much fun doing a improv version of Mikhail Gershovich’s radio conversations with his mom. Or maybe we had too much fun watching. As part […]
  • 2009
    • My First View of the Grand Canyon cc licensed flickr photo shared by cogdogblog I was down today at a friend’s antique store in Pine, and decided to grab this old Viewmaster, which I remember fondly as a kid, clicking my way through the seven wonders of the world, seeing the Grand Canyon in its tinted technicolor. Now I need to find […]
    • Turning Status Quo Inside Out I am but one among millions that get a TED experience by sampling the videos they freely share. I did get a faintwhiff of a TED halo experience as the NMC 2009 Summer Conference was held in the original TED venue at Monterey Bay, so I stood on the stage where TEDness happened.. What I […]
  • 2008
    • Open is in the air I’m not quite ready to stake any big bets on it, but my ed tech radar is feeling like we are getting more blips about open education / open content / open learning… There is the grand experiment of Siemens and Downes on a Massively Open Online Course (acronym alert! MOOC) with their now running […]
    • Domo Maku Desu. Konichi Wa Pasocon Desu. Hey, these guys do their shtick in Japan! Wait, they are different! No, the same? Oh well, it’s a great ad in any language. However, no sign of Bill and Jerry and the butt scrunch thing. Whew.  Share this barking on social media
  • 2004
    • Revving Up the eP Finally, we are starting to see some signs of activity on our Maricopa ePortfolio site. Originally developed at and for faculty and students at one our colleges, Chandler-Gilbert Community College, the developer has graciously shared it on a server in our office that is open to everyone at our 9 other colleges. It has been […]
    • Holy Meta Data! Flickr Strikes Again Wow, a side benefit to the iPhoto to flickr plugin is that it grabs the metadata iPhoto stores for the images, as I noticed images such as the giant Fred Flinstone I had uploaded this was had been (correctly) identifies as having been taken with an Olympus 4040 digital camera. This is good meta data- […]
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 October 4th

  • 2021
    • A Tuneup for the WP-Dimension WordPress Theme I’ve been tinkering with some under the hood updates to one of my favorite WordPress Calling Card themes, in fact it was the first one ever, WP-Dimension. I’ve not done much to these themes in a long while (like maybe pre-pre-pre-pre pandemic) but was motivated by a rare but welcome issue submitted to the GitHub […] &amp#x27A1;
  • 2020
    • Putting The Daily Back in Daily Photo It’s still my daily habit. I cannot let go of it. 2020 marks the 13th year I have been posting daily photos to flickr, and dropping them to into the 366photos group — heck the 4th round it’s been a leap year. That first one was a leap, hence it’s a wrong URL 3 years […] &amp#x27A1;
  • 2018
    • WordPress Quick Fixing Again I will spend more time writing up a blog post about some little thing I did than actually doing the little thing. Maybe it’s my vanity, or just trying to capture how I go about my work. It’s my blog and I can blog what I want… Sometimes I take these little self dares […] &amp#x27A1;
  • 2014
    • Ten Years Between New Zealand Visits creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog When I visited New Zealand in 2004, I was excited to find the source of wikis. This being of course, a time when wikis were a platform I was excited about sharing. In going through my flickr photos of that visit, besides guffawing at […] &amp#x27A1;
    • No, You Can’t Use My Photo for Your Fake Identity, and No, I Can’t Prevent It That’s my photo, but that’s not my name or occupation. My mug has been hijacked by someone pretending to be someone who does not exist. Like many of you, I had no idea this kind of thing went on. It’s called Catfishing. Welcome to the dark underbelly of openness. I’ve read with the greatest respect […] &amp#x27A1;
    • I Think They Got More Than Enough of Me at Shar-e-fest creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog Monday and Tuesday of this week was spent at the Shar-E-Fest conference at Wintec in Hamilton. I know I did a workshop here almost 10 years ago, November of 2004. Maybe it was the same topic as this time. This is a relatively small, […] &amp#x27A1;
  • 2013
    • #MoPoCoPa is Mom Powered Comment Patrol We know comments on YouTube are bad. Really bad. And what are the great minds and engineers at Google doing? Bubkhas. Therefore, a small distributed group of technical savvy pissed off Mom’s have developed a new internet protocol invoked by calling #MoPoCoPa. With reverse geolocation DNA gene tracking database realtime quadro facto lookup, an offending […] &amp#x27A1;
  • 2012
    • A Parsnip’s Wild Philosophy Submitted for no one’s approaval, another design example for the ds106 Minimalize Your Philosophy assignment: Pick your favorite quote OR make up your own phrase which describes a philosophy that you try to live by. It can be about love, friendship, family, education, culture, health, charity, etc. Design a minimalist poster depicting the concept. Extra […] &amp#x27A1;
    • Growth Growth It was time tonight to do some ds106 design assignment, this time a Triple Troll Quote. the classic ds106 assignment game of mixup and mis-attribution: Find an image of a well known figure, add to it a famous quote by someone related in some way to the figure in the image and then attribute the […] &amp#x27A1;
  • 2011
    • Not a Bad Trip Cannot resist the ds106 four icon challenges! This one was easy as the images I found were all black and white. Too easy? What’s the movie?  Share this barking on social media &amp#x27A1;
    • From an Iconic Movie It felt time to play a Four Icon Challenge assignment in ds106. it’s always hard to know if you make these too challenging or too easy, I am thinking this one is the latter. My approach, as I usually cannot recall movies all that well, is to watch some YouTube clips to remind me of […] &amp#x27A1;
    • Roadstats: Week 15 cc licensed ( BY ) flickr photo shared by cogdogblog Number of days on the road: 98 Miles Driven: 9661 Number of States/Provinces driven in: 17 Number of US/Canadian Border Crossings: 2 Money spent on gas: $2604 Amount of time required to drive 47 miles from Falls Church VA to Baltimore DC: 2.5 hours (frustration: […] &amp#x27A1;
    • ds106 Radio Parodies Itself cc licensed ( BY ) flickr photo shared by cogdogblog You had to be there. Well, I am glad I was there. GNA Garcia and Jim Groom here are having too much fun doing a improv version of Mikhail Gershovich’s radio conversations with his mom. Or maybe we had too much fun watching. As part […] &amp#x27A1;
  • 2009
    • My First View of the Grand Canyon cc licensed flickr photo shared by cogdogblog I was down today at a friend’s antique store in Pine, and decided to grab this old Viewmaster, which I remember fondly as a kid, clicking my way through the seven wonders of the world, seeing the Grand Canyon in its tinted technicolor. Now I need to find […] &amp#x27A1;
    • Turning Status Quo Inside Out I am but one among millions that get a TED experience by sampling the videos they freely share. I did get a faintwhiff of a TED halo experience as the NMC 2009 Summer Conference was held in the original TED venue at Monterey Bay, so I stood on the stage where TEDness happened.. What I […] &amp#x27A1;
  • 2008
    • Open is in the air I’m not quite ready to stake any big bets on it, but my ed tech radar is feeling like we are getting more blips about open education / open content / open learning… There is the grand experiment of Siemens and Downes on a Massively Open Online Course (acronym alert! MOOC) with their now running […] &amp#x27A1;
    • Domo Maku Desu. Konichi Wa Pasocon Desu. Hey, these guys do their shtick in Japan! Wait, they are different! No, the same? Oh well, it’s a great ad in any language. However, no sign of Bill and Jerry and the butt scrunch thing. Whew.  Share this barking on social media &amp#x27A1;
  • 2004
    • Revving Up the eP Finally, we are starting to see some signs of activity on our Maricopa ePortfolio site. Originally developed at and for faculty and students at one our colleges, Chandler-Gilbert Community College, the developer has graciously shared it on a server in our office that is open to everyone at our 9 other colleges. It has been […] &amp#x27A1;
    • Holy Meta Data! Flickr Strikes Again Wow, a side benefit to the iPhoto to flickr plugin is that it grabs the metadata iPhoto stores for the images, as I noticed images such as the giant Fred Flinstone I had uploaded this was had been (correctly) identifies as having been taken with an Olympus 4040 digital camera. This is good meta data- […] &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 *