“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 22 posts previously published on February 3rd

  • 2020
    • The Daily Blank Theme Gets a Media Uploader Maybe it’s not much news to have a media uploader used in a WordPress site… but what if I said you can do that on a site without needing an account or a trip to the ugly dashboard? That’s been a big round of improvements over the last 3 months, a revamp of the TRU […]
  • 2019
    • Got Room For Story in that Metadata Schema? I don’t dislike metadata at all. It does wonderful things to organize heaps of media, content. But it sometimes leaving me… cold. A tweet from Bryan Alexander got this mind clicking. It’s a great story. The Ed Bacon Project is uploading thousands of photos (all with open licenses) documenting the city of Philadelphia, asking the […]
  • 2017
    • The #netnarr Twist on Guest Speaker Videos and Annotation Thereof I will make a grossly sweeping and unfairly generalized stereotype, but in my mind alot of time courses use two way video to bring in guest experts, comes across as central casting “Confident professor. Confident grey hair senior man in formalwear keeping arms crossed and looking at camera while leaning at the table and with […]
  • 2016
    • Technologies Never Completely Die: Get On a Gopher Server Back in my NMC days in 2011 we did a live webinar conversation with Kevin Kelly. While I never got wrapped up in technology wanting things, I do vividly remember Kelly’s concept of immortal technologies, that unlike extinct animals, technologies still remain out on some long tail curve of obscure ebay sales pages. In his […]
    • Bringing the Cool Web Stuff to Puerto Rico One day after arriving in Puerto Rico, they had me planning a workshop / talk for today. That Antonio Vantaggiato, he is one boss hombre, especially now I have deputized him as a Tombstone Marshall 😉 Actually he is one of the kindest and most thoughtful people in our edtech field. It was he who […]
  • 2015
  • 2014
    • OERHENGE April-May 2014 OERs have been built in the UK for a loooong time. I am headed there in late April to investigate. My open ds106 colleagues Mariana Funes and Rochelle Lockridge and I submitted a paper for the OER14 conference in Newcastle. We submitted A DS106 Thing Happened on the Way to the 3M Tech Forum as […]
  • 2012
    • Police Beat: Couple Apprehended, Sent Back to Where they Once Belonged cc licensed ( BY NC ND ) flickr photo shared by PMC 1stPix I really dug the idea Tom Woodward put in for a ds106 Writing Assignment called “Police Beat” Essentially, identify an innocent seeming song that advocates some odd/criminal behavior and reformat it as a police report style article. tags: WritingAssignments, WritingAssignments328 Here is […]
    • MOOCS on Ice I was listening to ds106 auto DJ and came across the fun I had with Rowan Peter in Melbourne as he pleaded that George Siemens go down under to go ice skating with him. I recalled us conceptualizing the entire Canadian team (Downes, Siemens, and Cormier) coming to perform a MOOCS on Ice show. This […]
    • Share Your Suggestions How to Be a Better Photographer cc licensed ( BY ) flickr photo shared by cogdogblog Next week we start a two week segment of ds106 focussed (get it?) on photography. I’m putting out a request to add your suggestions in an open Google doc at http://bit.ly/ds106-better-photos. Links to articles are great, but I am really looking for personal strategies and […]
    • Fat Cats Playing Poker with Dogs Fine art, indeed, this limited edition original painting is available for auction coming soon. This is my bit for the Fat Cats Make Art Better ds106 assignment contributed by Annie Belle who is just rocking the class so far. The instructions, if you please… Using this site: http://fatcatart.ru/category/klassy-ka/ as a platform for ideas, and using […]
  • 2009
    • 2009/365/January How cool it is to see that the 365 Flickr Photo group that went from a group size of 1 (D’Arcy in 2007) to about 50 (me and 49 others in 2008) to 212! There are over 8900 photos in the pool, and we have a good flow of photo shooting tips and friendly conversation […]
  • 2007
    • This Dog is Wagging Ella It was time to make the run to upping this WordPress site to the current version, 2.1, nicknamed “Ella”. Hey, it is jazzy! There are promises of better code under the hood and some new features I’ve yet to really look much into. I’m pretty religious about following the upgrade instructions, backing up the static […]
    • Twittering While Blogging Thanks to a for:cogdog tag in del.icio.us from D’Arcy, I am currently auto messaging my Twitter account just by publishing this post. Nice! Now I might keep twittering a bit longer. This is done by courtesy of Vicissitude’s Twitter Updater WordPress plugin where you can specify your account, what activities it triggers updates for, and […]
    • Googly Googly I’ve waxed often on my love of Google Reader and of the personalized, gadget/widget laden Google Home page, but now I am all googly about Google in my Google. Huh? A few days ago I added the module for Google Reader to be a part of my Google home page: This sits along side the […]
  • 2006
    • Spam Roachlets They are much tinier than their hundred URL laden predecessors, but the newst breed of WordPress spam roaches are awfully deceiving- these are all critters who had their little legs caught in SpamKarma 2 (only because I have set it to require moderation for all posts): I was searching the web and found your entry. […]
    • 2 Amigos Are Udell-ized I’m so envious of my Canadian amigos Brian Lamb and D’Arcy Norman— they’ve both made it as quoted by Jon Udell. In the same post. In adjacent paragraphs. In Opening up iTunes: Brian Lamb of the University of British Columbia sums it up nicely: “The Stanford iTunes project benefits from goodwill generated by the growth […]
  • 2005
    • This Old Home Page (and mastering web redirection) Do you remember when the web was young and everything was about having a “Home Page”? The legacy is still there in our web browser’s “Home” button (and do you wonder why we are limited to one home?). In fact, when I started our web server in 1993, like others, I made our primary web […]
    • Two More Blades For the Marklet Maker From suggestions, I’ve added two more sites to the web site submission multi tool, what was once blogged the DeliciousFurlBagConnotea Marklet Maker is now… DeliciousFurlBagConnoteaFrassleSiteULike Marklet Maker— having added posting tools for CiteULike and Frassle. Check it out, your mileage may vary given my tendency for programming typos: http://cogdogblog.com/alan/marklet_maker.php  Share this barking on social media
  • 2004
    • Furl Those URLs Just took a quick at Furl, a new web site for organizing bookmarks centrally (tip of the blog hat to Seb). The concept is not new at all, but I have found most of these sorts (e.g. BackFlip) too tedious to maintain. It’s gotta be simple. Bookmarks/favorites in web browsers have hardly evolved since Mosaic. […]
    • We Got Blogs – Maricopa Faculty Demos Friday On its own, blogging is nicely permeating among some of our faculty. At this Friday’s Ocotillo Online Learning Group meeting, we have 4 demos of different ways weblogs are currently in use at Maricopa. A brief preview for those who cannot be at Phoenix College Friday…  Share this barking on social media
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 22 posts previously published on February 3rd

  • 2020
    • The Daily Blank Theme Gets a Media Uploader Maybe it’s not much news to have a media uploader used in a WordPress site… but what if I said you can do that on a site without needing an account or a trip to the ugly dashboard? That’s been a big round of improvements over the last 3 months, a revamp of the TRU […] &amp#x27A1;
  • 2019
    • Got Room For Story in that Metadata Schema? I don’t dislike metadata at all. It does wonderful things to organize heaps of media, content. But it sometimes leaving me… cold. A tweet from Bryan Alexander got this mind clicking. It’s a great story. The Ed Bacon Project is uploading thousands of photos (all with open licenses) documenting the city of Philadelphia, asking the […] &amp#x27A1;
  • 2017
    • The #netnarr Twist on Guest Speaker Videos and Annotation Thereof I will make a grossly sweeping and unfairly generalized stereotype, but in my mind alot of time courses use two way video to bring in guest experts, comes across as central casting “Confident professor. Confident grey hair senior man in formalwear keeping arms crossed and looking at camera while leaning at the table and with […] &amp#x27A1;
  • 2016
    • Technologies Never Completely Die: Get On a Gopher Server Back in my NMC days in 2011 we did a live webinar conversation with Kevin Kelly. While I never got wrapped up in technology wanting things, I do vividly remember Kelly’s concept of immortal technologies, that unlike extinct animals, technologies still remain out on some long tail curve of obscure ebay sales pages. In his […] &amp#x27A1;
    • Bringing the Cool Web Stuff to Puerto Rico One day after arriving in Puerto Rico, they had me planning a workshop / talk for today. That Antonio Vantaggiato, he is one boss hombre, especially now I have deputized him as a Tombstone Marshall 😉 Actually he is one of the kindest and most thoughtful people in our edtech field. It was he who […] &amp#x27A1;
  • 2015
  • 2014
    • OERHENGE April-May 2014 OERs have been built in the UK for a loooong time. I am headed there in late April to investigate. My open ds106 colleagues Mariana Funes and Rochelle Lockridge and I submitted a paper for the OER14 conference in Newcastle. We submitted A DS106 Thing Happened on the Way to the 3M Tech Forum as […] &amp#x27A1;
  • 2012
    • Police Beat: Couple Apprehended, Sent Back to Where they Once Belonged cc licensed ( BY NC ND ) flickr photo shared by PMC 1stPix I really dug the idea Tom Woodward put in for a ds106 Writing Assignment called “Police Beat” Essentially, identify an innocent seeming song that advocates some odd/criminal behavior and reformat it as a police report style article. tags: WritingAssignments, WritingAssignments328 Here is […] &amp#x27A1;
    • MOOCS on Ice I was listening to ds106 auto DJ and came across the fun I had with Rowan Peter in Melbourne as he pleaded that George Siemens go down under to go ice skating with him. I recalled us conceptualizing the entire Canadian team (Downes, Siemens, and Cormier) coming to perform a MOOCS on Ice show. This […] &amp#x27A1;
    • Share Your Suggestions How to Be a Better Photographer cc licensed ( BY ) flickr photo shared by cogdogblog Next week we start a two week segment of ds106 focussed (get it?) on photography. I’m putting out a request to add your suggestions in an open Google doc at http://bit.ly/ds106-better-photos. Links to articles are great, but I am really looking for personal strategies and […] &amp#x27A1;
    • Fat Cats Playing Poker with Dogs Fine art, indeed, this limited edition original painting is available for auction coming soon. This is my bit for the Fat Cats Make Art Better ds106 assignment contributed by Annie Belle who is just rocking the class so far. The instructions, if you please… Using this site: http://fatcatart.ru/category/klassy-ka/ as a platform for ideas, and using […] &amp#x27A1;
  • 2009
    • 2009/365/January How cool it is to see that the 365 Flickr Photo group that went from a group size of 1 (D’Arcy in 2007) to about 50 (me and 49 others in 2008) to 212! There are over 8900 photos in the pool, and we have a good flow of photo shooting tips and friendly conversation […] &amp#x27A1;
  • 2007
    • This Dog is Wagging Ella It was time to make the run to upping this WordPress site to the current version, 2.1, nicknamed “Ella”. Hey, it is jazzy! There are promises of better code under the hood and some new features I’ve yet to really look much into. I’m pretty religious about following the upgrade instructions, backing up the static […] &amp#x27A1;
    • Twittering While Blogging Thanks to a for:cogdog tag in del.icio.us from D’Arcy, I am currently auto messaging my Twitter account just by publishing this post. Nice! Now I might keep twittering a bit longer. This is done by courtesy of Vicissitude’s Twitter Updater WordPress plugin where you can specify your account, what activities it triggers updates for, and […] &amp#x27A1;
    • Googly Googly I’ve waxed often on my love of Google Reader and of the personalized, gadget/widget laden Google Home page, but now I am all googly about Google in my Google. Huh? A few days ago I added the module for Google Reader to be a part of my Google home page: This sits along side the […] &amp#x27A1;
  • 2006
    • Spam Roachlets They are much tinier than their hundred URL laden predecessors, but the newst breed of WordPress spam roaches are awfully deceiving- these are all critters who had their little legs caught in SpamKarma 2 (only because I have set it to require moderation for all posts): I was searching the web and found your entry. […] &amp#x27A1;
    • 2 Amigos Are Udell-ized I’m so envious of my Canadian amigos Brian Lamb and D’Arcy Norman— they’ve both made it as quoted by Jon Udell. In the same post. In adjacent paragraphs. In Opening up iTunes: Brian Lamb of the University of British Columbia sums it up nicely: “The Stanford iTunes project benefits from goodwill generated by the growth […] &amp#x27A1;
  • 2005
    • This Old Home Page (and mastering web redirection) Do you remember when the web was young and everything was about having a “Home Page”? The legacy is still there in our web browser’s “Home” button (and do you wonder why we are limited to one home?). In fact, when I started our web server in 1993, like others, I made our primary web […] &amp#x27A1;
    • Two More Blades For the Marklet Maker From suggestions, I’ve added two more sites to the web site submission multi tool, what was once blogged the DeliciousFurlBagConnotea Marklet Maker is now… DeliciousFurlBagConnoteaFrassleSiteULike Marklet Maker— having added posting tools for CiteULike and Frassle. Check it out, your mileage may vary given my tendency for programming typos: http://cogdogblog.com/alan/marklet_maker.php  Share this barking on social media &amp#x27A1;
  • 2004
    • Furl Those URLs Just took a quick at Furl, a new web site for organizing bookmarks centrally (tip of the blog hat to Seb). The concept is not new at all, but I have found most of these sorts (e.g. BackFlip) too tedious to maintain. It’s gotta be simple. Bookmarks/favorites in web browsers have hardly evolved since Mosaic. […] &amp#x27A1;
    • We Got Blogs – Maricopa Faculty Demos Friday On its own, blogging is nicely permeating among some of our faculty. At this Friday’s Ocotillo Online Learning Group meeting, we have 4 demos of different ways weblogs are currently in use at Maricopa. A brief preview for those who cannot be at Phoenix College Friday…  Share this barking on social media &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 *