From 954a3b53ca10c10fd841d7c1c87f3de7870369a6 Mon Sep 17 00:00:00 2001 From: Neil Drumm <drumm@3064.no-reply.drupal.org> Date: Wed, 26 Jul 2006 07:24:19 +0000 Subject: [PATCH] #38178 by Eaton, add support for additional fields in blogapi via a couple new hooks. --- modules/blogapi/blogapi.module | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module index cdda5a2db20e..b674c0edcb2b 100644 --- a/modules/blogapi/blogapi.module +++ b/modules/blogapi/blogapi.module @@ -128,11 +128,6 @@ function blogapi_xmlrpc() { 'blogapi_mt_supported_text_filters', array('array'), t('Retrieve information about the text formatting plugins supported by the server.')), - array( - 'mt.getTrackbackPings', - 'blogapi_mt_get_trackback_pings', - array('array', 'string'), - t('Retrieve the list of TrackBack pings posted to a particular entry. This could be used to programmatically retrieve the list of pings for a particular entry, then iterate through each of those pings doing the same, until one has built up a graph of the web of entries referencing one another on a particular topic.')), array( 'mt.publishPost', 'blogap_mti_publish_post', @@ -220,6 +215,8 @@ function blogapi_blogger_new_post($appkey, $blogid, $username, $password, $conte if (user_access('administer nodes') && !isset($edit['date'])) { $edit['date'] = format_date(time(), 'custom', 'Y-m-d H:i:s O'); } + + node_invoke_nodeapi($edit, 'blogapi new'); node_validate($edit); if ($errors = form_get_errors()) { @@ -272,6 +269,8 @@ function blogapi_blogger_edit_post($appkey, $postid, $username, $password, $cont $node->body = $content; } + node_invoke_nodeapi($node, 'blogapi edit'); + node_validate($node); if ($errors = form_get_errors()) { return blogapi_error(implode("\n", $errors)); @@ -473,14 +472,6 @@ function blogapi_mt_supported_text_filters() { return $filters; } -/** - * Blogging API callback. Can not be implemented without support from - * trackback module. - */ -function blogapi_mt_get_trackback_pings() { - return blogapi_error(t('Not implemented.')); -} - /** * Blogging API callback. Publishes the given node */ @@ -674,20 +665,6 @@ function _blogapi_mt_extra(&$node, $struct) { $node->body = $node->body . '<!--extended-->' . $struct['mt_text_more']; } - // mt_tb_ping_urls - if (function_exists('trackback_send')) { - if (is_array($struct['mt_tb_ping_urls'])) { - foreach ($struct['mt_tb_ping_urls'] as $tb_ping_url) { - $node->tb_url = $tb_ping_url->getVal(); - trackback_send($node); - unset($node->tb_url); // make sure we don't ping twice - } - } - else { - $node->tb_url = $struct['mt_tb_ping_urls']; - } - } - // mt_convert_breaks if ($struct['mt_convert_breaks']) { $node->format = $struct['mt_convert_breaks']; -- GitLab