コード例 #1
0
ファイル: install.php プロジェクト: mm999/zebrafeeds
        echo ' Done</p>';
        displayProceedGotoButton(2);
    } else {
        echo '<br/>Please correct this and restart the installer.</p>';
    }
    echo '</div>';
} elseif ($_POST['step'] == 2) {
    echo '<div id="core">';
    echo '<h2>Step 2: Basic configuration</h2>';
    // set login method
    // set admin name
    // set admin pass
    // set url of zebrafeeds
    //
    //TODO: display just for confirmation. Extract last part and save as zebrafeeds folder name. use it in init.php
    $defaultUrl = dirname(getZfUrl());
    ?>

<form name="configform" action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
" method="post">

<div class="twocols">
	<div class="col1">
			<label for="zfurl">URL to ZebraFeeds folder: </label>
	</div>
	<div class="col2">
			<input name="zfurl" type="text" id="zfurl"	value="<?php 
    echo $defaultUrl;
    ?>
コード例 #2
0
ファイル: init.php プロジェクト: mm999/zebrafeeds
    error_reporting(E_ALL | E_STRICT);
    // preparation of performance monitoring
    global $zf_debugData;
    $zf_debugData['clock'][] = microtime();
    if (function_exists('getrusage')) {
        $dat = getrusage();
        $zf_debugData['utime_before'] = $dat["ru_utime.tv_sec"] . $dat["ru_utime.tv_usec"];
        $zf_debugData['stime_before'] = $dat["ru_stime.tv_sec"] . $dat["ru_stime.tv_usec"];
    }
} else {
    error_reporting(0);
    ini_set('display_errors', 'Off');
}
require_once INITDIR . '/includes/common.php';
setlocale(LC_ALL, ZF_LOCALE);
define("ZF_HOMEURL", getZfUrl());
// URL to your web page, were feeds are included;
ini_set("user_agent", ZF_USERAGENT);
//Defaults
function defaultConfig($name, $value)
{
    if (!defined($name)) {
        define($name, $value);
    }
}
//default values for parameters with a UI
defaultConfig('ZF_LOGINTYPE', 'session');
defaultConfig('ZF_LOCALE', 'english');
defaultConfig('ZF_PUBDATEFORMAT', '%x, %X');
defaultConfig('ZF_DATEFORMAT', '%x');
defaultConfig('ZF_REFRESHMODE', 'automatic');
コード例 #3
0
ファイル: addnewfeed.php プロジェクト: mm999/zebrafeeds
    ?>
" method="post">
		  Site URL :
		  <input name="siteurl" type="url" size="40"/>
		  <input type="submit" name="submitsiteurl" value="go"/>
		  </form>
		  (ex: http://cazalet.org/zebrafeeds)
	</div>
	<div class="frame">
	<strong>or RSS/RDF/ATOM feed address</strong><br/>
		  <br/>
		  <form name="form2" action="<?php 
    echo $_SERVER['PHP_SELF'] . '?zfaction=addnew';
    ?>
" method="post">
			Feed URL :
			<input name="feedurl" type="url" size="40"/>
			<input type="submit" name="submitfeedurl" value="go"/>
		  </form>
		  (ex: http://cazalet.org/zebrafeeds/feed)
	</div>
	<div class="frame">
	<?php 
    echo "<strong>or drag this bookmarklet : </strong><a href=\"javascript:(function(){els=document.getElementsByTagName('link');feeds='';cnt=0;for(i=0;i<els.length;i++){ty=(els[i].getAttribute('type')||'').toLowerCase();url=els[i].getAttribute('href');if(url&&(ty=='application/rss+xml'||ty=='application/atom+xml'||ty=='text/xml')){cnt++;if(url=prompt('Add this feed (#'+cnt+') to your ZebraFeeds enabled site ?',url)){feeds+=url+'|';}}};if(cnt==0){url=prompt('No feed detected. Enter feed address here:',url);if(url){feeds+=url+'|';}}if(feeds){feeds=feeds.substr(0,feeds.length-1);window.location='" . getZfUrl() . "index.php?zfaction=addnew&amp;feedurl='+encodeURIComponent(feeds);}})()\" title=\"Subscribe with ZebraFeeds\">Subscribe with ZebraFeeds</a><br/> to your browser links toolbar.<br/>";
    echo "<br/>Whenever you visit a site and you want to add it's syndicated content to your site,click &quot;Subscribe with ZebraFeeds&quot; button on your links toolbar, and it will try to find the site's RSS feed and auto-subscribe your site to it.";
    echo "<br/><br/>(note: if you change the location of ZebraFeeds on your webhost you must delete &quot;Subscribe with ZebraFeeds&quot; bookmark from your toolbar and come here and drag and drop again)";
    ?>
	</div>
</div>
<?php 
}