“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 19 posts previously published on May 7th
- 2017
- Unsplashing I’ve known and used photos from Unsplash before but after a presentation on it at the Creative Commons Summit, I thought it was time to try it out with my first set of 10 photos. So I am unsplashing at https://unsplash.com/@cogdog. I tried a mix of ones from my own favorites list and ones that […]
- 2015
- Course Race Jerseys: The Great VCU Bike Race Aren’t those shirts pretty? And they are part of a web site I made recently representing courses to be offered starting August at Virginia Commonwealth University. I could not be more stoked to be part of another big, unfolding as we develop it, projects with Gardner Campbell and Company at VCU. Last year I helped […]
- Flowers for Nancy I am pretty sure there must be one of those Words that Have No English Translation for “fatigue of writing family tribute posts.” The photo shows flowers I picked from my own garden to visit someone I shall not see again. Nancy is my ex’s mother. While those two do not have a relationship, Nancy […]
- 2014
- This is How I Take on Flickr creative commons licensed ( BY-NC ) flickr photo shared by tramani_sagrens No crying (well except for twitter complaining). No giving up in despair. Stay in the fight. Yesterday I got an email from Sandy Jensen Brown Jensen Brown- she is good at letting me know something is amiss with the ds106 Daily Create. Usually the […]
- Twitter is a Crappy RSS Reader Replacement This was not necessarily the point of what Gardener Campbell pulled out of an article about the perhaps sliding value of twitter as a business (Twitter is dead!) The Twitter paradox: the pros & cons of being free http://t.co/QGctQFqvnF > "Twitter functions as a human-mediated RSS feed" #thoughtvectors — Gardner Campbell (@GardnerCampbell) May 6, 2014 […]
- Maricopa OER Practitioners: James Sousa As part of my fellowship for the OER Research Hub at the Open University I am sharing these excerpts from conversations about OER use/creation recorded in April 2014 with faculty at the Maricopa Community Colleges. James Sousa, a mathematics faculty at Phoenix College, has quietly produced an impressive collection of openly shared tutorial videos and […]
- 2010
- My Own 2.0: CoolIris Demo at Northern Voice Ooops. With great irony for being listed as a featured CoolIris enthusiast, and then prepping for MooseCamp session at the Northern Voice conference– I realized the way I had done these last year was now outmoded! This replaces what I wrote up last year… I was still using the old piclens javascript library, which did […]
- 2008
- Mashed Up Lamb Hmmmm, this blog post title sounds like either a bad idea for a recipe with a food processor or a headline of a New Zealand rural road accident report. But noooo, neither, it is this awesome video done by Clint Lalonde where he mashes up Brian Lamb for an intro to a keynote Brian did […]
- Spectra: Not Your Grandfather’s RSS Reader I just took a quick spin through MSNBC’s Spectra which is sort of like, no not really, like a visual news/feed reader. You pick news “channels” (chosen by MSNBC not you) they are color coded (by MSNBC not you), and the headlines spin by you in a cyclical spiral. I guess it might be hypnotizing. […]
- 2007
- 404 Cats In this way, twitter has a kinship with flickr, in terms of having a wisecracking interface: I bet this kittie’s name is “Bill”. Back at Maricopa, we had a computer tech in the 1990s named Bill whose method of fixing a computer was to pop open the case and whack the hard drive with a […]
- Twitter The GateWay Drug? My twitter addiction is right on course. I can (ahem) quit at anytime, just not today. Or tomorrow. Or… For sheer failure of seeing my calculated negative allotment of free time grow even more negative, I have greatly resisted digging into the worlds of MySpace and Facebook — but decided for some curiosity and just […]
- Veep New business cards are ordered… I have a new title on my role at NMC as “Vice President, Community & CTO” reflecting a constructive look at work I’ve been doing in the last 13 months and where NMC is going in the future. For now, I’m doing the same stuff and cashing the same check, […]
- My 15 Minutes on Webcast TV In the “Crazy Scheduling — I Thought I was Learning to Say No” department, I am lined up to be a participant on a May 17 webcast of the Ready2Net program on “Web 2.0 Comes to Campus” – the free series of webcast and satellite broadcasts produced by the CSU-Monterey Bay. As billed: Is Web […]
- 2006
- Feed2JS Beta With Enclosures Rightfully so, people have been requesting the Feed2JS be able to display content referenced in RSS 2.0 or podcast feeds. Until now, these enclusore tags have been ignored because it is not supported in the underlying MagpieRSS library code. It turns out there is a fairly simple patch / adjustment to the Magpie code that […]
- iAudio Spinning flickr foto iAudio and Shuffleavailable on my flickr My new iAudio U3 is so tiny and light you’d think it might float away.. but it can carry 1 Gb of stuff. Here is relaxes next to my Shuffle My iAudio U3 MP3 player/recorder prompty arrived and I am just starting to play with it. I […]
- Mouse Convert flickr foto Mouse, No Tailavailable on my flickr Ha, I am eating my own crow. After baseless ridicule of 3 button mice, I am now loving my Kensington mini Bluetooth critter, on both sides of the operating systems in my MacBookPro. Right clicking saves key-click combos for the Mac, and on Windows on the Intel […]
- 2004
- Blogs and RSS WebQuest Nice…. “Blogs and RSS- Tools for Creating, Collecting, and Sharing Ideas Online” , presented as a WebQuest: “Learn about tools that will forever change the way you gather information online and separate the online publishing from the technical hurdles typically associated with running a web site” This has your basic components of a webquest, a […]
- 2003
- RSS to JS examples+code To follow up on the RSS in Blackboard piece, I have posted a new page that documents and demos RSS to JS along with the source PHP code. Share this barking on social media
- MT as a Teaching Portfolio Ryan Eby, a Michigan State University education major, has created an e-Portfolio in Movable Type, a nice example of using te reflective aspects of a blog for this purpose. Share this barking on social media
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 19 posts previously published on May 7th
- 2017
- Unsplashing I’ve known and used photos from Unsplash before but after a presentation on it at the Creative Commons Summit, I thought it was time to try it out with my first set of 10 photos. So I am unsplashing at https://unsplash.com/@cogdog. I tried a mix of ones from my own favorites list and ones that […] ➡
- 2015
- Course Race Jerseys: The Great VCU Bike Race Aren’t those shirts pretty? And they are part of a web site I made recently representing courses to be offered starting August at Virginia Commonwealth University. I could not be more stoked to be part of another big, unfolding as we develop it, projects with Gardner Campbell and Company at VCU. Last year I helped […] ➡
- Flowers for Nancy I am pretty sure there must be one of those Words that Have No English Translation for “fatigue of writing family tribute posts.” The photo shows flowers I picked from my own garden to visit someone I shall not see again. Nancy is my ex’s mother. While those two do not have a relationship, Nancy […] ➡
- 2014
- This is How I Take on Flickr creative commons licensed ( BY-NC ) flickr photo shared by tramani_sagrens No crying (well except for twitter complaining). No giving up in despair. Stay in the fight. Yesterday I got an email from Sandy Jensen Brown Jensen Brown- she is good at letting me know something is amiss with the ds106 Daily Create. Usually the […] ➡
- Twitter is a Crappy RSS Reader Replacement This was not necessarily the point of what Gardener Campbell pulled out of an article about the perhaps sliding value of twitter as a business (Twitter is dead!) The Twitter paradox: the pros & cons of being free http://t.co/QGctQFqvnF > "Twitter functions as a human-mediated RSS feed" #thoughtvectors — Gardner Campbell (@GardnerCampbell) May 6, 2014 […] ➡
- Maricopa OER Practitioners: James Sousa As part of my fellowship for the OER Research Hub at the Open University I am sharing these excerpts from conversations about OER use/creation recorded in April 2014 with faculty at the Maricopa Community Colleges. James Sousa, a mathematics faculty at Phoenix College, has quietly produced an impressive collection of openly shared tutorial videos and […] ➡
- 2010
- My Own 2.0: CoolIris Demo at Northern Voice Ooops. With great irony for being listed as a featured CoolIris enthusiast, and then prepping for MooseCamp session at the Northern Voice conference– I realized the way I had done these last year was now outmoded! This replaces what I wrote up last year… I was still using the old piclens javascript library, which did […] ➡
- 2008
- Mashed Up Lamb Hmmmm, this blog post title sounds like either a bad idea for a recipe with a food processor or a headline of a New Zealand rural road accident report. But noooo, neither, it is this awesome video done by Clint Lalonde where he mashes up Brian Lamb for an intro to a keynote Brian did […] ➡
- Spectra: Not Your Grandfather’s RSS Reader I just took a quick spin through MSNBC’s Spectra which is sort of like, no not really, like a visual news/feed reader. You pick news “channels” (chosen by MSNBC not you) they are color coded (by MSNBC not you), and the headlines spin by you in a cyclical spiral. I guess it might be hypnotizing. […] ➡
- 2007
- 404 Cats In this way, twitter has a kinship with flickr, in terms of having a wisecracking interface: I bet this kittie’s name is “Bill”. Back at Maricopa, we had a computer tech in the 1990s named Bill whose method of fixing a computer was to pop open the case and whack the hard drive with a […] ➡
- Twitter The GateWay Drug? My twitter addiction is right on course. I can (ahem) quit at anytime, just not today. Or tomorrow. Or… For sheer failure of seeing my calculated negative allotment of free time grow even more negative, I have greatly resisted digging into the worlds of MySpace and Facebook — but decided for some curiosity and just […] ➡
- Veep New business cards are ordered… I have a new title on my role at NMC as “Vice President, Community & CTO” reflecting a constructive look at work I’ve been doing in the last 13 months and where NMC is going in the future. For now, I’m doing the same stuff and cashing the same check, […] ➡
- My 15 Minutes on Webcast TV In the “Crazy Scheduling — I Thought I was Learning to Say No” department, I am lined up to be a participant on a May 17 webcast of the Ready2Net program on “Web 2.0 Comes to Campus” – the free series of webcast and satellite broadcasts produced by the CSU-Monterey Bay. As billed: Is Web […] ➡
- 2006
- Feed2JS Beta With Enclosures Rightfully so, people have been requesting the Feed2JS be able to display content referenced in RSS 2.0 or podcast feeds. Until now, these enclusore tags have been ignored because it is not supported in the underlying MagpieRSS library code. It turns out there is a fairly simple patch / adjustment to the Magpie code that […] ➡
- iAudio Spinning flickr foto iAudio and Shuffleavailable on my flickr My new iAudio U3 is so tiny and light you’d think it might float away.. but it can carry 1 Gb of stuff. Here is relaxes next to my Shuffle My iAudio U3 MP3 player/recorder prompty arrived and I am just starting to play with it. I […] ➡
- Mouse Convert flickr foto Mouse, No Tailavailable on my flickr Ha, I am eating my own crow. After baseless ridicule of 3 button mice, I am now loving my Kensington mini Bluetooth critter, on both sides of the operating systems in my MacBookPro. Right clicking saves key-click combos for the Mac, and on Windows on the Intel […] ➡
- 2004
- Blogs and RSS WebQuest Nice…. “Blogs and RSS- Tools for Creating, Collecting, and Sharing Ideas Online” , presented as a WebQuest: “Learn about tools that will forever change the way you gather information online and separate the online publishing from the technical hurdles typically associated with running a web site” This has your basic components of a webquest, a […] ➡
- 2003
- RSS to JS examples+code To follow up on the RSS in Blackboard piece, I have posted a new page that documents and demos RSS to JS along with the source PHP code. Share this barking on social media ➡
- MT as a Teaching Portfolio Ryan Eby, a Michigan State University education major, has created an e-Portfolio in Movable Type, a nice example of using te reflective aspects of a blog for this purpose. Share this barking on social media ➡
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.