Добавлен Модуль RSS
This commit is contained in:
commit
1a59df2255
13
README.md
Normal file
13
README.md
Normal file
@ -0,0 +1,13 @@
|
||||
## rss
|
||||
|
||||
# Модуль RSS v1.2
|
||||
|
||||
|
||||
## Данный модуль предзназначен для организации RSS потоков на вашем сайте.
|
||||
|
||||
|
||||
## Перед копированием модуля в папку modules, удалите файл README.md, копируйте только корневую папку rss со всем ее содержимым внутри!
|
||||
|
||||
## Changelog:
|
||||
|
||||
15.01.2013 - версия 1.2
|
165
class.rss.php
Normal file
165
class.rss.php
Normal file
@ -0,0 +1,165 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Класс работы с RSS-лентами
|
||||
*
|
||||
* @package AVE.cms
|
||||
* @subpackage module_RSS
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
class Rss
|
||||
{
|
||||
/**
|
||||
* Список RSS - лент
|
||||
*
|
||||
* @param string $tpl_dir путь к папке с шаблонами
|
||||
*/
|
||||
public static function rssList($tpl_dir, $lang_file)
|
||||
{
|
||||
global $AVE_DB, $AVE_Template;
|
||||
|
||||
$AVE_Template->config_load($lang_file);
|
||||
|
||||
$channels = array();
|
||||
$sql = $AVE_DB->Query("SELECT * FROM " . PREFIX . "_module_rss");
|
||||
while ($channel = $sql->FetchRow())
|
||||
{
|
||||
$channel->tag = '[mod_rss:' . $channel->id . ']';
|
||||
array_push($channels, $channel);
|
||||
}
|
||||
|
||||
$AVE_Template->assign('channels', $channels);
|
||||
$AVE_Template->assign('content', $AVE_Template->fetch($tpl_dir . 'rss_list.tpl'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Создание RSS - ленты
|
||||
*
|
||||
*/
|
||||
public static function rssNew()
|
||||
{
|
||||
global $AVE_DB;
|
||||
|
||||
$AVE_DB->Query("
|
||||
INSERT
|
||||
INTO " . PREFIX . "_module_rss
|
||||
SET
|
||||
id = '',
|
||||
rss_site_name = '" . $_POST['new_rss'] . "',
|
||||
rss_site_description = '',
|
||||
rss_site_url = '" . addslashes(get_home_link()) . "',
|
||||
rss_rubric_id = 1,
|
||||
rss_title_id = 0,
|
||||
rss_description_id = 0,
|
||||
rss_item_on_page = 10,
|
||||
rss_description_lenght = 200
|
||||
");
|
||||
|
||||
$iid = $AVE_DB->InsertId();
|
||||
|
||||
header('Location:index.php?do=modules&action=modedit&mod=rss&moduleaction=edit&cp=' . SESSION . '&id=' . $iid);
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Редактирование RSS - ленты
|
||||
*
|
||||
* @param string $tpl_dir путь к папке с шаблонами
|
||||
* @param string $lang_file путь к языковому файлу
|
||||
*/
|
||||
public static function rssEdit($tpl_dir, $lang_file)
|
||||
{
|
||||
global $AVE_DB, $AVE_Template;
|
||||
|
||||
$AVE_Template->config_load($lang_file);
|
||||
|
||||
$channel = $AVE_DB->Query("
|
||||
SELECT *
|
||||
FROM " . PREFIX . "_module_rss
|
||||
WHERE id = '" . (int)($_REQUEST['id']) . "'
|
||||
")->FetchRow();
|
||||
|
||||
if (isset($_REQUEST['rubric_id']) && is_numeric($_REQUEST['rubric_id']))
|
||||
{
|
||||
$channel->rss_rubric_id = $_REQUEST['rubric_id'];
|
||||
}
|
||||
|
||||
$rubrics = array();
|
||||
$sql_rubrics = $AVE_DB->Query("
|
||||
SELECT
|
||||
Id,
|
||||
rubric_title
|
||||
FROM " . PREFIX . "_rubrics
|
||||
");
|
||||
while ($res = $sql_rubrics->FetchRow())
|
||||
{
|
||||
array_push($rubrics, $res);
|
||||
}
|
||||
|
||||
$fields = array();
|
||||
$sql_fields = $AVE_DB->Query("SELECT
|
||||
Id,
|
||||
rubric_id,
|
||||
rubric_field_title
|
||||
FROM " . PREFIX . "_rubric_fields
|
||||
WHERE rubric_id = '" . $channel->rss_rubric_id . "'
|
||||
");
|
||||
while ($res = $sql_fields->FetchRow())
|
||||
{
|
||||
array_push($fields,$res);
|
||||
}
|
||||
|
||||
$AVE_Template->assign('channel', $channel);
|
||||
$AVE_Template->assign('rubrics', $rubrics);
|
||||
$AVE_Template->assign('fields', $fields);
|
||||
$AVE_Template->assign('content', $AVE_Template->fetch($tpl_dir . 'rss_edit.tpl'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Запись настроек
|
||||
*
|
||||
*/
|
||||
public static function rssSave()
|
||||
{
|
||||
global $AVE_DB;
|
||||
|
||||
$AVE_DB->Query("
|
||||
UPDATE " . PREFIX . "_module_rss
|
||||
SET
|
||||
rss_site_name = '" . $_POST['rss_site_name'] . "',
|
||||
rss_site_description = '" . $_POST['site_descr'] . "',
|
||||
rss_site_url = '" . $_POST['rss_site_url'] . "',
|
||||
rss_rubric_id = '" . (int)$_POST['rss_rubric_id'] . "',
|
||||
rss_title_id = '" . (int)$_POST['field_title'] . "',
|
||||
rss_description_id = '" . (int)$_POST['field_descr'] . "',
|
||||
rss_item_on_page = '" . (int)$_POST['rss_item_on_page'] . "',
|
||||
rss_description_lenght = '" . (int)$_POST['rss_description_lenght'] . "'
|
||||
WHERE
|
||||
id = '" . (int)$_POST['id'] . "'
|
||||
");
|
||||
|
||||
header('Location:index.php?do=modules&action=modedit&mod=rss&moduleaction=edit&cp=' . SESSION . '&id=' . (int)$_POST['id']);
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Удаление RSS - ленты
|
||||
*
|
||||
*/
|
||||
public static function rssDelete()
|
||||
{
|
||||
global $AVE_DB;
|
||||
|
||||
$AVE_DB->Query("
|
||||
DELETE
|
||||
FROM " . PREFIX . "_module_rss
|
||||
WHERE id = '" . (int)$_REQUEST['id'] . "'
|
||||
");
|
||||
|
||||
header('Location:index.php?do=modules&action=modedit&mod=rss&moduleaction=1&cp=' . SESSION);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
4
lang/index.php
Normal file
4
lang/index.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
header('Location:/');
|
||||
exit;
|
||||
?>
|
36
lang/ru.txt
Normal file
36
lang/ru.txt
Normal file
@ -0,0 +1,36 @@
|
||||
RSS_ENTER_NAME = "Пожалуйста, укажите название RSS канала"
|
||||
RSS_BUTTON_ADD = "Добавить канал"
|
||||
RSS_BUTTON_SAVE = "Сохранить изменения"
|
||||
RSS_LIST = "RSS каналы"
|
||||
RSS_LIST_TIP = "В данном разделе приведен список всех RSS каналов в системе."
|
||||
RSS_NAME = "Название канала"
|
||||
RSS_TAG = "Системный тег"
|
||||
RSS_CHANNEL_NAME = "Название канала"
|
||||
RSS_ACTIONS = "Действия"
|
||||
RSS_ID = "Id"
|
||||
RSS_EDIT_HINT = "Редактировать данный канал"
|
||||
RSS_DELETE_HINT = "Удалить данный канал"
|
||||
RSS_DELETE_CONF = "Вы уверены, что хотите удалить данный канал?"
|
||||
RSS_NO_ITEMS = "В настоящий момент не существует ни одного RSS канала"
|
||||
RSS_ADD = "Добавить новый RSS канал"
|
||||
RSS_TITLE = "Список RSS каналов"
|
||||
RSS_EDIT = "Редактирование канала"
|
||||
RSS_EDIT_TIP = "В данном разделе вы можете отредактировать основные параметры RSS канала"
|
||||
RSS_RETURN = "Вернуться к списку"
|
||||
RSS_ITEM_NAME = "Название канала:"
|
||||
RSS_LIMIT_NAME = "Количество на странице:"
|
||||
RSS_RUBS_NAME = "Рубрика-источник:"
|
||||
RSS_CHANNEL_TITLE = "Поле для заголовка:"
|
||||
RSS_CHANNEL_DESC = "Поле для описания:"
|
||||
RSS_CHANNEL_IMAGE = "Поле для изображения:"
|
||||
RSS_CHANNEL_URL = "Адрес сайта"
|
||||
RSS_CHANNEL_DESCR = "Описание канала:"
|
||||
RSS_DESCR_LIMIT = "Длина сообщений"
|
||||
RSS_ONPAGE_LIMIT = "Сообщений в потоке"
|
||||
RSS_SITE_NAME_NO = "Не указан"
|
||||
RSS_TITLE_EDIT = "Настройки RSS канала"
|
||||
RSS_EDIT_TIP_RUBRIC = "Выберите рубрику источник, т.е. рубрику, из который у вас будут выбираться документы.<br /><br /><strong>ВАЖНО!!</strong><br />Если вы заполните все поля, а потом нажмете на выбор рубрики, все введенные значения очистяться!"
|
||||
RSS_EDIT_TIP_NAME = "Название канала пишите НОРМАЛЬНО и ПРАВИЛЬНО, т.к. это название будет подставлено при выводе потока."
|
||||
RSS_EDIT_TIP_ADD = "Адрес сайта вписывайте БЕЗ начального http://<br ><br />Имейте ввиду адрес также подставляется в поток."
|
||||
RSS_EDIT_TIP_TITLE = "Описание канала подставляется в поток. Пишите правильно и четко.<br /><br /><strong>ВАЖНО!!!</strong><br />Запрещается использовать в тексте HTML теги!!!"
|
||||
RSS_SYMBOLS = "символов"
|
84
module.php
Normal file
84
module.php
Normal file
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AVE.cms - Модуль RSS
|
||||
*
|
||||
* @package AVE.cms
|
||||
* @subpackage module_RSS
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
if(!defined('BASE_DIR')) exit;
|
||||
|
||||
if (defined('ACP'))
|
||||
{
|
||||
$modul['ModuleName'] = 'RSS потоки';
|
||||
$modul['ModuleSysName'] = 'rss';
|
||||
$modul['ModuleVersion'] = '1.2';
|
||||
$modul['ModuleDescription'] = 'Данный модуль предзназначен для организации RSS потоков на вашем сайте.';
|
||||
$modul['ModuleAutor'] = 'AVE.CMS Team';
|
||||
$modul['ModuleCopyright'] = '© 2007-2013 AVE.CMS';
|
||||
$modul['ModuleIsFunction'] = 1;
|
||||
$modul['ModuleAdminEdit'] = 1;
|
||||
$modul['ModuleFunction'] = 'mod_rss';
|
||||
$modul['ModuleTag'] = '[mod_rss:XXX]';
|
||||
$modul['ModuleTagLink'] = null;
|
||||
$modul['ModuleAveTag'] = '#\\\[mod_rss:(\\\d+)]#';
|
||||
$modul['ModulePHPTag'] = "<?php mod_rss(''$1''); ?>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Обработка тега модуля RSS
|
||||
*
|
||||
* @param int $rss_id идентификатор RSS-ленты
|
||||
*/
|
||||
function mod_rss($rss_id)
|
||||
{
|
||||
$rss_id = preg_replace('/\D/', '', $rss_id);
|
||||
|
||||
if (is_numeric($rss_id))
|
||||
{
|
||||
echo '<a href="', ABS_PATH, 'rss/rss-', $rss_id, '.xml" target="blank"><img src="',
|
||||
ABS_PATH, 'modules/rss/templates/feed.gif" border="0" title="RSS лента новостей" /></a>';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['module']) && $_REQUEST['module'] == 'rss'
|
||||
&& isset($_REQUEST['do']) && $_REQUEST['do'] == 'show')
|
||||
{
|
||||
header('Location:rss/index.php?id=' . $_GET['id']);
|
||||
}
|
||||
|
||||
if (defined('ACP') && !empty($_REQUEST['moduleaction']))
|
||||
{
|
||||
require(BASE_DIR . '/modules/rss/class.rss.php');
|
||||
|
||||
switch ($_REQUEST['moduleaction'])
|
||||
{
|
||||
case '1':
|
||||
$tpl_dir = BASE_DIR . '/modules/rss/templates/';
|
||||
$lang_file = BASE_DIR . '/modules/rss/lang/' . $_SESSION['user_language'] . '.txt';
|
||||
Rss::rssList($tpl_dir, $lang_file);
|
||||
break;
|
||||
|
||||
case 'add':
|
||||
Rss::rssNew();
|
||||
break;
|
||||
|
||||
case 'del':
|
||||
Rss::rssDelete();
|
||||
break;
|
||||
|
||||
case 'edit':
|
||||
$tpl_dir = BASE_DIR . '/modules/rss/templates/';
|
||||
$lang_file = BASE_DIR . '/modules/rss/lang/' . $_SESSION['user_language'] . '.txt';
|
||||
Rss::rssEdit($tpl_dir, $lang_file);
|
||||
break;
|
||||
|
||||
case 'saveedit':
|
||||
Rss::rssSave();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
55
sql.php
Normal file
55
sql.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AVE.cms - Модуль RSS
|
||||
*
|
||||
* @package AVE.cms
|
||||
* @subpackage module_RSS
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
/**
|
||||
* mySQL-запросы для установки, обновления и удаления модуля
|
||||
*/
|
||||
|
||||
$module_sql_install = array();
|
||||
$module_sql_deinstall = array();
|
||||
$module_sql_update = array();
|
||||
|
||||
//Удаление модуля
|
||||
$module_sql_deinstall[] = "DROP TABLE IF EXISTS CPPREFIX_modul_rss;";
|
||||
|
||||
//Установка модуля
|
||||
$module_sql_install[] = "CREATE TABLE CPPREFIX_module_rss (
|
||||
`id` smallint(3) unsigned NOT NULL auto_increment,
|
||||
`rss_site_name` char(255) NOT NULL,
|
||||
`rss_site_description` char(255) NOT NULL,
|
||||
`rss_site_url` char(255) NOT NULL,
|
||||
`rss_rubric_id` smallint(3) unsigned NOT NULL,
|
||||
`rss_title_id` int(10) unsigned NOT NULL,
|
||||
`rss_description_id` int(10) unsigned NOT NULL,
|
||||
`rss_item_on_page` tinyint(1) unsigned NOT NULL,
|
||||
`rss_description_lenght` smallint(3) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
|
||||
|
||||
// Обновление модуля
|
||||
$module_sql_update[] = "
|
||||
UPDATE
|
||||
`CPPREFIX_module`
|
||||
SET
|
||||
ModuleAveTag = '" . $modul['ModuleAveTag'] . "',
|
||||
ModulePHPTag = '" . $modul['ModulePHPTag'] . "',
|
||||
ModuleVersion = '" . $modul['ModuleVersion'] . "'
|
||||
WHERE
|
||||
ModuleSysName = '" . $modul['ModuleSysName'] . "'
|
||||
LIMIT 1;
|
||||
";
|
||||
|
||||
$module_sql_update[] = "
|
||||
RENAME TABLE
|
||||
`CPPREFIX_modul_rss`
|
||||
TO
|
||||
`CPPREFIX_module_rss`
|
||||
";
|
||||
?>
|
BIN
templates/feed.gif
Normal file
BIN
templates/feed.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 952 B |
4
templates/index.php
Normal file
4
templates/index.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
header('Location:/');
|
||||
exit;
|
||||
?>
|
108
templates/rss_edit.tpl
Normal file
108
templates/rss_edit.tpl
Normal file
@ -0,0 +1,108 @@
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
function changeRub(select) {ldelim}
|
||||
location.href='index.php?do=modules&action=modedit&mod=rss&moduleaction=edit&id={$channel->id}&rubric_id=' + select.options[select.selectedIndex].value + '&cp={$sess}';
|
||||
{rdelim}
|
||||
</script>
|
||||
|
||||
<div class="title"><h5>{#RSS_EDIT#}</h5></div>
|
||||
|
||||
<div class="widget" style="margin-top: 0px;">
|
||||
<div class="body">
|
||||
{#RSS_EDIT_TIP#}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="breadCrumbHolder module">
|
||||
<div class="breadCrumb module">
|
||||
<ul>
|
||||
<li class="firstB"><a href="index.php" title="{#MAIN_PAGE#}">{#MAIN_PAGE#}</a></li>
|
||||
<li><a href="index.php?do=modules&cp={$sess}">{#MODULES_SUB_TITLE#}</a></li>
|
||||
<li><a href="index.php?do=modules&action=modedit&mod=rss&moduleaction=1&cp={$sess}">{#RSS_LIST#}</a></li>
|
||||
<li>{#RSS_EDIT#}</li>
|
||||
<li><strong class="code">{$channel->rss_site_name|escape}</strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="widget first">
|
||||
<div class="head"><h5 class="iFrames">{#RSS_TITLE_EDIT#}</h5></div>
|
||||
<form method="post" action="index.php?do=modules&action=modedit&mod=rss&moduleaction=saveedit&cp={$sess}" onSubmit="return check_name();" class="mainForm">
|
||||
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic">
|
||||
<tbody>
|
||||
|
||||
<tr class="noborder">
|
||||
<td width="1%"><a title="{#RSS_EDIT_TIP_RUBRIC#}" href="#" class="toprightDir icon_sprite ico_info"></a></td>
|
||||
<td width="15%"><strong>{#RSS_RUBS_NAME#}</strong></td>
|
||||
<td>
|
||||
<select name="rss_rubric_id" onChange="changeRub(this)" id="rss_rubric_id" style="width: 350px;">
|
||||
{foreach from=$rubrics item=rubric}
|
||||
<option value="{$rubric->Id}" {if $channel->rss_rubric_id == $rubric->Id}selected{/if}>{$rubric->rubric_title|escape}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="1%"><a title="{#RSS_EDIT_TIP_NAME#}" href="#" class="toprightDir icon_sprite ico_info"></a></td>
|
||||
<td width="20%"><strong>{#RSS_ITEM_NAME#}</strong></td>
|
||||
<td><input name="rss_site_name" style="width: 500px;" type="text" id="rss_site_name" size="60" value="{$channel->rss_site_name|escape}" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="1%"><a title="{#RSS_EDIT_TIP_ADD#}" href="#" class="toprightDir icon_sprite ico_info"></a></td>
|
||||
<td width="20%"><strong>{#RSS_CHANNEL_URL#}:</strong></td>
|
||||
<td><input name="rss_site_url" style="width: 500px;" type="text" id="rss_site_url" size="60" value="{$channel->rss_site_url}" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="1%"><a title="{#RSS_EDIT_TIP_TITLE#}" href="#" class="toprightDir icon_sprite ico_info"></a></td>
|
||||
<td width="20%"><strong>{#RSS_CHANNEL_DESCR#}</strong></td>
|
||||
<td><textarea style="width: 500px;" name="site_descr" cols="60" rows="4">{$channel->rss_site_description|escape}</textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="1%"></td>
|
||||
<td width="20%"><strong>{#RSS_CHANNEL_TITLE#}</strong></td>
|
||||
<td>
|
||||
<select name="field_title" style="width: 350px;">
|
||||
{foreach from=$fields item=field}
|
||||
<option value="{$field->Id}"{if $field->Id == $channel->rss_title_id} selected="selected"{/if}>{$field->rubric_field_title|escape}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="1%"></td>
|
||||
<td width="20%"><strong>{#RSS_CHANNEL_DESC#}</strong></td>
|
||||
<td>
|
||||
<select name="field_descr" style="width: 350px;">
|
||||
{foreach from=$fields item=field}
|
||||
<option value="{$field->Id}"{if $field->Id == $channel->rss_description_id} selected="selected"{/if}>{$field->rubric_field_title|escape}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="1%"></td>
|
||||
<td width="20%"><strong>{#RSS_LIMIT_NAME#}</strong></td>
|
||||
<td><input name="rss_item_on_page" type="text" id="rss_item_on_page" size="10" style="width: 50px;" value="{$channel->rss_item_on_page}" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="1%"></td>
|
||||
<td width="20%"><strong>{#RSS_DESCR_LIMIT#}:</strong></td>
|
||||
<td><input name="rss_description_lenght" type="text" id="rss_description_lenght" size="10" style="width: 50px;" value="{$channel->rss_description_lenght}" /> {#RSS_SYMBOLS#}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="third" colspan="3"><input type="submit" class="basicBtn" value="{#RSS_BUTTON_SAVE#}" /></td>
|
||||
</tr>
|
||||
|
||||
<input type="hidden" name="id" value="{$channel->id}" />
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
107
templates/rss_list.tpl
Normal file
107
templates/rss_list.tpl
Normal file
@ -0,0 +1,107 @@
|
||||
<script type="text/javascript" language="JavaScript">
|
||||
$(document).ready(function(){ldelim}
|
||||
|
||||
$(".AddRSS").click( function(e) {ldelim}
|
||||
e.preventDefault();
|
||||
var user_group = $('#add_rss #new_rss').fieldValue();
|
||||
var title = '{#RSS_ADD#}';
|
||||
var text = '{#RSS_ENTER_NAME#}';
|
||||
if (user_group == ""){ldelim}
|
||||
jAlert(text,title);
|
||||
{rdelim}else{ldelim}
|
||||
$.alerts._overlay('show');
|
||||
$("#add_rss").submit();
|
||||
{rdelim}
|
||||
{rdelim});
|
||||
|
||||
{rdelim});
|
||||
</script>
|
||||
|
||||
<div class="title"><h5>{#RSS_LIST#}</h5></div>
|
||||
|
||||
<div class="widget" style="margin-top: 0px;">
|
||||
<div class="body">
|
||||
{#RSS_LIST_TIP#}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="breadCrumbHolder module">
|
||||
<div class="breadCrumb module">
|
||||
<ul>
|
||||
<li class="firstB"><a href="index.php" title="{#MAIN_PAGE#}">{#MAIN_PAGE#}</a></li>
|
||||
<li><a href="index.php?do=modules&cp={$sess}">{#MODULES_SUB_TITLE#}</a></li>
|
||||
<li>{#RSS_LIST#}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="widget first">
|
||||
<ul class="tabs">
|
||||
<li class="activeTab"><a href="#tab1">{#RSS_LIST#}</a></li>
|
||||
<li class=""><a href="#tab2">{#RSS_ADD#}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab_container">
|
||||
<div id="tab1" class="tab_content" style="display: block;">
|
||||
|
||||
<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic mainForm">
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="1%">{#RSS_ID#}</td>
|
||||
<td width="30%">{#RSS_CHANNEL_NAME#}</td>
|
||||
<td width="15%">{#RSS_ONPAGE_LIMIT#}</td>
|
||||
<td width="15%">{#RSS_DESCR_LIMIT#}</td>
|
||||
<td width="20%">{#RSS_CHANNEL_URL#}</td>
|
||||
<td width="10%">{#RSS_TAG#}</td>
|
||||
<td width="5%" colspan="2" align="center">{#RSS_ACTIONS#}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if $channels}
|
||||
{foreach from=$channels item=channel}
|
||||
<tr>
|
||||
<td class="itcen">{$channel->id}</td>
|
||||
<td><a title="{#RSS_EDIT_HINT#}" href="index.php?do=modules&action=modedit&mod=rss&moduleaction=edit&cp={$sess}&id={$channel->id}">{$channel->rss_site_name|escape}</a></td>
|
||||
<td>{$channel->rss_item_on_page}</td>
|
||||
<td>{$channel->rss_description_lenght} {#RSS_SYMBOLS#}</td>
|
||||
<td>{if $channel->rss_site_url == ''}{#RSS_SITE_NAME_NO#}{else}{$channel->rss_site_url}{/if}</td>
|
||||
<td><input name="textfield" type="text" value="{$channel->tag}" readonly /></td>
|
||||
<td align="center">
|
||||
<a class="topleftDir icon_sprite ico_edit" title="{#RSS_EDIT_HINT#}" href="index.php?do=modules&action=modedit&mod=rss&moduleaction=edit&cp={$sess}&id={$channel->id}"></a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a class="topleftDir ConfirmDelete icon_sprite ico_delete" title="{#RSS_DELETE_HINT#}" dir="{#RSS_DELETE_HINT#}" name="{#RSS_DELETE_CONF#}" href="index.php?do=modules&action=modedit&mod=rss&moduleaction=del&cp={$sess}&id={$channel->id}"></a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
<ul class="messages">
|
||||
<li class="highlight yellow">{#RSS_NO_ITEMS#}</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="tab2" class="tab_content" style="display: none;">
|
||||
<form id="add_rss" method="post" action="index.php?do=modules&action=modedit&mod=rss&moduleaction=add&cp={$sess}" class="mainForm">
|
||||
<div class="rowElem">
|
||||
<label>{#RSS_NAME#}</label>
|
||||
<div class="formRight"><input name="new_rss" type="text" id="new_rss" value="" style="width: 400px" placeholder="{#RSS_NAME#}">
|
||||
<input type="button" class="basicBtn AddRSS" value="{#RSS_BUTTON_ADD#}" />
|
||||
</div>
|
||||
<div class="fix"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fix"></div>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user