“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 17th

  • 2018
    • The Internet Can’t Be That Bad When An Alpaca Blabberizes to You All this moaning and groaning of how bad, vile, deceptive, awful, broken the internet has become. Yeah parts are, but not all. Not all. Let me shed some alternative light your way. More than 10 years ago when I was building my collection of 50+ Web Ways to Tell Story (Wikispaces killed the site, but […]
  • 2017
    • It Came From Canada? Best Conference Swag over 14 Years Good swag? In the bag? I’m just back from Toronto where I was part of an eCampus Ontario team doing workshops for a new project aimed at capacity building among institutions in Northern Ontario (I still insist geographically it’s central, but I will stop) (soon). Ontario Extend is on the burner for it’s own post […]
  • 2014
  • 2011
    • Being of the Web There are lots of things that are “on” the web (doh) but let me ask if you think of the things you do as being “of” the web. Bear with this perhaps semantic nitpicking or old fogey wishing for the good ole days of the simple times when it was the wild wild web west. […]
    • Two More Towns, Two More ds106 Radio Broadcasts Just some quick catchup on stops in Saskatoon and last night here in Winnipeg where people not only opened their opens, filled my tunny, but wanted to get their first experience broadcasting on ds106 radio. cc licensed ( BY ) flickr photo shared by cogdogblog Last Friday it was at Rick Schwier’s home in Saskatoon […]
  • 2008
    • Apple Features “I am Smarter Than You” Search Results When you type some keywords into a search box, be prepared for a naive assumption that you are searching an entire web site. A few weeks ago, in my first aborted attempt to give money to Apple, I came across a web site on Apple.com that allows you (well after 9pm) to check whether a […]
  • 2007
    • Anyone Remember Podcasting? Google Trends on “podcasting” Podcasting is passe? No, the use of audio is not, but as a “hot trend” …..? I’ve always had mixed feelings about podcasting- as a strung together series of technologies- publishing audio in format associated with RSS that could be automatically downloaded, and optionally moved to a portable device– that I […]
  • 2006
    • Apple Keeps Twisting My Melon, Man The sad, tired tale of my lemon scented MacBookPro continues. Not following the take, it starts with one of those days (noisy fan), some bad taste from the Apple Store, a 3 day hiatus before the Lights Went Out in Screenville, followed by the sad song of Citrus Apples, a code #ID 10T, sinking to […]
    • I M A U-M B-N. U R N N-M-L flickr foto I M A U-M B-N. U R N N-M-Lavailable on flickr Thanks, Steve Gilbert for the nice gift of one of my first favorite books, CDB! by William Steig, which I sort of cobbled into the name of this blog. S N-E-1 N?  Share this barking on social media
    • Woah, Neo… FlickrStorm Just be shear, dumb, web clicking serendipity, I came across flickrStorm: (now available as Wunderstock) FlickrStorm is a better search for Flickr! It works by looking for more than what you enter to find related and more relevant images… Be surprised! Okay, there are scads of flickr search tools, and it’s not exactly clear what […]
    • Dim Screen of Near Death flickr foto The Dim Screen of Deathavailable on flickr This is as bright as my MacBookPro gets– this has happened 3 different times, once while I was watching the screen. And not, the F1/F2 keys do not help. The only way I have found to resurrect it is to shut it down for a few […]
  • 2004
    • EDUCAUSE Seminar: Objects, Trackback, RSS… maybe even the kitchen sink FYI and for self (and colleague Brian Lamb) promotion… if you are attending EDUCAUSE 2004 (October in Denver), sign up now for our pre-conference seminar Decentralization of Learning Resources: Syndicating Learning Objects Using RSS, TrackBack, and Related Technologies: Customized collections of learning objects from multiple repositories are achieved with simple, existing RSS protocols, creating access […]
    • Blogger is Growing Up (Slimming Down?) New Navbar replaces Ads It helps to have a little operation named “Google” behind you. The free blogs from Blogger.com have trashed those big fat ad banners and replaced it with a svelte navigation bar. As reported by the designer Douglas Bowman of stopdesign, there are 4 flavors to choose from, and the bar adds a blog search function […]
    • Rip. Mix. Feed. How? Apple had the perhaps now ill-fated “Rip, Mix, Burn” concept for music– I am looking for something similar (less lawyer intensive) for RSS feeds. It is taking feeds breaking them apart, and rebuilding them into something new. We can rebuild ’em. Stronger. Faster. The Six Million Dollar Feed…. So it goes: Rip a few RSS […]
    • Irony: Blogs/Expert-Centric Views to Learning/Teacher-Centric Views I told myself I would stop my critical writing mode kick, but am not listening. The RSS readers this morning brought in a Radiant Marketing link with interviews from the three of the Cluetrain dudes on the “future of blogging”. Normally I would pass on something from a “Marketing Group” where the tag line is […]
  • 2003
    • Web-A-Sketch and the beauty of obscure blogs This post is as tangential as the twisted web path it took to get there. The ending is at Allen Smith’s Web-A-Sketch, a detailed description and parts list for how he hooked up some motors to an original Etch-A-Sketch and made it so anyone could remotely control it via a web interface. An Etch-A-Sketch that […]
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 17th

  • 2018
    • The Internet Can’t Be That Bad When An Alpaca Blabberizes to You All this moaning and groaning of how bad, vile, deceptive, awful, broken the internet has become. Yeah parts are, but not all. Not all. Let me shed some alternative light your way. More than 10 years ago when I was building my collection of 50+ Web Ways to Tell Story (Wikispaces killed the site, but […] &amp#x27A1;
  • 2017
    • It Came From Canada? Best Conference Swag over 14 Years Good swag? In the bag? I’m just back from Toronto where I was part of an eCampus Ontario team doing workshops for a new project aimed at capacity building among institutions in Northern Ontario (I still insist geographically it’s central, but I will stop) (soon). Ontario Extend is on the burner for it’s own post […] &amp#x27A1;
  • 2014
  • 2011
    • Being of the Web There are lots of things that are “on” the web (doh) but let me ask if you think of the things you do as being “of” the web. Bear with this perhaps semantic nitpicking or old fogey wishing for the good ole days of the simple times when it was the wild wild web west. […] &amp#x27A1;
    • Two More Towns, Two More ds106 Radio Broadcasts Just some quick catchup on stops in Saskatoon and last night here in Winnipeg where people not only opened their opens, filled my tunny, but wanted to get their first experience broadcasting on ds106 radio. cc licensed ( BY ) flickr photo shared by cogdogblog Last Friday it was at Rick Schwier’s home in Saskatoon […] &amp#x27A1;
  • 2008
    • Apple Features “I am Smarter Than You” Search Results When you type some keywords into a search box, be prepared for a naive assumption that you are searching an entire web site. A few weeks ago, in my first aborted attempt to give money to Apple, I came across a web site on Apple.com that allows you (well after 9pm) to check whether a […] &amp#x27A1;
  • 2007
    • Anyone Remember Podcasting? Google Trends on “podcasting” Podcasting is passe? No, the use of audio is not, but as a “hot trend” …..? I’ve always had mixed feelings about podcasting- as a strung together series of technologies- publishing audio in format associated with RSS that could be automatically downloaded, and optionally moved to a portable device– that I […] &amp#x27A1;
  • 2006
    • Apple Keeps Twisting My Melon, Man The sad, tired tale of my lemon scented MacBookPro continues. Not following the take, it starts with one of those days (noisy fan), some bad taste from the Apple Store, a 3 day hiatus before the Lights Went Out in Screenville, followed by the sad song of Citrus Apples, a code #ID 10T, sinking to […] &amp#x27A1;
    • I M A U-M B-N. U R N N-M-L flickr foto I M A U-M B-N. U R N N-M-Lavailable on flickr Thanks, Steve Gilbert for the nice gift of one of my first favorite books, CDB! by William Steig, which I sort of cobbled into the name of this blog. S N-E-1 N?  Share this barking on social media &amp#x27A1;
    • Woah, Neo… FlickrStorm Just be shear, dumb, web clicking serendipity, I came across flickrStorm: (now available as Wunderstock) FlickrStorm is a better search for Flickr! It works by looking for more than what you enter to find related and more relevant images… Be surprised! Okay, there are scads of flickr search tools, and it’s not exactly clear what […] &amp#x27A1;
    • Dim Screen of Near Death flickr foto The Dim Screen of Deathavailable on flickr This is as bright as my MacBookPro gets– this has happened 3 different times, once while I was watching the screen. And not, the F1/F2 keys do not help. The only way I have found to resurrect it is to shut it down for a few […] &amp#x27A1;
  • 2004
    • EDUCAUSE Seminar: Objects, Trackback, RSS… maybe even the kitchen sink FYI and for self (and colleague Brian Lamb) promotion… if you are attending EDUCAUSE 2004 (October in Denver), sign up now for our pre-conference seminar Decentralization of Learning Resources: Syndicating Learning Objects Using RSS, TrackBack, and Related Technologies: Customized collections of learning objects from multiple repositories are achieved with simple, existing RSS protocols, creating access […] &amp#x27A1;
    • Blogger is Growing Up (Slimming Down?) New Navbar replaces Ads It helps to have a little operation named “Google” behind you. The free blogs from Blogger.com have trashed those big fat ad banners and replaced it with a svelte navigation bar. As reported by the designer Douglas Bowman of stopdesign, there are 4 flavors to choose from, and the bar adds a blog search function […] &amp#x27A1;
    • Rip. Mix. Feed. How? Apple had the perhaps now ill-fated “Rip, Mix, Burn” concept for music– I am looking for something similar (less lawyer intensive) for RSS feeds. It is taking feeds breaking them apart, and rebuilding them into something new. We can rebuild ’em. Stronger. Faster. The Six Million Dollar Feed…. So it goes: Rip a few RSS […] &amp#x27A1;
    • Irony: Blogs/Expert-Centric Views to Learning/Teacher-Centric Views I told myself I would stop my critical writing mode kick, but am not listening. The RSS readers this morning brought in a Radiant Marketing link with interviews from the three of the Cluetrain dudes on the “future of blogging”. Normally I would pass on something from a “Marketing Group” where the tag line is […] &amp#x27A1;
  • 2003
    • Web-A-Sketch and the beauty of obscure blogs This post is as tangential as the twisted web path it took to get there. The ending is at Allen Smith’s Web-A-Sketch, a detailed description and parts list for how he hooked up some motors to an original Etch-A-Sketch and made it so anyone could remotely control it via a web interface. An Etch-A-Sketch that […] &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 *