WordPress

6
Aug

flickr_wordpress_post_hack.jpgIf you’re a Flickr user, and want to post photos to your blog, you know there is no way to add categories or tags to the post. There could be a plug-in solution, but I couldn’t find it. Seriously, I looked for a long time. If there is one that does what I’m proposing, please let me know and I will update this post and back out what I’ve done.

This solution isn’t for the faint of heart. And I’m not 100% sure how secure it is. But I know for a fact it works just like I want. Here is the scenario and my hack:

1. Create a new WordPress user for Flickr posts. Doesn’t matter what you call it. Just make sure it has posting rights.
2. Add you blog, or modify and existing entry, in your Flickr account. How to do this is beyond the scope of my explanation.
3. Use the new WordPress user you created in step one in your Flickr blog settings.
4. Modify you xmlrpc.php file that sits in your WordPress root folder, with the below code. It would be in the same place as wp-config.php.

Here is where it gets a little hairy. Find the line which has this code snippet. Mine starts on line 1578, but yours may differ. It’s in the function mw_newPost($args):

if (is_array($catnames)) {

foreach ($catnames as $cat) {

$post_category[] = get_cat_ID($cat);

}

}

Just above the code on line 1578, add this code snippet:

if ( $user_login == '*NEW_USER_NAME*' ) {

$catnames[] = ‘*CATEGORY*’;

$tags_input[] = ‘*TAG1*’;

$tags_input[] = ‘*TAG2*’;

}

Save the file. Flickr gives you the ability to create a test post. I would recommend you do that before calling it good. Make SURE to remove any entries in the Settings/Writing/Update Services box before testing or your test post will show up in your RSS feed and anywhere else that you ping a new post.

Now, when you post from Flickr, using the correct WordPress user, you should have an entry in the category you choose, with the tags you want. You can add as many tags, or even categories as you like.

Again, there may be a more elegant solution that I haven’t found, but for now this solves my problem. I suppose you could use this for any outside service that uses XMLRPC to post to your blog.

I’m also interested in hearing about potential security issues with this solution.

Photo courtesy of poolie.

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...
Category : Blogging | Build A Better Blog In 31 Days | WordPress | Blog
3
Apr

Joseph Scott mentioned to me at PodCampSLC that he was interested in having a WordCamp here in Utah. I thought it was a fantastic idea. So over the past few weeks we’ve talked about it and it looks like the event is going forward.

Because this is a community event, it’s important that everyone get involved early. We only have a few months to put a great camp together. Please join us on April 10th at 6:30, Applebees in Draper, for a first draft WordCamp Utah meet-up. There’s a lot to cover and we need as many people as possible to help out. Let us know you’re coming on upcoming.org.

Another thing we want is bloggers to present topics at WordCamp. There will be a spot on the WordCamp Utah site to register and sign up to present.

This is a great opportunity to meet other WordPress bloggers, learn more about the platform, network, and get some great ideas to succeed.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Category : Blogging | Utah-Bloggers | WordCamp | WordPress | Blog
25
Jan

I’m sure that’s not the only reason Matt Mullenweg will be in Utah, but he was kind enough to extend his stay to meet with the locals, at a great Indian food place called Taj India. If you’re going to be in Salt Lake City on February 2nd, you should join us.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Category : WordPress | Blog