“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 16 posts previously published on October 27th
- 2021
- Random Generator of Random Generators (but really the folly of tools) The audience who appreciates a subtle reference to recursion, a machine that makes machines, or going meta about something meta is sized down there maybe in the single digits… of one hand. Oh well, if anything I write to amuse myself. Insert laughter. So speaking of turning on a machine of productivity, Martin Weller is […]
- 2018
- A Few More Discs for SPLOTbox A good jukebox can always stand a few more kinds of music put into the rotation, right? I’ve just made some updates to the SPLOTbox media collector in response to a request from Dave Quinn. @cogdog really love the Juke Box #SPLOT layout & want to use it to collect + share participant creations @ […]
- 2016
- Car Points: My History Yes, our American fascination with our gas churning cars may be a tad vulgar. But they are engrained in our culture. Leave it to my Iranian born American raised blogging friend Jabiz, now living in Singapore, to inspire this post with his A History of Cars. If you read between the cars in his post, […]
- 2015
- Bill ‘n Alan Jaw ‘Bout #Western106 For more of a lead up to a western flavored version of DS106 starting January 2016, I aimed for another video to solicit interest from KSU students, where I will be teaching it. Bill Genereux suggested doing a video that might be able to go on their local access TV. I had this idea to […]
- 2014
- Looking for Light/Looking for Ideas creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog For a break today, my first full day on campus at Thompson River University, I do the thing I enjoy most– wandering around with my camera. I do cite a subtle and maybe overlooked tip for photography is “to look for the light.” This […]
- WikiThinking creative commons licensed ( BY-NC-ND ) flickr photo shared by [ changó ] Here I try to try to start trying to… think out loud about part of my project here at Thompson Rivers University as an Open Learning Scholar. One component is to work with Brian Long in help broadening the use of their […]
- 2012
- Who’s That Cute Kid on The Beach? I was on the beach recently and found a cute kid to take a photo of: I got the push to make it seeing Before and After Pictures with a Twist on Buzzfeed where some dude inserted modern photos of himself into photos of him as a kid- but its more than cut and paste, […]
- 2011
- My aPhone cc licensed ( BY ) flickr photo shared by cogdogblog Yes, it is so- this LG Thrive is my (temporary) replacement for my iPhone that lept over a cliff this week. It is a Droid. Frankly the fervent fetishing of this phone over that phone tires me (though I really want the one that starts […]
- The ds106 radio Vinyl / Revolution Session with Gardner Campbell cc licensed ( BY ) flickr photo shared by cogdogblog There are too many reasons to list for me to say why I enjoy hanging out with Gardner Campbell one of them being the regular education he gives me in things like how vinyl records are mastered and the real meaning of revolutions. We did […]
- 2009
- Must Be Easier to Waste Resources cc licensed flickr photo shared by cogdogblog Supposedly businesses are getting more "green" and focused on not wasting resources. Supposedly. In my postal mail were two examples that say to me, that it is far more "efficient" for them to waste paper, postage, delivery time to send me irrelevant crap. Magazines, in some sense maybe […]
- 2008
- Gmail Gone All Widgety I’m already pretty wired into iGoogle as my home, been so for like, well ever since it came out. But now, Gmail is getting the widget business to, as the Google Labs now offers options to add to the Gmail side bar, small iGoogle-like widgets for seeing your calendar, recent docs, etc. As described in […]
- Web 2.0 Storytelling Published; Lonely Wiki Cries Out for Attention The editor of EDUCAUSE Review, a good friend and fellow Arizonan, has been nudging me a few years to consider writing an article. Sure I blog a lot, but a publish article requires things like grammar, references, and coherency… so last Spring I suggested co-authoring as a crutch. Over the summer, I was honored to […]
- 2004
- Cog (No Dog) Railway flickr foto Cog (No Dog) Railwayavailable on my flickr This technology pulled us up 25% grades to the top of Pikes Peak, Colorado aboard the Cog Railway. Yes, the camera has safely returned to Arizona, all 130 photos in tact. Whew! Not much time to process them with 2 more days left before our next […]
- Conference Hangover: Low Information Density in Conference Presentations Actually, my vacation time in Colorado did wonders to revive my spirits after 4 days at the EDUCAUSE 2004 conference. I’ve grumbled before about the sour irony that the dominant mode of communication in our field of instructional technology (or pretty much all other conference gatherings) is the very unwired, tired…. 50 minute lecture to […]
- 2003
- MT-Blacklist 1.5 Out: Stop Blog Spam Cold Now out to improve your MovableType blog sanity, is Jay Allen’s miraculous MT-Blacklist – A Movable Type Anti-spam Plugin version 1.5. This is a large update and offers one click, de-spammiing of both comments and trackbacks, adding to blacklist file, and rebuilding of offended files. It is like magic. I had one arrive today with […]
- NMC Presentation: “Connecting Learning Objects with RSS, Trackback, and Weblogs” If you were unable to attend the New Media Consortium (NMC)’s Online Conference on Learning Objects iin October, you missed out on some great sessions and exchange of ideas, as well as a brand new platform for online conferences. All presentations were created with Marcomedia Breeze (in essence streaming audio narrated content delivered as Flash), […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 16 posts previously published on October 27th
- 2021
- Random Generator of Random Generators (but really the folly of tools) The audience who appreciates a subtle reference to recursion, a machine that makes machines, or going meta about something meta is sized down there maybe in the single digits… of one hand. Oh well, if anything I write to amuse myself. Insert laughter. So speaking of turning on a machine of productivity, Martin Weller is […] ➡
- 2018
- A Few More Discs for SPLOTbox A good jukebox can always stand a few more kinds of music put into the rotation, right? I’ve just made some updates to the SPLOTbox media collector in response to a request from Dave Quinn. @cogdog really love the Juke Box #SPLOT layout & want to use it to collect + share participant creations @ […] ➡
- 2016
- Car Points: My History Yes, our American fascination with our gas churning cars may be a tad vulgar. But they are engrained in our culture. Leave it to my Iranian born American raised blogging friend Jabiz, now living in Singapore, to inspire this post with his A History of Cars. If you read between the cars in his post, […] ➡
- 2015
- Bill ‘n Alan Jaw ‘Bout #Western106 For more of a lead up to a western flavored version of DS106 starting January 2016, I aimed for another video to solicit interest from KSU students, where I will be teaching it. Bill Genereux suggested doing a video that might be able to go on their local access TV. I had this idea to […] ➡
- 2014
- Looking for Light/Looking for Ideas creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog For a break today, my first full day on campus at Thompson River University, I do the thing I enjoy most– wandering around with my camera. I do cite a subtle and maybe overlooked tip for photography is “to look for the light.” This […] ➡
- WikiThinking creative commons licensed ( BY-NC-ND ) flickr photo shared by [ changó ] Here I try to try to start trying to… think out loud about part of my project here at Thompson Rivers University as an Open Learning Scholar. One component is to work with Brian Long in help broadening the use of their […] ➡
- 2012
- Who’s That Cute Kid on The Beach? I was on the beach recently and found a cute kid to take a photo of: I got the push to make it seeing Before and After Pictures with a Twist on Buzzfeed where some dude inserted modern photos of himself into photos of him as a kid- but its more than cut and paste, […] ➡
- 2011
- My aPhone cc licensed ( BY ) flickr photo shared by cogdogblog Yes, it is so- this LG Thrive is my (temporary) replacement for my iPhone that lept over a cliff this week. It is a Droid. Frankly the fervent fetishing of this phone over that phone tires me (though I really want the one that starts […] ➡
- The ds106 radio Vinyl / Revolution Session with Gardner Campbell cc licensed ( BY ) flickr photo shared by cogdogblog There are too many reasons to list for me to say why I enjoy hanging out with Gardner Campbell one of them being the regular education he gives me in things like how vinyl records are mastered and the real meaning of revolutions. We did […] ➡
- 2009
- Must Be Easier to Waste Resources cc licensed flickr photo shared by cogdogblog Supposedly businesses are getting more "green" and focused on not wasting resources. Supposedly. In my postal mail were two examples that say to me, that it is far more "efficient" for them to waste paper, postage, delivery time to send me irrelevant crap. Magazines, in some sense maybe […] ➡
- 2008
- Gmail Gone All Widgety I’m already pretty wired into iGoogle as my home, been so for like, well ever since it came out. But now, Gmail is getting the widget business to, as the Google Labs now offers options to add to the Gmail side bar, small iGoogle-like widgets for seeing your calendar, recent docs, etc. As described in […] ➡
- Web 2.0 Storytelling Published; Lonely Wiki Cries Out for Attention The editor of EDUCAUSE Review, a good friend and fellow Arizonan, has been nudging me a few years to consider writing an article. Sure I blog a lot, but a publish article requires things like grammar, references, and coherency… so last Spring I suggested co-authoring as a crutch. Over the summer, I was honored to […] ➡
- 2004
- Cog (No Dog) Railway flickr foto Cog (No Dog) Railwayavailable on my flickr This technology pulled us up 25% grades to the top of Pikes Peak, Colorado aboard the Cog Railway. Yes, the camera has safely returned to Arizona, all 130 photos in tact. Whew! Not much time to process them with 2 more days left before our next […] ➡
- Conference Hangover: Low Information Density in Conference Presentations Actually, my vacation time in Colorado did wonders to revive my spirits after 4 days at the EDUCAUSE 2004 conference. I’ve grumbled before about the sour irony that the dominant mode of communication in our field of instructional technology (or pretty much all other conference gatherings) is the very unwired, tired…. 50 minute lecture to […] ➡
- 2003
- MT-Blacklist 1.5 Out: Stop Blog Spam Cold Now out to improve your MovableType blog sanity, is Jay Allen’s miraculous MT-Blacklist – A Movable Type Anti-spam Plugin version 1.5. This is a large update and offers one click, de-spammiing of both comments and trackbacks, adding to blacklist file, and rebuilding of offended files. It is like magic. I had one arrive today with […] ➡
- NMC Presentation: “Connecting Learning Objects with RSS, Trackback, and Weblogs” If you were unable to attend the New Media Consortium (NMC)’s Online Conference on Learning Objects iin October, you missed out on some great sessions and exchange of ideas, as well as a brand new platform for online conferences. All presentations were created with Marcomedia Breeze (in essence streaming audio narrated content delivered as Flash), […] ➡
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