?? feedforall_parse_dublincore.inc.php
字號:
<?php//// rss2html.php RSS feed to HTML webpage script//// Copyright 2007 NotePage, Inc. all rights reserved// http://www.feedforall.com//// NotePage, Inc. grants registerd users of our FeedForAll and/or// FeedForAll Mac product(s) the right to install and use the// FeedForAll_rss2html_pro.php script free of charge. // Please refer to the EULA included in the download for full license// terms and conditions.//// $Id: FeedForAll_parse_DublinCore.inc.php,v 3.0 2007/04/16 14:23:03 housley Exp $//// $Log: FeedForAll_parse_DublinCore.inc.php,v $// Revision 3.0 2007/04/16 14:23:03 housley// Release version 3.0 of the scripts//// Revision 2.2 2007/04/16 12:38:22 housley// Shorten the class name add-on to prevent it from becoming too long//// Revision 2.1 2007/04/06 11:08:58 housley// Add support for the Dublin Core (dc) namespace//////Function FeedForAll_parse_DublinCore_extendClass($className) { $newClassName = $className."_DC"; eval('class ' . $newClassName . ' extends ' . $className . ' { var $DCtitle; var $DCdescription; var $DCdate; var $DCsubject; var $DCcreator; var $DCpublisher; var $DCcontributor; var $DClanguage; var $DCrights; var $DCtype; var $DCformat; var $DCidentifier; var $DCsource; var $DCrelation; var $DCcoverage; var $DublinCoreUsed; Function ' . $newClassName . '($operateAs) { $this->DCtitle = ""; $this->DCdescription = ""; $this->DCdate = ""; $this->DCsubject = ""; $this->DCcreator = ""; $this->DCpublisher = ""; $this->DCcontributor = ""; $this->DClanguage = ""; $this->DCrights = ""; $this->DCtype = ""; $this->DCformat = ""; $this->DCidentifier = ""; $this->DCsource = ""; $this->DCrelation = ""; $this->DCcoverage = ""; $this->DublinCoreUsed = 0; // Call the parent constructor $this->' . $className . '($operateAs); } Function getValueOf($elementName) { if ($elementName == "~~~ItemDCTitle~~~") { return $this->DCtitle; } elseif ($elementName == "~~~ItemDCDescription~~~") { return $this->DCdescription; } elseif ($elementName == "~~~ItemDCDate~~~") { return $this->DCdate; } elseif ($elementName == "~~~ItemDCSubject~~~") { return $this->DCsubject; } elseif ($elementName == "~~~ItemDCCreator~~~") { return $this->DCcreator; } elseif ($elementName == "~~~ItemDCPublisher~~~") { return $this->DCpublisher; } elseif ($elementName == "~~~ItemDCContributor~~~") { return $this->DCcontributor; } elseif ($elementName == "~~~ItemDCLanguage~~~") { return $this->DClanguage; } elseif ($elementName == "~~~ItemDCRights~~~") { return $this->DCrights; } elseif ($elementName == "~~~ItemDCType~~~") { return $this->DCtype; } elseif ($elementName == "~~~ItemDCFormat~~~") { return $this->DCformat; } elseif ($elementName == "~~~ItemDCIdentifier~~~") { return $this->DCidentifier; } elseif ($elementName == "~~~ItemDCSource~~~") { return $this->DCsource; } elseif ($elementName == "~~~ItemDCRelation~~~") { return $this->DCrelation; } elseif ($elementName == "~~~ItemDCCoverage~~~") { return $this->DCcoverage; } else { return parent::getValueOf($elementName); } return NULL; } Function getArrayOfFields() { $result = Array(); $result[] = "~~~ItemDCTitle~~~"; $result[] = "~~~ItemDCDescription~~~"; $result[] = "~~~ItemDCDate~~~"; $result[] = "~~~ItemDCSubject~~~"; $result[] = "~~~ItemDCCreator~~~"; $result[] = "~~~ItemDCPublisher~~~"; $result[] = "~~~ItemDCContributor~~~"; $result[] = "~~~ItemDCLanguage~~~"; $result[] = "~~~ItemDCRights~~~"; $result[] = "~~~ItemDCType~~~"; $result[] = "~~~ItemDCFormat~~~"; $result[] = "~~~ItemDCIdentifier~~~"; $result[] = "~~~ItemDCSource~~~"; $result[] = "~~~ItemDCRelation~~~"; $result[] = "~~~ItemDCCoverage~~~"; $merged = array_merge(parent::getArrayOfFields(), $result); sort($merged); return $merged; } }'); return $newClassName;}Function FeedForAll_parse_DublinCore_extendParserClass($className) { $newClassName = $className."_DC"; eval('class ' . $newClassName . ' extends ' . $className . ' { var $DCtitle; var $DCdescription; var $DCdate; var $DCsubject; var $DCcreator; var $DCpublisher; var $DCcontributor; var $DClanguage; var $DCrights; var $DCtype; var $DCformat; var $DCidentifier; var $DCsource; var $DCrelation; var $DCcoverage; var $DublinCoreUsed; Function ' . $newClassName . '($operateAs) { $this->DCtitle = ""; $this->DCdescription = ""; $this->DCdate = ""; $this->DCsubject = ""; $this->DCcreator = ""; $this->DCpublisher = ""; $this->DCcontributor = ""; $this->DClanguage = ""; $this->DCrights = ""; $this->DCtype = ""; $this->DCformat = ""; $this->DCidentifier = ""; $this->DCsource = ""; $this->DCrelation = ""; $this->DCcoverage = ""; $this->DublinCoreUsed = 0; // Call the parent constructor $this->' . $className . '($operateAs); } }'); return $newClassName;}Function FeedForAll_parse_DublinCore_startElemend($parser, &$_this, $tagName, $attrs) {}Function FeedForAll_parse_DublinCore_endElemend($parser, &$_this, $tagName) { if ((($tagName == "ITEM") && ($_this->feedTYPE != "FEE")) || (($tagName == "ENTRY") && ($_this->feedTYPE == "FEE"))) { if ($_this->UseItem) { if ($_this->currentItem->DublinCoreUsed) { $_this->DublinCoreUsed = 1; } $_this->currentItem->DCtitle = trim($_this->currentItem->DCtitle); $_this->currentItem->DCdescription = trim($_this->currentItem->DCdescription); $_this->currentItem->DCdate = trim($_this->currentItem->DCdate); $_this->currentItem->DCsubject = trim($_this->currentItem->DCsubject); $_this->currentItem->DCcreator = trim($_this->currentItem->DCcreator); $_this->currentItem->DCpublisher = trim($_this->currentItem->DCpublisher); $_this->currentItem->DCcontributor = trim($_this->currentItem->DCcontributor); $_this->currentItem->DClanguage = trim($_this->currentItem->DClanguage); $_this->currentItem->DCrights = trim($_this->currentItem->DCrights); $_this->currentItem->DCtype = trim($_this->currentItem->DCtype); $_this->currentItem->DCformat = trim($_this->currentItem->DCformat); $_this->currentItem->DCidentifier = trim($_this->currentItem->DCidentifier); $_this->currentItem->DCsource = trim($_this->currentItem->DCsource); $_this->currentItem->DCrelation = trim($_this->currentItem->DCrelation); $_this->currentItem->DCcoverage = trim($_this->currentItem->DCcoverage); } } elseif (($tagName == "IMAGE") && ($_this->insideChannelImage)) { } elseif ($tagName == "CHANNEL") { $_this->DCtitle = trim($_this->DCtitle); $_this->DCdescription = trim($_this->DCdescription); $_this->DCdate = trim($_this->DCdate); $_this->DCsubject = trim($_this->DCsubject); $_this->DCcreator = trim($_this->DCcreator); $_this->DCpublisher = trim($_this->DCpublisher); $_this->DCcontributor = trim($_this->DCcontributor); $_this->DClanguage = trim($_this->DClanguage); $_this->DCrights = trim($_this->DCrights); $_this->DCtype = trim($_this->DCtype); $_this->DCformat = trim($_this->DCformat); $_this->DCidentifier = trim($_this->DCidentifier); $_this->DCsource = trim($_this->DCsource); $_this->DCrelation = trim($_this->DCrelation); $_this->DCcoverage = trim($_this->DCcoverage); }}Function FeedForAll_parse_DublinCore_characterData($parser, &$_this, $data) { if (($data == "") || ($data == NULL)) { } else { if (($_this->insideItem) && ($_this->level == $_this->level_item+1)) { // // <item> switch ($_this->tag) { case "DC:TITLE": $_this->currentItem->DCtitle .= $data; $_this->currentItem->DublinCoreUsed = 1; $_this->DublinCoreUsed = 1; break; case "DC:DESCRIPTION": $_this->currentItem->DCdescription .= $data; $_this->currentItem->DublinCoreUsed = 1; $_this->DublinCoreUsed = 1;
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -