Just rolled a new feature into the Daily Blank WordPress theme that’s been on my whiteboard list for a few months (speaking of that, where is my whiteboard?).

Note: I just found this post sitting in my drafts, written like 5 months ago. Oops.

This is the theme built for sites like the DS106 Daily Create for regularly published challenges that people respond to via twitter. I’ve used it for several projects like the UDG Agora Daily Try, the UDG Mural Project Daily Opener, the Ontario Extend project Daily Extend, and for my last class of Networked Narratives, a Daily Digital Alchemy.

Also, Mariana Funes runs a Daily Stillness site using the theme.

Having managed all these I know two ongoing issues I could code some fixes for. One is a bit practical in that for short term project sites like the UDG Agora Daily Try, the UDG Mural Project Daily Opener, and my class ones, they are not active after a time period. There’s no reason to have these sites be knocking at twitter’s API every hour.

So there is now a “Standby Mode” in the admin options:

Standby mode activated

I have a status indicator now added as well as a date/time stamp for the last time it sent an update requests for tweets. In standby mode, you can manually push a request by the button there.

Someone has to be nice to the APIs.

The other issue is keeping track when the queue of daily activities runs dry. In these sites, each daily is a new WordPress Post, and is set to be scheduled 24 days in the future after the last one in the queue. How do you know when the supply is low? I do have a dashboard admin widget; here is what admins of the DS106 Daily Create see when logged in:

They have 42 in the queue, so it’s no problem – we have Sarah, Niall, and Bill G in there tending to the daily creates, they must have that new site manager eagerness thing going. I usually tried to stay a week ahead of hitting Empty.

I lapsed a few times in the Daily Digital Alchemy where I was lucky to have a feature named @dogtrax (thanks Kevin!)

Always helpful to have a watchdog.

I’ve had this idea for a while, coded it a few days ago, and have been testing. It’s a theme option where you can designate how low a supply of dailies will trigger a warning, and when it hits that level, that it should email accounts listed in the options too.

The site already uses <a href="https://codex.wordpress.org/Function_Reference/wp_schedule_event">wp_schedule_event</a> to trigger it once an hour to check twitter’s API for new tweets. It’s a WordPress hook into the servers’s cron tool. I modified by call to the action so it will not trigger if standby mode is on:

This sets up the scheduler to go, and once the hour mark has passed, it hits an action which then calls a function to look for replies to the site’s twitter account:

I was able to also use <a href="https://codex.wordpress.org/Function_Reference/wp_schedule_event">wp_schedule_event</a> to set up a once a day event, this time, I am telling WordPress to run it two hours after the time each day it publishes a new daily:

The action triggered for this, should, each day, send an email to specified people if the supply of scheduled posts (dailies) is below the threshold specified in the options (I have a range of 1,2,3,4,5,6,7 days as options)

So far, on about 5 sites testing, it seems to be working well. Of course those folks piling up 42 in the queue may never need the low supply warning.

I’m happy to cross this one off my whiteboard (when I find it)– it’s heading to the Github repo soon.

This is one of my favorite duct taped themes- it has some nifty tricks for dealing with scheduling, hitting and parsing the twitter API. I don’t see much uptake beyond a few others on making a Daily ____ site (most are mine), yet I think, beyond the techness (which is enough to drive most people away), it’s one of my favorite teaching/PD tools, having people do low stake challenges on a regular basis.


Featured Image: Pixabay fuel gauge image by PublicDomainPictures shared into the public domain using Creative Commons CC0 combined with Noun Project icon daily calendar by Linseed Studio licensed under Creative Commons CC BY.

If this kind of stuff has value, please support me by tossing a one time PayPal kibble or monthly on Patreon
Become a patron at Patreon!
Profile Picture for CogDog The Blog
An early 90s builder of web stuff and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person. And he is 100% into the Fediverse (or tells himself so) Tooting as @cogdog@cosocial.ca

Leave a Reply

Your email address will not be published. Required fields are marked *