“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 19 posts previously published on January 10th
- 2024
- The ChatGPT Tablecloth Trick (don’t do it!) It’s so tempting to do. You write something or give a talk/presentation about AI and a few paragraphs/minutes in, you pull out the Big Reveal that what you read/said was generated by ChatGPT. “Woah” swoons the crowd (did not see that one coming, eh?) It’s basically this old trick (stay to the end to see […]
- 2023
- AInevitability and it’s AImpenetrableness As we must do in 2023, a disclaimer comes here that no imagery nor writing here was generated by any large language models or statistical data system. It’s all me, with my typo-prone keyboarding and propensity to make up titles. Yet, I am tempted to consult my conjured expert ChadGPT because I operate by natural […]
- 2022
- Fixing it like Fix-It Felix As many of the blog posts here blabber on about, I rather enjoying both figuring out web tech solutions thought often, given my internet- and self-taught skillset, I end of more often than not fixing my own stuff, ongoing. This happened recently after being excited to blog about my latest bookmarklet tinkering. I tend to […]
- 2021
- Podcasting. Doing it Right. Doing it Wrong. As if Binaries Exist. It’s almost like it’s 2004. There’s an exciting new thing someone portmanteau-ed as “podcasting”. Not so new, of course. I’ve been part of one with Antonio Vantaggiato that defies the meaning of frequency (it’s more or less a reason to talk to mi amigo). I’ve also started a series for my work this year as […]
- 2018
- A Door Opens on a New #NetNarr in 2018 Since Hollywood movies are bereft awash with sequels, look out open course watchers; NetNarr returns to the internet screens next week, another feed syndicated open course don’t call us a MOOC blockbuster. Last year’s course where I (Alan Levine) co-taught from afar to a class led by Mia Zamora at Kean University was one of […]
- 2017
- Who Wants to Walk Through the Strange #NetNarr Doorway? We must be off our medicine. Or on some new one. Or breathing strange vapors. Mia Zamora and I are ploughing ahead with an open connected course we call Networked Narratives with a door that opens January 16. We do have a full class of undergraduate and graduate students at Kean University who are even […]
- Hacking a WordPress Theme from HTML5up Template with some API goodies This is a hastily written description of a little mystery site I put together at http://arganee.world. The sliding images in the background are done by an HTML5up template called Eventually, but the dynamic text in the middle is done via some calls to the WordPress API via jQuery. The whole thing started when building out […]
- 2016
- Western106 Opens With Blog Riding Camp
Tomorrow (or maybe today in some parts of the world, ok January 11), is the first day of our rodeo for Western 106. What are you in for? Well let me tell ya…
- 2014
- MIght There Finally Be Karma for Comment Spammers and SEO Game Players? cc licensed ( BY SA ) flickr photo shared by Ben Brown I’ve railed for many a year about the fetid scourge of blogs, rampant bombardment of irrelevant, unwanted garbage comments laden with nefarious links, all seeking to increase google rank. Can this be turning? Should I believe in the tooth fairy who says Google […]
- 2013
- GIF Dog GIF Today’s Daily Create may have been the hardest one to date- “Use camera panning to blur the background behind a moving subject” – the idea is to use a relatively slow shutter speed to take a photo of a moving subject. If you pan the camera at about the same speed as the subject, you […]
- Building A Class Sized Syndication Bus cc licensed ( BY NC ) flickr photo shared by Thomas Hawk The “syndication bus” is the Groomian term for the use of RSS aggregation technology that allows a class/community to run as both a hub and a decentralized network of blogs- individuals publish in their own space. The class or central site exists to […]
- 2012
- #4LIFER cc licensed (BY) flickr photo shared by cogdogblog Yeah, I am in it #4life and will continue to speak into the ds106radio microphone. Who wants any other sign? (Another example for the ds106 Cropped Sign Assignment) Original sign read "Life Ring" Share this barking on social media
- 2009
- This Duck Does not say “Aflac”… Don’t ask what I was looking for, but in rummaging through some tagged links, I ended up laughing at this duck: coming from the LOL Diabetes site. LOLCats ain’t nothing compared to one sporting an insulin pump. Duck it all. File this one also in the “there is a web niche for everything” department. Side […]
- Seven Things Not Worth Knowing About Me Damn. I thought if I kept my head down low enough, I’d avoid being tagged by the “Seven things you don’t know about me” meme. My plan was working perfectly, and out of nowhere, whap! Rob Wall smacks me. Seriously, if there is such a thing around this blog taken as serious– I enjoy reading […]
- 2008
- Does Fact Checking Get Tossed with New Scholarship? The Chronicle Thinks So It’s been almost a month since I blogged about the Chronicle of Higher Education, the “flagship” of the ivory tower had published on their web site misinformation that it had scooped from some other blog sites on a story about the 2007 NMC Horizon Report. The Chronicle wrote on December 17 that the 2007 report […]
- 2006
- I Am A Certified CSS Idiot I am headed back to <font>…</font> and <blink>…</blink> tags (not). I am almost too embarrassed to admit this, but thanks to an email from Keith K, it was pointed out the CSS class names used by Feed2JS are not exactly W3C valid since they use underscores (e.g. .rss_box) and this may/will cause display problems in […]
- All Your Old Jade Links Are Mine The conversion is complete. With one line of text, I have preserved every old link, every RSS feed, under the former URL/host for this blog from the old cogdogblog.com/.... to the exact same links here at the new home at cogdogblog.com/.../. Oi, that also means the spam will come here too. And the poker folks […]
- 2005
- Tags on delicious flickring Steroids: Taggregator Last week it was Tags on Speed. That was then, this is now… Richard S writes “More on Social tags” pointing to “taggregator” an experiment with allows you to provide one “tag” and it generates a side by side view of del.icoi.us and flickr results: Someone built a thing I wanted to but didn’t — […]
- Spread That Love (and take 5 photos of it) Yup, flickr is the land of maybe more than the land of 10,000 memes, maybe it is the long tail for photographic odd-topics. Today, I got an invite to join the “spread that love” flickr group (which explains why I had to fish it out of the junk mail folder!). So here is the meme […]
and the default value, the link at the end is invisible.
On Michael’s site he might use There are 19 posts previously published on January 10th
- 2024
- The ChatGPT Tablecloth Trick (don’t do it!) It’s so tempting to do. You write something or give a talk/presentation about AI and a few paragraphs/minutes in, you pull out the Big Reveal that what you read/said was generated by ChatGPT. “Woah” swoons the crowd (did not see that one coming, eh?) It’s basically this old trick (stay to the end to see […] &#x27A1;
- 2023
- AInevitability and it’s AImpenetrableness As we must do in 2023, a disclaimer comes here that no imagery nor writing here was generated by any large language models or statistical data system. It’s all me, with my typo-prone keyboarding and propensity to make up titles. Yet, I am tempted to consult my conjured expert ChadGPT because I operate by natural […] &#x27A1;
- 2022
- Fixing it like Fix-It Felix As many of the blog posts here blabber on about, I rather enjoying both figuring out web tech solutions thought often, given my internet- and self-taught skillset, I end of more often than not fixing my own stuff, ongoing. This happened recently after being excited to blog about my latest bookmarklet tinkering. I tend to […] &#x27A1;
- 2021
- Podcasting. Doing it Right. Doing it Wrong. As if Binaries Exist. It’s almost like it’s 2004. There’s an exciting new thing someone portmanteau-ed as “podcasting”. Not so new, of course. I’ve been part of one with Antonio Vantaggiato that defies the meaning of frequency (it’s more or less a reason to talk to mi amigo). I’ve also started a series for my work this year as […] &#x27A1;
- 2018
- A Door Opens on a New #NetNarr in 2018 Since Hollywood movies are bereft awash with sequels, look out open course watchers; NetNarr returns to the internet screens next week, another feed syndicated open course don’t call us a MOOC blockbuster. Last year’s course where I (Alan Levine) co-taught from afar to a class led by Mia Zamora at Kean University was one of […] &#x27A1;
- 2017
- Who Wants to Walk Through the Strange #NetNarr Doorway? We must be off our medicine. Or on some new one. Or breathing strange vapors. Mia Zamora and I are ploughing ahead with an open connected course we call Networked Narratives with a door that opens January 16. We do have a full class of undergraduate and graduate students at Kean University who are even […] &#x27A1;
- Hacking a WordPress Theme from HTML5up Template with some API goodies This is a hastily written description of a little mystery site I put together at http://arganee.world. The sliding images in the background are done by an HTML5up template called Eventually, but the dynamic text in the middle is done via some calls to the WordPress API via jQuery. The whole thing started when building out […] &#x27A1;
- 2016
- 2014
- 2013
- GIF Dog GIF Today’s Daily Create may have been the hardest one to date- “Use camera panning to blur the background behind a moving subject” – the idea is to use a relatively slow shutter speed to take a photo of a moving subject. If you pan the camera at about the same speed as the subject, you […] &#x27A1;
- Building A Class Sized Syndication Bus cc licensed ( BY NC ) flickr photo shared by Thomas Hawk The “syndication bus” is the Groomian term for the use of RSS aggregation technology that allows a class/community to run as both a hub and a decentralized network of blogs- individuals publish in their own space. The class or central site exists to […] &#x27A1;
- 2012
- #4LIFER cc licensed (BY) flickr photo shared by cogdogblog Yeah, I am in it #4life and will continue to speak into the ds106radio microphone. Who wants any other sign? (Another example for the ds106 Cropped Sign Assignment) Original sign read "Life Ring" Share this barking on social media &#x27A1;
- 2009
- This Duck Does not say “Aflac”… Don’t ask what I was looking for, but in rummaging through some tagged links, I ended up laughing at this duck: coming from the LOL Diabetes site. LOLCats ain’t nothing compared to one sporting an insulin pump. Duck it all. File this one also in the “there is a web niche for everything” department. Side […] &#x27A1;
- Seven Things Not Worth Knowing About Me Damn. I thought if I kept my head down low enough, I’d avoid being tagged by the “Seven things you don’t know about me” meme. My plan was working perfectly, and out of nowhere, whap! Rob Wall smacks me. Seriously, if there is such a thing around this blog taken as serious– I enjoy reading […] &#x27A1;
- 2008
- 2006
- I Am A Certified CSS Idiot I am headed back to <font>…</font> and <blink>…</blink> tags (not). I am almost too embarrassed to admit this, but thanks to an email from Keith K, it was pointed out the CSS class names used by Feed2JS are not exactly W3C valid since they use underscores (e.g. .rss_box) and this may/will cause display problems in […] &#x27A1;
- All Your Old Jade Links Are Mine The conversion is complete. With one line of text, I have preserved every old link, every RSS feed, under the former URL/host for this blog from the old cogdogblog.com/.... to the exact same links here at the new home at cogdogblog.com/.../. Oi, that also means the spam will come here too. And the poker folks […] &#x27A1;
- 2005
- Tags on delicious flickring Steroids: Taggregator Last week it was Tags on Speed. That was then, this is now… Richard S writes “More on Social tags” pointing to “taggregator” an experiment with allows you to provide one “tag” and it generates a side by side view of del.icoi.us and flickr results: Someone built a thing I wanted to but didn’t — […] &#x27A1;
- Spread That Love (and take 5 photos of it) Yup, flickr is the land of maybe more than the land of 10,000 memes, maybe it is the long tail for photographic odd-topics. Today, I got an invite to join the “spread that love” flickr group (which explains why I had to fish it out of the junk mail folder!). So here is the meme […] &#x27A1;
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.