本文整理汇总了PHP中NewsStory::storyId方法的典型用法代码示例。如果您正苦于以下问题:PHP NewsStory::storyId方法的具体用法?PHP NewsStory::storyId怎么用?PHP NewsStory::storyId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NewsStory
的用法示例。
在下文中一共展示了NewsStory::storyId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: XoopsXmlRpcFault
function &getPost($respond = true)
{
if (!$this->_checkUser($this->params[1], $this->params[2])) {
$this->response->add(new XoopsXmlRpcFault(104));
} else {
// will be removed... don't worry if this looks bad
include_once XOOPS_ROOT_PATH . '/modules/news/class/class.newsstory.php';
$story = new NewsStory($this->params[0]);
$ret = array('uid' => $story->uid(), 'published' => $story->published(), 'storyid' => $story->storyId(), 'title' => $story->title('Edit'), 'hometext' => $story->hometext('Edit'), 'moretext' => $story->bodytext('Edit'));
if (!$respond) {
return $ret;
} else {
if (!$ret) {
$this->response->add(new XoopsXmlRpcFault(106));
} else {
$struct = new XoopsXmlRpcStruct();
$content = '';
foreach ($ret as $key => $value) {
switch ($key) {
case 'uid':
$struct->add('userid', new XoopsXmlRpcString($value));
break;
case 'published':
$struct->add('dateCreated', new XoopsXmlRpcDatetime($value));
break;
case 'storyid':
$struct->add('postid', new XoopsXmlRpcString($value));
$struct->add('link', new XoopsXmlRpcString(XOOPS_URL . '/modules/news/article.php?item_id=' . $value));
$struct->add('permaLink', new XoopsXmlRpcString(XOOPS_URL . '/modules/news/article.php?item_id=' . $value));
break;
case 'title':
$struct->add('title', new XoopsXmlRpcString($value));
break;
default:
$content .= '<' . $key . '>' . trim($value) . '</' . $key . '>';
break;
}
}
$struct->add('description', new XoopsXmlRpcString($content));
$this->response->add($struct);
}
}
}
}