This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 253278458860aadf0d25b11351357bcf90c6db7a Mon Sep 17 00:00:00 2001 | |
From: Ryan McCue <[email protected]> | |
Date: Tue, 29 Sep 2009 19:41:53 +1000 | |
Subject: [PATCH] Add proxy support. Closes #19 | |
--- | |
simplepie.inc | 78 +++++++++++++++++++++++++++++++++++++++++++------------- | |
1 files changed, 60 insertions(+), 18 deletions(-) | |
diff --git a/simplepie.inc b/simplepie.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sp = new SimplePie('http://example.com', './cache'); | |
foreach($sp->get_items() as $item) { | |
echo '<h2>' . $item->get_title() . '</h2>'; | |
$link = $item->get_link(0, 'replies'); | |
if($link) { | |
$comments = new SimplePie($link); | |
foreach($comments->get_posts() as $comment) { | |
echo 'Comment: ' . $comment->get_content(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require('simplepie.inc'); | |
$cache = SimplePie_Cache::create($cache_location, md5($url), 'spc'); | |
// Load data | |
$data = $cache->load(); // returns instance of SimplePie | |
// Get timestamp | |
$time = $cache->mtime(); // returns integer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require('simplepie.inc'); | |
$feed = new SimplePie('http://example.com/feed/'); | |
foreach($feed->get_items() as $item) { | |
$new_item = (object) array( | |
'hash' => $item->get_id(true), | |
'timestamp' => $item->get_date('U'), | |
'title' => $item->get_title(), | |
'content' => $item->get_content(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Blackout your Blog | |
Description: From Monday, January 25th to Friday, January 29th, Aussie websites will turn their lights out — "black out" — to inform Australians about the threat of imposed Internet censorship. Pledge your support, and install this plugin! | |
Version: 1.0 | |
Author: Ryan McCue | |
*/ | |
function blackout_js() { | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Parameters] | |
[email protected] | |
name=Hahlo | |
uri=http://hahlo.com/ | |
icon=webapp | |
status=false | |
location=false | |
sidebar=false | |
navigation=false | |
trayicon=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Disable Feedback Widget | |
Plugin Description: Disables the feedback widget on a public site | |
Plugin URI: http://getlilina.org/ | |
Author: Ryan McCue | |
Author URI: http://ryanmccue.info/ | |
Version: 1.0 | |
Min Version: 1.0 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Extend SimplePie to retrieve the embed data from a GameTrailers.com feed | |
// Load SimplePie | |
include('simplepie.class.php'); | |
// Define the GameTrailers namespace | |
define("SIMPLE_NAMESPACE_GAMETRAILERS", "http://www.gametrailers.com/rssexplained.php"); | |
// Extend SimplePie_Item with our own class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Merge multiple RSS feeds with SimplePie | |
* | |
* Just modify the path to SimplePie and | |
* modify the $feeds array with the feeds you want | |
* | |
* You should probably also change the channel title, link and description, | |
* plus I added a CC license you may not want | |
* | |
* Help from: http://www.webmaster-source.com/2007/08/06/merging-rss-feeds-with-simplepie/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('/(path-remove-for-security)/simplepie.inc'); | |
class SimplePie_Title_Sort extends SimplePie { | |
function sort_items($a, $b) | |
{ | |
return strlen($a->get_title()) >= strlen($b->get_title()); | |
} |
OlderNewer