[ PHPXref.com ] [ Generated: Sun Jul 20 16:35:25 2008 ] [ bBlog 0.7.6 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/bblog/bBlog_plugins/ -> admin.rssfeedmaker.php (source)

   1  <?php
   2  // admin.rssfeedmaker.php - easily make custom rss feeds
   3  /*
   4  ** bBlog Weblog http://www.bblog.com/
   5  ** Copyright (C) 2003  Eaden McKee <email@eadz.co.nz>
   6  **
   7  ** This program is free software; you can redistribute it and/or modify
   8  ** it under the terms of the GNU General Public License as published by
   9  ** the Free Software Foundation; either version 2 of the License, or
  10  ** (at your option) any later version.
  11  **
  12  ** This program is distributed in the hope that it will be useful,
  13  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  14  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15  ** GNU General Public License for more details.
  16  **
  17  ** You should have received a copy of the GNU General Public License
  18  ** along with this program; if not, write to the Free Software
  19  ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  20  */
  21  
  22  function identify_admin_rssfeedmaker () 
  23  {
  24    return array (
  25      'name'           =>'rssfeedmaker',
  26      'type'             =>'admin',
  27      'nicename'     =>'RSS Linker',
  28      'description'   =>'Create custom RSS feeds',
  29      'template'     => 'rssfeedmaker.html',
  30      'authors'        =>'Eaden McKee <eadz@bblog.com>',
  31      'licence'         =>'GPL',
  32      'help'            => ''
  33    );
  34  }
  35  
  36  function admin_plugin_rssfeedmaker_run(&$bBlog) 
  37  {
  38      if ((isset($_POST['sub'])) && ($_POST['sub'] == 'y')) 
  39      {
  40          $url = BLOGURL.'rss.php?';
  41  
  42  
  43          if($_POST['version'] == 2) $url .= 'ver=2';
  44          elseif($_POST['version'] == 'atom03') $url .= 'ver=atom03';
  45          else $url .= 'ver=0.92';
  46  
  47          if(is_numeric($_POST['num'])) $url .= '&amp;num='.$_POST['num'];
  48  
  49          if($_POST['sectionid']>0) $url .= '&amp;sectionid='.$_POST['sectionid'];
  50  
  51          if(is_numeric($_POST['year'])) $url .= '&amp;year='.$_POST['year'];
  52          if(is_numeric($_POST['month'])) $url .= '&amp;year='.$_POST['day'];
  53          if(is_numeric($_POST['day'])) $url .= '&amp;year='.$_POST['day'];
  54  
  55          $bBlog->assign('results',TRUE);
  56          $bBlog->assign('feedurl',$url);
  57      }
  58      
  59      $sections = $bBlog->get_sections();
  60      $sectionlist = '';
  61      
  62      foreach ($sections as $section) 
  63      {
  64          $sectionlist .= "<option value='{$section->sectionid}'>{$section->nicename}</option>";
  65      }
  66      
  67      $bBlog->assign('sectionlist',$sectionlist);
  68  }
  69  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]