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

  • 2016
    • Broadening The Choral Explanation Concept We think the developing structure for the Creative Commons Certifications should be more than content and assignment-type activities; that there should be a component of public participating, activity, even encouraging people to be “Defenders of the Commons.” That was the thinking behind our making a case for a Creative Commons Stack Exchange, seeing the Stack […]
  • 2015
    • An Ultimate Domain of My Own A bunch of years ago I as envious that Matt Mullenweg had scored a perfect domain for himself ma.tt. Well. if you invent something like WordPress, I guess you are not unlucky at cards. I looked into seeing if I could get al.an – that top level domain was for the Netherlands Antilles but at […]
    • My First Stint as a VConnecting Buddy On Thursday I had my first seat in the control room as a Virtual Buddy for a now expanding project (http://virtuallyconnecting.org/) started by Maha Bali and Rebecca Hogue. I had been a participant in the session on Tuesday; this week there were several sessions set up for the Digital Pedagogy Lab happening this week in […]
    • Faded Memories My google calendar reminders ticks off another ding marking the date of passing of another family member, Monday was the day in 1977 … 39 years ago… that my Aunt Eve passed away. What I know of her is even more limited than my grandparents, the media layer is thin. Hers was one of the […]
  • 2013
    • More Interior Work on ds106 Assignment Bank Theme It could be I am just out of coding shape or there is more to this reshaping of the ds106 Assignment Bank than it seems. I’d hedge money on the former, but not for ling. This afternoon was spent doing more inside shuffling and some important theme adjustments. But now at least we have a […]
  • 2012
    • Crumblin’ Down cc licensed ( BY ) flickr photo shared by cogdogblog On my last day in Fredericksburg, I went to the bank to close out an account, and came across the spectacle above. There was a crowd watching, one person filming with an iPad (that still makes me laugh like a 12 year-old), plus other gawkers […]
  • 2010
    • Tag or Be Tagged? cc licensed flickr photo shared by ~Aphrodite After all these years (this march will be the 7th) I still love flickr most of all what has become Web 2.0 – the Vancouver crew that fortunately failed on Game Never Ending (that explains the .gne extensions on some of the flickr URLs) for it right on […]
    • Card Carrying Agent I found the site that creates these fun ID cards a while ago (it probably came from the Generator Blog), but yes, I am a card carrying Agent. I might be armed. Or pawed. Of course this may not quite as good as Scott Leslie‘s real business card that says “Shit Disturber”.  Share this barking […]
  • 2008
    • WordPress Fanboy Pinnacle Talk About WordPres Fan Boy by cogdogblog posted 16 Aug ’08, 1.24am MDT PST on flickr How cool to have dinner with ma.tt Mullenweg and satisfy my WordPress fanboy moment Wish me luck tomorrow, I present first on the schedule (rumor is there is actually a schedule for WordCamp). A fun evening meeting people who […]
  • 2006
    • Cleveland Rocked flickr foto NMC Conference DVD is Hereavailable on flickr Cleveland Rocked! So did NMC at the 2006 Summer Conference, and rocks even more since this year each participant gets their own DVD… there are the keynotes, the amazing jam session at the Rock and Roll Hall of Fame, examples of digital stories from the workshops, […]
    • Portals Redux Long before “Web 2.0”, “social software”, the big web buzzword was “portals”— A portal, or enterprise information portal (EIP), is a Web site that integrates an organization’s knowledge base and all related applications into a single user-customizable environment. This environment acts as a one-stop shop, or “gateway,” for users’ information and system needs. So it […]
  • 2005
    • Feedng, grazing, Ignore No Need to Click Here – I’m just claiming my feed at Feedster Update: WTF with Feedster? I’ve had an account there since they’ve been out but their “MyFeedster” interface is acting like bad alpha software- the change password form uses Text input fields rather than password types, it does not process the change request, […]
    • Signpost of the Impeding Demise of Civilization, Culture, Society As We Think We Know It Can the level of tasteless go any further down the crapper? This is “reality”? Yikes. I’m saving my pennies to purchase an uninhabited South Pacific island, off the grid. Good luck to the rest of you.  Share this barking on social media
    • Distributed Conversations: More Than Four Reasons Worth more than the banner “2 Cents Worth”, David Warlick muses on Four Reasons Why the Blogsphere Might Make a Better Professional Collaborative Environment than Discussion Forums: I have been experimenting a good bit lately with integrating some of the emerging web tools (blogs, wikis, rss, podcasting, etc.) into my presentations and workshops, attempting to […]
  • 2004
    • Zillman Blog Endless Link Loop: Where’s the White Paper? Sifting through the EDU_RSS feeds this evening, I found this reference: Bots, blogs and news aggregators The brilliant Marcus P. Zillman has compiled a free 20-page whitepaper on Bots, Blogs and News Aggregators (PDF). Good stuff. I’m working on a similar effort for a new Social Media blog I’m about to announce. Sounded tempting. I’ve […]
  • 2003
    • New RSS: Yahoo Groups I am not in too many (or maybe zero) Yahoo Groups (and if so I never have them sent to clutter my email) but this Yahoo Groups RSS URI Generator is ideal for keeping updated on public groups without trudging through the Yahoo site. This page contains JavaScript that will accept a Yahoo group name […]
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 16th

  • 2016
    • Broadening The Choral Explanation Concept We think the developing structure for the Creative Commons Certifications should be more than content and assignment-type activities; that there should be a component of public participating, activity, even encouraging people to be “Defenders of the Commons.” That was the thinking behind our making a case for a Creative Commons Stack Exchange, seeing the Stack […] &amp#x27A1;
  • 2015
    • An Ultimate Domain of My Own A bunch of years ago I as envious that Matt Mullenweg had scored a perfect domain for himself ma.tt. Well. if you invent something like WordPress, I guess you are not unlucky at cards. I looked into seeing if I could get al.an – that top level domain was for the Netherlands Antilles but at […] &amp#x27A1;
    • My First Stint as a VConnecting Buddy On Thursday I had my first seat in the control room as a Virtual Buddy for a now expanding project (http://virtuallyconnecting.org/) started by Maha Bali and Rebecca Hogue. I had been a participant in the session on Tuesday; this week there were several sessions set up for the Digital Pedagogy Lab happening this week in […] &amp#x27A1;
    • Faded Memories My google calendar reminders ticks off another ding marking the date of passing of another family member, Monday was the day in 1977 … 39 years ago… that my Aunt Eve passed away. What I know of her is even more limited than my grandparents, the media layer is thin. Hers was one of the […] &amp#x27A1;
  • 2013
    • More Interior Work on ds106 Assignment Bank Theme It could be I am just out of coding shape or there is more to this reshaping of the ds106 Assignment Bank than it seems. I’d hedge money on the former, but not for ling. This afternoon was spent doing more inside shuffling and some important theme adjustments. But now at least we have a […] &amp#x27A1;
  • 2012
    • Crumblin’ Down cc licensed ( BY ) flickr photo shared by cogdogblog On my last day in Fredericksburg, I went to the bank to close out an account, and came across the spectacle above. There was a crowd watching, one person filming with an iPad (that still makes me laugh like a 12 year-old), plus other gawkers […] &amp#x27A1;
  • 2010
    • Tag or Be Tagged? cc licensed flickr photo shared by ~Aphrodite After all these years (this march will be the 7th) I still love flickr most of all what has become Web 2.0 – the Vancouver crew that fortunately failed on Game Never Ending (that explains the .gne extensions on some of the flickr URLs) for it right on […] &amp#x27A1;
    • Card Carrying Agent I found the site that creates these fun ID cards a while ago (it probably came from the Generator Blog), but yes, I am a card carrying Agent. I might be armed. Or pawed. Of course this may not quite as good as Scott Leslie‘s real business card that says “Shit Disturber”.  Share this barking […] &amp#x27A1;
  • 2008
    • WordPress Fanboy Pinnacle Talk About WordPres Fan Boy by cogdogblog posted 16 Aug ’08, 1.24am MDT PST on flickr How cool to have dinner with ma.tt Mullenweg and satisfy my WordPress fanboy moment Wish me luck tomorrow, I present first on the schedule (rumor is there is actually a schedule for WordCamp). A fun evening meeting people who […] &amp#x27A1;
  • 2006
    • Cleveland Rocked flickr foto NMC Conference DVD is Hereavailable on flickr Cleveland Rocked! So did NMC at the 2006 Summer Conference, and rocks even more since this year each participant gets their own DVD… there are the keynotes, the amazing jam session at the Rock and Roll Hall of Fame, examples of digital stories from the workshops, […] &amp#x27A1;
    • Portals Redux Long before “Web 2.0”, “social software”, the big web buzzword was “portals”— A portal, or enterprise information portal (EIP), is a Web site that integrates an organization’s knowledge base and all related applications into a single user-customizable environment. This environment acts as a one-stop shop, or “gateway,” for users’ information and system needs. So it […] &amp#x27A1;
  • 2005
    • Feedng, grazing, Ignore No Need to Click Here – I’m just claiming my feed at Feedster Update: WTF with Feedster? I’ve had an account there since they’ve been out but their “MyFeedster” interface is acting like bad alpha software- the change password form uses Text input fields rather than password types, it does not process the change request, […] &amp#x27A1;
    • Signpost of the Impeding Demise of Civilization, Culture, Society As We Think We Know It Can the level of tasteless go any further down the crapper? This is “reality”? Yikes. I’m saving my pennies to purchase an uninhabited South Pacific island, off the grid. Good luck to the rest of you.  Share this barking on social media &amp#x27A1;
    • Distributed Conversations: More Than Four Reasons Worth more than the banner “2 Cents Worth”, David Warlick muses on Four Reasons Why the Blogsphere Might Make a Better Professional Collaborative Environment than Discussion Forums: I have been experimenting a good bit lately with integrating some of the emerging web tools (blogs, wikis, rss, podcasting, etc.) into my presentations and workshops, attempting to […] &amp#x27A1;
  • 2004
    • Zillman Blog Endless Link Loop: Where’s the White Paper? Sifting through the EDU_RSS feeds this evening, I found this reference: Bots, blogs and news aggregators The brilliant Marcus P. Zillman has compiled a free 20-page whitepaper on Bots, Blogs and News Aggregators (PDF). Good stuff. I’m working on a similar effort for a new Social Media blog I’m about to announce. Sounded tempting. I’ve […] &amp#x27A1;
  • 2003
    • New RSS: Yahoo Groups I am not in too many (or maybe zero) Yahoo Groups (and if so I never have them sent to clutter my email) but this Yahoo Groups RSS URI Generator is ideal for keeping updated on public groups without trudging through the Yahoo site. This page contains JavaScript that will accept a Yahoo group name […] &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 *