“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 8th
- 2018
- WP Pusher, Man You know that trippy opening riff to the Steppenwolf song You know you’ve installed WordPress themes O’Lord, you’ve uploaded a few SPLOTs But you never update them It’s too many steps, lots and lots You know, I’ve seen a lot of SPLOTs out there With not the lastests versions around If you get WP Pusher, […]
- Interviewing Your Domain Do you have your own internet domain? Good! We’d like it if you can share with participants in the Ontario Extend project some wisdom from your experience. Having a domain is not part of the program, but we do have some pre-paid accounts for ones from Reclaim Hosting for participants who work through their modules. […]
- 2017
- Domains 2017 #notaconference I said it many times Monday and Tuesday of this week that the Domains 2017 in Oklahoma City was not a conference but a gathering. Does that matter? You had to be there. This is a vain attempt to blog summarize and will fail miserably in capturing the experience. But I am, at this moment, […]
- 2015
- HyperNoting from Books; Prairie Dogging The Rabbit Holes I’m finding an interesting hyperlinking experience without any hyperlinks, from all things, a printed book. The idea of linking ideas is not limited by stuff you can wrap in an <a href="....">...</a> tag. The book I am just starting is Jill Lepore’s The Secret History of Wonder Woman. I was somewhat clued to the book […]
- 2014
- Thought Vectors Activate! The Flow Experience I blame ds106. Three years plus in and out of the open digital storytelling course and my free floating mind goes to visual association. Seeing the Thought Vectors site starting to light up (24 blogs in the mix now, and first wave of students Hello Worlding into the mix) – and I saw a cartoon […]
- A Big Box Full of A Lot of Little GIFs creative commons licensed ( BY-SA ) flickr photo shared by dvanzuijlekom As a kid my Mom would ask me what present I wanted for the holidays or a birthday. “Present” being so singular, I thought I gamed the system by asking for a “big box full of a whole lot of little toys”. She always […]
- The Thought Vectors Actualization Machine The lights are on, flashing, and content is spinning around. On Friday afternoon, Tom Woodward flicked the server lights on a site we have been co-building over the last few days, maybe 2 weeks. We were able to use a staging server on wpengine which meant we had a public facing “coming soon” site, and […]
- 2012
- Scottlo: My Virtual World Can Beat Up Yours I’m really worried about our brother Scottlo. It seems he has drunk some weird potion and is mesmerized by some beach front pixel property in Second Life, some place called Conoway Cay or something like that. Over here in Camp Magic Macguffin, we are hacking out a whole new world inside Minecraft, and poor Scottlo […]
- 2011
- Trippy Hippy cc licensed ( BY ) flickr photo shared by cogdogblog Maybe. This afternoon I went out for a bike ride, and enjoying the tranquility of my small time life, I left my house unlocked. That was my first mistake. Apparently my hippy neighbor, one Maynerd G. Cosmo, decided to make himself at home in my […]
- 2009
- GigaPanning By the Bay cc licensed flickr photo shared by cogdogblog I took a pit stop on the way to Monterey for NMC2009 to grab some GigaPan scenes near Fisherman’s Wharf. What a lovely clear sunny day it was. First was a shot from the beach catching a lot of the crazy cold water swimmers: Yes, I got myself […]
- 2006
- Pachyderm 2.0 Showtime Yesterday the NMC 2006 Summer Conference lifted off in Cleveland. The pre-conference institutes and workshops were in their last day; I helped out with Putting Your Hands on the Elephant: Pachyderm 2.0 a hands-on session with Pachyderm and it was great to see folks get in with the software and quickly produce sample content. I’d […]
- 2005
- Self Spamming For an upcoming presentation, I was doing some random clicking at Blogger to find some tacky or “bad” blog examples (they are out there, stuff you’s not want to be on screen when the boss wanders in). It’s sad how many URLs there are wasted by lik spammers who create Blogger.com sites just to spam […]
- The Un-Truth at the Uncyclopedia If anyone is more into sarcasm than myself, they are hanging out at the Uncyclopedia “the content-free encyclopedia that anyone can edit”. A total loving mimicry of the WikiPedia, at the Uncyclopedia at least there need be no debates about authoritative resources since it proudly claims to be full of lies. Just look at the […]
- Scott Shot Object In Executing Learning Objects, Resurrecting Sharing and Reuse, Scott Leslie takes some well thought shots at the sacred cow term of “learning objects” (and his animation of the “execution” could use more blood, guts, and squeals). As part of a workshop for the BC Educational Technology Users Group, Scott has nicely posted his materials in […]
- 2004
- Coming to a Wiki Near You… No, it is not Potted Meat Food Product, just down the shelf… Wikis: The Next Frontier for Spammers? Wiki maintainers can expect an increase in spam after a webmaster newsletter highlighted the effectiveness of Wiki spam in raising a site’s Google ranking. WebProNews described how a webmaster improved his rank in a search engine optimization […]
- What the Wiki is Happening? A Blank Wall, Free Spray Paint, and …. We’re closely watching the NMC 2004 presentation on “Small Pieces Loosely Joined” wiki, checking the changes.. but beyond a few individuals, it is a pretty quiet place. Okay, so I wrote a bit harshly on Martin for his own thoughts on the Pieces, but hey, I was bored! I fessed up and then commented a […]
- Legal Likes GPL on openMLX Got the call today from our Legal Department and they approve our plan for GPL licensing of an open source version of the Maricopa Learning eXchange (good thing cause we have been doing it anyhow). In fact, our legal counsel was impressed with “how clearly and humanly understandable the license was written” (that is the […]
- Scary Insurance (What is going on in Middle Earth?) Share this barking on social media
- Turning the Tide on Ugly Wikis Wikis are the buzz. Like Amy Gahran (Learning with (and from) Wiki), I have been quietly ‘intrigued” by wikis, while trying to get past the mind-bending thought of creating a web site that anyone, anywhere can change on you. And I agree completely with Amy’s issue: In my opinion , the biggest stumbling block with […]
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 8th
- 2018
- WP Pusher, Man You know that trippy opening riff to the Steppenwolf song You know you’ve installed WordPress themes O’Lord, you’ve uploaded a few SPLOTs But you never update them It’s too many steps, lots and lots You know, I’ve seen a lot of SPLOTs out there With not the lastests versions around If you get WP Pusher, […] &#x27A1;
- Interviewing Your Domain Do you have your own internet domain? Good! We’d like it if you can share with participants in the Ontario Extend project some wisdom from your experience. Having a domain is not part of the program, but we do have some pre-paid accounts for ones from Reclaim Hosting for participants who work through their modules. […] &#x27A1;
- 2017
- Domains 2017 #notaconference I said it many times Monday and Tuesday of this week that the Domains 2017 in Oklahoma City was not a conference but a gathering. Does that matter? You had to be there. This is a vain attempt to blog summarize and will fail miserably in capturing the experience. But I am, at this moment, […] &#x27A1;
- 2015
- HyperNoting from Books; Prairie Dogging The Rabbit Holes I’m finding an interesting hyperlinking experience without any hyperlinks, from all things, a printed book. The idea of linking ideas is not limited by stuff you can wrap in an <a href="....">...</a> tag. The book I am just starting is Jill Lepore’s The Secret History of Wonder Woman. I was somewhat clued to the book […] &#x27A1;
- 2014
- Thought Vectors Activate! The Flow Experience I blame ds106. Three years plus in and out of the open digital storytelling course and my free floating mind goes to visual association. Seeing the Thought Vectors site starting to light up (24 blogs in the mix now, and first wave of students Hello Worlding into the mix) – and I saw a cartoon […] &#x27A1;
- A Big Box Full of A Lot of Little GIFs creative commons licensed ( BY-SA ) flickr photo shared by dvanzuijlekom As a kid my Mom would ask me what present I wanted for the holidays or a birthday. “Present” being so singular, I thought I gamed the system by asking for a “big box full of a whole lot of little toys”. She always […] &#x27A1;
- The Thought Vectors Actualization Machine The lights are on, flashing, and content is spinning around. On Friday afternoon, Tom Woodward flicked the server lights on a site we have been co-building over the last few days, maybe 2 weeks. We were able to use a staging server on wpengine which meant we had a public facing “coming soon” site, and […] &#x27A1;
- 2012
- Scottlo: My Virtual World Can Beat Up Yours I’m really worried about our brother Scottlo. It seems he has drunk some weird potion and is mesmerized by some beach front pixel property in Second Life, some place called Conoway Cay or something like that. Over here in Camp Magic Macguffin, we are hacking out a whole new world inside Minecraft, and poor Scottlo […] &#x27A1;
- 2011
- Trippy Hippy cc licensed ( BY ) flickr photo shared by cogdogblog Maybe. This afternoon I went out for a bike ride, and enjoying the tranquility of my small time life, I left my house unlocked. That was my first mistake. Apparently my hippy neighbor, one Maynerd G. Cosmo, decided to make himself at home in my […] &#x27A1;
- 2009
- GigaPanning By the Bay cc licensed flickr photo shared by cogdogblog I took a pit stop on the way to Monterey for NMC2009 to grab some GigaPan scenes near Fisherman’s Wharf. What a lovely clear sunny day it was. First was a shot from the beach catching a lot of the crazy cold water swimmers: Yes, I got myself […] &#x27A1;
- 2006
- Pachyderm 2.0 Showtime Yesterday the NMC 2006 Summer Conference lifted off in Cleveland. The pre-conference institutes and workshops were in their last day; I helped out with Putting Your Hands on the Elephant: Pachyderm 2.0 a hands-on session with Pachyderm and it was great to see folks get in with the software and quickly produce sample content. I’d […] &#x27A1;
- 2005
- Self Spamming For an upcoming presentation, I was doing some random clicking at Blogger to find some tacky or “bad” blog examples (they are out there, stuff you’s not want to be on screen when the boss wanders in). It’s sad how many URLs there are wasted by lik spammers who create Blogger.com sites just to spam […] &#x27A1;
- The Un-Truth at the Uncyclopedia If anyone is more into sarcasm than myself, they are hanging out at the Uncyclopedia “the content-free encyclopedia that anyone can edit”. A total loving mimicry of the WikiPedia, at the Uncyclopedia at least there need be no debates about authoritative resources since it proudly claims to be full of lies. Just look at the […] &#x27A1;
- Scott Shot Object In Executing Learning Objects, Resurrecting Sharing and Reuse, Scott Leslie takes some well thought shots at the sacred cow term of “learning objects” (and his animation of the “execution” could use more blood, guts, and squeals). As part of a workshop for the BC Educational Technology Users Group, Scott has nicely posted his materials in […] &#x27A1;
- 2004
- Coming to a Wiki Near You… No, it is not Potted Meat Food Product, just down the shelf… Wikis: The Next Frontier for Spammers? Wiki maintainers can expect an increase in spam after a webmaster newsletter highlighted the effectiveness of Wiki spam in raising a site’s Google ranking. WebProNews described how a webmaster improved his rank in a search engine optimization […] &#x27A1;
- What the Wiki is Happening? A Blank Wall, Free Spray Paint, and …. We’re closely watching the NMC 2004 presentation on “Small Pieces Loosely Joined” wiki, checking the changes.. but beyond a few individuals, it is a pretty quiet place. Okay, so I wrote a bit harshly on Martin for his own thoughts on the Pieces, but hey, I was bored! I fessed up and then commented a […] &#x27A1;
- Legal Likes GPL on openMLX Got the call today from our Legal Department and they approve our plan for GPL licensing of an open source version of the Maricopa Learning eXchange (good thing cause we have been doing it anyhow). In fact, our legal counsel was impressed with “how clearly and humanly understandable the license was written” (that is the […] &#x27A1;
- Scary Insurance (What is going on in Middle Earth?) Share this barking on social media &#x27A1;
- Turning the Tide on Ugly Wikis Wikis are the buzz. Like Amy Gahran (Learning with (and from) Wiki), I have been quietly ‘intrigued” by wikis, while trying to get past the mind-bending thought of creating a web site that anyone, anywhere can change on you. And I agree completely with Amy’s issue: In my opinion , the biggest stumbling block with […] &#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.