“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 June 3rd
- 2020
- Waving the Asynchronous Flag I promise that I am writing this post that will contain nothing even close to an answer, solution, even coherence to all the scrambling effort to plan for the post-Emergency-Learning-Not-A-Pivot response. Just idle speculation. McSweeny’s parody is just that, but there is a glint of reality under the sarcasm: After careful deliberation, we are pleased […]
- 2015
- There’s a First Time For Everything… My First Plugin I’ve been using WordPress since 2005, hacking themes since 2008, and doing a whole lot more since then.. yet I have never written a plugin. All of my custom code has been done in theme templates and functions.php files Well, now I have done so, without spilling much blood. This is also the first time […]
- 2014
- Ratings, Difficulty, DS106 Assignment Bank Theme creative commons licensed ( BY ) flickr photo shared by — Slavin More tinkering goes on with the ds106 Assignment Bank as a wordpress theme (watch it change as often as flickr at http://bank.ds106.us), thanks to the work being done by Karen and Brad on a new version for the Making Connected Learning MOOC. Again […]
- On Silence creative commons licensed ( BY ) flickr photo shared by Rochelle, just rochelle What are you saying when you are not saying anything? It’s among many complicated things we tend to oversimplify. I missed the incident that spawned #YesAllWomen — One might make akin to Faking Cultural Literacy, but my tea leaves are generated from […]
- 2013
- The Future of Learning is Syndicated (fol2013) cc licensed ( BY SA ) flickr photo shared by Orin Zebest It is not going down the drains, and despite outcries of technologies being dead, syndication based ones are at the heart of what makes the web works. An understanding of how distributed web-based publishing sources can reconfigure and aggregate information in constructive ways […]
- Keychains, Retelling, and Getting to the Heart of Stories cc licensed ( BY SA ) flickr photo shared by Alan Levine For at least 3 times in the last 5 years I’ve been fortunate to participate in the Baruch College Schwartz Institute Symposium, a rather unique event in bringing together people from both the academic and business communities to share ideas on communication. It […]
- 2012
- Conversation with Tina Loo It was a pleasure in my first week here to meet UBC History professor Tina Loo, who Brian and tipped me off to as far as doing inventive work by incorporating the Wikipedia Education Program (WEP) into her HIST 396 class on North American Environmental History. Part of my mission here is to learn more […]
- Dynamic OPML Files Generated from FeedWordPress FeedWordPress is the magic elixer, the glue that binds ds106 and its satellite sites together- we are currently syndicating in over 500 blogs to the main ds106 site. By the use of extra tags we add to each feed (e.g. one to designate open online participants, one to designate the different groups that use the […]
- 2011
- Message From the Open Future This was a video I had fun doing as part of the “crowdsourced” keynote assembled for the ETUG Spring 2011 workshop. The collection of videos was great and I really like this idea for assembling content around a message. I also had tossed in the “I am Bored As Hell…” video I did a few […]
- 2008
- Fountaining Tweets Wow, very cool, very wow …. found on the Clutter Museum, comes this twitter fountain. I am not tossing in any eduP*** here, but just playing – with tweets on “Strawberry” and flickr photos tagged “cogdog” Share this barking on social media
- G-G, Negative Content, and Blogging Rarely Is Ok You dont have to blog (or twitter) every 10 minutes… as long as when you do its meaningful. Greg Ritter posts maybe once or twice a month, and there was a time when the light at Ten Reasons Why was dark for like a year, but he shares some fabulous gems. Earlier this month he […]
- 2006
- Dr Glu is Udell-zed in a Big Way Oh man, taking about 100 foot high flames of jealousy! Gardner Campbell, a.k.a. Campnell D. Gardner a.k.a Dr Glu is recognized in a major way by one of our shred über gurus, Jon Udell. In Easing app deployment with an open source sandbox, Udell reflects on his visit for Gardner and Gang’s Faculty Academy at […]
- Tinkering AJAX Calendar Date Output Wow, my JavaScript code is utterly rusted, but I tinkered last night with the AJAX Google Calender code, based on the code from Ajax Magazine’s Howtointegrate Google Calendar in your website using AJAX. The output in the demo is in GMT time, and not very human readable, so I rolled up my sleeves to see […]
- 2005
- Google AdWords Ego Searching C’mom, admit it, you’ve ego surfed… typed your name into Google to see what you come up with, or if your site is in the top ten. No? Just me? Well here is a new game to play, see what ads a Google search leads your name to. This all came about since a colleague […]
- Today’s Jots PleaseReview – The online document review system – Home Pagethe new approach to collaborative document authoring & review. PleaseReview provides a structured, browser-based environment to manage the document review process and enable simultaneous, paragraph-by-paragraph reviews of MS Word documents and document sets. PDFs, images and other document types are also handled.Tags: collaboration Fair Use DayWe […]
- 2004
- Copyright Clearance? A Mountain of Paper? Arggh, Just Take ’em Back in 1997, 1998 I created a old collection of digital photos from places I’ve been to in the southwest, More Than Just Four Corners. Like Meteor Crater, Havasupai, Chaco Canyon… Every now and then someone emails me asking for permission to use one of them (Google to the rescue), and I always do, unless […]
- Give Credit Where Credit is Due! Serendipity strikes again. Curiosity link from the footer of some forgotten blog landed me here. Give Credit Where Credit is Due apparently began in the lat 1990s as a effort to promote “link back” credits to the sources of images that are used on someone’s web site. It is now a nice set of general, […]
- Audio Chattin’ With the Aussies After yesterday’s online audio LearningTimes session with the Australian Flexible Learning folks, I am again impressed with the fluid exchanges possible with the Elluminate Virtual Classroom— I lost count, but there may have been at least 30 participants not only from Australia, but Denmark (it was 2:00 AM for her) and I believe Brazil. The […]
- Rather Subversive: BugMetNot Do you hate registering to read online news from the New York Times, Washington Post, etc? I do think this service may last long, but it is interesting to monitor what BugMeNot causes in terms of disruptive patterns in the technology landscape. Will the lawyers swoop in? Will the Times start trying to block the […]
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 June 3rd
- 2020
- Waving the Asynchronous Flag I promise that I am writing this post that will contain nothing even close to an answer, solution, even coherence to all the scrambling effort to plan for the post-Emergency-Learning-Not-A-Pivot response. Just idle speculation. McSweeny’s parody is just that, but there is a glint of reality under the sarcasm: After careful deliberation, we are pleased […] ➡
- 2015
- There’s a First Time For Everything… My First Plugin I’ve been using WordPress since 2005, hacking themes since 2008, and doing a whole lot more since then.. yet I have never written a plugin. All of my custom code has been done in theme templates and functions.php files Well, now I have done so, without spilling much blood. This is also the first time […] ➡
- 2014
- Ratings, Difficulty, DS106 Assignment Bank Theme creative commons licensed ( BY ) flickr photo shared by — Slavin More tinkering goes on with the ds106 Assignment Bank as a wordpress theme (watch it change as often as flickr at http://bank.ds106.us), thanks to the work being done by Karen and Brad on a new version for the Making Connected Learning MOOC. Again […] ➡
- On Silence creative commons licensed ( BY ) flickr photo shared by Rochelle, just rochelle What are you saying when you are not saying anything? It’s among many complicated things we tend to oversimplify. I missed the incident that spawned #YesAllWomen — One might make akin to Faking Cultural Literacy, but my tea leaves are generated from […] ➡
- 2013
- The Future of Learning is Syndicated (fol2013) cc licensed ( BY SA ) flickr photo shared by Orin Zebest It is not going down the drains, and despite outcries of technologies being dead, syndication based ones are at the heart of what makes the web works. An understanding of how distributed web-based publishing sources can reconfigure and aggregate information in constructive ways […]
➡ - Keychains, Retelling, and Getting to the Heart of Stories cc licensed ( BY SA ) flickr photo shared by Alan Levine For at least 3 times in the last 5 years I’ve been fortunate to participate in the Baruch College Schwartz Institute Symposium, a rather unique event in bringing together people from both the academic and business communities to share ideas on communication. It […] ➡
- 2012
- Conversation with Tina Loo It was a pleasure in my first week here to meet UBC History professor Tina Loo, who Brian and tipped me off to as far as doing inventive work by incorporating the Wikipedia Education Program (WEP) into her HIST 396 class on North American Environmental History. Part of my mission here is to learn more […] ➡
- Dynamic OPML Files Generated from FeedWordPress FeedWordPress is the magic elixer, the glue that binds ds106 and its satellite sites together- we are currently syndicating in over 500 blogs to the main ds106 site. By the use of extra tags we add to each feed (e.g. one to designate open online participants, one to designate the different groups that use the […] ➡
- 2011
- Message From the Open Future This was a video I had fun doing as part of the “crowdsourced” keynote assembled for the ETUG Spring 2011 workshop. The collection of videos was great and I really like this idea for assembling content around a message. I also had tossed in the “I am Bored As Hell…” video I did a few […] ➡
- 2008
- Fountaining Tweets Wow, very cool, very wow …. found on the Clutter Museum, comes this twitter fountain. I am not tossing in any eduP*** here, but just playing – with tweets on “Strawberry” and flickr photos tagged “cogdog” Share this barking on social media ➡
- G-G, Negative Content, and Blogging Rarely Is Ok You dont have to blog (or twitter) every 10 minutes… as long as when you do its meaningful. Greg Ritter posts maybe once or twice a month, and there was a time when the light at Ten Reasons Why was dark for like a year, but he shares some fabulous gems. Earlier this month he […] ➡
- 2006
- Dr Glu is Udell-zed in a Big Way Oh man, taking about 100 foot high flames of jealousy! Gardner Campbell, a.k.a. Campnell D. Gardner a.k.a Dr Glu is recognized in a major way by one of our shred über gurus, Jon Udell. In Easing app deployment with an open source sandbox, Udell reflects on his visit for Gardner and Gang’s Faculty Academy at […] ➡
- Tinkering AJAX Calendar Date Output Wow, my JavaScript code is utterly rusted, but I tinkered last night with the AJAX Google Calender code, based on the code from Ajax Magazine’s Howtointegrate Google Calendar in your website using AJAX. The output in the demo is in GMT time, and not very human readable, so I rolled up my sleeves to see […] ➡
- 2005
- Google AdWords Ego Searching C’mom, admit it, you’ve ego surfed… typed your name into Google to see what you come up with, or if your site is in the top ten. No? Just me? Well here is a new game to play, see what ads a Google search leads your name to. This all came about since a colleague […] ➡
- Today’s Jots PleaseReview – The online document review system – Home Pagethe new approach to collaborative document authoring & review. PleaseReview provides a structured, browser-based environment to manage the document review process and enable simultaneous, paragraph-by-paragraph reviews of MS Word documents and document sets. PDFs, images and other document types are also handled.Tags: collaboration Fair Use DayWe […] ➡
- 2004
- Copyright Clearance? A Mountain of Paper? Arggh, Just Take ’em Back in 1997, 1998 I created a old collection of digital photos from places I’ve been to in the southwest, More Than Just Four Corners. Like Meteor Crater, Havasupai, Chaco Canyon… Every now and then someone emails me asking for permission to use one of them (Google to the rescue), and I always do, unless […] ➡
- Give Credit Where Credit is Due! Serendipity strikes again. Curiosity link from the footer of some forgotten blog landed me here. Give Credit Where Credit is Due apparently began in the lat 1990s as a effort to promote “link back” credits to the sources of images that are used on someone’s web site. It is now a nice set of general, […] ➡
- Audio Chattin’ With the Aussies After yesterday’s online audio LearningTimes session with the Australian Flexible Learning folks, I am again impressed with the fluid exchanges possible with the Elluminate Virtual Classroom— I lost count, but there may have been at least 30 participants not only from Australia, but Denmark (it was 2:00 AM for her) and I believe Brazil. The […] ➡
- Rather Subversive: BugMetNot Do you hate registering to read online news from the New York Times, Washington Post, etc? I do think this service may last long, but it is interesting to monitor what BugMeNot causes in terms of disruptive patterns in the technology landscape. Will the lawyers swoop in? Will the Times start trying to block the […] ➡
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.