“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 February 15th
- 2018
- Just Missed the Dust Biting Video by One Day: Wikispaces Poops the Web With a big thud another well used educator web site not only bites the dust but totally poops the web. Just after publishing the newest version of Another Web Bites the Dust, the first tweet in my mention us this: Next update: Wikispaces 🙁#edTech— Ismael Peña-López (@ictlogist) February 14, 2018 No, not Wikispaces! I’ve used […]
- 2017
- TRU Writer SPLOT: Activate! for 30,000,000 ACA Stories Is it just me or are people in the US (and Britain, and France, and… well everywhere) just more on edge lately? Sleeping less / worrying more? I know it’s just not me. Of all the things the new administration in the US is doing (and the list grows with every whacko tweet), the idea […]
- 2016
- Your Face. My Photo. Your Avatar. My Happy. It’s quite a nice thing to find out when someone uses one of my photos of them as their twitter, or Facebook images, or in a blog header. I started trying to keep track of them in a flickr set, only to vainly bleat out my own thin ego brag *(ha)*. Of course, some change […]
- The Puzzle: Shoving That Featured Image Inside Your RSS Feed Much puzzlement happens in setting up syndicated hub web sites with Feed WordPress, and one of the main tripping points is dealing with featured images. In many modern WordPress themes, these are what are used to generate those nice pretty front pages of sites, where each post is represented by a photo/image, or used to […]
- 2015
- 2013
- Fire Needs Some Lighting The excuses for not playing this week are worn thin. While lighting my wood stove, it did not take much of a leap to hear “Light My Fire” in my head, but maybe a more bluesy acoustic version. None of the tabs I found felt right, so I startet varying some of the chords. I […]
- Seeding ds106 Connections with Comment Groups cc licensed ( BY NC ND ) flickr photo shared by MyDigitalSLR In what I’d call the semi-porous community (because we have people outside the class who can and do provide feedback to students) of my ds106 class at University of Mary Washington, nurturing a healthy amount of commenting has typically been a struggle against […]
- 2012
- Remixes Emerge From the StoryBox The future of the StoryBox is subject for a new post. Let’s say my new approach is to find ways to release the content by making it available for people to create remixed new works out of the pieces. The original media shall remain in the box, in the time capsule, but can be released […]
- 2008
- Spontaneous Ustream Twitter IM Circus My oft repeated line this year is something about most enjoying the net based things that happen totally without provocation, plan, just spontaneous connectedness. I am sure that its maybe 3% of the general population that can really experience this with wide eyed excited wonder, and I am fortunate to know some of the best […]
- 2007
- Pointless, Incessant Barking I found a new cartoon tag line for this blog, on the front page at Live in the Deliirious Cool (no idea what the site is)… I’ll let them bear the brunt of re-use of a published newspaper cartoon. There are two dogs talking, one says, “I had my own blog for a while, but […]
- Eight Months To Polish Up My “G’day, Mate” The plans are just in the draft stage, but I’ve gotten an awesome invitation from the Australian Flexible Learning Network to do a speaking tour of the Australia capitol capital cities in October 2007. In this case, I’d be having to fill some rather large, chocolate filled shoes, as this year’s speaker for the series […]
- Pimp Up Your WordPress Guru Status- Trimming Those Long Titled Posts with Slugs Here is a cheap but useful trick for you WordPress bloggers- don’t sap your readers with 10 mile long URLs. If you use the Permalink option to publish your posts based on the date, time, generally it turns a long title blog post like above into something horrible like: http://cogdogblog.com/2007/02/14/pimp-up-your-wordpress-guru -status-trimming-those-long-title-posts-with-slugs That is butt ugly […]
- 2006
- Narrowing On Social Software flickr foto Better than RSS! Better Then AJAX!available on my flickr Harry was working on some new internet buzzwords this morning. Later today, I hope to be learning more about GHOS, Mady, and JiLT. Looks like some HTMl tags floating around the table too. I’ve been just as guilty of doing Social Software / Web […]
- 2005
- Another Novel Use for A Blog Yet another exmaple to show that weblogs can be more than just a place for teen diaries and cat fetishes, Steven Cohen has hoisted a presentation into Blogger format- see “Staying Ahead of Your Patrons With Weblogs and RSS”. Is it anything different than a garden variety PowerPoint slide show? No, not in terms of […]
- 2004
- MLX Happenings I am behind in citing a package of the week, but some of the freshest include: Let Excel Track Your Attendance for You!!, SCC Online Weather Station, Online Learning: What Students Should Know, and Nutrition Learning Exercise. A few interesting things shaking out over at the Maricopa Learning eXchange. A faculty member who coordinates service […]
- One Week into Online Teaching Today was the deadline for the first week’s assignments in the online “Web-Based Teaching and Learning” course I am co-teaching. Just like students, the assignments are coming in with deadline skidmarks, but they are coming in, We had nearly 100 messages in the welcome/ intros and some good discussion about principles of online learning. Share […]
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 February 15th
- 2018
- Just Missed the Dust Biting Video by One Day: Wikispaces Poops the Web With a big thud another well used educator web site not only bites the dust but totally poops the web. Just after publishing the newest version of Another Web Bites the Dust, the first tweet in my mention us this: Next update: Wikispaces 🙁#edTech — Ismael Peña-López (@ictlogist) February 14, 2018 No, not Wikispaces! I’ve […] ➡
- 2017
- TRU Writer SPLOT: Activate! for 30,000,000 ACA Stories Is it just me or are people in the US (and Britain, and France, and… well everywhere) just more on edge lately? Sleeping less / worrying more? I know it’s just not me. Of all the things the new administration in the US is doing (and the list grows with every whacko tweet), the idea […] ➡
- 2016
- Your Face. My Photo. Your Avatar. My Happy. It’s quite a nice thing to find out when someone uses one of my photos of them as their twitter, or Facebook images, or in a blog header. I started trying to keep track of them in a flickr set, only to vainly bleat out my own thin ego brag *(ha)*. Of course, some change […] ➡
- The Puzzle: Shoving That Featured Image Inside Your RSS Feed Much puzzlement happens in setting up syndicated hub web sites with Feed WordPress, and one of the main tripping points is dealing with featured images. In many modern WordPress themes, these are what are used to generate those nice pretty front pages of sites, where each post is represented by a photo/image, or used to […] ➡
- 2015
- 2013
- Fire Needs Some Lighting The excuses for not playing this week are worn thin. While lighting my wood stove, it did not take much of a leap to hear “Light My Fire” in my head, but maybe a more bluesy acoustic version. None of the tabs I found felt right, so I startet varying some of the chords. I […]
➡ - Seeding ds106 Connections with Comment Groups cc licensed ( BY NC ND ) flickr photo shared by MyDigitalSLR In what I’d call the semi-porous community (because we have people outside the class who can and do provide feedback to students) of my ds106 class at University of Mary Washington, nurturing a healthy amount of commenting has typically been a struggle against […] ➡
- 2012
- Remixes Emerge From the StoryBox The future of the StoryBox is subject for a new post. Let’s say my new approach is to find ways to release the content by making it available for people to create remixed new works out of the pieces. The original media shall remain in the box, in the time capsule, but can be released […] ➡
- 2008
- Spontaneous Ustream Twitter IM Circus My oft repeated line this year is something about most enjoying the net based things that happen totally without provocation, plan, just spontaneous connectedness. I am sure that its maybe 3% of the general population that can really experience this with wide eyed excited wonder, and I am fortunate to know some of the best […] ➡
- 2007
- Pointless, Incessant Barking I found a new cartoon tag line for this blog, on the front page at Live in the Deliirious Cool (no idea what the site is)… I’ll let them bear the brunt of re-use of a published newspaper cartoon. There are two dogs talking, one says, “I had my own blog for a while, but […] ➡
- Eight Months To Polish Up My “G’day, Mate” The plans are just in the draft stage, but I’ve gotten an awesome invitation from the Australian Flexible Learning Network to do a speaking tour of the Australia capitol capital cities in October 2007. In this case, I’d be having to fill some rather large, chocolate filled shoes, as this year’s speaker for the series […] ➡
- Pimp Up Your WordPress Guru Status- Trimming Those Long Titled Posts with Slugs Here is a cheap but useful trick for you WordPress bloggers- don’t sap your readers with 10 mile long URLs. If you use the Permalink option to publish your posts based on the date, time, generally it turns a long title blog post like above into something horrible like: http://cogdogblog.com/2007/02/14/pimp-up-your-wordpress-guru -status-trimming-those-long-title-posts-with-slugs That is butt ugly […] ➡
- 2006
- Narrowing On Social Software flickr foto Better than RSS! Better Then AJAX!available on my flickr Harry was working on some new internet buzzwords this morning. Later today, I hope to be learning more about GHOS, Mady, and JiLT. Looks like some HTMl tags floating around the table too. I’ve been just as guilty of doing Social Software / Web […] ➡
- 2005
- Another Novel Use for A Blog Yet another exmaple to show that weblogs can be more than just a place for teen diaries and cat fetishes, Steven Cohen has hoisted a presentation into Blogger format- see “Staying Ahead of Your Patrons With Weblogs and RSS”. Is it anything different than a garden variety PowerPoint slide show? No, not in terms of […] ➡
- 2004
- MLX Happenings I am behind in citing a package of the week, but some of the freshest include: Let Excel Track Your Attendance for You!!, SCC Online Weather Station, Online Learning: What Students Should Know, and Nutrition Learning Exercise. A few interesting things shaking out over at the Maricopa Learning eXchange. A faculty member who coordinates service […] ➡
- One Week into Online Teaching Today was the deadline for the first week’s assignments in the online “Web-Based Teaching and Learning” course I am co-teaching. Just like students, the assignments are coming in with deadline skidmarks, but they are coming in, We had nearly 100 messages in the welcome/ intros and some good discussion about principles of online learning. Share […] ➡
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.