Politics BlogBlack Bear UNews BlogSoapBox

Author Archive



Wednesday, August 26th, 2009, 2:26 am

MailPress gets a competitor

by William P. Davis

MailPress calls itself “the WordPress mailing platform.” Unfortunately, MailPress didn’t do all we wanted it to — mainly it didn’t have the flexibility I was looking for in a plugin to handle our e-mail edition. Enter WordPress Courier, a plugin I built from scratch aimed directly at managing newspapers’ e-mail editions. One of the things that I enjoyed about College Publisher was its e-mail editions, which were simple to send out yet fairly attractive. Many newspapers have to resort to third-party solutions, such as Constant Contact, to manage their e-mail newsletters. Not only are these e-mails time consuming to put together, they aren’t very attractive, either.

Using Courier, you can make your e-mails as advanced or as simple as you please (see an example here). E-mails are based on templates but each e-mail is easily customized. When you first initiate an e-mail — let’s say you want to send out your daily headlines — a preview is automatically created from your template. In many cases, you can send this e-mail out right away without any changes, but let’s say you want to delete a story from your e-mail — maybe it was already sent out as breaking news — or want to move a story up. Maybe you want to add an editor’s note of modify your nameplate because it’s a holiday. You are presented with the full source code to modify as you wish, and can preview the e-mail as many times as you like before finally sending out the e-mail.

The goal is to find a line between automation and control. In the future, more features will be added to increase your control, such as a text-only edition, advanced analytics and SMS text integration, but not at the expense of simplicity for you, the user.

Comments                                                           


Friday, July 3rd, 2009, 3:25 pm

Sarah Palin to step down as governor

by William P. Davis

Sarah Palin announced Friday she will not seek re-election as Alaska’s governor but will instead step down at the end of the month. Lt. Gov. Sean Parnell will be sworn in on July 25 in Fairbanks.

The New York Times said:

There had been wide speculation that she would seek to be the Republican Party’s presidential candidate in 2012. Gov. Tim Pawlenty of Minnesota, who is also considered to be a Republican candidate for president in 2012, recently announced that he would not seek re-election.

By leaving office early, Ms. Palin will be able to travel around the country more freely and not have to deal with the constraints of being a governor.

Comments                                                           


Friday, May 29th, 2009, 2:35 pm

How we moved from CollegePublisher to WordPress

by William P. Davis

I just finished moving our entire site from CollegePublisher to WordPress. Although our new site is not live quite yet (we’re waiting for some new server parts to speed it up), the transition is, for all intensive purposes, finished. Although others have posted about their transition, I figured I’d post how I did it, since The Campus is rather unique in how much we transferred and how easily it went.

Side note: As far as I know, we are the largest site traffic-wise to transfer from CP to WP.

First of all, you can see the new site at umainenews.com, where it will reside until I throw the switch from the old site to the new one.

I began planning almost as soon as I became Web editor in November. I decided we had to either upgrade to CP5 or get off CollegePublisher all together very soon, and started looking at all our options. Some of the CMSes we considered were: Ellington (too pricey at $1,000 a month), Drupal (didn’t like the user interface as much, and we also looked at ProsePoint), Expression Engine and CP5. The folks over at the Lewiston Sun Journal are transferring to a promising-looking new CMS named Celsius, which is based on Drupal, with the help of MEC alum Pattie Barry, and I considered forging a partnership with them, but I was unwilling to wait and I really liked WordPress anyway. My one problem with WP is that it doesn’t support weighting articles, and I’m still worried about that, but I installed a plugin that supports sticky articles, which should solve the problem.

We’d been with CollegePublisher since they were Y2M — we signed with them in 2000. Their service is fine — they’re very nice, and always tried to give us what we wanted — but we really wanted to have more control over how we do things. With CollegePublisher they have to roll out new features to everybody. That means if there’s something cool you want you have to wait a long time, sometimes months or years, before it’s available. In many cases we had to go to third parties to do what we wanted, which resulted in our site looking unprofessional. Now, with WordPress, we can add new features as quickly as we can think them up. Everything is integrated, and we’re only limited by our own skills. In addition, there is a very formidable WordPress community with thousands of plugins and a forum full of people eager to help solve your problems.

There were other small things, too. I wasn’t wild about having our site branded by MTV all over the place. Many times things didn’t work as promised or servers broke. At least now if that happens it’s our own damn fault.

CP required three months notice we intend to terminate our contract. Once we had settled on WordPress, we notified CollegePublisher and were on our way.

Getting set up

Before we decided to transfer everything to WordPress we were already using WordPress for our blogs, so I was familiar with it, but I set up a test server with WPMU on it and started working on the site. I chose WPMU even though we only have one sub-blog in case we decide to expand in the future and because of the amount of control it offers.  Once I had our new theme figured out, I added two issues worth of articles by hand and started playing around with features. I make pretty heavy use of custom fields — authors who aren’t in the system get a custom field, and are called like this:

<?php if ( get_post_meta($post->ID, ‘Author’, true) ): echo get_post_meta($post->ID, ‘Author’, true); else: coauthors_posts_links(); endif; ?>

Pretty much, if there’s anything in the custom field “Author,” display it. Otherwise display the user.

I also created a number of fields in order to display elements in the sidebar. I use Justin Tadlock’s Get The Image to handle all our new images, with a few modifications. Of the 35 or so plugins we use, almost all of them have small modifications.

I also created an elaborate loop for the front page. This gave me a headache for quite a while, but the key is a function that isn’t published that’s hidden deep in the bowels of WordPress. I was searching through the functions file trying to find something to hack when I fortuitously stumbled over the tag.

First I defined a few variables:

$lastissue = date(”Y-m-d”,mktime(0,0,0,date(”m”),date(”d”)-4,date(”Y”)));
$dontdisplay = “2009-04-26″;

In most cases, I will set $dontdisplay = $lastissue, but for vacations and stuff we want it to equal the date of our last issue. This wasn’t the problem. The problem arose when I tried to tie it into the loop.

Initially I tried this:

<?php if (have_posts()) : query_posts(’cat=6′); while (have_posts()) : the_post(); $postdate = the_date(’Y-m-d’); if ($postdate > $dontdisplay) { ?>

This didn’t work because the_date will only work once on a page, for whatever reason. Therefore, I only got it to work one time, and there are seven loops on the front page. So I tried this:

<?php if (have_posts()) : query_posts(’cat=6′); while (have_posts()) : the_post(); $postdate = the_time(’Y-m-d’); if ($postdate > $dontdisplay) { ?>

The problem with the_time is that there is no parameter to tell it not to echo, so that didn’t work either. Finally I found this:

<?php if (have_posts()) : query_posts(’cat=6′); while (have_posts()) : the_post(); $postdate = get_post_time(’Y-m-d’); if ($postdate > $dontdisplay) { ?>

That pretty much wrapped up the front page, and a lot of the templating. There were tons of little things in there, but those were what I remembered. I exported the themes and plugins onto our new server and got everything ready for the content.

What to do once you get your data

The part I had really been dreading was getting all the data in. This actually turned out to be surprisingly easy. It ended up taking me fewer than 12 hours of intermittent work to get all the posts in, including the time spent cursing at Excel, and fewer than 24 hours, including a good night’s sleep, to get everything in.

The database they gave us contained almost 12,000 entries and was much to big to be handled by a program like Excel or even Access. I’m telling you right now: don’t even try. What you should do is dump the entire CSV into a MySQL database. I found the easiest way to do it was with Navicat MySQL. They offer a free trial. If you have problems, make sure you have enabled database access for your IP address. The easiest way to drop data in is to convert the CSV to an Excel file and then it will go right in using Navicat. Otherwise you might have serious problems with special characters and such. Also, I had a problem with a few spam entries (from where, I wonder?) that broke the database, but I took those out in Excel.

Once I had everything in the database, I wrote up a little PHP script to make an XML file. The best way by far to import articles into WP is by using WP’s own XML format. You can download the script I made here. It’s very raw and will require some modifications, like using str_replace to take out special characters, but hey, I wrote it in 15 minutes. If you use it I’d suggest messing with the slugs.

The main thing is that you don’t want to change the ID of the article — it makes life difficult for the future. I dumped all the articles into the admin account and added each Author name as a custom field.

The script generates a huge xml file, which you can save to your computer. Open the file in a text editor (I like TextWrangler) and break it into parts small enough for your server to handle. This is defined in your php.ini file, but many people won’t have access to change that. It took me a while to upload all of the xml files (I had 10 7MB files) mostly because the server gave me a 404 a few times each file. If this happens, press back once to where it asks you to map each user and try again. Eventually it should give you a WordPress page telling you the articles have been imported. If you don’t see this page your articles weren’t all imported. Articles won’t be imported twice, but custom fields will.

Once I finally got all the articles in, I started on the images. This was really easy, actually. I created a custom field called sidebar_code that I intend to use for anything I want in the sidebar I didn’t make a custom field specifically for, such as a slideshow link. This is where keeping your post IDs is important. I uploaded all the images to the new server, and opened the media database in Excel. I used concatenate to join image link, cutline and credit fields, making them all into one field. Then I copied the values (special paste > values) and post ids into a new spreadsheet. I added a blank column at the beginning for meta_id, which will be automatically filled in when you import it, and another field for meta_key, which I set to the custom field I had created (sidebar_code). I saved this as a comma delimited file with the escape character as ~, but I would suggest just saving it as an excel sheet and using Navicat to import it.

That was pretty much it, except for a few other house-keeping things. For example, since there will be multiple image meta entries per post, make sure you call the custom field as an array. Example:

<?php if ( get_post_meta($post->ID, ’sidebar_code’, true) ): ?>
<?php $thumbs = get_post_meta($post->ID, ’sidebar_code’, false); ?>
<?php foreach($thumbs as $thumb) {
echo $thumb;
} ?>
<? endif; ?>

Also, for some reason we only got half our images, so right now they’re all hotlinked to CP’s server until they get us the rest of them. When I do get all the rest of them I’ll create new thumbs using CocoThumbX, since they’re all weird sizes and a lot of them are too small to use. I’m going to do any tweaking to the thumb code through search and replace in PHPMyAdmin.

That’s about it. In a day or two, once the server is finished its upgrade, I’ll throw the switch and everyone will see the brand new site. If you have any questions or want help on transferring your own site off CP and into WordPress, feel free to e-mail me at will@wpdavis.com

-Will Davis, editor in chief and former Web editor

Comments                                                           


Wednesday, May 6th, 2009, 1:10 pm

Baldacci signs gay marriage bill into law

by William P. Davis

Gov. John Baldacci signed L.D. 1020, An Act To End Discrimination in Civil Marriage and Affirm Religious Freedom, making Maine the fifth state in the U.S. to allow gay marriage.

Baldacci, who hadn’t indicated previously whether he would sign the bill, held a press conference at 12:30 to announce his decision. “I have followed closely the debate on this issue. I have listened to both sides, as they have presented their arguments during the public hearing and on the floor of the Maine Senate and the House of Representatives. I have read many of the notes and letters sent to my office, and I have weighed my decision carefully,” Baldacci said in a press release. “I did not come to this decision lightly or in haste.”

The bill will go into effect in 90 days.

The bill passed both the House and the Senate with wide support, though not with the two-thirds supermajority needed to override a veto. The Senate passed the bill 21-14 initially and 21-13 after the House voted on it. The House passed the bill 89-57.

Polling shows the state essentially tied on the issue. More than 4,000 people attended an 11-hour open forum in Augusta where more than 200 people voiced their opinions on the bill before the judiciary committee. There is support for a referendum that will in effect be a citizen’s veto. However, the referendum won’t be able to come up to a vote until next year.

Maine follows Massachusetts, Connecticut, Vermont and Iowa in allowing same sex marriages. New Hampshire’s legislature is expected to approve a similar bill this week.

Comments                                                           


Tuesday, April 28th, 2009, 11:48 pm

Gay marriage bill voted out of committee

by William P. Davis

L.D. 1020, a bill that would redefine marriage to allow gay couples to marry, was voted “ought to pass” by the Judiciary Committee today, 11-2-1. One member proposed sending the bill to referendum.

The bill was the subject of a lengthy open forum last Wednesday in Augusta, which was attended by an estimated 4,000 people. Hundreds of people testified before the committee during the 11-hour hearing. Although a fairly even number of people spoke, the crowd was overwhelmingly in support of the bill.

The bill will now go to the state senate and house for consideration. Gov. Baldacci has not publicly voiced support or opposition for the bill, but it is likely he will sign it if it passes.

Open forum part 1:

Get or enable javascript and flash.

Part 2:

Get or enable javascript and flash.


Video produced by William P. Davis with assistance from Kaley Roberts

Comments                                                           


Tuesday, April 28th, 2009, 11:51 am

Specter to switch parties

by William P. Davis

Arlen Specter

Senator Arlen Specter of Pennsylavania announced today he will switch to the Democratic party, bringing the Democrats one step closer to the filibuster-proof supermajority needed to ensure legislation will pass. “I now find my political philosophy more in line with Democrats than Republicans,” Specter said.

A statement released by Specter said, “Since my election in 1980, as part of the Reagan Big Tent, the Republican Party has moved far to the right. Last year, more than 200,000 Republicans in Pennsylvania changed their registration to become Democrats.”

According to the White House, Obama called Specter shortly after the announcement to congratulate and thank him. Specter was one of three moderate Republicans in the Senate who helped push Democratic legislation through Congress. Specter and Senators Olympia Snowe and Susan Collins, both of Maine, were the only Republicans in either house of Congress to vote for President Obama’s stimulus bill.

Comments                                                           


Saturday, April 11th, 2009, 3:55 pm

“Parks and Recreation” fails to impress

by William P. Davis

Parks and Recreation

“Parks and Recreation,” the new ‘comedy’ starring Amy Poehler, premiered last night on NBC. On first thought, I’m inclined to say it’s a disappointing effort, which was, to be honest, not unexpected.

I’ve never been a huge fan of Poehler. I find her ghetto white girl routine to be incredibly high school-ish, and many of her characters seem remarkably the same. Even with those low expectations, I was expecting more from the show, especially after the success of “The Office.”

It seems as though every aspect of the show is designed to fail. The shooting style is so closely cloned from “The Office” it is like watching the exact same show. This would not be a problem if it weren’t for very unique style of “The Office” — “Parks and Recreation” ends up looking like a cheap knockoff.

The jokes are fairly predictable, and not extremely well-played. In anticipation for the premiere almost all the jokes from the first episode were included in ads. This would not be a problem if the jokes served a larger purpose, if they were intertwined to serve as one big joke. But instead the jokes are one-liners, after which the offending actor generally smiles queasily at the camera.

The plot of the show is not a terrible idea, but at first glance the characters seem remarkably one-dimensional and predictable. Many of the characters seem remarkably similar to ones of “The Office” — Ryan, David and Michael can all be seen.

It is possible the show will become its own with time, breaking away from the mold of “The Office” and developing its own style. Right now the show is destined to die, and I have the feeling few will be sad to see it go.

Comments                                                           


Friday, April 10th, 2009, 2:00 pm

Two killed in Michigan college attack

by William P. Davis

The AP is reporting two people have been killed at Henry Ford Community College in Michigan. The school was locked down immediately following gunshots. More to come.

Comments                                                           


Tuesday, April 7th, 2009, 10:48 am

Vermont legalizes gay marriage

by William P. Davis

The Vermont legislature voted today to legalize gay marriage, becoming the fourth state in the union to do so. Vermont was also the first state in the country to allow civil unions nine years ago.

The legislature voted 23-5 in the state Senate and 100-49 in the state House to override Gov. Jim Douglas’s veto of the bill. The three other states to allow gay marriage are Massachusetts, Connecticut and Iowa. All of those states had bills banning gay marriage that were struck down by the courts.

Comments                                                           


Friday, April 3rd, 2009, 9:37 am

Iowa Supreme Court: Gay marriage ban unconstitutional

by William P. Davis

The Iowa Supreme Court struck down the state’s ban on gay marriage, saying the law violates the constitutional rights of gay couples.

The unanimous ruling makes Iowa the third state in the country to legalize gay marriage.

According to the court, “On our review, we hold the Iowa marriage statute violates the equal protection clause of the Iowa Constitution. A statute inconsistent with the Iowa Constitution must be declared void, even though it may be supported by strong and deep-seated traditional beliefs and popular opinion.”

A proposed amendment to Iowa’s constitution banning gay marriage failed to pass the legislature in 2008, but the Iowa House’s Republican leader is urging legislators to sign pass a new amendment.

Comments