• Previous message: [greg-dev] Restricting updates to cron only
  • Next message: [greg-dev] PATCH: implements rss.config.restrictrefresh (partially) and rss.config.hidelogin
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    [greg-dev] PATCH: implements rss.config.restrictrefresh (partially) and rss.config.hidelogin

    Here's an update to my patch to make gregarius more multi-user
    friendly. This one hides the login div at the top right and the
    'Admin' button, in addition to the 'Refresh' button, but it still
    doesn't neuter the update.php script...
    
    Looking good for http://citrite.org/rss so far though...
    
     - samj
    
    $ svn diff
    Index: cls/wrappers/header.php
    ===================================================================
    --- cls/wrappers/header.php     (revision 1579)
    +++ cls/wrappers/header.php     (working copy)
    @@ -153,7 +153,7 @@
                             ."</div>\n";
         }
         $ret .= "</div>\n";
    -    return $ret;
    +    return getConfig('rss.config.hidelogin') ? null : $ret;
     }
    
     ?>
    Index: cls/nav.php
    ===================================================================
    --- cls/nav.php (revision 1579)
    +++ cls/nav.php (working copy)
    @@ -60,10 +60,13 @@
         function Navigation() {
    
             $this->appendNavItem(getPath(),__('<span>H</span>ome'),LOCATION_HOME);
    -        $this->appendNavItem(getPath().'update.php',__('<span>R</span>efresh'),LOCATION_UPDATE);
    +        if (!getConfig('rss.config.restrictrefresh')) {
    +         $this->appendNavItem(getPath().'update.php',__('<span>R</span>efresh'),LOCATION_UPDATE);
    +       }
             $this->appendNavItem(getPath().'search.php',__('<span>S</span>earch'),LOCATION_SEARCH);
    -        $this->appendNavItem(getPath().'admin/',__('A<span>d</span>min'),LOCATION_ADMIN);
    -
    +        if (!getConfig('rss.config.hidelogin')) {
    +          $this->appendNavItem(getPath().'admin/',__('A<span>d</span>min'),LOCATION_ADMIN);
    +        }
             if (($an = rss_plugin_hook('rss.plugins.afternav', null)) != null) {
                    $this -> postRender .= $an;
             }
    Index: schema.php
    ===================================================================
    --- schema.php  (revision 1579)
    +++ schema.php  (working copy)
    @@ -450,6 +450,8 @@
                    "rss.config.absoluteordering"=>
    array("true","true","boolean","Allow feeds and folders to be ordered
    by their order in the admin section. If this option is set to false,
    channels and folders will be organized alphabetically by their
    titles.",NULL),
                    "rss.config.robotsmeta"         =>
    array("noindex,follow","noindex,follow","string","How should spiders
    crawl us? (see http://www.robotstxt.org/wc/meta-user.html for more
    info).",NULL),
                    "rss.config.serverpush"         =>
    array("true","true","boolean","Use the server push method when
    updating your feeds in the browser. The browsers that support this
    (Mozilla and Opera) will be autodetected. Turn this option off if you
    do not use one of these browsers or if you would like to use the Ajax
    update method",NULL),
    +               "rss.config.restrictrefresh"    =>
    array("false","false","boolean","Restrict refresh to command line only
    (eg php -f update.php). Useful for busy sites with multiple
    users.",NULL),
    +               "rss.config.hidelogin"          =>
    array("false","false","boolean","Hide login related information
    (forms, Admin button, etc.). Useful for busy sites with multiple
    users.",NULL),
                    "rss.config.refreshafter"       =>
    array("45","45","num","If this option is set the feeds will be updated
    after keeping the browser open for x minutes. Please respect the feed
    providers by not setting this value to anything lower than thirty
    minutes. Set this variable to 0 turn this option off.",NULL),
                    "rss.input.allowed"                     =>
     array('a:21:{s:1:"a";a:2:{s:4:"href";i:1;s:5:"title";i:1;}s:1:"b";a:0:{}s:10:"blockquote";a:0:{}s:2:"br";a:0:{}s:4:"code";a:0:{}s:3:"del";a:0:{}s:2:"em";a:0:{}s:1:"i";a:0:{}s:3:"img";a:2:{s:3:"src";i:1;s:3:"alt";i:1;}s:3:"ins";a:0:{}s:2:"li";a:0:{}s:2:"ol";a:0:{}s:1:"p";a:0:{}s:3:"pre";a:0:{}s:3:"sup";a:0:{}s:5:"table";a:0:{}s:2:"td";a:0:{}s:2:"th";a:0:{}s:2:"tr";a:0:{}s:2:"tt";a:0:{}s:2:"ul";a:0:{}}','a:21:{s:1:"a";a:2:{s:4:"href";i:1;s:5:"title";i:1;}s:1:"b";a:0:{}s:10:"blockquote";a:0:{}s:2:"br";a:0:{}s:4:"code";a:0:{}s:3:"del";a:0:{}s:2:"em";a:0:{}s:1:"i";a:0:{}s:3:"img";a:2:{s:3:"src";i:1;s:3:"alt";i:1;}s:3:"ins";a:0:{}s:2:"li";a:0:{}s:2:"ol";a:0:{}s:1:"p";a:0:{}s:3:"pre";a:0:{}s:3:"sup";a:0:{}s:5:"table";a:0:{}s:2:"td";a:0:{}s:2:"th";a:0:{}s:2:"tr";a:0:{}s:2:"tt";a:0:{}s:2:"ul";a:0:{}}',"array","This
    variable controls input filtering. HTML tags and their attributes,
    which are not in this list, get filtered out when new RSS items are
    imported.",NULL),
                    "rss.output.showfeedmeta"       =>
    array('false','false','boolean','Display meta-information (like a web-
    and rss/rdf/xml url) about each feed in the feed side-column.',NULL),
    
    Posted by Sam Johnston [reply] at Thu Sep 14 21:35:15 CEST 2006