“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 21 posts previously published on October 13th
- 2024
- Fixing Rotten Links… well once you know they are rotten I’m easy to toss shade at web sites who move/ change structures leaving swaths of linkrot or just do not flex their power of maintaining their own links. But in the pot name calling kettle department, I’ve got plenty of bad links under my name. So I get focussed on fixing them. One came to […]
- 2021
- What were once Daily Photos Habits are now… I’m allowed to shame myself here, right? It’s my blog, my domain, hell yeah! By my own and flickr’s reckoning, this is the 14th year of my daily photo posting habit. It does amuse myself that the flickr feature of collections, meaning a group of albums of photos (which is meta meta) is not anywhere […]
- 2020
- Slo Mo Moments Here’s something I’ve been playing with in mixing things up with daily photos- and it’s video. But not video. I am using the Slo Mo mode on the iPhone to just capture a bit of subtle movement, like a sluggish moment. This setting on the iPhone camera seemed like a gimmick to me, I maybe […]
- 2018
- New Dimensions for WP-Dimension What else to do on a chilly, blustery, snowy day, sitting on the couch, in front a warm fireplace, side by side blogging with my Cori… then to fiddle with my WordPress themes? Yeah, as she says a compliment, I am weird. This week I was helping my friend Mariana do some revamps, web site […]
- 2017
- El Puente de Puerto Rico: A Bridge of Postcards Are you stressed, tired in the middle of your semester? Imagine your classrooms, campus, students not even sure if they have water, electricity, food, much less internet, just because the place they live was twice in the path of hurricanes. Imagine you are a citizen of the United States of America and hear its leader […]
- 2016
- [Trying] Going to Flickr Zero, CC0 Never say never. Never say never multiple times. Never blog about saying never. Never. Ever. On December 19, 2006 I blogged about putting a CC-BY license on my flickr photos. Then on September 7, 2010, I had reason to try on CC-BY-NC. From feedback, I flipped to CC-BY-SA and a week later I was back […]
- 2015
- Leg 2 of East Coast Tour: Peak Autumn These legs of this trip do not truly have temporal marking points. This marker might be almost at the point I have stopped coughing, some 3 weeks since falling with Bronchitis in Richmond. I left Richmond by train on October 1 bound just up the railroad to Fredericksburg. I made a travel mistake. not listening […]
- 2014
- Peeking Inside the New Storybox Here I thought I caught up on my back blogging from the trip to New Zealand, but I have yet to talk about the digital time capsule that appeared at every stop. In this post, I’ll give a bit of review about what happened, what was collected, in a subsequent long scrolling gibberish one I […]
- 2012
- Bringing #ds106 to Wordcamp Vancouver I got a chance to spread the ds106 mojo at Wordcamp Vancouver today, with my session on Building an Open Course/Community with WordPress, Syndication, and Duct Tape: ds106 is an open course in Digital Storytelling that leverages platforms of open source tools, syndication, and social media in a way that makes it more community than […]
- 2011
- More Computer Weirdness Hmmm, I am not finding too many answers to some funky behavior on my MacBookPro. If I was paranoid, I might be taping up the windows, but am, more concerned about being able to continue to do my work on the haunted machine. For the last 2 weeks, I have noticed when using Tweetdeck, when […]
- Blues Harp Lesson #2: Learning From Bryan Jackson Now this is getting cool. After posting of my plan to follow Dean Shareski’s learning project, I started with my video announcement of wanting to play blues harp (and not have it sound like dying dogs). Bryan Jackson, gifted with music and generosity, responded with a first video lesson for me. So I set out […]
- 2009
- Paper Must Be Cheap Cause Kindle Books Cost Alot cc licensed flickr photo shared by antonio.tombolini We just closed one of our NMC Two Minute Surveys– these have been fun to do over the last few months; we set them tightly as 3 questions, all with multiple choice answers done in Google Forms (makes it easy to us the generated chart summaries, though I […]
- 2008
- Stitching Photos to 3D: I Borked 49% Synthy with PhotoSynth Photosynth was one of those “cool demos I saw and bookmarked for later” that I was recently nudged to go back and look at– this week I saw a very cool scene created by the folks at the Indianapolis Museum of Art. In a nutshell, PhotoSynth magically creates a navigable scene that lets you move […]
- 2007
- Change The Blog Channel (But Change Back in 3 Weeks) I am writing to you from a hill top view of Marion Bay in Tasmania Australia (no dingo jokes shall be made)… this is a few days into my 3 week Circuit Tour of Australia and my blogging for this time will be completely through http://cogdogroo.wordpress.com — for the duration, I am using my own […]
- 2005
- The Flood of Cool New Tools With Cooler New Names Is anyone else dizzy at the rate of new web-based tools/services with tinges of RSS, social software, open-ness? It’s a Good Thing, but it seems like there are 3 or 4 or 12 a week. The latest is the coyly named Remember the Milk: Achieve Domestic Bliss. Never forget the milk (or anything else) again. […]
- MacEnvy? Go FlyakiteOSX! Pity the 96% of the computing world stuck in virus infected, human interface rejected, bug detected operating systems. They act like they like it, but often the Freudian slips are visible. But you don;t have to wait for an Intel powered Mac to get the Aqua groove– there is FlyakiteOSX: The web site for this […]
- Don’t These People Have Anything Better To Do? I use the term “people” rather loosely: What is scarier is that somewhere out there is someone who would actually reply. Ahhh, the smell of spam frying in the junk mail folder. Sizzzzzzle….. Share this barking on social media
- Phoenix Googleplex Guess who’s coming to town? Do you think they need a map? Can we expect future logos with cacti, gila monsters, and javelina? Will they take the company tubing down the Salt River? Can they handle the hot stuff from Los Dos Molinos? Will they check out Zoo Lights? After dowing some Killer Chili they […]
- 2004
- Beached flickr foto Beachedavailable on my flickr Waiting for the tide to rise at 6000 feet above sea level. At the end of the valley in the little town of Strawberry, AZ, this boat is ready for a ride… The wait might be a few hundred million years.. This was just a new test of an […]
- The Boys Are in Town Well the boys are in town… John and George are on their way to Tempe (no this is not a Dead Beatles reunion, it is the other John and George). After their shindig at ASU, I am counting on meeting up for some drinks at the Billet Bar in downtown Scottsdale and then maybe up […]
- 2003
- RSS2JS Script Fix In response to observed, unexpected behavior, I made a minor tweak to our PHP script that does the RSS to JS magic, using JavaScript to embed RSS content in any page. The probllem was on the simple way I was naming my cache files (the RSS parser I use creates cache files to ease the […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 21 posts previously published on October 13th
- 2024
- Fixing Rotten Links… well once you know they are rotten I’m easy to toss shade at web sites who move/ change structures leaving swaths of linkrot or just do not flex their power of maintaining their own links. But in the pot name calling kettle department, I’ve got plenty of bad links under my name. So I get focussed on fixing them. One came to […] ➡
- 2021
- What were once Daily Photos Habits are now… I’m allowed to shame myself here, right? It’s my blog, my domain, hell yeah! By my own and flickr’s reckoning, this is the 14th year of my daily photo posting habit. It does amuse myself that the flickr feature of collections, meaning a group of albums of photos (which is meta meta) is not anywhere […] ➡
- 2020
- Slo Mo Moments Here’s something I’ve been playing with in mixing things up with daily photos- and it’s video. But not video. I am using the Slo Mo mode on the iPhone to just capture a bit of subtle movement, like a sluggish moment. This setting on the iPhone camera seemed like a gimmick to me, I maybe […] ➡
- 2018
- New Dimensions for WP-Dimension What else to do on a chilly, blustery, snowy day, sitting on the couch, in front a warm fireplace, side by side blogging with my Cori… then to fiddle with my WordPress themes? Yeah, as she says a compliment, I am weird. This week I was helping my friend Mariana do some revamps, web site […] ➡
- 2017
- El Puente de Puerto Rico: A Bridge of Postcards Are you stressed, tired in the middle of your semester? Imagine your classrooms, campus, students not even sure if they have water, electricity, food, much less internet, just because the place they live was twice in the path of hurricanes. Imagine you are a citizen of the United States of America and hear its leader […] ➡
- 2016
- [Trying] Going to Flickr Zero, CC0 Never say never. Never say never multiple times. Never blog about saying never. Never. Ever. On December 19, 2006 I blogged about putting a CC-BY license on my flickr photos. Then on September 7, 2010, I had reason to try on CC-BY-NC. From feedback, I flipped to CC-BY-SA and a week later I was back […] ➡
- 2015
- Leg 2 of East Coast Tour: Peak Autumn These legs of this trip do not truly have temporal marking points. This marker might be almost at the point I have stopped coughing, some 3 weeks since falling with Bronchitis in Richmond. I left Richmond by train on October 1 bound just up the railroad to Fredericksburg. I made a travel mistake. not listening […] ➡
- 2014
- Peeking Inside the New Storybox Here I thought I caught up on my back blogging from the trip to New Zealand, but I have yet to talk about the digital time capsule that appeared at every stop. In this post, I’ll give a bit of review about what happened, what was collected, in a subsequent long scrolling gibberish one I […] ➡
- 2012
- Bringing #ds106 to Wordcamp Vancouver I got a chance to spread the ds106 mojo at Wordcamp Vancouver today, with my session on Building an Open Course/Community with WordPress, Syndication, and Duct Tape: ds106 is an open course in Digital Storytelling that leverages platforms of open source tools, syndication, and social media in a way that makes it more community than […] ➡
- 2011
- More Computer Weirdness Hmmm, I am not finding too many answers to some funky behavior on my MacBookPro. If I was paranoid, I might be taping up the windows, but am, more concerned about being able to continue to do my work on the haunted machine. For the last 2 weeks, I have noticed when using Tweetdeck, when […] ➡
- Blues Harp Lesson #2: Learning From Bryan Jackson Now this is getting cool. After posting of my plan to follow Dean Shareski’s learning project, I started with my video announcement of wanting to play blues harp (and not have it sound like dying dogs). Bryan Jackson, gifted with music and generosity, responded with a first video lesson for me. So I set out […] ➡
- 2009
- Paper Must Be Cheap Cause Kindle Books Cost Alot cc licensed flickr photo shared by antonio.tombolini We just closed one of our NMC Two Minute Surveys– these have been fun to do over the last few months; we set them tightly as 3 questions, all with multiple choice answers done in Google Forms (makes it easy to us the generated chart summaries, though I […] ➡
- 2008
- Stitching Photos to 3D: I Borked 49% Synthy with PhotoSynth Photosynth was one of those “cool demos I saw and bookmarked for later” that I was recently nudged to go back and look at– this week I saw a very cool scene created by the folks at the Indianapolis Museum of Art. In a nutshell, PhotoSynth magically creates a navigable scene that lets you move […] ➡
- 2007
- Change The Blog Channel (But Change Back in 3 Weeks) I am writing to you from a hill top view of Marion Bay in Tasmania Australia (no dingo jokes shall be made)… this is a few days into my 3 week Circuit Tour of Australia and my blogging for this time will be completely through http://cogdogroo.wordpress.com — for the duration, I am using my own […] ➡
- 2005
- The Flood of Cool New Tools With Cooler New Names Is anyone else dizzy at the rate of new web-based tools/services with tinges of RSS, social software, open-ness? It’s a Good Thing, but it seems like there are 3 or 4 or 12 a week. The latest is the coyly named Remember the Milk: Achieve Domestic Bliss. Never forget the milk (or anything else) again. […] ➡
- MacEnvy? Go FlyakiteOSX! Pity the 96% of the computing world stuck in virus infected, human interface rejected, bug detected operating systems. They act like they like it, but often the Freudian slips are visible. But you don;t have to wait for an Intel powered Mac to get the Aqua groove– there is FlyakiteOSX: The web site for this […] ➡
- Don’t These People Have Anything Better To Do? I use the term “people” rather loosely: What is scarier is that somewhere out there is someone who would actually reply. Ahhh, the smell of spam frying in the junk mail folder. Sizzzzzzle….. Share this barking on social media ➡
- Phoenix Googleplex Guess who’s coming to town? Do you think they need a map? Can we expect future logos with cacti, gila monsters, and javelina? Will they take the company tubing down the Salt River? Can they handle the hot stuff from Los Dos Molinos? Will they check out Zoo Lights? After dowing some Killer Chili they […] ➡
- 2004
- Beached flickr foto Beachedavailable on my flickr Waiting for the tide to rise at 6000 feet above sea level. At the end of the valley in the little town of Strawberry, AZ, this boat is ready for a ride… The wait might be a few hundred million years.. This was just a new test of an […] ➡
- The Boys Are in Town Well the boys are in town… John and George are on their way to Tempe (no this is not a Dead Beatles reunion, it is the other John and George). After their shindig at ASU, I am counting on meeting up for some drinks at the Billet Bar in downtown Scottsdale and then maybe up […] ➡
- 2003
- RSS2JS Script Fix In response to observed, unexpected behavior, I made a minor tweak to our PHP script that does the RSS to JS magic, using JavaScript to embed RSS content in any page. The probllem was on the simple way I was naming my cache files (the RSS parser I use creates cache files to ease 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.
Share this barking on social media