“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 18 posts previously published on July 13th
- 2020
- Granny’s Day “Life was Good” I always (gently) teased my grandmother that she had to live to be 100. And this was no childhood thing; I am pretty sure I started this campaign in my 20s. I’m not sure why I did, and likely it was because I never could imagine a world where she was not in it, even […]
- 2016
- Do You Own What You Share? Wow, a question today from a Google Hangout with Chris Lott’s class keeps grinding away at my brain. He invited me as a guest to his class from the University of Alaska Fairbanks ED F654 : “Digital Citizenship” & Intellectual Property. This was an interesting mix of students from all over Alaska and beyond; thanks […]
- Grandma’s Then and Now is Now Then and Thenner Looking at the photo I think of my little grandmother as a remixer. It came in an envelope of memories she share; the photo on the left of her was labeled “New Years Party” and I can only guess by her hair that maybe it was late 1980s or early 1990s. She had indicated on […]
- 2013
- ds106 Daily Create Challenge (13): When Cutlery Falls Today’s ds106 Daily Create Challenge is a video one: Uh Oh, Today is the 13th. Make a video of you avoiding a superstition. It might not be majorly superstitious since its not Friday, which usually calls for insolent ignorant teenagers and a monster in the lake. I decided to find something other than the familiar […]
- ds106 Daily Create Challenge (12): I’ve Been Down So Long… cc licensed ( BY SA ) flickr photo shared by Alan Levine Today’s ds106 Daily Create Challenge was a photographic one: I’ve Been Down So Long”¦ Take a Photo that represents the essence of Blues music I wrote this one in myself, metaphoric challenges are some of the more interesting ones to me. IMHO, this […]
- 2012
- Impressive MOOCs You Never Hear About: phonar/picbod These days you cannot spit without hitting a new MOOC or someone talking about how MOOCs will revolutionize education, etc. If you’ve been following this for anytime, you will know the story of the first ones, the “connectivist” kind in some parlancesactually naming them c-MOOC (David Wiley’s Intro to Open Ed, Alec Couros’s EC&I 831. […]
- 2011
- pechaflickr now available It’s been fun to see positive reaction to this little experiment, and with some time today, I have added some new features, moved it from my lab testing server to its own domain http://pechaflickr.cogdogblog.com/, and just now posted the source code http://code.google.com/p/pechaflickr/. What is it? It’s just like Reese’s Peanut Butter Cup, two great tastes…. […]
- Meet Richard cc licensed ( BY ) flickr photo shared by cogdogblog This is Richard Dean, an affable and eager to share park guide I stumbled into in Arco, Idaho. I had just visited a rather interesting museum located on the property of the Idaho National Laboratory (INL)- the place where nuclear fission was used to runt […]
- Will it G+ Around in Circles? As an ed tech blogger, there seem to be 2 things to blog about recently- Why Google Plus is The Greatest Thing Since _____ or Why Google Plus is Just Another Wave Fantasy. ‘Scuse me while I sit on the fence and see. A major problem with this technology is it is missing a funky […]
- 2010
- Eight Years Gone Even without the handwritten year, photos along can clearly indicate an era. Today marks the day eight years ago that my grandmother passed away; last year I edited a video made from audio I recorded in 1994 and some scanned photos. She was born in 1905, so in this photo of her lounging in Florida, […]
- 2009
- I’m Talking to YOU! Where is your Amazing Story? I’ve gotten a good collection of Amazing Stories of Openness so far for my August presentation at the Open Ed Conference. But you know what? I want more. I’ve got a bunch of messages, sweet tweets about what a great idea it is, or “I’ll work on it”, but folks, c’mon, this is not all […]
- 2007
- SlideFlickr- At Long Last Just when you think you’ve seen enough cool flickr add on tools, 20 more pop up in your reader. SlideFlickr is very handy- ir can generate code for emdedding and flickr set into an external web page, but you can also create embeddable shows based on tags an d other parameters. Or as the site […]
- My Gizmoz-ed Self In the Aimless Wander and Playing with Not Critical Web Site department, I plopped into gizmoz, a site where you upload an image of your face, and it digitizes it, and applies it to an animated avatar… you even add a short recording, and it syncs the animation to your words. The hardest part was […]
- HeyJude Again! Tweets Me to TouchGraph Wow, it was yesterday that a tweet from HeyJude lead me to vodpod… today she does it again! Today’s tweet from her led me to TouchGraph GoogleBrowser, a web/java application that generates a visual relation map for web sites or searches based on Google data. Well, I think that is what it does. The site […]
- 2005
- Love WordPress I love it- four spam roaches exterminated with one deft motion: Also quickly added the wplicense plug-in, an easy way to puff up your WP blog with a Creative Commons license, and it comes with a free whiff of AJAX! Share this barking on social media
- What’s That Wiki Doing in My ePortfolio? Audree, the brilliant programmer behind the system used at Chandler-Gilbert Community College as well as the version we share with the rest of Maricopa is rolling out some exciting new features for this software. How about a wiki inside an ePort? Audree has rolled into the eport system a version of UseMod wiki. She just […]
- 2004
- First MLX Package Created by Non-Maricopan History has been made! Pat Delaney has created the first package in the new open source MLX demonstration site, with his MLX Package on Twinned Manila sites for k-12 student publishing. We still have a lot of work to do on the site, yes there are missing links, the RSS feeds are only 1/3 there, […]
- 2003
- Weblog Ethics (There is room for that, eh?) As an excerpt from a new book on blogging, Rebecca Blood’s Weblog Ethics is certainly timely. Especially given the current recess fighting over “de-publishing”. But more than that, Rebecca’s wisdom rings true as one of the early bloggers (see Rebecca’s Pocket for may more gems) and is sound advice for those new to the blog […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 18 posts previously published on July 13th
- 2020
- Granny’s Day “Life was Good” I always (gently) teased my grandmother that she had to live to be 100. And this was no childhood thing; I am pretty sure I started this campaign in my 20s. I’m not sure why I did, and likely it was because I never could imagine a world where she was not in it, even […] ➡
- 2016
- Do You Own What You Share? Wow, a question today from a Google Hangout with Chris Lott’s class keeps grinding away at my brain. He invited me as a guest to his class from the University of Alaska Fairbanks ED F654 : “Digital Citizenship” & Intellectual Property. This was an interesting mix of students from all over Alaska and beyond; thanks […] ➡
- Grandma’s Then and Now is Now Then and Thenner Looking at the photo I think of my little grandmother as a remixer. It came in an envelope of memories she share; the photo on the left of her was labeled “New Years Party” and I can only guess by her hair that maybe it was late 1980s or early 1990s. She had indicated on […] ➡
- 2013
- ds106 Daily Create Challenge (13): When Cutlery Falls Today’s ds106 Daily Create Challenge is a video one: Uh Oh, Today is the 13th. Make a video of you avoiding a superstition. It might not be majorly superstitious since its not Friday, which usually calls for insolent ignorant teenagers and a monster in the lake. I decided to find something other than the familiar […] ➡
- ds106 Daily Create Challenge (12): I’ve Been Down So Long… cc licensed ( BY SA ) flickr photo shared by Alan Levine Today’s ds106 Daily Create Challenge was a photographic one: I’ve Been Down So Long”¦ Take a Photo that represents the essence of Blues music I wrote this one in myself, metaphoric challenges are some of the more interesting ones to me. IMHO, this […] ➡
- 2012
- Impressive MOOCs You Never Hear About: phonar/picbod These days you cannot spit without hitting a new MOOC or someone talking about how MOOCs will revolutionize education, etc. If you’ve been following this for anytime, you will know the story of the first ones, the “connectivist” kind in some parlancesactually naming them c-MOOC (David Wiley’s Intro to Open Ed, Alec Couros’s EC&I 831. […] ➡
- 2011
- pechaflickr now available It’s been fun to see positive reaction to this little experiment, and with some time today, I have added some new features, moved it from my lab testing server to its own domain http://pechaflickr.cogdogblog.com/, and just now posted the source code http://code.google.com/p/pechaflickr/. What is it? It’s just like Reese’s Peanut Butter Cup, two great tastes…. […] ➡
- Meet Richard cc licensed ( BY ) flickr photo shared by cogdogblog This is Richard Dean, an affable and eager to share park guide I stumbled into in Arco, Idaho. I had just visited a rather interesting museum located on the property of the Idaho National Laboratory (INL)- the place where nuclear fission was used to runt […] ➡
- Will it G+ Around in Circles? As an ed tech blogger, there seem to be 2 things to blog about recently- Why Google Plus is The Greatest Thing Since _____ or Why Google Plus is Just Another Wave Fantasy. ‘Scuse me while I sit on the fence and see. A major problem with this technology is it is missing a funky […] ➡
- 2010
- Eight Years Gone Even without the handwritten year, photos along can clearly indicate an era. Today marks the day eight years ago that my grandmother passed away; last year I edited a video made from audio I recorded in 1994 and some scanned photos. She was born in 1905, so in this photo of her lounging in Florida, […] ➡
- 2009
- I’m Talking to YOU! Where is your Amazing Story? I’ve gotten a good collection of Amazing Stories of Openness so far for my August presentation at the Open Ed Conference. But you know what? I want more. I’ve got a bunch of messages, sweet tweets about what a great idea it is, or “I’ll work on it”, but folks, c’mon, this is not all […] ➡
- 2007
- SlideFlickr- At Long Last Just when you think you’ve seen enough cool flickr add on tools, 20 more pop up in your reader. SlideFlickr is very handy- ir can generate code for emdedding and flickr set into an external web page, but you can also create embeddable shows based on tags an d other parameters. Or as the site […] ➡
- My Gizmoz-ed Self In the Aimless Wander and Playing with Not Critical Web Site department, I plopped into gizmoz, a site where you upload an image of your face, and it digitizes it, and applies it to an animated avatar… you even add a short recording, and it syncs the animation to your words. The hardest part was […] ➡
- HeyJude Again! Tweets Me to TouchGraph Wow, it was yesterday that a tweet from HeyJude lead me to vodpod… today she does it again! Today’s tweet from her led me to TouchGraph GoogleBrowser, a web/java application that generates a visual relation map for web sites or searches based on Google data. Well, I think that is what it does. The site […] ➡
- 2005
- Love WordPress I love it- four spam roaches exterminated with one deft motion: Also quickly added the wplicense plug-in, an easy way to puff up your WP blog with a Creative Commons license, and it comes with a free whiff of AJAX! Share this barking on social media ➡
- What’s That Wiki Doing in My ePortfolio? Audree, the brilliant programmer behind the system used at Chandler-Gilbert Community College as well as the version we share with the rest of Maricopa is rolling out some exciting new features for this software. How about a wiki inside an ePort? Audree has rolled into the eport system a version of UseMod wiki. She just […] ➡
- 2004
- First MLX Package Created by Non-Maricopan History has been made! Pat Delaney has created the first package in the new open source MLX demonstration site, with his MLX Package on Twinned Manila sites for k-12 student publishing. We still have a lot of work to do on the site, yes there are missing links, the RSS feeds are only 1/3 there, […] ➡
- 2003
- Weblog Ethics (There is room for that, eh?) As an excerpt from a new book on blogging, Rebecca Blood’s Weblog Ethics is certainly timely. Especially given the current recess fighting over “de-publishing”. But more than that, Rebecca’s wisdom rings true as one of the early bloggers (see Rebecca’s Pocket for may more gems) and is sound advice for those new to the blog […] ➡
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.