“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 25 posts previously published on April 19th

  • 2024
    • A Little Bit of CSS Shine for the Wayback Links More in the little web joys of selk tinkering. Rewards you never get by pouring your houghts into some packaged medium sized substack of a LinkedIn space. Self-stylin; as it were. Way back in the pre lock down era of January 2020 I added a little bit of CSS to this blog thang that put […]
  • 2023
    • 20 Laps on the Blog Train Blogging, that’s so 2007, right? Actually for me it’s 2003 because that was the year, on this very day, that this pile of posts spit out its first one. That’s a big fat who cares, 2-0. Please no cards or flowers. I have put to use my own WordPress little plugin to list all the […]
  • 2022
    • For #OER 22 Me and a Penguin Want You To… I dare you. I double dog penguin dare you to contribute a story for my True Stories of Openness (formerly known as Amazing) aka Magic Acts of Web Serendipity… First conjured up long long ago (2009) at a conference far far away (Open Ed in Vancouver “Crossing the Chasm” was the theme), deploying not light […]
  • 2019
    • One Day / Two Online Presentations Of all days, yesterday, happened as a convergence of doing presentations at two different conferences. Fortunately, I was able to do all from the comfort of home as they were online ones. In my late morning I did a session at the 2019 Technology, Colleges and Community (TCC) conference, which amazingly is the 24th one, […]
  • 2017
    • After ~50 Years, I Learn to Tie My Shoes I’ve had loose shoe laces all my life. For a number of years I never even tied my tennis shoes, wearing them like slippers. I lost count how many friends. stranges would make a point to ask, “Did you know your shoes are untied?” I have a memory as a kid, maybe 4 or 5, […]
  • 2016
    • Life With Dog; Hey This Data Collection is Creepy / Hey This Data Collection is Cool It’s almost been two weeks since I brought home Felix, a two year old Australian Shepherd / Catahoula mix, from the Payson, AZ Human Society. My routines now are adjusted to walks, feeding, and giving attention. None of this is any kind of problem, this dog is so sweet and playful. I love him dearly. […]
    • Literally [Ear] Buddies: Virtually Connecting at #OER16 Today Virtually Connecting hosted it’s one session at the OER16 Conference in Edinburgh. We typically would have done more, but Virtually Connecting has a pile of sessions at the overlapping OLCInnovate Conference. I leaped at the chance to host today’s one with keynoters Jim Groom and Catherine Cronin. Jim of course I have known and […]
    • Welcome to Slack with Slackin I’ve been fortunate/privileged/lucky/happy in my work to have that room to follow my curiosity. I might say that a lot of my activity seems to have unstated goals, in determinate objectives, and often outcomeless outcomes. That I dig. Okay. In my wandering work for the Creative Commons project, I skyped a few weeks ago with […]
  • 2011
    • The Last Hurrah-zon Preso cc licensed ( BY NC ) flickr photo shared by WanderingtheWorld (www.LostManProject.com) I’m in California for both R&R but also to fulfill a presentation obligation I made back in the end of 2010, for the Mt Diablo Chapter of the ASTD on the 2011 Horizon Report. This was a fun, high energy and wired group […]
  • 2010
    • That Two Timing XML File cc licensed flickr photo shared by mastrobiggo Technically, it was OMPL, but who cares what the ML it is– I’ve got a tip to share on how I’ve been using one single file to drive two dynamic resources. This is hardly in the realm of Tony Hirst mashup magic, but here it goes… Since we […]
  • 2009
    • Hash Tags, Trash Tags, Hack Tags cc licensed flickr photo by Zervas One can hardly read a twitter stream these days without tripping over a boat load of hash tags (for those knot sure of what twitter is or what hash tags are, please go check out Oprah or some other oracle, I am not feeling like explaining everything…). First of […]
  • 2008
    • My iPod Will Not Crash Your Airplane My iPod Will Not Crash Your Airplane by cogdogblog posted 19 Apr ’08, 11.14pm MDT PST on flickr I’m getting more acute to the silly rules that we take on like mild sheep. Supposedly, any electrical device with an on/off switch can cause havoc on a jet’s navigation. What kind of engineers do they have […]
    • Worst Interface Designers Are The Access Gougers The Worst Interface Designers Stand Between You and the Net by cogdogblog posted 19 Apr ’08, 6.08pm MDT PST on flickr This was the entire visible form trying to log into the Sherton’s wireless- lacking the remaining fields and forms, there is no way a Mac user on Firefox can "Belong". The form is chomped […]
  • 2007
    • To Quote a Spammer ozsgdcfp uvxjfloe yndvqk igctj nzvbsfod hqzploatu evsbkytc Yeah right, “omcv nxpy”, I could not agree more, there is nothing sweeter than the sound of comment blog spam frying in the moderation queue. Would you like some Grey Poupon on that?  Share this barking on social media
  • 2006
    • Second Life Staff Meeting Yes, I was in my home office, but yesterday NMC had a meeting together in Second Life: We all our wearing our “official” shirts, but it may take some guesswork to identify the players. Most communication in SL is via a text chat, where anyone in proximity can see what you have to “say”. Chat […]
    • Odeo Me About Podcasts I am seeking some more voices to use as demos for my podcast presentation next week (it will be shared, but of course first it must be created). The focus is “Podcasting on the Cheap” how to do this with free/cheap readily available tools. If anyone has time, like less than 3 minutes, can you […]
    • i m noob The blogging has been and will be sporadic, as I am learning to crawl, then walk in my new role with the NMC. Yes, I am a newbie. It’s like thinking you are proficient on the lake, and you realize when you show up for the group trip, that your expertise with the pedal boats […]
  • 2005
    • The New Phone Book is Here! The New Phone Book is Here! flickr foto The New Phone Book is Here! The New Phone Book is Here!available on my flickr Taking a cue from the quote in Steve Martin’s The Jerk, “here” is actually our recycling container. Can you believe in this age of dwindling natural resources and internet based information, that we get dumped on our door […]
  • 2003
    • Making the RSS Feeds Even More Useful With some help from “Lora” (my psuedonym), we learn how the MLX has added custom, dymamic RSS feeds that directly match a search result.  Share this barking on social media
    • And Boris then TBs the Same Object Meet my second learning object blogger, Boris the humanities teacher. He also finds the same correlation meter blogged by Lora, and ads an entry to his own blog- essentially he has a different use for the same LO. And thus, one object in our collection can be networked to places where it is referenced: http://jade.mcli.dist.maricopa.edu/cgi-bin/tb.cgi?__mode=list&tb_id=278 […]
    • Lora TrackBacks an Object So first Lora, searches our MLX and then uses her MT Bookmarklet to ping a Correlation Meter that she can use in teaching about the correlation coefficient. She writes a blog entry…  Share this barking on social media
    • BackTrack to TrackBack http://www.movabletype.org/mt/trackback/55
    • Meet Lora.. Lora’s geology objects was the first psuedo blog I created in MT to demonstrate a site in which w person is harnessing the LO/RSS notion in one field. Lora is a Geology insutrctor, and here she has set up MovableType to accept RSS Feeds form our Maricopa Learning eXchange. Later she adds additional feeds from […]
    • About Maricopa Learning eXchange (MLX) There is a rather long history to this project (see articles from 2000 here and here)– but its main purpose is to provide an easily accessible collection of innovative practices and projects developed at the Maricopa Community Colleges. This year we have moved on several different fronts to build the collection up, from sponsoring a […]
    • I Blog Therefore I am… This is the new hub for Alan Levine’s activities as instructional technologist at the Maricopa Community Colleges in Phoenix, AZ, replacing the mid 90s vintage home page, kept at: https://bones.cogdogblog.com/dommy/alan/ Maybe I am new at blogging (as is everyone), but I have been hammering at the web since October 1993. Our MCLI web site has […]
and the default value, the link at the end is invisible.

On Michael’s site he might use

There are 25 posts previously published on April 19th

  • 2024
    • A Little Bit of CSS Shine for the Wayback Links More in the little web joys of selk tinkering. Rewards you never get by pouring your houghts into some packaged medium sized substack of a LinkedIn space. Self-stylin; as it were. Way back in the pre lock down era of January 2020 I added a little bit of CSS to this blog thang that put […] &amp#x27A1;
  • 2023
    • 20 Laps on the Blog Train Blogging, that’s so 2007, right? Actually for me it’s 2003 because that was the year, on this very day, that this pile of posts spit out its first one. That’s a big fat who cares, 2-0. Please no cards or flowers. I have put to use my own WordPress little plugin to list all the […] &amp#x27A1;
  • 2022
    • For #OER 22 Me and a Penguin Want You To… I dare you. I double dog penguin dare you to contribute a story for my True Stories of Openness (formerly known as Amazing) aka Magic Acts of Web Serendipity… First conjured up long long ago (2009) at a conference far far away (Open Ed in Vancouver “Crossing the Chasm” was the theme), deploying not light […] &amp#x27A1;
  • 2019
    • One Day / Two Online Presentations Of all days, yesterday, happened as a convergence of doing presentations at two different conferences. Fortunately, I was able to do all from the comfort of home as they were online ones. In my late morning I did a session at the 2019 Technology, Colleges and Community (TCC) conference, which amazingly is the 24th one, […] &amp#x27A1;
  • 2017
    • After ~50 Years, I Learn to Tie My Shoes I’ve had loose shoe laces all my life. For a number of years I never even tied my tennis shoes, wearing them like slippers. I lost count how many friends. stranges would make a point to ask, “Did you know your shoes are untied?” I have a memory as a kid, maybe 4 or 5, […] &amp#x27A1;
  • 2016
    • Life With Dog; Hey This Data Collection is Creepy / Hey This Data Collection is Cool It’s almost been two weeks since I brought home Felix, a two year old Australian Shepherd / Catahoula mix, from the Payson, AZ Human Society. My routines now are adjusted to walks, feeding, and giving attention. None of this is any kind of problem, this dog is so sweet and playful. I love him dearly. […] &amp#x27A1;
    • Literally [Ear] Buddies: Virtually Connecting at #OER16 Today Virtually Connecting hosted it’s one session at the OER16 Conference in Edinburgh. We typically would have done more, but Virtually Connecting has a pile of sessions at the overlapping OLCInnovate Conference. I leaped at the chance to host today’s one with keynoters Jim Groom and Catherine Cronin. Jim of course I have known and […] &amp#x27A1;
    • Welcome to Slack with Slackin I’ve been fortunate/privileged/lucky/happy in my work to have that room to follow my curiosity. I might say that a lot of my activity seems to have unstated goals, in determinate objectives, and often outcomeless outcomes. That I dig. Okay. In my wandering work for the Creative Commons project, I skyped a few weeks ago with […] &amp#x27A1;
  • 2011
    • The Last Hurrah-zon Preso cc licensed ( BY NC ) flickr photo shared by WanderingtheWorld (www.LostManProject.com) I’m in California for both R&R but also to fulfill a presentation obligation I made back in the end of 2010, for the Mt Diablo Chapter of the ASTD on the 2011 Horizon Report. This was a fun, high energy and wired group […] &amp#x27A1;
  • 2010
    • That Two Timing XML File cc licensed flickr photo shared by mastrobiggo Technically, it was OMPL, but who cares what the ML it is– I’ve got a tip to share on how I’ve been using one single file to drive two dynamic resources. This is hardly in the realm of Tony Hirst mashup magic, but here it goes… Since we […] &amp#x27A1;
  • 2009
    • Hash Tags, Trash Tags, Hack Tags cc licensed flickr photo by Zervas One can hardly read a twitter stream these days without tripping over a boat load of hash tags (for those knot sure of what twitter is or what hash tags are, please go check out Oprah or some other oracle, I am not feeling like explaining everything…). First of […] &amp#x27A1;
  • 2008
    • My iPod Will Not Crash Your Airplane My iPod Will Not Crash Your Airplane by cogdogblog posted 19 Apr ’08, 11.14pm MDT PST on flickr I’m getting more acute to the silly rules that we take on like mild sheep. Supposedly, any electrical device with an on/off switch can cause havoc on a jet’s navigation. What kind of engineers do they have […] &amp#x27A1;
    • Worst Interface Designers Are The Access Gougers The Worst Interface Designers Stand Between You and the Net by cogdogblog posted 19 Apr ’08, 6.08pm MDT PST on flickr This was the entire visible form trying to log into the Sherton’s wireless- lacking the remaining fields and forms, there is no way a Mac user on Firefox can "Belong". The form is chomped […] &amp#x27A1;
  • 2007
    • To Quote a Spammer ozsgdcfp uvxjfloe yndvqk igctj nzvbsfod hqzploatu evsbkytc Yeah right, “omcv nxpy”, I could not agree more, there is nothing sweeter than the sound of comment blog spam frying in the moderation queue. Would you like some Grey Poupon on that?  Share this barking on social media &amp#x27A1;
  • 2006
    • Second Life Staff Meeting Yes, I was in my home office, but yesterday NMC had a meeting together in Second Life: We all our wearing our “official” shirts, but it may take some guesswork to identify the players. Most communication in SL is via a text chat, where anyone in proximity can see what you have to “say”. Chat […] &amp#x27A1;
    • Odeo Me About Podcasts I am seeking some more voices to use as demos for my podcast presentation next week (it will be shared, but of course first it must be created). The focus is “Podcasting on the Cheap” how to do this with free/cheap readily available tools. If anyone has time, like less than 3 minutes, can you […] &amp#x27A1;
    • i m noob The blogging has been and will be sporadic, as I am learning to crawl, then walk in my new role with the NMC. Yes, I am a newbie. It’s like thinking you are proficient on the lake, and you realize when you show up for the group trip, that your expertise with the pedal boats […] &amp#x27A1;
  • 2005
    • The New Phone Book is Here! The New Phone Book is Here! flickr foto The New Phone Book is Here! The New Phone Book is Here!available on my flickr Taking a cue from the quote in Steve Martin’s The Jerk, “here” is actually our recycling container. Can you believe in this age of dwindling natural resources and internet based information, that we get dumped on our door […] &amp#x27A1;
  • 2003
    • Making the RSS Feeds Even More Useful With some help from “Lora” (my psuedonym), we learn how the MLX has added custom, dymamic RSS feeds that directly match a search result.  Share this barking on social media &amp#x27A1;
    • And Boris then TBs the Same Object Meet my second learning object blogger, Boris the humanities teacher. He also finds the same correlation meter blogged by Lora, and ads an entry to his own blog- essentially he has a different use for the same LO. And thus, one object in our collection can be networked to places where it is referenced: http://jade.mcli.dist.maricopa.edu/cgi-bin/tb.cgi?__mode=list&tb_id=278 […] &amp#x27A1;
    • Lora TrackBacks an Object So first Lora, searches our MLX and then uses her MT Bookmarklet to ping a Correlation Meter that she can use in teaching about the correlation coefficient. She writes a blog entry…  Share this barking on social media &amp#x27A1;
    • BackTrack to TrackBack http://www.movabletype.org/mt/trackback/55 &amp#x27A1;
    • Meet Lora.. Lora’s geology objects was the first psuedo blog I created in MT to demonstrate a site in which w person is harnessing the LO/RSS notion in one field. Lora is a Geology insutrctor, and here she has set up MovableType to accept RSS Feeds form our Maricopa Learning eXchange. Later she adds additional feeds from […] &amp#x27A1;
    • About Maricopa Learning eXchange (MLX) There is a rather long history to this project (see articles from 2000 here and here)– but its main purpose is to provide an easily accessible collection of innovative practices and projects developed at the Maricopa Community Colleges. This year we have moved on several different fronts to build the collection up, from sponsoring a […] &amp#x27A1;
    • I Blog Therefore I am… This is the new hub for Alan Levine’s activities as instructional technologist at the Maricopa Community Colleges in Phoenix, AZ, replacing the mid 90s vintage home page, kept at: https://bones.cogdogblog.com/dommy/alan/ Maybe I am new at blogging (as is everyone), but I have been hammering at the web since October 1993. Our MCLI web site has […] &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 *