You are here

function blogapi_settings in Drupal 4

File

modules/blogapi.module, line 556
Enable users to post using applications that support XML-RPC blog APIs.

Code

function blogapi_settings() {
  $form['blogapi_engine'] = array(
    '#type' => 'select',
    '#title' => t('XML-RPC Engine'),
    '#default_value' => variable_get('blogapi_engine', 0),
    '#options' => array(
      0 => 'Blogger',
      1 => 'MetaWeblog',
      2 => 'Movabletype',
    ),
    '#description' => t('RSD or Really-Simple-Discovery is a mechanism which allows external blogger tools to discover the APIs they can use to interact with Drupal. Here you can set the preferred method for blogger tools to interact with your site. The common XML-RPC engines are Blogger, MetaWeblog and Movabletype. If you are not sure which is the correct setting, choose Blogger.'),
  );
  $node_types = node_get_types();
  $defaults = isset($node_types['blog']) ? array(
    'blog' => 1,
  ) : array();
  $form['blogapi_node_types'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Blog types'),
    '#required' => TRUE,
    '#default_value' => variable_get('blogapi_node_types', $defaults),
    '#options' => $node_types,
    '#description' => t('Select the content types for which you wish to enable posting via blogapi. Each type will appear as a different "blog" in the client application (if supported).'),
  );
  return $form;
}