“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 16 posts previously published on October 5th
- 2024
- What’s Next? Out of somewhere came a childhood memory of a standardized test they gave us in elementary school, 1970s era. I did well on the test but I recall some analysis which said my skills would be best for some kind of bookkeeping or doing typing in my career. I was not thrilled by that given […]
- 2020
- That Would Be Two Like days in a row. I’m out of the gate with getting back to not only posting my daily taken photos daily but even blogging about them. It was not a big number of photos today, maybe 8 taken, four tossed. My pick? The first one. When I went out side to wave bye to […]
- 2015
- Richard Branson _________’s The Future of Education David Kernohan tweeted the arrival of Richard Branson to jump in the disruption of education pool Meanwhile, in the future of education… pic.twitter.com/oeAhN3eKLO — David Kernohan (@dkernohan) October 1, 2015 which has duly been commented upon by Martin Weller. Each time I see the Get Yer Tickets for the Disruption ad my first free form […]
- 2013
- A LibraryBox For Nancy It’s been a while since I touched my StoryBox (c.f. unfinished projects, 1963-2013). I had bought a new router that the PirateBox inside uses, thinking I might use it last Spring, but never got around to it. In the meantime, in getting to talk frequently to Nancy White as we work on the Project Community […]
- 2012
- Celebrate ds106 Day Hey kids, do you know what tomorrow is (well it already is in New Zealand, those futurists). Yes, it is October 6. What’s special about that? October 6… is 10/6 meaning a day to celebrate ds106 So tomorrow, your make a photo showing your 106ness, maybe you in your kickstarter t-shirt or make something that […]
- 2011
- You’re a Veteran? We’ll Throw a Parade! I am calling this one a Four Icon MacGuffin Challenge – mashing up the Four Icon Challenge with Messing with the MacGuffin Share this barking on social media
- 2009
- Bailey is Sailing Again cc licensed flickr photo shared by sailn1 Bailey studies up on his RADAR skills My sister’s sheltie, Bailey, is a rather experienced sailor– he and his “parents” have just left their summer land berth near Annapolis for another venture down the Atlantic coast and a winter in the Bahamas. Not to shabby a life. I […]
- 2008
- Big Internet A bit late, but right before boarding my plane form Osaka, I uploaded as an annotated flickr set the slides I used for my “10 Minute TED style” talk at Learning 2.008 The premise is we all know the Internet is “big” but forget how dwarfing a scale it is to an individual, drawing the […]
- Community Weed Picking Community Weed Picking by cogdogblog posted 5 Oct ’08, 1.11am MDT PST on flickr As I was waiting for the airport shuttle van, my friend and host here in Japan, Bert, pointed out one more item of Japanese culture- posted in the notice board of his apartment is a flyer letting him know when he […]
- Is the Web a Side Dish? Traditional Korean Food by savagecorp posted 20 Jun ’05, 9.40pm MDT PST on flickr Main Soup Dish and 23 sides to nibble on. Sometime later this month will mark the 15th year I have been on the web. Every since sly Jim Walters at phoenix College handed my a floppy disk (showing my age right […]
- 2006
- Autumn is EduConferencePalooza Time Leaves are falling (somewhere) and it’s time to get the luggage out and truck off to an educational conference. Or not, stay at home, put your feet up, and jump into an online conference! This dog’s bowl is a bit full the next few months of conference, and conference-like activity. Sorry, but I am likely […]
- PowerPoint is 2.0-fied with SlideShare Very cool– after reading on TextCrunch about Introducing SlideShare: Power Point + YouTube I checked out the site to see its one of those betas. But you can ask to get in, adn I got an account before I had finished lunch. TextCrunch is right- this is YouTube for PowerPoint, even the interface is a […]
- 2005
- Back From Sabbatical- The Bionic iBook flickr foto New Bottom Partsavailable on my flickr My 2002 vintage iBook finally got home from a month’s vacation to Apple’s repair resort in Tennesse. In addition to a logic board replacement, they replaced the bottom case (the white new battery replaced a few months ago is still shinier) and a new optical drive (if […]
- Ning is Da Thing Let’s say you’ve gotten revved up in all the buzz of social software, Web 2.0 (3.7? 10.0?), folksonomy etc… How many of us really have the prowess to sit down and code something like flickr or del.icio.us or facebook?? Well, I just too k a glance, but I would guess Ning is the thing– Ning […]
- How To Waste A Full Day Whew. Due to some malicious activity that wormed its way onto this server, we had to yank it off the network yesterday. Today was spent re-installing the OS, tripping over apache settings, trying to get those *#&$^ obscure perl modules working for some &#*#* old MovableType blogs running here. My regrets to web sites hosed […]
- 2003
- Web Design Color Schemes with Natural Roots A nicely done article on looking at your web pages with a different mind-set. Check out Boxes and Arrows: Natural Selections: Colors Found in Nature and Interface Design. Typicallly B&A has some high brow articles, e.g. “Semiotics: A Primer for Designers”, stuff for people labled “information architects”, but now and then you find some down […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 16 posts previously published on October 5th
- 2024
- What’s Next? Out of somewhere came a childhood memory of a standardized test they gave us in elementary school, 1970s era. I did well on the test but I recall some analysis which said my skills would be best for some kind of bookkeeping or doing typing in my career. I was not thrilled by that given […] ➡
- 2020
- That Would Be Two Like days in a row. I’m out of the gate with getting back to not only posting my daily taken photos daily but even blogging about them. It was not a big number of photos today, maybe 8 taken, four tossed. My pick? The first one. When I went out side to wave bye to […] ➡
- 2015
- Richard Branson _________’s The Future of Education David Kernohan tweeted the arrival of Richard Branson to jump in the disruption of education pool Meanwhile, in the future of education… pic.twitter.com/oeAhN3eKLO — David Kernohan (@dkernohan) October 1, 2015 which has duly been commented upon by Martin Weller. Each time I see the Get Yer Tickets for the Disruption ad my first free form […] ➡
- 2013
- A LibraryBox For Nancy It’s been a while since I touched my StoryBox (c.f. unfinished projects, 1963-2013). I had bought a new router that the PirateBox inside uses, thinking I might use it last Spring, but never got around to it. In the meantime, in getting to talk frequently to Nancy White as we work on the Project Community […] ➡
- 2012
- Celebrate ds106 Day Hey kids, do you know what tomorrow is (well it already is in New Zealand, those futurists). Yes, it is October 6. What’s special about that? October 6… is 10/6 meaning a day to celebrate ds106 So tomorrow, your make a photo showing your 106ness, maybe you in your kickstarter t-shirt or make something that […] ➡
- 2011
- 2009
- Bailey is Sailing Again cc licensed flickr photo shared by sailn1 Bailey studies up on his RADAR skills My sister’s sheltie, Bailey, is a rather experienced sailor– he and his “parents” have just left their summer land berth near Annapolis for another venture down the Atlantic coast and a winter in the Bahamas. Not to shabby a life. I […] ➡
- 2008
- Big Internet A bit late, but right before boarding my plane form Osaka, I uploaded as an annotated flickr set the slides I used for my “10 Minute TED style” talk at Learning 2.008 The premise is we all know the Internet is “big” but forget how dwarfing a scale it is to an individual, drawing the […] ➡
- Community Weed Picking Community Weed Picking by cogdogblog posted 5 Oct ’08, 1.11am MDT PST on flickr As I was waiting for the airport shuttle van, my friend and host here in Japan, Bert, pointed out one more item of Japanese culture- posted in the notice board of his apartment is a flyer letting him know when he […] ➡
- Is the Web a Side Dish? Traditional Korean Food by savagecorp posted 20 Jun ’05, 9.40pm MDT PST on flickr Main Soup Dish and 23 sides to nibble on. Sometime later this month will mark the 15th year I have been on the web. Every since sly Jim Walters at phoenix College handed my a floppy disk (showing my age right […] ➡
- 2006
- Autumn is EduConferencePalooza Time Leaves are falling (somewhere) and it’s time to get the luggage out and truck off to an educational conference. Or not, stay at home, put your feet up, and jump into an online conference! This dog’s bowl is a bit full the next few months of conference, and conference-like activity. Sorry, but I am likely […] ➡
- PowerPoint is 2.0-fied with SlideShare Very cool– after reading on TextCrunch about Introducing SlideShare: Power Point + YouTube I checked out the site to see its one of those betas. But you can ask to get in, adn I got an account before I had finished lunch. TextCrunch is right- this is YouTube for PowerPoint, even the interface is a […] ➡
- 2005
- Back From Sabbatical- The Bionic iBook flickr foto New Bottom Partsavailable on my flickr My 2002 vintage iBook finally got home from a month’s vacation to Apple’s repair resort in Tennesse. In addition to a logic board replacement, they replaced the bottom case (the white new battery replaced a few months ago is still shinier) and a new optical drive (if […] ➡
- Ning is Da Thing Let’s say you’ve gotten revved up in all the buzz of social software, Web 2.0 (3.7? 10.0?), folksonomy etc… How many of us really have the prowess to sit down and code something like flickr or del.icio.us or facebook?? Well, I just too k a glance, but I would guess Ning is the thing– Ning […] ➡
- How To Waste A Full Day Whew. Due to some malicious activity that wormed its way onto this server, we had to yank it off the network yesterday. Today was spent re-installing the OS, tripping over apache settings, trying to get those *#&$^ obscure perl modules working for some &#*#* old MovableType blogs running here. My regrets to web sites hosed […] ➡
- 2003
- Web Design Color Schemes with Natural Roots A nicely done article on looking at your web pages with a different mind-set. Check out Boxes and Arrows: Natural Selections: Colors Found in Nature and Interface Design. Typicallly B&A has some high brow articles, e.g. “Semiotics: A Primer for Designers”, stuff for people labled “information architects”, but now and then you find some down […] ➡
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