“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 22 posts previously published on December 13th
- 2022
- Question Experiment Connect This (with all the alt) Nothing new here, is there ever? But I am a bit tired of every post to Mastodon WordPress plugin (and ActivityPub too) sends there a featured image without the alt text entered here in WordPress. I end up getting (correctly) slapped by the Please Caption bot! So I am switching the posting there to use […]
- Toot in/em bed In a fit of desperate desire to not be awash in social media slush of the twitter muskification as explained via ChatGPT, I am resorting to perhaps the worst blog post title since… (searching them all in vain) ever. Yes, to be honest yesterday’s foray into coding some means to extend what WordPress could do […]
- 2018
- 2017
- 2014
- Try Out / Please Break TRU Writer? Saying I am excited is an understatement for the tinkering that has produced the previously described TRU Writer site. I spent time on a Friday night just fiddling with functionality no one will ever notice. In summary, the notion of the SPLOTs I am working on here at TRU with Brian Lamb is… well here […]
- 2013
- 2012
- There is a Place Like Not Home Weeks and weeks had passed by, like listless grass blowing down the dirt lane, since she had returned home. Still, no one was going to challenge Dorothy as the saddest person in Seward County, perhaps in all of West Kansas. Not the moping cows, not even the Rogers family who lost their grain silo, two […]
- Dorothy and Robert Mix It Up This should be the last piece of media for my Dorothy ds106 story. I have been wanting to the dialog mashup assignment since I heard the first examples from listening to the stellar examples from The Truth’s episode of Movie Mashups: As demonstrated by the Movies Mashup episode of the radio show The Truth, take […]
- What is Dorothy Doing Shopping at the Villaggio? Another element I am using in my story is that Dorothy figure ut that to return to Oz, she would need to go shopping and find a new pair of ruby slippers, since you cannot expect to just fall out of the sky again and land on another witch. So she has to go shopping […]
- Travel Hippy Style With Ozmomatics As part of a ds106 final project story I am doing based on the Wizard of Oz, I have a part where Dorothy decides to go back to Oz. Not knowing how to find another tornado to whip her house (no one in Liberal, Kansas could explain how the house that was whipped to Oz […]
- emoH ekiL ecalP oN s’erehT In my story of Dorothy getting bored in Kansas, I wanted to have a way for her to go back to Oz, and the easiest way would be via the Play It Backward, Jack ds106 assignment: Things always look super weird when you play them in reverse, don’t they? So take a video of something […]
- Keep Clicking Those Ruby GIF Slippers What could be more key and symbolic of the magic of Oz than the red slippers that Dorothy snagged from the Wicked Witch who got mushed by her flying house? The fact that Dorothy always had the magic but did not know it until sparkly Good Witch clued her in. This GIF is done for […]
- She Would Rather Party in Oz Why was Dorothy so set n going back to drab, black and white Kansas? Was Auntie Em that much of the life of the party? If the truth were told, she would have expressed her desire to hang out with those wild Munchkins: As part of my evolving Dorothy story, this is the ds106 Truthful […]
- Which Side of the Rainbow, Dorothy? Dorothy seems timeless even looking back at the Wizard of Oz from maybe 80 years past its time. But her statue I saw on the streets of Liberal Kansas seemed kind of old, maybe it was just the texture of the metal, but I speculated she might get nostalgic for her own youth (or at […]
- GIFing the Streets of Liberal On my trek home earlier this month, I picked off of the map a route in Kansas that would take me through the near Texas border town of “Liberal” – which I read on a plaque has nothing to do with politics– it was in reference to the sharing of water liberally by the first […]
- 2008
- Nifty DIY hacks for your Camera Lifehacker’s Top 10 DIY Photography Tools is a mine of nifty gems for photographers to up their own photo mojo. Besides what I learned (see below), I am finding myself thinking more about the rise of the DIY (Do It Yourself) culture on the net- there surely is a future blog post relating that to […]
- 2007
- I got… err… try-ed an iPhone Just came across TryPhone a site that offers web based interactive interfaces for a wide range of mobile phones. Seems a great way to see the features. And in the spirit of good embed-ness, you can put any of this in a web page. So before I do this, my own backl story. I have […]
- 2005
- Typography, Web Style New reference for web design CSS junkies, and a nice example to demonstrate web pages need not be collections of boxes: The Elements of Typographic Style Apple to the Web: Robert Bringhurst’s book The Elements of Typographic Style is on many a designer’s bookshelf and is considered to be a classic in the field… In […]
- My Friend, My Hero, Disk Warrior If you are a serious to semi-serious Mac user and do not own a copy of Alsoft Diskwarrior, stop reading this, run, out and buy one. Shouldn’t you have: … the most highly decorated Mac disk repair utility ever. It repairs disks that no other program can repair… DiskWarrior is the safest, the most technologically […]
- 2004
- Dissecting the Code: Google Suggest Found surfing RSS feeds of someone else’s del.icio.us tagged bag… If you’ve not come across the beta of Google’s new feature, take a peek at Google Suggest, which works like autocomplete by responding with common/popular search queries based on the first few letters you type in the search field. What do you think? Dose of […]
- Hey Phentermine Pusher: You Left Your Roach Prints in Our Spam Honey Pot Spammers can hid, but they are not invisible. On Dec 10, I invited readers of this blog to send us some Trackbacks to MLX Packages… while I am eager to see this technology used, this was actually a bit of bait. Our regular MLX spammer bit the bait completely. Within a few days, they triggered […]
- 2003
- Take Back What Net? Supposedly in “Take Back the Net”, the Dec 30 issue of PC Magazine has sent Blogging, wikis, and RSS mainstream, according to a entry by Michelle. The article does provide a nice overview of the range of major blog tools, has some decent resources, etc, but there are some statements in the opening that have […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 22 posts previously published on December 13th
- 2022
- Question Experiment Connect This (with all the alt) Nothing new here, is there ever? But I am a bit tired of every post to Mastodon WordPress plugin (and ActivityPub too) sends there a featured image without the alt text entered here in WordPress. I end up getting (correctly) slapped by the Please Caption bot! So I am switching the posting there to use […] ➡
- Toot in/em bed In a fit of desperate desire to not be awash in social media slush of the twitter muskification as explained via ChatGPT, I am resorting to perhaps the worst blog post title since… (searching them all in vain) ever. Yes, to be honest yesterday’s foray into coding some means to extend what WordPress could do […] ➡
- 2018
- 2017
- 2014
- Try Out / Please Break TRU Writer? Saying I am excited is an understatement for the tinkering that has produced the previously described TRU Writer site. I spent time on a Friday night just fiddling with functionality no one will ever notice. In summary, the notion of the SPLOTs I am working on here at TRU with Brian Lamb is… well here […] ➡
- 2013
- 2012
- There is a Place Like Not Home Weeks and weeks had passed by, like listless grass blowing down the dirt lane, since she had returned home. Still, no one was going to challenge Dorothy as the saddest person in Seward County, perhaps in all of West Kansas. Not the moping cows, not even the Rogers family who lost their grain silo, two […] ➡
- Dorothy and Robert Mix It Up This should be the last piece of media for my Dorothy ds106 story. I have been wanting to the dialog mashup assignment since I heard the first examples from listening to the stellar examples from The Truth’s episode of Movie Mashups: As demonstrated by the Movies Mashup episode of the radio show The Truth, take […] ➡
- What is Dorothy Doing Shopping at the Villaggio? Another element I am using in my story is that Dorothy figure ut that to return to Oz, she would need to go shopping and find a new pair of ruby slippers, since you cannot expect to just fall out of the sky again and land on another witch. So she has to go shopping […] ➡
- Travel Hippy Style With Ozmomatics As part of a ds106 final project story I am doing based on the Wizard of Oz, I have a part where Dorothy decides to go back to Oz. Not knowing how to find another tornado to whip her house (no one in Liberal, Kansas could explain how the house that was whipped to Oz […] ➡
- emoH ekiL ecalP oN s’erehT In my story of Dorothy getting bored in Kansas, I wanted to have a way for her to go back to Oz, and the easiest way would be via the Play It Backward, Jack ds106 assignment: Things always look super weird when you play them in reverse, don’t they? So take a video of something […] ➡
- Keep Clicking Those Ruby GIF Slippers What could be more key and symbolic of the magic of Oz than the red slippers that Dorothy snagged from the Wicked Witch who got mushed by her flying house? The fact that Dorothy always had the magic but did not know it until sparkly Good Witch clued her in. This GIF is done for […] ➡
- She Would Rather Party in Oz Why was Dorothy so set n going back to drab, black and white Kansas? Was Auntie Em that much of the life of the party? If the truth were told, she would have expressed her desire to hang out with those wild Munchkins: As part of my evolving Dorothy story, this is the ds106 Truthful […] ➡
- Which Side of the Rainbow, Dorothy? Dorothy seems timeless even looking back at the Wizard of Oz from maybe 80 years past its time. But her statue I saw on the streets of Liberal Kansas seemed kind of old, maybe it was just the texture of the metal, but I speculated she might get nostalgic for her own youth (or at […] ➡
- GIFing the Streets of Liberal On my trek home earlier this month, I picked off of the map a route in Kansas that would take me through the near Texas border town of “Liberal” – which I read on a plaque has nothing to do with politics– it was in reference to the sharing of water liberally by the first […] ➡
- 2008
- Nifty DIY hacks for your Camera Lifehacker’s Top 10 DIY Photography Tools is a mine of nifty gems for photographers to up their own photo mojo. Besides what I learned (see below), I am finding myself thinking more about the rise of the DIY (Do It Yourself) culture on the net- there surely is a future blog post relating that to […] ➡
- 2007
- I got… err… try-ed an iPhone Just came across TryPhone a site that offers web based interactive interfaces for a wide range of mobile phones. Seems a great way to see the features. And in the spirit of good embed-ness, you can put any of this in a web page. So before I do this, my own backl story. I have […] ➡
- 2005
- Typography, Web Style New reference for web design CSS junkies, and a nice example to demonstrate web pages need not be collections of boxes: The Elements of Typographic Style Apple to the Web: Robert Bringhurst’s book The Elements of Typographic Style is on many a designer’s bookshelf and is considered to be a classic in the field… In […] ➡
- My Friend, My Hero, Disk Warrior If you are a serious to semi-serious Mac user and do not own a copy of Alsoft Diskwarrior, stop reading this, run, out and buy one. Shouldn’t you have: … the most highly decorated Mac disk repair utility ever. It repairs disks that no other program can repair… DiskWarrior is the safest, the most technologically […] ➡
- 2004
- Dissecting the Code: Google Suggest Found surfing RSS feeds of someone else’s del.icio.us tagged bag… If you’ve not come across the beta of Google’s new feature, take a peek at Google Suggest, which works like autocomplete by responding with common/popular search queries based on the first few letters you type in the search field. What do you think? Dose of […] ➡
- Hey Phentermine Pusher: You Left Your Roach Prints in Our Spam Honey Pot Spammers can hid, but they are not invisible. On Dec 10, I invited readers of this blog to send us some Trackbacks to MLX Packages… while I am eager to see this technology used, this was actually a bit of bait. Our regular MLX spammer bit the bait completely. Within a few days, they triggered […] ➡
- 2003
- Take Back What Net? Supposedly in “Take Back the Net”, the Dec 30 issue of PC Magazine has sent Blogging, wikis, and RSS mainstream, according to a entry by Michelle. The article does provide a nice overview of the range of major blog tools, has some decent resources, etc, but there are some statements in the opening that have […] ➡
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.