Changeset 1783 for trunk

Show
Ignore:
Timestamp:
02/10/08 14:19:07 (10 months ago)
Author:
cfriesen
Message:

revert the plugin back the way it was

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/plugins/rssview.php

    r1782 r1783  
    3131/// Description: Adds a RSS link to the header and the footer of each page 
    3232/// Version: 0.7 
    33 /// Configuration: __rss_view_config 
    3433 
    3534/** 
     
    3938 * 0.6 - Don't put a link in admin and other locations 
    4039 * 0.7 - Show ATOM link as well. 
    41  * 0.8 - Add configurable output count. 
    4240 */ 
    43  
    44 define ('RSSVIEW_CONFIG_OUTPUTCOUNT', 'rssview.outputcount'); 
    45 define ('RSSVIEW_DEFAULT_COUNT', 10); 
    46  
    47 function __rss_view_config () { 
    48     $cnt = rss_plugins_get_option(RSSVIEW_CONFIG_OUTPUTCOUNT); 
    49      
    50     if(empty($cnt)) { 
    51         $cnt = RSSVIEW_DEFAULT_COUNT; 
    52     } 
    53      
    54   if(rss_plugins_is_submit()) { 
    55     if(!empty($_REQUEST['rv_oc'])) { 
    56         $cnt = $_REQUEST['rv_oc']; 
    57         } 
    58          
    59     rss_plugins_add_option(RSSVIEW_CONFIG_OUTPUTCOUNT, $cnt, 'num'); 
    60     return; 
    61     } 
    62  
    63     print ("<fieldset>\n"); 
    64     print ("  <legend>" . __('Output Count') . "</legend>\n"); 
    65     print ("   <p><label for='rv_oc'>" . __('Count') . "</label></br>"); 
    66     print ("   <input id='rv_oc' type='text' value='" . $cnt . "' name='rv_oc'></p>\n"); 
    67     print ("</fieldset>\n"); 
    68 } 
    6941 
    7042function __rss_view_url($type = "rss") { 
     
    7244    $url .= $_SERVER["REQUEST_URI"]; 
    7345 
    74         $cnt = rss_plugins_get_option(RSSVIEW_CONFIG_OUTPUTCOUNT); 
    75          
    76         if(empty($cnt)) { 
    77             $cnt = RSSVIEW_DEFAULT_COUNT; 
    78         } 
    79          
    8046    if (strstr($_SERVER['REQUEST_URI'],"?") !== FALSE) { 
    81         $url .= "&amp;media=$type&amp;count=$cnt"; 
     47        $url .= "&amp;media=$type&amp;"; 
    8248    } else { 
    83         $url .= "?media=$type&count=$cnt"; 
     49        $url .= "?media=$type"; 
    8450    } 
    8551    $url .= __rss_view_post2get();