“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 February 18th
- 2018
- #NetNarr NDAs (Non-Disposable Assignments) I might be a broken record but again and again I return to David Wiley’s description of the disposable assignment (and what the potential is to be the opposite): These are assignments that students complain about doing and faculty complain about grading. They’re assignments that add no value to the world – after a student […]
- 2017
- Permutations of Attribution per·mu·ta·tion p?rmyo?o?t?SH(?)n/ noun a way, especially one of several possible variations, in which a set or number of things can be ordered or arranged. Often I am asked if “this is the right way to do attribution” for something openly licensed. Most of the time I am tempted to reply, if you are attributing at […]
- 2016
- Juxtaposing The Cloud View It was just a simple daily create. Well today’s could be simple (take a photo of a cloud) but the prompt was to play with the idea of the Judy Collins song Both Sides Now. Bows and flows of angel hair and ice cream castles in the air and feather canyons everywhere, I've looked at […]
- Custom WordPress Theme Mods Without Having Children This may seem a backward step from my WordPress theming projects, where I am trying to customize that at a per-site basis with just Custom CSS- I am working on a new one using the Galactic theme I have done for a few presentations rigged as a WordPress site (e.g. This is Not a Blog, […]
- 2015
- Office Calls… and a Vague, Half Thought Out SPLOT Idea The typical scenario for professional development is to invite people to come to your training room, lab, office, building, city. I decided to try something different (I refuse to say “flip”) for the Online Open You Show seminar at TRU. […]
- 2013
- Design a Memorial For Fairuz’s PC We got some really sad news today, a death in the ds106 family. Motherboard is dead. What am I supposed to do for #ds106 this week!? — Fairuz Maggio (@fairuzmaggio) February 19, 2013 Yes, a computer has died. While Fairuz is in mourning (or shopping), let’s deal with it in the ds106 way — and […]
- Six Words From 1970 Each go around of ds106, one assignment seems to take off in popularity, with no real explanation why. Previously we have seen bursts around Say It Like Peanut Butter, One Story / Four Icons, Splash the Color, and Messing with the MacGuffin. I’m guessing, maybe wrongly, we will see a burst around the Six Word […]
- 2012
- BAGMAN The Hippy BAGMAN may be running for president, but you should know of his leftist leaning ways formed from his Woodstock days Yes, even in 1969 the brown acid bagman was #4life (one more ds106 assignment Hey Wait Where’d That Guy Come From?) Share this barking on social media
- Ñлава ds106 After seeing a tweet for these retro Russian propaganda posters I could not resist one more ds106 poster: Best I can sort out, this means “GLORY DS106”. Glory indeed. Share this barking on social media
- Mad for ET Some might say that MAD magazine is not a comic, but I went for an animated version anyhow for the Animated Comic Cover ds106 assignment: I saw this cover of Alfred E Neumann and ET and felt like they might me a love match for each other, so they gaze at each other with affection […]
- 2011
- The Secret Revolution Revealed at Keene State College cc licensed ( BY ) flickr photo shared by cogdogblog It was my honor and sheer fun joy to be invited by Mike Caulfield to KKeene State College today to bring a new interation of the Secret Revolution. In fact, Mike and his crew at the CELT had made it the theme of their Faculty […]
- ds106 is revving my heart cc licensed ( BY NC SD ) flickr photo shared by arnoKath All of this creativity is doing crazy things to my heartbeat…. damn you ds106 and your flow of wildness! ds106 revving my heart Share this barking on social media
- 2009
- VoiceThread Blogging at NV2009 I may be pre-emptive, but am hoping again to try blogging the Northern Voice conference experience in images and audio using VoiceThread, like I did last year. Uploaded images (or ones sucked in from flickr) can then easily be augmented with audio, and if you create a free VT account, you can chime in as […]
- 2008
- How To Lose Readers and Influence No One Do you want to have fewer blog readers? Are you tired of pesky commenters who disagree with your posts? Is there something to be gained by frustrating users? Here’s how… Just set up your blog so users have to create accounts and log in to post a comment. Heck, they already have 50 gazillion accounts, […]
- 2006
- Blog Lies Low I’m trying to spend some time offline, resting for 5 days in the quiet little town of Strawberry, AZ. The last 4 weeks has been about the most travel packed ever, and between not being here, and trying to keep up with the stuff here, I’m a bit netted out. There’s piles of web sites […]
- Tagged Too Like Scott, i believe I was tagged too by Sir D’Arcy. (Hah Scott, I’m not letting you kill the game of tag!) Four jobs I’ve had – Laying the lines for little league baseball (very crooked ones at that) – Soil Compaction Tester – Running a golf driving range (yes, driving the cart that all […]
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 February 18th
- 2018
- #NetNarr NDAs (Non-Disposable Assignments) I might be a broken record but again and again I return to David Wiley’s description of the disposable assignment (and what the potential is to be the opposite): These are assignments that students complain about doing and faculty complain about grading. They’re assignments that add no value to the world – after a student […] ➡
- 2017
- Permutations of Attribution per·mu·ta·tion p?rmyo?o?t?SH(?)n/ noun a way, especially one of several possible variations, in which a set or number of things can be ordered or arranged. Often I am asked if “this is the right way to do attribution” for something openly licensed. Most of the time I am tempted to reply, if you are attributing at […] ➡
- 2016
- Juxtaposing The Cloud View It was just a simple daily create. Well today’s could be simple (take a photo of a cloud) but the prompt was to play with the idea of the Judy Collins song Both Sides Now. Bows and flows of angel hair and ice cream castles in the air and feather canyons everywhere, I've looked at […] ➡
- Custom WordPress Theme Mods Without Having Children This may seem a backward step from my WordPress theming projects, where I am trying to customize that at a per-site basis with just Custom CSS- I am working on a new one using the Galactic theme I have done for a few presentations rigged as a WordPress site (e.g. This is Not a Blog, […] ➡
- 2015
- 2013
- Design a Memorial For Fairuz’s PC We got some really sad news today, a death in the ds106 family. Motherboard is dead. What am I supposed to do for #ds106 this week!? — Fairuz Maggio (@fairuzmaggio) February 19, 2013 Yes, a computer has died. While Fairuz is in mourning (or shopping), let’s deal with it in the ds106 way — and […] ➡
- Six Words From 1970 Each go around of ds106, one assignment seems to take off in popularity, with no real explanation why. Previously we have seen bursts around Say It Like Peanut Butter, One Story / Four Icons, Splash the Color, and Messing with the MacGuffin. I’m guessing, maybe wrongly, we will see a burst around the Six Word […] ➡
- 2012
- BAGMAN The Hippy BAGMAN may be running for president, but you should know of his leftist leaning ways formed from his Woodstock days Yes, even in 1969 the brown acid bagman was #4life (one more ds106 assignment Hey Wait Where’d That Guy Come From?) Share this barking on social media ➡
- Ñлава ds106 After seeing a tweet for these retro Russian propaganda posters I could not resist one more ds106 poster: Best I can sort out, this means “GLORY DS106”. Glory indeed. Share this barking on social media ➡
- Mad for ET Some might say that MAD magazine is not a comic, but I went for an animated version anyhow for the Animated Comic Cover ds106 assignment: I saw this cover of Alfred E Neumann and ET and felt like they might me a love match for each other, so they gaze at each other with affection […] ➡
- 2011
- The Secret Revolution Revealed at Keene State College cc licensed ( BY ) flickr photo shared by cogdogblog It was my honor and sheer fun joy to be invited by Mike Caulfield to KKeene State College today to bring a new interation of the Secret Revolution. In fact, Mike and his crew at the CELT had made it the theme of their Faculty […] ➡
- ds106 is revving my heart cc licensed ( BY NC SD ) flickr photo shared by arnoKath All of this creativity is doing crazy things to my heartbeat…. damn you ds106 and your flow of wildness! ds106 revving my heart Share this barking on social media ➡
- 2009
- VoiceThread Blogging at NV2009 I may be pre-emptive, but am hoping again to try blogging the Northern Voice conference experience in images and audio using VoiceThread, like I did last year. Uploaded images (or ones sucked in from flickr) can then easily be augmented with audio, and if you create a free VT account, you can chime in as […] ➡
- 2008
- How To Lose Readers and Influence No One Do you want to have fewer blog readers? Are you tired of pesky commenters who disagree with your posts? Is there something to be gained by frustrating users? Here’s how… Just set up your blog so users have to create accounts and log in to post a comment. Heck, they already have 50 gazillion accounts, […] ➡
- 2006
- Blog Lies Low I’m trying to spend some time offline, resting for 5 days in the quiet little town of Strawberry, AZ. The last 4 weeks has been about the most travel packed ever, and between not being here, and trying to keep up with the stuff here, I’m a bit netted out. There’s piles of web sites […] ➡
- Tagged Too Like Scott, i believe I was tagged too by Sir D’Arcy. (Hah Scott, I’m not letting you kill the game of tag!) Four jobs I’ve had – Laying the lines for little league baseball (very crooked ones at that) – Soil Compaction Tester – Running a golf driving range (yes, driving the cart that all […] ➡
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.