【php开源代码栏目提醒】:网学会员--在 php开源代码编辑为广大网友搜集整理了:api_nucleus.inc.php绩等信息,祝愿广大网友取得需要的信息,参考学习。
<?php
/*
* Nucleus:
PHP/MySQL Weblog CMS (http://nucleuscms.org/)
* Copyright (C) 2002-2005 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* (see nucleus/documentation/index.html#license for more info)
*/
/**
* This file contains definitions for the functions in the Nucleus API
*
* NOTE: These functions are deprecated and will most likely be removed!
*
* @license http://nucleuscms.org/license.txt GNU General Public License
* @copyright Copyright (C) 2002-2005 The Nucleus Group
* @version $Id: api_nucleus.inc.php 760 2005-08-15 10:51:09Z dekarma $
*/
// nucleus.addItem
$f_nucleus_addItem_sig = array(array(
// return type
$xmlrpcString, // itemid of the new item
// params:
$xmlrpcString, // blogid
$xmlrpcString, // username
$xmlrpcString, // password
$xmlrpcString, // title
$xmlrpcString, // body
$xmlrpcString, // extended part
$xmlrpcBoolean, // publish boolean (set to false to create draft)
$xmlrpcBoolean, // closed boolean (set to true to disable comments)
));
$f_nucleus_addItem_doc = "Adds a new item to the given blog. Adds it as a draft when publish is false";
function f_nucleus_addItem($m) {
$blogid = _getScalar($m,0);
$username = _getScalar($m,1);
$password = _getScalar($m,2);
$title = _getScalar($m,3);
$body = _getScalar($m,4);
$more = _getScalar($m,5);
$publish = _getScalar($m,6);
$closed = _getScalar($m,7);
return _addItem($blogid, $username, $password, $title, $body, $more, $publish, $closed);
}
// nucleus.addDatedItem (the time of the item can be given here, for offline blogging)
$f_nucleus_addDatedItem_sig = array(array(
// return type
$xmlrpcString, // itemid of the new item
// params:
$xmlrpcString, // blogid
$xmlrpcString, // username
$xmlrpcString, // password
$xmlrpcString, // title
$xmlrpcString, // body
$xmlrpcString, // extended part
$xmlrpcBoolean, // publish boolean (set to false to create draft)
$xmlrpcBoolean, // closed boolean (set to true to disable comments)
$xmlrpcInt // item time (unix timestamp)
));
$f_nucleus_addDatedItem_doc = "Adds a new item to the given blog. Adds it as a draft when publish is false. The timestamp of the item needs to be given as a Unix timestamp";
function f_nucleus_addDatedItem($m) {
$blogid = _getScalar($m,0);
$username = _getScalar($m,1);
$password = _getScalar($m,2);
$title = _getScalar($m,3);
$body = _getScalar($m,4);
$more = _getScalar($m,5);
$publish = _getScalar($m,6);
$closed = _getScalar($m,7);
$timestamp = _getScalar($m,8);
// use '1' as $future param to make sure the date does not get erased
return _addDatedItem($blogid, $username, $password, $title, $body, $more, $publish, $closed, $timestamp, 1);
}
// nucleus.editItem
$f_nucleus_editItem_sig = array(array(
// return type
$xmlrpcBoolean, // true or false
// params:
$xmlrpcString, // itemid
$xmlrpcString, // username
$xmlrpcString, // password
$xmlrpcString, // title
$xmlrpcString, // body
$xmlrpcString, // extended part
$xmlrpcBoolean, // publish boolean (set to false if you want a draft to stay draft)
$
xmlrpcBoolean, // closed boolean (set to true to disable comments)
));
$f_nucleus_editItem_doc = "Edits an item of a blog";
function f_nucleus_editItem($m) {
global $manager;
$itemid = intval(_getScalar($m,0));
$username = _getScalar($m,1);
$password = _getScalar($m,2);
$title = _getScalar($m,3);
$content = _getScalar($m,4);
$more = _getScalar($m,5);
$publish = _getScalar($m,6);
$closed = _getScalar($m,7);
// get old title and extended part
if (!$manager->existsItem($itemid,1,1))
return _error(6,"No such item ($itemid)");
$old =& $manager->getItem($itemid,1,1);
$wasdraft = ($old['draft']) ? 1 : 0;
return _edititem($itemid, $username, $password, $old['catid'], $title, $content, $more, $wasdraft, $publish, $closed);
}
// nucleus.getUsersBlogs
$f_nucleus_getUsersBlogs_sig = array(array(
// return type
$xmlrpcArray, // array containing structs containing blog info
// params:
$xmlrpcString, // username
$xmlrpcString, // password
));
$f_nucleus_getUsersBlogs_doc = "Returns a lis