“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 17 posts previously published on February 6th
- 2023
- #ETMOOC @ 10 It seems like many worlds ago, when “MOOC” was not a term I mocked, but as it happens, this month marks the 10th year since Alec Couros launched ETMOOC, the Education Technology MOOOOOOC. Susan Spellman Cann has been heroic each year in organizing a tweeted reunion The linked “smore” site suggest ways to participate I’m […]
- 2020
- 2020/366 January = 31/31 I’m one month in to my 13th year of a daily photography practice/compulsion. While perfect attendance is not the goal (only achieved in 2015 and 2016) there usually looms a major year end task of rounding up the strays and ones missing from my yearly album. So as a goal for 2020 (I did not […]
- 2015
- The Making of You Show Episode 4 Episode 4 ushers in the audio unit and was a chance to take advantage of D’Arcy Norman’s visit the week before. We wanted to do cameo’s where possible. And we wanted to make use of a lot of sound. We … Continued
- Blue 65th Apparently until Queen Victoria there was no traditional 65th anniversary gift; the charts jumped from 55th to 75th. Sapphire means blue in Greek. The sapphire stones are characterized by their extreme hardness exceeded only by the diamond and their color and transparency. The blue sapphire is often called the gem of the sky and it […]
- 2013
- Try this photo on mister flickr
trying to see what the autoembed size works out to me
embed oh ye tweet?
@techsavvyed you are my hero! Thank you!
— Tamara Samaripa (@tcsamaripa) February 7, 2013
- Oh That 70s Car There is room on the internet for everything not on the internet. My sister emailed a link to a site with a scanned copy of the brochure for a 1973 Ford Maverick. So what? This was the car I drove out to Arizona when I moved there in 1987 with my dog Dominoe, flipping the […]
- 2012
- It’s a Bag of Coal It's a Bag of Coalby: cogdog I cannot say this has a whole lot of meaning– it more or less came out of just thinking about the rallying call from Gardner Campbell’s No Digital Facelift presentation we use to start ds106. So maybe if people do not see the value of the Bag of Gold, […]
- Splash Some Color cc licensed ( BY ) flickr photo shared by cogdogblog I made this as an example for a new ds106 Visual Assignment, Splash The Color– this is the effect of accentuating parts of an image by reducing it to black and white, and then re-coloring or restoring the color of parts of the photo. See […]
- Back in 1950… cc licensed ( BY ) flickr photo shared by cogdogblog Today (or technically yesterday since it is some early AM hour) would have been my parent’s 62nd wedding anniversary. Alyce and Morris (aka “Mickey”) look so serious in their pose here, though Dad, in his pseudi Desi Arnez style, seems to have a twinkle in […]
- Daily Creates: Week 3 Week 3 of ds106 was full of action, from digging out of the rubble that hacker Emre5807 caused to working through the readings of Tim O’Reilly on Web 2.0 and Bryan Alexander on Web storytelling. The flow of activity in The Daily Create has been impressive, especially now that we have our students in the […]
- 2011
- Taxes Made Me Do It (ds106 Playlist Story) cc licensed flickr photo shared by brianjmatis Working on my taxes today got me started on trying a hand at a ds106 playlist assignment story (plus the Beatles “Taxman” showed up near the top as I scanned my music in iTunes. I could not help but try yo play in some flickr photos as well […]
- 2010
- A Lot (= what I don’t know) cc licensed flickr photo shared by cogdogblog A few years ago I started some conference presentations with a sloppy attempt of a disclaimer, leaning on my own familiar TV metaphor of Sargent Schultz from Hogan’s Heroes and his classic yodel of “I Know Nothing!”. I was trying to deploy it in the sense of “I […]
- 2005
- Distilling inbound links via del.icio.us and Furl This is one of those found be serendipity things, what happens when you just freely poke around the web. Maybe it is obvious to many others, but it’s new to me. Some folks rely on technorati for taking a pulse of links going to their content, and it sure provides some good insight. I just […]
- Chemistry Students Building Delicious Link Collections It is re-assuring when a faculty member investigates a new technology and runs with it. I got a recent email from Liz Dorland, chemistry faculty at Mesa Community College, and maybe one of 7 people in our district who read this blog (You are never famous in your own country, Hi Liz!). She shared form […]
- Another Jade Hiccup Apologies again, as this server, also the host of Feed2Js, went south for about 10 hours Friday night – Saturday morning, just like last week. I had found in the server logs where the services were crashing, but nothing to indicate a cause nor why it was able to restore itself. Given it occurred at […]
- Saturday at the Parada del Sol flickr foto Hashknife Ridersavailable on my flickr One of the many members of the Navajo County Sheriff’s Posse who participated in the Hashknife Pony Express, which re-enacts the delivery of mail by horseback, riding from Holbrook to Scottsdale. They did not look tired at all. It was cowboys, cowgirls, clowns, dogs, young republicans, vegan protesters, […]
- 2004
- Vultures Circling RSS As we predicted, the time is ticking on the young, naive open-ness of RSS; witness the gathering vultures circling overhead. Greed, chasing of a dollar, and even the smallest crack are an open invitation for the party-crashers who will usurp everything that is open and collaborative just for a few shiny pennies. RSS: It’s Not […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 17 posts previously published on February 6th
- 2023
- #ETMOOC @ 10 It seems like many worlds ago, when “MOOC” was not a term I mocked, but as it happens, this month marks the 10th year since Alec Couros launched ETMOOC, the Education Technology MOOOOOOC. Susan Spellman Cann has been heroic each year in organizing a tweeted reunion The linked “smore” site suggest ways to participate I’m […] ➡
- 2020
- 2020/366 January = 31/31 I’m one month in to my 13th year of a daily photography practice/compulsion. While perfect attendance is not the goal (only achieved in 2015 and 2016) there usually looms a major year end task of rounding up the strays and ones missing from my yearly album. So as a goal for 2020 (I did not […] ➡
- 2015
- The Making of You Show Episode 4 Episode 4 ushers in the audio unit and was a chance to take advantage of D’Arcy Norman’s visit the week before. We wanted to do cameo’s where possible. And we wanted to make use of a lot of sound. We … Continued ➡
- Blue 65th Apparently until Queen Victoria there was no traditional 65th anniversary gift; the charts jumped from 55th to 75th. Sapphire means blue in Greek. The sapphire stones are characterized by their extreme hardness exceeded only by the diamond and their color and transparency. The blue sapphire is often called the gem of the sky and it […] ➡
- 2013
- Try this photo on mister flickr
trying to see what the autoembed size works out to me
embed oh ye tweet?
@techsavvyed you are my hero! Thank you!
— Tamara Samaripa (@tcsamaripa) February 7, 2013
➡
- Oh That 70s Car There is room on the internet for everything not on the internet. My sister emailed a link to a site with a scanned copy of the brochure for a 1973 Ford Maverick. So what? This was the car I drove out to Arizona when I moved there in 1987 with my dog Dominoe, flipping the […] ➡
- 2012
- It’s a Bag of Coal It's a Bag of Coalby: cogdog I cannot say this has a whole lot of meaning– it more or less came out of just thinking about the rallying call from Gardner Campbell’s No Digital Facelift presentation we use to start ds106. So maybe if people do not see the value of the Bag of Gold, […] ➡
- Splash Some Color cc licensed ( BY ) flickr photo shared by cogdogblog I made this as an example for a new ds106 Visual Assignment, Splash The Color– this is the effect of accentuating parts of an image by reducing it to black and white, and then re-coloring or restoring the color of parts of the photo. See […] ➡
- Back in 1950… cc licensed ( BY ) flickr photo shared by cogdogblog Today (or technically yesterday since it is some early AM hour) would have been my parent’s 62nd wedding anniversary. Alyce and Morris (aka “Mickey”) look so serious in their pose here, though Dad, in his pseudi Desi Arnez style, seems to have a twinkle in […] ➡
- Daily Creates: Week 3 Week 3 of ds106 was full of action, from digging out of the rubble that hacker Emre5807 caused to working through the readings of Tim O’Reilly on Web 2.0 and Bryan Alexander on Web storytelling. The flow of activity in The Daily Create has been impressive, especially now that we have our students in the […] ➡
- 2011
- Taxes Made Me Do It (ds106 Playlist Story) cc licensed flickr photo shared by brianjmatis Working on my taxes today got me started on trying a hand at a ds106 playlist assignment story (plus the Beatles “Taxman” showed up near the top as I scanned my music in iTunes. I could not help but try yo play in some flickr photos as well […] ➡
- 2010
- A Lot (= what I don’t know) cc licensed flickr photo shared by cogdogblog A few years ago I started some conference presentations with a sloppy attempt of a disclaimer, leaning on my own familiar TV metaphor of Sargent Schultz from Hogan’s Heroes and his classic yodel of “I Know Nothing!”. I was trying to deploy it in the sense of “I […] ➡
- 2005
- Distilling inbound links via del.icio.us and Furl This is one of those found be serendipity things, what happens when you just freely poke around the web. Maybe it is obvious to many others, but it’s new to me. Some folks rely on technorati for taking a pulse of links going to their content, and it sure provides some good insight. I just […] ➡
- Chemistry Students Building Delicious Link Collections It is re-assuring when a faculty member investigates a new technology and runs with it. I got a recent email from Liz Dorland, chemistry faculty at Mesa Community College, and maybe one of 7 people in our district who read this blog (You are never famous in your own country, Hi Liz!). She shared form […] ➡
- Another Jade Hiccup Apologies again, as this server, also the host of Feed2Js, went south for about 10 hours Friday night – Saturday morning, just like last week. I had found in the server logs where the services were crashing, but nothing to indicate a cause nor why it was able to restore itself. Given it occurred at […] ➡
- Saturday at the Parada del Sol flickr foto Hashknife Ridersavailable on my flickr One of the many members of the Navajo County Sheriff’s Posse who participated in the Hashknife Pony Express, which re-enacts the delivery of mail by horseback, riding from Holbrook to Scottsdale. They did not look tired at all. It was cowboys, cowgirls, clowns, dogs, young republicans, vegan protesters, […] ➡
- 2004
- Vultures Circling RSS As we predicted, the time is ticking on the young, naive open-ness of RSS; witness the gathering vultures circling overhead. Greed, chasing of a dollar, and even the smallest crack are an open invitation for the party-crashers who will usurp everything that is open and collaborative just for a few shiny pennies. RSS: It’s Not […] ➡
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.