“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 April 18th
- 2021
- A Tiny Tool for Google Image Searches set to Creative Commons My search history may indicate otherwise, but I feel like on a daily basis I am poking in Google Images for results licensed Creative Commons. I use one nifty trick to hasten the search, but just made another one that might be of use. The method I have used for quite some time goes back […]
- 2016
- Getting, Gitting, or Goating with GitHub I’m hardly the first person to ponder ways to use the software collaboration site GitHub in a context outside of software development. There’s been a series of Chronicle of Higher Education pieces on “forking the syllabus”. There is Gitbook as a front end for using the approach for writing books. While I have used GitHub […]
- 2014
- When Worlds Collide (2014) See the movie synopsis in the article in FakiPedia When Worlds Collide is a 2014 OER14 presentation based on the Fall 2014 headless ds106, co-presented by Rochelle Lockridge, Mariana Funes, and Alan Levine. The presentation was created in Keynote, and the animated GIFs tricked out by Rochelle and perhaps the paper may be published in […]
- 2013
- The Book That Time Forgot cc licensed ( BY SA ) flickr photo shared by cogdogblog I finished a book recently. One of those old style piles of paper bound in between thicker compressed fibers. I grabbed The Caspak Trilogy by Edgar Rice Burroughs, the first 9and title on the spine) being The Land That Time Forgot (also available from […]
- Again, Apple’s Change of Interface Rrquires Another $20 Piece of Plastic to Make it Work cc licensed (BY) flickr photo shared by cogdogblog The cable end with the black tape is what goes into my Alpine stereo deck in my truck. When I got my iPhone5, with the smaller interface "Lightning" port, using it to connect to my deck (There is a standard USB port from the unit- STANDARD) resulted […]
- How Do You Think Yoda Got So Wise? Why he read all of the ancient and modern parables of the Wise One, especially borrowing attributes of those who took on Empires, like Jedi Yallow, for later training. He than sought out The Boing Boing Being in the deep depths of Hainault Forest, spending weeks at his feet, taking notes on his iPad. This […]
- 2012
- There’s An App for Not Learning to Do That By removing the creative process and leaving only the results of that process, you virtually guarantee that no one will have any real engagement with the subject. It is like saying that Michelangelo created a beautiful sculpture, without letting me see it. How am I supposed to be inspired by that? (And of course it’s […]
- 2010
- The Seven Circles of Canon Rebate Hell In which a large corporation beats me down by ambiguous instructions, rude representatives, and hiding customer relations…. Canon has $200 of my money and they refuse to give me what is mine. Having tried multiple times to comply with unclear instructions to process a rebate, they are holding onto my cash. I want it back, […]
- 2009
- Everyone was HBO (Here Before Oprah)? Fail. C’mon twitter people, you are liming up zombie lemmings marching off the cliff. I see a stream of people in my stream tweeting something from a site boasting that they were in twitter before @Oprah. Monkey see, monkey click, monkey tweet. So there is a simple box on the site http://herebeforeoprah.com. In theory, you enter […]
- Smokin’ Yahoo Pipes cc licensed flickr photo by Wade from Oklahoma … in which the technology blog author bares his ignorance by discovering a tool that is several years old…. With a new sense of urgency, I implore that some big web company buy and save Yahoo– if not just to preserve the most valuable important vital web […]
- Use Gmail Web Clips as RSS Feed Ticker If I was tweeting this, I might make up a silly hash tag like #CoolNewTechnologyIJustFoundThatsBeenOutForEons I use Gmail extensively, got my CogDogness, as well as over the last few weeks, I have ditched the desktop email client and using the Gmail version of our NMC Google Apps email. By finding my oldest Gmail message, I’ve […]
- 2007
- The Flat Classroom Horizon Project Doh! Sound of blog remorse! In writing about the CNI Horizon Project presentation, I was remiss in leaving out one of the coolest discoveries — that Vicki Davis (coolcatteacher in georgia) and 4 other secondary school teachers in Austria, Bangladesh, China, and Australia are doing another fabulous Flat Classroom project — and this one they […]
- Twitter Cycle Have you heard just enough plaff about twitter the 2007 web love child? I have experienced and seen enough others experience the twitter cycle: “That is the stupidest thing I have ever heard of… who in their right mind would be doing that?” “Okay… if Xxxxxx and Yyyyyyy think this is cool, I will give […]
- Horizon Report Presented at CNI Yesterday was a eventful day at the CNI Spring Task Force Meeting. My travel arrangements for this conference were pretty tricky — I got in my truck and drove 20 miles downtown to Phoenix. No lost luggage. This was my first ever attendance at a CNI conference; a different flavor of colleagues, so I got […]
- I Think He’s Turning (Japanese, Chinese?) Found via an inbound ping: It looks like Stephen Downes is writing in new new tongues – http://www.edu2do.com/oldaily Share this barking on social media
- Flight of the [Arizona] Bumblebee Bumblebee posted 3 Sep ’06, 6.10pm MDT PST on flickr In the real life can be strange too department… We’ve recently been helping my mother-in-law clean up her cluttered yard and garage. She offered to let us take about 3/4 of a cord of firewood she had purchased for her small outdoor fireplace, and we […]
- 2004
- Happy Blog Day To Me… Holy Calendars, Batman! April 19 marks one year to the birth of CDB, starting from first post, “I Blog Therefore I Am…” In one year, there have been 347 posts, 341 comments (probably 1000 more spam-ments caught my the MT Blacklist plugin), and likely 678 typos. Do the math. It has been interesting to see […]
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 April 18th
- 2021
- A Tiny Tool for Google Image Searches set to Creative Commons My search history may indicate otherwise, but I feel like on a daily basis I am poking in Google Images for results licensed Creative Commons. I use one nifty trick to hasten the search, but just made another one that might be of use. The method I have used for quite some time goes back […] ➡
- 2016
- Getting, Gitting, or Goating with GitHub I’m hardly the first person to ponder ways to use the software collaboration site GitHub in a context outside of software development. There’s been a series of Chronicle of Higher Education pieces on “forking the syllabus”. There is Gitbook as a front end for using the approach for writing books. While I have used GitHub […] ➡
- 2014
- When Worlds Collide (2014) See the movie synopsis in the article in FakiPedia When Worlds Collide is a 2014 OER14 presentation based on the Fall 2014 headless ds106, co-presented by Rochelle Lockridge, Mariana Funes, and Alan Levine. The presentation was created in Keynote, and the animated GIFs tricked out by Rochelle and perhaps the paper may be published in […] ➡
- 2013
- The Book That Time Forgot cc licensed ( BY SA ) flickr photo shared by cogdogblog I finished a book recently. One of those old style piles of paper bound in between thicker compressed fibers. I grabbed The Caspak Trilogy by Edgar Rice Burroughs, the first 9and title on the spine) being The Land That Time Forgot (also available from […] ➡
- Again, Apple’s Change of Interface Rrquires Another $20 Piece of Plastic to Make it Work cc licensed (BY) flickr photo shared by cogdogblog The cable end with the black tape is what goes into my Alpine stereo deck in my truck. When I got my iPhone5, with the smaller interface "Lightning" port, using it to connect to my deck (There is a standard USB port from the unit- STANDARD) resulted […] ➡
- How Do You Think Yoda Got So Wise? Why he read all of the ancient and modern parables of the Wise One, especially borrowing attributes of those who took on Empires, like Jedi Yallow, for later training. He than sought out The Boing Boing Being in the deep depths of Hainault Forest, spending weeks at his feet, taking notes on his iPad. This […] ➡
- 2012
- There’s An App for Not Learning to Do That By removing the creative process and leaving only the results of that process, you virtually guarantee that no one will have any real engagement with the subject. It is like saying that Michelangelo created a beautiful sculpture, without letting me see it. How am I supposed to be inspired by that? (And of course it’s […] ➡
- 2010
- The Seven Circles of Canon Rebate Hell In which a large corporation beats me down by ambiguous instructions, rude representatives, and hiding customer relations…. Canon has $200 of my money and they refuse to give me what is mine. Having tried multiple times to comply with unclear instructions to process a rebate, they are holding onto my cash. I want it back, […] ➡
- 2009
- Everyone was HBO (Here Before Oprah)? Fail. C’mon twitter people, you are liming up zombie lemmings marching off the cliff. I see a stream of people in my stream tweeting something from a site boasting that they were in twitter before @Oprah. Monkey see, monkey click, monkey tweet. So there is a simple box on the site http://herebeforeoprah.com. In theory, you enter […] ➡
- Smokin’ Yahoo Pipes cc licensed flickr photo by Wade from Oklahoma … in which the technology blog author bares his ignorance by discovering a tool that is several years old…. With a new sense of urgency, I implore that some big web company buy and save Yahoo– if not just to preserve the most valuable important vital web […] ➡
- Use Gmail Web Clips as RSS Feed Ticker If I was tweeting this, I might make up a silly hash tag like #CoolNewTechnologyIJustFoundThatsBeenOutForEons I use Gmail extensively, got my CogDogness, as well as over the last few weeks, I have ditched the desktop email client and using the Gmail version of our NMC Google Apps email. By finding my oldest Gmail message, I’ve […] ➡
- 2007
- The Flat Classroom Horizon Project Doh! Sound of blog remorse! In writing about the CNI Horizon Project presentation, I was remiss in leaving out one of the coolest discoveries — that Vicki Davis (coolcatteacher in georgia) and 4 other secondary school teachers in Austria, Bangladesh, China, and Australia are doing another fabulous Flat Classroom project — and this one they […] ➡
- Twitter Cycle Have you heard just enough plaff about twitter the 2007 web love child? I have experienced and seen enough others experience the twitter cycle: “That is the stupidest thing I have ever heard of… who in their right mind would be doing that?” “Okay… if Xxxxxx and Yyyyyyy think this is cool, I will give […] ➡
- Horizon Report Presented at CNI Yesterday was a eventful day at the CNI Spring Task Force Meeting. My travel arrangements for this conference were pretty tricky — I got in my truck and drove 20 miles downtown to Phoenix. No lost luggage. This was my first ever attendance at a CNI conference; a different flavor of colleagues, so I got […] ➡
- I Think He’s Turning (Japanese, Chinese?) Found via an inbound ping: It looks like Stephen Downes is writing in new new tongues – http://www.edu2do.com/oldaily Share this barking on social media ➡
- Flight of the [Arizona] Bumblebee Bumblebee posted 3 Sep ’06, 6.10pm MDT PST on flickr In the real life can be strange too department… We’ve recently been helping my mother-in-law clean up her cluttered yard and garage. She offered to let us take about 3/4 of a cord of firewood she had purchased for her small outdoor fireplace, and we […] ➡
- 2004
- Happy Blog Day To Me… Holy Calendars, Batman! April 19 marks one year to the birth of CDB, starting from first post, “I Blog Therefore I Am…” In one year, there have been 347 posts, 341 comments (probably 1000 more spam-ments caught my the MT Blacklist plugin), and likely 678 typos. Do the math. It has been interesting to see […] ➡
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.