“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 14 posts previously published on August 12th
- 2017
- I’ll Take That Text Extra Large: Bigify It Some people like to spend their long airplane time watching movies or playing phone games. That’s fine. Me, I usually sleep, but on my cross country flight yesterday I wanted to try building a little HTML/jQuery tool. Because it’s something I can use this week. Because I can (running in my laptop’s localhost). Well almost. […]
- 2016
- Hello From Egypt (From 1996) I was so glad I tuned into a Virtually Connecting session this week from the Digital Pedagogy Institute at UMW on Inclusive Globally Networked Learning (all materials including the video link are there). This session was led by three educators from three different (non US) countries – Maha Bali from Egypt, Kate Bowles from Australia, […]
- 2015
- The UDG Agora Group Photos I should have posted these photos a while ago. On the last day of each week of the face to face activities for UdG Agora we asked people to assemble on the lawn outside the CUAAD campus classrooms we used for our sessions. It worked our well because I went two floors higher and was […]
- Maggie’s Digital Content Farm (my version) It’s been a while since I did an edtech cover song. And this one was actually inspired quite some time ago. But recently while reading Audrey Watters notes for her talk Teaching Machines and Turing Machines: The History of the Future of Labor and Learning my brain was triggered. You see it was her November […]
- May I Have This Dance? (My greatest photos are likely never explored) The magic of photos chosen for flickr’s featured explore photos is the mystery of the process. Yes people want lists of tips to game the system (this story of what is called the most popular photo on flickr is worth a read). I’ve had luck in getting a few photos picked, 3 this year In […]
- 2013
- New Content Types: ds106 Assignment Bank Nuevo There it is an assignment created in the new ds106 Assignment Bank template I am building out- the plan is to create the functionality of the ds106 Assignment Bank as a wordpress theme, that could be customized easily for other types of collections. It is quite far from looking and acting like the ds106 site, […]
- 2011
- On the ds106radio With George Siemens cc licensed ( BY ) flickr photo shared by cogdogblog I’ve spent an enjoyable evening visiting George Siemens in Edmonton= happy accident as the original plan was to meet mid afternoon for coffee and I was going to truck on to North Battleford to meet Rob Wall, but I was late getting to town– I […]
- 2010
- Don’t Let The Openness Door Hit You in the Ass (on the way in or out) cc licensed flickr photo shared by boskizzi Disclaimer. I have nothing but utmost respect and admiration for the people who are stretching (literally) the concepts of what is a “course” by experimenting with the form of an “open course”, one with a set of students taking it for traditional credit,. but potentially more, maybe thousands […]
- One Thing Leads to Another (via Words) Thanks to Alec Couros for tweeting about this video, that plays with an interesting style of fast cutting disparate video segments by their connection over words. It’s an interesting exercise to follow the visual/video representation of words in such quick jumps. Apparently this was done as support for a new episode of RadioLab (one of […]
- 2008
- On the Edublogs Dashboard! Thanks EduBlogs! Thanks James! by cogdogblog posted 12 Aug ’08, 10.46pm MDT PST on flickr Thanks to a tweet from @jdwilliams I learned that the edublogs dashboard (like all 190,000 of them) have a nice little pitch for people to help in my quest for interesting uses of WordPress in education for a presentation at […]
- Little Library Got Wii “Library” and “Gaming” were words that you likely saw rarely paired years ago. I was a library junkie as a kid, loved wandering stacks, walking out with piles of books, but it’s hard to shake the imprint that it was a place were the main noises you heard were were “Shhhhh” not “boing!” It’s hardly […]
- 2005
- Google News Squirrelly Feeds Good News: Google News and custom searches are available as RSS/Atom Feeds. Bad News: Has anyone at Google actually googled the RSS 2.0 formats? They have taken a weird approach to the format, double listing the title and publication date items inside the description! Okay, technically it meets RSS 2.0 rules, but functionally, it is […]
- Shuffling To a Car Near Me I rarely listen to the radio anymore, about as much as I can endure is some public radio during the morning commute, and I have not listened to a music station in eons. So since I have been enjoying my iPod Shuffle, I’ve been curious about options to use it as a player in my […]
- 2003
- Update: RSS to JS- addressing accessibility Regarding our RSS to JS demo (code that allows you to embed RSS into any web page using a script that returns RSS as a series of JavaScript write statements), Michelle appropriately noticed that this approach would leave in the dark anyone using a screen reader (or just having JavaScript turned off). Bad dog. The […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 14 posts previously published on August 12th
- 2017
- I’ll Take That Text Extra Large: Bigify It Some people like to spend their long airplane time watching movies or playing phone games. That’s fine. Me, I usually sleep, but on my cross country flight yesterday I wanted to try building a little HTML/jQuery tool. Because it’s something I can use this week. Because I can (running in my laptop’s localhost). Well almost. […] ➡
- 2016
- Hello From Egypt (From 1996) I was so glad I tuned into a Virtually Connecting session this week from the Digital Pedagogy Institute at UMW on Inclusive Globally Networked Learning (all materials including the video link are there). This session was led by three educators from three different (non US) countries – Maha Bali from Egypt, Kate Bowles from Australia, […] ➡
- 2015
- The UDG Agora Group Photos I should have posted these photos a while ago. On the last day of each week of the face to face activities for UdG Agora we asked people to assemble on the lawn outside the CUAAD campus classrooms we used for our sessions. It worked our well because I went two floors higher and was […] ➡
- Maggie’s Digital Content Farm (my version) It’s been a while since I did an edtech cover song. And this one was actually inspired quite some time ago. But recently while reading Audrey Watters notes for her talk Teaching Machines and Turing Machines: The History of the Future of Labor and Learning my brain was triggered. You see it was her November […] ➡
- May I Have This Dance? (My greatest photos are likely never explored) The magic of photos chosen for flickr’s featured explore photos is the mystery of the process. Yes people want lists of tips to game the system (this story of what is called the most popular photo on flickr is worth a read). I’ve had luck in getting a few photos picked, 3 this year In […] ➡
- 2013
- New Content Types: ds106 Assignment Bank Nuevo There it is an assignment created in the new ds106 Assignment Bank template I am building out- the plan is to create the functionality of the ds106 Assignment Bank as a wordpress theme, that could be customized easily for other types of collections. It is quite far from looking and acting like the ds106 site, […] ➡
- 2011
- On the ds106radio With George Siemens cc licensed ( BY ) flickr photo shared by cogdogblog I’ve spent an enjoyable evening visiting George Siemens in Edmonton= happy accident as the original plan was to meet mid afternoon for coffee and I was going to truck on to North Battleford to meet Rob Wall, but I was late getting to town– I […] ➡
- 2010
- Don’t Let The Openness Door Hit You in the Ass (on the way in or out) cc licensed flickr photo shared by boskizzi Disclaimer. I have nothing but utmost respect and admiration for the people who are stretching (literally) the concepts of what is a “course” by experimenting with the form of an “open course”, one with a set of students taking it for traditional credit,. but potentially more, maybe thousands […] ➡
- One Thing Leads to Another (via Words) Thanks to Alec Couros for tweeting about this video, that plays with an interesting style of fast cutting disparate video segments by their connection over words. It’s an interesting exercise to follow the visual/video representation of words in such quick jumps. Apparently this was done as support for a new episode of RadioLab (one of […] ➡
- 2008
- On the Edublogs Dashboard! Thanks EduBlogs! Thanks James! by cogdogblog posted 12 Aug ’08, 10.46pm MDT PST on flickr Thanks to a tweet from @jdwilliams I learned that the edublogs dashboard (like all 190,000 of them) have a nice little pitch for people to help in my quest for interesting uses of WordPress in education for a presentation at […] ➡
- Little Library Got Wii “Library” and “Gaming” were words that you likely saw rarely paired years ago. I was a library junkie as a kid, loved wandering stacks, walking out with piles of books, but it’s hard to shake the imprint that it was a place were the main noises you heard were were “Shhhhh” not “boing!” It’s hardly […] ➡
- 2005
- Google News Squirrelly Feeds Good News: Google News and custom searches are available as RSS/Atom Feeds. Bad News: Has anyone at Google actually googled the RSS 2.0 formats? They have taken a weird approach to the format, double listing the title and publication date items inside the description! Okay, technically it meets RSS 2.0 rules, but functionally, it is […] ➡
- Shuffling To a Car Near Me I rarely listen to the radio anymore, about as much as I can endure is some public radio during the morning commute, and I have not listened to a music station in eons. So since I have been enjoying my iPod Shuffle, I’ve been curious about options to use it as a player in my […] ➡
- 2003
- Update: RSS to JS- addressing accessibility Regarding our RSS to JS demo (code that allows you to embed RSS into any web page using a script that returns RSS as a series of JavaScript write statements), Michelle appropriately noticed that this approach would leave in the dark anyone using a screen reader (or just having JavaScript turned off). Bad dog. The […] ➡
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.
Share this barking on social media