“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 August 5th
- 2019
- Did Someone Say New SPLOT Writer Features? It’s SPLOT season around this blog. Or maybe it’s Fire Up The Stale Blog season. Regardless. I kind of thought the release of demos and first generation code for the TRU Writer SPLOT as a WordPress plugin was a big deal. It was for me! I had said long ago that I did not think […]
- Handing Off WordPress Data to Javascript This dog’s head has been deep in code in preparation of what I see as a next big step for SPLOTs… (update as this post lingered in draft, the plugin is out and about, please test, please. Please). Usually I toss a lot of technical discoveries into a full post; but as an active reader […]
- 2015
- Those Old Hand Cranked CoolIris Presentations, Now With Extended Shelf Life Bryan Alexander has been pushing out great posts on his presentation tips, including using powerpoint, use of voice, body language, and follow-up. Read them all, The Bear shares his wisdom. In one comment I mentioned mixing up your choice of presentation tools, and of the 7 or so I mentioned I completely forgot one I […]
- 2014
- The Te of Pages Because he wrote The Tao of Posts and asked for it, comes the Te of Pages. From the original As we were saying, Te is pronounced DEH. In classical Chinese, it is written two ways. The first joins the character “upright” to the character for “heart”. It’s meaning is virtue. The second way adds the […]
- 2013
- Running with the Headless #ds106 Bulls Once again in the YouDontSeeThisInAMOOC category, long time open participant Melanie Barker gives is a fantastic promo GIF for the Headless ds106 that starts August 26: DS106 makes sense. Running with bulls does not. But running with bulls is exactly what’s going to be happening near Richmond August 24th. Fools. If you visit Melanie’s blog, […]
- You Don’t Get ds106 in a Box Just to be clear… My title is misleading- there are elements of the ds106 site we are going to be making available soon in a format for you to open, paint, fill, decorate, install on your own site. I worry more about the “in a box mindset” cc licensed ( BY NC ) flickr photo […]
- 2012
- pi.pe-ing photos Thanks to a tweet from Doug Belshaw I found a nifty service for moving photos between different photo sharing sites- while functionally useful, pixelpipe or http://pi.pe is an interesting model to look at data transfer. https://twitter.com/dajbelshaw/status/231787637093064705 You authenticate with the service via either Facebook or a Google account (I hear you cringing), and then in […]
- My Blog Talks To You cc licensed ( BY NC SD ) flickr photo shared by Leonard John Matthews I stumbled in my usual accidental way to a technology that makes your blog be able to be heard as audio via its RSS feed, via text to speech service Vocalyze. I was actually googling around for code to help us […]
- Everything is a Repeat As part of our video section os ds106 we have our students watch part two of Kirby Ferguson’s Everything is a Remix so they have an appreciation for the common borrowing of cinematic elements as well as to help them question the notion of “originality” (we ask thema s well to look at Raiders of […]
- Reading About Talk Radio cc licensed ( BY ) flickr photo shared by cogdogblog My current book reading is The New Kings of Nonfiction, a collection edited by my This American Life hero, Ira Glass (who oddly has no self maintained online presence I can find). It’s a collection of stories that weave in the kind of storytelling and […]
- 2010
- Coding My Own WordPress Authors List cc licensed flickr photo shared by bitzcelt Elwood: It’s 106 miles to get this sidebar coded, we’ve got a full tank of gas, half a pack of cigarettes, it’s dark and we’re wearing sunglasses. Jake: Hit it. I have no idea why I opened this way except for Jim Groom Inspiration. But to jive my […]
- Group Tweeting as Individuals: ConnectTweet cc licensed flickr photo shared by Will Pate (the irony of this photo is it pre-dates twitter!) We’re trying out a new strategy/approach/technology for our communication via twitter for NMC. Up to know, for an organization, we have the typical approach of having an “official” account @newmediac (Neil M. Cameron got there first – you […]
- 2009
- Tagnesia cc licensed flickr photo shared by tourist_on_earth I’ve written previously (not that I remembered, I had to use my own blog search) on the challenge of tag juggling when one’s tagging habits have sprawled so much one wonders how many can they keep in the air. And its been something we’ve been discussing for the […]
- 2008
- Can’t Get No (GraphJam) Satisfaction Cant Get No (GraphJammin’) by cogdogblog posted 5 Aug ’08, 5.04pm MDT PST on flickr As a followup to my deeply philsophical blog post on the Tigger versus Eeyore Debate, I slaved for minutes in Excel to produce this visual. I sent it off to GraphJam a while ago, but I guess it did not […]
- 2005
- Left Over Blog Migration Tidbits For some long lost reason, I was looking at my first WordPress entry from April 2005, following the easy and recommended migration from MovableTyoe. First I had not responded to the comment about updating my Feedburner settings. Well, 4 months later, and I sprung into action, updating the blog URL, and making sure my links […]
- Blog-Publishing a Print Publication In the next few months I will be trying to… ahem, dip into the cliche bag…. “walk some of the talk” (or maybe it is “jog some of the blog”). My colleagues and I concocted a plan last week to cease completely the print publication of our mcli Forum, a once a semester publication form […]
- 2004
- Where the Wikis Are or Where Are the Wikis? I believe in wikis…. but they are very strange internet things to wrap your head around. I met today with David, one of the co-chairs of our ePortfolio Ocotillo Action Group and we had an interesting discussion on how to make wikis approachable and appreciated (and used) by people who have never ventured into them. […]
- 2003
- MERLOT: Customs or UPS Ate My Poster My decision to send my poster materials to the MERLOT conference by “express” shipping looks shaky. Apparently, my “packages” were held at customs for extra taxes, my office authorizied, and who knows where they are right now. C’est la vie. So for now, my Maricopa Learning eXchange poster is very transparent, or totally virtual. This […]
- The Phoenix Has Landed at MERLOT Unlike D’Arcy, my trip to Vancouver, British Columbia, was less than smooth. It rained in Florida, so my flight from Phoenix was late, customs was slow, and the bus stopped at every freaking hotel in downtown. Finally arrived at 2:00 am, cannot h-a-r-d-l-y t-y-p-e (no more than usual). It is blessedly cool here (They call […]
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 August 5th
- 2019
- Did Someone Say New SPLOT Writer Features? It’s SPLOT season around this blog. Or maybe it’s Fire Up The Stale Blog season. Regardless. I kind of thought the release of demos and first generation code for the TRU Writer SPLOT as a WordPress plugin was a big deal. It was for me! I had said long ago that I did not think […] ➡
- Handing Off WordPress Data to Javascript This dog’s head has been deep in code in preparation of what I see as a next big step for SPLOTs… (update as this post lingered in draft, the plugin is out and about, please test, please. Please). Usually I toss a lot of technical discoveries into a full post; but as an active reader […] ➡
- 2015
- 2014
- The Te of Pages Because he wrote The Tao of Posts and asked for it, comes the Te of Pages. From the original As we were saying, Te is pronounced DEH. In classical Chinese, it is written two ways. The first joins the character “upright” to the character for “heart”. It’s meaning is virtue. The second way adds the […] ➡
- 2013
- Running with the Headless #ds106 Bulls Once again in the YouDontSeeThisInAMOOC category, long time open participant Melanie Barker gives is a fantastic promo GIF for the Headless ds106 that starts August 26: DS106 makes sense. Running with bulls does not. But running with bulls is exactly what’s going to be happening near Richmond August 24th. Fools. If you visit Melanie’s blog, […] ➡
- You Don’t Get ds106 in a Box Just to be clear… My title is misleading- there are elements of the ds106 site we are going to be making available soon in a format for you to open, paint, fill, decorate, install on your own site. I worry more about the “in a box mindset” cc licensed ( BY NC ) flickr photo […] ➡
- 2012
- pi.pe-ing photos Thanks to a tweet from Doug Belshaw I found a nifty service for moving photos between different photo sharing sites- while functionally useful, pixelpipe or http://pi.pe is an interesting model to look at data transfer. https://twitter.com/dajbelshaw/status/231787637093064705 You authenticate with the service via either Facebook or a Google account (I hear you cringing), and then in […] ➡
- My Blog Talks To You cc licensed ( BY NC SD ) flickr photo shared by Leonard John Matthews I stumbled in my usual accidental way to a technology that makes your blog be able to be heard as audio via its RSS feed, via text to speech service Vocalyze. I was actually googling around for code to help us […] ➡
- Everything is a Repeat As part of our video section os ds106 we have our students watch part two of Kirby Ferguson’s Everything is a Remix so they have an appreciation for the common borrowing of cinematic elements as well as to help them question the notion of “originality” (we ask thema s well to look at Raiders of […] ➡
- Reading About Talk Radio cc licensed ( BY ) flickr photo shared by cogdogblog My current book reading is The New Kings of Nonfiction, a collection edited by my This American Life hero, Ira Glass (who oddly has no self maintained online presence I can find). It’s a collection of stories that weave in the kind of storytelling and […] ➡
- 2010
- Coding My Own WordPress Authors List cc licensed flickr photo shared by bitzcelt Elwood: It’s 106 miles to get this sidebar coded, we’ve got a full tank of gas, half a pack of cigarettes, it’s dark and we’re wearing sunglasses. Jake: Hit it. I have no idea why I opened this way except for Jim Groom Inspiration. But to jive my […] ➡
- Group Tweeting as Individuals: ConnectTweet cc licensed flickr photo shared by Will Pate (the irony of this photo is it pre-dates twitter!) We’re trying out a new strategy/approach/technology for our communication via twitter for NMC. Up to know, for an organization, we have the typical approach of having an “official” account @newmediac (Neil M. Cameron got there first – you […] ➡
- 2009
- Tagnesia cc licensed flickr photo shared by tourist_on_earth I’ve written previously (not that I remembered, I had to use my own blog search) on the challenge of tag juggling when one’s tagging habits have sprawled so much one wonders how many can they keep in the air. And its been something we’ve been discussing for the […] ➡
- 2008
- Can’t Get No (GraphJam) Satisfaction Cant Get No (GraphJammin’) by cogdogblog posted 5 Aug ’08, 5.04pm MDT PST on flickr As a followup to my deeply philsophical blog post on the Tigger versus Eeyore Debate, I slaved for minutes in Excel to produce this visual. I sent it off to GraphJam a while ago, but I guess it did not […] ➡
- 2005
- Left Over Blog Migration Tidbits For some long lost reason, I was looking at my first WordPress entry from April 2005, following the easy and recommended migration from MovableTyoe. First I had not responded to the comment about updating my Feedburner settings. Well, 4 months later, and I sprung into action, updating the blog URL, and making sure my links […] ➡
- Blog-Publishing a Print Publication In the next few months I will be trying to… ahem, dip into the cliche bag…. “walk some of the talk” (or maybe it is “jog some of the blog”). My colleagues and I concocted a plan last week to cease completely the print publication of our mcli Forum, a once a semester publication form […] ➡
- 2004
- Where the Wikis Are or Where Are the Wikis? I believe in wikis…. but they are very strange internet things to wrap your head around. I met today with David, one of the co-chairs of our ePortfolio Ocotillo Action Group and we had an interesting discussion on how to make wikis approachable and appreciated (and used) by people who have never ventured into them. […] ➡
- 2003
- MERLOT: Customs or UPS Ate My Poster My decision to send my poster materials to the MERLOT conference by “express” shipping looks shaky. Apparently, my “packages” were held at customs for extra taxes, my office authorizied, and who knows where they are right now. C’est la vie. So for now, my Maricopa Learning eXchange poster is very transparent, or totally virtual. This […] ➡
- The Phoenix Has Landed at MERLOT Unlike D’Arcy, my trip to Vancouver, British Columbia, was less than smooth. It rained in Florida, so my flight from Phoenix was late, customs was slow, and the bus stopped at every freaking hotel in downtown. Finally arrived at 2:00 am, cannot h-a-r-d-l-y t-y-p-e (no more than usual). It is blessedly cool here (They call […] ➡
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