“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.
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.
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 12 posts previously published on June 24th
- 2022
- WordPress Does Not Like Waiting in Open Tab Despite the shift to this ornery block editor (I have made my peace with it but still regularly cuss at it) and avoiding full site editing, I still love ya WordPress. Always. Mostly. I have noticed something for a while. WordPress does not like hanging out waiting for you in open tabs. Many times over […]
- 2018
- Picking a Noticing Pattern: I’ve Logged 469 Photos of 106’s The diagnosis is likely on the spectrum of an obsession. In the buildup to the first open version of the open digital storytelling course, the one, the only, DS106, I first saw a sign with a 106 on it. I noticed it. It was so long ago that what I was doing at the time […]
- 2013
- I Mailed a Tea Bag to Russia The title is almost Kafka-esque, maybe? No? Well, I actually send a tea bag by old snail mail to someone I do not know, in Russia. This all started with a photo I posted to flickr, showing one of the last plain black tea bags I must have bought for my Mom’s visit in maybe […]
- Dogs on the Internet Via Jill Walker aka jill/txt perhaps one of the first blogs I started reading in 2000, the PRISM flavored perspective of a once cute cartoon If course,, since 2003, everyone knows I am a dog on the internet. Not much spying needed to figure that out. So projecting forward, what can possibly be the next […]
- 2010
- The Revolution is Now Blogged Yesterday I was on stage as the opening act for the 2010 Canadian eLearning Conference hosted at the University of Alberta, with a new show I had conjured “Join the Secret Revolution“. The presentation is on Speakerdeck: While not televised, the revolution was recorded The Secret Revolution idea was spawned by the rEvolution theme of […]
- 2008
- A World Made of Web 2.0 For people who mock web 2.0 (heck that includes me), look- you can make a world out of all of those logos! See the Map of the World 2.0, made of 1001 web app logos. This comes from AppAppeal a site that catalogs and reviews web 2.0 sites. See you can do something useful with […]
- Tweet and Receive It’s been frequently noted that the response effect of twitter is not a simple matter of opening an account and yelling for help; as a new tweeter you get the tree-falling silently effect. That said, I feel overwhelmingly fortunate to put out a single request and get a string of responses. With this, and despite […]
- 2005
- VidBlogging, Blogcasting… I Still Do Not Get It Skepticism is healthy and leaves room for later acceptance, eh? As previously barked, I am not convinced yet that there is a natural leap form the success of podcasting to saying video will take off just the same. I would enjoy being wrong. David Weinberger, the Cluetrain guy, the Small Pieces guy someone I read […]
- Dog Flickr Montage More exclamations of “holy flickr” emitting from my room. The flickr montager generates a mosaic image based on tags of a word from flickr. I played a bit with it, tried my own montage on the tag “dog”. It randomly chose some image of a pocket puppy type dog (or as my friend Donna refers […]
- Looks Groovy I’ve had a peek inside what Brian is agRSSively leaking… no wonder he’s been so darn quiet. This will rock (and maybe bust their server) Share this barking on social media
- 2003
- Learning Object TrackBack Summary Tool For those that have beeing following (or not) the Learning Object experiment’s here (see Back to TrackBack), we have applied the MovableType Trackback concept to every item in the Maricopa Learning eXchange. With some time to tinker today, I cooked up a new trackback summary tool that allows one to check out the trackbacks across […]
- Where’s the Feed? The more you click around the web, the more you see information rich sites that could do a little bit more good by adding RSS feeds to their content. It’s even worse when you scan the URLs and sense that the content is idling away in a database. Like Clara Peller’s inquiry for beef, we […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 12 posts previously published on June 24th
- 2022
- WordPress Does Not Like Waiting in Open Tab Despite the shift to this ornery block editor (I have made my peace with it but still regularly cuss at it) and avoiding full site editing, I still love ya WordPress. Always. Mostly. I have noticed something for a while. WordPress does not like hanging out waiting for you in open tabs. Many times over […] ➡
- 2018
- 2013
- I Mailed a Tea Bag to Russia The title is almost Kafka-esque, maybe? No? Well, I actually send a tea bag by old snail mail to someone I do not know, in Russia. This all started with a photo I posted to flickr, showing one of the last plain black tea bags I must have bought for my Mom’s visit in maybe […] ➡
- Dogs on the Internet Via Jill Walker aka jill/txt perhaps one of the first blogs I started reading in 2000, the PRISM flavored perspective of a once cute cartoon If course,, since 2003, everyone knows I am a dog on the internet. Not much spying needed to figure that out. So projecting forward, what can possibly be the next […] ➡
- 2010
- The Revolution is Now Blogged Yesterday I was on stage as the opening act for the 2010 Canadian eLearning Conference hosted at the University of Alberta, with a new show I had conjured “Join the Secret Revolution“. The presentation is on Speakerdeck: While not televised, the revolution was recorded The Secret Revolution idea was spawned by the rEvolution theme of […] ➡
- 2008
- A World Made of Web 2.0 For people who mock web 2.0 (heck that includes me), look- you can make a world out of all of those logos! See the Map of the World 2.0, made of 1001 web app logos. This comes from AppAppeal a site that catalogs and reviews web 2.0 sites. See you can do something useful with […] ➡
- Tweet and Receive It’s been frequently noted that the response effect of twitter is not a simple matter of opening an account and yelling for help; as a new tweeter you get the tree-falling silently effect. That said, I feel overwhelmingly fortunate to put out a single request and get a string of responses. With this, and despite […] ➡
- 2005
- VidBlogging, Blogcasting… I Still Do Not Get It Skepticism is healthy and leaves room for later acceptance, eh? As previously barked, I am not convinced yet that there is a natural leap form the success of podcasting to saying video will take off just the same. I would enjoy being wrong. David Weinberger, the Cluetrain guy, the Small Pieces guy someone I read […] ➡
- Dog Flickr Montage More exclamations of “holy flickr” emitting from my room. The flickr montager generates a mosaic image based on tags of a word from flickr. I played a bit with it, tried my own montage on the tag “dog”. It randomly chose some image of a pocket puppy type dog (or as my friend Donna refers […] ➡
- Looks Groovy I’ve had a peek inside what Brian is agRSSively leaking… no wonder he’s been so darn quiet. This will rock (and maybe bust their server) Share this barking on social media ➡
- 2003
- Learning Object TrackBack Summary Tool For those that have beeing following (or not) the Learning Object experiment’s here (see Back to TrackBack), we have applied the MovableType Trackback concept to every item in the Maricopa Learning eXchange. With some time to tinker today, I cooked up a new trackback summary tool that allows one to check out the trackbacks across […] ➡
- Where’s the Feed? The more you click around the web, the more you see information rich sites that could do a little bit more good by adding RSS feeds to their content. It’s even worse when you scan the URLs and sense that the content is idling away in a database. Like Clara Peller’s inquiry for beef, we […] ➡
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.