“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 15th
- 2022
- Shaping an H5P Combination Lock… and then along comes a real one I had a tab open for months (no one paid it off) (no a browser tab) in the vein of ones about shaping technology (insert a Tom Woodward style footnote that goes to his blog). What am I babbling about? It’s a way of using technology working within its abilities to shape it to do […]
- 2020
- When Asking a Long Time For Larger Bullet Points… … then you just might have to pound them in yourself. And few things in this tech work give me more joy when figuring an end around, even if it’s one you end up not using. Rising For a number of months, I’ve been working away on an [unblogged about] project for JIBC, again like […]
- 2018
- Try That Burger Again Okay, I have been grumpy about the new WordPress Gutenberg “editing experience” I did give it a try a month ago but am so comfortable in my writing flow, that I found it really getting in my way. A number of things on my site ended up thrust on the left side of the page. And […]
- 2014
- This Is a Public Place Last night on TMC they were showing Antonioni’s Blow Up — one of the brilliant films I watched in 2012. This was while I was working / living with Jim Groom, and we enjoyed a mini 1970s Conspiracy Movie fest. Blow Up left a lens shaped impression, the questions of what does a photograph mean, […]
- You Show Show Notes A credible, textbook design process includes extensive pre-planning, testing, reviewing feedback, and making public once it has been thoroughly scrutinized. That’s not happening here. The previous post was syndicated here from a new project being hastily assembled by me and Brian Lamb at TRU as part of my Fellowship. Part of the package was running […]
- The Making of The You Show Episode 0 Now that our first video is on the front stage, let’s do this the You Show way and talk about the making of this video. Brian and I knew we were on a hurry up ramp to at least get … Continued
- 2012
- A Big Box Full of…. cc licensed ( BY ) flickr photo shared by cogdogblog Yeah, I was a pretty clever kid (aka “smart ass”). When my parents asked me what I wanted for a holiday gift, my cunning plan was to aim for more than one present– go for volume!– so my standard equest was “A big box full […]
- 2011
- My Insidious Plan to Neutralize Facebook cc licensed ( BY NC ND ) flickr photo shared by massdistraction It seems rather fashionable for some to dramatically announce their deletion of facebook accounts, to shun it, to urge others to quit, after all, all the cool kids are doing it. I never quite followed the logic of whether it was 250, 400, […]
- iHome cc licensed ( BY ) flickr photo shared by cogdogblog I’ll take the one on the right. Today I activated my shiny new iPhone 4S. It was like returning home. It was a late October visit to Natural Tunnel State Park in Virginia when I managed to drop my iPhone 4 into a canyon while […]
- 2010
- Play Five Card ds106 Stories In the pre-launch fury for the ds106 Digital Storytelling Open Course, I thought it would be fun (and easy to set up) to create a new place on the Five Card Flickr Stories site for us to play. Want to have a go at making a story? Head over to http://web.nmc.org/5cardstory/play.php?suit=ds106. I’m curious to see […]
- Not Dog Writing? The Dog Reading cc licensed flickr photo shared by dchrisoh This year I fell out of NaNoWriMo only 12 days in, and it was a good thing. I could sense form where I was, that my attempt at writing a World According to Dogs novel was maybe at best, a not original idea and not welle executed. But […]
- 2008
- Novel Approach I just did something I’ve not done in a while. I finished a novel 😉 Sadly, it was one that was sitting on my shelf a long time, picked up maybe 2 years ago in a local thrift store recommended by Brian when he visited here. I’m not going to launch into some sort of […]
- 2007
- I’ve Been Spocked Spock Bag posted 14 Oct ’05, 1.30pm MDT PST on flickr I embroidered this Spock bag for Mason the other day. I am trying to determine of the recent small trickle of emails notifying me that “XXXXX has requested your trust on Spock” is of merit or just another blotch of Quechup. So before I […]
- 2004
- Better MT-ing 1: Naming Files To Your Advantage What’s in a file name? Well it is the URL that you will publish, so make the most of it. You can make room for flexibility in your blogs if you set things so all content created is published as *.php rather than *.html. What is PHP? A long forgotten acronym, but it is a […]
- Better MT-ing in 6 Bites I’ve been at the blogging biz using MovableType (MT) since April 19, 2003, and along the way I’ve been putting aside some ideas for things I have done beyond the out of the box set up that might help others. Also, since I am still living in the free land of MT 2.661, I have […]
- 2003
- “Blog on Blogs”- excellent educational example of weblog use Blog on Blogs, a Weblog Review does double duty as a great resource for getting a handle on weblogs and a wonderful example of using blogs in an educational context, a New Media Studies course: This project is collaboration produced by the students of the Fall 2003 Introduction to New Media Studies course at Richard […]
- See the Pictures of ‘Net Pioneers No centerfolds but… for those that enjoy the history of how the Net unfolded, if you could not get enough of “Where the Wizards Stayed Up Late” (a great read by the way), check out “The Faces in Front of the Monitors”— this is an alphabet listing of those wizards, many with multiple photos. This […]
- Jade Takes a Break… This blog will blink off line around Dec 30 or 31 when I hope to migrate our content and assorted scripts to the new XServe– I had thought it would happen by the end of the week before I vanish 10 days to my retreat, but it is rushed, and the last days of December […]
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 15th
- 2022
- 2020
- When Asking a Long Time For Larger Bullet Points… … then you just might have to pound them in yourself. And few things in this tech work give me more joy when figuring an end around, even if it’s one you end up not using. Rising For a number of months, I’ve been working away on an [unblogged about] project for JIBC, again like […] ➡
- 2018
- Try That Burger Again Okay, I have been grumpy about the new WordPress Gutenberg “editing experience” I did give it a try a month ago but am so comfortable in my writing flow, that I found it really getting in my way. A number of things on my site ended up thrust on the left side of the page. And […] ➡
- 2014
- This Is a Public Place Last night on TMC they were showing Antonioni’s Blow Up — one of the brilliant films I watched in 2012. This was while I was working / living with Jim Groom, and we enjoyed a mini 1970s Conspiracy Movie fest. Blow Up left a lens shaped impression, the questions of what does a photograph mean, […] ➡
- You Show Show Notes A credible, textbook design process includes extensive pre-planning, testing, reviewing feedback, and making public once it has been thoroughly scrutinized. That’s not happening here. The previous post was syndicated here from a new project being hastily assembled by me and Brian Lamb at TRU as part of my Fellowship. Part of the package was running […] ➡
- The Making of The You Show Episode 0 Now that our first video is on the front stage, let’s do this the You Show way and talk about the making of this video. Brian and I knew we were on a hurry up ramp to at least get … Continued ➡
- 2012
- A Big Box Full of…. cc licensed ( BY ) flickr photo shared by cogdogblog Yeah, I was a pretty clever kid (aka “smart ass”). When my parents asked me what I wanted for a holiday gift, my cunning plan was to aim for more than one present– go for volume!– so my standard equest was “A big box full […] ➡
- 2011
- My Insidious Plan to Neutralize Facebook cc licensed ( BY NC ND ) flickr photo shared by massdistraction It seems rather fashionable for some to dramatically announce their deletion of facebook accounts, to shun it, to urge others to quit, after all, all the cool kids are doing it. I never quite followed the logic of whether it was 250, 400, […] ➡
- iHome cc licensed ( BY ) flickr photo shared by cogdogblog I’ll take the one on the right. Today I activated my shiny new iPhone 4S. It was like returning home. It was a late October visit to Natural Tunnel State Park in Virginia when I managed to drop my iPhone 4 into a canyon while […] ➡
- 2010
- Play Five Card ds106 Stories In the pre-launch fury for the ds106 Digital Storytelling Open Course, I thought it would be fun (and easy to set up) to create a new place on the Five Card Flickr Stories site for us to play. Want to have a go at making a story? Head over to http://web.nmc.org/5cardstory/play.php?suit=ds106. I’m curious to see […] ➡
- Not Dog Writing? The Dog Reading cc licensed flickr photo shared by dchrisoh This year I fell out of NaNoWriMo only 12 days in, and it was a good thing. I could sense form where I was, that my attempt at writing a World According to Dogs novel was maybe at best, a not original idea and not welle executed. But […] ➡
- 2008
- Novel Approach I just did something I’ve not done in a while. I finished a novel 😉 Sadly, it was one that was sitting on my shelf a long time, picked up maybe 2 years ago in a local thrift store recommended by Brian when he visited here. I’m not going to launch into some sort of […] ➡
- 2007
- I’ve Been Spocked Spock Bag posted 14 Oct ’05, 1.30pm MDT PST on flickr I embroidered this Spock bag for Mason the other day. I am trying to determine of the recent small trickle of emails notifying me that “XXXXX has requested your trust on Spock” is of merit or just another blotch of Quechup. So before I […] ➡
- 2004
- Better MT-ing 1: Naming Files To Your Advantage What’s in a file name? Well it is the URL that you will publish, so make the most of it. You can make room for flexibility in your blogs if you set things so all content created is published as *.php rather than *.html. What is PHP? A long forgotten acronym, but it is a […] ➡
- Better MT-ing in 6 Bites I’ve been at the blogging biz using MovableType (MT) since April 19, 2003, and along the way I’ve been putting aside some ideas for things I have done beyond the out of the box set up that might help others. Also, since I am still living in the free land of MT 2.661, I have […] ➡
- 2003
- “Blog on Blogs”- excellent educational example of weblog use Blog on Blogs, a Weblog Review does double duty as a great resource for getting a handle on weblogs and a wonderful example of using blogs in an educational context, a New Media Studies course: This project is collaboration produced by the students of the Fall 2003 Introduction to New Media Studies course at Richard […] ➡
- See the Pictures of ‘Net Pioneers No centerfolds but… for those that enjoy the history of how the Net unfolded, if you could not get enough of “Where the Wizards Stayed Up Late” (a great read by the way), check out “The Faces in Front of the Monitors”— this is an alphabet listing of those wizards, many with multiple photos. This […] ➡
- Jade Takes a Break… This blog will blink off line around Dec 30 or 31 when I hope to migrate our content and assorted scripts to the new XServe– I had thought it would happen by the end of the week before I vanish 10 days to my retreat, but it is rushed, and the last days of December […] ➡
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.