“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 18 posts previously published on December 7th

  • 2020
    • The Web’s Oldest Obsession: Lists of Links Last week there was a request for resources in a certain domain (this was on a listserv (see recursion) related to open education resources). As people, do they shared links, but I noted with irony that several of them were links to other web pages of listed links. It gave me one of those flashbacks, […]
  • 2018
    • Englebarting Convergence I consider myself so fortunate to have had a few Doug Engelbart convergences in my career. That featured image at the top was made by me after he was a guest at a 2006 NMC Board Meeting. I took my own photograph of him at the meeting and superimposed it from a screenshot of the […]
  • 2013
    • Infrared 900 GIFaChrome Not only has stealth agent “BB” been able to produce a schematic evidence of a new GIFaChrome camera, he now produces something so startling in its power, you are likely to doubt its veracity. Or something like that. From what we can understand, a new time tunnling high speed Infrared film (GIFaChrome IR900) inside an […]
    • Clues to GIFaChrome Technology Discovered in Stolen Schematic Diagram If you have been under a rock, buried in email, or not paying attention, a core group of renegade devoted headless ds106ers are pursing art, information, and history of the mysterious and poorly understood GIFaChrome camera. You can find the most current information at http://gifachrome.com/. I have been in contact today with an operative only […]
    • First Clicks with the GIFaChrome Wow, have I been delinquent on catching up on the crazy creative riffing going on among the ds106ers in Google+. Besides spinning out Collaborative GIF stories they have mashed up glitch art and animated GIFs, and discovered/invented an entire new kind of photographic device, the GIFaChrome. Check out the new site Rochelle is weaving to […]
  • 2012
    • Now What? cc licensed ( BY ) flickr photo shared by striatic A week ago I drove into my driveway and parked the truck. Nothing special eh? Except that it was 11 months and 14,000+ miles since I had last backed out of the January. This second cross country jaunt was not meticulously statistically tracked as the […]
  • 2011
    • Paging Twitter: Stomp Spam Before It Eats You cc licensed ( BY ND ) flickr photo shared by gurms Hello, @twitter. A little spam is treatable. Block, report. But it keeps coming back, like pesky roaches. I agree with @timmmmyboy – why is there not even a little bit of logic applied at the door? Here is the most easy kind of twitter […]
  • 2010
    • I’m With Jim (#ds106 as open course) I have signed up for more open courses and barely participated in all of them- but I am aiming to break my mold with just off the press bavadelicious announcement from Jim Groom that he would be leading an online and open course version of his ds106 Digital Storytelling course at University of Mary Washington. […]
  • 2009
    • All My Webinars Feel Like a Verizon Commercial I’m kind of glad they retired the Verizon guy or maybe because I don’t watch TV I don’t see him anymore. One Onion scented site suggests he got a brain tumor that had nothing to do with the phone while others report there are very strict rules as to how a Verizon Dude should be […]
  • 2008
    • Watching TV Not on a TV I’ve already waxed on the demise of the television I grew up with. So long. I just finished watching a funny episode of the Simpsons, but my TV is still off (actually it gets no reception); I watched Mypods and Boomsticks on Hulu which in true form, poked some fun at “Mapple”, it’s “MyPods” and […]
  • 2007
    • Second Life Live Video Stream Setup Second Life Live Video Stream Setup posted 7 Dec ’07, 11.33am MST PST on flickr My home office technology used for the NMC Symposium on Evolution of Communcation held entirely in Second Life. The PC on the left, a high HP game station, is my Second Life camera, operated by my alt avatar, Zoraster Gaffer. […]
    • Facebook Facebook Facebook (Link Farm Spam Bait) Considering the blog post immediately before this one drew a link farm spam trackback in near real time, I am testing them to see how quickly they pick this one up. The site that spammed ne is purportedly called “Social Networking News for Myspace / Facebook / Etc.” but is composed entirely of blog post […]
    • Shuddup You, Facebook! This dog has put down a paw on the dominant proliferating swine source of email bacn. Getting an email notification of an “X me” message (no idea why that is different from any other message), I wasted my time/bandwidth to find someone sent me a snowman. Thanks, sweet thought, but… I will not put up […]
  • 2006
    • On The (airport) Road The traveling shoes are on. I’m at the Phoenix airport, as always bowing my thanks towards the city mayor for sponsoring this lovely and free wireless access at Sky Harbor Airport. I’m off to San Francisco for 2 days, one an NMC staff meeting and Friday is one of our quarterly NMC Board meetings. For […]
  • 2005
    • Web Design Reason #10,375 To Hate Internet Explorer PT Barnum’s rule lives alive and well that the buggiest, most inexplicable, frustrating (tabless) Web browser in terns of its refusal to follow Web Standards has the most users. Again, I have found that my time in web design is spent: * 30% developing a solid design in a web-standard browser such as FireFox * […]
    • By The Time You Get To Phoenix Some people may pay heed to the title of Glen Campbell songs (who is a local, and has even taken tours of the Phoenix Jail) and give me a call or email before landing at Sky Harbor Airport. Micheal Roy, from Wesleyan, and I have exchanged emails for a few years but have always missed […]
  • 2004
    • Tufte Tour Edward Tufte‘s short course “Presenting Data and Information” is coming to town in late January… can anyone who has attended one of these or knows a friend who has (or a second cousin of their mother-in-law’s dentist) let me know if it is worth it? Or should I just buy the t-shirt?  Share this barking […]
    • I Spent All Afternoon Writing One E-Mail Message No, I did not have writers block or a novel to compose. Actually the email question was not even mine, but written to be sent under someone else’s name. Could this be Alan’s Secret Neutron Bomb that would eviscerate spammers? Nahhhh, ya must be dreamin’. Now, these are some messages that get generated from our […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 18 posts previously published on December 7th

  • 2020
    • The Web’s Oldest Obsession: Lists of Links Last week there was a request for resources in a certain domain (this was on a listserv (see recursion) related to open education resources). As people, do they shared links, but I noted with irony that several of them were links to other web pages of listed links. It gave me one of those flashbacks, […] &amp#x27A1;
  • 2018
    • Englebarting Convergence I consider myself so fortunate to have had a few Doug Engelbart convergences in my career. That featured image at the top was made by me after he was a guest at a 2006 NMC Board Meeting. I took my own photograph of him at the meeting and superimposed it from a screenshot of the […] &amp#x27A1;
  • 2013
    • Infrared 900 GIFaChrome Not only has stealth agent “BB” been able to produce a schematic evidence of a new GIFaChrome camera, he now produces something so startling in its power, you are likely to doubt its veracity. Or something like that. From what we can understand, a new time tunnling high speed Infrared film (GIFaChrome IR900) inside an […] &amp#x27A1;
    • Clues to GIFaChrome Technology Discovered in Stolen Schematic Diagram If you have been under a rock, buried in email, or not paying attention, a core group of renegade devoted headless ds106ers are pursing art, information, and history of the mysterious and poorly understood GIFaChrome camera. You can find the most current information at http://gifachrome.com/. I have been in contact today with an operative only […] &amp#x27A1;
    • First Clicks with the GIFaChrome Wow, have I been delinquent on catching up on the crazy creative riffing going on among the ds106ers in Google+. Besides spinning out Collaborative GIF stories they have mashed up glitch art and animated GIFs, and discovered/invented an entire new kind of photographic device, the GIFaChrome. Check out the new site Rochelle is weaving to […] &amp#x27A1;
  • 2012
    • Now What? cc licensed ( BY ) flickr photo shared by striatic A week ago I drove into my driveway and parked the truck. Nothing special eh? Except that it was 11 months and 14,000+ miles since I had last backed out of the January. This second cross country jaunt was not meticulously statistically tracked as the […] &amp#x27A1;
  • 2011
    • Paging Twitter: Stomp Spam Before It Eats You cc licensed ( BY ND ) flickr photo shared by gurms Hello, @twitter. A little spam is treatable. Block, report. But it keeps coming back, like pesky roaches. I agree with @timmmmyboy – why is there not even a little bit of logic applied at the door? Here is the most easy kind of twitter […] &amp#x27A1;
  • 2010
    • I’m With Jim (#ds106 as open course) I have signed up for more open courses and barely participated in all of them- but I am aiming to break my mold with just off the press bavadelicious announcement from Jim Groom that he would be leading an online and open course version of his ds106 Digital Storytelling course at University of Mary Washington. […] &amp#x27A1;
  • 2009
    • All My Webinars Feel Like a Verizon Commercial I’m kind of glad they retired the Verizon guy or maybe because I don’t watch TV I don’t see him anymore. One Onion scented site suggests he got a brain tumor that had nothing to do with the phone while others report there are very strict rules as to how a Verizon Dude should be […] &amp#x27A1;
  • 2008
    • Watching TV Not on a TV I’ve already waxed on the demise of the television I grew up with. So long. I just finished watching a funny episode of the Simpsons, but my TV is still off (actually it gets no reception); I watched Mypods and Boomsticks on Hulu which in true form, poked some fun at “Mapple”, it’s “MyPods” and […] &amp#x27A1;
  • 2007
    • Second Life Live Video Stream Setup Second Life Live Video Stream Setup posted 7 Dec ’07, 11.33am MST PST on flickr My home office technology used for the NMC Symposium on Evolution of Communcation held entirely in Second Life. The PC on the left, a high HP game station, is my Second Life camera, operated by my alt avatar, Zoraster Gaffer. […] &amp#x27A1;
    • Facebook Facebook Facebook (Link Farm Spam Bait) Considering the blog post immediately before this one drew a link farm spam trackback in near real time, I am testing them to see how quickly they pick this one up. The site that spammed ne is purportedly called “Social Networking News for Myspace / Facebook / Etc.” but is composed entirely of blog post […] &amp#x27A1;
    • Shuddup You, Facebook! This dog has put down a paw on the dominant proliferating swine source of email bacn. Getting an email notification of an “X me” message (no idea why that is different from any other message), I wasted my time/bandwidth to find someone sent me a snowman. Thanks, sweet thought, but… I will not put up […] &amp#x27A1;
  • 2006
    • On The (airport) Road The traveling shoes are on. I’m at the Phoenix airport, as always bowing my thanks towards the city mayor for sponsoring this lovely and free wireless access at Sky Harbor Airport. I’m off to San Francisco for 2 days, one an NMC staff meeting and Friday is one of our quarterly NMC Board meetings. For […] &amp#x27A1;
  • 2005
    • Web Design Reason #10,375 To Hate Internet Explorer PT Barnum’s rule lives alive and well that the buggiest, most inexplicable, frustrating (tabless) Web browser in terns of its refusal to follow Web Standards has the most users. Again, I have found that my time in web design is spent: * 30% developing a solid design in a web-standard browser such as FireFox * […] &amp#x27A1;
    • By The Time You Get To Phoenix Some people may pay heed to the title of Glen Campbell songs (who is a local, and has even taken tours of the Phoenix Jail) and give me a call or email before landing at Sky Harbor Airport. Micheal Roy, from Wesleyan, and I have exchanged emails for a few years but have always missed […] &amp#x27A1;
  • 2004
    • Tufte Tour Edward Tufte‘s short course “Presenting Data and Information” is coming to town in late January… can anyone who has attended one of these or knows a friend who has (or a second cousin of their mother-in-law’s dentist) let me know if it is worth it? Or should I just buy the t-shirt?  Share this barking […] &amp#x27A1;
    • I Spent All Afternoon Writing One E-Mail Message No, I did not have writers block or a novel to compose. Actually the email question was not even mine, but written to be sent under someone else’s name. Could this be Alan’s Secret Neutron Bomb that would eviscerate spammers? Nahhhh, ya must be dreamin’. Now, these are some messages that get generated from our […] &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 *