1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 13:17:24 +02:00

RSS display news image feature added (thanks nlstart) and some fixes.

This commit is contained in:
CaMer0n
2009-09-18 19:05:50 +00:00
parent 2c6127bdfc
commit 90d1482652
8 changed files with 321 additions and 309 deletions

View File

@@ -1,41 +1,36 @@
<?php <?php
/* /*
+ ----------------------------------------------------------------------------+ + ----------------------------------------------------------------------------+
| e107 website system | e107 website system
| |
| <EFBFBD>Steve Dunstan 2001-2002 | Copyright (c) e107 Inc. 2001-2009
| http://e107.org | http://e107.org
| jalist@e107.org |
| | Released under the terms and conditions of the
| Released under the terms and conditions of the | GNU General Public License (http://gnu.org).
| GNU General Public License (http://gnu.org). |
| | $Source: /cvs_backup/e107_0.8/e107_plugins/rss_menu/admin_prefs.php,v $
| $Source: /cvs_backup/e107_0.8/e107_plugins/rss_menu/admin_prefs.php,v $ | $Revision: 1.7 $
| $Revision: 1.6 $ | $Date: 2009-09-18 19:05:49 $
| $Date: 2009-08-15 11:55:30 $ | $Author: e107coders $
| $Author: marj_nl_fr $ +----------------------------------------------------------------------------+
+----------------------------------------------------------------------------+
*/ */
/* /*
Notes: Notes:
- array_flip method deprecated for delete item detection. - array_flip method deprecated for delete item detection.
- using form handler is deprecated and present only for backwards compatibility. - using form handler is deprecated and present only for backwards compatibility.
- using generic terms like EDIT and DELETE in Language file is deprecated, use LAN_EDIT etc. instead. - using generic terms like EDIT and DELETE in Language file is deprecated, use LAN_EDIT etc. instead.
- using terms like created, update, options etc..deprecated should use built in terms. - using terms like created, update, options etc..deprecated should use built in terms.
- generic admin icons used. ADMIN_ICON_EDIT etc. - generic admin icons used. ADMIN_ICON_EDIT etc.
- using $caption = "whatever", is unneccessary. - using $caption = "whatever", is unneccessary.
*/ */
require_once("../../class2.php"); require_once("../../class2.php");
if(!getperms("P") || !plugInstalled('rss_menu')) if(!getperms("P") || !e107::isInstalled('rss_menu'))
{ {
header("location:".e_BASE."index.php"); header("location:".e_BASE."index.php");
} }
include_lan(e_PLUGIN."rss_menu/languages/".e_LANGUAGE."_admin_rss_menu.php"); include_lan(e_PLUGIN."rss_menu/languages/".e_LANGUAGE."_admin_rss_menu.php");
require_once(e_ADMIN."auth.php"); require_once(e_ADMIN."auth.php");
$imagedir = e_IMAGE."admin_images/"; $imagedir = e_IMAGE."admin_images/";
@@ -44,7 +39,7 @@ $rss = new rss;
global $tp; global $tp;
//delete entry // Delete entry
if(isset($_POST['delete'])) if(isset($_POST['delete']))
{ {
$d_idt = array_keys($_POST['delete']); $d_idt = array_keys($_POST['delete']);
@@ -53,51 +48,49 @@ if(isset($_POST['delete']))
$e107cache->clear("rss"); $e107cache->clear("rss");
} }
//create rss feed // Create rss feed
if(isset($_POST['create_rss'])) if(isset($_POST['create_rss']))
{ {
$message = $rss -> dbrss("create"); $message = $rss -> dbrss("create");
} }
//update rss feed // Update rss feed
if(isset($_POST['update_rss'])) if(isset($_POST['update_rss']))
{ {
$message = $rss -> dbrss("update"); $message = $rss -> dbrss("update");
} }
//import rss feed // Import rss feed
if(isset($_POST['import_rss'])) if(isset($_POST['import_rss']))
{ {
$message = $rss -> dbrssimport(); $message = $rss -> dbrssimport();
} }
//update_limit // Update_limit
if(isset($_POST['update_limit'])) if(isset($_POST['update_limit']))
{ {
$message = $rss -> dbrsslimit(); $message = $rss -> dbrsslimit();
} }
//update options // Update options
if(isset($_POST['updatesettings'])) if(isset($_POST['updatesettings']))
{ {
$message = $rss->dboptions(); $message = $rss->dboptions();
} }
//config check // Config check
if($rss->file_check()) if($rss->file_check())
{ {
$message = RSS_LAN_ERROR_2; // space found in file. $message = RSS_LAN_ERROR_2; // Space found in file.
} }
// Render message
//render message
if(isset($message)) if(isset($message))
{ {
$rss->show_message('', $message); $rss->show_message('', $message);
} }
// Get template
//get template
if (is_readable(THEME."rss_template.php")) if (is_readable(THEME."rss_template.php"))
{ {
require_once(THEME."rss_template.php"); require_once(THEME."rss_template.php");
@@ -107,8 +100,7 @@ else
require_once(e_PLUGIN."rss_menu/rss_template.php"); require_once(e_PLUGIN."rss_menu/rss_template.php");
} }
// Listing
//listing
if(e_QUERY) if(e_QUERY)
{ {
$qs = explode(".", e_QUERY); $qs = explode(".", e_QUERY);
@@ -117,31 +109,30 @@ $action = varset($qs[0],'list');
$field = varset($qs[1], ''); $field = varset($qs[1], '');
$feedID = intval(varset($qs[2], 0)); $feedID = intval(varset($qs[2], 0));
switch ($action) switch ($action)
{ {
case 'create' : case 'create' :
if ($_POST) if ($_POST)
{ //list { // List
$rss -> rssadminlist();
}
else
{ //create
$rss -> rssadmincreate($field, $feedID);
}
break;
case 'import' :
$rss -> rssadminimport();
break;
case 'options' :
$rss -> rssadminoptions();
break;
case 'r3' :
$rss->show_message('', RSS_LAN_ADMIN_31); // Intentionally fall straight through after showing message
case 'list' :
default :
$rss -> rssadminlist(); $rss -> rssadminlist();
} }
else
{ // Create
$rss -> rssadmincreate($field, $feedID);
}
break;
case 'import' :
$rss -> rssadminimport();
break;
case 'options' :
$rss -> rssadminoptions();
break;
case 'r3' :
$rss->show_message('', RSS_LAN_ADMIN_31); // Intentionally fall straight through after showing message
case 'list' :
default :
$rss -> rssadminlist();
}
require_once(e_ADMIN."footer.php"); require_once(e_ADMIN."footer.php");
@@ -169,14 +160,9 @@ function admin_prefs_adminmenu()
} }
// ##### End -------------------------------------------------------------------------------------- // ##### End --------------------------------------------------------------------------------------
class rss class rss
{ {
//check for config // Check for config
function file_check() function file_check()
{ {
$arrays = file_get_contents(e_BASE."e107_config.php"); $arrays = file_get_contents(e_BASE."e107_config.php");
@@ -188,8 +174,7 @@ class rss
return FALSE; return FALSE;
} }
// Admin : list : existing rss feeds
//admin : list : existing rss feeds
function rssadminlist() function rssadminlist()
{ {
global $ns, $sql, $tp, $field, $sort, $rss_shortcodes, $row, $RSS_ADMIN_LIST_HEADER, $RSS_ADMIN_LIST_TABLE, $RSS_ADMIN_LIST_FOOTER; global $ns, $sql, $tp, $field, $sort, $rss_shortcodes, $row, $RSS_ADMIN_LIST_HEADER, $RSS_ADMIN_LIST_TABLE, $RSS_ADMIN_LIST_FOOTER;
@@ -214,7 +199,7 @@ class rss
} }
} }
//create or edit - put up a form // Create or edit - put up a form
function rssadmincreate($action, $id=0) function rssadmincreate($action, $id=0)
{ {
global $ns, $sql, $tp, $rss_shortcodes, $row, $RSS_ADMIN_CREATE_TABLE; global $ns, $sql, $tp, $rss_shortcodes, $row, $RSS_ADMIN_CREATE_TABLE;
@@ -238,8 +223,7 @@ class rss
$ns->tablerender(RSS_LAN_ADMIN_10, $text); $ns->tablerender(RSS_LAN_ADMIN_10, $text);
} }
// Import - put up the list of possible feeds to import
// import - put up the list of possible feeds to import
function rssadminimport() function rssadminimport()
{ {
global $sql, $ns, $i, $tp, $rss_shortcodes, $feed, $pref; global $sql, $ns, $i, $tp, $rss_shortcodes, $feed, $pref;
@@ -248,17 +232,17 @@ class rss
$sqli = new db; $sqli = new db;
$feedlist = array(); $feedlist = array();
//news // News
$feed['name'] = ADLAN_0; $feed['name'] = ADLAN_0;
$feed['url'] = 'news'; //the identifier for the rss feed url $feed['url'] = 'news'; // The identifier for the rss feed url
$feed['topic_id'] = ''; //the topic_id, empty on default (to select a certain category) $feed['topic_id'] = ''; // The topic_id, empty on default (to select a certain category)
$feed['path'] = 'news'; //this is the plugin path location $feed['path'] = 'news'; // This is the plugin path location
$feed['text'] = RSS_PLUGIN_LAN_7; $feed['text'] = RSS_PLUGIN_LAN_7;
$feed['class'] = '0'; $feed['class'] = '0';
$feed['limit'] = '9'; $feed['limit'] = '9';
$feedlist[] = $feed; $feedlist[] = $feed;
//news categories // News categories
if($sqli -> db_Select("news_category", "*","category_id!='' ORDER BY category_name ")) if($sqli -> db_Select("news_category", "*","category_id!='' ORDER BY category_name "))
{ {
while($rowi = $sqli -> db_Fetch()) while($rowi = $sqli -> db_Fetch())
@@ -270,11 +254,12 @@ class rss
$feed['text'] = RSS_PLUGIN_LAN_10.' '.$rowi['category_name']; $feed['text'] = RSS_PLUGIN_LAN_10.' '.$rowi['category_name'];
$feed['class'] = '0'; $feed['class'] = '0';
$feed['limit'] = '9'; $feed['limit'] = '9';
// $feed['exclude_class'] = '';
$feedlist[] = $feed; $feedlist[] = $feed;
} }
} }
//download /* // Download
$feed['name'] = ADLAN_24; $feed['name'] = ADLAN_24;
$feed['url'] = 'download'; $feed['url'] = 'download';
$feed['topic_id'] = ''; $feed['topic_id'] = '';
@@ -284,7 +269,7 @@ class rss
$feed['limit'] = '9'; $feed['limit'] = '9';
$feedlist[] = $feed; $feedlist[] = $feed;
//download categories // Download categories
if($sqli -> db_Select("download_category", "*","download_category_id!='' ORDER BY download_category_order ")) if($sqli -> db_Select("download_category", "*","download_category_id!='' ORDER BY download_category_order "))
{ {
while($rowi = $sqli -> db_Fetch()) while($rowi = $sqli -> db_Fetch())
@@ -299,8 +284,8 @@ class rss
$feedlist[] = $feed; $feedlist[] = $feed;
} }
} }
*/
//comments // Comments
$feed['name'] = RSS_PLUGIN_LAN_14; $feed['name'] = RSS_PLUGIN_LAN_14;
$feed['url'] = 'comments'; $feed['url'] = 'comments';
$feed['topic_id'] = ''; $feed['topic_id'] = '';
@@ -310,7 +295,7 @@ class rss
$feed['limit'] = '9'; $feed['limit'] = '9';
$feedlist[] = $feed; $feedlist[] = $feed;
//plugin rss feed, using e_rss.php in plugin folder // Plugin rss feed, using e_rss.php in plugin folder
$plugin_feedlist = array(); $plugin_feedlist = array();
foreach($pref['e_rss_list'] as $val) foreach($pref['e_rss_list'] as $val)
{ {
@@ -331,7 +316,7 @@ class rss
$feed['topic_id'] = $tp -> toDB($feed['topic_id']); $feed['topic_id'] = $tp -> toDB($feed['topic_id']);
$feed['url'] = $tp -> toDB($feed['url']); $feed['url'] = $tp -> toDB($feed['url']);
//check if feed is not yet present // Check if feed is not yet present
if(!$sql -> db_Select("rss", "*", "rss_path='".$feed['path']."' AND rss_url='".$feed['url']."' AND rss_topicid='".$feed['topic_id']."' ")) if(!$sql -> db_Select("rss", "*", "rss_path='".$feed['path']."' AND rss_url='".$feed['url']."' AND rss_topicid='".$feed['topic_id']."' "))
{ {
$render=TRUE; $render=TRUE;
@@ -351,8 +336,7 @@ class rss
} }
} }
// Options - display form
// options - display form
function rssadminoptions() function rssadminoptions()
{ {
global $ns, $sql, $tp, $rss_shortcodes, $row, $RSS_ADMIN_OPTIONS_TABLE; global $ns, $sql, $tp, $rss_shortcodes, $row, $RSS_ADMIN_OPTIONS_TABLE;
@@ -362,17 +346,14 @@ class rss
return; return;
} }
// Render message
//render message
function show_message($caption='', $text='') function show_message($caption='', $text='')
{ {
global $ns; global $ns;
$ns -> tablerender($caption, "<div style='text-align:center'><b>$text</b></div>"); $ns -> tablerender($caption, "<div style='text-align:center'><b>$text</b></div>");
} }
// Db:create/update
//db:create/update
function dbrss($mode='create') function dbrss($mode='create')
{ {
global $sql, $ns, $tp, $e107cache, $admin_log; global $sql, $ns, $tp, $e107cache, $admin_log;
@@ -387,7 +368,7 @@ class rss
$rssVals['rss_text'] = $tp -> toDB($_POST['rss_text']); $rssVals['rss_text'] = $tp -> toDB($_POST['rss_text']);
$rssVals['rss_class'] = (intval($_POST['rss_class']) ? intval($_POST['rss_class']) : '0'); $rssVals['rss_class'] = (intval($_POST['rss_class']) ? intval($_POST['rss_class']) : '0');
$rssVals['rss_limit'] = intval($_POST['rss_limit']); $rssVals['rss_limit'] = intval($_POST['rss_limit']);
// $rssVals['rss_exclude_class'] = intval($_POST['rss_exclude_class']);
if(isset($_POST['rss_datestamp']) && $_POST['rss_datestamp']!='') if(isset($_POST['rss_datestamp']) && $_POST['rss_datestamp']!='')
{ {
$rssVals['rss_datestamp'] = intval($_POST['rss_datestamp']); $rssVals['rss_datestamp'] = intval($_POST['rss_datestamp']);
@@ -419,8 +400,7 @@ class rss
return $message; return $message;
} }
// Import rss feeds
//import rss feeds
function dbrssimport() function dbrssimport()
{ {
global $sql, $tp, $admin_log; global $sql, $tp, $admin_log;
@@ -442,7 +422,6 @@ class rss
} }
$message = count($_POST['importid'])." ".RSS_LAN_ADMIN_18; $message = count($_POST['importid'])." ".RSS_LAN_ADMIN_18;
return $message; return $message;
} }
function dbrsslimit() function dbrsslimit()
@@ -461,7 +440,7 @@ class rss
header("location:".e_SELF."?r3"); header("location:".e_SELF."?r3");
} }
//update options // Update options
function dboptions() function dboptions()
{ {
global $tp, $pref, $admin_log; global $tp, $pref, $admin_log;
@@ -469,6 +448,7 @@ class rss
$temp = array(); $temp = array();
$temp['rss_othernews'] = $_POST['rss_othernews']; $temp['rss_othernews'] = $_POST['rss_othernews'];
$temp['rss_summarydiz'] = $_POST['rss_summarydiz']; $temp['rss_summarydiz'] = $_POST['rss_summarydiz'];
$temp['rss_shownewsimage'] = $_POST['rss_shownewsimage'];
if ($admin_log->logArrayDiffs($temp, $pref, 'RSS_06')) if ($admin_log->logArrayDiffs($temp, $pref, 'RSS_06'))
{ {
save_prefs(); // Only save if changes save_prefs(); // Only save if changes
@@ -479,9 +459,5 @@ class rss
return RSS_LAN_ADMIN_28; return RSS_LAN_ADMIN_28;
} }
} }
} // End class rss
?>
} //end class
?>

View File

@@ -11,28 +11,26 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_plugins/rss_menu/e_meta.php,v $ | $Source: /cvs_backup/e107_0.8/e107_plugins/rss_menu/e_meta.php,v $
| $Revision: 1.6 $ | $Revision: 1.7 $
| $Date: 2009-07-19 11:44:29 $ | $Date: 2009-09-18 19:05:50 $
| $Author: marj_nl_fr $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
global $tp,$PLUGINS_DIRECTORY; global $tp,$PLUGINS_DIRECTORY;
if($sql->db_Select("rss", "*", "rss_class='0' AND rss_limit>0 ORDER BY rss_name")) if($sql->db_Select("rss", "*", "rss_class='0' AND rss_limit>0 ORDER BY rss_name"))
{ {
while($row=$sql->db_Fetch()) while($row=$sql->db_Fetch())
{ // Wildcard topic_id's should not be listed
if(strpos($row['rss_url'], "*")===FALSE)
{ {
//wildcard topic_id's should not be listed $url = SITEURL.$PLUGINS_DIRECTORY."rss_menu/rss.php?".$tp->toHTML($row['rss_url'], TRUE, 'constants, no_hook, emotes_off').".2";
if(strpos($row['rss_url'], "*")===FALSE) $url .= ($row['rss_topicid']) ? ".".$row['rss_topicid'] : "";
{ $name = $tp->toHTML($row['rss_name'], TRUE, 'no_hook, emotes_off');
$url = SITEURL.$PLUGINS_DIRECTORY."rss_menu/rss.php?".$tp->toHTML($row['rss_url'], TRUE, 'constants, no_hook, emotes_off').".2"; echo "<link rel='alternate' type='application/rss+xml' title='".htmlspecialchars(SITENAME, ENT_QUOTES, 'utf-8')." ".htmlspecialchars($name, ENT_QUOTES, 'utf-8')."' href='".$url."' />\n";
$url .= ($row['rss_topicid']) ? ".".$row['rss_topicid'] : "";
$name = $tp->toHTML($row['rss_name'], TRUE, 'no_hook, emotes_off');
echo "<link rel='alternate' type='application/rss+xml' title='".htmlspecialchars(SITENAME, ENT_QUOTES, 'utf-8')." ".htmlspecialchars($name, ENT_QUOTES, 'utf-8')."' href='".$url."' />\n";
}
} }
} }
}
?> ?>

View File

@@ -4,9 +4,9 @@
| e107 website system - Language File. | e107 website system - Language File.
| |
| $Source: /cvs_backup/e107_0.8/e107_plugins/rss_menu/languages/English_admin_rss_menu.php,v $ | $Source: /cvs_backup/e107_0.8/e107_plugins/rss_menu/languages/English_admin_rss_menu.php,v $
| $Revision: 1.1 $ | $Revision: 1.2 $
| $Date: 2008-12-13 12:34:53 $ | $Date: 2009-09-18 19:05:50 $
| $Author: e107steved $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -87,7 +87,8 @@ define("RSS_LAN_ADMIN_27", "Uncheck All");
define('RSS_LAN_ADMIN_28', 'Nothing changed - not saved'); define('RSS_LAN_ADMIN_28', 'Nothing changed - not saved');
define("RSS_LAN_ADMIN_31", 'rss entries limits updated'); define("RSS_LAN_ADMIN_31", 'rss entries limits updated');
define("RSS_LAN_ADMIN_32", "");
define("RSS_LAN_ADMIN_33", "Show image in News Feed?");
define("RSS_LAN_0", "RSS"); define("RSS_LAN_0", "RSS");
define("RSS_LAN_2", "@nospam.com"); define("RSS_LAN_2", "@nospam.com");
@@ -102,6 +103,4 @@ define('LAN_AL_RSS_04','RSS feed imported');
define('LAN_AL_RSS_05','RSS limits updated'); define('LAN_AL_RSS_05','RSS limits updated');
define('LAN_AL_RSS_06','RSS settings updated'); define('LAN_AL_RSS_06','RSS settings updated');
define('LAN_AL_RSS_07',''); define('LAN_AL_RSS_07','');
?>
?>

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- $Id: plugin.xml,v 1.4 2009-07-17 14:41:54 marj_nl_fr Exp $ --> <!-- $Id: plugin.xml,v 1.5 2009-09-18 19:05:50 e107coders Exp $ -->
<e107Plugin name="RSS_PLUGIN_LAN_1" version="1.1" compatibility="0.8" installRequired="true"> <e107Plugin name="RSS_PLUGIN_LAN_1" version="1.3" compatibility="0.8" installRequired="true">
<author name="e107 Inc." url="http://e107.org" /> <author name="e107 Inc." url="http://e107.org" />
<description>RSS_PLUGIN_LAN_2</description> <description>RSS_PLUGIN_LAN_2</description>
<compatibility>0.8</compatibility> <compatibility>0.8</compatibility>

View File

@@ -3,7 +3,7 @@
+ ----------------------------------------------------------------------------+ + ----------------------------------------------------------------------------+
| e107 website system | e107 website system
| |
| <20>Steve Dunstan 2001-2002 | <20>Steve Dunstan 2001-2002
| http://e107.org | http://e107.org
| jalist@e107.org | jalist@e107.org
| |
@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_plugins/rss_menu/rss.php,v $ | $Source: /cvs_backup/e107_0.8/e107_plugins/rss_menu/rss.php,v $
| $Revision: 1.14 $ | $Revision: 1.15 $
| $Date: 2009-08-15 11:55:30 $ | $Date: 2009-09-18 19:05:50 $
| $Author: marj_nl_fr $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -28,7 +28,7 @@ Plugins should use an e_rss.php file in their plugin folder
*/ */
require_once("../../class2.php"); require_once("../../class2.php");
if (!plugInstalled('rss_menu')) if (!e107::isInstalled('rss_menu'))
{ {
header("Location: ".e_BASE."index.php"); header("Location: ".e_BASE."index.php");
exit; exit;
@@ -45,10 +45,10 @@ if (!is_object($tp->e_bb))
$tp->e_bb = new e_bbcode; $tp->e_bb = new e_bbcode;
} }
//get language file // Get language file
include_lan(e_PLUGIN."rss_menu/languages/".e_LANGUAGE."_admin_rss_menu.php"); include_lan(e_PLUGIN."rss_menu/languages/".e_LANGUAGE."_admin_rss_menu.php");
//get template // Get template
if (is_readable(THEME."rss_template.php")) if (is_readable(THEME."rss_template.php"))
{ {
require_once(THEME."rss_template.php"); require_once(THEME."rss_template.php");
@@ -58,8 +58,7 @@ else
require_once(e_PLUGIN."rss_menu/rss_template.php"); require_once(e_PLUGIN."rss_menu/rss_template.php");
} }
// Query handler
//query handler
if (e_QUERY) if (e_QUERY)
{ {
$tmp = explode(".", e_QUERY); $tmp = explode(".", e_QUERY);
@@ -68,7 +67,7 @@ if (e_QUERY)
$topic_id = $tp->toDB($tmp[2],''); $topic_id = $tp->toDB($tmp[2],'');
} }
//list available rss feeds // List available rss feeds
if (!$rss_type) if (!$rss_type)
{ {
require_once(HEADERF); require_once(HEADERF);
@@ -93,23 +92,23 @@ if (!$rss_type)
exit; exit;
} }
//conversion table for old urls ------- // Conversion table for old urls -------
$conversion[1] = "news"; $conversion[1] = "news";
$conversion[5] = "comments"; $conversion[5] = "comments";
$conversion[10] = "bugtracker"; $conversion[10] = "bugtracker";
$conversion[12] = "download"; $conversion[12] = "download";
//------------------------------------- //-------------------------------------
//convert certain old urls so we can check the db entries --------------------- // Convert certain old urls so we can check the db entries ---------------------
if($topic_id) if($topic_id)
{ //rss.php?1.2.14 (news, rss-2, cat=14) { // Rss.php?1.2.14 (news, rss-2, cat=14)
if(is_numeric($content_type) && isset($conversion[$content_type]) ) if(is_numeric($content_type) && isset($conversion[$content_type]) )
{ {
$content_type = $conversion[$content_type]; $content_type = $conversion[$content_type];
} }
} }
else else
{ //rss.php?1.2 (news, rss-2) --> check = news (check conversion table) { // Rss.php?1.2 (news, rss-2) --> check = news (check conversion table)
if(is_numeric($content_type) && isset($conversion[$content_type]) ) if(is_numeric($content_type) && isset($conversion[$content_type]) )
{ {
$content_type = $conversion[$content_type]; $content_type = $conversion[$content_type];
@@ -119,8 +118,7 @@ else
$check_topic = ($topic_id ? " AND rss_topicid = '".$topic_id."' " : ""); $check_topic = ($topic_id ? " AND rss_topicid = '".$topic_id."' " : "");
if(!$sql -> db_Select("rss", "*", "rss_class!='2' AND rss_url='".$content_type."' ".$check_topic." AND rss_limit>0 ")) if(!$sql -> db_Select("rss", "*", "rss_class!='2' AND rss_url='".$content_type."' ".$check_topic." AND rss_limit>0 "))
{ { // Check if wildcard present for topic_id
//check if wildcard present for topic_id
$check_topic = ($topic_id ? " AND rss_topicid = '".str_replace($topic_id, "*", $topic_id)."' " : ""); $check_topic = ($topic_id ? " AND rss_topicid = '".str_replace($topic_id, "*", $topic_id)."' " : "");
if(!$sql -> db_Select("rss", "*", "rss_class!='2' AND rss_url='".$content_type."' ".$check_topic." AND rss_limit>0 ")) if(!$sql -> db_Select("rss", "*", "rss_class!='2' AND rss_url='".$content_type."' ".$check_topic." AND rss_limit>0 "))
{ {
@@ -139,24 +137,26 @@ else
$row = $sql->db_Fetch(); $row = $sql->db_Fetch();
} }
//debugging // Debugging
//echo $check." - ".$content_type." - ".$rss_type." - ".$topic_id."<br />"; //echo $check." - ".$content_type." - ".$rss_type." - ".$topic_id."<br />";
//exit; //exit;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
if($rss = new rssCreate($content_type, $rss_type, $topic_id, $row)){ if($rss = new rssCreate($content_type, $rss_type, $topic_id, $row))
{
$rss_title = ($rss->contentType ? $rss->contentType : ucfirst($content_type)); $rss_title = ($rss->contentType ? $rss->contentType : ucfirst($content_type));
$rss->buildRss ($rss_title); $rss->buildRss ($rss_title);
}else{ }
else
{
require_once(HEADERF); require_once(HEADERF);
$ns->tablerender(RSS_LAN_ERROR_0, RSS_LAN_ERROR_1); $ns->tablerender(RSS_LAN_ERROR_0, RSS_LAN_ERROR_1);
require_once(FOOTERF); require_once(FOOTERF);
exit; exit;
} }
class rssCreate { class rssCreate
{
var $contentType; var $contentType;
var $rssType; var $rssType;
var $path; var $path;
@@ -168,8 +168,8 @@ class rssCreate {
var $rssNamespace; var $rssNamespace;
var $rssCustomChannel; var $rssCustomChannel;
function rssCreate($content_type, $rss_type, $topic_id, $row) { function rssCreate($content_type, $rss_type, $topic_id, $row)
// constructor { // Constructor
$sql_rs = new db; $sql_rs = new db;
global $tp, $sql, $e107, $PLUGINS_DIRECTORY, $pref, $rssgen; global $tp, $sql, $e107, $PLUGINS_DIRECTORY, $pref, $rssgen;
$this -> path = e_PLUGIN."rss_menu/"; $this -> path = e_PLUGIN."rss_menu/";
@@ -185,10 +185,11 @@ class rssCreate {
if(strpos($row['rss_path'],'|')!==FALSE){ if(strpos($row['rss_path'],'|')!==FALSE){
$tmp = explode("|", $row['rss_path']); $tmp = explode("|", $row['rss_path']);
$path = e_PLUGIN.$tmp[0]."/e_rss.php"; $path = e_PLUGIN.$tmp[0]."/e_rss.php";
$this -> parm = $tmp[1]; //parm is used in e_rss.php to define which feed you need to prepare $this -> parm = $tmp[1]; // Parm is used in e_rss.php to define which feed you need to prepare
} }
switch ($content_type) { switch ($content_type)
{
case 'news' : case 'news' :
case 1: case 1:
if($topic_id && is_numeric($topic_id)) if($topic_id && is_numeric($topic_id))
@@ -199,6 +200,7 @@ class rssCreate {
{ {
$topic = ''; $topic = '';
} }
$path=''; $path='';
$render = ($pref['rss_othernews'] != 1) ? "AND n.news_render_type < 2" : ""; $render = ($pref['rss_othernews'] != 1) ? "AND n.news_render_type < 2" : "";
$nobody_regexp = "'(^|,)(".str_replace(",", "|", e_UC_NOBODY).")(,|$)'"; $nobody_regexp = "'(^|,)(".str_replace(",", "|", e_UC_NOBODY).")(,|$)'";
@@ -212,23 +214,30 @@ class rssCreate {
$tmp = $sql->db_getList(); $tmp = $sql->db_getList();
$this -> rssItems = array(); $this -> rssItems = array();
$loop=0; $loop=0;
foreach($tmp as $value) { foreach($tmp as $value)
{
$this -> rssItems[$loop]['title'] = $value['news_title']; $this -> rssItems[$loop]['title'] = $value['news_title'];
$this -> rssItems[$loop]['link'] = "http://".$_SERVER['HTTP_HOST'].e_HTTP."news.php?item.".$value['news_id'].".".$value['news_category']; $this -> rssItems[$loop]['link'] = "http://".$_SERVER['HTTP_HOST'].e_HTTP."news.php?item.".$value['news_id'].".".$value['news_category'];
if($value['news_summary'] && $pref['rss_summarydiz']) if($value['news_summary'] && $pref['rss_summarydiz'])
{ {
$this -> rssItems[$loop]['description'] = $value['news_summary']; $this -> rssItems[$loop]['description'] = $value['news_summary'];
}else{ }
else
{
$this -> rssItems[$loop]['description'] = $value['news_body']; $this -> rssItems[$loop]['description'] = $value['news_body'];
} }
$this -> rssItems[$loop]['author'] = $value['user_name']; $this -> rssItems[$loop]['author'] = $value['user_name'];
$this -> rssItems[$loop]['author_email'] = $value['user_email']; $this -> rssItems[$loop]['author_email'] = $value['user_email'];
$this -> rssItems[$loop]['category'] = "<category domain='".SITEURL."news.php?cat.".$value['news_category']."'>".$value['category_name']."</category>"; $this -> rssItems[$loop]['category'] = "<category domain='".SITEURL."news.php?cat.".$value['news_category']."'>".$value['category_name']."</category>";
if($value['news_allow_comments'] && $pref['comments_disabled'] != 1){ if($value['news_allow_comments'] && $pref['comments_disabled'] != 1)
{
$this -> rssItems[$loop]['comment'] = "http://".$_SERVER['HTTP_HOST'].e_HTTP."comment.php?comment.news.".$value['news_id']; $this -> rssItems[$loop]['comment'] = "http://".$_SERVER['HTTP_HOST'].e_HTTP."comment.php?comment.news.".$value['news_id'];
} }
$this -> rssItems[$loop]['pubdate'] = $value['news_datestamp']; $this -> rssItems[$loop]['pubdate'] = $value['news_datestamp'];
if($pref['rss_shownewsimage'] == 1 && strlen(trim($value['news_thumbnail'])) > 0) {
$this -> rssItems[$loop]['news_thumbnail'] = $value['news_thumbnail'];
}
$loop++; $loop++;
} }
@@ -286,7 +295,8 @@ class rssCreate {
break; break;
case 8: case 8:
if(!$this -> topicid) { if(!$this -> topicid)
{
return FALSE; return FALSE;
} }
$path = e_PLUGIN."forum/e_rss.php"; $path = e_PLUGIN."forum/e_rss.php";
@@ -301,7 +311,8 @@ class rssCreate {
$tmp = $sql->db_getList(); $tmp = $sql->db_getList();
$this -> rssItems = array(); $this -> rssItems = array();
$loop=0; $loop=0;
foreach($tmp as $value) { foreach($tmp as $value)
{
$nick = preg_replace("/[0-9]+\./", "", $value['bugtrack2_bugs_poster']); $nick = preg_replace("/[0-9]+\./", "", $value['bugtrack2_bugs_poster']);
$this -> rssItems[$loop]['author'] = $nick; $this -> rssItems[$loop]['author'] = $nick;
$this -> rssItems[$loop]['title'] = $value['bugtrack2_bugs_summary']; $this -> rssItems[$loop]['title'] = $value['bugtrack2_bugs_summary'];
@@ -313,7 +324,8 @@ class rssCreate {
*/ */
case 11: case 11:
if(!$this -> topicid) { if(!$this -> topicid)
{
return FALSE; return FALSE;
} }
$path = e_PLUGIN."forum/e_rss.php"; $path = e_PLUGIN."forum/e_rss.php";
@@ -321,91 +333,76 @@ class rssCreate {
case download: case download:
case 12: case 12:
if($topic_id && is_numeric($topic_id)){ $path = e_PLUGIN."download/e_rss.php";
$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();
$this -> rssItems = array();
$loop=0;
foreach($tmp as $value) {
if($value['download_author']){
$nick = preg_replace("/[0-9]+\./", "", $value['download_author']);
$this -> rssItems[$loop]['author'] = $nick;
}
$this -> rssItems[$loop]['author_email'] = $value['download_author_email'];
$this -> rssItems[$loop]['title'] = $value['download_name'];
$this -> rssItems[$loop]['link'] = $e107->base_path."download.php?view.".$value['download_id'];
$this -> rssItems[$loop]['description'] = ($rss_type == 3 ? $value['download_description'] : $value['download_description']);
$this -> rssItems[$loop]['category_name'] = $value['download_category_name'];
$this -> rssItems[$loop]['category_link'] = $e107->base_path."download.php?list.".$value['download_category_id'];
$this -> rssItems[$loop]['enc_url'] = $e107->base_path."request.php?".$value['download_id'];
$this -> rssItems[$loop]['enc_leng'] = $value['download_filesize'];
$this -> rssItems[$loop]['enc_type'] = $this->getmime($value['download_url']);
$this -> rssItems[$loop]['pubdate'] = $value['download_datestamp'];
$loop++;
}
break; break;
} }
if(isset($path) && $path!='')
if(isset($path) && $path!=''){ { // New rss reader from e_rss.php in plugin folder
if (is_readable($path))
//new rss reader from e_rss.php in plugin folder {
if (is_readable($path)) {
require_once($path); require_once($path);
foreach($eplug_rss_data as $key=>$rs){ foreach($eplug_rss_data as $key=>$rs)
foreach($rs as $k=>$row){ {
foreach($rs as $k=>$row)
{
$this -> rssItems[$k]['author'] = $row['author']; $this -> rssItems[$k]['author'] = $row['author'];
$this -> rssItems[$k]['author_email'] = $row['author_email']; $this -> rssItems[$k]['author_email'] = $row['author_email'];
$this -> rssItems[$k]['title'] = $row['title']; $this -> rssItems[$k]['title'] = $row['title'];
if($row['link']){ if($row['link'])
if(eregi("http",$row['link'])){ {
if(eregi("http",$row['link']))
{
$this -> rssItems[$k]['link'] = $row['link']; $this -> rssItems[$k]['link'] = $row['link'];
}else{ }
else
{
$this -> rssItems[$k]['link'] = $e107->base_path.$PLUGINS_DIRECTORY.$row['link']; $this -> rssItems[$k]['link'] = $e107->base_path.$PLUGINS_DIRECTORY.$row['link'];
} }
} }
$this -> rssItems[$k]['description'] = $row['description']; $this -> rssItems[$k]['description'] = $row['description'];
if($row['enc_url']){ if($row['enc_url'])
{
$this -> rssItems[$k]['enc_url'] = $e107->base_path.$PLUGINS_DIRECTORY.$enc_url.$row['item_id']; $this -> rssItems[$k]['enc_url'] = $e107->base_path.$PLUGINS_DIRECTORY.$enc_url.$row['item_id'];
} }
if($row['enc_leng']){ if($row['enc_leng'])
{
$this -> rssItems[$k]['enc_leng'] = $row['enc_leng']; $this -> rssItems[$k]['enc_leng'] = $row['enc_leng'];
} }
if($eplug_rss['enc_type']){ if($eplug_rss['enc_type'])
{
$this -> rssItems[$k]['enc_type'] = $this->getmime($eplug_rss['enc_type']); $this -> rssItems[$k]['enc_type'] = $this->getmime($eplug_rss['enc_type']);
}elseif($row['enc_type']){ }
elseif($row['enc_type'])
{
$this -> rssItems[$k]['enc_type'] = $row['enc_type']; $this -> rssItems[$k]['enc_type'] = $row['enc_type'];
} }
$this -> rssItems[$k]['category_name'] = $row['category_name']; $this -> rssItems[$k]['category_name'] = $row['category_name'];
if($row['category_link']){ if($row['category_link'])
if(eregi("http",$row['category_link'])){ {
if(eregi("http",$row['category_link']))
{
$this -> rssItems[$k]['category_link'] = $row['category_link']; $this -> rssItems[$k]['category_link'] = $row['category_link'];
}else{ }
else
{
$this -> rssItems[$k]['category_link'] = $e107->base_path.$PLUGINS_DIRECTORY.$row['category_link']; $this -> rssItems[$k]['category_link'] = $e107->base_path.$PLUGINS_DIRECTORY.$row['category_link'];
} }
} }
if($row['datestamp']){ if($row['datestamp'])
{
$this -> rssItems[$k]['pubdate'] = $row['datestamp']; $this -> rssItems[$k]['pubdate'] = $row['datestamp'];
} }
} }
} }
} }
} }
} }
function buildRss($rss_title) { function buildRss($rss_title)
{
global $sql, $pref, $tp, $e107, $PLUGINS_DIRECTORY; global $sql, $pref, $tp, $e107, $PLUGINS_DIRECTORY;
header('Content-type: application/xml', TRUE); header('Content-type: application/xml', TRUE);
@@ -413,8 +410,9 @@ class rssCreate {
$rss_namespace = ($this->rssNamespace) ? "xmlns:".$this->rssNamespace : ""; $rss_namespace = ($this->rssNamespace) ? "xmlns:".$this->rssNamespace : "";
$rss_custom_channel = ($this->rssCustomChannel) ? $this->rssCustomChannel : ""; $rss_custom_channel = ($this->rssCustomChannel) ? $this->rssCustomChannel : "";
$time = time(); $time = time();
switch ($this -> rssType) { switch ($this -> rssType)
case 1: // Rss 1.0 {
case 1: // RSS 1.0
echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?> echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>
<!-- generator=\"e107\" --> <!-- generator=\"e107\" -->
<!-- content type=\"".$this -> contentType."\" --> <!-- content type=\"".$this -> contentType."\" -->
@@ -427,15 +425,20 @@ class rssCreate {
<docs>http://backend.userland.com/rss092</docs>\n"; <docs>http://backend.userland.com/rss092</docs>\n";
foreach($this -> rssItems as $value) foreach($this -> rssItems as $value)
{ { // Multi-language rss links.
// Multi-language rss links.
$link = (e_LANQRY) ? str_replace("?","?".e_LANQRY,$value['link']) : $value['link']; $link = (e_LANQRY) ? str_replace("?","?".e_LANQRY,$value['link']) : $value['link'];
echo " echo "
<item> <item>
<title>".$tp->toRss($value['title'])."</title> <title>".$tp->toRss($value['title'])."</title>
<description>".substr($tp->toRss($value['description']),0,150)."</description> <description>".substr($tp->toRss($value['description']),0,150);
if($pref['rss_shownewsimage'] == 1 && strlen(trim($value['news_thumbnail'])) > 0)
{
$news_thumbnail = SITEURLBASE.e_IMAGE_ABS."newspost_images/".$tp->toRss($value['news_thumbnail']);
echo "&lt;a href=&quot;".$link."&quot;&gt;&lt;img src=&quot;".$news_thumbnail."&quot; height=&quot;50&quot; border=&quot;0&quot; hspace=&quot;10&quot; vspace=&quot;10&quot; align=&quot;right&quot;&gt;&lt;/a&gt;";
unset($news_thumbail);
}
echo "</description>
<author>".$value['author']."&lt;".$this->nospam($value['author_email'])."&gt;</author> <author>".$value['author']."&lt;".$this->nospam($value['author_email'])."&gt;</author>
<link>".$link."</link> <link>".$link."</link>
</item>"; </item>";
@@ -445,8 +448,8 @@ class rssCreate {
</rss>"; </rss>";
break; break;
case 2: // rss 2.0 case 2: // RSS 2.0
$sitebutton = (strstr(SITEBUTTON, "http:") ? SITEBUTTON : SITEURL.str_replace("../", "", e_IMAGE).SITEBUTTON); $sitebutton = (strstr(SITEBUTTON, "http:") ? SITEBUTTON : SITEURL.str_replace("../", "", SITEBUTTON));
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?> echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<!-- generator=\"e107\" --> <!-- generator=\"e107\" -->
<!-- content type=\"".$this -> contentType."\" --> <!-- content type=\"".$this -> contentType."\" -->
@@ -473,7 +476,7 @@ class rssCreate {
echo " echo "
<image> <image>
<title>".$tp->toRss($rss_title)."</title> <title>".$tp->toRss($rss_title)."</title>
<url>".(strstr(SITEBUTTON, "http:") ? SITEBUTTON : SITEURL.str_replace("../", "", e_IMAGE).SITEBUTTON)."</url> <url>".(strstr(SITEBUTTON, "http:")!==FALSE ? SITEBUTTON : SITEURL.str_replace("../", "",SITEBUTTON))."</url>
<link>".$pref['siteurl']."</link> <link>".$pref['siteurl']."</link>
<width>88</width> <width>88</width>
<height>31</height> <height>31</height>
@@ -482,8 +485,8 @@ class rssCreate {
} }
// Generally Ignored by 99% of readers. // Generally Ignored by 99% of readers.
/* /*
echo " echo "
<textInput> <textInput>
<title>Search</title> <title>Search</title>
<description>Search ".$tp->toRss($pref['sitename'])."</description> <description>Search ".$tp->toRss($pref['sitename'])."</description>
@@ -493,8 +496,7 @@ class rssCreate {
*/ */
foreach($this -> rssItems as $value) foreach($this -> rssItems as $value)
{ { // Multi-language rss links.
// Multi-language rss links.
$link = (e_LANQRY) ? str_replace("?","?".e_LANQRY,$value['link']) : $value['link']; $link = (e_LANQRY) ? str_replace("?","?".e_LANQRY,$value['link']) : $value['link'];
$catlink = (e_LANQRY) ? str_replace("?","?".e_LANQRY,$value['category_link']) : $value['category_link']; $catlink = (e_LANQRY) ? str_replace("?","?".e_LANQRY,$value['category_link']) : $value['category_link'];
@@ -502,45 +504,57 @@ class rssCreate {
<item> <item>
<title>".$tp->toRss($value['title'])."</title>\n"; <title>".$tp->toRss($value['title'])."</title>\n";
if($link){ if($link)
{
echo "<link>".$link."</link>\n"; echo "<link>".$link."</link>\n";
} }
echo "<description>".$tp->toRss($value['description'],TRUE)."</description>\n"; echo "<description>".$tp->toRss($value['description'],TRUE);
if($pref['rss_shownewsimage'] == 1 && strlen(trim($value['news_thumbnail'])) > 0)
if($value['category_name'] && $catlink){ {
$news_thumbnail = SITEURLBASE.e_IMAGE_ABS."newspost_images/".$tp->toRss($value['news_thumbnail']);
echo "&lt;a href=&quot;".$link."&quot;&gt;&lt;img src=&quot;".$news_thumbnail."&quot; height=&quot;50&quot; border=&quot;0&quot; hspace=&quot;10&quot; vspace=&quot;10&quot; align=&quot;right&quot;&gt;&lt;/a&gt;";
unset($news_thumbail);
}
echo "</description>\n";
if($value['category_name'] && $catlink)
{
echo "<category domain='".$catlink."'>".$tp -> toRss($value['category_name'])."</category>\n"; echo "<category domain='".$catlink."'>".$tp -> toRss($value['category_name'])."</category>\n";
} }
if($value['comment']){ if($value['comment'])
//echo "<comments>".$tp->toRss($value['comment'])."</comments>\n"; {
echo "<comments>".$value['comment']."</comments>\n"; echo "<comments>".$value['comment']."</comments>\n";
} }
if($value['author']){ if($value['author'])
{
echo "<author>".$this->nospam($value['author_email'])." (".$value['author'].")</author>\n"; echo "<author>".$this->nospam($value['author_email'])." (".$value['author'].")</author>\n";
} }
// enclosure support for podcasting etc. // Enclosure support for podcasting etc.
if($value['enc_url'] && $value['enc_leng'] && $value['enc_type']){ if($value['enc_url'] && $value['enc_leng'] && $value['enc_type'])
{
echo "<enclosure url=\"".$value['enc_url']."\" length=\"".$value['enc_leng']."\" type=\"".$value['enc_type']."\" />\n"; echo "<enclosure url=\"".$value['enc_url']."\" length=\"".$value['enc_leng']."\" type=\"".$value['enc_type']."\" />\n";
} }
echo "<pubDate>".date("r", ($value['pubdate'] + $this -> offset))."</pubDate>\n"; echo "<pubDate>".date("r", ($value['pubdate'] + $this -> offset))."</pubDate>\n";
if($link){ if($link)
{
echo "<guid isPermaLink=\"true\">".$link."</guid>\n"; echo "<guid isPermaLink=\"true\">".$link."</guid>\n";
} }
echo "</item>"; echo "</item>";
} }
// echo "<atom:link href=\"".e_SELF."?".($this -> contentType).".4.".$this -> topicId ."\" rel=\"self\" type=\"application/rss+xml\" />"; // echo "<atom:link href=\"".e_SELF."?".($this -> contentType).".4.".$this -> topicId ."\" rel=\"self\" type=\"application/rss+xml\" />";
echo " echo "
</channel> </channel>
</rss>"; </rss>";
break; break;
case 3: // rdf case 3: // RDF
echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?> echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>
<!-- generator=\"e107\" --> <!-- generator=\"e107\" -->
<!-- content type=\"".$this -> contentType."\" --> <!-- content type=\"".$this -> contentType."\" -->
@@ -561,9 +575,7 @@ class rssCreate {
<rdf:Seq>"; <rdf:Seq>";
foreach($this -> rssItems as $value) foreach($this -> rssItems as $value)
{ { // Multi-language rss links.
// Multi-language rss links.
$link = (e_LANQRY) ? str_replace("?","?".e_LANQRY,$value['link']) : $value['link']; $link = (e_LANQRY) ? str_replace("?","?".e_LANQRY,$value['link']) : $value['link'];
echo " echo "
@@ -578,10 +590,8 @@ class rssCreate {
reset($this -> rssItems); reset($this -> rssItems);
unset($link); unset($link);
foreach($this -> rssItems as $value) foreach($this -> rssItems as $value)
{ {
$link = (e_LANQRY) ? str_replace("?","?".e_LANQRY,$value['link']) : $value['link']; // Multi-language rss links.
// Multi-language rss links.
$link = (e_LANQRY) ? str_replace("?","?".e_LANQRY,$value['link']) : $value['link'];
echo " echo "
<item rdf:about=\"".$link."\"> <item rdf:about=\"".$link."\">
@@ -590,31 +600,37 @@ class rssCreate {
<dc:date>".$this->get_iso_8601_date($time + $this -> offset)."</dc:date> <dc:date>".$this->get_iso_8601_date($time + $this -> offset)."</dc:date>
<dc:creator>".$value['author']."</dc:creator> <dc:creator>".$value['author']."</dc:creator>
<dc:subject>".$tp->toRss($value['category_name'])."</dc:subject> <dc:subject>".$tp->toRss($value['category_name'])."</dc:subject>
<description>".$tp->toRss($value['description'])."</description> <description>".$tp->toRss($value['description']);
if($pref['rss_shownewsimage'] == 1 && strlen(trim($value['news_thumbnail'])) > 0)
{
$news_thumbnail = SITEURLBASE.e_IMAGE_ABS."newspost_images/".$tp->toRss($value['news_thumbnail']);
echo "&lt;a href=&quot;".$link."&quot;&gt;&lt;img src=&quot;".$news_thumbnail."&quot; height=&quot;50&quot; border=&quot;0&quot; hspace=&quot;10&quot; vspace=&quot;10&quot; align=&quot;right&quot;&gt;&lt;/a&gt;";
unset($news_thumbail);
}
echo "</description>
</item>"; </item>";
} }
echo " echo "
</rdf:RDF>"; </rdf:RDF>";
break; break;
//new feed for atom - still in development, and not yet tested // Atom
case 4: case 4:
echo "<?xml version='1.0' encoding='utf-8'?>\n echo "<?xml version='1.0' encoding='utf-8'?>\n
<feed xmlns='http://www.w3.org/2005/Atom'>\n"; <feed xmlns='http://www.w3.org/2005/Atom'>\n";
/* /*
<feed version='0.3' <feed version='0.3'
xmlns='http://purl.org/atom/ns#' xmlns='http://purl.org/atom/ns#'
xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:dc='http://purl.org/dc/elements/1.1/'
xml:lang='".CORE_LC.(defined("CORE_LC2") ? "-".CORE_LC2 : "")."'>\n"; xml:lang='".CORE_LC.(defined("CORE_LC2") ? "-".CORE_LC2 : "")."'>\n";
*/ */
// Required
//required
echo " echo "
<id>".$pref['siteurl']."</id>\n <id>".$pref['siteurl']."</id>\n
<title type='text'>".$tp->toRss($rss_title)."</title>\n <title type='text'>".$tp->toRss($rss_title)."</title>\n
<updated>".$this->get_iso_8601_date($time + $this -> offset)."</updated>\n"; <updated>".$this->get_iso_8601_date($time + $this -> offset)."</updated>\n";
//recommended // Recommended
echo " echo "
<author>\n <author>\n
<name>e107</name>\n"; <name>e107</name>\n";
@@ -624,7 +640,7 @@ class rssCreate {
</author>\n </author>\n
<link rel='self' href='".$e107->base_path.$PLUGINS_DIRECTORY."rss_menu/".e_PAGE."?".e_QUERY."' />\n"; <link rel='self' href='".$e107->base_path.$PLUGINS_DIRECTORY."rss_menu/".e_PAGE."?".e_QUERY."' />\n";
//optional // Optional
include(e_ADMIN."ver.php"); include(e_ADMIN."ver.php");
echo " echo "
<category term='e107'/>\n <category term='e107'/>\n
@@ -634,7 +650,7 @@ class rssCreate {
<generator uri='http://e107.org/' version='".$e107info['e107_version']."'>e107</generator>\n"; <generator uri='http://e107.org/' version='".$e107info['e107_version']."'>e107</generator>\n";
//<icon>/icon.jpg</icon>\n //<icon>/icon.jpg</icon>\n
echo " echo "
<logo>".(strstr(SITEBUTTON, "http:") ? SITEBUTTON : SITEURL.str_replace("../", "", e_IMAGE).SITEBUTTON)."</logo>\n <logo>".(strstr(SITEBUTTON, "http:") ? SITEBUTTON : SITEURL.str_replace("../", "", SITEBUTTON))."</logo>\n
<rights type='html'>".$pref['siteadmin']." - ".$this->nospam($pref['siteadminemail'])."</rights>\n"; <rights type='html'>".$pref['siteadmin']." - ".$this->nospam($pref['siteadminemail'])."</rights>\n";
if($pref['sitedescription']){ if($pref['sitedescription']){
echo " echo "
@@ -644,13 +660,13 @@ class rssCreate {
echo " echo "
<entry>\n"; <entry>\n";
//required // Required
echo " echo "
<id>".$value['link']."</id>\n <id>".$value['link']."</id>\n
<title type='text'>".$tp->toRss($value['title'])."</title>\n <title type='text'>".$tp->toRss($value['title'])."</title>\n
<updated>".$this->get_iso_8601_date($value['pubdate'] + $this -> offset)."</updated>\n"; <updated>".$this->get_iso_8601_date($value['pubdate'] + $this -> offset)."</updated>\n";
//recommended // Recommended
$author = ($value['author']) ? $value['author'] : "unknown"; $author = ($value['author']) ? $value['author'] : "unknown";
echo " echo "
@@ -662,9 +678,16 @@ class rssCreate {
//<content>complete story here</content>\n //<content>complete story here</content>\n
echo " echo "
<link rel='alternate' type='text/html' href='".$value['link']."' />\n <link rel='alternate' type='text/html' href='".$value['link']."' />\n
<summary type='text'>".$tp->toRss($value['description'])."</summary>\n"; <summary type='text'>".$tp->toRss($value['description']);
if($pref['rss_shownewsimage'] == 1 && strlen(trim($value['news_thumbnail'])) > 0)
//optional {
$news_thumbnail = SITEURLBASE.e_IMAGE_ABS."newspost_images/".$tp->toRss($value['news_thumbnail']);
echo "&lt;a href=&quot;".$value['link']."&quot;&gt;&lt;img src=&quot;".$news_thumbnail."&quot; height=&quot;50&quot; border=&quot;0&quot; hspace=&quot;10&quot; vspace=&quot;10&quot; align=&quot;right&quot;&gt;&lt;/a&gt;";
unset($news_thumbail);
}
echo "</summary>\n";
// Optional
if($value['category_name']){ if($value['category_name']){
echo "<category term='".$tp -> toRss($value['category_name'])."'/>\n"; echo "<category term='".$tp -> toRss($value['category_name'])."'/>\n";
} }
@@ -676,7 +699,7 @@ class rssCreate {
// <id>http://example.org/</id> // <id>http://example.org/</id>
// <title>Fourty-Two</title> // <title>Fourty-Two</title>
// <updated>2003-12-13T18:30:02Z</updated> // <updated>2003-12-13T18:30:02Z</updated>
// <rights><3E> 2005 Example, Inc.</rights> // <rights><3E> 2005 Example, Inc.</rights>
//</source> //</source>
//<rights type='html'>&amp;copy; 2005 John Doe</rights> //<rights type='html'>&amp;copy; 2005 John Doe</rights>
echo " echo "
@@ -684,19 +707,19 @@ class rssCreate {
} }
echo " echo "
</feed>\n"; </feed>\n";
break; break;
} }
} }
function getmime($file){ function getmime($file)
{
$ext = strtolower(str_replace(".","",strrchr(basename($file), "."))); $ext = strtolower(str_replace(".","",strrchr(basename($file), ".")));
$mime["mp3"] = "audio/mpeg"; $mime["mp3"] = "audio/mpeg";
return $mime[$ext]; return $mime[$ext];
} }
function get_iso_8601_date($int_date) { function get_iso_8601_date($int_date)
//$int_date: current date in UNIX timestamp { //$int_date: current date in UNIX timestamp
$date_mod = date('Y-m-d\TH:i:s', $int_date); $date_mod = date('Y-m-d\TH:i:s', $int_date);
$pre_timezone = date('O', $int_date); $pre_timezone = date('O', $int_date);
$time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2); $time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2);
@@ -704,11 +727,10 @@ class rssCreate {
return $date_mod; return $date_mod;
} }
function nospam($text){ function nospam($text)
{
$tmp = explode("@",$text); $tmp = explode("@",$text);
return ($tmp[0] != "") ? $tmp[0].RSS_LAN_2 : RSS_LAN_3; return ($tmp[0] != "") ? $tmp[0].RSS_LAN_2 : RSS_LAN_3;
} }
} // End class rssCreate
} ?>
?>

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_plugins/rss_menu/rss_menu.php,v $ | $Source: /cvs_backup/e107_0.8/e107_plugins/rss_menu/rss_menu.php,v $
| $Revision: 1.4 $ | $Revision: 1.5 $
| $Date: 2009-08-15 11:55:30 $ | $Date: 2009-09-18 19:05:50 $
| $Author: marj_nl_fr $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
@@ -29,38 +29,41 @@ include_lan(e_PLUGIN."rss_menu/languages/".e_LANGUAGE."_admin_rss_menu.php");
$des = ""; $des = "";
$topic = ""; $topic = "";
if(strstr(e_SELF, "comment.php") && $sql -> db_Select("rss", "rss_path", " rss_path = 'comments' LIMIT 1")) { if(strstr(e_SELF, "comment.php") && $sql -> db_Select("rss", "rss_path", " rss_path = 'comments' LIMIT 1"))
{
$type = 5; $type = 5;
$des = RSS_MENU_L4; $des = RSS_MENU_L4;
} }
if(strstr(e_SELF, "/forum")&& $sql -> db_Select("rss", "rss_path", " rss_path = 'forum|name' LIMIT 1") ) { if(strstr(e_SELF, "/forum")&& $sql -> db_Select("rss", "rss_path", " rss_path = 'forum|name' LIMIT 1") )
{
$type = 6; $type = 6;
$des = RSS_MENU_L5; $des = RSS_MENU_L5;
} }
if(strstr(e_SELF, "forum_viewtopic") && $sql -> db_Select("rss", "rss_path", " rss_path = 'forum|topic' LIMIT 1")) { if(strstr(e_SELF, "forum_viewtopic") && $sql -> db_Select("rss", "rss_path", " rss_path = 'forum|topic' LIMIT 1"))
{
$type = 7; $type = 7;
$des = RSS_MENU_L6; $des = RSS_MENU_L6;
} }
if(strstr(e_SELF, "chat.php")&& $sql -> db_Select("rss", "rss_path", " rss_path = 'chatbox_menu' LIMIT 1")) { if(strstr(e_SELF, "chat.php")&& $sql -> db_Select("rss", "rss_path", " rss_path = 'chatbox_menu' LIMIT 1"))
{
$type = 9; $type = 9;
$des = RSS_MENU_L7; $des = RSS_MENU_L7;
} }
if(strstr(e_SELF, "/bugtracker"))
if(strstr(e_SELF, "/bugtracker")) { {
$type = 10; $type = 10;
$des = RSS_MENU_L8; $des = RSS_MENU_L8;
} }
if(strstr(e_SELF, "download.php") && $sql -> db_Select("rss", "rss_path", " rss_path = 'download' LIMIT 1"))
if(strstr(e_SELF, "download.php") && $sql -> db_Select("rss", "rss_path", " rss_path = 'download' LIMIT 1")) { {
$type = 12; $type = 12;
$des = RSS_MENU_L9; $des = RSS_MENU_L9;
} }
if(!$des)
if(!$des) { {
$type = 1; $type = 1;
$des = RSS_MENU_L3; $des = RSS_MENU_L3;
} }
if(e_PAGE == "news.php" && $pref['rss_newscats']) if(e_PAGE == "news.php" && $pref['rss_newscats'])
{ {
@@ -77,8 +80,9 @@ $text = "
<div class='spacer'><a href='".$path."rss.php?$type.1".($topic ? ".".$topic : "")."'><img src='".$path."images/rss1.png' alt='rss1.0' /></a></div> <div class='spacer'><a href='".$path."rss.php?$type.1".($topic ? ".".$topic : "")."'><img src='".$path."images/rss1.png' alt='rss1.0' /></a></div>
<div class='spacer'><a href='".$path."rss.php?$type.2".($topic ? ".".$topic : "")."'><img src='".$path."images/rss2.png' alt='rss2.0' /></a></div> <div class='spacer'><a href='".$path."rss.php?$type.2".($topic ? ".".$topic : "")."'><img src='".$path."images/rss2.png' alt='rss2.0' /></a></div>
<div class='spacer'><a href='".$path."rss.php?$type.3".($topic ? ".".$topic : "")."'><img src='".$path."images/rss3.png' alt='rdf' /></a><br /></div> <div class='spacer'><a href='".$path."rss.php?$type.3".($topic ? ".".$topic : "")."'><img src='".$path."images/rss3.png' alt='rdf' /></a><br /></div>
<div class='spacer'><a href='".$path."rss.php?$type.4".($topic ? ".".$topic : "")."'><img src='".$path."images/rss4.png' alt='atom' /></a><br /></div>
</div>"; </div>";
$caption = (file_exists(THEME."images/RSS_menu.png") ? "<img src='".THEME_ABS."images/RSS_menu.png' alt='' style='vertical-align:middle' /> ".RSS_MENU_L2 : RSS_MENU_L2); $caption = (file_exists(THEME."images/RSS_menu.png") ? "<img src='".THEME_ABS."images/RSS_menu.png' alt='' style='vertical-align:middle' /> ".RSS_MENU_L2 : RSS_MENU_L2);
$ns->tablerender($caption, $text, 'backend'); $ns->tablerender($caption, $text, 'backend');
?>

View File

@@ -1,11 +1,10 @@
<?php <?php
// $Id: rss_shortcodes.php,v 1.3 2007-11-27 21:47:24 e107steved Exp $ // $Id: rss_shortcodes.php,v 1.4 2009-09-18 19:05:50 e107coders Exp $
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
include_once(e_HANDLER.'shortcode_handler.php'); include_once(e_HANDLER.'shortcode_handler.php');
$rss_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__); $rss_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__);
/* /*
SC_BEGIN RSS_FEED SC_BEGIN RSS_FEED
global $row, $tp; global $row, $tp;
$url2 = e_PLUGIN."rss_menu/rss.php?".e_LANQRY.$tp->toHTML($row['rss_url'], TRUE, 'constants').".2".($row['rss_topicid'] ? ".".$row['rss_topicid'] : ''); $url2 = e_PLUGIN."rss_menu/rss.php?".e_LANQRY.$tp->toHTML($row['rss_url'], TRUE, 'constants').".2".($row['rss_topicid'] ? ".".$row['rss_topicid'] : '');
@@ -39,9 +38,7 @@ $text = "
return $text; return $text;
SC_END SC_END
//##### ADMIN -------------------------------------------------- //##### ADMIN --------------------------------------------------
SC_BEGIN RSS_ADMIN_CAPTION SC_BEGIN RSS_ADMIN_CAPTION
global $sort; global $sort;
list($field,$txt) = explode(",",$parm); list($field,$txt) = explode(",",$parm);
@@ -95,8 +92,6 @@ $options = "
return $options; return $options;
SC_END SC_END
SC_BEGIN RSS_ADMIN_FORM_NAME SC_BEGIN RSS_ADMIN_FORM_NAME
global $row; global $row;
return "<input class='tbox' type='text' name='rss_name' size='74' value=\"".$row['rss_name']."\" />\n"; return "<input class='tbox' type='text' name='rss_name' size='74' value=\"".$row['rss_name']."\" />\n";
@@ -126,7 +121,8 @@ SC_BEGIN RSS_ADMIN_FORM_CLASS
global $row; global $row;
$vals = array(RSS_LAN_ADMIN_21,RSS_LAN_ADMIN_22,RSS_LAN_ADMIN_23); $vals = array(RSS_LAN_ADMIN_21,RSS_LAN_ADMIN_22,RSS_LAN_ADMIN_23);
$text = "<select class='tbox' name='rss_class'>"; $text = "<select class='tbox' name='rss_class'>";
foreach($vals as $key=>$val){ foreach($vals as $key=>$val)
{
$sel = ($row['rss_class'] == $key) ? " selected='selected'" : ""; $sel = ($row['rss_class'] == $key) ? " selected='selected'" : "";
$text .= "<option value='{$key}'{$sel}>$val</option>\n"; $text .= "<option value='{$key}'{$sel}>$val</option>\n";
} }
@@ -139,20 +135,22 @@ global $row;
return "<input class='tbox' name='rss_limit' size='3' title=\"".RSS_LAN05."\" value='".intval($row['rss_limit'])."' maxlength='3' />"; return "<input class='tbox' name='rss_limit' size='3' title=\"".RSS_LAN05."\" value='".intval($row['rss_limit'])."' maxlength='3' />";
SC_END SC_END
SC_BEGIN RSS_ADMIN_FORM_CREATEBUTTON SC_BEGIN RSS_ADMIN_FORM_CREATEBUTTON
global $row, $qs; global $row, $qs;
if(isset($qs[1]) && $qs[1] == "edit" && isset($qs[2]) && is_numeric($qs[2]) ){ if(isset($qs[1]) && $qs[1] == "edit" && isset($qs[2]) && is_numeric($qs[2]) )
{
$text = "<input type='hidden' name='rss_datestamp' value='".$row['rss_datestamp']."' /> $text = "<input type='hidden' name='rss_datestamp' value='".$row['rss_datestamp']."' />
<input type='hidden' name='rss_id' value='".$row['rss_id']."' /> <input type='hidden' name='rss_id' value='".$row['rss_id']."' />
<input class='button' type='submit' name='update_rss' value=\"".LAN_UPDATE."\" />"; <input class='button' type='submit' name='update_rss' value=\"".LAN_UPDATE."\" />";
}else{ }
else
{
$text = "<input class='button' type='submit' name='create_rss' value=\"".LAN_CREATE."\" />"; $text = "<input class='button' type='submit' name='create_rss' value=\"".LAN_CREATE."\" />";
} }
return $text; return $text;
SC_END SC_END
SC_BEGIN RSS_ADMIN_IMPORT_CHECK SC_BEGIN RSS_ADMIN_IMPORT_CHECK
global $feed, $rs, $tp, $i; global $feed, $rs, $tp, $i;
$text = "<input type='checkbox' name='importid[$i]' value='1' />"; $text = "<input type='checkbox' name='importid[$i]' value='1' />";
@@ -190,6 +188,5 @@ SC_BEGIN RSS_ADMIN_IMPORT_TOPICID
global $feed; global $feed;
return $feed['topic_id']; return $feed['topic_id'];
SC_END SC_END
*/ */
?> ?>

View File

@@ -1,17 +1,18 @@
<?php <?php
if (!defined('ADMIN_WIDTH')) { define("ADMIN_WIDTH", "width:98%;"); } if (!defined('ADMIN_WIDTH')) { define("ADMIN_WIDTH", "width:98%;"); }
if(!defined("USER_WIDTH")){ define("USER_WIDTH","width:100%"); } if(!defined("USER_WIDTH")){ define("USER_WIDTH","width:100%"); }
//rss listing // Rss listing
if(!isset($RSS_LIST_HEADER)){ if(!isset($RSS_LIST_HEADER))
{
$RSS_LIST_HEADER = "<table class='fborder' style='".USER_WIDTH."'> $RSS_LIST_HEADER = "<table class='fborder' style='".USER_WIDTH."'>
<tr> <tr>
<td class='fcaption' style='width:55%'>".RSS_LAN_ADMIN_4."</td> <td class='fcaption' style='width:55%'>".RSS_LAN_ADMIN_4."</td>
<td class='fcaption' style='text-align:right'>".RSS_PLUGIN_LAN_6."</td> <td class='fcaption' style='text-align:right'>".RSS_PLUGIN_LAN_6."</td>
</tr>"; </tr>";
} }
if(!isset($RSS_LIST_TABLE)){ if(!isset($RSS_LIST_TABLE))
{
$RSS_LIST_TABLE = " $RSS_LIST_TABLE = "
<tr> <tr>
<td class='forumheader3'>{RSS_FEED}<br /> <td class='forumheader3'>{RSS_FEED}<br />
@@ -22,12 +23,14 @@ if(!isset($RSS_LIST_TABLE)){
</td> </td>
</tr>"; </tr>";
} }
if(!isset($RSS_LIST_FOOTER)){ if(!isset($RSS_LIST_FOOTER))
{
$RSS_LIST_FOOTER = "</table>"; $RSS_LIST_FOOTER = "</table>";
} }
//admin : rss listing // Admin : rss listing
if(!isset($RSS_ADMIN_LIST_HEADER)){ if(!isset($RSS_ADMIN_LIST_HEADER))
{
$RSS_ADMIN_LIST_HEADER = " $RSS_ADMIN_LIST_HEADER = "
<div style='text-align:center;'> <div style='text-align:center;'>
<form action='".e_SELF.(e_QUERY ? "?".e_QUERY : "")."' id='dataform' method='post' > <form action='".e_SELF.(e_QUERY ? "?".e_QUERY : "")."' id='dataform' method='post' >
@@ -42,7 +45,8 @@ if(!isset($RSS_ADMIN_LIST_HEADER)){
<td class='fcaption' style='white-space:nowrap;'>".LAN_OPTIONS."</td> <td class='fcaption' style='white-space:nowrap;'>".LAN_OPTIONS."</td>
</tr>"; </tr>";
} }
if(!isset($RSS_ADMIN_LIST_TABLE)){ if(!isset($RSS_ADMIN_LIST_TABLE))
{
$RSS_ADMIN_LIST_TABLE = " $RSS_ADMIN_LIST_TABLE = "
<tr> <tr>
<td class='forumheader3'>{RSS_ADMIN_ID}</td> <td class='forumheader3'>{RSS_ADMIN_ID}</td>
@@ -54,7 +58,8 @@ if(!isset($RSS_ADMIN_LIST_TABLE)){
<td class='forumheader3' style='text-align:center'>{RSS_ADMIN_OPTIONS}</td> <td class='forumheader3' style='text-align:center'>{RSS_ADMIN_OPTIONS}</td>
</tr>"; </tr>";
} }
if(!isset($RSS_ADMIN_LIST_FOOTER)){ if(!isset($RSS_ADMIN_LIST_FOOTER))
{
$RSS_ADMIN_LIST_FOOTER = " $RSS_ADMIN_LIST_FOOTER = "
<tr> <tr>
<td class='forumheader' colspan='7' style='text-align:center'> <td class='forumheader' colspan='7' style='text-align:center'>
@@ -66,8 +71,9 @@ if(!isset($RSS_ADMIN_LIST_FOOTER)){
</div>"; </div>";
} }
//admin : rss create/edit // Admin : rss create/edit
if(!isset($RSS_ADMIN_CREATE_TABLE)){ if(!isset($RSS_ADMIN_CREATE_TABLE))
{
$RSS_ADMIN_CREATE_TABLE = " $RSS_ADMIN_CREATE_TABLE = "
<div style='text-align:center;'> <div style='text-align:center;'>
<form action='".e_SELF.(e_QUERY ? "?".e_QUERY : "")."' id='dataform' method='post' > <form action='".e_SELF.(e_QUERY ? "?".e_QUERY : "")."' id='dataform' method='post' >
@@ -100,6 +106,7 @@ if(!isset($RSS_ADMIN_CREATE_TABLE)){
<td class='forumheader3'>".RSS_LAN_ADMIN_8."</td> <td class='forumheader3'>".RSS_LAN_ADMIN_8."</td>
<td class='forumheader3'>{RSS_ADMIN_FORM_CLASS}</td> <td class='forumheader3'>{RSS_ADMIN_FORM_CLASS}</td>
</tr> </tr>
<tr> <tr>
<td class='forumheader' colspan='2' style='text-align:center;'>{RSS_ADMIN_FORM_CREATEBUTTON}</td> <td class='forumheader' colspan='2' style='text-align:center;'>{RSS_ADMIN_FORM_CREATEBUTTON}</td>
</tr> </tr>
@@ -108,8 +115,9 @@ if(!isset($RSS_ADMIN_CREATE_TABLE)){
</div>"; </div>";
} }
//admin : rss options // Admin : rss options
if(!isset($RSS_ADMIN_OPTIONS_TABLE)){ if(!isset($RSS_ADMIN_OPTIONS_TABLE))
{
$RSS_ADMIN_OPTIONS_TABLE = " $RSS_ADMIN_OPTIONS_TABLE = "
<div style='text-align:center;'> <div style='text-align:center;'>
<form action='".e_SELF.(e_QUERY ? "?".e_QUERY : "")."' id='dataform' method='post' > <form action='".e_SELF.(e_QUERY ? "?".e_QUERY : "")."' id='dataform' method='post' >
@@ -130,6 +138,12 @@ if(!isset($RSS_ADMIN_OPTIONS_TABLE)){
<input type='checkbox' name='rss_summarydiz' value='1' ".($pref['rss_summarydiz'] == 1 ? " checked='checked' " : "")." /> <input type='checkbox' name='rss_summarydiz' value='1' ".($pref['rss_summarydiz'] == 1 ? " checked='checked' " : "")." />
</td> </td>
</tr> </tr>
<tr>
<td class='forumheader3'>".RSS_LAN_ADMIN_33."</td>
<td class='forumheader3'>
<input type='checkbox' name='rss_shownewsimage' value='1' ".($pref['rss_shownewsimage'] == 1 ? " checked='checked' " : "")." />
</td>
</tr>
<tr style='vertical-align:top'> <tr style='vertical-align:top'>
<td colspan='2' style='text-align:center' class='forumheader'> <td colspan='2' style='text-align:center' class='forumheader'>
<input class='button' type='submit' name='updatesettings' value='".LAN_SAVE."' /> <input class='button' type='submit' name='updatesettings' value='".LAN_SAVE."' />
@@ -140,8 +154,9 @@ if(!isset($RSS_ADMIN_OPTIONS_TABLE)){
</div>"; </div>";
} }
//admin : rss import // Admin : rss import
if(!isset($RSS_ADMIN_IMPORT_HEADER)){ if(!isset($RSS_ADMIN_IMPORT_HEADER))
{
$RSS_ADMIN_IMPORT_HEADER = " $RSS_ADMIN_IMPORT_HEADER = "
<div style='text-align:center;'> <div style='text-align:center;'>
<form action='".e_SELF."' id='imlistform' method='post' > <form action='".e_SELF."' id='imlistform' method='post' >
@@ -155,7 +170,8 @@ if(!isset($RSS_ADMIN_IMPORT_HEADER)){
<td class='fcaption'>".RSS_LAN_ADMIN_12."</td> <td class='fcaption'>".RSS_LAN_ADMIN_12."</td>
</tr>"; </tr>";
} }
if(!isset($RSS_ADMIN_IMPORT_TABLE)){ if(!isset($RSS_ADMIN_IMPORT_TABLE))
{
$RSS_ADMIN_IMPORT_TABLE = " $RSS_ADMIN_IMPORT_TABLE = "
<tr> <tr>
<td class='forumheader3'>{RSS_ADMIN_IMPORT_CHECK}</td> <td class='forumheader3'>{RSS_ADMIN_IMPORT_CHECK}</td>
@@ -166,7 +182,8 @@ if(!isset($RSS_ADMIN_IMPORT_TABLE)){
</tr>"; </tr>";
} }
if(!isset($RSS_ADMIN_IMPORT_FOOTER)){ if(!isset($RSS_ADMIN_IMPORT_FOOTER))
{
$RSS_ADMIN_IMPORT_FOOTER = " $RSS_ADMIN_IMPORT_FOOTER = "
<tr style='vertical-align:top'> <tr style='vertical-align:top'>
<td colspan='5' style='text-align:center' class='forumheader'> <td colspan='5' style='text-align:center' class='forumheader'>
@@ -177,5 +194,4 @@ if(!isset($RSS_ADMIN_IMPORT_FOOTER)){
</form> </form>
</div>"; </div>";
} }
?>
?>