“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 3rd
- 2022
- Making WordPress Custom User Profile Fields Editable By Admins Only This is more of my own niche technical fixes that is more interesting in that I learned a new trick, added a small feature to a WordPress site, all only because I inadvertently capitalized the header column of a CSV import. Or again, my own habit of narrating my work for what I have heard […]
- 2021
- Pearson’s Farm Whether the excuse is pandemic or not, it has been a loooooong time since the guitar has been out of the case, even longer since penning an EdTech cover tune. Without more blathering, here is a bit of crooning by Bob CC-by-an with an open education protest song This was done hastily as part of […]
- 2020
- CSS Painting Over Those Fixed Copyrights in WordPress Footers Nearly every WordPress theme since the dawn of time has in part of it’s footer template something like “©2020 Blah Blah Blah” the “Powered By WordPress” assertion, and often a theme credit link. Maybe no one pays it much attention, but it seems forced to me to have a copyright statement and then somewhere else […]
- 2019
- For a WordPress Content Type Wondering About It’s Taxonomy Here, like Tom does well, I am just noting some code thinking in case it gets fuzzy later. Maybe this is an edge case that almost no one will face. A project I am working on now has custom post types I inject via the handy plugin. As it turns out, maybe for the theme […]
- 2018
- 1 x 9 x 25: At a Distance From way out here to there, here is my first every participating in a 9x9x25 blogging “thing” via the one being run at Ontario Extend led by Terry Greene. I may easily use up my 25 sentences introducing it 😉 As explained in one of the posts about this effort to network/connect educators: We want […]
- Shining Up Some SPLOTs It was sure nice to see the way one of the SPLOTs hatched in 2014 is being used at Coventry University: The Compendium Of Bothersome Beasties: A SPLOT for student self reflection and formative feedback [18-162] Samantha Clarke, Lauren Heywood et al. #altc https://t.co/pixXVEoKqs — ALT – alt.ac.uk (@A_L_T) October 2, 2018 When I can […]
- 2017
- #NetNarr at DML, where it started… Almost a year ago Mia Zamora and I got very excited about the idea for a class we would co-teach in the spring. The rest was is Alchemy. I’m headed back to Irvine, California for the 2017 DML Conference where I will get to share that alchemy (sadly Mia is not able to attend in […]
- 2014
- Even in the Future, I Find Myself Behind creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog Finally a chance to relax a bit. I’ve been in New Zealand a week, it feels like a month, and it’s been more than wonderful. This pup, Kay, belongs to my host and handler, Richard, and vies for the Best Dog I Have Ever […]
- 2013
- Taking Jim Groom to the New ds106 Assignment Bank I grossly, grandly, and greatly underestimated the development of a WordPress theme for a customizable version of the ds106 assignment bank — I want it to be very flexible, and am finding the creation of the admin screens for configuring it to be more complex than I expected. Jim and I had planned a session […]
- Keep on Designing! I’m overloaded! I can’t keep up in ds106! That does not matter because so many other people are cranking out the design work. But for a recent blog post I got it my head to make a redo of the classic 1970′s image for “Keep on Truckin’” Which turned out rather nicely with maybe 30 […]
- Keep On Reclaimin’ Open Learning It was truly rewarding last week to travel to Los Angeles and represent with Martha Burtis, the legion of ds106 at the Digital Media and Learning Research Hub Reclaim Open Learning Symposium. We were being recognized as one of five top examples of “organizations that are transforming higher education toward connected and creative learning, open […]
- 2012
- Making Text Work With Your ds106 Design Work, Not Against it Another problem with taking the quick short cut route of doing ds106 assignments is generally the text tools are limited to slapping text on top of photos. I am seeing a number of the early work my students are doing is that are not really looking at how the text interacts with their design. If […]
- why you should not be using one-off apps/sites for ds106 cc licensed ( BY NC SD ) flickr photo shared by Pete Prodoehl I truly love the evolution and use of the ds106 assignment collection – we have almost 100 assignments to choose from each in the Visual and Design sections, all of them created by ds106 participants, and even rated by them for difficulty. […]
- 2009
- Feed2JS Source Moved to Google Code I am at the same time honored and deeply scared that a lot of people use my Feed2JS tool created like in 2003 or 2004 for helping people embed RSS feeds in their site using cut and paste JavaScript. If my stats are right, in the 6 hours since the cache was cleaned out (daily), […]
- 2008
- Slow Blogging on the Fast Train In person, in reading, I’ve long been enamored ofBarbara Ganley‘s concept of “slow blogging” — rather than dashing off quarter-baked, unstructured stream of consciousness blogging, she suggests taking time to reflect, to actually re-read and revise in the blogging process. Barbara’s own lyrical writings, flowing like one of her tranquil Vermont creeks through red maple […]
- 2007
- One Tool Short of Fifty I am done. I cannot do any more tools. I have now completed the 49th version of my Dominoe Story in 49 different web creation tools. Actually, there are 7 tools left in the trash bin that were buggy or just not worth the time. What started out as a half-thought idea in July grew […]
- 2005
- Ferreting Out Spamvertisers It’s been a while since I’ve gotten riled up by blog comment spam roaches, especially true since SpamKarma is doing a real bang up job of stopping them before they get far into my WordPress site. But wow.’. check out Tom Coates’ PlasticBag post On Cillit Bang and a new low for marketers…, a detailed […]
- 2004
- Is Flickr Flickering? Gerry caught me on iChat tonight and let me know he was having trouble reaching Flickr— he’s right! What’s happening? And it looks like they are based in Vancouver… Did Mount St. Helens blow a big cork and blast it north? I hope not! Maybe flickr is just flickering. Share this barking on social media
- Interview by iChat My editor was pressuring me. I had stalled on my next technology article for the Fall 2004 issue of our publication, the mcli Forum. I had waited too long to do interviews with some faculty (there are some coo, things some folks are doing with teaching GPS… maybe in the Spring…) What would I do? […]
- Spam’s Quiet on the Western Front I hope this is the last on MLX spam for a while. I’d rather be writing code for adding features to it than trying to fortify the moat. And I guess my finger pointing at domain registrars was off base as pointed out by some comments earlier today. Somebody out there must be responsible. My […]
- Spam: The International Game of Intrigue and Mystery Our hourly comment spam assaults on the Maricopa Learning eXchange ceased around 10:00pm local time yesterday. My best guest is that the spammers mommy finnaly told him/her it was time to shut fof the computer, brush their teeth, and off to bed. Likely, after a bowl or two of Cocoa Puffs this morning, they will […]
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 3rd
- 2022
- 2021
- Pearson’s Farm Whether the excuse is pandemic or not, it has been a loooooong time since the guitar has been out of the case, even longer since penning an EdTech cover tune. Without more blathering, here is a bit of crooning by Bob CC-by-an with an open education protest song This was done hastily as part of […] ➡
- 2020
- CSS Painting Over Those Fixed Copyrights in WordPress Footers Nearly every WordPress theme since the dawn of time has in part of it’s footer template something like “©2020 Blah Blah Blah” the “Powered By WordPress” assertion, and often a theme credit link. Maybe no one pays it much attention, but it seems forced to me to have a copyright statement and then somewhere else […] ➡
- 2019
- 2018
- 1 x 9 x 25: At a Distance From way out here to there, here is my first every participating in a 9x9x25 blogging “thing” via the one being run at Ontario Extend led by Terry Greene. I may easily use up my 25 sentences introducing it 😉 As explained in one of the posts about this effort to network/connect educators: We want […] ➡
- Shining Up Some SPLOTs It was sure nice to see the way one of the SPLOTs hatched in 2014 is being used at Coventry University: The Compendium Of Bothersome Beasties: A SPLOT for student self reflection and formative feedback [18-162] Samantha Clarke, Lauren Heywood et al. #altc https://t.co/pixXVEoKqs — ALT – alt.ac.uk (@A_L_T) October 2, 2018 When I can […] ➡
- 2017
- #NetNarr at DML, where it started… Almost a year ago Mia Zamora and I got very excited about the idea for a class we would co-teach in the spring. The rest was is Alchemy. I’m headed back to Irvine, California for the 2017 DML Conference where I will get to share that alchemy (sadly Mia is not able to attend in […] ➡
- 2014
- Even in the Future, I Find Myself Behind creative commons licensed ( BY-SA ) flickr photo shared by cogdogblog Finally a chance to relax a bit. I’ve been in New Zealand a week, it feels like a month, and it’s been more than wonderful. This pup, Kay, belongs to my host and handler, Richard, and vies for the Best Dog I Have Ever […] ➡
- 2013
- Taking Jim Groom to the New ds106 Assignment Bank I grossly, grandly, and greatly underestimated the development of a WordPress theme for a customizable version of the ds106 assignment bank — I want it to be very flexible, and am finding the creation of the admin screens for configuring it to be more complex than I expected. Jim and I had planned a session […] ➡
- Keep on Designing! I’m overloaded! I can’t keep up in ds106! That does not matter because so many other people are cranking out the design work. But for a recent blog post I got it my head to make a redo of the classic 1970′s image for “Keep on Truckin’” Which turned out rather nicely with maybe 30 […] ➡
- Keep On Reclaimin’ Open Learning It was truly rewarding last week to travel to Los Angeles and represent with Martha Burtis, the legion of ds106 at the Digital Media and Learning Research Hub Reclaim Open Learning Symposium. We were being recognized as one of five top examples of “organizations that are transforming higher education toward connected and creative learning, open […] ➡
- 2012
- Making Text Work With Your ds106 Design Work, Not Against it Another problem with taking the quick short cut route of doing ds106 assignments is generally the text tools are limited to slapping text on top of photos. I am seeing a number of the early work my students are doing is that are not really looking at how the text interacts with their design. If […] ➡
- why you should not be using one-off apps/sites for ds106 cc licensed ( BY NC SD ) flickr photo shared by Pete Prodoehl I truly love the evolution and use of the ds106 assignment collection – we have almost 100 assignments to choose from each in the Visual and Design sections, all of them created by ds106 participants, and even rated by them for difficulty. […] ➡
- 2009
- Feed2JS Source Moved to Google Code I am at the same time honored and deeply scared that a lot of people use my Feed2JS tool created like in 2003 or 2004 for helping people embed RSS feeds in their site using cut and paste JavaScript. If my stats are right, in the 6 hours since the cache was cleaned out (daily), […] ➡
- 2008
- Slow Blogging on the Fast Train In person, in reading, I’ve long been enamored ofBarbara Ganley‘s concept of “slow blogging” — rather than dashing off quarter-baked, unstructured stream of consciousness blogging, she suggests taking time to reflect, to actually re-read and revise in the blogging process. Barbara’s own lyrical writings, flowing like one of her tranquil Vermont creeks through red maple […] ➡
- 2007
- One Tool Short of Fifty I am done. I cannot do any more tools. I have now completed the 49th version of my Dominoe Story in 49 different web creation tools. Actually, there are 7 tools left in the trash bin that were buggy or just not worth the time. What started out as a half-thought idea in July grew […] ➡
- 2005
- Ferreting Out Spamvertisers It’s been a while since I’ve gotten riled up by blog comment spam roaches, especially true since SpamKarma is doing a real bang up job of stopping them before they get far into my WordPress site. But wow.’. check out Tom Coates’ PlasticBag post On Cillit Bang and a new low for marketers…, a detailed […] ➡
- 2004
- Is Flickr Flickering? Gerry caught me on iChat tonight and let me know he was having trouble reaching Flickr— he’s right! What’s happening? And it looks like they are based in Vancouver… Did Mount St. Helens blow a big cork and blast it north? I hope not! Maybe flickr is just flickering. Share this barking on social media ➡
- Interview by iChat My editor was pressuring me. I had stalled on my next technology article for the Fall 2004 issue of our publication, the mcli Forum. I had waited too long to do interviews with some faculty (there are some coo, things some folks are doing with teaching GPS… maybe in the Spring…) What would I do? […] ➡
- Spam’s Quiet on the Western Front I hope this is the last on MLX spam for a while. I’d rather be writing code for adding features to it than trying to fortify the moat. And I guess my finger pointing at domain registrars was off base as pointed out by some comments earlier today. Somebody out there must be responsible. My […] ➡
- Spam: The International Game of Intrigue and Mystery Our hourly comment spam assaults on the Maricopa Learning eXchange ceased around 10:00pm local time yesterday. My best guest is that the spammers mommy finnaly told him/her it was time to shut fof the computer, brush their teeth, and off to bed. Likely, after a bowl or two of Cocoa Puffs this morning, they will […] ➡
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