當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FeedDate::v0001方法代碼示例

本文整理匯總了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;
	}
開發者ID:BackupTheBerlios,項目名稱:viscacha-svn,代碼行數:51,代碼來源:klipfolio.inc.php


注:本文中的FeedDate::v0001方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。