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

  • 2017
    • When People Use Your Stuff…Updated WP-Dimension Calling Card Theme I fully expected people not to be satisfied with the simple calling card templates we introduced to the Ontario Extend participants last week. I would not be. The idea was again to put a temporary placeholder at the entrance to one’s domain. Something to come back to. But you cannot suppress keeners like @NurseKillam so […]
  • 2016
    • Archiving Old WordPress Sites as Static HTML I have some old, usually forgotten WordPress sites. It happens like clutter in your office. These old sites, that will never be updated, still generate requests for updates, they get spam, if you have something like Wordfence installed, you get reminders, and they are potential holes for hackers (if you need o be scared to […]
  • 2013
    • The Professional GIFs for Sandy Leon is looking for you, Sandy Brown Jensen! No, he is not going to “clean” you, but hopefully make you appreciate maybe a little these animated GIFs. This is for today’s ds106 Daily Create: The last time we have an animated GIF assignment, Sandy emailed me and said “Nooooo! I ain’t gonna do it! And […]
    • Welcome to ds106: The Scare / Propaganda Letter About 2 weeks before the semester of a ds106 course I teach for UMW students, I send out something I lifted and borrowed from Jim Groom, what we affectionately call the “Scare Email”. Of course we do not want fearful students, but it was our way of letting them know up front how intense the […]
  • 2012
    • Crossing up the Movies: Audio Mashup Idea On today’s drive across a large swath of Virginia, I was listening to some episode of a new radio show The Truth. With production quality along the lines of This American Life I am thinking it has good examples for ds106 students to learn the qualities of good audio storytelling (use of music, sound effects, […]
  • 2008
    • Blog by Email? With Posterous Maybe Even My Mom Can Blog I feel your fatigue. I feel mine. But I keep finding them interesting! Call me a fanboy (it’s a legit word in the dictionary). Tossing a linktribution to HeyJude (HeyJude! Hi) who has clued me into many new tools, I gave a go at Posterous: Posterous is the dead simple way to put anything online […]
    • Shaken Not Stirred: 100 Years of Fleming & Bond photo credit: Mike Disharoon I doubt I lack company for people who grew up hooked on James Bond movies. After all, he was so suave, had cool toys, fast cars, girls in bikinis, traveled the world, license to kill! I want that job. And I’ll get heat, but there is only one genuine Bond persona […]
    • Let Your n00b Shine photo credit: pcesarperez People are so hung up with being labeled n00bs- it’s time for the bulk of us in that category to let our n00bility to bask in the sunshine, not hide in a closet of shame. Here are some suggestions for pumping up your n00b factor: Keep those generic icons that come with […]
  • 2007
    • Wirecast at Work Wirecast at Work posted 21 Aug ’07, 5.37pm MDT PST on flickr For the NMC Symposium on Creativity in Second Life, I put Wirecast to the test. As a streaming video solution, it allows me to broadcast a window of a desktop application, in this case Second Life, out to our streaming server (a hosted […]
  • 2006
    • Breaking the 9 Minute Spam Barrier Utterly amazing, and stupefyingly depressing… Less than 9 minutes after posting Metering Social Bookmarking Services, the inbox registered a quick response… from a casino splog: who obviously did not read my instructions: So who can get a high score (pills, porn, and casino, and other cockroach infested sites do not count)? The roaches are all […]
    • Metering Social Bookmarking Services SocialMeter looked interesting- enter a URL and it pulls some stats from major services like del.icio.us, Digg, Furl, Google, Yahoo, technorati for how many times the URL has been bookmarked. It returns a total hit count, and you can click each service to yank up its results. Of course, just like one’s first foray when […]
  • 2005
    • On The Cover of the …. flickr foto Flickr-ed Magazine: Wiki Wiki Worldavailable on my flickr More flickr fun! The Flickr Magazine Cover allows you to turn any flickr photo into your own cover. Why? Because you can? More flickr fun… Use Magazine Cover to turn a flickr photo into a magazine cover of your own title! And just to show […]
  • 2004
    • A Time to Blog, A Time to Wiki, A Time to… Friday was our first meeting for this upcoming academic with the faculty co-chairs of our Ocotillo Action Groups. Part of this was planning, part of it catch up in the research they did over the summer, but the first bit was me trying to get them up to speed on the blog/wiki/discussion board tools we […]
  • 2003
    • MLX New Feature: Public View of My Packages We just added a new feature to the Maricopa Learning eXchange (MLX)– every person that creates an account in the MLX receives their own unique URL that produces a publicly viewable web page that lists all packages entered by that person. For example, my packages are one link away: http://www.mcli.dist.maricopa.edu/mlx/mine.php?id=160 If you notice, the results […]
    • Maricopa Learning eXchange poster from MERLOT For those not lucky enough to attend the MERLOT 2003 conference (any conf in Vancouver is worthy), I just posted the content from our MLX poster session: Building the Maricopa Learning eXchange (Using a Bit of Competition and Bribery). How do you cultivate the use and contribution to a learning object repository? We will share […]
    • SoBIG is My Deletion Task Anti-Virus detection systems are removing viral email attachments, but they waste my time and clog the net with un-needed traffic by bouncing messages back to people who did not actually send them. So far, about every 8 hours, I have to delete 60-100 Anti-Virus detection messages from my inBox. I waste more time writing filters […]
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 August 21st

  • 2017
    • When People Use Your Stuff…Updated WP-Dimension Calling Card Theme I fully expected people not to be satisfied with the simple calling card templates we introduced to the Ontario Extend participants last week. I would not be. The idea was again to put a temporary placeholder at the entrance to one’s domain. Something to come back to. But you cannot suppress keeners like @NurseKillam so […] &amp#x27A1;
  • 2016
    • Archiving Old WordPress Sites as Static HTML I have some old, usually forgotten WordPress sites. It happens like clutter in your office. These old sites, that will never be updated, still generate requests for updates, they get spam, if you have something like Wordfence installed, you get reminders, and they are potential holes for hackers (if you need o be scared to […] &amp#x27A1;
  • 2013
    • The Professional GIFs for Sandy Leon is looking for you, Sandy Brown Jensen! No, he is not going to “clean” you, but hopefully make you appreciate maybe a little these animated GIFs. This is for today’s ds106 Daily Create: The last time we have an animated GIF assignment, Sandy emailed me and said “Nooooo! I ain’t gonna do it! And […] &amp#x27A1;
    • Welcome to ds106: The Scare / Propaganda Letter About 2 weeks before the semester of a ds106 course I teach for UMW students, I send out something I lifted and borrowed from Jim Groom, what we affectionately call the “Scare Email”. Of course we do not want fearful students, but it was our way of letting them know up front how intense the […] &amp#x27A1;
  • 2012
    • Crossing up the Movies: Audio Mashup Idea On today’s drive across a large swath of Virginia, I was listening to some episode of a new radio show The Truth. With production quality along the lines of This American Life I am thinking it has good examples for ds106 students to learn the qualities of good audio storytelling (use of music, sound effects, […] &amp#x27A1;
  • 2008
    • Blog by Email? With Posterous Maybe Even My Mom Can Blog I feel your fatigue. I feel mine. But I keep finding them interesting! Call me a fanboy (it’s a legit word in the dictionary). Tossing a linktribution to HeyJude (HeyJude! Hi) who has clued me into many new tools, I gave a go at Posterous: Posterous is the dead simple way to put anything online […] &amp#x27A1;
    • Shaken Not Stirred: 100 Years of Fleming & Bond photo credit: Mike Disharoon I doubt I lack company for people who grew up hooked on James Bond movies. After all, he was so suave, had cool toys, fast cars, girls in bikinis, traveled the world, license to kill! I want that job. And I’ll get heat, but there is only one genuine Bond persona […] &amp#x27A1;
    • Let Your n00b Shine photo credit: pcesarperez People are so hung up with being labeled n00bs- it’s time for the bulk of us in that category to let our n00bility to bask in the sunshine, not hide in a closet of shame. Here are some suggestions for pumping up your n00b factor: Keep those generic icons that come with […] &amp#x27A1;
  • 2007
    • Wirecast at Work Wirecast at Work posted 21 Aug ’07, 5.37pm MDT PST on flickr For the NMC Symposium on Creativity in Second Life, I put Wirecast to the test. As a streaming video solution, it allows me to broadcast a window of a desktop application, in this case Second Life, out to our streaming server (a hosted […] &amp#x27A1;
  • 2006
    • Breaking the 9 Minute Spam Barrier Utterly amazing, and stupefyingly depressing… Less than 9 minutes after posting Metering Social Bookmarking Services, the inbox registered a quick response… from a casino splog: who obviously did not read my instructions: So who can get a high score (pills, porn, and casino, and other cockroach infested sites do not count)? The roaches are all […] &amp#x27A1;
    • Metering Social Bookmarking Services SocialMeter looked interesting- enter a URL and it pulls some stats from major services like del.icio.us, Digg, Furl, Google, Yahoo, technorati for how many times the URL has been bookmarked. It returns a total hit count, and you can click each service to yank up its results. Of course, just like one’s first foray when […] &amp#x27A1;
  • 2005
    • On The Cover of the …. flickr foto Flickr-ed Magazine: Wiki Wiki Worldavailable on my flickr More flickr fun! The Flickr Magazine Cover allows you to turn any flickr photo into your own cover. Why? Because you can? More flickr fun… Use Magazine Cover to turn a flickr photo into a magazine cover of your own title! And just to show […] &amp#x27A1;
  • 2004
    • A Time to Blog, A Time to Wiki, A Time to… Friday was our first meeting for this upcoming academic with the faculty co-chairs of our Ocotillo Action Groups. Part of this was planning, part of it catch up in the research they did over the summer, but the first bit was me trying to get them up to speed on the blog/wiki/discussion board tools we […] &amp#x27A1;
  • 2003
    • MLX New Feature: Public View of My Packages We just added a new feature to the Maricopa Learning eXchange (MLX)– every person that creates an account in the MLX receives their own unique URL that produces a publicly viewable web page that lists all packages entered by that person. For example, my packages are one link away: http://www.mcli.dist.maricopa.edu/mlx/mine.php?id=160 If you notice, the results […] &amp#x27A1;
    • Maricopa Learning eXchange poster from MERLOT For those not lucky enough to attend the MERLOT 2003 conference (any conf in Vancouver is worthy), I just posted the content from our MLX poster session: Building the Maricopa Learning eXchange (Using a Bit of Competition and Bribery). How do you cultivate the use and contribution to a learning object repository? We will share […] &amp#x27A1;
    • SoBIG is My Deletion Task Anti-Virus detection systems are removing viral email attachments, but they waste my time and clog the net with un-needed traffic by bouncing messages back to people who did not actually send them. So far, about every 8 hours, I have to delete 60-100 Anti-Virus detection messages from my inBox. I waste more time writing filters […] &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 *