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
Enable Blog API
Navigate to Site Configuration->Blog API.
Enable Blog Entry
Make sure the Blog Entry checkbox is checked (1) and click Save Configuration (2).
Your settings will be saved.
Update blogapi_metaweblog_get_category_list
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
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
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
Click on Input format (1) to expand the available options. Click on the Full HTML (2) radio button and click Save (3).
Success!
Your lesson now displays correctly in Drupal.
July 10th, 2008 at 12:53 pm
[...] Go to the author’s original blog: Posting to Drupal [...]
November 30th, 2009 at 5:15 pm
Ok, I got this far, but the ability to create your posts on your local machine and then press ‘Upload’, isn’t worth so much when you have to go to your site for each post to set the input type to ‘Full HTML’. I’ve been trying to get around this for hours, but no luck. I’m sure that putting the site default for all content to Full HTML would fix it, but that’s no option.
November 30th, 2009 at 5:53 pm
I’m not sure how you can get images to appear in Drupal if you don’t have Full HTML enabled. I just enabled it globally though I have never used Drupal before writing this blog post. If you know of another way to get images to display then perhaps an appropriate template could be created in ScreenSteps for Drupal specifically.