“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 23 posts previously published on June 20th
- 2022
- Trading in the Rs for Ps Look at the capital letter R. Just snap off the front leg, and now you are a P. In the world of Open Educational Resources, the five Rs are like chapter/verse of the induction, repeat after me: The right to Retain, Reuse, Revise, Remix, Redistribute…Pick your source https://www.google.com/search?q=oer+5+rs Apparently things get a bit more murky […]
- The OEGlobal “AND” Conference Experiment My use of experiment is more the try “to learn something” in the definition than a well-designed test “done in order to learn something or to discover if something works or is true.” This is also framed in my ongoing wrestling with the conference experience that is (to quote myself) overly “presentationally oriented.” Compound this […]
- 2018
- More Than Archiving, Organizing Your Shared Stuff Begins at Home The practice of archiving or reclaiming the “stuff” one does on the web is mostly framed on the preservation of our stuff, after sharing it into some site one does not own nor manage, chosen because it was easiest. Easy has a price. We saw that in a short time span earlier this year when […]
- 2017
- WP-Dimension Theme… Now With Pages Back in February I wrote of converting an HTML5up static template to a WordPress theme I call WP-Dimension. This was also a first run at putting theme settings inside the WordPress Customizer. I run the static site for my own purposes at http://cog.dog (I still love my domain), but the WordPress version comes in handy […]
- 2016
- The Moon Cannot Hide I owe this photo to a tweet that got me outside last night with my camera So you should enjoy this delicious cocktail and/or meteorological event while you can https://t.co/2gLznnjvmi — Dan Cohen (@dancohen) June 19, 2016 I learned in the process that a June full moon is known as a Strawberry Moon (not for […]
- #UDGAgora: Open as in Taco For the second year iteration of our UDGAgora work with faculty from the University of Guadalajara, the schedule moved to the second day a presentation on openness Brian Lamb and had done in 2015 later in the week. Since 2003 Brian and I have done enough presentations together that we cannot remember them all, but […]
- 2014
- A Thought Vectors Comment Aggregator Just in case you have not had your fill of the previous two code dumps for the workings of the VCU Thought Vectors site… heres more. I can’t stop tinkering. Last weekend Jon Becker emailed and asked if there was “an easy way” to mix together all of the RSS feeds from his students blog […]
- 2013
- Reader’s End is Near cc licensed ( BY ) flickr photo shared by futureatlas.com And there is will go soon, beloved Google Reader, something I have used on a daily basis since… the dawn of it’s time (2006, the Cambrian Internet era, when many crawled from the sea and learned to walk the web). It rescued me from the […]
- 2012
- Speak into the Silophone cc licensed ( BY ) flickr photo shared by cogdogblog If you get to hang around Grant Potter on a mission of discovery, then you are in for a good day. Today we ventured down to the Montreal water front to find this project he came across called the Silophone: Silophone is a project by […]
- Go Tom Go cc licensed ( BY ) flickr photo shared by cogdogblog Jumping into the ds106 audio, assignments, I wanted to take on ones that had few takers so far- and I remain stumped why Suess It was not given some ds106 attention: Take a Dr. Suess book, or perhaps the Berenstain Bears, or one of your […]
- 2011
- There’s Open and then there is Inviting Being open and supporting openness is one thing. You make the step to leave the door open, letting the outside come in, ro maybe just let them see inside your living room. But it also can feel like FoD Syndrome (Field of Dreams), if you Open it They Will Come. But it’s another whole level […]
- Dr. O ds106 is going to a new level of meta-ness, as unleashed live this morning on ds106.tv. It was here, that the teacher, Dr. O’Blivion, made his first class address, in the medium form which he will only communicate- TV. His TA, Jim Groom, will be the conduit to the teacher for students and class participants. […]
- 2010
- Dad’s Here I’ve not been able to directly say Happy Father’s Day since 2001; that year I think I was on the road in Australia and he was home in Florida hanging out with cancer, before passing away in August. I had brought him  an Aussie belt cc licensed flickr photo shared by cogdogblog My mom ended […]
- 2009
- Social Media Recap from NMC 2009 Since it is already a week in the rear view mirror, this ought to be my last post about the 2009 NMC Summer Conference. Heck, it’s time to start thinking about 2010. However I wanted to record, primarily for my own sake, while fresh in my mind a recap of the social media tools we […]
- Shining Up CoolIris For ED-MEDIA In two days will be lifting off from Phoenix towards Honolulu for the 2009 ED-MEDIA conference which means I have 48 hours of presentation prep (actually more since I don’t present til Wednesday). I am doing another spin of 50+ Web 2.0 Ways to Tell a Story again using hand coded RSS and CoolIris to […]
- 2008
- Don’t Cry When Social Media Flops, Just Move On The subtitle might be, “Curse You Twitter For Letting Me Down”. Or much worse than, “curse you”. But actually, its more of a shrug. As much as I like poking fun at flickr’s flakiness, it does not cause me loss of sleep or hair, as pretty much it is not truly essential to me work/life. […]
- No Blog No Read No Blog No Read by cogdogblog posted 20 Jun ’08, 9.11am MDT PST on flickr With travel and being busy at the 2008 NMC Summer Conference, my blog posting sputtered off between June 7 and 14 with no posts, and my stats show the consequences. Interesting as there is lag in readership? Peak was on […]
- 2007
- Tweet of the Day Tweet of the Day posted 20 Jun ’07, 3.56pm MDT PST on flickr I think this is worthy of a t-shirt, an award, a bumper sticker, a cartoon, a short story… Linktribution to Rob Wall Let’s take a vote. I vote for… “shunned”. My mom is not on facebook! Share this barking on social media
- And Here I Was Worried About Having Too Many Blogs At one time I bemoaned a future of having multiple blogs to spread my self around. That was so 1.0. I have two personal ones (one just for running or complaining about it), three ones at NMC for various projects, plus our main drupal site which has blog like writing duties, plus others I am […]
- 2006
- Interview With Dr Microphone Last week I had the pleasure of getting a lesson in Audio Recording and Microphones 101 from Gardner Campbell. Thanks Dr Glu for spending some time to clue me in, this was purely selfish on my knowledge seeking side, but I am sharing the audio recording for anyone who cares. http://cogdogblog.com/wp-content/audio/dr-microphone.mp3 [35:19 min, 24.3 mp3] […]
- 2005
- A Long Way From Kuli’ou’ou flickr foto The Topavailable on my flickr The end of the Kuli’ou’ou Ridge Trail marked by this sign, about 1700 feet higher than our starting point. The view behind it which should be the shoreline is masked by clouds. The rain really started coming down hard on the way back down. Here I am back […]
- Moodly Stuff Since I am on the extreme margin of involvement of course management systems at Maricopa, I’ve not intensively followed the latest CMS stuff, but hear that Sakai is bubbling and there is even more spots of interest on the adoption of Moodle. Leon at Y.uk? emailed about 2 new Moodle articles on his blog, “Innovative […]
- Media Literacy- Who Needs It? (NMC Conference) A bit of back blogging from the opening plenary at the NMC 2005 Summer Conference, where for the second year in a row, Henry Jenkins provided a provocative and engaging opening session, this time: “Media Literacy ““ Who Needs It?!!” Henry Jenkins, Massachusetts Institute of Technology Much of the core thinking shaping media literacy education […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 23 posts previously published on June 20th
- 2022
- Trading in the Rs for Ps Look at the capital letter R. Just snap off the front leg, and now you are a P. In the world of Open Educational Resources, the five Rs are like chapter/verse of the induction, repeat after me: The right to Retain, Reuse, Revise, Remix, Redistribute… Pick your source https://www.google.com/search?q=oer+5+rs Apparently things get a bit more […] ➡
- The OEGlobal “AND” Conference Experiment My use of experiment is more the try “to learn something” in the definition than a well-designed test “done in order to learn something or to discover if something works or is true.” This is also framed in my ongoing wrestling with the conference experience that is (to quote myself) overly “presentationally oriented.” Compound this […] ➡
- 2018
- 2017
- WP-Dimension Theme… Now With Pages Back in February I wrote of converting an HTML5up static template to a WordPress theme I call WP-Dimension. This was also a first run at putting theme settings inside the WordPress Customizer. I run the static site for my own purposes at http://cog.dog (I still love my domain), but the WordPress version comes in handy […] ➡
- 2016
- The Moon Cannot Hide I owe this photo to a tweet that got me outside last night with my camera So you should enjoy this delicious cocktail and/or meteorological event while you can https://t.co/2gLznnjvmi — Dan Cohen (@dancohen) June 19, 2016 I learned in the process that a June full moon is known as a Strawberry Moon (not for […] ➡
- #UDGAgora: Open as in Taco For the second year iteration of our UDGAgora work with faculty from the University of Guadalajara, the schedule moved to the second day a presentation on openness Brian Lamb and had done in 2015 later in the week. Since 2003 Brian and I have done enough presentations together that we cannot remember them all, but […] ➡
- 2014
- A Thought Vectors Comment Aggregator Just in case you have not had your fill of the previous two code dumps for the workings of the VCU Thought Vectors site… heres more. I can’t stop tinkering. Last weekend Jon Becker emailed and asked if there was “an easy way” to mix together all of the RSS feeds from his students blog […] ➡
- 2013
- Reader’s End is Near cc licensed ( BY ) flickr photo shared by futureatlas.com And there is will go soon, beloved Google Reader, something I have used on a daily basis since… the dawn of it’s time (2006, the Cambrian Internet era, when many crawled from the sea and learned to walk the web). It rescued me from the […] ➡
- 2012
- Speak into the Silophone cc licensed ( BY ) flickr photo shared by cogdogblog If you get to hang around Grant Potter on a mission of discovery, then you are in for a good day. Today we ventured down to the Montreal water front to find this project he came across called the Silophone: Silophone is a project by […] ➡
- Go Tom Go cc licensed ( BY ) flickr photo shared by cogdogblog Jumping into the ds106 audio, assignments, I wanted to take on ones that had few takers so far- and I remain stumped why Suess It was not given some ds106 attention: Take a Dr. Suess book, or perhaps the Berenstain Bears, or one of your […] ➡
- 2011
- There’s Open and then there is Inviting Being open and supporting openness is one thing. You make the step to leave the door open, letting the outside come in, ro maybe just let them see inside your living room. But it also can feel like FoD Syndrome (Field of Dreams), if you Open it They Will Come. But it’s another whole level […] ➡
- Dr. O ds106 is going to a new level of meta-ness, as unleashed live this morning on ds106.tv. It was here, that the teacher, Dr. O’Blivion, made his first class address, in the medium form which he will only communicate- TV. His TA, Jim Groom, will be the conduit to the teacher for students and class participants. […] ➡
- 2010
- Dad’s Here I’ve not been able to directly say Happy Father’s Day since 2001; that year I think I was on the road in Australia and he was home in Florida hanging out with cancer, before passing away in August. I had brought him  an Aussie belt cc licensed flickr photo shared by cogdogblog My mom ended […] ➡
- 2009
- Social Media Recap from NMC 2009 Since it is already a week in the rear view mirror, this ought to be my last post about the 2009 NMC Summer Conference. Heck, it’s time to start thinking about 2010. However I wanted to record, primarily for my own sake, while fresh in my mind a recap of the social media tools we […] ➡
- Shining Up CoolIris For ED-MEDIA In two days will be lifting off from Phoenix towards Honolulu for the 2009 ED-MEDIA conference which means I have 48 hours of presentation prep (actually more since I don’t present til Wednesday). I am doing another spin of 50+ Web 2.0 Ways to Tell a Story again using hand coded RSS and CoolIris to […] ➡
- 2008
- Don’t Cry When Social Media Flops, Just Move On The subtitle might be, “Curse You Twitter For Letting Me Down”. Or much worse than, “curse you”. But actually, its more of a shrug. As much as I like poking fun at flickr’s flakiness, it does not cause me loss of sleep or hair, as pretty much it is not truly essential to me work/life. […] ➡
- No Blog No Read No Blog No Read by cogdogblog posted 20 Jun ’08, 9.11am MDT PST on flickr With travel and being busy at the 2008 NMC Summer Conference, my blog posting sputtered off between June 7 and 14 with no posts, and my stats show the consequences. Interesting as there is lag in readership? Peak was on […] ➡
- 2007
- Tweet of the Day Tweet of the Day posted 20 Jun ’07, 3.56pm MDT PST on flickr I think this is worthy of a t-shirt, an award, a bumper sticker, a cartoon, a short story… Linktribution to Rob Wall Let’s take a vote. I vote for… “shunned”. My mom is not on facebook! Share this barking on social media ➡
- And Here I Was Worried About Having Too Many Blogs At one time I bemoaned a future of having multiple blogs to spread my self around. That was so 1.0. I have two personal ones (one just for running or complaining about it), three ones at NMC for various projects, plus our main drupal site which has blog like writing duties, plus others I am […] ➡
- 2006
- Interview With Dr Microphone Last week I had the pleasure of getting a lesson in Audio Recording and Microphones 101 from Gardner Campbell. Thanks Dr Glu for spending some time to clue me in, this was purely selfish on my knowledge seeking side, but I am sharing the audio recording for anyone who cares. http://cogdogblog.com/wp-content/audio/dr-microphone.mp3 [35:19 min, 24.3 mp3] […] ➡
- 2005
- A Long Way From Kuli’ou’ou flickr foto The Topavailable on my flickr The end of the Kuli’ou’ou Ridge Trail marked by this sign, about 1700 feet higher than our starting point. The view behind it which should be the shoreline is masked by clouds. The rain really started coming down hard on the way back down. Here I am back […] ➡
- Moodly Stuff Since I am on the extreme margin of involvement of course management systems at Maricopa, I’ve not intensively followed the latest CMS stuff, but hear that Sakai is bubbling and there is even more spots of interest on the adoption of Moodle. Leon at Y.uk? emailed about 2 new Moodle articles on his blog, “Innovative […] ➡
- Media Literacy- Who Needs It? (NMC Conference) A bit of back blogging from the opening plenary at the NMC 2005 Summer Conference, where for the second year in a row, Henry Jenkins provided a provocative and engaging opening session, this time: “Media Literacy ““ Who Needs It?!!” Henry Jenkins, Massachusetts Institute of Technology Much of the core thinking shaping media literacy education […] ➡
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.