May 20, 2012

Allowing WordPress Contributors to Contribute Files

When perusing the Google for some answers, I came across the following little gem c/o Ryan Marganti. In his words:

“When managing a multi-user WordPress setup, any post by a user with the Contributor class will be held for editing/moderation [...]. However, the downside to the Contributor class is that users with this role are not able to upload images for use in their posts. Luckily, the solution is simple.”

The solution:
All you have to do is plug the following into the functions.php of your current theme.

if ( current_user_can('contributor') && !current_user_can('upload_files') )
    add_action('admin_init', 'allow_contributor_uploads');

function allow_contributor_uploads() {
    $contributor = get_role('contributor');
    $contributor->add_cap('upload_files');
}

I just tested it, and it works like a charm. This opens up some exciting doors for a new potential project, thanks Ryan!

Plugin Test: WP Audio

I have a potential project that might benefit from this plugin. So thought I’d test it out here on my eponymous sandbox.

The result:

ATCQ – Buggin’ Out

What I like:

  • Simple, clean interface and controls
  • Easy to add MP3 files to posts/pages
    • Upload MP3 via Media area in WP dashboard
    • Select option to automatically add ‘WPAudio’ link-class to all MP3 links in Setttings
    • Link to MP3 file on server, and BAM you get the above
  • Lightweight code

What I don’t like:

  • To see a download, you have to click the MP3 link, then when you click the download link that appears, it doesn’t open a ‘save file’ box, rather a Quicktime player page (for me at least). You have to right-click download link to get the ‘save file box’.

1 vote Cast your vote now!

Something’s missing

Dilbert.com

Why I’m not really over Twitter

When I joke that I’m over Twitter, what I really mean is that my initial passion/overusage has dwindled since I first started using it back in 2007 with various pseudonyms. Back then I felt like an early adopter (sure, Twitter was launched in 2006, but c’mon, virtually nobody used it for the first year). Now every local mom and pop is trying to encourage you to follow them on Twitter, as if they had any idea why they’d want you to do that (for those interested, The Onion brilliantly skewers this practice)

So what value do I see in Twitter? Here’s a cool example that happened yesterday.

I was at my computer launching a website I’d built for a client, and wondering “why in the world does WordPress not allow you to export widget and theme configurations, like it does with content (via XML)?” I tried Googling it, but couldn’t find a solution or answer to my question. So then I went to Twitter and asked a couple WordPress savvy colleagues. When they didn’t have any answers, I thought “hey – might as well go straight to the top.” So I sent an @ to Matt Mullenweg, the founding developer of WordPress. And you know what? He hit me back with a reply:

My initial reaction was 1) excited that the founding developer of WordPress thinks I have a good idea about the development of WordPress, but also 2) a little bummed that I probably couldn’t patch it on my own.

But more to the point: What are the odds that I could reach Matt on the phone? Think I could schedule him to meet me for lunch? This guy is a jet-setter—and super busy. Yet with Twitter I can reach him, create a dialogue and get meaningful feedback. And I’d have the same odds if I were a kid at an internet cafe in inner Mongolia. Pretty cool, if you ask me.

Reading: A Practical Plan for When You Feel Overwhelmed

Here’s an interesting study that illustrates a problem inherent to human beings:

“Sheena Iyengar, a management professor at Columbia University Business School, did a wonderful study that I’ve mentioned before in this blog: she offered one group of people samples of six different jams available for purchase while she offered another group 24 different jams, including the six jams offered to the first group.

With all that choice you’d think the group offered the 24 jams would be more likely to purchase one. But it’s the opposite. Those in the six-jam group were ten times more likely to actually purchase a jar of jam.

The more numerous our options, the more difficult it becomes to choose a single one, and so we end up choosing none at all. That’s what happens when we have too many things to do. We become overwhelmed and don’t do any of them.”

Read Peter Bregman’s suggestion for what to do when feeling overwhelmed. From the Harvard Business Review.

Hip Hop History

Redirect a WordPress subdirectory and all its contents to another URL

I looked all over for this code and it took me forever to figure it out, so I thought I’d post it here for anyone else that happens upon it (let me know with a comment!)

Why I needed it: I often create subdirectories on this domain to house mockups of new websites, each with a fresh WP install. Once the mockup is accepted and the site is published on the client’s domain, I can keep a keep a safe backup while ensuring that the backup files don’t get indexed by search engines.

What it does: This code goes in the .htaccess file, which is found in the root directory of a WordPress install. This particular code will redirect every page in that folder to the URL of your choice.

So, for example, if I installed WordPress in the directory: http://www.tommcconnon.com/test/, and wanted all the contents of the test folder to redirect to http://www.yourwebsitehere.com/ then I’d put the following code in the .htaccess file found in the /test/ directory.

The Code:

# BEGIN WordPress

RewriteEngine On
RewriteRule ^(.*)$ http://www.yourwebsitehere.com/ [R=301,L]

# END WordPress

Hope that helps!

Simple Technology Protection Tips


(via Unplggd.com)

Footnote.com sells to Ancestry.com for $27 Million

Which is awesome for the majority-owners at Footnote, and a bummer to all but a few key executives that are reportedly losing their jobs. Apparently Ancestry.com wanted the technology, and didn’t need the full supporting cast. Not that I can blame them…that’s business I guess.

…but, it makes me all the more happy (in hindsight) that I chose Qualtrics over Footnote in February. They’re both great companies, and both had great offers, but one was built to sell, and the other is built to stay.

Read the full release here: http://ir.ancestry.com/releasedetail.cfm?ReleaseID=510451

Dweebist on Social Networking