“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 24 posts previously published on November 17th
- 2022
- Digging For Alt Text Image Metadata My last long winded nerdy post on image accessibility veered far off the path of possible interest from anyone (or maybe everyone is too busy trying to sort out their move to Mastodon). The thing is, my brain is not done with this. Most of the things I whinged on depended on systems, tools to […]
- 2018
- Now With Previews: TRU Collector SPLOT Coming soon, well now, to a SPLOT near you- the ability to preview content before you submit it. Try a beta version now at http://splot.ca/collector/collect — or see this mini screen capture video: Because it was aimed at longer content, the TRU Writer SPLOT has always had a built in way to preview content before […]
- 2016
- Join Our Slack Channel We have a new community area for people interested in talking about the certification project. Creative Commons recently announced the opening of their new real time conversation place on Slack. It’s quite active and a bit easier to use then the existing IRC channel (though if you love IRC, the two spaces are now connected). […]
- 2015
- TRU Collector WordPress Theme Ready for Brave Testers In prep for an Open Ed 2015 presentation with Brian Lamb on our world famous SPLOTs (“SPLOTs and Darkweb Plots: Advancing and Supporting Open Educational Experiences” Lamb-ian title), I spent a bit of time on the plane and here in Vancouver cleaning up the github repository for the TRU Collector SPLOT. This is another WordPress […]
- 2014
- Is That Pigeon Hole Half Empty or Half Full? creative commons licensed ( BY-NC-SA ) flickr photo shared by batintherain Do you see more than you don’t see? Is there nothing in what you don’t see? What if you never see the bird? More metaphorical nonsensical questions? Or shall I for the first time toss at a TL;DR? No, this is not too long, […]
- 2013
- Triple Dog Dare for Remix / Mashups Weeks 13 & 14 You are tired. Worn out. Your creativity tank is running on empty. You have too much email to read. All you want to do is Vine. You have found other things more interesting things to do than ds106. Too bad. For the next two weeks, the Headless ds106 winds into its last topic – a […]
- The Wayback Machine as a Reclaimists Best Friend cc licensed ( BY SA ) flickr photo shared by Alan Levine Jim recently lamented the loss of media from blip.tv citing maybe the most insanely great presentation ever done in Second Life with flamethrowers and zombies– a presentation Jim , Tom Woodward, and Brian Lamb crafted for the 2008 NMC Virtual Symposia on Rock […]
- 2011
- Your Work Speaks for Itself cc licensed ( BY ) flickr photo shared by cogdogblog You might wait for someone/something to condone your credentials. To me, it is of even more importance that you always be doing that effort yourself to make sure there is evident of what you are capable of. Why wait passively for some sticker? Yes, I […]
- The Long Last Stretch cc licensed ( BY NC ND ) flickr photo shared by Hambo The travel is wearing on me. I am not complaining (much). This whole experience is wrapped up in the gift of my god mother’s memory for making it posible, and the stream of memories of connections made, re-made, made new by people I […]
- Metal Monsters Day four of the Fort Myers (FL) to Strawberry (AZ) CogDog Express. It’s been drive, drive, drive. Today was the stretch of Texas from Dallas to Amarillo, and the dry southwest land I know and feel just slowly, every slowly merged – the big sky, the sparse plants, the space- big wide space. With a […]
- 2010
- In Which I Paw Around with Definitions cc licensed flickr photo shared by Horia Varlan When a discussion veers into debates of definitions of terms, my yawn reflex usually kicks into gear, so its with some trepidation (and concerns of comments lambasting my hypocrisy so I am claiming it now). Like many I get muddy whether I cam referring to something as […]
- 2008
- More Zombie Survival Tips It is too late for Jim Groom and Tom Woodard who cinematicly presented warnings about zombies for the NMC Rock the Academy Symposium, but I missed a key resource for the zombie intrigued. How remiss to have not shared the Common Craft cult classic- Zombies in Plain English: There was so much there I did […]
- Geocommons Makes it Easy for Anyone to Mashup Data & Maps Sometimes it can take months to answer a question; Robert, a colleague I met in Shanghai who teaches at Fudan University asked if I knew of any tools that would make it easy for his journalism students to generate their own mashups of data and maps. I did not have an answer then; I talked […]
- 2007
- Unknown Flowers and The Most Amazing Story of Web Serendipity This story is old news if you followed my trail last month through Australia. Being up again in Strawberry, Arizona, and seeing flowers tll blooming in mid November (global warming is hot here) got me thinking again about the most amazing example of web serendipity that happened in Tasmania. It’s one of those thing that […]
- 2006
- WP 2.0.5. Updated WordPress. Time on task, about 4 minutes. Easy-Peasy. Now I need to tend to a few other WP sites I have laying around elsewhere, Share this barking on social media
- Users Per Tag Tools? I am sure there are things like this out there, but when I was doing my simple stats for flickr tagging, I took the very inefficient method of paging through the flickr tag pages and listing unique user names. Surely there is some flickr tool that can tell how many unique users have used a […]
- Conference Tag Redux As a follow-up to my post on small numbers of people doing tagging, as of today, for our NMC Regional Conference held last week in San Antonio, we have tagged in flickr 393 photos from 11 individuals, more than we had at our summer conference in Cleveland where the attendence was 3 times as large […]
- City Class My wife and I have been taking a class together… nothing formal, but our city of Scottsdale offers a City Government 101 class, which meets every other week where you get to learn about a different department. It’s been everything from finance to water resources to trash to libraries to police/fire… one of the highlights […]
- 2004
- The Big New Zealand Finale: “Rip. Mix. Learn.” Today is my last day in a little slice of green heaven known as New Zealand where I have been visiting and giving workshops at several institutions in the Auckland area (see the CogDog’s upside down inverted cousin, the CogDog(kiwi)Blog). Among other bits, I’ve been stirring up the interest in wikis here– and like my […]
- Feedster Blog Search Feedster is offering a new search tool to help you find content that comes from weblogs, a handy way to scope your web searches. For the uninitiated, Feedster provides a google-like interface for searching things found in RSS feeds. It offers tools to store your own set of feeds (like another flavor of Bloglines as […]
- 2003
- Learning About Learning Objects (LALO) Here is another new learning objects “hub” site (a PHP-Nuke supported site) called Learning About Learning Objects . I clicked and clicked and clicked trying to find the elusive “About” statement, failing, and found this on a site that seemed to be the prototype: The process of implementing SDCCD Online to date has highlighted several […]
- BlogShop del Norte (UBC) Recently Brian Lamb and Jim Sibley conducted a Canadian Blogshop at the University of British Columbia, and plentifully acknowledged the materials in our BlogShop from down here in the far south Canadian hinterland province of Arizona 😉 Actually the UBC version takes it a notch further by posting the workshop materials in a wiki. I […]
- 3 LO Searches for 1 Query: Merlot’s Federated Search Zoom-zoom. More power for those looking for learning objects or instructional resources. MERLOT’s Federated Search allows you to enter keywords (say “cell mitosis”) and with one click conduct a search of MERLOT, Australia’s )EdNA Online, and the Science Math resources of SMETE. Actually the EdNA folks had demo-ed this first at the MERLOT 2003 conference […]
- Spam Roaches Could Not Find it Here More detective work with analysis of web server logs with AWstats shows that poor spammers are unable to find their links on my web site. Alas! What is a roach to do! Does that mean that they will target me next? No luck, as they are blocked at the door by the MTBlacklist army boot. […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 24 posts previously published on November 17th
- 2022
- Digging For Alt Text Image Metadata My last long winded nerdy post on image accessibility veered far off the path of possible interest from anyone (or maybe everyone is too busy trying to sort out their move to Mastodon). The thing is, my brain is not done with this. Most of the things I whinged on depended on systems, tools to […] ➡
- 2018
- Now With Previews: TRU Collector SPLOT Coming soon, well now, to a SPLOT near you- the ability to preview content before you submit it. Try a beta version now at http://splot.ca/collector/collect — or see this mini screen capture video: Because it was aimed at longer content, the TRU Writer SPLOT has always had a built in way to preview content before […] ➡
- 2016
- Join Our Slack Channel We have a new community area for people interested in talking about the certification project. Creative Commons recently announced the opening of their new real time conversation place on Slack. It’s quite active and a bit easier to use then the existing IRC channel (though if you love IRC, the two spaces are now connected). […] ➡
- 2015
- TRU Collector WordPress Theme Ready for Brave Testers In prep for an Open Ed 2015 presentation with Brian Lamb on our world famous SPLOTs (“SPLOTs and Darkweb Plots: Advancing and Supporting Open Educational Experiences” Lamb-ian title), I spent a bit of time on the plane and here in Vancouver cleaning up the github repository for the TRU Collector SPLOT. This is another WordPress […] ➡
- 2014
- Is That Pigeon Hole Half Empty or Half Full? creative commons licensed ( BY-NC-SA ) flickr photo shared by batintherain Do you see more than you don’t see? Is there nothing in what you don’t see? What if you never see the bird? More metaphorical nonsensical questions? Or shall I for the first time toss at a TL;DR? No, this is not too long, […] ➡
- 2013
- Triple Dog Dare for Remix / Mashups Weeks 13 & 14 You are tired. Worn out. Your creativity tank is running on empty. You have too much email to read. All you want to do is Vine. You have found other things more interesting things to do than ds106. Too bad. For the next two weeks, the Headless ds106 winds into its last topic – a […] ➡
- The Wayback Machine as a Reclaimists Best Friend cc licensed ( BY SA ) flickr photo shared by Alan Levine Jim recently lamented the loss of media from blip.tv citing maybe the most insanely great presentation ever done in Second Life with flamethrowers and zombies– a presentation Jim , Tom Woodward, and Brian Lamb crafted for the 2008 NMC Virtual Symposia on Rock […] ➡
- 2011
- Your Work Speaks for Itself cc licensed ( BY ) flickr photo shared by cogdogblog You might wait for someone/something to condone your credentials. To me, it is of even more importance that you always be doing that effort yourself to make sure there is evident of what you are capable of. Why wait passively for some sticker? Yes, I […] ➡
- The Long Last Stretch cc licensed ( BY NC ND ) flickr photo shared by Hambo The travel is wearing on me. I am not complaining (much). This whole experience is wrapped up in the gift of my god mother’s memory for making it posible, and the stream of memories of connections made, re-made, made new by people I […] ➡
- Metal Monsters Day four of the Fort Myers (FL) to Strawberry (AZ) CogDog Express. It’s been drive, drive, drive. Today was the stretch of Texas from Dallas to Amarillo, and the dry southwest land I know and feel just slowly, every slowly merged – the big sky, the sparse plants, the space- big wide space. With a […] ➡
- 2010
- In Which I Paw Around with Definitions cc licensed flickr photo shared by Horia Varlan When a discussion veers into debates of definitions of terms, my yawn reflex usually kicks into gear, so its with some trepidation (and concerns of comments lambasting my hypocrisy so I am claiming it now). Like many I get muddy whether I cam referring to something as […] ➡
- 2008
- More Zombie Survival Tips It is too late for Jim Groom and Tom Woodard who cinematicly presented warnings about zombies for the NMC Rock the Academy Symposium, but I missed a key resource for the zombie intrigued. How remiss to have not shared the Common Craft cult classic- Zombies in Plain English: There was so much there I did […] ➡
- Geocommons Makes it Easy for Anyone to Mashup Data & Maps Sometimes it can take months to answer a question; Robert, a colleague I met in Shanghai who teaches at Fudan University asked if I knew of any tools that would make it easy for his journalism students to generate their own mashups of data and maps. I did not have an answer then; I talked […] ➡
- 2007
- Unknown Flowers and The Most Amazing Story of Web Serendipity This story is old news if you followed my trail last month through Australia. Being up again in Strawberry, Arizona, and seeing flowers tll blooming in mid November (global warming is hot here) got me thinking again about the most amazing example of web serendipity that happened in Tasmania. It’s one of those thing that […] ➡
- 2006
- WP 2.0.5. Updated WordPress. Time on task, about 4 minutes. Easy-Peasy. Now I need to tend to a few other WP sites I have laying around elsewhere, Share this barking on social media ➡
- Users Per Tag Tools? I am sure there are things like this out there, but when I was doing my simple stats for flickr tagging, I took the very inefficient method of paging through the flickr tag pages and listing unique user names. Surely there is some flickr tool that can tell how many unique users have used a […] ➡
- Conference Tag Redux As a follow-up to my post on small numbers of people doing tagging, as of today, for our NMC Regional Conference held last week in San Antonio, we have tagged in flickr 393 photos from 11 individuals, more than we had at our summer conference in Cleveland where the attendence was 3 times as large […] ➡
- City Class My wife and I have been taking a class together… nothing formal, but our city of Scottsdale offers a City Government 101 class, which meets every other week where you get to learn about a different department. It’s been everything from finance to water resources to trash to libraries to police/fire… one of the highlights […] ➡
- 2004
- The Big New Zealand Finale: “Rip. Mix. Learn.” Today is my last day in a little slice of green heaven known as New Zealand where I have been visiting and giving workshops at several institutions in the Auckland area (see the CogDog’s upside down inverted cousin, the CogDog(kiwi)Blog). Among other bits, I’ve been stirring up the interest in wikis here– and like my […] ➡
- Feedster Blog Search Feedster is offering a new search tool to help you find content that comes from weblogs, a handy way to scope your web searches. For the uninitiated, Feedster provides a google-like interface for searching things found in RSS feeds. It offers tools to store your own set of feeds (like another flavor of Bloglines as […] ➡
- 2003
- Learning About Learning Objects (LALO) Here is another new learning objects “hub” site (a PHP-Nuke supported site) called Learning About Learning Objects . I clicked and clicked and clicked trying to find the elusive “About” statement, failing, and found this on a site that seemed to be the prototype: The process of implementing SDCCD Online to date has highlighted several […] ➡
- BlogShop del Norte (UBC) Recently Brian Lamb and Jim Sibley conducted a Canadian Blogshop at the University of British Columbia, and plentifully acknowledged the materials in our BlogShop from down here in the far south Canadian hinterland province of Arizona 😉 Actually the UBC version takes it a notch further by posting the workshop materials in a wiki. I […] ➡
- 3 LO Searches for 1 Query: Merlot’s Federated Search Zoom-zoom. More power for those looking for learning objects or instructional resources. MERLOT’s Federated Search allows you to enter keywords (say “cell mitosis”) and with one click conduct a search of MERLOT, Australia’s )EdNA Online, and the Science Math resources of SMETE. Actually the EdNA folks had demo-ed this first at the MERLOT 2003 conference […] ➡
- Spam Roaches Could Not Find it Here More detective work with analysis of web server logs with AWstats shows that poor spammers are unable to find their links on my web site. Alas! What is a roach to do! Does that mean that they will target me next? No luck, as they are blocked at the door by the MTBlacklist army boot. […] ➡
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.
Share this barking on social media