“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 18 posts previously published on December 27th
- 2021
- Forcing Google’s Image Search to Provide CC Licensed Results by Default I find perverse pleasure in finding a way to force Google to Sit, Stay, Rollover, and do the tricks I want it to do rather than what it decides. The sense of power is of course a fabricated illusion, but still, the effect is robustly divine. After some explanation of my current approach, creating a […]
- 2020
- Tagging Stuff: “SPLOT You Complete Me” Amongst the holiday time come for me a wee bit of time to attend to more minor code bits in my WordPress SPLOT themes that will likely rarely be noticed. For those that actually still use their WordPress sites, you likely as well do not notice that when you go to tag a post, WordPress […]
- 2019
- Stutz in Color To every new browser tab opened, is a window to the past, thanks to the Free to Use Browser Extension from the Library of Congress. What it means is that every new tab opened in Chrome comes a public domain photo from the Library of Congress. I don’t think I’ve ever seen the same one […]
- 2018
- 2016
- Fantastic Tool for Untangling Timelines Sure one has to wear heavy rubber boots when wading through the twitter pool these days, but dodging the crud, I still find my regular supply of gold nuggets. I cannot even remember who shared TimeLineCurator with me, but I thank them and my serendipity curiosity that made me click. From their own description: Want […]
- Sketched CC Certification Pipeline Publication Flow We’ve definitely been going down Robert Frost’s lesser travel roads of development for the certifications. tl;nr (too long; nobody reads): A long stream of sketches and linked prototypes interspersed with some technical jargon of how all of this might be stitched together. While the development team is researching and drafting the content for the units, […]
- Now With More TASL: Flickr CC Attribution Helper Because I use it almost daily, I have to admit that my favorite tool I built is the flickr CC Attribution Helper which makes attributing Creative Commons licensed flickr photos a one click copy / paste operation. The thing about attribution is that there are no fixed rules for how to do it, and if […]
- 2013
- Dear Marketing by Email “Experts” I’m Serious About Messing With You Hi, Hello. I was wondering whether you’d be interested in selling advertising space on http://cogdogblog.com? Does the phrase “No, not even after hell freezes over” mean anything to you? The advertisement would be unobtrusive and we can pay you an annual upfront payment for the advertising space. See my rates below. I’m really wondering when […]
- In Search of Split Pea Soup Memories of my grandmother and sifting through the fragments I have left of her, led to this story authored at Cowbird (not sure how well it embeds, testing it now…) Update Jan 6, 2013 My sister had a copy of the recipe, thanks Harriet! Look at my little rebel jewish grandmother, making soup with a […]
- 2012
- Syndicating Myself cc licensed ( BY ) flickr photo shared by @boetter The very beating, pumping heart of ds106 is, and always be, the architecture as Jim Groom metaphorized as the syndication bus (and properly attributes to a Brian Lamb comment quoting George Siemens, how far can you follow the attribution train?). For ds106, the pump that […]
- Continuity Problems Can GIF in Your Way Note: This should be moved over to CogDogBlog.com when the hippies hosting it turn the lights on) My latest video watching was Clint Eastwood’s western Hang “em High (1968), his first non spaghetti one. The story of the honest guy done wrong, his quest for revenge, is also played out on the balance of power [...]
- 2006
- *@#ing Five Things D’Arcy, you with the apostrophe in your first name (!), tagged me with the Five Things meme. So here are five things likely not widely known about the human behind CogDogBlog: Until I was 22, I had not traveled farther west than the Appalachian Mountains (except for the 3 days I attended New Mexico Institute […]
- Doc in Web 0.1 Living, working, sometimes too immersed in web technology, I am taken back by interactions where situations seem o cry for a more technological approach. My doctor’s office stuck out twice today. On a visit to a PA to deal with some ongoing leg pain (keeping me from running, grumble), she remarked as she was scribbling […]
- CugDugPlugins After reading, Quentins nicely shared post of the WordPress plugins used on his site (and more shared in the comments), I thought, “Great idea! Let’s go into borrow mode!”. And it made sense to build one of those, um, colo– colofuns, coloph…. oh what the heck, Blog Bits, that describes some info about what’s under […]
- 2004
- The Costco Audio Index Looking for trends? You do not need pundits or experts, just keep your eyes open. I liked a saying I heard at the last EDUCAUSE meeting on the point where a technology reaches a wide range of acceptance- it appears as a consumer item, the “BestBuyification” of technology. I was doing some shopping at Costco […]
- Blogging Gone Wild in Greensboro People and journalists 😉 are writing about a blogging phenomena n Greensboro, North Carolina, which apparently is becoming a critical mass as maybe a hub in public engagement in blogging (reading, writing, commenting), Jay Rosen in Greensboro Newspaper Goes Open Source: A Follow Up: I am going to stay on the story of the Greensboro […]
- Nuts About ecto Readers know how affectionate and enamored I am of flickr but the feelings are just as gooey for ecto, the desktop blog editing tool for Mac OSX and Windows. In fact, it is one of the very few software titles out there that I shelled out some shareware $ for. Without a doubt, I would […]
- Thinking About Links It has actually been several months since I read “Linked: How Everything Is Connected to Everything Else and What It Means” (Albert-Laszlo Barabasi) but I keep coming back to it, scribbling in the margins, and finding it so insightful to thinking about links between people, places, and things on the net. It has everything to […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 18 posts previously published on December 27th
- 2021
- 2020
- Tagging Stuff: “SPLOT You Complete Me” Amongst the holiday time come for me a wee bit of time to attend to more minor code bits in my WordPress SPLOT themes that will likely rarely be noticed. For those that actually still use their WordPress sites, you likely as well do not notice that when you go to tag a post, WordPress […] ➡
- 2019
- Stutz in Color To every new browser tab opened, is a window to the past, thanks to the Free to Use Browser Extension from the Library of Congress. What it means is that every new tab opened in Chrome comes a public domain photo from the Library of Congress. I don’t think I’ve ever seen the same one […] ➡
- 2018
- 2016
- Fantastic Tool for Untangling Timelines Sure one has to wear heavy rubber boots when wading through the twitter pool these days, but dodging the crud, I still find my regular supply of gold nuggets. I cannot even remember who shared TimeLineCurator with me, but I thank them and my serendipity curiosity that made me click. From their own description: Want […] ➡
- Sketched CC Certification Pipeline Publication Flow We’ve definitely been going down Robert Frost’s lesser travel roads of development for the certifications. tl;nr (too long; nobody reads): A long stream of sketches and linked prototypes interspersed with some technical jargon of how all of this might be stitched together. While the development team is researching and drafting the content for the units, […] ➡
- Now With More TASL: Flickr CC Attribution Helper Because I use it almost daily, I have to admit that my favorite tool I built is the flickr CC Attribution Helper which makes attributing Creative Commons licensed flickr photos a one click copy / paste operation. The thing about attribution is that there are no fixed rules for how to do it, and if […] ➡
- 2013
- Dear Marketing by Email “Experts” I’m Serious About Messing With You Hi, Hello. I was wondering whether you’d be interested in selling advertising space on http://cogdogblog.com? Does the phrase “No, not even after hell freezes over” mean anything to you? The advertisement would be unobtrusive and we can pay you an annual upfront payment for the advertising space. See my rates below. I’m really wondering when […] ➡
- In Search of Split Pea Soup Memories of my grandmother and sifting through the fragments I have left of her, led to this story authored at Cowbird (not sure how well it embeds, testing it now…) Update Jan 6, 2013 My sister had a copy of the recipe, thanks Harriet! Look at my little rebel jewish grandmother, making soup with a […] ➡
- 2012
- Syndicating Myself cc licensed ( BY ) flickr photo shared by @boetter The very beating, pumping heart of ds106 is, and always be, the architecture as Jim Groom metaphorized as the syndication bus (and properly attributes to a Brian Lamb comment quoting George Siemens, how far can you follow the attribution train?). For ds106, the pump that […] ➡
- Continuity Problems Can GIF in Your Way Note: This should be moved over to CogDogBlog.com when the hippies hosting it turn the lights on) My latest video watching was Clint Eastwood’s western Hang “em High (1968), his first non spaghetti one. The story of the honest guy done wrong, his quest for revenge, is also played out on the balance of power [...]
➡
- 2006
- *@#ing Five Things D’Arcy, you with the apostrophe in your first name (!), tagged me with the Five Things meme. So here are five things likely not widely known about the human behind CogDogBlog: Until I was 22, I had not traveled farther west than the Appalachian Mountains (except for the 3 days I attended New Mexico Institute […] ➡
- Doc in Web 0.1 Living, working, sometimes too immersed in web technology, I am taken back by interactions where situations seem o cry for a more technological approach. My doctor’s office stuck out twice today. On a visit to a PA to deal with some ongoing leg pain (keeping me from running, grumble), she remarked as she was scribbling […] ➡
- CugDugPlugins After reading, Quentins nicely shared post of the WordPress plugins used on his site (and more shared in the comments), I thought, “Great idea! Let’s go into borrow mode!”. And it made sense to build one of those, um, colo– colofuns, coloph…. oh what the heck, Blog Bits, that describes some info about what’s under […] ➡
- 2004
- The Costco Audio Index Looking for trends? You do not need pundits or experts, just keep your eyes open. I liked a saying I heard at the last EDUCAUSE meeting on the point where a technology reaches a wide range of acceptance- it appears as a consumer item, the “BestBuyification” of technology. I was doing some shopping at Costco […] ➡
- Blogging Gone Wild in Greensboro People and journalists 😉 are writing about a blogging phenomena n Greensboro, North Carolina, which apparently is becoming a critical mass as maybe a hub in public engagement in blogging (reading, writing, commenting), Jay Rosen in Greensboro Newspaper Goes Open Source: A Follow Up: I am going to stay on the story of the Greensboro […] ➡
- Nuts About ecto Readers know how affectionate and enamored I am of flickr but the feelings are just as gooey for ecto, the desktop blog editing tool for Mac OSX and Windows. In fact, it is one of the very few software titles out there that I shelled out some shareware $ for. Without a doubt, I would […] ➡
- Thinking About Links It has actually been several months since I read “Linked: How Everything Is Connected to Everything Else and What It Means” (Albert-Laszlo Barabasi) but I keep coming back to it, scribbling in the margins, and finding it so insightful to thinking about links between people, places, and things on the net. It has everything to […] ➡
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.