tag line

Posting to Drupal

With the release of version 2.1 we have had a number of requests about whether or not ScreenSteps can post to Drupal. Since Drupal has an API for posting blog entries you can. I’ve posted a lesson on how to configure Drupal and ScreenSteps: Posting to Drupal. I’ve also included the lesson with this post.

There was a small code change that I had to make to Drupal in order for categories to work. I explain the change in the lesson and have filed a bug report that you can review here if you are interested: http://drupal.org/node/280685.

Posting to Drupal

This lesson will show you how to post to Drupal using ScreenSteps. This lesson uses Drupal version 6.2.

Navigate to Drupal Administration Area

navigate-to-drupal-administration-area.png


Enable Blog API

enable-blog-api.png

Navigate to Site Configuration->Blog API.



Enable Blog Entry

enable-blog-entry.png

Make sure the Blog Entry checkbox is checked (1) and click Save Configuration (2).


media-1215517328654.png

Your settings will be saved.

Update blogapi_metaweblog_get_category_list

update-blogapi-metaweblog-get-category-list.png

In Drupal version 6.2 there appears to be some missing code in the blogapi_metaweblog_get_category_list function. This function is called when ScreenSteps attempts to retrieve available categories for a blog. Drupal reports a server error when it shouldn’t. The fix is easy and here is how to do it:

1) Open blogapi.module which is located in the ./modules/blogapi/ folder of your Drupal installation.
2) Locate the blogapi_metaweblog_get_categorylist function. In my installation it starts on line 392.
2) Add the following code in the spot specified in the image:

// BEGIN FIX: Without validating the user, the _blogapi_validate_blogid will
// return an empty array
$user = blogapi_validate_user($username, $password);

if (!$user->uid) {
return blogapi_error($user);
}
// END FIX

Configure ScreenSteps

configure-screensteps.png

In order to post to Drupal you should configure a Web Account (instructions here) using the Movable Type API (1). In the root folder of your Drupal installation is a file named xmlrpc.php. The full url to the file should be entered in the Server field (2).

Enter your user name and password and click Test Connection (3) to verify that everything is configured correctly.

You can now post your lesson to Drupal following these instructions.

Watch Out For Input Formatters

watch-out-for-input-formatters.png

After posting my first lesson to drupal I opened the blog post in the browser but no images appeared. This is because the Filtered HTML input formatter was the default for all content. To fix this click on the Edit link.

Change Input Format to Full HTML

change-input-format-to-full-html.png

Click on Input format (1) to expand the available options. Click on the Full HTML (2) radio button and click Save (3).

Success!

success.png

Your lesson now displays correctly in Drupal.


Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • Slashdot
  • Technorati
  • TwitThis
  • e-mail

Tags: ,

One Response to “Posting to Drupal”

  1. Posting to Drupal Says:

    [...] Go to the author’s original blog: Posting to Drupal [...]

Leave a Reply