“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 19 posts previously published on September 23rd
- 2024
- Trying Photini, not shaken nor stirred –but command lined Whew, I really thought I had my blog title pun game back on, but this one just did not work. This is mostly, as blog posts ought to be, for myself as a note of trying a new to me photo tool called Photini. As it turns out (BIB, Because It’s Blogged), the name has […]
- 2016
- Not Disappointed By My Disappointing Prize Such disappointment, as promised. Earlier this month I stayed up late one night to catch Josie Fraser’s keynote at the 2016 ALT-C Conference; you know it’s going to be a good talk when it’s Josie, but even better when it’s got a title like “In the Valley of the Trolls” I would watch it if […]
- Consistently Cole I go way back with Cole Camplese, when I was still at the Maricopa Community Colleges and he was at Penn State University doing assessments with a click wheel iPod. He was the person in 2007, when I was “what is the use of twitter” who gave an actual compelling use case. We’ve blogged back […]
- 2015
- Sorry, I Could Stop Help Myself from Remixing When John Pederson (or “Balki Bartokomous”?) launches a softie like this https://twitter.com/ijohnpederson/status/646833331045163008 how can I resist the urge to remix? Not only are the reaction shots brilliant., but the whistler’s facial contortions are priceless. This was about 25 minutes of iMovie twiddling, it’s so easy a cat could do it I downloaded the Amazing Whistling […]
- [Covering of] Covering the Coverage: Syndication Fed WordPress Powered Magazine That’s about half the descriptors in the title for a writeup on my latest WordPress/Syndication Hub site that Does Not Act Like a Blog- the Covering the Coverage site, one of the 24 courses that are part of Gardner Campbell et al’s Great VCU Race Bike Book project. I’m pretty stoked for how it is […]
- 2013
- Telling Stories Through the Lens: Week 4 I’m on tap to help lead The Week 4 of Headless ds106, and I can tell you right now I probably wont do much. I have way overestimated the time just to prep the lessons, and probably like many participants, feel awash in all the flow of stuff folks are doing. That’s normal. But that […]
- Flickr Fridge Magnets From Russia cc licensed (BY) flickr photo shared by cogdogblog Quite a while ago i was contacted by someone from a company that makes fridge magnets asking permission to use the photos– and today I got my free samples in the mail. I think (need to check) that they have attribution in their catalog (there is none […]
- Calling Insect Experts… Following a Rainbow Grasshopper down an Internet Hole of Serendipity On my trip down to southern Arizona this weekend to visit Karen Fasimpaur, I got a photo of a most unusual multi-colored grasshopper (actually, she spotted it, I just did the photo) cc licensed ( BY SA ) flickr photo shared by Alan Levine I saw more grasshoppers of various sizes, shapes, colors, that weekend, […]
- 2012
- We Don’t Pay For MOOCs Thanks to Scott Leslie, I got inspired to remix a movie scene… We don't pay moocs http://t.co/U2IVpH45 — Scott Leslie (@sleslie) September 24, 2012 With a little iMovie audio overdub, here is a more relevant statement for what happens when you come into the ds106 bar with swaggering talK ’bout MOOCs. Fists are gonna fly. […]
- 2011
- Jim Groom’s Career MacGuffin MacGuffins can happen in real life. The world as we know it would be turned inside out. Countries overthrown. Entire cultural history tossed aside. Dogs and cats sleeping together. Cubs wining the Series. Stuff like that. Share this barking on social media
- The StoryBox Appearance at CHNM cc licensed ( BY ) flickr photo shared by cogdogblog “Excited” is an understatement for how I felt about having the opportunity today to be a guest at the Center for History and New Media at George Mason University — like I said today, this was like a baseball fan getting to go to Cooperstown. […]
- I Can’t Handle the Truth I was trapped in my car all afternoon burning with desire to feed the MacGuffin Alt Movie Syndrome. Seeing Michael Branson Smith’s “A Few Not Son Good Men” it struck my the same scene could be MacGuffin’ed the other way. For me, it better fits my loathing of Tom Cruise. And the community service idea […]
- 2011: A Mutual Collaborative I got MacGuffin fever– it might be this ds106 semester’s animated gif? We all know that collaboration is the way to go, right? We all hold hands, go off to northern canada, and sing tra-la-la-la? 😉 It’s 2011, a ds106 Odyssey! BA….. DA….. DA DA Share this barking on social media
- A Night Not in the Box Been thinking of movies to flip the McGuffin on for this week’s hot ds106 assignment, Messing with the McGuffin: Wikipedia defines the MacGuffin as “a plot element that catches the viewers’ attention or drives the plot of a work of fiction.” For this assignment forever change the plot of a movie, tv show, etc. by […]
- 2009
- Grim Joom This may be closest the cogdog gets to bavanography“¦ And here’s a tip, blogsters- posting a lot of crap does not count any more than good cogdog crap. Share this barking on social media
- 2008
- Typhoon CogDog Thanks for the Typhoon by cogdogblog posted 23 Sep ’08, 8.11am MDT PST on flickr Nick Noakes is the optimal host- he has even arranged a typhoon here in Hong Kong for my entertainment, Now perhaps I can say I am big winded. My timing was good to arrive in Hong Kong Monday afternoon, when […]
- Identifying Trends Where All the Cool Trends Come From by cogdogblog posted 22 Sep ’08, 8.06am MDT PST on flickr They have a store here in Hong Kong! Get yout trends! We have fashion trends, technology trends, economic trends (oops, those are selling badly now). Why waste time doing research? Just hope down to your local Trendyland […]
- 2004
- Training Expo Demo2 This is the last session of the day. I think they want to go home. Let’s give a hand to our guest photographer, Jason, who’s image choice reflected how the group felt at the end of the conference. This group too ahs been rather receptive to some of the wacky ideas presented. Okay, that is […]
- Training Expo 2004 Live Demo I am writing live from Black Canyon Conference Center in Phoenix doing session on so-called “new technologies” for people who work in workforce development centers and job training place. The “presentation” was whipped up this morning (it shows) as a wiki (a) because it is fast; and (b) I can demo a wiki. See “Rip. […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 19 posts previously published on September 23rd
- 2024
- 2016
- Not Disappointed By My Disappointing Prize Such disappointment, as promised. Earlier this month I stayed up late one night to catch Josie Fraser’s keynote at the 2016 ALT-C Conference; you know it’s going to be a good talk when it’s Josie, but even better when it’s got a title like “In the Valley of the Trolls” I would watch it if […] ➡
- Consistently Cole I go way back with Cole Camplese, when I was still at the Maricopa Community Colleges and he was at Penn State University doing assessments with a click wheel iPod. He was the person in 2007, when I was “what is the use of twitter” who gave an actual compelling use case. We’ve blogged back […] ➡
- 2015
- Sorry, I Could Stop Help Myself from Remixing When John Pederson (or “Balki Bartokomous”?) launches a softie like this https://twitter.com/ijohnpederson/status/646833331045163008 how can I resist the urge to remix? Not only are the reaction shots brilliant., but the whistler’s facial contortions are priceless. This was about 25 minutes of iMovie twiddling, it’s so easy a cat could do it I downloaded the Amazing Whistling […] ➡
- [Covering of] Covering the Coverage: Syndication Fed WordPress Powered Magazine That’s about half the descriptors in the title for a writeup on my latest WordPress/Syndication Hub site that Does Not Act Like a Blog- the Covering the Coverage site, one of the 24 courses that are part of Gardner Campbell et al’s Great VCU Race Bike Book project. I’m pretty stoked for how it is […] ➡
- 2013
- Telling Stories Through the Lens: Week 4 I’m on tap to help lead The Week 4 of Headless ds106, and I can tell you right now I probably wont do much. I have way overestimated the time just to prep the lessons, and probably like many participants, feel awash in all the flow of stuff folks are doing. That’s normal. But that […] ➡
- Flickr Fridge Magnets From Russia cc licensed (BY) flickr photo shared by cogdogblog Quite a while ago i was contacted by someone from a company that makes fridge magnets asking permission to use the photos– and today I got my free samples in the mail. I think (need to check) that they have attribution in their catalog (there is none […] ➡
- Calling Insect Experts… Following a Rainbow Grasshopper down an Internet Hole of Serendipity On my trip down to southern Arizona this weekend to visit Karen Fasimpaur, I got a photo of a most unusual multi-colored grasshopper (actually, she spotted it, I just did the photo) cc licensed ( BY SA ) flickr photo shared by Alan Levine I saw more grasshoppers of various sizes, shapes, colors, that weekend, […] ➡
- 2012
- We Don’t Pay For MOOCs Thanks to Scott Leslie, I got inspired to remix a movie scene… We don't pay moocs http://t.co/U2IVpH45 — Scott Leslie (@sleslie) September 24, 2012 With a little iMovie audio overdub, here is a more relevant statement for what happens when you come into the ds106 bar with swaggering talK ’bout MOOCs. Fists are gonna fly. […] ➡
- 2011
- Jim Groom’s Career MacGuffin MacGuffins can happen in real life. The world as we know it would be turned inside out. Countries overthrown. Entire cultural history tossed aside. Dogs and cats sleeping together. Cubs wining the Series. Stuff like that. Share this barking on social media ➡
- The StoryBox Appearance at CHNM cc licensed ( BY ) flickr photo shared by cogdogblog “Excited” is an understatement for how I felt about having the opportunity today to be a guest at the Center for History and New Media at George Mason University — like I said today, this was like a baseball fan getting to go to Cooperstown. […] ➡
- I Can’t Handle the Truth I was trapped in my car all afternoon burning with desire to feed the MacGuffin Alt Movie Syndrome. Seeing Michael Branson Smith’s “A Few Not Son Good Men” it struck my the same scene could be MacGuffin’ed the other way. For me, it better fits my loathing of Tom Cruise. And the community service idea […] ➡
- 2011: A Mutual Collaborative I got MacGuffin fever– it might be this ds106 semester’s animated gif? We all know that collaboration is the way to go, right? We all hold hands, go off to northern canada, and sing tra-la-la-la? 😉 It’s 2011, a ds106 Odyssey! BA….. DA….. DA DA Share this barking on social media ➡
- A Night Not in the Box Been thinking of movies to flip the McGuffin on for this week’s hot ds106 assignment, Messing with the McGuffin: Wikipedia defines the MacGuffin as “a plot element that catches the viewers’ attention or drives the plot of a work of fiction.” For this assignment forever change the plot of a movie, tv show, etc. by […] ➡
- 2009
- Grim Joom This may be closest the cogdog gets to bavanography“¦ And here’s a tip, blogsters- posting a lot of crap does not count any more than good cogdog crap. Share this barking on social media ➡
- 2008
- Typhoon CogDog Thanks for the Typhoon by cogdogblog posted 23 Sep ’08, 8.11am MDT PST on flickr Nick Noakes is the optimal host- he has even arranged a typhoon here in Hong Kong for my entertainment, Now perhaps I can say I am big winded. My timing was good to arrive in Hong Kong Monday afternoon, when […] ➡
- Identifying Trends Where All the Cool Trends Come From by cogdogblog posted 22 Sep ’08, 8.06am MDT PST on flickr They have a store here in Hong Kong! Get yout trends! We have fashion trends, technology trends, economic trends (oops, those are selling badly now). Why waste time doing research? Just hope down to your local Trendyland […] ➡
- 2004
- Training Expo Demo2 This is the last session of the day. I think they want to go home. Let’s give a hand to our guest photographer, Jason, who’s image choice reflected how the group felt at the end of the conference. This group too ahs been rather receptive to some of the wacky ideas presented. Okay, that is […] ➡
- Training Expo 2004 Live Demo I am writing live from Black Canyon Conference Center in Phoenix doing session on so-called “new technologies” for people who work in workforce development centers and job training place. The “presentation” was whipped up this morning (it shows) as a wiki (a) because it is fast; and (b) I can demo a wiki. See “Rip. […] ➡
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