“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 17 posts previously published on June 18th
- 2018
- Conversation with David Porter about the @OntarioExtend Scholar Module I don’t know about you but the word “scholar” in terms of my teaching comes across with a heap of connotations, many of which have me thinking “I’m not a scholar.” The Ontario Extend Scholar Module aims to break this down into an approach that is less about “being a scholar” into one aimed at […]
- 2017
- Names for Other People What’s the name when a simple expression or word in someone else’s writings triggers a cascade of thoughts, related and tangential? This happened when reading Maha Bali’s rich party-hosting metaphor in Lines Not Drawn – and Invitations of Sailors #digciz. I skip most of her post (well I did read it all) her description of […]
- Measuring Dad Time Fatherless Father’s days, round 16. Of course I do have a father, I just can’t call him on the phone as I last did in 2011. I can still write, and think, and remember. I continue to come across small things of his that I have in my home, or my tool shed. Those two […]
- 2013
- Supersize Edu Just because I can… I got to thinking about Morgan Spurlock’s self experiment on fast food after reading the ever rapier like Jonathan Rees Sentence First– verdict afterwards: What kind of professor “experiments” in front of tens of thousands of students? Gerry Canavan is right ““ one who already knows the results. And the results […]
- 2011
- He Does Talk Fast This psychotic animated GOF was grabbed hastily from the Amazing Story video JIm did for me when he visited Strawberry last month. Not quite yet the perfect style, I am getting a better handle on isolating movement (sometimes- my Ayn Rand one was better). My current technique is: Load video into MPEGStream Clip Use the […]
- 2009
- Reminder cc licensed flickr photo shared by cogdogblog She called last week while I was traveling, and I must admit in the middle of a conference dinner when Mom called, I pushed her to voicemail. And then there was the rush of getting home and getting caught up in all the "stuff" that I realized without […]
- Web 2.0 Storytelling Workshop at NMC cc licensed flickr photo shared by cogdogblog It was more than enough fun to co-author an EDUCAUSE Review paper with Bryan Alexander, but more fun to run a workshop on it at the 2009 NMC Summer Conference. We had a really active group of participants, and certainly no lightweights, as there is some pressure trying […]
- 2007
- Crazy Flickr / WP Bug I’m too tired to even properly research this, but lately (?? weeks) I’ve been unable to get flickr to properly post blog posts to several of my WordPress blogs. Flickr keeps reporting my password may need to be changed, which is bunk as I know they are correct. With a little digging, I found an […]
- Neat Stuff. Really. My own photo taken a few days ago in La Crosse, Wisconsin I hope when the blog starts up tomorrow, I have some Really Net Neat Stuff to read, find, and blab about. I’m just coming off a 10 day stretch of very little time on the machine, as my wife and I did some […]
- 2006
- EduBloggerNews Added to Bookmarklet Maker Prompted by Will’s post “Digg For Edubloggers/ Do We Need to Get Our Act Together”, I added EdBloggerNews as a new option to my Multi-Post Bookmarklet tool at http://cogdogblog.com/code/marklet_maker.php— mainly because I was going to try and toss EduBloggerNews a few of the links I am sending to del.icio.us. While in the code, I tried […]
- Mysteries of Technorati A few weeks, months (dog time) ago I speculated about the possible substance abuse activities of my Technorati feed. No denial or admission was forthcoming, yet I am still cocking my head sideways at what the Technorati feed for this blog actually catches in its nets. Do not get me wrong, a good 20-25% of […]
- 2005
- Beyond Words (NMC Conference Closing Plenary) Beyond Words -reality of reading and writing in the 21st Century (closing plenary) Stephanie Barish If you are reading these words on paper or in an inert form on a screen, you are participating in our most enduring written form of communication. We’ll call it “plain text,” and it’s been essentially the same since Mesopotamia, […]
- Video for New Media (NMC Conference) Do the same aesthetics that apply to traditional motion media (fil, tv) apply to web video? Video for New Media: Developing the Aesthetic and Managing the Workflow Pacific Ballroom, Salon G Tools & Techniques Intermediate Video production for the multi-media project is the art of adapting the decades old technology and aesthetic of television to […]
- 2004
- Way Too Much Time on Their Hands (Please Wash Hands When Done_ Another installment on the There is a Niche for Everything on the Net: Urinal Dot Net (I was googling to find the SeaBus Terminal in Vancouver and this was result #2…. why? Only Google Knows) Share this barking on social media
- Nice… Timeline Creator Tool Just saw this at the NMC 2004 5 minutes of Fame- a nifty app for creation of interactive timelines- presentation is via Flash (of course), but data driven by XML. Created by the Center for Educational Resources at Johns Hopkins, the Timeline Creator is a freebie for downloading and provides what looks like a simple […]
- NMC 2004 After the Pieces (have not fallen) It’s been more than a day since our Small Technologies Loosely Joined session and Brian, D’Arcy and I are pleasantly amazed that 35+ turned out for the last session of the day, put up with a small cramped room with not enough electrical outlets, and a zany activity of task work in 3 contrived groups. […]
- Late for the Blog at NMC 2004 Sigh, the dog has been a lazy conference blogger, too much scenery in Vancouver, good food and drink, to have enough energy to continually blog the sessions, Fortunately, others are feverishly at it, see the blog aggregator created by Stephen Downes. NMC continues to he my favorite confence for the people who come, for the […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 17 posts previously published on June 18th
- 2018
- 2017
- Names for Other People What’s the name when a simple expression or word in someone else’s writings triggers a cascade of thoughts, related and tangential? This happened when reading Maha Bali’s rich party-hosting metaphor in Lines Not Drawn – and Invitations of Sailors #digciz. I skip most of her post (well I did read it all) her description of […] ➡
- Measuring Dad Time Fatherless Father’s days, round 16. Of course I do have a father, I just can’t call him on the phone as I last did in 2011. I can still write, and think, and remember. I continue to come across small things of his that I have in my home, or my tool shed. Those two […] ➡
- 2013
- Supersize Edu Just because I can… I got to thinking about Morgan Spurlock’s self experiment on fast food after reading the ever rapier like Jonathan Rees Sentence First– verdict afterwards: What kind of professor “experiments” in front of tens of thousands of students? Gerry Canavan is right ““ one who already knows the results. And the results […] ➡
- 2011
- He Does Talk Fast This psychotic animated GOF was grabbed hastily from the Amazing Story video JIm did for me when he visited Strawberry last month. Not quite yet the perfect style, I am getting a better handle on isolating movement (sometimes- my Ayn Rand one was better). My current technique is: Load video into MPEGStream Clip Use the […] ➡
- 2009
- Reminder cc licensed flickr photo shared by cogdogblog She called last week while I was traveling, and I must admit in the middle of a conference dinner when Mom called, I pushed her to voicemail. And then there was the rush of getting home and getting caught up in all the "stuff" that I realized without […] ➡
- Web 2.0 Storytelling Workshop at NMC cc licensed flickr photo shared by cogdogblog It was more than enough fun to co-author an EDUCAUSE Review paper with Bryan Alexander, but more fun to run a workshop on it at the 2009 NMC Summer Conference. We had a really active group of participants, and certainly no lightweights, as there is some pressure trying […] ➡
- 2007
- Crazy Flickr / WP Bug I’m too tired to even properly research this, but lately (?? weeks) I’ve been unable to get flickr to properly post blog posts to several of my WordPress blogs. Flickr keeps reporting my password may need to be changed, which is bunk as I know they are correct. With a little digging, I found an […] ➡
- Neat Stuff. Really. My own photo taken a few days ago in La Crosse, Wisconsin I hope when the blog starts up tomorrow, I have some Really Net Neat Stuff to read, find, and blab about. I’m just coming off a 10 day stretch of very little time on the machine, as my wife and I did some […] ➡
- 2006
- EduBloggerNews Added to Bookmarklet Maker Prompted by Will’s post “Digg For Edubloggers/ Do We Need to Get Our Act Together”, I added EdBloggerNews as a new option to my Multi-Post Bookmarklet tool at http://cogdogblog.com/code/marklet_maker.php— mainly because I was going to try and toss EduBloggerNews a few of the links I am sending to del.icio.us. While in the code, I tried […] ➡
- Mysteries of Technorati A few weeks, months (dog time) ago I speculated about the possible substance abuse activities of my Technorati feed. No denial or admission was forthcoming, yet I am still cocking my head sideways at what the Technorati feed for this blog actually catches in its nets. Do not get me wrong, a good 20-25% of […] ➡
- 2005
- Beyond Words (NMC Conference Closing Plenary) Beyond Words -reality of reading and writing in the 21st Century (closing plenary) Stephanie Barish If you are reading these words on paper or in an inert form on a screen, you are participating in our most enduring written form of communication. We’ll call it “plain text,” and it’s been essentially the same since Mesopotamia, […] ➡
- Video for New Media (NMC Conference) Do the same aesthetics that apply to traditional motion media (fil, tv) apply to web video? Video for New Media: Developing the Aesthetic and Managing the Workflow Pacific Ballroom, Salon G Tools & Techniques Intermediate Video production for the multi-media project is the art of adapting the decades old technology and aesthetic of television to […] ➡
- 2004
- Way Too Much Time on Their Hands (Please Wash Hands When Done_ Another installment on the There is a Niche for Everything on the Net: Urinal Dot Net (I was googling to find the SeaBus Terminal in Vancouver and this was result #2…. why? Only Google Knows) Share this barking on social media ➡
- Nice… Timeline Creator Tool Just saw this at the NMC 2004 5 minutes of Fame- a nifty app for creation of interactive timelines- presentation is via Flash (of course), but data driven by XML. Created by the Center for Educational Resources at Johns Hopkins, the Timeline Creator is a freebie for downloading and provides what looks like a simple […] ➡
- NMC 2004 After the Pieces (have not fallen) It’s been more than a day since our Small Technologies Loosely Joined session and Brian, D’Arcy and I are pleasantly amazed that 35+ turned out for the last session of the day, put up with a small cramped room with not enough electrical outlets, and a zany activity of task work in 3 contrived groups. […] ➡
- Late for the Blog at NMC 2004 Sigh, the dog has been a lazy conference blogger, too much scenery in Vancouver, good food and drink, to have enough energy to continually blog the sessions, Fortunately, others are feverishly at it, see the blog aggregator created by Stephen Downes. NMC continues to he my favorite confence for the people who come, for 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.