Ejemplo n.º 1
0
# published by the Free Software Foundation; either version 2 of the License,
# or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  or visit
# http://www.gnu.org/licenses/gpl.html
#
###############################################################################
# E-mail:      mbonetti at gmail dot com
# Web page:    http://gregarius.net/
###############################################################################
require_once '../core.php';
// Cache expires after 24 hours
rss_bootstrap(true, '', 24);
if (!isset($_GET['url'])) {
    exit;
}
$sql = "select data from " . getTable('cache') . " where cachetype='icon' and cachekey='" . rss_real_escape_string($_GET['url']) . "'";
list($blob) = rss_fetch_row(rss_query($sql));
if (!$blob) {
    exit;
} else {
    header('Content-Type: image/x-icon');
    echo $blob;
}
Ejemplo n.º 2
0
	<label for='chkChannelLink'>Display a mark read link for channels</label>
  </p>
</fieldset>
<p>
  <input type='checkbox' value='1' name='chkConfirm' id='chkConfirm'<?php 
        echo $options & MARKALLREAD_OPTION_CONFIIRM ? " checked='1'" : "";
        ?>
 />
  <label for='chkConfirm'>Ask for confirmation before marking items read</label>
</p>
<?php 
    }
}
if (isset($_REQUEST['myjs'])) {
    require_once '../core.php';
    rss_bootstrap(false, '$Revision: 1181 $', 0);
    require_once '../init.php';
    if (hidePrivate()) {
        return "";
    }
    ?>
function _confirmmarkallread( type, name )
{
	if( name != "" )
		name = " " + name;
	return window.confirm( "Are you sure that you want to mark all items in the " + type + name + " as read?" );
}

function _markallread(o,type,name)
{
	//window.alert( o.href + "&redirectto=" + escape(window.location) );
Ejemplo n.º 3
0
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  or visit
# http://www.gnu.org/licenses/gpl.html
#
###############################################################################
# E-mail:	   mbonetti at gmail dot com
# Web page:	   http://gregarius.net/
#
###############################################################################
require_once 'core.php';
rss_bootstrap();
require_once 'init.php';
if (isset($_REQUEST['method'])) {
    switch ($_REQUEST['method']) {
        case 'update':
            $uc = getUnreadCount(null, null);
            die("|{$uc}||");
            break;
        case 'listsubs':
            blOPML();
            break;
        case 'getitems':
            $cid = isset($_REQUEST['s']) ? $_REQUEST['s'] : null;
            $date = isset($_REQUEST['d']) ? $_REQUEST['d'] : null;
            $markread = isset($_REQUEST['n']) && $_REQUEST['n'] == '1';
            $cid = sanitize($cid, RSS_SANITIZER_NUMERIC);
Ejemplo n.º 4
0
# E-mail:      mbonetti at gmail dot com
# Web page:    http://gregarius.net/
#
###############################################################################
/// Name: del.icio.us Tags
/// Author: Marco Bonetti
/// Description: Fetches tag suggestions from del.icio.us
/// Version: 0.5
function __delicious_js_register($js)
{
    $js[] = getPath() . RSS_PLUGINS_DIR . "/delicious.php?deljs";
    return $js;
}
if (isset($_REQUEST['deljs'])) {
    require_once '../core.php';
    rss_bootstrap(false, '$Revision$', 24);
    require_once '../init.php';
    ?>
function get_from_delicious(id) {
 x___exp__getFromDelicious(id,getFromDelicious_cb);
}

function getFromDelicious_cb(ret) {
 data=ret.split(',');
 id=data[0];
 tags=data[1].split(' ');
 var span=document.getElementById('dt'+id);
 html = '';
 for(i=0;i<tags.length;i++) {
  if (tags[i] != '') {
    html += "<a href=\"#\" onclick=\"addToTags(" + id +",'"
Ejemplo n.º 5
0
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  or visit
# http://www.gnu.org/licenses/gpl.html
#
###############################################################################
# E-mail:      mbonetti at gmail dot com
# Web page:    http://gregarius.net/
###############################################################################
if (array_key_exists('js', $_GET)) {
    require_once 'core.php';
    rss_bootstrap(false, '$Revision: 1788 $', 0);
}
require_once 'init.php';
function __exp__setState($id, $state)
{
    $id = sanitize($id, RSS_SANITIZER_NUMERIC);
    $state = sanitize($state, RSS_SANITIZER_NUMERIC);
    if (isLoggedIn()) {
        rss_query('update ' . getTable('item') . " set unread={$state} where id={$id}");
        rss_invalidate_cache();
    }
    $rs = rss_query('select unread from ' . getTable('item') . " where id={$id}");
    list($unread) = rss_fetch_row($rs);
    return "{$id}|{$unread}";
}
function __exp__getSideContent($what)
 * Changelog:
 *
 * 0.3 Hack for a Gecko bug which did not render rounded corners properly
 *  on large divs. https://bugzilla.mozilla.org/show_bug.cgi?id=252241 - Sameer
 *
 * 0.4 Be evil on WebKit browsers, too
 */
function __rc_CSS($dummy)
{
    $url = getPath() . RSS_PLUGINS_DIR . "/roundedcorners.php?rc-css";
    return "\t<link rel=\"stylesheet\" type=\"text/css\" href=\"{$url}\" />\n";
}
if (isset($_GET['rc-css'])) {
    $css = "\n/* bad bad bad */\n.frame,.item,h3.collapsed,table,div.content img,\nul.navlist li,a.bookmarklet, fieldset, div#pbholder, div.ief,\ndiv.ief p a, #loginfo, input[type=\"submit\"] { -moz-border-radius: 5px; -webkit-border-radius:5px }\n#sidemenu li {\n\t-moz-border-radius-top-left:5px;\n\t-moz-border-radius-top-right:5px;\n\t-webkit-border-top-left-radius:5px;\n\t-webkit-border-top-right-radius:5px;\n}\n";
    require_once '../core.php';
    rss_bootstrap(false, '$Revision$' . $css, 24);
    header('Content-Type: text/css');
    echo $css;
    exit;
}
/* Turn off rounded corners on the big frames because of a gecko
rendering bug */
function __roundedCornersCheckjs($dummy)
{
    ?>
      <script type="text/javascript">
      <!--
      	var theMainDivsOfItems = document.getElementById("items");	
		if (theMainDivsOfItems && (theMainDivsOfItems.offsetHeight > 29000)) {
			theMainDivsOfItems.style.MozBorderRadius = 0;
		}
Ejemplo n.º 7
0
# E-mail:      mbonetti at gmail dot com
# Web page:    http://gregarius.net/
#
###############################################################################
/// Name: del.icio.us Tags
/// Author: Marco Bonetti
/// Description: Fetches tag suggestions from del.icio.us
/// Version: 0.5
function __delicious_js_register($js)
{
    $js[] = getPath() . RSS_PLUGINS_DIR . "/delicious.php?deljs";
    return $js;
}
if (isset($_REQUEST['deljs'])) {
    require_once '../core.php';
    rss_bootstrap(false, '$Revision: 1599 $', 24);
    require_once '../init.php';
    ?>
function get_from_delicious(id) {
 x___exp__getFromDelicious(id,getFromDelicious_cb);
}

function getFromDelicious_cb(ret) {
 data=ret.split(',');
 id=data[0];
 tags=data[1].split(' ');
 var span=document.getElementById('dt'+id);
 html = '';
 for(i=0;i<tags.length;i++) {
  if (tags[i] != '') {
    html += "<a href=\"#\" onclick=\"addToTags(" + id +",'"
Ejemplo n.º 8
0
/// Author: Marco Bonetti
/// Description: When active, this plugin will open off-site links in a new window
/// Version: 1.8
function __new_window_js_register($js)
{
    $js[] = getPath() . RSS_PLUGINS_DIR . "/newwindow.php?nwjs";
    return $js;
}
function __new_window_init_js($dummy)
{
    echo "\n<script type=\"text/javascript\">\n" . "<!--\n" . "__new_window();\n" . "-->\n" . "</script>\n";
    return $dummy;
}
if (isset($_REQUEST['nwjs'])) {
    require_once '../core.php';
    rss_bootstrap(false, '$Revision: 1023 $', 24);
    require_once '../init.php';
    ?>
	function __new_window() {
    if (document.getElementsByTagName) {
        var items = document.getElementById("items");
        if (items) {
            var anchors = items.getElementsByTagName("a");
            for (var i=0; i<anchors.length; i++) {
                var anchor = anchors[i];
                if (anchor.href && (anchor.href.indexOf('<?php 
    echo $_SERVER['HTTP_HOST'];
    ?>
') < 0)) {
                    anchor.target = '_blank';
                }