Raw File
.rss-import.php.swn
b0VIM 7.3¸]P`]mbgorgesboone~bgorges/sites/cmaster/plugins/rss-to-pressforward/modules/rss-import/rss-import.phputf-8
3210#"! Utp	q†Fsadh¤úùõØÔÓ¥¤gHG&ê髇oed8â
á

o
H

á©tg%
™^/á
È
´
“
o
<
ö	›	‚	V	H	$		þñÅ¿ŸqQ!ä±€yAìºn<ýÜÇ­€pK(ÔÓÎÅÄÀ¿ª©¦¥†gHG÷ö{Þ~jifeä	# This function takes measures to try and get item content throguh methods of increasing reliability, but decreasing relevance.	}		return $feedlist;		//http://www.google.com/reader/public/atom/user%2F12869634832753741059%2Fbundle%2FNominations		//http://feeds.feedburner.com/DHNowEditorsChoiceAndNews		//'http://www.google.com/reader/public/atom/user%2F12869634832753741059%2Fbundle%2FNominations';		$feedlist = 'http://www.google.com/reader/public/atom/user%2F12869634832753741059%2Fbundle%2FEditors-at-Large%20Stream';	public function rsspf_feedlist() {	# Where we store a list of feeds to check.	/////////////////////////////	// UTILITY METHODS         //	/////////////////////////////	}		return $rssObject;		}			$c++;			}				set_transient( 'rsspf_' . $id, $rssObject['rss_' . $c], 60*10 );											);											$item_categories_string											$item->get_date('Y-m-d'),											$id,											'',											$item->get_link(),											$item_content,											$authors,											$item->get_date('r'),											$iFeed->get_title(),											$item->get_title(),				$rssObject['rss_' . $c] = $this->feed_object(				print_r($c);				$item_content = $contentObj->closetags($item_content);				$contentObj = new htmlchecker($item_content);				//one final cleanup of the content.				} else { $item_categories_string = ''; }					$item_categories_string = implode(',',$itemTerms);					}						$itemTerms[] = $item_category->get_term();					foreach ($item_categories as $item_category){				if (!empty($item_categories)){				$itemTerms = array();				$item_categories = $item->get_categories();				$item_categories = array();				$authors = $this->get_rss_authors($item);				$iFeed = $item->get_feed();				}						$item_content = $item->get_content();				} else {					}						//print_r($realContent);						$item_content = $realContent;					} else {						$item_content = $item->get_content();					if (!$realContent){					# If we can't get the actual content, then just use what we've got from the RSS feed.					$realContent = $this->get_content_through_aggregator($realLink);					# Try and get the actual content of the post.					$realLink = $item->get_link();					# Get the origin post link.				if ($agStatus){				//$agStatus = false;				//override switch while rest is not working.				}					$agStatus = true;				if ((strlen($item->get_content())) < 160){				# So we'll want to get the good stuff from the source.				# If there is less than 160 characters of content, than it isn't really giving us meaningful information.				}					$agStatus = false;					# If we can't get source information then don't do anything.				} else {					$agStatus = $this->is_from_aggregator($source);					# Check if the feed item creator is an aggregator.					$source = $sourceObj->get_link(0,'alternate');					# Get the link of what created the RSS entry.					$sourceObj = $item->get_source();				if ($item->get_source()){			if ( false === ( $rssObject['rss_' . $c] = get_transient( 'rsspf_' . $id ) ) ) {			//print_r($item_categories_string); die();			$id = md5($item->get_id()); //die();		foreach($theFeed->get_items() as $item) {		$c = 0;		$rssObject = array();		$theFeed = fetch_feed($feedlist);		$feedlist = call_user_func(array($this, 'rsspf_feedlist'));	public function get_data_object() {	}		parent::start();	public function __construct() {	/////////////////////////////	// PARENT OVERRIDE METHODS //	////////////////////////////	class RSSPF_RSS_Import extends RSSPF_Module { */ * Test of module base class/**<?phpadK«á£¢ˆgTQPKïë°«h^]1	Û
Ú
†
h
A

Ú¢m`’W(Ú
Á
­
Œ
h
5
ï	”	{	O	A		þ÷꾸˜jJݪyr:
å³xg5öÕÀ¦ˆyiD!ÍÌǾ½¹¸£¢Ÿž`A@ðït×wcb_^Ý	# This function takes measures to try and get item content throguh methods of increasing reliability, but decreasing relevance.	}		return $feedlist;		//http://www.google.com/reader/public/atom/user%2F12869634832753741059%2Fbundle%2FNominations		//http://feeds.feedburner.com/DHNowEditorsChoiceAndNews		//'http://www.google.com/reader/public/atom/user%2F12869634832753741059%2Fbundle%2FNominations';		$feedlist = 'http://www.google.com/reader/public/atom/user%2F12869634832753741059%2Fbundle%2FEditors-at-Large%20Stream';	public function rsspf_feedlist() {	# Where we store a list of feeds to check.	/////////////////////////////	// UTILITY METHODS         //	/////////////////////////////	}		return $rssObject;		}			$c++;			}				set_transient( 'rsspf_' . $id, $rssObject['rss_' . $c], 60*10 );											);											$item_categories_string											$item->get_date('Y-m-d'),											$id,											'',											$item->get_link(),											$item_content,											$authors,											$item->get_date('r'),											$iFeed->get_title(),											$item->get_title(),				$rssObject['rss_' . $c] = $this->feed_object(				print_r($c);				$item_content = $contentObj->closetags($item_content);				$contentObj = new htmlchecker($item_content);				//one final cleanup of the content.				} else { $item_categories_string = ''; }					$item_categories_string = implode(',',$itemTerms);					}						$itemTerms[] = $item_category->get_term();					foreach ($item_categories as $item_category){				if (!empty($item_categories)){				$itemTerms = array();				$item_categories = $item->get_categories();				$item_categories = array();				$authors = $this->get_rss_authors($item);				$iFeed = $item->get_feed();				}						$item_content = $item->get_content();				} else {					}						//print_r($realContent);						$item_content = $realContent;					} else {						$item_content = $item->get_content();					if (!$realContent){					# If we can't get the actual content, then just use what we've got from the RSS feed.					$realContent = $this->get_content_through_aggregator($realLink);					# Try and get the actual content of the post.					$realLink = $item->get_link();					# Get the origin post link.				if ($agStatus){				//$agStatus = false;				//override switch while rest is not working.				}					$agStatus = true;				if ((strlen($item->get_content())) < 160){				# So we'll want to get the good stuff from the source.				# If there is less than 160 characters of content, than it isn't really giving us meaningful information.				}					$agStatus = false;					# If we can't get source information then don't do anything.				} else {					$agStatus = $this->is_from_aggregator($source);					# Check if the feed item creator is an aggregator.					$source = $sourceObj->get_link(0,'alternate');					# Get the link of what created the RSS entry.					$sourceObj = $item->get_source();				if ($item->get_source()){			if ( false === ( $rssObject['rss_' . $c] = get_transient( 'rsspf_' . $id ) ) ) {			//print_r($item_categories_string); die();			$id = md5($item->get_id()); //die();		foreach($theFeed->get_items() as $item) {		$c = 0;		$rssObject = array();		$theFeed = fetch_feed($feedlist);		$feed	 */	 * @global $rsspf Used to access the feed_object() method	 *	 * as expected by RSSPF	 * Gets the data from an RSS feed and turns it into a data object	/**	}		parent::start();	public function __construct() {	 */	 * Constructor	/**	/////////////////////////////	// PARENT OVERRIDE METHODS //	/////////////////////////////ad?	Fɸ·¢uTCðŠ[H,ì
Á
¡
}
Z
×j>÷öñé伄S=<1,(Ý
®
¤

€
g
O
3

ù	ï	Å	›	‘	Œ	ˆ	y	x	h	g	f	[	J	F	E	B	A	?	}	}		}			return false;		} else {			return true;		if ($c > 0){		}			}				$c++;			if (in_array($aggregator, $urlParts)){		foreach ($aggregators as $aggregator) {							);								'pipes.yahoo.com'								'www.tweetedtimes.com',								'tweetedtimes.com',								'tweetedtimes',		$aggregators = array (		$urlParts = parse_url($xmlbase);		$c = 0;	public function is_from_aggregator($xmlbase){	# Checks the URL against a list of aggregators.	}		return $descrip;		}			}				break;				$descrip = false;				# We'll want to return a false to loop with.				print_r($url . ' has no description we can find.');				# Ugh... we can't get anything huh?			{			else			}				print_r($url . ' has no meta OpenGraph description we can find.');				$descrip = $contentHtml['description'];				# Try and get the HEAD > META DESCRIPTION tag.			elseif ('' != ($contentHtml = @get_meta_tags($url))) {			} //Note the @ below. This is because get_meta_tags doesn't have a failure state to check, it just throws errors. Thanks PHP...				$descrip = $node->description;				$node = OpenGraph::fetch($url);			if (OpenGraph::fetch($url)){			#Try and get the OpenGraph description.			$url = str_replace('&amp;','&', $url);		while (!$descrip) {		# If that doesn't work...		//print_r($url);		$descrip = $rsspf->readability_object($url);		# First run it through Readability.		//print_r($url);		//$url = http_build_url($urlParts, HTTP_URL_STRIP_AUTH | HTTP_URL_JOIN_PATH | HTTP_URL_JOIN_QUERY | HTTP_URL_STRIP_FRAGMENT);		$descrip = '';		$url = $rsspf->de_https($url);		//$this->set_error_handler("customError");		set_time_limit(0);		global $rsspf;	public function get_content_through_aggregator($url){adR2qÛÊÉ‹gOEDðÂÁmO(õ
Á
‰
T
G

íçy>øòÁ¨”sOÖ
{
b
6
(

å	Þ	Ñ	¥	Ÿ		Q	1		çÄ‘`Y!ôÌš_NüÜ»¦Œn_O*ùø³²­¤£Ÿž‰ˆ…„eF'&úÖÕZ÷½]IHEDïîÅŸžwvrJI652This function takes measures to try and get item content throguh methods of increasin		}		return $authors;		$authors = implode(', ', $nameArray);		}			$nameArray[] = $author->get_name();		foreach ($authorArray as $author) {		$authorArray = ($item->get_authors());	function get_rss_authors($item) {	# Tries to get the RSS item author for the meta.	}		return $feedlist;		//http://www.google.com/reader/public/atom/user%2F12869634832753741059%2Fbundle%2FNominations		//http://feeds.feedburner.com/DHNowEditorsChoiceAndNews		//'http://www.google.com/reader/public/atom/user%2F12869634832753741059%2Fbundle%2FNominations';		$feedlist = 'http://www.google.com/reader/public/atom/user%2F12869634832753741059%2Fbundle%2FEditors-at-Large%20Stream';	public function rsspf_feedlist() {	# Where we store a list of feeds to check.	/////////////////////////////	// UTILITY METHODS         //	/////////////////////////////	}		return $rssObject;		}			$c++;			}				set_transient( 'rsspf_' . $id, $rssObject['rss_' . $c], 60*10 );											);											$item_categories_string											$item->get_date('Y-m-d'),											$id,											'',											$item->get_link(),											$item_content,											$authors,											$item->get_date('r'),											$iFeed->get_title(),											$item->get_title(),				$rssObject['rss_' . $c] = $rsspf->feed_object(				print_r($c);				$item_content = $contentObj->closetags($item_content);				$contentObj = new htmlchecker($item_content);				//one final cleanup of the content.				} else { $item_categories_string = ''; }					$item_categories_string = implode(',',$itemTerms);					}						$itemTerms[] = $item_category->get_term();					foreach ($item_categories as $item_category){				if (!empty($item_categories)){				$itemTerms = array();				$item_categories = $item->get_categories();				$item_categories = array();				$authors = $this->get_rss_authors($item);				$iFeed = $item->get_feed();				}						$item_content = $item->get_content();				} else {					}						//print_r($realContent);						$item_content = $realContent;					} else {						$item_content = $item->get_content();					if (!$realContent){					# If we can't get the actual content, then just use what we've got from the RSS feed.					$realContent = $this->get_content_through_aggregator($realLink);					# Try and get the actual content of the post.					$realLink = $item->get_link();					# Get the origin post link.				if ($agStatus){				//$agStatus = false;				//override switch while rest is not working.				}					$agStatus = true;				if ((strlen($item->get_content())) < 160){				# So we'll want to get the good stuff from the source.				# If there is less than 160 characters of content, than it isn't really giving us meaningful information.				}					$agStatus = false;					# If we can't get source information then don't do anything.				} else {					$agStatus = $this->is_from_aggregator($source);					# Check if the feed item creator is an aggregator.					$source = $sourceObj->get_link(0,'alternate');					# Get the link of what created the RSS entry.					$sourceObj = $item->get_source();				if ($item->get_source()){			if ( false === ( $rssObject['rss_' . $c] = get_transient( 'rsspf_' . $id ) ) ) {			//print_r($item_categories_string); die();			$id = md5($item->get_id()); //die();		foreach($theFeed->get_items() as $item) {		$c = 0;		$rssObject = array();		$theFeed = fetch_feed($feedlist);		$feedlist = call_user_func(array($this, 'rsspf_feedlist'));		global $rsspf;	public function get_data_object() {adZ~ÿ~	# This function takes measures to try and get item content throguh methods of increasing reliability, but decreasing relevance.
back to top