“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 15 posts previously published on August 11th
- 2023
- Connected, Even if It Takes Gorilla Tape This thing is still on, even if it has not sprouted much in a while. Just posting to make sure it works. And to add one more shredded post to the pile of likely the oldest blog topic. That’s all. For now. Hi. Featured Image: Share this barking on social media
- 2016
- Sunset at 104 for Grandma Pat The first message I saw today was from my ex-wife with the sad news that her grandmother passed away at age 104. To call “Grandma Pat” feisty was an understatement; I would not have been surprised if she lived to 204. It got me thinking and looking through my old web sites, because I remembered […]
- 2015
- You Can Try and Hide in the Stove, But I’m Coming Looking For Your Stories Ok Rocky. I’ve asked nicely for a story of connection to share in the October 2015 K12 Online Conference. I made a new video. I cleaned up the call for stories. I’ve sent direct emails, DMs. I got 10 so far, thanks Alyson, Dean, Teresa, Cathy, Andy, Kathy, Claudia, Kevin, and Heather. #ThatGlassIsPartlyFullRight I saw […]
- Blog Quotables Because of a favorite rabble rousing desert rat author, a while ago I paraphrased his quote as a sidebar thing on my previous blog theme: [The Blogosphere] is like a stew. If you don’t stir it up every once in a while then a layer of scum floats to the top. I just hand coded […]
- 2014
- A Random Door to Hyperlapse Space creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog In 20+ years, the internet has never failed to provide me a continuous giddy stream of unexpected surprises. It makes Alice’s trip look like a cheesy 1980s VHS movie. This morning I cleaned a lot of duds, dead critters, and dust bunnies from my […]
- 2013
- Spiky Surface of the Sun I bet I crop 90% of my photos in post editing. Sometimes it is minor, to remove a distracting element on a margin, but often, I feel like I can make a less interesting photo more so by using the crop tool to isolate detail or just frame it better. Should I ever teach a […]
- 2009
- 2009/365/222 Open But Can be More Open cc licensed flickr photo shared by cogdogblog "Open" is the theme as I arrived to a wet soggy grey Vancouver for this week’s Open Education Conference. So while I cannot expect stores to be 100% open all the time (and this liquor store does pretty damned good to be open), I have higher hopes for […]
- 2008
- All You Can WordPress at the EduBlog Diner mod of flickr creative commons image: Diner Sign by D.F. Shapinsky (pingnews) That’s the camp title I came up for my short invited presentation this Saturday at WordCamp San Francisco. My blurb is: Among the 100+ million/gazillion blogs estimated that are “out there” quite a few belong to educators using several flavors of WordPress. Edublogs.org […]
- iPhones Ain’t For Bumpkins Dem Fancee iPhoners ar Fer Citee Folks? by cogdogblog posted 11 Aug ’08, 9.13am MDT PST on flickr I guess usn folkz that lives out here in da sticks cant get no iphones, heck we cant even get close to an Ai-Tee-N-Tee store. How the heckus kan I find dem fancy fones if I izz […]
- No Respect for Stupid Spammers No Respect for Stupid Spammers by cogdogblog posted 11 Aug ’08, 8.41am MDT PST on flickr Important URLs (mine) and unimportant ones (spammers) deliberately blurred. All other identification left readable intentionally Well, I doubt I would ever use the word "respect" in proximity of "spammer", but I am at least a tiny bit less turned […]
- 2006
- MacBookProDoorStop Sigh, back to the seven levels of technical hell. Nope, I have advanced beyond a code ID 10T. Just 10 minutes ago, I am talking on my telephone, watching the screen of my laptop, and it blinks/flashes twice, and the screen goes dim again, Crikie! I did a PMU reset, and on the start the […]
- 2005
- Listservs Down the Quagga Trail “Email listservs are the place on the internet for lively and active online communities…” well, it was something I might have said in 1989, 1992, or even 1995. Pondering where listservs are now, I quickly reached for a dinosaur metaphor, but felt that is rather cliche, so I dud around WikiPedia and found the story […]
- Hang Out At The Academic Commons A new meta-resource educational technology site has appeared on the scenes– The Academic Commons: offers a forum for investigating and defining the role that technology can play in liberal arts education. Sponsored by the Center of Inquiry in the Liberal Arts at Wabash College, Academic Commons publishes essays, reviews, interviews, showcases of innovative uses of […]
- Near the ePort Inflection? Here at Maricopa, we’ve been trying to corral the herding cats of electronic folios for several years, back to a Dialogue Day in 2002, to a not so fruitful play with a consortium (it put the software cart before the eport need horse), to creation of our Ocotillo Action Group in 2004 to an excellent […]
- 2004
- Help Build a Free MediaSources Wiki? Please? Taking some blindfolded tosses into the wiki pond, I am going to see if this stuff really works. It comes up in many circles, discussions of online course development, learning objects, and just today in the digital storytelling workshop: Where can I find sources of free media (images, audio, video)? This is usually in the […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 15 posts previously published on August 11th
- 2023
- Connected, Even if It Takes Gorilla Tape This thing is still on, even if it has not sprouted much in a while. Just posting to make sure it works. And to add one more shredded post to the pile of likely the oldest blog topic. That’s all. For now. Hi. Featured Image: Share this barking on social media ➡
- 2016
- Sunset at 104 for Grandma Pat The first message I saw today was from my ex-wife with the sad news that her grandmother passed away at age 104. To call “Grandma Pat” feisty was an understatement; I would not have been surprised if she lived to 204. It got me thinking and looking through my old web sites, because I remembered […] ➡
- 2015
- You Can Try and Hide in the Stove, But I’m Coming Looking For Your Stories Ok Rocky. I’ve asked nicely for a story of connection to share in the October 2015 K12 Online Conference. I made a new video. I cleaned up the call for stories. I’ve sent direct emails, DMs. I got 10 so far, thanks Alyson, Dean, Teresa, Cathy, Andy, Kathy, Claudia, Kevin, and Heather. #ThatGlassIsPartlyFullRight I saw […] ➡
- Blog Quotables Because of a favorite rabble rousing desert rat author, a while ago I paraphrased his quote as a sidebar thing on my previous blog theme: [The Blogosphere] is like a stew. If you don’t stir it up every once in a while then a layer of scum floats to the top. I just hand coded […] ➡
- 2014
- A Random Door to Hyperlapse Space creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog In 20+ years, the internet has never failed to provide me a continuous giddy stream of unexpected surprises. It makes Alice’s trip look like a cheesy 1980s VHS movie. This morning I cleaned a lot of duds, dead critters, and dust bunnies from my […] ➡
- 2013
- Spiky Surface of the Sun I bet I crop 90% of my photos in post editing. Sometimes it is minor, to remove a distracting element on a margin, but often, I feel like I can make a less interesting photo more so by using the crop tool to isolate detail or just frame it better. Should I ever teach a […] ➡
- 2009
- 2009/365/222 Open But Can be More Open cc licensed flickr photo shared by cogdogblog "Open" is the theme as I arrived to a wet soggy grey Vancouver for this week’s Open Education Conference. So while I cannot expect stores to be 100% open all the time (and this liquor store does pretty damned good to be open), I have higher hopes for […] ➡
- 2008
- All You Can WordPress at the EduBlog Diner mod of flickr creative commons image: Diner Sign by D.F. Shapinsky (pingnews) That’s the camp title I came up for my short invited presentation this Saturday at WordCamp San Francisco. My blurb is: Among the 100+ million/gazillion blogs estimated that are “out there” quite a few belong to educators using several flavors of WordPress. Edublogs.org […] ➡
- iPhones Ain’t For Bumpkins Dem Fancee iPhoners ar Fer Citee Folks? by cogdogblog posted 11 Aug ’08, 9.13am MDT PST on flickr I guess usn folkz that lives out here in da sticks cant get no iphones, heck we cant even get close to an Ai-Tee-N-Tee store. How the heckus kan I find dem fancy fones if I izz […] ➡
- No Respect for Stupid Spammers No Respect for Stupid Spammers by cogdogblog posted 11 Aug ’08, 8.41am MDT PST on flickr Important URLs (mine) and unimportant ones (spammers) deliberately blurred. All other identification left readable intentionally Well, I doubt I would ever use the word "respect" in proximity of "spammer", but I am at least a tiny bit less turned […] ➡
- 2006
- MacBookProDoorStop Sigh, back to the seven levels of technical hell. Nope, I have advanced beyond a code ID 10T. Just 10 minutes ago, I am talking on my telephone, watching the screen of my laptop, and it blinks/flashes twice, and the screen goes dim again, Crikie! I did a PMU reset, and on the start the […] ➡
- 2005
- Listservs Down the Quagga Trail “Email listservs are the place on the internet for lively and active online communities…” well, it was something I might have said in 1989, 1992, or even 1995. Pondering where listservs are now, I quickly reached for a dinosaur metaphor, but felt that is rather cliche, so I dud around WikiPedia and found the story […] ➡
- Hang Out At The Academic Commons A new meta-resource educational technology site has appeared on the scenes– The Academic Commons: offers a forum for investigating and defining the role that technology can play in liberal arts education. Sponsored by the Center of Inquiry in the Liberal Arts at Wabash College, Academic Commons publishes essays, reviews, interviews, showcases of innovative uses of […] ➡
- Near the ePort Inflection? Here at Maricopa, we’ve been trying to corral the herding cats of electronic folios for several years, back to a Dialogue Day in 2002, to a not so fruitful play with a consortium (it put the software cart before the eport need horse), to creation of our Ocotillo Action Group in 2004 to an excellent […] ➡
- 2004
- Help Build a Free MediaSources Wiki? Please? Taking some blindfolded tosses into the wiki pond, I am going to see if this stuff really works. It comes up in many circles, discussions of online course development, learning objects, and just today in the digital storytelling workshop: Where can I find sources of free media (images, audio, video)? This is usually in the […] ➡
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