“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 April 26th
- 2016
- Digital Durability? My Money is on the Individual That project you are posting online, or maybe it’s a paper, maybe its a conference presentation, maybe it’s an OER– does it matter if it will be accessible in 5, 10, 20 years? How durable is your digital content? Is it hosted on someone else’s server? Is it constructed in a technology that will not […]
- 2012
- I Dare Ya to Justify Not Coming to Faculty Academy I double dare ya. With a cherry on top. Whipped cream too. It’s just around the corner, the flip of the monthly calendar, but so soon, The University of Mary Washington Faculty Academy will be happening- May 16 & 17 here in Fredericksburg. Let’s see- you will get a keynote by David Darts, an NYU […]
- pechaflickr with less bugs Bugs are prettier in photos than in code. I spent a few hours last night (and cleanup this morning) hammering some overdue fixes to pechaflickr, my random flickr + pechaflickr mashup If you have not played before, you enter a flickr tag, and the site generates a slideshow of 20 random flickr images in pecha […]
- 2011
- ds106 Means Never Having to Say You’re Sorry cc licensed ( BY ) flickr photo shared by Half Chinese It’s been illuminating scanning the posts the UMW ds106 students are writing in their “advice to future ds06ers” assignment. Most acknowledge the incredible amount of work and time the class took, and then counter with something along the lines “it was so worth it.” […]
- Stuffing ds106 into an Archive Woah, it is ending? ds106 is almost over? Sigh. Well, sincr i have blog posts dribbled over the last few months, I thought about organizing it a bit better here in the doghouse- it’s not quite archiving, but it does feel like the suitcase needs help to get closed. cc licensed ( BY NC SD […]
- 2008
- Impress Your Friends and Co-Workers: Obscure Firefox Keyword Search So you want to earn techno points around the work group, or want to just beef up the tech rep at home? This one might earn you some technokarma points. Its a pretty obscure (at least i think so, maybe everyone knows about it) Firefox thing to in one click, generate search results from any […]
- 2007
- You Spammed Me At Hello In the “Blog Spammers Are Getting Trickier” departments, a comments snared today: Hi, What an Idea! Thank you for sharing this posted article for me or for every one, you made a great job for your Blog.Keep it up the good work.. Again thank you very much.. Cheers Regards, Cheska Smith <a href=”http://www.XXXXdeletedSpamSitexxx.com/”>Dog Training Device</a> […]
- Twitter By Proxy Stephen had oatmeal for breakfast, so someone stepped up to keep the tweetverse informed: Share this barking on social media
- SPLJ 2.0 Yesterday I co-presented as part of four amigos for MacLearning Environments on (Many, Too Many?) Small Technologies Loosely Joined: Open, Connected, and Social. This was carried out via Elluminate hosted at the University of Calgary. The players were D'Arcy Norman, Brian Lamb, myself, and Jim Groom and we had a nice peppy crowd show up […]
- 2006
- Podcasting on the Cheap As just mentioned, today I presented Podcasting on the Cheap / Thinking Before You Click Record” for the NMC Online Conference on Personal Broadcasting. There is really about 25 minutes of stage time in these sessions, and I knew I had a lot of ground to cover, so it went at supersonic speed. Actually a […]
- Online Conference Marathon Having run my first two half marathons this year, I thought IU had a good sense for that finish line feeling, but those pale compares to today’s 5 hour sprint through Day One of the NMC Online Conference in Personal Broadcasting. Between facilitating sessions, doing intros, funneling feedback, nudging people to comment, and also doing […]
- 60 Second Story Made #11 My mind is a leaky sieve. Last year, there was a neat web contest for people to submit an example of a digital story down i video format– with the limit that they had to be under 60 seconds– this was the 60 Second Story site. I was more curious about how it worked, and […]
- 2005
- That was a little too easy Wow. What can I write but a big, stinkin’ WOW. I literally spent the advertised 5 minutes to install WordPress. I especially liked the install steps: Where you expecting more steps? Sorry to disappoint you Using the instructions in the WordPress Codex, I was able to so easily import 867 MovableType entries, I thought it […]
- Web 5.0 Did I miss the Upgrade? I’ve been seeing references to something called “Web 2.0” — was there some sort of Internet upgrade while I was sleeping? Am I out of date? (Note for new readers- this is sarcasm) I see folks are aiming to define it precisely. While I accept, support, participate in the notion that web content as we […]
- 2004
- Seeking PC/AIM User for Video Chat SBL seeks S/DWC for.. nah, it is not one of those! I have just installed iChat/AV v2.1 which is now compatible with AOL Instant Messenger 5.5 for Windows and would like to try it for sure (see specs on AIM Video IM FAQ). If anyone out there is using AIM 5.5 with a video camera, […]
- Getting MLX Comments Into MLX Comments We are doing some tinkering soon on our Maricopa Learning eXchange (MLX) “packing slips” to increase the visibility and usage of the commenting tools, which are relatively unused situated near the very bottom of each packing slip. Ideally, this is the place MLX users would describe their potential, or real, re-use of MLX content. As […]
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 April 26th
- 2016
- Digital Durability? My Money is on the Individual That project you are posting online, or maybe it’s a paper, maybe its a conference presentation, maybe it’s an OER– does it matter if it will be accessible in 5, 10, 20 years? How durable is your digital content? Is it hosted on someone else’s server? Is it constructed in a technology that will not […] &#x27A1;
- 2012
- I Dare Ya to Justify Not Coming to Faculty Academy I double dare ya. With a cherry on top. Whipped cream too. It’s just around the corner, the flip of the monthly calendar, but so soon, The University of Mary Washington Faculty Academy will be happening- May 16 & 17 here in Fredericksburg. Let’s see- you will get a keynote by David Darts, an NYU […] &#x27A1;
- pechaflickr with less bugs Bugs are prettier in photos than in code. I spent a few hours last night (and cleanup this morning) hammering some overdue fixes to pechaflickr, my random flickr + pechaflickr mashup If you have not played before, you enter a flickr tag, and the site generates a slideshow of 20 random flickr images in pecha […] &#x27A1;
- 2011
- ds106 Means Never Having to Say You’re Sorry cc licensed ( BY ) flickr photo shared by Half Chinese It’s been illuminating scanning the posts the UMW ds106 students are writing in their “advice to future ds06ers” assignment. Most acknowledge the incredible amount of work and time the class took, and then counter with something along the lines “it was so worth it.” […] &#x27A1;
- Stuffing ds106 into an Archive Woah, it is ending? ds106 is almost over? Sigh. Well, sincr i have blog posts dribbled over the last few months, I thought about organizing it a bit better here in the doghouse- it’s not quite archiving, but it does feel like the suitcase needs help to get closed. cc licensed ( BY NC SD […] &#x27A1;
- 2008
- 2007
- You Spammed Me At Hello In the “Blog Spammers Are Getting Trickier” departments, a comments snared today: Hi, What an Idea! Thank you for sharing this posted article for me or for every one, you made a great job for your Blog.Keep it up the good work.. Again thank you very much.. Cheers Regards, Cheska Smith <a href=”http://www.XXXXdeletedSpamSitexxx.com/”>Dog Training Device</a> […] &#x27A1;
- Twitter By Proxy Stephen had oatmeal for breakfast, so someone stepped up to keep the tweetverse informed: Share this barking on social media &#x27A1;
- SPLJ 2.0 Yesterday I co-presented as part of four amigos for MacLearning Environments on (Many, Too Many?) Small Technologies Loosely Joined: Open, Connected, and Social. This was carried out via Elluminate hosted at the University of Calgary. The players were D'Arcy Norman, Brian Lamb, myself, and Jim Groom and we had a nice peppy crowd show up […] &#x27A1;
- 2006
- Podcasting on the Cheap As just mentioned, today I presented Podcasting on the Cheap / Thinking Before You Click Record” for the NMC Online Conference on Personal Broadcasting. There is really about 25 minutes of stage time in these sessions, and I knew I had a lot of ground to cover, so it went at supersonic speed. Actually a […] &#x27A1;
- Online Conference Marathon Having run my first two half marathons this year, I thought IU had a good sense for that finish line feeling, but those pale compares to today’s 5 hour sprint through Day One of the NMC Online Conference in Personal Broadcasting. Between facilitating sessions, doing intros, funneling feedback, nudging people to comment, and also doing […] &#x27A1;
- 60 Second Story Made #11 My mind is a leaky sieve. Last year, there was a neat web contest for people to submit an example of a digital story down i video format– with the limit that they had to be under 60 seconds– this was the 60 Second Story site. I was more curious about how it worked, and […] &#x27A1;
- 2005
- That was a little too easy Wow. What can I write but a big, stinkin’ WOW. I literally spent the advertised 5 minutes to install WordPress. I especially liked the install steps: Where you expecting more steps? Sorry to disappoint you Using the instructions in the WordPress Codex, I was able to so easily import 867 MovableType entries, I thought it […] &#x27A1;
- Web 5.0 Did I miss the Upgrade? I’ve been seeing references to something called “Web 2.0” — was there some sort of Internet upgrade while I was sleeping? Am I out of date? (Note for new readers- this is sarcasm) I see folks are aiming to define it precisely. While I accept, support, participate in the notion that web content as we […] &#x27A1;
- 2004
- Seeking PC/AIM User for Video Chat SBL seeks S/DWC for.. nah, it is not one of those! I have just installed iChat/AV v2.1 which is now compatible with AOL Instant Messenger 5.5 for Windows and would like to try it for sure (see specs on AIM Video IM FAQ). If anyone out there is using AIM 5.5 with a video camera, […] &#x27A1;
- Getting MLX Comments Into MLX Comments We are doing some tinkering soon on our Maricopa Learning eXchange (MLX) “packing slips” to increase the visibility and usage of the commenting tools, which are relatively unused situated near the very bottom of each packing slip. Ideally, this is the place MLX users would describe their potential, or real, re-use of MLX content. As […] &#x27A1;
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.