“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 January 6th
- 2025
- The Lazy Bloggers Post Generator (16 years later) (plus crappy AI image) Holy crap! I just remembered I have not updated this since last month… You would not believe I spend all my time in front of a computer. Apologies to my regular readers! Even the little blue ones!. I am so busy with only your readership as life preserver, being distracted by the shiny, just generally […]
- 2022
- Jessica Can Read! I’m old enough to remember when there was no such thing as email spam. For my first few web years I sprayed my work email address on every web page I created. But those days are gone. The blog spam floods of casinos and various body supplements trying to insert their links into comments has […]
- Positively Negative This is how it’s gonna be. On Tuesday morning, I got really really tired, so tired I had to lay down. I am not a napper in any way. I may have sacked out 2 or 3 hours on the couch. I thought maybe it was from several up and down incidents the night before […]
- 2021
- Just In Time Fix for Old Jalopy Web Site of Five Card Flickr Stories I knew the old car’s engine needed work, but I kept putting it off. Yes, there was advanced word that Reclaim Hosting would be making PHP 7.x the default for all sites, and that support for older versions of PHP would go away. I knew this was an issue for one of mine, the Five […]
- 2020
- Signifying the WayBack Links I cannot give enough thanks for the Internet Archive WayBack Machine. I should give money, but instead I offer a blog post. And that’s a thing when I am looking to use or refer to an old post here- more often than not, many to most if not all the links are broken. Some days […]
- 2016
- Brief Moment of MySQL Self High Fiving You gotta celebrate the small things, right? Self high-fiving for figuring out MySQL query to delete 16,000 un-needed categories from the ds106 site. — Alan Levine (@cogdog) January 6, 2016 What I will detail may likely benefit no one else beyond me should I ever lose my notes. But, writing about the process is… well […]
- Getting Ready for Getting Ready for Western106 This web site is starting to shape up. Today we got in place all the pages, many of them placeholders, for Western 106.
- 2015
- Finding The Lost Deaddrop Two and a half years ago at the 2012 Northern Voice Conference, Giulia Forsythe, Zack Dowell, and I took our presentation into an alley behind the W venue. In the rain, we cemented a USB thumb drive (which the participants had added files via a Piratebox before we went outside) into the crevice of a […]
- Strap on Your Doggles. The YouShow Engine is Revving Up. Google Glass is so 2014. Get with the program. Next week begins the second half of my TRU Open Scholar Fellowship with much of the next two months devoted to an eight week open seminar I am doing with Brian Lamb. The throttle is open though I am not sure we checked the Fuel Tank. […]
- 2014
- Cubomania Moi cc licensed ( BY SA ) flickr photo shared by Alan Levine Today’s ds106 Daily Create comes from Wikipedia’s page on surrealistic techniques: “Create a Self Portrait Cubomania Style — Cubomania is a surrealist method of making collages in which a picture or image is cut into squares and the squares are then reassembled without […]
- Time for My Own Story of Openness Oops, I managed to write this and did not publish. And I say I never save drafts when blogging. Never say Mever! It’s been a while since I added anything new to my True Stories of Openness site. The stuff happens all the time (and not just to me), but lacking some event where I […]
- So it shall be written. So it shall be done. In the house of CogDogBlog, most blog posts are written in the moment; no draft and reviews, just… splat. But this one has been bouncing around; it seems petty, whiny, un-necessary. Yet it keeps grinding away in my gut. Let’s see what happens. Countless are the times I watched the epic Cecille B. DeMille production […]
- 2013
- 2012
- Thinking on Photos With more people getting into doing Daily Photo projects, and the soon to be official launch of a related DailyCreate site for ds106, I am reflecting back on why this matters to me, now pretty much into my 5th year of trying to take/post at least one photo per day I cannot fully explain it, […]
- C’mon Down to Mary’s cc licensed (BY) flickr photo shared by cogdogblog It ain’t her past and it ain’t that Mary we are talkin about, It’s Mary who works night shift at the "1I Dine In" you know, uh, the one by Beavertail highway and the 357. Yeah, looks like the side was hit by a 2 ton pickup […]
- 2009
- Office Rewire The New Office Backbone by cogdogblog posted 6 Jan ’09, 11.11pm MST PST on flickr Last night I re-wired my home network with a new Apple Airport Extreme — an 802.11n speed network hub, it is then hard wired to my older Airport (left) which serves the premises 802.11b/g speeds for the iPhone and guests […]
- Blogrolls and Mullets What do they have in common? In the past I have sported one but would not be caught dead wearing one now. There is value, however, in sharing a list of the blogs you read or subscribe to, it’s just sidebar clutter is not really the best place. On some long frequency wavelength, I remember […]
- 2008
- Blog Danger Code Level Yellow Blog Danger Code Level Yellow posted 6 Jan ’08, 10.31am MST PST on flickr Word choice on CogDogBlog has earned me a code yellow, Elevated: Tom Cruise might ask me for spare change. The Airbag Blog Advisory System was just quirky enough I had to take time and try. In these dark times you can […]
- 2004
- Dave’s Roundup at the OPML Corral: Share Yours Dave‘s got an interesting round-up at the OPML corral, “Share your OMPL”.. Yikes, another acronym! If you dig a bit deeper it comes up as Outline Processer Markup Language , now that is much more clear! Huh? Think of of it as a way to use XML to represent outline forms of content, which if […]
- Updated jClicker- web slide show template (free too!) Finally got around to some revamps to a web slide show template I’ve been rolling for a few years, the “jClicker” (little “j” is for JavaScript). We do many many photos for our many events at work, and this has been a very handy way to organize photos into a slide show format. The main […]
- Coming Soon: “ecto”, son of Kung-Log I’ve raved before about Kung-Log, Adriaan Tijsseling’s amazingly sleek Mac OXS application for doing just about all the MovableType composing and editing. Change is on the way and it is good- Adriaan is at work on a new version, re-named “ecto”. In fact, I am “ecto”-ing this entry now in beta version 0.1.5, and it […]
- Ari’s Big List of Blog Search Engines Ari Paparo assembled a longer than you might expected list of web search tools for specifically searching weblogs and/or RSS feeds. My new theory on blogging is that whenever I can’t find a particular piece of information on Google I should just create it myself. What’s the point of all this easy-to-use publishing technology if […]
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 January 6th
- 2025
- 2022
- Jessica Can Read! I’m old enough to remember when there was no such thing as email spam. For my first few web years I sprayed my work email address on every web page I created. But those days are gone. The blog spam floods of casinos and various body supplements trying to insert their links into comments has […] ➡
- Positively Negative This is how it’s gonna be. On Tuesday morning, I got really really tired, so tired I had to lay down. I am not a napper in any way. I may have sacked out 2 or 3 hours on the couch. I thought maybe it was from several up and down incidents the night before […] ➡
- 2021
- 2020
- Signifying the WayBack Links I cannot give enough thanks for the Internet Archive WayBack Machine. I should give money, but instead I offer a blog post. And that’s a thing when I am looking to use or refer to an old post here- more often than not, many to most if not all the links are broken. Some days […] ➡
- 2016
- Brief Moment of MySQL Self High Fiving You gotta celebrate the small things, right? Self high-fiving for figuring out MySQL query to delete 16,000 un-needed categories from the ds106 site. — Alan Levine (@cogdog) January 6, 2016 What I will detail may likely benefit no one else beyond me should I ever lose my notes. But, writing about the process is… well […] ➡
- Getting Ready for Getting Ready for Western106 This web site is starting to shape up. Today we got in place all the pages, many of them placeholders, for Western 106. ➡
- 2015
- Finding The Lost Deaddrop Two and a half years ago at the 2012 Northern Voice Conference, Giulia Forsythe, Zack Dowell, and I took our presentation into an alley behind the W venue. In the rain, we cemented a USB thumb drive (which the participants had added files via a Piratebox before we went outside) into the crevice of a […] ➡
- Strap on Your Doggles. The YouShow Engine is Revving Up. Google Glass is so 2014. Get with the program. Next week begins the second half of my TRU Open Scholar Fellowship with much of the next two months devoted to an eight week open seminar I am doing with Brian Lamb. The throttle is open though I am not sure we checked the Fuel Tank. […] ➡
- 2014
- Cubomania Moi cc licensed ( BY SA ) flickr photo shared by Alan Levine Today’s ds106 Daily Create comes from Wikipedia’s page on surrealistic techniques: “Create a Self Portrait Cubomania Style — Cubomania is a surrealist method of making collages in which a picture or image is cut into squares and the squares are then reassembled without […] ➡
- Time for My Own Story of Openness Oops, I managed to write this and did not publish. And I say I never save drafts when blogging. Never say Mever! It’s been a while since I added anything new to my True Stories of Openness site. The stuff happens all the time (and not just to me), but lacking some event where I […] ➡
- So it shall be written. So it shall be done. In the house of CogDogBlog, most blog posts are written in the moment; no draft and reviews, just… splat. But this one has been bouncing around; it seems petty, whiny, un-necessary. Yet it keeps grinding away in my gut. Let’s see what happens. Countless are the times I watched the epic Cecille B. DeMille production […] ➡
- 2013
- 2012
- Thinking on Photos With more people getting into doing Daily Photo projects, and the soon to be official launch of a related DailyCreate site for ds106, I am reflecting back on why this matters to me, now pretty much into my 5th year of trying to take/post at least one photo per day I cannot fully explain it, […] ➡
- C’mon Down to Mary’s cc licensed (BY) flickr photo shared by cogdogblog It ain’t her past and it ain’t that Mary we are talkin about, It’s Mary who works night shift at the "1I Dine In" you know, uh, the one by Beavertail highway and the 357. Yeah, looks like the side was hit by a 2 ton pickup […] ➡
- 2009
- Office Rewire The New Office Backbone by cogdogblog posted 6 Jan ’09, 11.11pm MST PST on flickr Last night I re-wired my home network with a new Apple Airport Extreme — an 802.11n speed network hub, it is then hard wired to my older Airport (left) which serves the premises 802.11b/g speeds for the iPhone and guests […] ➡
- Blogrolls and Mullets What do they have in common? In the past I have sported one but would not be caught dead wearing one now. There is value, however, in sharing a list of the blogs you read or subscribe to, it’s just sidebar clutter is not really the best place. On some long frequency wavelength, I remember […] ➡
- 2008
- Blog Danger Code Level Yellow Blog Danger Code Level Yellow posted 6 Jan ’08, 10.31am MST PST on flickr Word choice on CogDogBlog has earned me a code yellow, Elevated: Tom Cruise might ask me for spare change. The Airbag Blog Advisory System was just quirky enough I had to take time and try. In these dark times you can […] ➡
- 2004
- Dave’s Roundup at the OPML Corral: Share Yours Dave‘s got an interesting round-up at the OPML corral, “Share your OMPL”.. Yikes, another acronym! If you dig a bit deeper it comes up as Outline Processer Markup Language , now that is much more clear! Huh? Think of of it as a way to use XML to represent outline forms of content, which if […] ➡
- Updated jClicker- web slide show template (free too!) Finally got around to some revamps to a web slide show template I’ve been rolling for a few years, the “jClicker” (little “j” is for JavaScript). We do many many photos for our many events at work, and this has been a very handy way to organize photos into a slide show format. The main […] ➡
- Coming Soon: “ecto”, son of Kung-Log I’ve raved before about Kung-Log, Adriaan Tijsseling’s amazingly sleek Mac OXS application for doing just about all the MovableType composing and editing. Change is on the way and it is good- Adriaan is at work on a new version, re-named “ecto”. In fact, I am “ecto”-ing this entry now in beta version 0.1.5, and it […] ➡
- Ari’s Big List of Blog Search Engines Ari Paparo assembled a longer than you might expected list of web search tools for specifically searching weblogs and/or RSS feeds. My new theory on blogging is that whenever I can’t find a particular piece of information on Google I should just create it myself. What’s the point of all this easy-to-use publishing technology if […] ➡
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.