当前位置: 首页>>代码示例>>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;未经允许,请勿转载。