Title: Gallery Plugin XMLRPC Interface
Author: Peidong Hu
Published: <strong>2012 年 6 月 23 日</strong>
Last modified: 2013 年 1 月 10 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://s.w.org/plugins/geopattern-icon/gallery-plugin-xmlrpc-interface.svg)

# Gallery Plugin XMLRPC Interface

 由 [Peidong Hu](https://profiles.wordpress.org/zhouyibhic/) 開發

[下載](https://downloads.wordpress.org/plugin/gallery-plugin-xmlrpc-interface.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/gallery-plugin-xmlrpc-interface/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/gallery-plugin-xmlrpc-interface/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/gallery-plugin-xmlrpc-interface/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/gallery-plugin-xmlrpc-interface/#developers)

 [技術支援](https://wordpress.org/support/plugin/gallery-plugin-xmlrpc-interface/)

## 外掛說明

Basically this plugin creates XMLRPC interfaces for Gallery Plugin.
 Thanks for 
the author of Extended API, Michael Grosser, since this plugin has reused the design.
NOTE: API functions (xmlrpc revoke functions) are all prefixed with ‘i_gllrxmlrpc’.

## 安裝方式

 1. Gallery plugin has to be installed as the pre-requisite condition. You can find
    Gallery Plugin here, https://wordpress.org/extend/plugins/gallery-plugin/
 2. unzip the plugin
 3. Upload plugin folder to the `/wp-content/plugins/` directory
 4. Activate the plugin through the ‘Plugins’ menu in WordPress
 5. In administrator portal, click Settings->Gallery Plugin XMLRPC Interface to enable/
    disable the api functions.

Warning: Debug Error log is being appended into the WP_CONTENT_DIR . ‘/debug.log’;
Make sure that in production environment, trun off the debug directive in wp-includes/
default-constants.php

## 常見問題集

  Exmaple to invoke the xmlrpc api in PHP

//this example demo how to invoke the api to delete a image in the album
 set_time_limit(
0); require_once(“IXR_Library.php.inc”);

$client->debug = true; // Set it to false in Production Environment

// Create the client object
 $client = new IXR_Client(‘{zonename}’,’/xmlrpc.php?
delete_images[]={imageID}’);

$username = “{admin login name}”;
 $password = “{password}”;

$function_args = array(array(”,$username,$password,'{postID}’, array()));
 $params
= array($username,$password,”i_gllrxmlrpc_editpost”, $function_args);

// Run a query To Read Posts From WordPress
 $ret = $client->query(‘gllrxmlrpc_extapi.
callGllrMethod’, $params); if (!$ret) { die(‘Something went wrong – ‘.$client->getErrorCode().’:‘.
$client->getErrorMessage()); }

$myresponse = $client->getResponse();
 print_r($myresponse);

  Exmaple to invoke the xmlrpc api in java

client = new XMLRPCClient(WordPress.currentBlog.getUrl(),
 WordPress.currentBlog.
getHttpuser(), WordPress.currentBlog.getHttppassword());

Object[] result = null;
 // Map<String, String> gallery_type = new HashMap<String,
String>(); gallery_type.put(“post_type”, “gallery”); //String[] return_fields = {“
post_title”, “post_type”};

Object[] fArgs = {“”, WordPress.currentBlog.getUsername(),WordPress.currentBlog.
getPassword(),gallery_type};
 Object[] funcArgs = {fArgs}; // Object[] params = {
WordPress.currentBlog.getUsername(), WordPress.currentBlog.getPassword(), “i_gllrxmlrpc_metaweblog_getposts”,
funcArgs }; try { result = (Object[]) client.call(“gllrxmlrpc_extapi.callGllrMethod”,
params); } catch (XMLRPCException e) { errorMsg = e.getMessage(); }

  Exmaple to invoke the delete post api in php debug = true; // Set it to fase in
Production Environment

// Create the client object
 $client = new IXR_Client(‘hushanqi.localhost’,’/xmlrpc.
php?XDEBUG_SESSION_START=ECLIPSE_DBGP&KEY=13505726480152′);

 $username = “{user name}”;
 $password = “{password}”;

 $function_args = array(array(”,$username,$password,’99’));

 $params = array($username,$password,”i_gllrxmlrpc_deletepost”, $function_args);

 // Run a query To Read Posts From WordPress
 if (!$client->query(‘gllrxmlrpc_extapi.
callGllrMethod’, $params)) { die(‘Something went wrong – ‘.$client->getErrorCode().’:‘.
$client->getErrorMessage()); }

 $myresponse = $client->getResponse();
 print_r($myresponse); die(); ?>

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Gallery Plugin XMLRPC Interface〉的開發相關工作。

參與者

 *   [ Peidong Hu ](https://profiles.wordpress.org/zhouyibhic/)

[將〈Gallery Plugin XMLRPC Interface〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/gallery-plugin-xmlrpc-interface)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/gallery-plugin-xmlrpc-interface/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/gallery-plugin-xmlrpc-interface/)，
或透過 [RSS](https://plugins.trac.wordpress.org/log/gallery-plugin-xmlrpc-interface/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/gallery-plugin-xmlrpc-interface/)。

## 變更記錄

#### 0.3

 * add new interface i_gllrxmlrpc_metaweblog_getPost
 * new php example of delete post

#### 0.2

 * add new interface i_gllrxmlrpc_metaweblog_getposts to be compliant with metaweblog
   standard for getposts api.
 * bug fix in i_gllrxmlrpc_newpost
 * new example in Java code

#### 0.1

 * initial version

## 中繼資料

 *  版本 **0.3**
 *  最後更新 **13 年前**
 *  啟用安裝數 **10+**
 *  WordPress 版本需求 ** 3.3 或更新版本 **
 *  已測試相容的 WordPress 版本 **3.3.2**
 *  語言
 * [English (US)](https://wordpress.org/plugins/gallery-plugin-xmlrpc-interface/)
 * 標籤:
 * [gallery](https://tw.wordpress.org/plugins/tags/gallery/)[photo](https://tw.wordpress.org/plugins/tags/photo/)
   [xmlrpc](https://tw.wordpress.org/plugins/tags/xmlrpc/)
 *  [進階檢視](https://tw.wordpress.org/plugins/gallery-plugin-xmlrpc-interface/advanced/)

## 評分

這個項目尚無任何評論記錄。

[Your review](https://wordpress.org/support/plugin/gallery-plugin-xmlrpc-interface/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/gallery-plugin-xmlrpc-interface/reviews/)

## 參與者

 *   [ Peidong Hu ](https://profiles.wordpress.org/zhouyibhic/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/gallery-plugin-xmlrpc-interface/)