“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 January 21st
- 2024
- The Joy of Not Finding What You Were Looking For I have a thing for web serendipity and following tunnels to places not on my to do list. Hopefully it’s not curable. It happens without foreshadowing. Today I saw a Mastodon post from a favorite tech writer I remember Clive Thompson specifically vividly for a 2007 piece Clive Thompson on How Twitter Creates a Social […]
- 2020
- Open Source Hair Loss (OOPs not an acronym) There’s no lack of boastful articles about the benefits of open source software; I have not come here to bury them (or praise). They can do wonders and sometimes they just can burn your energy. I’m still a fan. But it takes work. In a current project I am responsible for setting up three open […]
- 2019
- Dogfooding My Own WordPress Theme The first HTML5Up template I turned into a WordPress Theme was WP-Dimension. The great irony was that I made use of the original static HTML theme on my own domain at cog.dog, but never went back to chow my own theme food. The thing that happened I was looking for a kind of welcome mat […]
- 65 Years Later: No Cake, David In its impeccable reminding, my calendar does not have to worry end up being the butt of You Had One Job. Yesterday, was the reminder that it would have been my brother David’s 67th birthday. As it was, he did not see past 34, passing away, likely alone, in a state mental institution in Maryland. […]
- 2018
- Tiling SPLOTs the Easy Way; Maybe Soon Everything Else Tiled surfaces are classy. And after doing one the method is learned quickly. Without knowing I was looking for it I found a seriously awesome WordPress plugin that I can see making a lot of use of. The first was a quick way to add a feature to a prototype SPLOT. Okay, so I am […]
- 2016
- 3:42 to Yellow Sky During this week’s Western 106 High Noon Radio Show, I was talking about my interest in the western films and stories that are situated in and beyond the end of the era, Not that there is a firm line, but films like The Shootist, Lonely Are The Brave the cowboy figure is a bit of […]
- Doth it Rain? I am dothing away with flickr video embeds
- How The West Was Lost I love this framed print, it’s in my office now. I am fairly sure it was something my ex found as we did yard sales in Scottsdale, she was super good at finding such treasures. “How The West Was Lost” is just dripping with symbolism and icons and mostly irony. All the stuff I love.You’ve […]
- 2014
- Multisite Thinking cc licensed ( BY ) flickr photo shared by Kevin Gilmour Apparently there is a strain of Technology Fatigue swirling around I've been hearing a lot of technology fatigue from faculty this year. — Bryan Alexander (@BryanAlexander) January 15, 2014 I do not have a cure. Maybe try a nap? I do not deny the […]
- 2013
- Stories are Fragments cc licensed ( BY SD ) flickr photo shared by cogdogblog My brother David was born January 20, 1953; yesterday he would have been 60. There should have been a big party, or a tropical trip, or some adventure like parachute jumping. But he passed away in 1987, not in a place known for parties, […]
- 2012
- Happy Birthday ds106 Radio cc licensed ( BY ) flickr photo shared by peasap This weekend marks the one year anniversary of the launch of what has been to me, one of the best shared online experiences in my 20+ years here– ds106 radio. This web radio station was started with a tweet by Jim Groom, that has gone […]
- Scales are for Lizards; ds106 is Fractal, Mutating On the list of question topics that anesthetize me, just below FERPA and Intellectual Property, is the query on a project, “Does it scale?” Scales are fine for lizards. And weighing stuff. Expanding things by scaling them is not the only model of growth. For Massive Open Online Courses, this year’s poster child the Stanford […]
- The Web as it Was 15 Years Ago cc licensed ( BY ) flickr photo shared by cogdogblog Yeah, even in the early days it was all about sex online… No it wasn’t, that was the unfortunate “special theme” for this September 1996 issue of “the net” magazine. I found this mint copy, along with the CD-ROM, in my Box of Old Job […]
- Happy Birthday David cc licensed (BY) flickr photo shared by cogdogblog Were my brother still alive, today would have been his 58th Birthday. I continue to marvel and wonder about an alternate universe where I had his presence as a functioning older brother- what kind of person would I be now? (see the story of David’s Chair). This […]
- 2008
- Dusty, Neglected Social Networking Web Sites So many social networks, so little time… I do not know about you, humble blog reader, but I have truly lost track of all the social networking sites I have signed up for over the last few years. I am using the term “social networking” sites loosely, maybe they are social software, maybe they are […]
- 2007
- Atlanta Bound Crank up the Indy Junior map, I’m on the way for a 3 legged trip this week; today from Phoenix to Atlanta for the EDUCAUSE ELI Annual conference, one of my recent favorite events to attend for the caliber of folks who go, quality of program, etc. Sadly, due to the scheduling gods/demons, I get […]
- 2006
- PLE 2.0 Double the buzzword fun! I’ve only glazingly-eyed scanned some things people are writing about “Personal Learning Environments”, but I just wonder if you create a TLA (Three Letter Acronym) on something, does that mean it really exists? But I understand, embrace, and cheer the notion that the tapestry of free, loosely connected, highly personal technologies […]
- Three Rules of RSS Publishing. 1. Validate 2. Validate 3. Validate If you are doing anything in terms of publishing RSS feeds, from blogs, for podcasts, etc, keep posted in front of you a reminder to start and continually running your published feeds through a feed validator. Problems may not be visible, as many News Readers are forgiving on RSS […]
- Discussion Board Virtual Guests Wanted This Friday, January 27, 2006, Maricopa is welcoming Alice Bedard-Vorhees (Colorado Community Colleges Online) for a workshop on Bringing Guests to your Courses with a Virtual Speaker Bureau. This is a concept she developed at CCCOnline and has been nicely expanded as a service offfered in MERLOT. Simply, it means creating a directory of people […]
- 2005
- My Saturday Spent in School I spent my Saturday in school, not furthering my education, but paying my penance for zipping by a photo rador van last month. That’s right, I did an 8 hour course from the National Safety Council, in lieu of paying the full fine, going to court. Sitting in a cramped hot hotel conference room with […]
- New Amateur Bloggers Association: Biff’s On Board What are the odds? Amy Gaharan has just announced her joining the Professional Bloggers Association (PBA): the practice of being a consulting blogger-for hire, or operating a weblog with a functioning revenue model that goes beyond Google Ads Now it would be easy to take potshots, to throw darts, to provide snickering insinuations about the […]
- 2004
- The Cog Looking at the goofy banner on this blog and the reasons behind naming CDB, it is apparent that for 2003, I did lots of bloggin’, plenty of doggin’ (complaining about everything), but very little coggin’ So this month, I am back in the mountain bike saddle, riding 11 miles to work 2-3 times per week. […]
- RSS2JS Docks at Blog Harbor Got a nice email and link from the folks at Blog Harbor, a blog hosting service that offers a number of worthy add-ons for those who prefer not to tinker (and mess up) their own blog server. They have created a nicely formatted and structured guide to a hosted version of our RSS to JavaScript […]
- I Missed the RSS Winterfest These winters in Arizona are tough. Some days the temperature drops into the mid 60s. Likewise was my vain attempt today to tune into the RSS Winterfest. Every attempt use the link provided by the automatic email registration message, took me to a promising entry lobby, but every click of “Launch Presentation” resulted in a […]
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 January 21st
- 2024
- The Joy of Not Finding What You Were Looking For I have a thing for web serendipity and following tunnels to places not on my to do list. Hopefully it’s not curable. It happens without foreshadowing. Today I saw a Mastodon post from a favorite tech writer I remember Clive Thompson specifically vividly for a 2007 piece Clive Thompson on How Twitter Creates a Social […] ➡
- 2020
- Open Source Hair Loss (OOPs not an acronym) There’s no lack of boastful articles about the benefits of open source software; I have not come here to bury them (or praise). They can do wonders and sometimes they just can burn your energy. I’m still a fan. But it takes work. In a current project I am responsible for setting up three open […] ➡
- 2019
- Dogfooding My Own WordPress Theme The first HTML5Up template I turned into a WordPress Theme was WP-Dimension. The great irony was that I made use of the original static HTML theme on my own domain at cog.dog, but never went back to chow my own theme food. The thing that happened I was looking for a kind of welcome mat […] ➡
- 65 Years Later: No Cake, David In its impeccable reminding, my calendar does not have to worry end up being the butt of You Had One Job. Yesterday, was the reminder that it would have been my brother David’s 67th birthday. As it was, he did not see past 34, passing away, likely alone, in a state mental institution in Maryland. […] ➡
- 2018
- Tiling SPLOTs the Easy Way; Maybe Soon Everything Else Tiled surfaces are classy. And after doing one the method is learned quickly. Without knowing I was looking for it I found a seriously awesome WordPress plugin that I can see making a lot of use of. The first was a quick way to add a feature to a prototype SPLOT. Okay, so I am […] ➡
- 2016
- 3:42 to Yellow Sky During this week’s Western 106 High Noon Radio Show, I was talking about my interest in the western films and stories that are situated in and beyond the end of the era, Not that there is a firm line, but films like The Shootist, Lonely Are The Brave the cowboy figure is a bit of […] ➡
- Doth it Rain? I am dothing away with flickr video embeds
➡
- How The West Was Lost I love this framed print, it’s in my office now. I am fairly sure it was something my ex found as we did yard sales in Scottsdale, she was super good at finding such treasures. “How The West Was Lost” is just dripping with symbolism and icons and mostly irony. All the stuff I love.You’ve […] ➡
- 2014
- Multisite Thinking cc licensed ( BY ) flickr photo shared by Kevin Gilmour Apparently there is a strain of Technology Fatigue swirling around I've been hearing a lot of technology fatigue from faculty this year. — Bryan Alexander (@BryanAlexander) January 15, 2014 I do not have a cure. Maybe try a nap? I do not deny the […] ➡
- 2013
- Stories are Fragments cc licensed ( BY SD ) flickr photo shared by cogdogblog My brother David was born January 20, 1953; yesterday he would have been 60. There should have been a big party, or a tropical trip, or some adventure like parachute jumping. But he passed away in 1987, not in a place known for parties, […] ➡
- 2012
- Happy Birthday ds106 Radio cc licensed ( BY ) flickr photo shared by peasap This weekend marks the one year anniversary of the launch of what has been to me, one of the best shared online experiences in my 20+ years here– ds106 radio. This web radio station was started with a tweet by Jim Groom, that has gone […] ➡
- Scales are for Lizards; ds106 is Fractal, Mutating On the list of question topics that anesthetize me, just below FERPA and Intellectual Property, is the query on a project, “Does it scale?” Scales are fine for lizards. And weighing stuff. Expanding things by scaling them is not the only model of growth. For Massive Open Online Courses, this year’s poster child the Stanford […] ➡
- The Web as it Was 15 Years Ago cc licensed ( BY ) flickr photo shared by cogdogblog Yeah, even in the early days it was all about sex online… No it wasn’t, that was the unfortunate “special theme” for this September 1996 issue of “the net” magazine. I found this mint copy, along with the CD-ROM, in my Box of Old Job […] ➡
- Happy Birthday David cc licensed (BY) flickr photo shared by cogdogblog Were my brother still alive, today would have been his 58th Birthday. I continue to marvel and wonder about an alternate universe where I had his presence as a functioning older brother- what kind of person would I be now? (see the story of David’s Chair). This […] ➡
- 2008
- Dusty, Neglected Social Networking Web Sites So many social networks, so little time… I do not know about you, humble blog reader, but I have truly lost track of all the social networking sites I have signed up for over the last few years. I am using the term “social networking” sites loosely, maybe they are social software, maybe they are […] ➡
- 2007
- Atlanta Bound Crank up the Indy Junior map, I’m on the way for a 3 legged trip this week; today from Phoenix to Atlanta for the EDUCAUSE ELI Annual conference, one of my recent favorite events to attend for the caliber of folks who go, quality of program, etc. Sadly, due to the scheduling gods/demons, I get […] ➡
- 2006
- PLE 2.0 Double the buzzword fun! I’ve only glazingly-eyed scanned some things people are writing about “Personal Learning Environments”, but I just wonder if you create a TLA (Three Letter Acronym) on something, does that mean it really exists? But I understand, embrace, and cheer the notion that the tapestry of free, loosely connected, highly personal technologies […] ➡
- Three Rules of RSS Publishing. 1. Validate 2. Validate 3. Validate If you are doing anything in terms of publishing RSS feeds, from blogs, for podcasts, etc, keep posted in front of you a reminder to start and continually running your published feeds through a feed validator. Problems may not be visible, as many News Readers are forgiving on RSS […] ➡
- Discussion Board Virtual Guests Wanted This Friday, January 27, 2006, Maricopa is welcoming Alice Bedard-Vorhees (Colorado Community Colleges Online) for a workshop on Bringing Guests to your Courses with a Virtual Speaker Bureau. This is a concept she developed at CCCOnline and has been nicely expanded as a service offfered in MERLOT. Simply, it means creating a directory of people […] ➡
- 2005
- My Saturday Spent in School I spent my Saturday in school, not furthering my education, but paying my penance for zipping by a photo rador van last month. That’s right, I did an 8 hour course from the National Safety Council, in lieu of paying the full fine, going to court. Sitting in a cramped hot hotel conference room with […] ➡
- New Amateur Bloggers Association: Biff’s On Board What are the odds? Amy Gaharan has just announced her joining the Professional Bloggers Association (PBA): the practice of being a consulting blogger-for hire, or operating a weblog with a functioning revenue model that goes beyond Google Ads Now it would be easy to take potshots, to throw darts, to provide snickering insinuations about the […] ➡
- 2004
- The Cog Looking at the goofy banner on this blog and the reasons behind naming CDB, it is apparent that for 2003, I did lots of bloggin’, plenty of doggin’ (complaining about everything), but very little coggin’ So this month, I am back in the mountain bike saddle, riding 11 miles to work 2-3 times per week. […] ➡
- RSS2JS Docks at Blog Harbor Got a nice email and link from the folks at Blog Harbor, a blog hosting service that offers a number of worthy add-ons for those who prefer not to tinker (and mess up) their own blog server. They have created a nicely formatted and structured guide to a hosted version of our RSS to JavaScript […] ➡
- I Missed the RSS Winterfest These winters in Arizona are tough. Some days the temperature drops into the mid 60s. Likewise was my vain attempt today to tune into the RSS Winterfest. Every attempt use the link provided by the automatic email registration message, took me to a promising entry lobby, but every click of “Launch Presentation” resulted in a […] ➡
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.