Even cats know that duct tape is useful cc licensed ( BY NC SD ) flickr photo shared by Rev. Xanatos Satanicos Bombasticos (ClintJCL) It comes in handy for PHP work on WordPress sites as well. You should know that the main internal organ that makes the magic of the ds106 site do what it […]
Woah, retro! I was contacted by someone with an innocent WordPress question, and in the confusion of email (“I don’t have that option”) it became apparent this person was running a older version of WordPress. I quickly thought migrating it would not be all that complex… Till I started. Her site is in WordPress 2.6, […]
cc licensed ( BY NC SD ) flickr photo shared by hermitsmoores This is a last little bit of code I wanted to bang out today (for more on this statement, see my next blog post). We have over 3800 examples that people have shared for the ds106 Assignment Bank. The way these get here […]
cc licensed ( BY ) flickr photo shared by psd It’s sweetly ironic that despite the almost consistent reprisal of “RSS being dead” maybe that’s in terms of outward perception. Down at the bowels of the systems of internet flow, and I see plenty of it in highly functional action via my own small corner […]
Last January, Tim Owens did a masterful job of assembling the Daily Create site out of a premium theme (Salutation), a mix of plugins (including Awesome Flickr Gallery, Tubepress, and Gravity Forms), etc– and no custom code.
When I arrived at UMW in February, I offered to take over the creation of the challenges. It is a mix of ones submitted by our site users, borrowed ones from the Daily Shoot, b3ta Challenges, the Vancouver Draw Down, and the 30 Day Drawing Challenge, plus about a good 30% we just dreamed up.
Creating them turned out to be a bit tedious as there was at least 7 different things to set on the interface. We had to have them, scheduled in advance, each to be published at 10:00 am EST.
(1) The title would be present if it was submitted via a form; for one from scratch it is entered/pasted.
(2) The post name was manually entered, based on the tag for the day
(3) Depending on the type of Daily Create, we had a format for the post that would use a set of links to flickr, you tube tags to set up the instructions, and for the embedding of media, a Tubepress shortcode, flickr gallery ID, or a SoundCLoud embed code. For these, the tag had to be manually entered in at least two spots. For the flickr ones, we would have to create an Awesome flickr gallery (another admin page), and manually copy/paste the shortcode. I started by copying from old posts (and managing a few times to edit the wrong one) and later kept a generalized version in a text doc for cutting/pasting
(4) The future date for publishing was manually set (10:00am EST)
(5) Two categories assigned for the type, and an overall category we use to group all assignments.
(6) The tag is entered here
(7) The theme required a selection menu to match it to the type of assignment (each type has its own graphic which is displayed in the single post view.
I did this for about two months before rolling up my elbows to see if this could be streamlined.
Each of the four types (Audio, Video, Photography, Drawing) have a different content structure which is what embeds the creative works in a post. When I looked it at, once the type was set and the tag as known (the tag tdc123 is also the slug for the post), it was potentially template-able.
I looked to see if there were any plugins for setting up at least the templates for the content, but did not find any that allowed for multiple templates.
But ti was looking at the admin interface for this very theme (the theme options down the right sidebar) that it dawned on me that I could possibly create my own box with a drop down menu to select a type, and when saved, the post would automagically fill in the right content and check the right boxes, etc.
So after completing the Daily Creates for 6 months in advance, doing this seriously paid off. I was typically able to knock off a months worth in about 90 minutes, and more of that was having to look around or make up assignments.
The way is works now is for a new post or if I edit something that is a draft, the TDC Settings meta box is activated.
(Gulp, note in this fake example, it should be a Drawing type, not photography, this assignment is not reallly in the mix… yet)
The only thing it needs is (1) the title, (the code automatically creates the next tag it should use based on the last one created) and (2) I just select the type from the drop down menu, and click Save Draft.
When saved, everything else is done for me!
(1) Tag is used for the url
(2) The basic content is created according to the kind of assignment, and the tag is inserted where it is needed. The * is because the automation is not 100% complete; I still have to generate the flickr gallery shortcode for Photography and Drawing types (I did experiment with calling the code directly; it was close but not quite correct). Also, the embed codes for SoundCloud are random IDs, not related to the group name, so that code is also manual.
(3) The future publication date is automatically set! This saves a ton of time. It simply looks for the last one created, and then sets the publication date for 24 hours later.
(4) Categories automatically checked
(5) (6) The tags and the header setting for the template are auto selected.
This is all done by some custom code to intercept the hook when a draft is saved, and then updating the post data (and some post metadata).
Below is the semi hairy code… broken into parts for explanation. This all lives in the functions.php part of the theme template (which truly should be done as a child theme). If I were more clever, I would have made it a plugin, but the code would be the same (One day I want to be 0.01% as code clever as Boone Gorges).
Here we go… code below the fold…
FeedWordPress is the magic elixer, the glue that binds ds106 and its satellite sites together- we are currently syndicating in over 500 blogs to the main ds106 site. By the use of extra tags we add to each feed (e.g. one to designate open online participants, one to designate the different groups that use the […]
cc licensed ( BY NC ) flickr photo shared by freshwater2006 Tonight we unleashed a new piece of the ds106 fleet of sites- the Assignment Remix Generator. This is an idea that was spawned by Tom Woodward way back in December 2010 as a way of instigating remixes of creative work by the playing of […]
cc licensed ( BY NC ND ) flickr photo shared by PetitPlat – Stephanie Kilgast (in dolly mood) Anyone who does stuff knows you do stuff by doing it. Eh? Last night while I was visiting Alec Couros he asked me why there was no image in the right side of the header of my […]
cc licensed ( BY ND ) flickr photo shared by Lori Greig Ye old CogDogBlog seems to be teeter-tottering long; I am seeing a lot of 404s and Internal Server Error 500s, and the error logs are rife with unhelpful details like “premature end of script headers”. My last round of tweaks aimed at memory […]
cc licensed ( BY NC ND ) flickr photo shared by .m for matthijs I’m hoping to carve out some time soon to get back to the garage and return to tinkering with WordPress. To that end, I spent some time categorizing new and old posts, so I have a collection now of things blogged […]