Uncategorized

WordCamp Maine 2014 talk: WordPress as an application platform

William Davis Leave a comment

If you’re interested in seeing the code behind our applications, browse around on the blog or visit our Github.

spacer
Multimedia Projects

How we built The Good Life

Pattie Reaves Leave a comment

spacer

On Earth day, we launched a big multimedia project at the Bangor Daily News covering the impact of the back-to-the-land movement, an influx of young, educated people who moved to Maine in the 70s in order to pursue a simpler way of living.

The project was several months in the making and couldn’t have been possible without the awesome teamwork of everyone involved: reporters Abigail Curtis, Aislinn Sarnacki, Chris Cousins and Emily Burnham; visuals editors Brian Feulner and Eric Zelz; editors Judy Long and Susan Young; senior editor Anthony Ronzio, and, like any project of this scale, the dozens of people in and out of the newsroom who helped us test the user experience.

We’ve done a few multimedia projects at the BDN over the past year. In June we published Proof, about Maine’s rape survivors struggle for justice. In October, we spent the night at the Bangor Area Homeless Shelter and shared their stories in a multimedia piece. In March we visited Isle au Haut and chronicled life on an island in the winter.

The process started with an idea last fall, and over a few conversations and preliminary reporting we split the idea into five major stories (chapters) that each reporter could tackle.

We drew inspiration from this project from several sources: Sports Illustrated’s amazing multimedia profile on Tim Tebow from last November, NPR’s interactive project Planet Money makes a T-Shirt, and building on some of the aesthetic and features we had already established in our earlier multimedia projects.

[s 13 and 15, set the path to the files above on Mac and Windows, respectively.

One last thing:

When InDesign makes a call to the server, it does so by creating a socket connection and then requesting the path, or something.

In short, your server will see a request come in for localhost/wp-admin/admin-ajax.php?etc

So, especially on multisite and possible on regular WordPress, you’ll need to set the host for it to work.

I did this by adding the following line to wp-config.php. There’s probably a better way to do it:

if( ( $_SERVER[ 'HTTP_HOST' ] == 'localhost' || empty( $_SERVER[ 'HTTP_HOST' ] ) ) && !empty( $_GET[ 'action' ] ) && ( $_GET[ 'action' ] == 'wp-browser-search' || $_GET[ 'action' ] == 'wp-browser-notify' ) )
    $_SERVER[ 'HTTP_HOST' ] = 'mysite.com';

I just ripped a lot of this out of the BDN site and took a lot of our customization out. It will definitely require customization. It might break. Leave a comment below if you have a question. Email me at wdavis@bangordailynews.com if I did something really stupid.

Uncategorized

We’re hiring! Data geeks and news hackers

William Davis Leave a comment

We’re looking for data analysts and coders to join the BDN’s new Research & Innovation Department.

The BDN is dedicated to rethinking how “legacy” media operate. If you enjoy working on multiple projects with different focuses in quick succession you’ll enjoy working here. We want people who understand how to build tools people will use and who are interested in changing user habits for the better.

Coding projects include tracking digital users into the physical space, reinventing how the company thinks about its systems and running the highest-traffic news site in Maine, plus the ideas you bring to the company. Data projects will run the gamut from audience data collection to reach new customers, to business analyses that identify areas for growth to leading the newsroom in data-based reporting.

R&I is a new department that operates as a startup inside the BDN responsible for product development, technology and leading the company in making data- and research-based decisions.

We like to move aggressively and quickly at the BDN. We avoid bureaucracy and encourage transparency. We open source things when we can (read: when we’re not too embarrassed). The BDN is family-owned (no corporate overlords). It’s big enough to have resources and impact but not so huge you can’t ever get anything done.

To apply, email jholmes@bangordailynews.com. If you’d like more details, feel free to email me directly at wdavis@bangordailynews.com.

Uncategorized

Google Drive to WordPress (to InDesign), refined

William Davis 9 Comments

It’s been a while since I’ve posted here. We’ve been busy refining our existing systems in the newsroom and tackling inefficiencies in other departments.

At the BDN, we often try to drill down to what is really necessary and important, as opposed to what is traditional but not valuable, by boiling the task at hand down until it’s as basic as possible. We try the basic method and in the process learn what is truly necessary and what was extraneous. Along the way we also collect nice-to-haves, and if the opportunity presents itself we will include those in future development.

We boiled our editorial publishing workflow down to a very basic system that has worked very well for us (and for other papers) for more than two years. Pleased with our writing and publishing process, the next big problem was our budgeting system.

Outside of clunky CMSes, maybe the worst inefficiency in many newsrooms is the budgeting system. Many papers just use a doc for this. For a while at the BDN we used Zoho creator. But every budgeting system I’ve seen lacks the ability to properly track the status of each story, and organization is often a mess. At many larger companies, each desk has its own budgeting system, further complicating matters.

In addition to the issues with our budgeting system, we saw room for improvement with Drive. We wanted to refine and standardize our story workflow. We’d had some confusion caused by Drive’s UI — docs would get moved inadvertently or dropped out of folders altogether.

So we decided to build a new budgeting tool, and used the Drive API to integrate the writing process with the budgeting process.

Now, creating a budget line and creating a Google Doc are one and the same. As soon as a reporter budgets a story, the budget tool creates a fresh Google Doc using the Drive API and attaches that doc to the story. When the reporter writes the story, they do so right in the budget tool, which is just a slightly customized Google Docs interface. The intuitive Google Docs interface remains, as do features like collaborative editing and offline access.

The budget information and the links to the docs are stored and organized inside WordPress. We also back up the latest version of each Doc inside WordPress so that if, for whatever reason, Drive cuts out we won’t lose our work.

We’d talked about building a system like this for a while. Once we finally decided what we wanted, building the system took minimal time (I honestly don’t remember how long, but it went by pretty quickly).

So, here’s how it looks and works:

The code isn’t quite ready to be open-sourced yet, but if you’re interested in the code shoot me an email (wdavis@bangordailynews.com) or leave me a comment and we’ll work something out.

Oh, and did I mention my Docs to WordPress plugin is still a great solution for papers looking to get out from under legacy CMSes?

Plugins

New Beta version of Docs to WordPress

William Davis 10 Comments

I’m working on a new version of the Docs to WordPress plugin and would love it if a few people could field test it to make sure I didn’t screw anything up. There were mostly a few simple fixes, though I added a new extender that allows you to use a delimiter (by default a |) in your doc to set the headline. The plugin also uses the WordPress HTTP API instead of CURL. Please check it out at plugins.svn.wordpress.org/docs-to-wordpress/trunk/

Still to come before the next full version: Image support and (hopefully) a better way to authenticate into Google.

Plugins

Updates to the Docs to WordPress plugin forthcoming. What would you like to see?

William Davis 5 Comments

I will be working shortly on some upgrades to the Docs to WordPress plugin and wanted to get some input on what people would like to see in the next version. There have been a lot of great ideas floated in the comments section on previous posts but I’d like to get them all in one place, if possible. Please leave your thoughts below.

Uncategorized

Knight News Challenge

William Davis 2 Comments

Just a quick shoutout: The BDN is very honored that our submission to the Knight News Challenge made it to Round 2. Our proposal is to take what we’ve done at the BDN, rewrite the code now that we have a better idea of what we’re doing and package it for release so that other news orgs can really easily implement what we’ve done here. If you have a second please visit the KNC website and leave your comments on the project.

Uncategorized

Getting from WordPress to InDesign, part 1

William Davis 14 Comments

This, I know, is the code a lot of people have been waiting for. It hasn’t been posted till now mostly because I’ve been trying to package everything to make it plug-and-play. At a certain point it was time to give up.

The code isn’t hard to grasp, but it will take some modification to get it to work.

Continue reading Getting from WordPress to InDesign, part 1

Plugins

Setting the head of a post using a delimiter in your doc

William Davis 11 Comments

I’ve gotten a lot of requests from people using our Docs to WordPress plugin on how to set a headline that’s different from the title of your Doc, such as we do at the BDN using a pipe.

This isn’t a standard feature of the plugin, but the plugin does include a few filters to modify how posts are formatted. One of these filters is pre_docs_to_wp_insert, and it can be leveraged as such:

<?php
/*
Plugin Name: Extend Docs to WP like so
*/

add_filter( 'pre_docs_to_wp_insert', 'bdn_split_post' );
function bdn_split_post( $post_array = array() ) {

	$exploded_fields = explode( '|', $post_array[ 'post_content' ] );
	
	//Sometimes people forget a pipe, and we don't want to put the entire post in the headline
	if( is_array( $exploded_fields ) && count( $exploded_fields ) >= 2 ) {

		//Save the old title in case you want to do something with it
		$old_title = $post_array[ 'post_title' ];

		//Set the title to the first occurance.
		$post_array[ 'post_title' ] = strip_tags( $exploded_fields[ 0 ] );
		
		//Unset the title
		unset( $exploded_fields[ 0 ] );
		
		//Now restore the post content and save it
		$post_array[ 'post_content' ] = implode( '|', $exploded_fields );
		
	}

	return $post_array;

}

I haven’t tested it but the above code should do the trick.

Coming soon: Details on moving stories from WordPress to InDesign!