root/trunk/gregarius/plugins/extrabutton.php

Revision 1658, 2.2 kB (checked in by cfriesen, 21 months ago)

Make a checkbox that allows one click toggle of private feeds/items/etc.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1<?php
2###############################################################################
3# Gregarius - A PHP based RSS aggregator.
4# Copyright (C) 2003 - 2006 Marco Bonetti
5#
6###############################################################################
7# This program is free software and open source software; you can redistribute
8# it and/or modify it under the terms of the GNU General Public License as
9# published by the Free Software Foundation; either version 2 of the License,
10# or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful, but WITHOUT
13# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
15# more details.
16#
17# You should have received a copy of the GNU General Public License along
18# with this program; if not, write to the Free Software Foundation, Inc.,
19# 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  or visit
20# http://www.gnu.org/licenses/gpl.html
21#
22###############################################################################
23# E-mail:      mbonetti at gmail dot com
24# Web page:    http://gregarius.net/
25#
26###############################################################################
27
28
29/// Name: Extra Button
30/// Author: Marco Bonetti
31/// Description: Adds an extra "Mark These Items as Read" button at the bottom of each feed view
32/// Version: $Revision: 1.9
33
34function __extra_button_Button($in) {
35        if (!isLoggedIn()) {
36                return;
37        }
38       
39        if (defined('MARK_READ_ALL_FORM')                               || 
40                 defined ('MARK_READ_FEED_FORM')                        || 
41                 defined ('MARK_READ_FOLDER_FORM')              || 
42                 defined ('MARK_READ_VFOLDER_FORM'))    {
43       
44        echo "<div style=\"text-align:right\">\n";
45       
46        if (defined('MARK_READ_ALL_FORM')) {
47                        markAllReadForm();
48        } elseif(defined('MARK_READ_FEED_FORM')) {
49                        markReadForm(MARK_READ_FEED_FORM);
50        } elseif(defined('MARK_READ_FOLDER_FORM')) {
51                        markFolderReadForm(MARK_READ_FOLDER_FORM);
52        } elseif(defined('MARK_READ_VFOLDER_FORM')){
53                                markVirtualFolderReadForm(MARK_READ_VFOLDER_FORM);
54                }
55        echo "</div>\n";
56    }
57        return null;
58}
59
60rss_set_hook('rss.plugins.items.afteritems','__extra_button_Button');
61?>
Note: See TracBrowser for help on using the browser.