[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/e107_plugins/links_page/ -> e_rss.php (source)

   1  <?php
   2  
   3  if (!defined('e107_INIT')) { exit; }
   4  
   5  
   6  //------  create feed for admin, return array $eplug_rss_feed ------------------
   7  
   8  $feed['name']        = 'Links Page';
   9  $feed['url']        = 'links';            //the identifier for the rss feed url
  10  $feed['topic_id']    = '';                    //the topic_id, empty on default (to select a certain category)
  11  $feed['path']        = 'links_page';        //this is the plugin path location
  12  $feed['text']        = 'this is the rss feed for the links_page entries';
  13  $feed['class']        = '0';
  14  $feed['limit']        = '9';
  15  
  16  //------ create rss data, return as array $eplug_rss_data -----------------------
  17  
  18  $qry = "
  19  SELECT l.*, c.link_category_id, c.link_category_name
  20  FROM #links_page AS l
  21  LEFT JOIN #links_page_cat AS c ON c.link_category_id = l.link_category
  22  WHERE l.link_class REGEXP '".e_CLASS_REGEXP."' AND c.link_category_class REGEXP '".e_CLASS_REGEXP."'
  23  ORDER BY l.link_datestamp DESC LIMIT 0,".$this->limit;
  24  
  25  $rss = array();
  26  $sqlrss = new db;
  27  if($items = $sqlrss->db_Select_gen($qry)){
  28      $i=0;
  29      while($rowrss = $sqlrss -> db_Fetch()){
  30          $tmp                        = '';
  31          $rss[$i]['author']            = $tmp[1];
  32          $rss[$i]['author_email']    = $tmp[2];
  33          $rss[$i]['link']            = $rowrss['link_url'];
  34          $rss[$i]['linkid']            = $rowrss['link_id'];
  35          $rss[$i]['title']            = $rowrss['link_name'];
  36          $rss[$i]['description']        = '';
  37          $rss[$i]['category_name']    = $rowrss['link_category_name'];
  38          $rss[$i]['category_link']    = $e107->base_path.$PLUGINS_DIRECTORY."links_page/links.php?cat.".$rowrss['link_category_id'];
  39          $rss[$i]['datestamp']        = $rowrss['link_datestamp'];
  40          $rss[$i]['enc_url']            = "";
  41          $rss[$i]['enc_leng']        = "";
  42          $rss[$i]['enc_type']        = "";
  43          $i++;
  44      }
  45  }
  46  
  47  //##### ------------------------------------------------------------------------------------
  48  $eplug_rss_data[] = $rss;
  49  $eplug_rss_feed[] = $feed;
  50  ?>


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7