This commit is contained in:
zotlabs 2017-03-18 16:55:10 -07:00
parent 4afeefb5ce
commit 320c32fd0f
49 changed files with 0 additions and 1651 deletions

View file

@ -1,23 +0,0 @@
#!/usr/bin/php
<?php
include_once('../simplepie.inc');
// Parse it
$feed = new SimplePie();
if (isset($argv[1]) && $argv[1] !== '')
{
$feed->set_feed_url($argv[1]);
$feed->enable_cache(false);
$feed->init();
}
$items = $feed->get_items();
foreach ($items as $item)
{
echo $item->get_title() . "\n";
}
var_dump($feed->get_item_quantity());
?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

View file

@ -1,5 +0,0 @@
<html>
<head>
<meta http-equiv="refresh" content="0;url=http://www.jeroenwijering.com/extras/readme.html">
</head>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

View file

@ -1,35 +0,0 @@
/*=:project
scalable Inman Flash Replacement (sIFR) version 3.
=:file
Copyright: 2006 Mark Wubben.
Author: Mark Wubben, <http://novemberborn.net/>
=:history
* IFR: Shaun Inman
* sIFR 1: Mike Davidson, Shaun Inman and Tomas Jogin
* sIFR 2: Mike Davidson, Shaun Inman, Tomas Jogin and Mark Wubben
=:license
This software is licensed and provided under the CC-GNU LGPL.
See <http://creativecommons.org/licenses/LGPL/2.1/>
*/
/* This is the print stylesheet to hide the Flash headlines from the browser... regular browser text headlines will now print as normal */
.sIFR-flash {
display: none !important;
height: 0;
width: 0;
position: absolute;
overflow: hidden;
}
.sIFR-alternate {
visibility: visible !important;
display: block !important;
position: static !important;
left: auto !important;
top: auto !important;
}

View file

@ -1,39 +0,0 @@
/*=:project
scalable Inman Flash Replacement (sIFR) version 3.
=:file
Copyright: 2006 Mark Wubben.
Author: Mark Wubben, <http://novemberborn.net/>
=:history
* IFR: Shaun Inman
* sIFR 1: Mike Davidson, Shaun Inman and Tomas Jogin
* sIFR 2: Mike Davidson, Shaun Inman, Tomas Jogin and Mark Wubben
=:license
This software is licensed and provided under the CC-GNU LGPL.
See <http://creativecommons.org/licenses/LGPL/2.1/>
*/
/*---- sIFR ---*/
.sIFR-flash {
visibility: visible !important;
margin: 0;
padding: 0;
}
.sIFR-replaced {
visibility: visible !important;
}
.sIFR-alternate {
position: absolute;
left: 0;
top: 0;
width: 0;
height: 0;
display: block;
overflow: hidden;
}
/*---- Header styling ---*/

View file

@ -1,40 +0,0 @@
var yanone_kaffeesatz = {
src: './for_the_demo/yanone-kaffeesatz-bold.swf'
};
var lucida_grande = {
src: './for_the_demo/lucida-grande-bold.swf'
};
sIFR.activate(yanone_kaffeesatz);
//sIFR.activate(lucida_grande);
sIFR.replace(yanone_kaffeesatz, {
//sIFR.replace(lucida_grande, {
selector: 'h3.header',
wmode: 'transparent',
css: {
'.sIFR-root': {
'text-align': 'center',
'color': '#000000',
'font-weight': 'bold',
'background-color': '#EEFFEE',
'font-size': '50px', // For Yanone Kaffeesatz
//'font-size': '40px', // For Lucida Grande
'letter-spacing': '0' // For Yanone Kaffeesatz
//'letter-spacing': '-4' // For Lucida Grande
},
'a': {
'text-decoration': 'none',
'color': '#000000'
},
'a:hover': {
'text-decoration': 'none',
'color': '#666666'
}
}
});

File diff suppressed because one or more lines are too long

View file

@ -1,397 +0,0 @@
/*
Theme Name: SimplePie
Theme URI: http://simplepie.org
Description: A simple, yet beautiful theme inspired by several cleanly designed websites.
Version: 1.4
Author: Ryan Parman
Author URI: http://skyzyx.com
Updated: 21 June 2007
*/
/*********************************************
HYPERLINK STYLES
*********************************************/
a {
color:#369;
text-decoration:underline;
padding:0 1px;
}
a:hover {
color:#fff !important;
background-color:#333;
text-decoration:none;
padding:0 1px;
}
a.nohover {
text-decoration:none;
border:none;
}
a.nohover:hover {
background-color:transparent;
border:none;
}
a.namelink {
padding:0;
margin:0;
overflow:hidden;
height:1px;
}
h4 a,
.sample_feeds a {
color:#000;
}
/*********************************************
GENERAL STYLES
*********************************************/
body {
/*font:12px/18px Verdana, sans-serif;*/
font:14px/1.5em "Lucida Grande", Tahoma, sans-serif;
letter-spacing:0px;
color:#333;
background-color:#fff;
margin:0;
padding:0;
}
div#site {
width:600px;
margin:50px auto 0 auto;
}
h1#logo {
margin:0;
padding:0;
text-align:center;
}
h1#logo a,
h1#logo a:hover {
background-color:transparent;
text-decoration:none;
padding:0;
}
h2.image {
margin:0;
padding:0;
text-align:center;
}
h3 {
margin:20px 0 0 0;
padding:0;
font-size:1.5em;
}
h4 {
margin:20px 0 0 0;
padding:0;
font-size:1.2em;
letter-spacing:-1px;
}
h5 {
margin:10px 0 0 0;
padding:0;
font-size:1em;
font-weight:bold;
}
em {
font-style:normal;
background-color:#ffc;
}
p {
margin:0;
padding:5px 0;
}
ul, ol {
margin:10px 0 10px 20px;
padding:0 0 0 15px;
}
ul li, ol li {
margin:0 0 7px 0;
padding:0 0 0 3px;
}
form {
margin:0;
padding:0;
}
code {
font-size:1em;
background-color:#f3f3ff;
color:#000;
}
div#site pre {
background-color:#f3f3ff;
color:#000080;
border:1px dotted #000080;
overflow:auto;
padding:3px 5px;
}
blockquote {
font-size:1em;
color:#666;
border-left:4px solid #666;
margin:10px 0 10px 30px;
padding:0 5px 0 10px;
background:#f3f3f3 url(background_blockquote.png) repeat top left;
}
input, select, textarea {
font-size:12px;
line-height:1.2em;
padding:2px;
}
input[type=text], select, textarea {
background-color:#e9f5ff;
border:1px solid #333;
}
input[type=text]:focus, select:focus, textarea:focus {
background-color:#ffe;
}
.clearLeft {clear:left;}
.clearRight {clear:right;}
.clearBoth {clear:both;}
.hide {display:none;}
/*********************************************
NAVIGATION STYLES
*********************************************/
div#header {
background:#fff url(top_gradient.gif) repeat-x top left;
margin:0;
padding:0;
}
div#header form {
margin:0;
padding:0;
}
div#header div#headerInner {
margin:0;
padding:0;
}
div#header div#headerInner div#logoContainer {}
div#header div#headerInner div#logoContainerInner {
width:550px;
margin:0 auto;
padding:20px;
}
div#header div#headerInner div#logoContainer div#logo {
float:left;
width:200px;
}
div#header div#headerInner div#logoContainer div#logo a,
div#header div#headerInner div#logoContainer div#logo a:hover {
border:none;
background:none;
}
div#header div#headerInner div#logoContainer div#feed {
float:right;
width:300px;
text-align:right;
padding:10px 0 0 0;
}
div#header div#headerInner div#logoContainer div#feed input.text {
width:60%;
}
div#header div#headerInner div#menu {
background:#eee url(background_menuitem_shadow.gif) repeat-x top left;
border-top:2px solid #ccc;
border-bottom:1px solid #ddd;
text-align:center;
}
div#header div#headerInner div#menu table {
width:auto;
margin:0 auto;
}
div#header div#headerInner div#menu ul {
display:block;
width:100%;
margin:0 auto;
padding:0;
font-size:12px;
}
div#header div#headerInner div#menu ul li {
display:block;
float:left;
}
div#header div#headerInner div#menu ul li a {
display:block;
margin:-2px 0 0 0;
padding:5px 7px 8px 7px;
text-decoration:none;
color:#666 !important;
background-color:transparent;
}
div#header div#headerInner div#menu ul li a:hover {
display:block;
margin:-2px 0 0 0;
padding:5px 7px 8px 7px;
text-decoration:none;
color:#666;
background:#fff url(background_menuitem_off.gif) no-repeat bottom right;
}
body#bodydemo div#header div#headerInner div#menu ul li#demo a {
display:block;
margin:-2px 0 0 0;
padding:5px 7px 8px 7px;
text-decoration:none;
color:#333;
font-weight:bold;
background:#fff url(background_menuitem.gif) no-repeat bottom right;
}
/*********************************************
CONTENT STYLES
*********************************************/
div.chunk {
margin:20px 0 0 0;
padding:0 0 10px 0;
border-bottom:1px solid #ccc;
}
div.topchunk {
margin:0 !important;
}
.footnote,
.footnote a {
font-size:12px;
line-height:1.3em;
color:#aaa;
}
.footnote em {
background-color:transparent;
font-style:italic;
}
.footnote code {
background-color:transparent;
font:11px/14px monospace;
color:#aaa;
}
p.subscribe {
background-color:#f3f3f3;
font-size:12px;
text-align:center;
}
p.highlight {
background-color:#ffc;
font-size:12px;
text-align:center;
}
p.sample_feeds {
font-size:12px;
line-height:1.2em;
}
div.sp_errors {
background-color:#eee;
padding:5px;
text-align:center;
font-size:12px;
}
.noborder {
border:none !important;
}
img.favicon {
margin:0 4px -2px 0;
width:16px;
height:16px;
}
p.favicons a,
p.favicons a:hover {
border:none;
background-color:transparent;
}
p.favicons img {
border:none;
}
/*********************************************
DEMO STYLES
*********************************************/
div#sp_input {
background-color:#ffc;
border:2px solid #f90;
padding:5px;
text-align:center;
}
div#sp_input input.text {
border:1px solid #999;
background:#e9f5ff url(feed.png) no-repeat 4px 50%;
width:75%;
padding:2px 2px 2px 28px;
font:18px/22px "Lucida Grande", Verdana, sans-serif;
font-weight:bold;
letter-spacing:-1px;
}
form#sp_form {
margin:15px 0;
}
div.focus {
margin:0;
padding:10px 20px;
background-color:#efe;
}
p.sample_feeds {
text-align:justify;
}
/*********************************************
SIFR STYLES
*********************************************/
.sIFR-active h3.header {
visibility:hidden;
line-height:1em;
}

View file

@ -1,31 +0,0 @@
/**********************************************************
Sleight
(c) 2001, Aaron Boodman
http://www.youngpup.net
**********************************************************/
if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent)
{
document.writeln('<style type="text/css">img { visibility:hidden; } </style>');
window.attachEvent("onload", fnLoadPngs);
}
function fnLoadPngs()
{
var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--)
{
if (itsAllGood && img.src.match(/\.png$/i) != null)
{
var src = img.src;
var div = document.createElement("DIV");
div.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizing='scale')"
div.style.width = img.width + "px";
div.style.height = img.height + "px";
img.replaceNode(div);
}
img.style.visibility = "visible";
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

View file

@ -1,71 +0,0 @@
/*=:project
scalable Inman Flash Replacement (sIFR) version 3.
=:file
Copyright: 2006 Mark Wubben.
Author: Mark Wubben, <http://novemberborn.net/>
=:history
* IFR: Shaun Inman
* sIFR 1: Mike Davidson, Shaun Inman and Tomas Jogin
* sIFR 2: Mike Davidson, Shaun Inman, Tomas Jogin and Mark Wubben
=:license
This software is licensed and provided under the CC-GNU LGPL.
See <http://creativecommons.org/licenses/LGPL/2.1/>
*/
import TextField.StyleSheet;
class SifrStyleSheet extends TextField.StyleSheet {
public var fontSize;
public var latestLeading = 0;
public function parseCSS(cssText:String) {
var native = new TextField.StyleSheet();
var parsed = native.parseCSS(cssText);
if(!parsed) return false;
var selectors = native.getStyleNames();
for(var i = selectors.length - 1; i >= 0; i--) {
var selector = selectors[i];
var nativeStyle = native.getStyle(selector);
var style = this.getStyle(selector) || nativeStyle;
if(style != nativeStyle) {
for(var property in nativeStyle) style[property] = nativeStyle[property];
}
this.setStyle(selector, style);
}
return true;
}
// Apply leading to the textFormat. Much thanks to <http://www.blog.lessrain.com/?p=98>.
private function applyLeading(format, leading) {
this.latestLeading = leading;
if(leading >= 0) {
format.leading = leading;
return format;
}
// Workaround for negative leading, which is ignored otherwise.
var newFormat = new TextFormat(null, null, null, null, null, null, null, null, null, null, null, null, leading);
for(var property in format) if(property != 'leading') newFormat[property] = format[property];
return newFormat;
}
public function transform(style) {
var format = super.transform(style);
if(style.leading) format = applyLeading(format, style.leading);
if(style.letterSpacing) format.letterSpacing = style.letterSpacing;
// Support font sizes relative to the size of .sIFR-root.
if(this.fontSize && style.fontSize && style.fontSize.indexOf('%')) {
format.size = this.fontSize * parseInt(style.fontSize) / 100;
}
format.kerning = _root.kerning == 'true' || !(_root.kerning == 'false') || sIFR.defaultKerning;
return format;
}
}

View file

@ -1,12 +0,0 @@
This is a pre-release nightly of sIFR 3 (r245 to be exact). We (the SimplePie team) will be updating the
sIFR code and font files from time to time as new releases of sIFR 3 are made available.
In this folder you'll find a few Flash 8 files. The only one of you might want to mess with is sifr.fla.
* Open it up
* Double-click the rectangle in the middle
* Select all
* Change the font
More information about sIFR 3 can be found here:
* http://dev.novemberborn.net/sifr3/
* http://wiki.novemberborn.net/sifr3/

View file

@ -1,12 +0,0 @@
// MTASC only parses as-files with class definitions, so here goes...
class Options {
public static function apply() {
sIFR.fromLocal = true;
sIFR.domains = ['*'];
// Parsing `p.foo` might not work, see: <http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004&file=00001766.html>
// Appearantly you have to use hex color codes as well, names are not supported!
sIFR.styles.parseCSS('.foo { text-decoration: underline; }');
}
}

View file

@ -1,359 +0,0 @@
/*=:project
scalable Inman Flash Replacement (sIFR) version 3.
=:file
Copyright: 2006 Mark Wubben.
Author: Mark Wubben, <http://novemberborn.net/>
=:history
* IFR: Shaun Inman
* sIFR 1: Mike Davidson, Shaun Inman and Tomas Jogin
* sIFR 2: Mike Davidson, Shaun Inman, Tomas Jogin and Mark Wubben
=:license
This software is licensed and provided under the CC-GNU LGPL.
See <http://creativecommons.org/licenses/LGPL/2.1/>
*/
import SifrStyleSheet;
class sIFR {
public static var DEFAULT_TEXT = 'Rendered with sIFR 3, revision 245';
public static var CSS_ROOT_CLASS = 'sIFR-root';
public static var DEFAULT_WIDTH = 300;
public static var DEFAULT_HEIGHT = 100;
public static var DEFAULT_ANTI_ALIAS_TYPE = 'advanced';
public static var MARGIN_LEFT = -3;
public static var PADDING_BOTTOM = 5; // Extra padding to make sure the movie is high enough in most cases.
public static var LEADING_REMAINDER = 2; // Flash uses the specified leading minus 2 as the applied leading.
public static var MAX_FONT_SIZE = 126;
public static var ALIASING_MAX_FONT_SIZE = 48;
//= Holds CSS properties and other rendering properties for the Flash movie.
// *Don't overwrite!*
public static var styles:SifrStyleSheet = new SifrStyleSheet();
//= Allow sIFR to be run from localhost
public static var fromLocal:Boolean = true;
//= Array containing domains for which sIFR may render text. Used to prevent
// hotlinking. Use `*` to allow all domains.
public static var domains:Array = [];
//= Whether kerning is enabled by default. This can be overriden from the client side.
// See also <http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002811.html>.
public static var defaultKerning:Boolean = true;
//= Default value which can be overriden from the client side.
// See also <http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002788.html>.
public static var defaultSharpness:Number = 0;
//= Default value which can be overriden from the client side.
// See also <http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002787.html>.
public static var defaultThickness:Number = 0;
//= Default value which can be overriden from the client side.
// See also <http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002732.html>.
public static var defaultOpacity:Number = -1; // Use client settings
//= Default value which can be overriden from the client side.
// See also <http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002788.html>.
public static var defaultBlendMode:Number = -1; // Use cliest settings
//= Overrides the grid fit type as defined on the client side.
// See also <http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002444.html>.
public static var enforcedGridFitType:String = null;
//= If `true` sIFR won't override the anti aliasing set in the Flash IDE when exporting.
// Thickness and sharpness won't be affected either.
public static var preserveAntiAlias:Boolean = false;
//= If `true` sIFR will disable anti-aliasing if the font size is larger than `ALIASING_MAX_FONT_SIZE`.
// This setting is *independent* from `preserveAntiAlias`.
public static var conditionalAntiAlias:Boolean = true;
//= Sets the anti alias type. By default it's `DEFAULT_ANTI_ALIAS_TYPE`.
// See also <http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002733.html>.
public static var antiAliasType:String = null;
//= Flash filters can be added to this array and will be applied to the text field.
public static var filters:Array = [];
//= A mapping from the names of the filters to their actual objecs, used when transforming
// filters defined on the client. You can add additional filters here so they'll be supported
// when defined on the client.
public static var filterMap:Object = {
DisplacementMapFilter : flash.filters.DisplacementMapFilter,
ColorMatrixFilter : flash.filters.ColorMatrixFilter,
ConvolutionFilter : flash.filters.ConvolutionFilter,
GradientBevelFilter : flash.filters.GradientBevelFilter,
GradientGlowFilter : flash.filters.GradientGlowFilter,
BevelFilter : flash.filters.BevelFilter,
GlowFilter : flash.filters.GlowFilter,
BlurFilter : flash.filters.BlurFilter,
DropShadowFilter : flash.filters.DropShadowFilter
};
private static var instance;
private var textField;
private var content;
private var realHeight;
private var originalHeight;
private var currentHeight;
private var fontSize;
private var tuneWidth;
private var tuneHeight;
//= Sets the default styles for `sIFR.styles`. This method is called
// directly in `sifr.fla`, before options are applied.
public static function setDefaultStyles() {
sIFR.styles.parseCSS([
'.', CSS_ROOT_CLASS, ' { color: #000000; }',
'strong { display: inline; font-weight: bold; } ',
'em { display: inline; font-style: italic; }',
'a { color: #0000FF; text-decoration: underline; }',
'a:hover { color: #0000FF; text-decoration: none; }'
].join(''));
}
//= Validates the domain sIFR is being used on.
// Returns `true` if the domain is valid, `false` otherwise.
public static function checkDomain():Boolean {
if(sIFR.domains.length == 0) return true;
var domain = (new LocalConnection()).domain();
if(sIFR.fromLocal) sIFR.domains.push('localhost');
for(var i = 0; i < sIFR.domains.length; i++) {
var match = sIFR.domains[i];
if(match == '*' || match == domain) return true;
var wildcard = match.lastIndexOf('*');
if(wildcard > -1) {
match = match.substr(wildcard + 1);
var matchPosition = domain.lastIndexOf(match);
if(matchPosition > -1 && (matchPosition + match.length) == domain.length) return true;
}
}
return false;
}
//= Runs sIFR. Called automatically.
public static function run() {
var holder = _root.holder;
var content = checkDomain() ? unescape(_root.content) : DEFAULT_TEXT
if(content == 'undefined' || content == '') {
content = DEFAULT_TEXT;
fscommand('resetmovie', '');
} else fscommand('ping', '');
// Sets stage parameters
Stage.scaleMode = 'noscale';
Stage.align = 'TL';
Stage.showMenu = false;
// Other parameters
var opacity = parseInt(_root.opacity);
if(!isNaN(opacity)) holder._alpha = sIFR.defaultOpacity == -1 ? opacity : sIFR.defaultOpacity;
else holder._alpha = 100;
_root.blendMode = sIFR.defaultBlendMode == -1 ? _root.blendmode : sIFR.defaultBlendMode;
sIFR.instance = new sIFR(holder.txtF, content);
// This should ignore resizes from the callback. Disabled for now.
/* if(_root.zoomsupport == 'true') Stage.addListener({onResize: function() { sIFR.instance.scale() }});*/
// Setup callbacks
_root.watch('callbackTrigger', function() {
sIFR.callback();
return false;
});
}
private static function eval(str) {
var as;
if(str.charAt(0) == '{') { // Ah, we need to create an object
as = {};
str = str.substring(1, str.length - 1);
var $ = str.split(',');
for(var i = 0; i < $.length; i++) {
var $1 = $[i].split(':');
as[$1[0]] = sIFR.eval($1[1]);
}
} else if(str.charAt(0) == '"') { // String
as = str.substring(1, str.length - 1);
} else if(str == 'true' || str == 'false') { // Boolean
as = str == 'true';
} else { // Float
as = parseFloat(str);
}
return as;
}
private function applyFilters() {
var $filters = this.textField.filters;
$filters = $filters.concat(sIFR.filters);
var $ = _root.flashfilters.split(';'); // name,prop:value,...;
for(var i = 0; i < $.length; i++) {
var $1 = $[i].split(',');
var newFilter = new sIFR.filterMap[$1[0]]();
for(var j = 1; j < $1.length; j++) {
var $2 = $1[j].split(':');
newFilter[$2[0]] = sIFR.eval(unescape($2[1]));
}
$filters.push(newFilter);
}
this.textField.filters = $filters;
}
private function sIFR(textField, content) {
this.textField = textField;
this.content = content;
var offsetLeft = parseInt(_root.offsetleft);
textField._x = MARGIN_LEFT + (isNaN(offsetLeft) ? 0 : offsetLeft);
var offsetTop = parseInt(_root.offsettop);
if(!isNaN(offsetTop)) textField._y += offsetTop;
tuneWidth = parseInt(_root.tunewidth);
if(isNaN(tuneWidth)) tuneWidth = 0;
tuneHeight = parseInt(_root.tuneheight);
if(isNaN(tuneHeight)) tuneHeight = 0;
textField._width = tuneWidth + (isNaN(parseInt(_root.width)) ? DEFAULT_WIDTH : parseInt(_root.width));
textField._height = tuneHeight + (isNaN(parseInt(_root.height)) ? DEFAULT_HEIGHT : parseInt(_root.height));
textField.wordWrap = true;
textField.selectable = _root.selectable == 'true';
textField.gridFitType = sIFR.enforcedGridFitType || _root.gridfittype;
this.applyFilters();
// Determine font-size and the number of lines
this.fontSize = parseInt(_root.size);
if(isNaN(this.fontSize)) this.fontSize = 26;
styles.fontSize = this.fontSize;
if(!sIFR.preserveAntiAlias && (sIFR.conditionalAntiAlias && this.fontSize < ALIASING_MAX_FONT_SIZE
|| !sIFR.conditionalAntiAlias)) {
textField.antiAliasType = sIFR.antiAliasType || DEFAULT_ANTI_ALIAS_TYPE;
}
if(!sIFR.preserveAntiAlias || !isNaN(parseInt(_root.sharpness))) {
textField.sharpness = parseInt(_root.sharpness);
}
if(isNaN(textField.sharpness)) textField.sharpness = sIFR.defaultSharpness;
if(!sIFR.preserveAntiAlias || !isNaN(parseInt(_root.thickness))) {
textField.thickness = parseInt(_root.thickness);
}
if(isNaN(textField.thickness)) textField.thickness = sIFR.defaultThickness;
// Set font-size and other styles
sIFR.styles.parseCSS(unescape(_root.css));
var rootStyle = styles.getStyle('.sIFR-root') || {};
rootStyle.fontSize = this.fontSize; // won't go higher than 126!
styles.setStyle('.sIFR-root', rootStyle);
textField.styleSheet = styles;
this.write(content);
this.repaint();
}
private function repaint() {
var leadingFix = this.isSingleLine() ? sIFR.styles.latestLeading : 0;
if(leadingFix > 0) leadingFix -= LEADING_REMAINDER;
// Flash wants to scroll the movie by one line, by adding the fontSize to the
// textField height this is no longer happens. We also add the absolute tuneHeight,
// to prevent a negative value from triggering the bug. We won't send the fake
// value to the JavaScript side, though.
textField._height = textField.textHeight + PADDING_BOTTOM + this.fontSize + Math.abs(tuneHeight) + tuneHeight - leadingFix;
this.realHeight = textField._height - this.fontSize - Math.abs(tuneHeight);
var arg = 'height:' + this.realHeight;
if(_root.fitexactly == 'true') arg += ',width:' + (textField.textWidth + tuneWidth);
fscommand('resize', arg);
this.originalHeight = textField._height;
this.currentHeight = Stage.height;
textField._xscale = textField._yscale = parseInt(_root.zoom);
}
private function write(content) {
this.textField.htmlText = ['<p class="', CSS_ROOT_CLASS, '">',
content, '</p>'
].join('');
}
private function isSingleLine() {
return Math.round((this.textField.textHeight - sIFR.styles.latestLeading) / this.fontSize) == 1;
}
//= Scales the text field to the new scale of the Flash movie itself.
public function scale() {
this.currentHeight = Stage.height;
var scale = 100 * Math.round(this.currentHeight / this.originalHeight);
textField._xscale = textField._yscale = scale;
}
private function calculateRatios() {
var strings = ['X', 'X<br>X', 'X<br>X<br>X', 'X<br>X<br>X<br>X'];
var results = {};
for(var i = 1; i <= strings.length; i++) {
var size = 6;
this.write(strings[i - 1]);
while(size < MAX_FONT_SIZE) {
var rootStyle = sIFR.styles.getStyle('.sIFR-root') || {};
rootStyle.fontSize = size;
sIFR.styles.setStyle('.sIFR-root', rootStyle);
this.textField.styleSheet = sIFR.styles;
this.repaint();
var ratio = (this.realHeight - PADDING_BOTTOM) / i / size;
if(!results[size]) results[size] = ratio;
else results[size] = ((i - 1) * results[size] + ratio) / i;
size++;
}
}
var sizes = [], ratios = [];
var ratiosToSizes = {}, sizesToRatios = {};
for(var size in results) {
if(results[size] == Object.prototype[size]) continue;
var ratio = results[size];
ratiosToSizes[ratio] = Math.max(ratio, parseInt(size));
}
for(var ratio in ratiosToSizes) {
if(ratiosToSizes[ratio] == Object.prototype[ratio]) continue;
sizesToRatios[ratiosToSizes[ratio]] = roundDecimals(ratio, 2);
sizes.push(ratiosToSizes[ratio]);
}
sizes.sort(function(a, b) { return a - b; });
for(var j = 0; j < sizes.length - 1; j++) ratios.push(sizes[j], sizesToRatios[sizes[j]]);
ratios.push(sizesToRatios[sizes[sizes.length - 1]]);
fscommand('debug:ratios', '[' + ratios.join(',') + ']');
}
private function roundDecimals(value, decimals) {
return Math.round(value * Math.pow(10, decimals)) / Math.pow(10, decimals);
}
public static function callback() {
switch(_root.callbackType) {
case 'replacetext':
sIFR.instance.content = _root.callbackValue;
sIFR.instance.write(_root.callbackValue);
sIFR.instance.repaint();
break;
case 'resettext':
sIFR.instance.write('');
sIFR.instance.write(sIFR.instance.content);
break;
case 'ratios':
sIFR.instance.calculateRatios();
break;
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -1,6 +0,0 @@
<?php
// This should be modifed as your own use warrants.
require_once('../simplepie.inc');
SimplePie_Misc::display_cached_file($_GET['i'], './cache', 'spi');
?>

View file

@ -1,295 +0,0 @@
<?php
// Start counting time for the page load
$starttime = explode(' ', microtime());
$starttime = $starttime[1] + $starttime[0];
// Include SimplePie
// Located in the parent directory
include_once('../simplepie.inc');
include_once('../idn/idna_convert.class.php');
// Create a new instance of the SimplePie object
$feed = new SimplePie();
//$feed->force_fsockopen(true);
// Make sure that page is getting passed a URL
if (isset($_GET['feed']) && $_GET['feed'] !== '')
{
// Strip slashes if magic quotes is enabled (which automatically escapes certain characters)
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc())
{
$_GET['feed'] = stripslashes($_GET['feed']);
}
// Use the URL that was passed to the page in SimplePie
$feed->set_feed_url($_GET['feed']);
// XML dump
$feed->enable_xml_dump(isset($_GET['xmldump']) ? true : false);
}
// Allow us to change the input encoding from the URL string if we want to. (optional)
if (!empty($_GET['input']))
{
$feed->set_input_encoding($_GET['input']);
}
// Allow us to choose to not re-order the items by date. (optional)
if (!empty($_GET['orderbydate']) && $_GET['orderbydate'] == 'false')
{
$feed->enable_order_by_date(false);
}
// Allow us to cache images in feeds. This will also bypass any hotlink blocking put in place by the website.
if (!empty($_GET['image']) && $_GET['image'] == 'true')
{
$feed->set_image_handler('./handler_image.php');
}
// We'll enable the discovering and caching of favicons.
$feed->set_favicon_handler('./handler_image.php');
// Initialize the whole SimplePie object. Read the feed, process it, parse it, cache it, and
// all that other good stuff. The feed's information will not be available to SimplePie before
// this is called.
$success = $feed->init();
// We'll make sure that the right content type and character encoding gets set automatically.
// This function will grab the proper character encoding, as well as set the content type to text/html.
$feed->handle_content_type();
// When we end our PHP block, we want to make sure our DOCTYPE is on the top line to make
// sure that the browser snaps into Standards Mode.
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<title>SimplePie: Demo</title>
<link rel="stylesheet" href="./for_the_demo/sIFR-screen.css" type="text/css" media="screen">
<link rel="stylesheet" href="./for_the_demo/sIFR-print.css" type="text/css" media="print">
<link rel="stylesheet" href="./for_the_demo/simplepie.css" type="text/css" media="screen, projector" />
<script type="text/javascript" src="./for_the_demo/sifr.js"></script>
<script type="text/javascript" src="./for_the_demo/sifr-config.js"></script>
<script type="text/javascript" src="./for_the_demo/sleight.js"></script>
</head>
<body id="bodydemo">
<div id="header">
<div id="headerInner">
<div id="logoContainer">
<div id="logoContainerInner">
<div align="center"><a href="http://simplepie.org"><img src="./for_the_demo/logo_simplepie_demo.png" alt="SimplePie Demo: PHP-based RSS and Atom feed handling" title="SimplePie Demo: PHP-based RSS and Atom feed handling" border="0" /></a></div>
<div class="clearLeft"></div>
</div>
</div>
<div id="menu">
<!-- I know, I know, I know... tables for layout, I know. If a web standards evangelist (like me) has to resort
to using tables for something, it's because no other possible solution could be found. This issue? No way to
do centered floats purely with CSS. The table box model allows for a dynamic width while centered, while the
CSS box model for DIVs doesn't allow for it. :( -->
<table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td>
<ul><li id="demo"><a href="./">SimplePie Demo</a></li><li><a href="http://simplepie.org/wiki/faq/start">FAQ/Troubleshooting</a></li><li><a href="http://simplepie.org/support/">Support Forums</a></li><li><a href="http://simplepie.org/wiki/reference/start">API Reference</a></li><li><a href="http://simplepie.org/blog/">Weblog</a></li><li><a href="../test/test.php">Unit Tests</a></li></ul>
<div class="clearLeft"></div>
</td></tr></tbody></table>
</div>
</div>
</div>
<div id="site">
<div id="content">
<div class="chunk">
<form action="" method="get" name="sp_form" id="sp_form">
<div id="sp_input">
<!-- If a feed has already been passed through the form, then make sure that the URL remains in the form field. -->
<p><input type="text" name="feed" value="<?php if ($feed->subscribe_url()) echo $feed->subscribe_url(); ?>" class="text" id="feed_input" />&nbsp;<input type="submit" value="Read" class="button" /></p>
</div>
</form>
<?php
// Check to see if there are more than zero errors (i.e. if there are any errors at all)
if ($feed->error())
{
// If so, start a <div> element with a classname so we can style it.
echo '<div class="sp_errors">' . "\r\n";
// ... and display it.
echo '<p>' . htmlspecialchars($feed->error()) . "</p>\r\n";
// Close the <div> element we opened.
echo '</div>' . "\r\n";
}
?>
<!-- Here are some sample feeds. -->
<p class="sample_feeds"><strong>Or try one of the following:</strong>
<a href="?feed=http://www.詹姆斯.com/atomtests/iri/everything.atom" title="Test: International Domain Name support">詹姆斯.com</a>,
<a href="?feed=http://www.adultswim.com/williams/podcast/tools/xml/video_rss.xml" title="Humor from the people who make [adult swim] cartoons.">adult swim</a>,
<a href="?feed=http://afterdawn.com/news/afterdawn_rss.xml" title="Ripping, Burning, DRM, and the Dark Side of Consumer Electronics Media">Afterdawn</a>,
<a href="?feed=http://feeds.feedburner.com/ajaxian" title="AJAX and Scripting News">Ajaxian</a>,
<a href="?feed=http://www.andybudd.com/index.rdf&amp;image=true" title="Test: Bypass Image Hotlink Blocking">Andy Budd</a>,
<a href="?feed=http://feeds.feedburner.com/AskANinja" title="Test: Embedded Enclosures">Ask a Ninja</a>,
<a href="?feed=http://www.atomenabled.org/atom.xml" title="Test: Atom 1.0 Support">AtomEnabled.org</a>,
<a href="?feed=http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml" title="World News">BBC News</a>,
<a href="?feed=http://newsrss.bbc.co.uk/rss/arabic/news/rss.xml" title="Test: Windows-1256 Encoding">BBC Arabic</a>,
<a href="?feed=http://newsrss.bbc.co.uk/rss/chinese/simp/news/rss.xml" title="Test: GB2312 Encoding">BBC China</a>,
<a href="?feed=http://newsrss.bbc.co.uk/rss/russian/news/rss.xml" title="Test: Windows-1251 Encoding">BBC Russia</a>,
<a href="?feed=http://inessential.com/xml/rss.xml" title="Developer of NetNewsWire">Brent Simmons</a>,
<a href="?feed=http://www.channelfrederator.com/rss" title="Test: Embedded Enclosures">Channel Frederator</a>,
<a href="?feed=http://rss.cnn.com/rss/cnn_topstories.rss" title="World News">CNN</a>,
<a href="?feed=http://digg.com/rss/index.xml" title="Tech news. Better than Slashdot.">Digg</a>,
<a href="?feed=http://revision3.com/diggnation/feed/quicktime-large" title="Tech and industry videocast.">Diggnation</a>,
<a href="?feed=http://www.flickr.com/services/feeds/photos_public.gne?format=rss2" title="Flickr Photos">Flickr</a>,
<a href="?feed=http://news.google.com/?output=rss" title="World News">Google News</a>,
<a href="?feed=http://video.google.com/videofeed?type=top100new&num=20&output=rss" title="Test: Media RSS Support">Google Video</a>,
<a href="?feed=http://blogs.law.harvard.edu/home/feed/rdf/" title="Test: Tag Stripping">Harvard Law</a>,
<a href="?feed=http://hagada.org.il/hagada/html/backend.php" title="Test: Window-1255 Encoding">Hebrew Language</a>,
<a href="?feed=http://www.infoworld.com/rss/news.xml" title="Test: Ad Stripping">InfoWorld</a>,
<a href="?feed=http://phobos.apple.com/WebObjects/MZStore.woa/wpa/MRSS/topsongs/limit=10/rss.xml&orderbydate=false" title="Test: Tag Stripping">iTunes</a>,
<a href="?feed=http://blog.japan.cnet.com/lessig/index.rdf" title="Test: EUC-JP Encoding">Japanese Language</a>,
<a href="?feed=http://nurapt.kaist.ac.kr/~jamaica/htmls/blog/rss.php&amp;input=EUC-KR" title="Test: EUC-KR Encoding">Korean Language</a>,
<a href="?feed=http://mir.aculo.us/xml/rss/feed.xml" title="Weblog for the developer of Scriptaculous">mir.aculo.us</a>,
<a href="?feed=http://images.apple.com/trailers/rss/newtrailers.rss" title="Apple's QuickTime movie trailer site">Movie Trailers</a>,
<a href="?feed=http://www.newspond.com/rss/main.xml" title="Tech and Science News">Newspond</a>,
<a href="?feed=http://nick.typepad.com/blog/index.rss" title="Developer of TopStyle and FeedDemon">Nick Bradbury</a>,
<a href="?feed=http://feeds.feedburner.com/ok-cancel" title="Usability comics and commentary">OK/Cancel</a>,
<a href="?feed=http://osnews.com/files/recent.rdf" title="News about every OS ever">OS News</a>,
<a href="?feed=http://weblog.philringnalda.com/feed/" title="Test: Atom 1.0 Support">Phil Ringnalda</a>,
<a href="?feed=http://kabili.libsyn.com/rss" title="Test: Improved enclosure type sniffing">Photoshop Videocast</a>,
<a href="?feed=http://www.pariurisportive.com/blog/xmlsrv/rss2.php?blog=2" title="Test: ISO-8859-1 Encoding">Romanian Language</a>,
<a href="?feed=http://www.erased.info/rss2.php" title="Test: KOI8-R Encoding">Russian Language</a>,
<a href="?feed=http://www.upsaid.com/isis/index.rdf" title="Test: BIG5 Encoding">Traditional Chinese Language</a>,
<a href="?feed=http://technorati.com/watchlists/rss.html?wid=29290" title="Technorati watch for SimplePie">Technorati</a>,
<a href="?feed=http://www.tbray.org/ongoing/ongoing.atom" title="Test: Atom 1.0 Support">Tim Bray</a>,
<a href="?feed=http://tuaw.com/rss.xml" title="Apple News">TUAW</a>,
<a href="?feed=http://www.tvgasm.com/atom.xml&amp;image=true" title="Test: Bypass Image Hotlink Blocking">TVgasm</a>,
<a href="?feed=http://uneasysilence.com/feed/" title="Interesting tech randomness">UNEASYsilence</a>,
<a href="?feed=http://feeds.feedburner.com/web20Show" title="Test: Embedded Enclosures">Web 2.0 Show</a>,
<a href="?feed=http://windowsvistablog.com/blogs/MainFeed.aspx" title="Test: Tag Stripping">Windows Vista Blog</a>,
<a href="?feed=http://xkcd.com/rss.xml" title="Test: LightHTTPd and GZipping">XKCD</a>,
<a href="?feed=http://rss.news.yahoo.com/rss/topstories" title="World News">Yahoo! News</a>,
<a href="?feed=http://youtube.com/rss/global/top_favorites.rss" title="Funny user-submitted videos">You Tube</a>,
<a href="?feed=http://zeldman.com/rss/" title="The father of the web standards movement">Zeldman</a></p>
</div>
<div id="sp_results">
<!-- As long as the feed has data to work with... -->
<?php if ($success): ?>
<div class="chunk focus" align="center">
<!-- If the feed has a link back to the site that publishes it (which 99% of them do), link the feed's title to it. -->
<h3 class="header"><?php if ($feed->get_link()) echo '<a href="' . $feed->get_link() . '">'; echo $feed->get_title(); if ($feed->get_link()) echo '</a>'; ?></h3>
<!-- If the feed has a description, display it. -->
<?php echo $feed->get_description(); ?>
</div>
<!-- Add subscribe links for several different aggregation services -->
<p class="subscribe"><strong>Subscribe:</strong> <a href="<?php echo $feed->subscribe_bloglines(); ?>">Bloglines</a>, <a href="<?php echo $feed->subscribe_google(); ?>">Google Reader</a>, <a href="<?php echo $feed->subscribe_msn(); ?>">My MSN</a>, <a href="<?php echo $feed->subscribe_netvibes(); ?>">Netvibes</a>, <a href="<?php echo $feed->subscribe_newsburst(); ?>">Newsburst</a><br /><a href="<?php echo $feed->subscribe_newsgator(); ?>">Newsgator</a>, <a href="<?php echo $feed->subscribe_odeo(); ?>">Odeo</a>, <a href="<?php echo $feed->subscribe_podnova(); ?>">Podnova</a>, <a href="<?php echo $feed->subscribe_rojo(); ?>">Rojo</a>, <a href="<?php echo $feed->subscribe_yahoo(); ?>">My Yahoo!</a>, <a href="<?php echo $feed->subscribe_feed(); ?>">Desktop Reader</a></p>
<!-- Let's begin looping through each individual news item in the feed. -->
<?php foreach($feed->get_items() as $item): ?>
<div class="chunk">
<?php
// Let's add a favicon for each item. If one doesn't exist, we'll use an alternate one.
if (!$favicon = $feed->get_favicon())
{
$favicon = './for_the_demo/favicons/alternate.png';
}
?>
<!-- If the item has a permalink back to the original post (which 99% of them do), link the item's title to it. -->
<h4><img src="<?php echo $favicon; ?>" alt="Favicon" class="favicon" /><?php if ($item->get_permalink()) echo '<a href="' . $item->get_permalink() . '">'; echo $item->get_title(); if ($item->get_permalink()) echo '</a>'; ?>&nbsp;<span class="footnote"><?php echo $item->get_date('j M Y, g:i a'); ?></span></h4>
<!-- Display the item's primary content. -->
<?php echo $item->get_content(); ?>
<?php
// Check for enclosures. If an item has any, set the first one to the $enclosure variable.
if ($enclosure = $item->get_enclosure(0))
{
// Use the embed() method to embed the enclosure into the page inline.
echo '<div align="center">';
echo '<p>' . $enclosure->embed(array(
'audio' => './for_the_demo/place_audio.png',
'video' => './for_the_demo/place_video.png',
'mediaplayer' => './for_the_demo/mediaplayer.swf',
'altclass' => 'download'
)) . '</p>';
if ($enclosure->get_link() && $enclosure->get_type())
{
echo '<p class="footnote" align="center">(' . $enclosure->get_type();
if ($enclosure->get_size())
{
echo '; ' . $enclosure->get_size() . ' MB';
}
echo ')</p>';
}
if ($enclosure->get_thumbnail())
{
echo '<div><img src="' . $enclosure->get_thumbnail() . '" alt="" /></div>';
}
echo '</div>';
}
?>
<!-- Add links to add this post to one of a handful of services. -->
<p class="footnote favicons" align="center">
<a href="<?php echo $item->add_to_blinklist(); ?>" title="Add post to Blinklist"><img src="./for_the_demo/favicons/blinklist.png" alt="Blinklist" /></a>
<a href="<?php echo $item->add_to_blogmarks(); ?>" title="Add post to Blogmarks"><img src="./for_the_demo/favicons/blogmarks.png" alt="Blogmarks" /></a>
<a href="<?php echo $item->add_to_delicious(); ?>" title="Add post to del.icio.us"><img src="./for_the_demo/favicons/delicious.png" alt="del.icio.us" /></a>
<a href="<?php echo $item->add_to_digg(); ?>" title="Digg this!"><img src="./for_the_demo/favicons/digg.png" alt="Digg" /></a>
<a href="<?php echo $item->add_to_magnolia(); ?>" title="Add post to Ma.gnolia"><img src="./for_the_demo/favicons/magnolia.png" alt="Ma.gnolia" /></a>
<a href="<?php echo $item->add_to_myweb20(); ?>" title="Add post to My Web 2.0"><img src="./for_the_demo/favicons/myweb2.png" alt="My Web 2.0" /></a>
<a href="<?php echo $item->add_to_newsvine(); ?>" title="Add post to Newsvine"><img src="./for_the_demo/favicons/newsvine.png" alt="Newsvine" /></a>
<a href="<?php echo $item->add_to_reddit(); ?>" title="Add post to Reddit"><img src="./for_the_demo/favicons/reddit.png" alt="Reddit" /></a>
<a href="<?php echo $item->add_to_segnalo(); ?>" title="Add post to Segnalo"><img src="./for_the_demo/favicons/segnalo.png" alt="Segnalo" /></a>
<a href="<?php echo $item->add_to_simpy(); ?>" title="Add post to Simpy"><img src="./for_the_demo/favicons/simpy.png" alt="Simpy" /></a>
<a href="<?php echo $item->add_to_spurl(); ?>" title="Add post to Spurl"><img src="./for_the_demo/favicons/spurl.png" alt="Spurl" /></a>
<a href="<?php echo $item->add_to_wists(); ?>" title="Add post to Wists"><img src="./for_the_demo/favicons/wists.png" alt="Wists" /></a>
<a href="<?php echo $item->search_technorati(); ?>" title="Who's linking to this post?"><img src="./for_the_demo/favicons/technorati.png" alt="Technorati" /></a>
</p>
</div>
<!-- Stop looping through each item once we've gone through all of them. -->
<?php endforeach; ?>
<!-- From here on, we're no longer using data from the feed. -->
<?php endif; ?>
</div>
<div>
<!-- Display how fast the page was rendered. -->
<p class="footnote">Page processed in <?php $mtime = explode(' ', microtime()); echo round($mtime[0] + $mtime[1] - $starttime, 3); ?> seconds.</p>
<!-- Display the version of SimplePie being loaded. -->
<p class="footnote">Powered by <a href="<?php echo SIMPLEPIE_URL; ?>"><?php echo SIMPLEPIE_NAME . ' ' . SIMPLEPIE_VERSION . ', Build ' . SIMPLEPIE_BUILD; ?></a>. Run the <a href="../compatibility_test/sp_compatibility_test.php">SimplePie Compatibility Test</a>. SimplePie is &copy; 2004&ndash;<?php echo date('Y'); ?>, Ryan Parman and Geoffrey Sneddon, and licensed under the <a href="http://www.opensource.org/licenses/bsd-license.php">BSD License</a>.</p>
</div>
</div>
</div>
</body>
</html>

View file

@ -1,137 +0,0 @@
<?php
function microtime_float()
{
if (version_compare(phpversion(), '5.0.0', '>='))
{
return microtime(true);
}
else
{
list($usec, $sec) = explode(' ', microtime());
return ((float) $usec + (float) $sec);
}
}
$start = microtime_float();
include('../simplepie.inc');
// Parse it
$feed = new SimplePie();
if (!empty($_GET['feed']))
{
if (get_magic_quotes_gpc())
{
$_GET['feed'] = stripslashes($_GET['feed']);
}
$feed->set_feed_url($_GET['feed']);
$feed->init();
}
$feed->handle_content_type();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo (empty($_GET['feed'])) ? 'SimplePie' : 'SimplePie: ' . $feed->get_title(); ?></title>
<!-- META HTTP-EQUIV -->
<meta http-equiv="content-type" content="text/html; charset=<?php echo ($feed->get_encoding()) ? $feed->get_encoding() : 'UTF-8'; ?>" />
<meta http-equiv="imagetoolbar" content="false" />
<style type="text/css">
html, body {
height:100%;
margin:0;
padding:0;
}
h1 {
background-color:#333;
color:#fff;
font-size:3em;
margin:0;
padding:5px 15px;
text-align:center;
}
div#footer {
padding:5px 0;
}
div#footer,
div#footer a {
text-align:center;
font-size:0.7em;
}
div#footer a {
text-decoration:underline;
}
code {
background-color:#f3f3ff;
color:#000;
}
pre {
background-color:#f3f3ff;
color:#000080;
border:1px dotted #000080;
padding:3px 5px;
}
form {
margin:0;
padding:0;
}
div.chunk {
border-bottom:1px solid #ccc;
}
form#sp_form {
text-align:center;
margin:0;
padding:0;
}
form#sp_form input.text {
width:85%;
}
</style>
</head>
<body>
<h1><?php echo (empty($_GET['feed'])) ? 'SimplePie' : 'SimplePie: ' . $feed->get_title(); ?></h1>
<form action="" method="get" name="sp_form" id="sp_form">
<p><input type="text" name="feed" value="<?php echo ($feed->subscribe_url()) ? htmlspecialchars($feed->subscribe_url()) : 'http://'; ?>" class="text" id="feed_input" />&nbsp;<input type="submit" value="Read" class="button" /></p>
</form>
<div id="sp_results">
<?php if ($feed->data): ?>
<?php $items = $feed->get_items(); ?>
<p align="center"><span style="background-color:#ffc;">Displaying <?php echo $feed->get_item_quantity(); ?> most recent entries.</span></p>
<?php foreach($items as $item): ?>
<div class="chunk" style="padding:0 5px;">
<h4><a href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a> <?php echo $item->get_date('j M Y'); ?></h4>
<?php echo $item->get_content(); ?>
<?php
if ($enclosure = $item->get_enclosure(0))
echo '<p><a href="' . $enclosure->get_link() . '" class="download"><img src="./for_the_demo/mini_podcast.png" alt="Podcast" title="Download the Podcast" border="0" /></a></p>';
?>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<div id="footer">
Powered by <?php echo SIMPLEPIE_LINKBACK; ?>, a product of <a href="http://www.skyzyx.com">Skyzyx Technologies</a>.<br />
Page created in <?php echo round(microtime_float()-$start, 3); ?> seconds.
</div>
</body>
</html>

View file

@ -1,108 +0,0 @@
<?php
/********************************************************************
MULTIFEEDS TEST PAGE
Nothing too exciting here. Just a sample page that demos integrated
Multifeeds support as well as cached favicons and perhaps a few other
things.
Lots of this code is commented to help explain some of the new stuff.
Code was tested in PHP 5.2.2, but *should* also work with earlier
versions of PHP, as supported by SimplePie (PHP 4.1).
********************************************************************/
// Include the SimplePie library, and the one that handles internationalized domain names.
require_once('../simplepie.inc');
require_once('../idn/idna_convert.class.php');
// Initialize some feeds for use.
$feed = new SimplePie();
$feed->set_feed_url(array(
'http://rss.news.yahoo.com/rss/topstories',
'http://news.google.com/?output=atom',
'http://rss.cnn.com/rss/cnn_topstories.rss'
));
// When we set these, we need to make sure that the handler_image.php file is also trying to read from the same cache directory that we are.
$feed->set_favicon_handler('./handler_image.php');
$feed->set_image_handler('./handler_image.php');
// Initialize the feed.
$feed->init();
// Make sure the page is being served with the UTF-8 headers.
$feed->handle_content_type();
// Begin the (X)HTML page.
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Multifeeds Test page</title>
<link rel="stylesheet" href="../demo/for_the_demo/simplepie.css" type="text/css" media="screen" title="SimplePie Styles" charset="utf-8" />
<style type="text/css">
div#site {
width:600px;
}
span.footnote {
white-space:nowrap;
}
h1 {
line-height:1.4em;
}
h4 {
padding-left:20px;
background-color:transparent;
background-repeat:no-repeat;
background-position:0 1px;
}
.clearBoth {
clear:both;
}
</style>
</head>
<body>
<div id="site">
<?php if ($feed->error): ?>
<p><?=$feed->error()?></p>
<?php endif ?>
<div class="chunk">
<h1>Quick-n-Dirty Multifeeds Demo</a></h1>
</div>
<?php
// Let's loop through each item in the feed.
foreach($feed->get_items() as $item):
// Let's give ourselves a reference to the parent $feed object for this particular item.
$feed = $item->get_feed();
?>
<div class="chunk">
<h4 style="background-image:url(<?php echo $feed->get_favicon(); ?>);"><a href="<?php echo $item->get_permalink(); ?>"><?php echo html_entity_decode($item->get_title(), ENT_QUOTES, 'UTF-8'); ?></a></h4>
<!-- get_content() prefers full content over summaries -->
<?php echo $item->get_content(); ?>
<?php if ($enclosure = $item->get_enclosure()): ?>
<div>
<?php echo $enclosure->native_embed(array(
// New 'mediaplayer' attribute shows off Flash-based MP3 and FLV playback.
'mediaplayer' => '../demo/for_the_demo/mediaplayer.swf'
)); ?>
</div>
<?php endif; ?>
<p class="footnote">Source: <a href="<?php echo $feed->get_permalink(); ?>"><?php echo $feed->get_title(); ?></a> | <?php echo $item->get_date('j M Y | g:i a'); ?></p>
</div>
<?php endforeach ?>
<p class="footnote">This is a test of the emergency broadcast system. This is only a test&hellip; beeeeeeeeeeeeeeeeeeeeeeeeeep!</p>
</div>
</body>
</html>

View file

@ -1,62 +0,0 @@
<?php
include_once('../simplepie.inc');
include_once('../idn/idna_convert.class.php');
// Parse it
$feed = new SimplePie();
if (isset($_GET['feed']) && $_GET['feed'] !== '')
{
if (get_magic_quotes_gpc())
{
$_GET['feed'] = stripslashes($_GET['feed']);
}
$feed->set_feed_url($_GET['feed']);
$feed->enable_cache(false);
$starttime = explode(' ', microtime());
$starttime = $starttime[1] + $starttime[0];
$feed->init();
$endtime = explode(' ', microtime());
$endtime = $endtime[1] + $endtime[0];
$time = $endtime - $starttime;
}
else
{
$time = 'null';
}
$feed->handle_content_type();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title>SimplePie Test</title>
<pre>
<?php
// memory_get_peak_usage() only exists on PHP 5.2 and higher if PHP is compiled with the --enable-memory-limit configuration option or on PHP 5.2.1 and higher (which runs as if --enable-memory-limit was on, with no option)
if (function_exists('memory_get_peak_usage'))
{
var_dump($time, memory_get_usage(), memory_get_peak_usage());
}
// memory_get_usage() only exists if PHP is compiled with the --enable-memory-limit configuration option or on PHP 5.2.1 and higher (which runs as if --enable-memory-limit was on, with no option)
else if (function_exists('memory_get_usage'))
{
var_dump($time, memory_get_usage());
}
else
{
var_dump($time);
}
// Output buffer
function callable_htmlspecialchars($string)
{
return htmlspecialchars($string);
}
ob_start('callable_htmlspecialchars');
// Output
print_r($feed);
ob_end_flush();
?>
</pre>