mirror of
https://github.com/e107inc/e107.git
synced 2025-04-21 21:21:54 +02:00
Rss added to download plugin
This commit is contained in:
parent
90d1482652
commit
ecf8281a4e
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/download.php,v $
|
||||
| $Revision: 1.9 $
|
||||
| $Date: 2009-09-17 20:38:18 $
|
||||
| $Revision: 1.10 $
|
||||
| $Date: 2009-09-18 19:07:09 $
|
||||
| $Author: e107coders $
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -22,8 +22,10 @@ if (!defined('e107_INIT'))
|
||||
require_once("../../class2.php");
|
||||
}
|
||||
|
||||
|
||||
if (!e107::isInstalled('download')) { exit(); }
|
||||
if (!e107::isInstalled('download'))
|
||||
{
|
||||
header("location:".e_BASE."index.php");
|
||||
}
|
||||
|
||||
include_lan(e_PLUGIN.'download/languages/'.e_LANGUAGE.'/download.php');
|
||||
require_once(e_PLUGIN.'download/handlers/download_class.php');
|
||||
|
96
e107_plugins/download/e_rss.php
Normal file
96
e107_plugins/download/e_rss.php
Normal file
@ -0,0 +1,96 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| Copyright (c) e107 Inc. 2001-2009
|
||||
| http://e107.org
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/e_rss.php,v $
|
||||
| $Revision: 1.1 $
|
||||
| $Date: 2009-09-18 19:07:09 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
//##### create feed for admin, return array $eplug_rss_feed --------------------------------
|
||||
// Download
|
||||
$feed['name'] = ADLAN_24;
|
||||
$feed['url'] = 'download';
|
||||
$feed['topic_id'] = '';
|
||||
$feed['path'] = 'download';
|
||||
$feed['text'] = RSS_PLUGIN_LAN_8;
|
||||
$feed['class'] = '0';
|
||||
$feed['limit'] = '9';
|
||||
$eplug_rss_feed[] = $feed;
|
||||
|
||||
// ------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// Download categories for admin import.
|
||||
|
||||
if($sqli -> db_Select("download_category", "*","download_category_id!='' ORDER BY download_category_order "))
|
||||
{
|
||||
while($rowi = $sqli -> db_Fetch())
|
||||
{
|
||||
$feed['name'] = ADLAN_24.' > '.$rowi['download_category_name'];
|
||||
$feed['url'] = 'download';
|
||||
$feed['topic_id'] = $rowi['download_category_id'];
|
||||
$feed['path'] = 'download';
|
||||
$feed['text'] = RSS_PLUGIN_LAN_11.' '.$rowi['download_category_name'];
|
||||
$feed['class'] = '0';
|
||||
$feed['limit'] = '9';
|
||||
$eplug_rss_feed[] = $feed;
|
||||
}
|
||||
}
|
||||
|
||||
//##### create rss data, return as array $eplug_rss_data -----------------------------------
|
||||
|
||||
|
||||
if($topic_id && is_numeric($topic_id))
|
||||
{
|
||||
$topic = "d.download_category='".intval($topic_id)."' AND ";
|
||||
}
|
||||
else
|
||||
{
|
||||
$topic = "";
|
||||
}
|
||||
$path='';
|
||||
$class_list = "0,251,252,253";
|
||||
$query = "SELECT d.*, dc.* FROM #download AS d LEFT JOIN #download_category AS dc ON d.download_category = dc.download_category_id WHERE {$topic} d.download_active > 0 AND d.download_class IN (".$class_list.") ORDER BY d.download_datestamp DESC LIMIT 0,".$this -> limit;
|
||||
$sql -> db_Select_gen($query);
|
||||
|
||||
// $sql->db_Select("download", "*", "{$topic} download_active > 0 AND download_class IN (".$class_list.") ORDER BY download_datestamp DESC LIMIT 0,".$this -> limit);
|
||||
$tmp = $sql->db_getList();
|
||||
$rss = array();
|
||||
$loop=0;
|
||||
foreach($tmp as $value)
|
||||
{
|
||||
if($value['download_author'])
|
||||
{
|
||||
$nick = preg_replace("/[0-9]+\./", "", $value['download_author']);
|
||||
$rss[$loop]['author'] = $nick;
|
||||
}
|
||||
$rss[$loop]['author_email'] = $value['download_author_email'];
|
||||
$rss[$loop]['title'] = $value['download_name'];
|
||||
$rss[$loop]['link'] = $e107->base_path."download.php?view.".$value['download_id'];
|
||||
$rss['description'] = ($rss_type == 3 ? $value['download_description'] : $value['download_description']);
|
||||
$rss['category_name'] = $value['download_category_name'];
|
||||
$rss['category_link'] = $e107->base_path."download.php?list.".$value['download_category_id'];
|
||||
$rss['enc_url'] = $e107->base_path."request.php?".$value['download_id'];
|
||||
$rss['enc_leng'] = $value['download_filesize'];
|
||||
$rss['enc_type'] = $this->getmime($value['download_url']);
|
||||
$rss['pubdate'] = $value['download_datestamp'];
|
||||
$loop++;
|
||||
}
|
||||
|
||||
|
||||
//##### ------------------------------------------------------------------------------------
|
||||
|
||||
$eplug_rss_data[] = $rss;
|
||||
|
||||
?>
|
@ -1,21 +1,19 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| <EFBFBD>Steve Dunstan 2001-2002
|
||||
| http://e107.org
|
||||
| jalist@e107.org
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/handlers/adminDownload_class.php,v $
|
||||
| $Revision: 1.19 $
|
||||
| $Date: 2009-09-17 20:38:19 $
|
||||
| $Author: e107coders $
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| Copyright (c) e107 Inc. 2001-2009
|
||||
| http://e107.org
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/handlers/adminDownload_class.php,v $
|
||||
| $Revision: 1.20 $
|
||||
| $Date: 2009-09-18 19:07:09 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
if (!e107::isInstalled('download')) { exit(); }
|
||||
|
||||
|
@ -1,21 +1,19 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| <EFBFBD>Steve Dunstan 2001-2002
|
||||
| http://e107.org
|
||||
| jalist@e107.org
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/handlers/category_class.php,v $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2009-09-17 20:38:19 $
|
||||
| $Author: e107coders $
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| Copyright (c) e107 Inc. 2001-2009
|
||||
| http://e107.org
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/handlers/category_class.php,v $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2009-09-18 19:07:09 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
if (!e107::isInstalled('download')) { exit(); }
|
||||
|
@ -1,21 +1,19 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| <EFBFBD>Steve Dunstan 2001-2002
|
||||
| http://e107.org
|
||||
| jalist@e107.org
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/handlers/download_class.php,v $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2009-09-17 20:38:20 $
|
||||
| $Author: e107coders $
|
||||
|
|
||||
+----------------------------------------------------------------------------+
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| Copyright (c) e107 Inc. 2001-2009
|
||||
| http://e107.org
|
||||
|
|
||||
| Released under the terms and conditions of the
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/download/handlers/download_class.php,v $
|
||||
| $Revision: 1.4 $
|
||||
| $Date: 2009-09-18 19:07:09 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
if (!e107::isInstalled('download')) { exit(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user