“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 20 posts previously published on March 2nd
- 2024
- That Extra Day in February for Daily Photos (makes 60) It took some lubricant spray to get the Daily Photo to Flickr Habit going in January. Even with February providing one more day to summarize, and making it the Daily Photos 366 style group, I almost let is slip again. But alas, I managed to get 60 photos in 60 days posted to my 17th […]
- 2021
- Tock, Tick, The Daily Trick Most likely I mangled my attempt at wordplay in that title. I’m writing again about my belief/obsession with small acts of daily creativity. I have no real research, no data to back my hypothesis, but I will make up something that applying Curly’s Law to doing something small, new, micro challenging on a regular basis […]
- 2020
- 2020/366 February = 27/29 Following up from last month (nobody is tracking me) for this 13th year of daily photos I am trying to do my cleanup and review each month, thus saving me hours of labor in December. Yeah right. Hello tracker? January was perfect, February, even with it’s extra day had a 2 day gap. I chalk […]
- 2019
- Blogging on a Gutenburger Diet There’s not much middle ground on people feel about the changes wrought to WordPress 5 with the Gutenberg Editor. It’s endless rabbit/duck season arguments. The people who love Gutenberg without qualms are Matt Mullenweg and the people who still work for WordPress trying to make the thing work. The people who hate Gutenberg are pretty […]
- 2018
- A Pour Photo Lacktribution In ramping up for next week’s Mural UDG project on open education at the University of Guadalajara, I go back to something that, after so many years should be more enabled by technology, but is as messy as always. Giving attribution for reused photos is an old horse ridden around this blog, and this very […]
- 2016
- Virtually… as in Almost… as in Not Quite… as in… I’m included with five others on a session / workshop for the upcoming OLC Innovate Conference; we are talking about Virtually Connecting — Rebecca Hogue got us together, and I think she and a few others will be on site. Maha Bali will be virtually there as are others of us, including me. Not being […]
- 2015
- Share Images By Email to SPLOT Collector The SPLOT Image Collector has found resonance as a useful tool to build shared image collections. I’ve modified the admin options so a site owner can decided which of the fields they want on the form (and even designate them […]
- Some Course Recommendations for You… Since Coursera so kindly seems to share courses it thinks I might find useful, as a CogDogBlog Snarkity Service, I have sent them an email with a few course recommendations. They seem to know very little about other open courses, and what came before (and after) them. Also in flickr… This was constructed completely in […]
- Now Three Flavors of Flickr CC Attribution Helper The flickr cc attribution helper is among my most proud creations; I can pretty much tell when I read other blogs who is using it. And it all started from the most important place, something to make my blogging practice easier. I’d written earlier about an unintended outcome of moving it from a browser extension […]
- 2012
- 2 Movies, 2 Photographers, 2 Murders, 2 Realities One of the side benefits of my new working/house-sharing conditions with Jim Groom is getting a chance to watch some movies together. I have a lot of backlog to catch up to his catalog, but this week we watched two classic films, that almost randomly had eerie amounts of similarity. The first was Blowup, apparently […]
- 2011
- Captions Gone Bad or When Looking Back Really Makes You Cringe or Alan does not know crap about art. In my recent presentation on Looking Through The Lens I spent a little time riffing on Errol Morris’ New York Times column Liar Liar Pants on Fire. Morris leads us down the path to show that the question of […]
- ds106 ds106 I found the official ds106 restaurant in Austin- another one for the Illustrate 106 assignment cc licensed ( BY ) flickr photo shared by cogdogblog And am thinking we need a version of this for the theme song https://www.youtube.com/watch?v=4V1p1dM3snQ ds106 ds106, oh no Me gotta go Aye-yi-yi-yi, I said ds106 ds106, oh baby Me gotta […]
- 2010
- Beyond Slidedeckophelia Last week I was deeply immersed (3 days x 14 hours ea) in helping run an NMC Conference in Second Life. Something that has always been obvious came knock me over with a hammer obvious – there is something perversely wrong in communicating something in a 3D space using 2D slides. cc licensed flickr photo […]
- 2008
- PS On Guitar Stories I love you commenters. You make the blog go round. Following up on the last “story” post about an old electric guitar, Cole alertly noticed I’ve been playing around with my writing both here and in my flickr stream with some extended personal yarns (David’s Chair. Seeing the Door). Yes, its my blog and I […]
- Leaving Vancouver Leaving Vancouver by cogdogblog posted 2 Mar ’08, 12.39am MST PST on flickr It was an Arizona blue sky day for a departure from Vancouver. I looked back from my seat to take in one more glance at where I was the last 10 days. Oh my gosh- visit to MDM program at Great Northern […]
- 2007
- Shouldn’t I Be More Suspicious? Blog comment spam is one thing, but when you get an email like: Hello Alan, I’ve been reading Cogdogblog and I love the work you are putting out. My name is Xxxxx xxxxxx. I work with Xxxx XXXXX Xxxx in Xxxxxx, Xxxxx. I would love the opportunity to chat with you about potential partnership opportunities. […]
- Nutso Twitter My twitter curiosity rose to a nice sharp peak and fell off given there’s real work to do. Like just about everyone else, my pre-twitter perspective was, “What kind of person with too much time to spend would bother IMing every time they scratched their leg?”, and then having tried it, found this strange multi-layered […]
- 2005
- Wists = flickr + del.icio.us? I am not sure yet what to make of wists – visual bookmarks, yet another variant following the flickr del.icio.us trail through the mountain pile of folksonomic tag mania. Create a wist account, load a browser bar tool, and when you are surfing and want to track a site in your “collection” (a del.icio.us task), […]
- 2004
- Mysteries Revealed! Inside the MLX (@NMC Mar 9) I am coming up for air…. gasp…. gasp… This is crunch week for prepping my keynote session at the NMC Online Conference, scheduled for Tuesday March 9. My Breeze-d up show is called “Mysteries Revealed! Inside the Maricopa Learning eXchange” and should be action packed, irreverent, and over the top. This will be a guided […]
- Happy Suessentenial (Go Ted Go) Today should be an international holiday, the 100th anniversary of the birth of Theodor Geisel. Yawn? Better we should have said, the 100th anniversary of the birth of Dr. Suess, that’s right today is the Suessentennial. Who cannot connect with a favorite child hood read? Therefore a re-iteration of an earlier post on this dog’s […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 20 posts previously published on March 2nd
- 2024
- That Extra Day in February for Daily Photos (makes 60) It took some lubricant spray to get the Daily Photo to Flickr Habit going in January. Even with February providing one more day to summarize, and making it the Daily Photos 366 style group, I almost let is slip again. But alas, I managed to get 60 photos in 60 days posted to my 17th […] ➡
- 2021
- Tock, Tick, The Daily Trick Most likely I mangled my attempt at wordplay in that title. I’m writing again about my belief/obsession with small acts of daily creativity. I have no real research, no data to back my hypothesis, but I will make up something that applying Curly’s Law to doing something small, new, micro challenging on a regular basis […] ➡
- 2020
- 2020/366 February = 27/29 Following up from last month (nobody is tracking me) for this 13th year of daily photos I am trying to do my cleanup and review each month, thus saving me hours of labor in December. Yeah right. Hello tracker? January was perfect, February, even with it’s extra day had a 2 day gap. I chalk […] ➡
- 2019
- Blogging on a Gutenburger Diet There’s not much middle ground on people feel about the changes wrought to WordPress 5 with the Gutenberg Editor. It’s endless rabbit/duck season arguments. The people who love Gutenberg without qualms are Matt Mullenweg and the people who still work for WordPress trying to make the thing work. The people who hate Gutenberg are pretty […] ➡
- 2018
- A Pour Photo Lacktribution In ramping up for next week’s Mural UDG project on open education at the University of Guadalajara, I go back to something that, after so many years should be more enabled by technology, but is as messy as always. Giving attribution for reused photos is an old horse ridden around this blog, and this very […] ➡
- 2016
- Virtually… as in Almost… as in Not Quite… as in… I’m included with five others on a session / workshop for the upcoming OLC Innovate Conference; we are talking about Virtually Connecting — Rebecca Hogue got us together, and I think she and a few others will be on site. Maha Bali will be virtually there as are others of us, including me. Not being […] ➡
- 2015
- Share Images By Email to SPLOT Collector The SPLOT Image Collector has found resonance as a useful tool to build shared image collections. I’ve modified the admin options so a site owner can decided which of the fields they want on the form (and even designate them […] ➡
- Some Course Recommendations for You… Since Coursera so kindly seems to share courses it thinks I might find useful, as a CogDogBlog Snarkity Service, I have sent them an email with a few course recommendations. They seem to know very little about other open courses, and what came before (and after) them. Also in flickr… This was constructed completely in […] ➡
- Now Three Flavors of Flickr CC Attribution Helper The flickr cc attribution helper is among my most proud creations; I can pretty much tell when I read other blogs who is using it. And it all started from the most important place, something to make my blogging practice easier. I’d written earlier about an unintended outcome of moving it from a browser extension […] ➡
- 2012
- 2 Movies, 2 Photographers, 2 Murders, 2 Realities One of the side benefits of my new working/house-sharing conditions with Jim Groom is getting a chance to watch some movies together. I have a lot of backlog to catch up to his catalog, but this week we watched two classic films, that almost randomly had eerie amounts of similarity. The first was Blowup, apparently […] ➡
- 2011
- Captions Gone Bad or When Looking Back Really Makes You Cringe or Alan does not know crap about art. In my recent presentation on Looking Through The Lens I spent a little time riffing on Errol Morris’ New York Times column Liar Liar Pants on Fire. Morris leads us down the path to show that the question of […] ➡
- ds106 ds106 I found the official ds106 restaurant in Austin- another one for the Illustrate 106 assignment cc licensed ( BY ) flickr photo shared by cogdogblog And am thinking we need a version of this for the theme song https://www.youtube.com/watch?v=4V1p1dM3snQ ds106 ds106, oh no Me gotta go Aye-yi-yi-yi, I said ds106 ds106, oh baby Me gotta […] ➡
- 2010
- Beyond Slidedeckophelia Last week I was deeply immersed (3 days x 14 hours ea) in helping run an NMC Conference in Second Life. Something that has always been obvious came knock me over with a hammer obvious – there is something perversely wrong in communicating something in a 3D space using 2D slides. cc licensed flickr photo […] ➡
- 2008
- PS On Guitar Stories I love you commenters. You make the blog go round. Following up on the last “story” post about an old electric guitar, Cole alertly noticed I’ve been playing around with my writing both here and in my flickr stream with some extended personal yarns (David’s Chair. Seeing the Door). Yes, its my blog and I […] ➡
- Leaving Vancouver Leaving Vancouver by cogdogblog posted 2 Mar ’08, 12.39am MST PST on flickr It was an Arizona blue sky day for a departure from Vancouver. I looked back from my seat to take in one more glance at where I was the last 10 days. Oh my gosh- visit to MDM program at Great Northern […] ➡
- 2007
- Shouldn’t I Be More Suspicious? Blog comment spam is one thing, but when you get an email like: Hello Alan, I’ve been reading Cogdogblog and I love the work you are putting out. My name is Xxxxx xxxxxx. I work with Xxxx XXXXX Xxxx in Xxxxxx, Xxxxx. I would love the opportunity to chat with you about potential partnership opportunities. […] ➡
- Nutso Twitter My twitter curiosity rose to a nice sharp peak and fell off given there’s real work to do. Like just about everyone else, my pre-twitter perspective was, “What kind of person with too much time to spend would bother IMing every time they scratched their leg?”, and then having tried it, found this strange multi-layered […] ➡
- 2005
- Wists = flickr + del.icio.us? I am not sure yet what to make of wists – visual bookmarks, yet another variant following the flickr del.icio.us trail through the mountain pile of folksonomic tag mania. Create a wist account, load a browser bar tool, and when you are surfing and want to track a site in your “collection” (a del.icio.us task), […] ➡
- 2004
- Mysteries Revealed! Inside the MLX (@NMC Mar 9) I am coming up for air…. gasp…. gasp… This is crunch week for prepping my keynote session at the NMC Online Conference, scheduled for Tuesday March 9. My Breeze-d up show is called “Mysteries Revealed! Inside the Maricopa Learning eXchange” and should be action packed, irreverent, and over the top. This will be a guided […] ➡
- Happy Suessentenial (Go Ted Go) Today should be an international holiday, the 100th anniversary of the birth of Theodor Geisel. Yawn? Better we should have said, the 100th anniversary of the birth of Dr. Suess, that’s right today is the Suessentennial. Who cannot connect with a favorite child hood read? Therefore a re-iteration of an earlier post on this dog’s […] ➡
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.