“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 July 31st
- 2020
- 2017
- Now Tethering Big news. Hah. To save a whopping $10 a month I have let go my line for the Verizon Wifi Hotspot (left in featured above). I’ve not used it nearly as much as in years past, my contract is up. I’ve been testing tethering from my iPhone (which years ago required arcane jail breaking). I […]
- 2015
- The UdG Agora Daily Try Another part of my bag of tricks I brought to the UdG Agora was setting up a site modeled after the original DS106 Daily Create (which is itself a derivative of the defunct Daily Shoot). This idea is something I have kept close for quite some time, that establishing a regular creative practice done daily, […]
- Building the Main UdG Agora Web Site Alas, my pile of things to blog about the UdG Agora project is more like the pile of stones than the finished end piece. Here I will describe what went into the main project web site http://udg.theagoraonline.net/ — and as all my web sites go, they are never quite done; some organization needs to happen. […]
- 2013
- ds106 Daily Create Challenge (31): Down on the Ground cc licensed ( BY SA ) flickr photo shared by Alan Levine And like that, we are at the end of July, the last day of the ds106 Daily Create Summer Challenge, going out with an easy one, a mere photography challenge: Take a picture of your favorite thing in the world to do, however […]
- ds106 Daily Create Challenge 30: Our Anthem Ugh. I admit I was not crazy about today’s ds106 Daily Create, a video challenge: Video yourself singing a verse of your national anthem as fast as you can. Thanks Bill Smith, cannot wait to see YOUR video! Someone who’s identity I will protect emailed me and yelled “Nooooo! I ain’t gonna do it!” I […]
- 2012
- Camp Magic Macguffin By the Numbers makes use of cc licensed ( BY NC ) flickr photo by bitchcakesny: http://flickr.com/photos/bitchcakes/5187928447/ Now that the 2012 Summer of ds106, Camp Version is over, I spent some time trying to pull some numbers from the machine, given how crazy folks are about analytics and massive. First of all, I want to thank all 172,000 […]
- Not That Kind of Flip cc licensed ( BY NC ND ) flickr photo shared by Randy Wade When you blog something, it can often by the metaphorical quarter baked idea. When I wrote suggesting that in looking at ideas such as a flipped classroom, why weren’t we seeing more flipping of professional conference formats? Why cannot we do this […]
- 2011
- Art and the Maintenance of Motorcycle Zen My scrambling of the title of this book I just finished means nothing, or maybe it does represent my confidence of understanding. ZatAoMM is certainly among the Books I Ought to Have Read but Didn’t, and served as a perfect early book of reading while on the road. The heady philosophy parts are still muddy […]
- 2009
- Flip Video Expensive Monitor cc licensed flickr photo shared by cogdogblog I’m almost done the first round of video editing prep for Amazing Stories of Openness for the OpenEd conference. Going well. My plan during my presentation is to give context of each video I have acquired, and play a short clip, but provide the full interview clip as […]
- Matchmaking Learning? It’s possible there’s more out there than I know, but I see social media apps that offer great models for connecting people with similar interests, but wonder where is that for education? Today, I came across Micro.Vois— a simple idea that seems elegant, built on (what else these days?) twitter click to see full image […]
- 2008
- Wrangling WordPress MultiUser Besides manually updating six separate instances WordPress (to version 2.6) in the NMC fleet of sites, I also finally paid some over due attention to the version of WordPressMultiUser I have had up since November 2007. This tool some rustling to get it to the right version and also what had not been done in […]
- I Am So Un Cuil I Am So Un Cuil by cogdogblog posted 31 Jul ’08, 3.01pm MDT PST on flickr I did not spend much time poking at www.cuil.com since it was pretty well blasted across the blogosophere. My ego search left me depressed, nothing for cogdogblog but plenty of "cat piss" Oh well, they must have wised up, […]
- Sometimes You Find Cool Stuff Just by Kicking Over Some Rocks Perhaps your head is exploding with all the new stuff coming out of every electronic orifice. It might be useful to consider how you go about getting your dose? Maybe it’s RSS, it might be clicking every link shared by a Jedi master, or slogging through the plaff of twitter, heck it might even be […]
- 2006
- Citrus Apple Sigh, I am resigning myself that my MacBookPro may be a fruit more in the citrus family. Three days after a 12 day stint to the Apple Repair Facility in Somewhereville, the backlit screen is no longer lit, so off it goes again. “It will be a priority, but expect it to be a week”. […]
- The Man from Moncton Sets Wired Straight Ahh, a fresh Wired magazine hits my door step, and right there in the “rants” section, who else leads but Stephen Downes correcting a myth published in their feature on Superman: “The Myth of Superman” (issue 14.06) tells this tale: “Jerry Siegel and Joe Shuster “¦ created [Superman] as a char-acter in a newspaper comic […]
- 2004
- Halleulah!? MT 3.1 As Courseware Recently bouncing around a few edublogs are echos of Liz Lawley’s MT Courseware 3.1 is coming: The announcement about new features in the upcoming MT3.1 release has gotten me excited about revising my courseware for this fall. In particular, the multi-blog option (“A plugin which allows you to include template content from one weblog in […]
- The Power of Grouping RSS Feeds I’ve been using my CDB Bloglines site mainly to run a master copy of my regular RSS feeds (keep my home and work computers in synch). But playing with grouping of feeds, I’ve found some new tricks to play with. I had just been dumping all feeds into one Bloglines folder, organized alphabetically. I run […]
- 2003
- Build Form added to RSS to Javascript I just added a small feature to our RSS to JS demo, the site that demonstrates a bone-simple (even humans can do this with their bare hands) way to take a known RSS feed and have it displayed inside any web page. This new feature is a simple web form that allows you to enter […]
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 July 31st
- 2020
- 2017
- Now Tethering Big news. Hah. To save a whopping $10 a month I have let go my line for the Verizon Wifi Hotspot (left in featured above). I’ve not used it nearly as much as in years past, my contract is up. I’ve been testing tethering from my iPhone (which years ago required arcane jail breaking). I […] ➡
- 2015
- The UdG Agora Daily Try Another part of my bag of tricks I brought to the UdG Agora was setting up a site modeled after the original DS106 Daily Create (which is itself a derivative of the defunct Daily Shoot). This idea is something I have kept close for quite some time, that establishing a regular creative practice done daily, […] ➡
- Building the Main UdG Agora Web Site Alas, my pile of things to blog about the UdG Agora project is more like the pile of stones than the finished end piece. Here I will describe what went into the main project web site http://udg.theagoraonline.net/ — and as all my web sites go, they are never quite done; some organization needs to happen. […] ➡
- 2013
- ds106 Daily Create Challenge (31): Down on the Ground cc licensed ( BY SA ) flickr photo shared by Alan Levine And like that, we are at the end of July, the last day of the ds106 Daily Create Summer Challenge, going out with an easy one, a mere photography challenge: Take a picture of your favorite thing in the world to do, however […] ➡
- ds106 Daily Create Challenge 30: Our Anthem Ugh. I admit I was not crazy about today’s ds106 Daily Create, a video challenge: Video yourself singing a verse of your national anthem as fast as you can. Thanks Bill Smith, cannot wait to see YOUR video! Someone who’s identity I will protect emailed me and yelled “Nooooo! I ain’t gonna do it!” I […] ➡
- 2012
- Camp Magic Macguffin By the Numbers makes use of cc licensed ( BY NC ) flickr photo by bitchcakesny: http://flickr.com/photos/bitchcakes/5187928447/ Now that the 2012 Summer of ds106, Camp Version is over, I spent some time trying to pull some numbers from the machine, given how crazy folks are about analytics and massive. First of all, I want to thank all 172,000 […] ➡
- Not That Kind of Flip cc licensed ( BY NC ND ) flickr photo shared by Randy Wade When you blog something, it can often by the metaphorical quarter baked idea. When I wrote suggesting that in looking at ideas such as a flipped classroom, why weren’t we seeing more flipping of professional conference formats? Why cannot we do this […] ➡
- 2011
- Art and the Maintenance of Motorcycle Zen My scrambling of the title of this book I just finished means nothing, or maybe it does represent my confidence of understanding. ZatAoMM is certainly among the Books I Ought to Have Read but Didn’t, and served as a perfect early book of reading while on the road. The heady philosophy parts are still muddy […] ➡
- 2009
- Flip Video Expensive Monitor cc licensed flickr photo shared by cogdogblog I’m almost done the first round of video editing prep for Amazing Stories of Openness for the OpenEd conference. Going well. My plan during my presentation is to give context of each video I have acquired, and play a short clip, but provide the full interview clip as […] ➡
- Matchmaking Learning? It’s possible there’s more out there than I know, but I see social media apps that offer great models for connecting people with similar interests, but wonder where is that for education? Today, I came across Micro.Vois— a simple idea that seems elegant, built on (what else these days?) twitter click to see full image […] ➡
- 2008
- Wrangling WordPress MultiUser Besides manually updating six separate instances WordPress (to version 2.6) in the NMC fleet of sites, I also finally paid some over due attention to the version of WordPressMultiUser I have had up since November 2007. This tool some rustling to get it to the right version and also what had not been done in […] ➡
- I Am So Un Cuil I Am So Un Cuil by cogdogblog posted 31 Jul ’08, 3.01pm MDT PST on flickr I did not spend much time poking at www.cuil.com since it was pretty well blasted across the blogosophere. My ego search left me depressed, nothing for cogdogblog but plenty of "cat piss" Oh well, they must have wised up, […] ➡
- Sometimes You Find Cool Stuff Just by Kicking Over Some Rocks Perhaps your head is exploding with all the new stuff coming out of every electronic orifice. It might be useful to consider how you go about getting your dose? Maybe it’s RSS, it might be clicking every link shared by a Jedi master, or slogging through the plaff of twitter, heck it might even be […] ➡
- 2006
- Citrus Apple Sigh, I am resigning myself that my MacBookPro may be a fruit more in the citrus family. Three days after a 12 day stint to the Apple Repair Facility in Somewhereville, the backlit screen is no longer lit, so off it goes again. “It will be a priority, but expect it to be a week”. […] ➡
- The Man from Moncton Sets Wired Straight Ahh, a fresh Wired magazine hits my door step, and right there in the “rants” section, who else leads but Stephen Downes correcting a myth published in their feature on Superman: “The Myth of Superman” (issue 14.06) tells this tale: “Jerry Siegel and Joe Shuster “¦ created [Superman] as a char-acter in a newspaper comic […] ➡
- 2004
- Halleulah!? MT 3.1 As Courseware Recently bouncing around a few edublogs are echos of Liz Lawley’s MT Courseware 3.1 is coming: The announcement about new features in the upcoming MT3.1 release has gotten me excited about revising my courseware for this fall. In particular, the multi-blog option (“A plugin which allows you to include template content from one weblog in […] ➡
- The Power of Grouping RSS Feeds I’ve been using my CDB Bloglines site mainly to run a master copy of my regular RSS feeds (keep my home and work computers in synch). But playing with grouping of feeds, I’ve found some new tricks to play with. I had just been dumping all feeds into one Bloglines folder, organized alphabetically. I run […] ➡
- 2003
- Build Form added to RSS to Javascript I just added a small feature to our RSS to JS demo, the site that demonstrates a bone-simple (even humans can do this with their bare hands) way to take a known RSS feed and have it displayed inside any web page. This new feature is a simple web form that allows you to enter […] ➡
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