本文整理匯總了PHP中FeedDate::v0001方法的典型用法代碼示例。如果您正苦於以下問題:PHP FeedDate::v0001方法的具體用法?PHP FeedDate::v0001怎麽用?PHP FeedDate::v0001使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FeedDate
的用法示例。
在下文中一共展示了FeedDate::v0001方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: createFeed
function createFeed() {
global $config;
$now = new FeedDate();
$this->descriptionTruncSize = 500;
$feed = '<?xml version="1.0" encoding="'.$this->encoding.'"?>'."\n";
$feed .= $this->_createGeneratorComment();
$feed .= '<klip>'."\n";
$feed .= ' <owner>'."\n";
$feed .= ' <author>'.$this->htmlspecialchars(FeedCreator::iTrunc($this->editor,100)).'</author>'."\n";
$feed .= ' <copyright>'.$this->htmlspecialchars(FeedCreator::iTrunc($this->copyright,100)).'</copyright>'."\n";
if (!empty($this->editorEmail)) {
$feed .= ' <email>'.$this->htmlspecialchars($this->editorEmail).'</email>'."\n";
}
$feed .= ' <web>'.$this->link.'</web>'."\n";
$feed .= ' </owner>'."\n";
$feed .= ' <identity>'."\n";
$feed .= ' <title>'.$this->htmlspecialchars(FeedCreator::iTrunc($this->title,100)).'</title>'."\n";
$feed .= ' <uniqueid>'.md5($config['cryptkey']).'</uniqueid>'."\n";
$feed .= ' <version>1.0</version>'."\n";
$feed .= ' <lastmodified>'.$this->htmlspecialchars($now->v0001()).'</lastmodified>'."\n";
$feed .= ' <description>'.$this->getDescription($this->encoding).'</description>'."\n";
$feed .= ' <keywords>Viscacha '.$this->htmlspecialchars($this->title).'</keywords>'."\n";
$feed .= ' </identity>'."\n";
$feed .= ' <locations>'."\n";
$feed .= ' <defaultlink>'.$this->link.'</defaultlink>'."\n";
$feed .= ' <contentsource>'.$config['furl'].'/external.php?action=KLIPFOOD</contentsource>'."\n";
$feed .= ' <kliplocation>'.$config['furl'].'/external.php?action=KLIPFOLIO</kliplocation>'."\n";
$feed .= ' </locations>'."\n";
$feed .= ' <setup>'."\n";
$feed .= ' <refresh>'.$this->htmlspecialchars($this->ttl).'</refresh>'."\n";
if (!check_hp($_SERVER['HTTP_REFERER'])) {
$_SERVER['HTTP_REFERER'] = $this->link;
}
$feed .= ' <referer>'.$this->htmlspecialchars($_SERVER['HTTP_REFERER']).'</referer>'."\n";
$feed .= ' <country>'.$this->language.'</country>'."\n";
$feed .= ' <language>'.$this->language.'</language>'."\n";
$feed .= ' </setup>'."\n";
$feed .= ' <messages>'."\n";
$feed .= ' <loading>Getting data...</loading>'."\n";
$feed .= ' <nodata>No items to display.</nodata>'."\n";
$feed .= ' </messages>'."\n";
$feed .= "</klip>\n";
return $feed;
}