summaryrefslogtreecommitdiff
path: root/modules/blogapi
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-07-10 19:27:52 +0000
committerDries Buytaert <dries@buytaert.net>2006-07-10 19:27:52 +0000
commit58752cfaa2b182c53e26ee42983ff41d59597b4c (patch)
tree35fc59938cda1bcfc4866989d5fcc5254d77ec89 /modules/blogapi
parentc45ca20d0ff7448f8edac7ca46becc0c8ea8ee03 (diff)
downloadbrdo-58752cfaa2b182c53e26ee42983ff41d59597b4c.tar.gz
brdo-58752cfaa2b182c53e26ee42983ff41d59597b4c.tar.bz2
- Patch #72284 by me:
+ reorganized ?q=admin/settings + deprecated the _settings hook
Diffstat (limited to 'modules/blogapi')
-rw-r--r--modules/blogapi/blogapi.module29
1 files changed, 23 insertions, 6 deletions
diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module
index f4ebb618c..cdda5a2db 100644
--- a/modules/blogapi/blogapi.module
+++ b/modules/blogapi/blogapi.module
@@ -553,9 +553,11 @@ function blogapi_blogger_title(&$contents) {
return $title;
}
-function blogapi_settings() {
+function blogapi_admin_settings() {
$form['blogapi_engine'] = array(
- '#type' => 'select', '#title' => t('XML-RPC Engine'), '#default_value' => variable_get('blogapi_engine', 0),
+ '#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.')
);
@@ -563,12 +565,15 @@ function blogapi_settings() {
$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,
+ '#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;
+ return system_settings_form('blogapi_admin_settings', $form);
}
function blogapi_menu($may_cache) {
@@ -582,7 +587,19 @@ function blogapi_menu($may_cache) {
}
if ($may_cache) {
- $items[] = array('path' => 'blogapi', 'title' => t('RSD'), 'callback' => 'blogapi_blogapi', 'access' => user_access('access content'), 'type' => MENU_CALLBACK);
+ $items[] = array(
+ 'path' => 'blogapi',
+ 'title' => t('RSD'),
+ 'callback' => 'blogapi_blogapi',
+ 'access' => user_access('access content'),
+ 'type' => MENU_CALLBACK);
+ $items[] = array(
+ 'path' => 'admin/settings/blogapi',
+ 'title' => t('blog APIs'),
+ 'callback' => 'blogapi_admin_settings',
+ 'access' => user_access('administer site configuration'),
+ 'type' => MENU_NORMAL_ITEM
+ );
}
return $items;