1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-05 16:04:24 +03:00

Удаление старых шаблонов плагина page

This commit is contained in:
Mzhelskiy Maxim 2012-04-10 11:08:31 +04:00
parent 4ac0847462
commit a939a22468
48 changed files with 207 additions and 812 deletions

View file

@ -30,12 +30,12 @@ class PluginPage extends Plugin {
), ),
); );
/** /**
* Активация плагина "Статические страницы". * Активация плагина "Статические страницы".
* Создание таблицы в базе данных при ее отсутствии. * Создание таблицы в базе данных при ее отсутствии.
*/ */
public function Activate() { public function Activate() {
if (!$this->isTableExists('prefix_page')) { if (!$this->isTableExists('prefix_page')) {
/** /**
* При активации выполняем SQL дамп * При активации выполняем SQL дамп
@ -44,12 +44,12 @@ class PluginPage extends Plugin {
} }
return true; return true;
} }
/** /**
* Инициализация плагина * Инициализация плагина
*/ */
public function Init() { public function Init() {
} }
} }
?> ?>

View file

@ -32,9 +32,9 @@ class PluginPage_ActionPage extends ActionPlugin {
/********************************************************************************** /**********************************************************************************
************************ РЕАЛИЗАЦИЯ ЭКШЕНА *************************************** ************************ РЕАЛИЗАЦИЯ ЭКШЕНА ***************************************
********************************************************************************** **********************************************************************************
*/ */
/** /**
* Отображение страницы * Отображение страницы
@ -73,11 +73,11 @@ class PluginPage_ActionPage extends ActionPlugin {
if ($oPage->getSeoDescription()) { if ($oPage->getSeoDescription()) {
$this->Viewer_SetHtmlDescription($oPage->getSeoDescription()); $this->Viewer_SetHtmlDescription($oPage->getSeoDescription());
} }
$this->Viewer_Assign('oPage',$oPage); $this->Viewer_Assign('oPage',$oPage);
/** /**
* Устанавливаем шаблон для вывода * Устанавливаем шаблон для вывода
*/ */
$this->SetTemplateAction('page'); $this->SetTemplateAction('page');
} }
@ -90,10 +90,10 @@ class PluginPage_ActionPage extends ActionPlugin {
* Если пользователь не авторизован и не админ, то выкидываем его * Если пользователь не авторизован и не админ, то выкидываем его
*/ */
$this->oUserCurrent=$this->User_GetUserCurrent(); $this->oUserCurrent=$this->User_GetUserCurrent();
if (!$this->oUserCurrent or !$this->oUserCurrent->isAdministrator()) { if (!$this->oUserCurrent or !$this->oUserCurrent->isAdministrator()) {
return $this->EventNotFound(); return $this->EventNotFound();
} }
$this->Viewer_AddHtmlTitle($this->Lang_Get('page_admin')); $this->Viewer_AddHtmlTitle($this->Lang_Get('page_admin'));
/** /**
* Обработка создания новой странички * Обработка создания новой странички
@ -115,11 +115,11 @@ class PluginPage_ActionPage extends ActionPlugin {
$_REQUEST['page_text']=$oPageEdit->getText(); $_REQUEST['page_text']=$oPageEdit->getText();
$_REQUEST['page_seo_keywords']=$oPageEdit->getSeoKeywords(); $_REQUEST['page_seo_keywords']=$oPageEdit->getSeoKeywords();
$_REQUEST['page_seo_description']=$oPageEdit->getSeoDescription(); $_REQUEST['page_seo_description']=$oPageEdit->getSeoDescription();
$_REQUEST['page_active']=$oPageEdit->getActive(); $_REQUEST['page_active']=$oPageEdit->getActive();
$_REQUEST['page_main']=$oPageEdit->getMain(); $_REQUEST['page_main']=$oPageEdit->getMain();
$_REQUEST['page_sort']=$oPageEdit->getSort(); $_REQUEST['page_sort']=$oPageEdit->getSort();
$_REQUEST['page_auto_br']=$oPageEdit->getAutoBr(); $_REQUEST['page_auto_br']=$oPageEdit->getAutoBr();
$_REQUEST['page_id']=$oPageEdit->getId(); $_REQUEST['page_id']=$oPageEdit->getId();
} else { } else {
/** /**
* Если отправили форму с редактированием, то обрабатываем её * Если отправили форму с редактированием, то обрабатываем её
@ -160,7 +160,7 @@ class PluginPage_ActionPage extends ActionPlugin {
$iSortNew=$iSortOld-1; $iSortNew=$iSortOld-1;
} else { } else {
$iSortNew=$iSortOld+1; $iSortNew=$iSortOld+1;
} }
} }
/** /**
* Меняем значения сортировки местами * Меняем значения сортировки местами
@ -194,10 +194,10 @@ class PluginPage_ActionPage extends ActionPlugin {
$this->Message_AddError($this->Lang_Get('system_error')); $this->Message_AddError($this->Lang_Get('system_error'));
return; return;
} }
/** /**
* Обновляем свойства страницы * Обновляем свойства страницы
*/ */
$oPageEdit->setActive(getRequest('page_active') ? 1 : 0); $oPageEdit->setActive(getRequest('page_active') ? 1 : 0);
$oPageEdit->setAutoBr(getRequest('page_auto_br') ? 1 : 0); $oPageEdit->setAutoBr(getRequest('page_auto_br') ? 1 : 0);
$oPageEdit->setMain(getRequest('page_main') ? 1 : 0); $oPageEdit->setMain(getRequest('page_main') ? 1 : 0);
@ -206,10 +206,10 @@ class PluginPage_ActionPage extends ActionPlugin {
$oPageEdit->setUrlFull(getRequest('page_url')); $oPageEdit->setUrlFull(getRequest('page_url'));
$oPageEdit->setPid(null); $oPageEdit->setPid(null);
} else { } else {
$oPageEdit->setPid(getRequest('page_pid')); $oPageEdit->setPid(getRequest('page_pid'));
$oPageParent=$this->PluginPage_Page_GetPageById(getRequest('page_pid')); $oPageParent=$this->PluginPage_Page_GetPageById(getRequest('page_pid'));
$oPageEdit->setUrlFull($oPageParent->getUrlFull().'/'.getRequest('page_url')); $oPageEdit->setUrlFull($oPageParent->getUrlFull().'/'.getRequest('page_url'));
} }
$oPageEdit->setSeoDescription(getRequest('page_seo_description')); $oPageEdit->setSeoDescription(getRequest('page_seo_description'));
$oPageEdit->setSeoKeywords(getRequest('page_seo_keywords')); $oPageEdit->setSeoKeywords(getRequest('page_seo_keywords'));
$oPageEdit->setText(getRequest('page_text')); $oPageEdit->setText(getRequest('page_text'));
@ -251,10 +251,10 @@ class PluginPage_ActionPage extends ActionPlugin {
$oPage->setUrlFull(getRequest('page_url')); $oPage->setUrlFull(getRequest('page_url'));
$oPage->setPid(null); $oPage->setPid(null);
} else { } else {
$oPage->setPid(getRequest('page_pid')); $oPage->setPid(getRequest('page_pid'));
$oPageParent=$this->PluginPage_Page_GetPageById(getRequest('page_pid')); $oPageParent=$this->PluginPage_Page_GetPageById(getRequest('page_pid'));
$oPage->setUrlFull($oPageParent->getUrlFull().'/'.getRequest('page_url')); $oPage->setUrlFull($oPageParent->getUrlFull().'/'.getRequest('page_url'));
} }
$oPage->setSeoDescription(getRequest('page_seo_description')); $oPage->setSeoDescription(getRequest('page_seo_description'));
$oPage->setSeoKeywords(getRequest('page_seo_keywords')); $oPage->setSeoKeywords(getRequest('page_seo_keywords'));
$oPage->setText(getRequest('page_text')); $oPage->setText(getRequest('page_text'));
@ -267,7 +267,7 @@ class PluginPage_ActionPage extends ActionPlugin {
} }
/** /**
* Добавляем страницу * Добавляем страницу
*/ */
if ($this->PluginPage_Page_AddPage($oPage)) { if ($this->PluginPage_Page_AddPage($oPage)) {
$this->Message_AddNotice($this->Lang_Get('page_create_submit_save_ok')); $this->Message_AddNotice($this->Lang_Get('page_create_submit_save_ok'));
$this->SetParam(0,null); $this->SetParam(0,null);
@ -280,9 +280,9 @@ class PluginPage_ActionPage extends ActionPlugin {
* *
* @return unknown * @return unknown
*/ */
protected function CheckPageFields() { protected function CheckPageFields() {
$this->Security_ValidateSendForm(); $this->Security_ValidateSendForm();
$bOk=true; $bOk=true;
/** /**
* Проверяем есть ли заголовок топика * Проверяем есть ли заголовок топика
@ -293,7 +293,7 @@ class PluginPage_ActionPage extends ActionPlugin {
} }
/** /**
* Проверяем есть ли заголовок топика, с заменой всех пробельных символов на "_" * Проверяем есть ли заголовок топика, с заменой всех пробельных символов на "_"
*/ */
$pageUrl=preg_replace("/\s+/",'_',getRequest('page_url',null,'post')); $pageUrl=preg_replace("/\s+/",'_',getRequest('page_url',null,'post'));
$_REQUEST['page_url']=$pageUrl; $_REQUEST['page_url']=$pageUrl;
if (!func_check(getRequest('page_url',null,'post'),'login',1,50)) { if (!func_check(getRequest('page_url',null,'post'),'login',1,50)) {
@ -320,7 +320,7 @@ class PluginPage_ActionPage extends ActionPlugin {
if (getRequest('page_pid')!=0 and !($oPageParent=$this->PluginPage_Page_GetPageById(getRequest('page_pid')))) { if (getRequest('page_pid')!=0 and !($oPageParent=$this->PluginPage_Page_GetPageById(getRequest('page_pid')))) {
$this->Message_AddError($this->Lang_Get('page_create_parent_page_error'),$this->Lang_Get('error')); $this->Message_AddError($this->Lang_Get('page_create_parent_page_error'),$this->Lang_Get('error'));
$bOk=false; $bOk=false;
} }
/** /**
* Проверяем сортировку * Проверяем сортировку
*/ */

View file

@ -26,9 +26,9 @@ class PluginPage_HookPage extends Hook {
public function Menu() { public function Menu() {
$aPages=$this->PluginPage_Page_GetPages(array('pid'=>null,'main'=>1,'active'=>1)); $aPages=$this->PluginPage_Page_GetPages(array('pid'=>null,'main'=>1,'active'=>1));
$this->Viewer_Assign('aPagesMain',$aPages); $this->Viewer_Assign('aPagesMain',$aPages);
return $this->Viewer_Fetch(Plugin::GetTemplatePath(__CLASS__).'main_menu.tpl'); return $this->Viewer_Fetch(Plugin::GetTemplatePath(__CLASS__).'main_menu.tpl');
} }

View file

@ -19,20 +19,20 @@
class PluginPage_HookSitemap extends Hook { class PluginPage_HookSitemap extends Hook {
/** /**
* Цепляем обработчики на хуки * Цепляем обработчики на хуки
* *
* @return void * @return void
*/ */
public function RegisterHook() { public function RegisterHook() {
$this->AddHook('sitemap_index_counters', 'SitemapIndex'); $this->AddHook('sitemap_index_counters', 'SitemapIndex');
} }
/** /**
* Добавляем ссылку на Sitemap страниц в Sitemap Index * Добавляем ссылку на Sitemap страниц в Sitemap Index
* *
* @param array $aCounters * @param array $aCounters
* @return void * @return void
*/ */
public function SitemapIndex($aCounters) { public function SitemapIndex($aCounters) {
$aCounters['pages'] = ceil($this->PluginSitemap_Page_GetActivePagesCount() / Config::Get('plugin.sitemap.objects_per_page')); $aCounters['pages'] = ceil($this->PluginSitemap_Page_GetActivePagesCount() / Config::Get('plugin.sitemap.objects_per_page'));
} }

View file

@ -19,15 +19,15 @@
* Модуль статических страниц * Модуль статических страниц
* *
*/ */
class PluginPage_ModulePage extends Module { class PluginPage_ModulePage extends Module {
protected $oMapper; protected $oMapper;
protected $aRebuildIds=array(); protected $aRebuildIds=array();
/** /**
* Инициализация * Инициализация
* *
*/ */
public function Init() { public function Init() {
$this->oMapper=Engine::GetMapper(__CLASS__); $this->oMapper=Engine::GetMapper(__CLASS__);
} }
/** /**
@ -37,7 +37,7 @@ class PluginPage_ModulePage extends Module {
* @return unknown * @return unknown
*/ */
public function AddPage(PluginPage_ModulePage_EntityPage $oPage) { public function AddPage(PluginPage_ModulePage_EntityPage $oPage) {
if ($sId=$this->oMapper->AddPage($oPage)) { if ($sId=$this->oMapper->AddPage($oPage)) {
$oPage->setId($sId); $oPage->setId($sId);
//чистим зависимые кеши //чистим зависимые кеши
$this->Cache_Clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG,array('page_change',"page_change_{$oPage->getId()}","page_change_urlfull_{$oPage->getUrlFull()}")); $this->Cache_Clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG,array('page_change',"page_change_{$oPage->getId()}","page_change_urlfull_{$oPage->getUrlFull()}"));
@ -58,14 +58,14 @@ class PluginPage_ModulePage extends Module {
return true; return true;
} }
return false; return false;
} }
/** /**
* Получает страницу по полному УРЛу * Получает страницу по полному УРЛу
* *
* @param unknown_type $sUrlFull * @param unknown_type $sUrlFull
*/ */
public function GetPageByUrlFull($sUrlFull,$iActive=1) { public function GetPageByUrlFull($sUrlFull,$iActive=1) {
if (false === ($data = $this->Cache_Get("page_{$sUrlFull}_{$iActive}"))) { if (false === ($data = $this->Cache_Get("page_{$sUrlFull}_{$iActive}"))) {
$data = $this->oMapper->GetPageByUrlFull($sUrlFull,$iActive); $data = $this->oMapper->GetPageByUrlFull($sUrlFull,$iActive);
if ($data) { if ($data) {
$this->Cache_Set($data, "page_{$sUrlFull}_{$iActive}", array("page_change_{$data->getId()}"), 60*60*24*5); $this->Cache_Set($data, "page_{$sUrlFull}_{$iActive}", array("page_change_{$data->getId()}"), 60*60*24*5);
@ -73,7 +73,7 @@ class PluginPage_ModulePage extends Module {
$this->Cache_Set($data, "page_{$sUrlFull}_{$iActive}", array("page_change_urlfull_{$sUrlFull}"), 60*60*24*5); $this->Cache_Set($data, "page_{$sUrlFull}_{$iActive}", array("page_change_urlfull_{$sUrlFull}"), 60*60*24*5);
} }
} }
return $data; return $data;
} }
/** /**
* Получает страницу по её айдишнику * Получает страницу по её айдишнику
@ -91,7 +91,7 @@ class PluginPage_ModulePage extends Module {
*/ */
public function GetPages($aFilter=array()) { public function GetPages($aFilter=array()) {
$aPages=array(); $aPages=array();
$aPagesRow=$this->oMapper->GetPages($aFilter); $aPagesRow=$this->oMapper->GetPages($aFilter);
if (count($aPagesRow)) { if (count($aPagesRow)) {
$aPages=$this->BuildPagesRecursive($aPagesRow); $aPages=$this->BuildPagesRecursive($aPagesRow);
} }
@ -115,14 +115,14 @@ class PluginPage_ModulePage extends Module {
$aTemp=$aPage; $aTemp=$aPage;
$aTemp['level']=$iLevel; $aTemp['level']=$iLevel;
unset($aTemp['childNodes']); unset($aTemp['childNodes']);
$aResultPages[]=Engine::GetEntity('PluginPage_Page',$aTemp); $aResultPages[]=Engine::GetEntity('PluginPage_Page',$aTemp);
if (isset($aPage['childNodes']) and count($aPage['childNodes'])>0) { if (isset($aPage['childNodes']) and count($aPage['childNodes'])>0) {
$iLevel++; $iLevel++;
$this->BuildPagesRecursive($aPage['childNodes'],false); $this->BuildPagesRecursive($aPage['childNodes'],false);
} }
} }
$iLevel--; $iLevel--;
return $aResultPages; return $aResultPages;
} }
/** /**
@ -130,7 +130,7 @@ class PluginPage_ModulePage extends Module {
* *
* @param unknown_type $oPageStart * @param unknown_type $oPageStart
*/ */
public function RebuildUrlFull($oPageStart) { public function RebuildUrlFull($oPageStart) {
$aPages=$this->GetPagesByPid($oPageStart->getId()); $aPages=$this->GetPagesByPid($oPageStart->getId());
foreach ($aPages as $oPage) { foreach ($aPages as $oPage) {
if ($oPage->getId()==$oPageStart->getId()) { if ($oPage->getId()==$oPageStart->getId()) {
@ -143,7 +143,7 @@ class PluginPage_ModulePage extends Module {
$oPage->setUrlFull($oPageStart->getUrlFull().'/'.$oPage->getUrl()); $oPage->setUrlFull($oPageStart->getUrlFull().'/'.$oPage->getUrl());
$this->UpdatePage($oPage); $this->UpdatePage($oPage);
$this->RebuildUrlFull($oPage); $this->RebuildUrlFull($oPage);
} }
} }
/** /**
* Получает список дочерних страниц первого уровня * Получает список дочерних страниц первого уровня
@ -167,7 +167,7 @@ class PluginPage_ModulePage extends Module {
$this->Cache_Clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG,array('page_change',"page_change_{$sId}")); $this->Cache_Clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG,array('page_change',"page_change_{$sId}"));
return true; return true;
} }
return false; return false;
} }
/** /**
* Получает число статических страниц * Получает число статических страниц
@ -204,24 +204,24 @@ class PluginPage_ModulePage extends Module {
public function GetMaxSortByPid($sPid) { public function GetMaxSortByPid($sPid) {
return $this->oMapper->GetMaxSortByPid($sPid); return $this->oMapper->GetMaxSortByPid($sPid);
} }
/** /**
* Get count of pages * Get count of pages
* *
* @return integer * @return integer
*/ */
public function getCountOfActivePages() { public function getCountOfActivePages() {
return (int)$this->oMapper->getCountOfActivePages(); return (int)$this->oMapper->getCountOfActivePages();
} }
/** /**
* Get list of active pages * Get list of active pages
* *
* @param integer $iCount * @param integer $iCount
* @param integer $iCurrPage * @param integer $iCurrPage
* @param integer $iPerPage * @param integer $iPerPage
* @return array * @return array
*/ */
public function getListOfActivePages(&$iCount, $iCurrPage, $iPerPage) { public function getListOfActivePages(&$iCount, $iCurrPage, $iPerPage) {
return $this->oMapper->getListOfActivePages($iCount, $iCurrPage, Config::Get('plugin.sitemap.objects_per_page')); return $this->oMapper->getListOfActivePages($iCount, $iCurrPage, Config::Get('plugin.sitemap.objects_per_page'));
} }

View file

@ -15,99 +15,99 @@
--------------------------------------------------------- ---------------------------------------------------------
*/ */
class PluginPage_ModulePage_EntityPage extends Entity class PluginPage_ModulePage_EntityPage extends Entity
{ {
public function getId() { public function getId() {
return $this->_aData['page_id']; return $this->_aData['page_id'];
} }
public function getPid() { public function getPid() {
return $this->_aData['page_pid']; return $this->_aData['page_pid'];
} }
public function getUrl() { public function getUrl() {
return $this->_aData['page_url']; return $this->_aData['page_url'];
} }
public function getUrlFull() { public function getUrlFull() {
return $this->_aData['page_url_full']; return $this->_aData['page_url_full'];
} }
public function getTitle() { public function getTitle() {
return $this->_aData['page_title']; return $this->_aData['page_title'];
} }
public function getText() { public function getText() {
return $this->_aData['page_text']; return $this->_aData['page_text'];
} }
public function getDateAdd() { public function getDateAdd() {
return $this->_aData['page_date_add']; return $this->_aData['page_date_add'];
} }
public function getDateEdit() { public function getDateEdit() {
return $this->_aData['page_date_edit']; return $this->_aData['page_date_edit'];
} }
public function getSeoKeywords() { public function getSeoKeywords() {
return $this->_aData['page_seo_keywords']; return $this->_aData['page_seo_keywords'];
} }
public function getSeoDescription() { public function getSeoDescription() {
return $this->_aData['page_seo_description']; return $this->_aData['page_seo_description'];
} }
public function getActive() { public function getActive() {
return $this->_aData['page_active']; return $this->_aData['page_active'];
} }
public function getMain() { public function getMain() {
return $this->_aData['page_main']; return $this->_aData['page_main'];
} }
public function getSort() { public function getSort() {
return $this->_aData['page_sort']; return $this->_aData['page_sort'];
} }
public function getAutoBr() { public function getAutoBr() {
return $this->_aData['page_auto_br']; return $this->_aData['page_auto_br'];
} }
public function getLevel() { public function getLevel() {
return $this->_aData['level']; return $this->_aData['level'];
} }
public function setId($data) { public function setId($data) {
$this->_aData['page_id']=$data; $this->_aData['page_id']=$data;
} }
public function setPid($data) { public function setPid($data) {
$this->_aData['page_pid']=$data; $this->_aData['page_pid']=$data;
} }
public function setUrl($data) { public function setUrl($data) {
$this->_aData['page_url']=$data; $this->_aData['page_url']=$data;
} }
public function setUrlFull($data) { public function setUrlFull($data) {
$this->_aData['page_url_full']=$data; $this->_aData['page_url_full']=$data;
} }
public function setTitle($data) { public function setTitle($data) {
$this->_aData['page_title']=$data; $this->_aData['page_title']=$data;
} }
public function setText($data) { public function setText($data) {
$this->_aData['page_text']=$data; $this->_aData['page_text']=$data;
} }
public function setDateAdd($data) { public function setDateAdd($data) {
$this->_aData['page_date_add']=$data; $this->_aData['page_date_add']=$data;
} }
public function setDateEdit($data) { public function setDateEdit($data) {
$this->_aData['page_date_edit']=$data; $this->_aData['page_date_edit']=$data;
} }
public function setSeoKeywords($data) { public function setSeoKeywords($data) {
$this->_aData['page_seo_keywords']=$data; $this->_aData['page_seo_keywords']=$data;
} }
public function setSeoDescription($data) { public function setSeoDescription($data) {
$this->_aData['page_seo_description']=$data; $this->_aData['page_seo_description']=$data;
} }
public function setActive($data) { public function setActive($data) {
$this->_aData['page_active']=$data; $this->_aData['page_active']=$data;
} }
public function setMain($data) { public function setMain($data) {
$this->_aData['page_main']=$data; $this->_aData['page_main']=$data;
} }
public function setSort($data) { public function setSort($data) {
$this->_aData['page_sort']=$data; $this->_aData['page_sort']=$data;
} }
public function setAutoBr($data) { public function setAutoBr($data) {
$this->_aData['page_auto_br']=$data; $this->_aData['page_auto_br']=$data;
} }
} }
?> ?>

View file

@ -16,7 +16,7 @@
*/ */
class PluginPage_ModulePage_MapperPage extends Mapper { class PluginPage_ModulePage_MapperPage extends Mapper {
public function AddPage(PluginPage_ModulePage_EntityPage $oPage) { public function AddPage(PluginPage_ModulePage_EntityPage $oPage) {
$sql = "INSERT INTO ".Config::Get('plugin.page.table.page')." $sql = "INSERT INTO ".Config::Get('plugin.page.table.page')."
(page_pid, (page_pid,
@ -33,14 +33,14 @@ class PluginPage_ModulePage_MapperPage extends Mapper {
page_auto_br page_auto_br
) )
VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?d, ?d, ?d, ?d) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?d, ?d, ?d, ?d)
"; ";
if ($iId=$this->oDb->query($sql,$oPage->getPid(),$oPage->getUrl(),$oPage->getUrlFull(),$oPage->getTitle(),$oPage->getText(),$oPage->getDateAdd(),$oPage->getSeoKeywords(),$oPage->getSeoDescription(),$oPage->getActive(),$oPage->getMain(),$oPage->getSort(),$oPage->getAutoBr())) if ($iId=$this->oDb->query($sql,$oPage->getPid(),$oPage->getUrl(),$oPage->getUrlFull(),$oPage->getTitle(),$oPage->getText(),$oPage->getDateAdd(),$oPage->getSeoKeywords(),$oPage->getSeoDescription(),$oPage->getActive(),$oPage->getMain(),$oPage->getSort(),$oPage->getAutoBr()))
{ {
return $iId; return $iId;
} }
return false; return false;
} }
public function UpdatePage(PluginPage_ModulePage_EntityPage $oPage) { public function UpdatePage(PluginPage_ModulePage_EntityPage $oPage) {
$sql = "UPDATE ".Config::Get('plugin.page.table.page')." $sql = "UPDATE ".Config::Get('plugin.page.table.page')."
SET page_pid = ? , SET page_pid = ? ,
@ -56,27 +56,27 @@ class PluginPage_ModulePage_MapperPage extends Mapper {
page_sort = ?, page_sort = ?,
page_auto_br = ? page_auto_br = ?
WHERE page_id = ?d WHERE page_id = ?d
"; ";
if ($this->oDb->query($sql,$oPage->getPid(),$oPage->getUrl(),$oPage->getUrlFull(),$oPage->getTitle(),$oPage->getText(),$oPage->getDateEdit(),$oPage->getSeoKeywords(),$oPage->getSeoDescription(),$oPage->getActive(),$oPage->getMain(),$oPage->getSort(),$oPage->getAutoBr(),$oPage->getId())) if ($this->oDb->query($sql,$oPage->getPid(),$oPage->getUrl(),$oPage->getUrlFull(),$oPage->getTitle(),$oPage->getText(),$oPage->getDateEdit(),$oPage->getSeoKeywords(),$oPage->getSeoDescription(),$oPage->getActive(),$oPage->getMain(),$oPage->getSort(),$oPage->getAutoBr(),$oPage->getId()))
{ {
return true; return true;
} }
return false; return false;
} }
public function SetPagesPidToNull() { public function SetPagesPidToNull() {
$sql = "UPDATE ".Config::Get('plugin.page.table.page')." $sql = "UPDATE ".Config::Get('plugin.page.table.page')."
SET SET
page_pid = null, page_pid = null,
page_url_full = page_url page_url_full = page_url
"; ";
if ($this->oDb->query($sql)) if ($this->oDb->query($sql))
{ {
return true; return true;
} }
return false; return false;
} }
public function GetPageByUrlFull($sUrlFull,$iActive) { public function GetPageByUrlFull($sUrlFull,$iActive) {
$sql = "SELECT * FROM ".Config::Get('plugin.page.table.page')." WHERE page_url_full = ? and page_active = ?d "; $sql = "SELECT * FROM ".Config::Get('plugin.page.table.page')." WHERE page_url_full = ? and page_active = ?d ";
if ($aRow=$this->oDb->selectRow($sql,$sUrlFull,$iActive)) { if ($aRow=$this->oDb->selectRow($sql,$sUrlFull,$iActive)) {
@ -84,7 +84,7 @@ class PluginPage_ModulePage_MapperPage extends Mapper {
} }
return null; return null;
} }
public function GetPageById($sId) { public function GetPageById($sId) {
$sql = "SELECT * FROM ".Config::Get('plugin.page.table.page')." WHERE page_id = ? "; $sql = "SELECT * FROM ".Config::Get('plugin.page.table.page')." WHERE page_id = ? ";
if ($aRow=$this->oDb->selectRow($sql,$sId)) { if ($aRow=$this->oDb->selectRow($sql,$sId)) {
@ -92,7 +92,7 @@ class PluginPage_ModulePage_MapperPage extends Mapper {
} }
return null; return null;
} }
public function deletePageById($sId) { public function deletePageById($sId) {
$sql = "DELETE FROM ".Config::Get('plugin.page.table.page')." WHERE page_id = ? "; $sql = "DELETE FROM ".Config::Get('plugin.page.table.page')." WHERE page_id = ? ";
if ($aRow=$this->oDb->selectRow($sql,$sId)) { if ($aRow=$this->oDb->selectRow($sql,$sId)) {
@ -100,7 +100,7 @@ class PluginPage_ModulePage_MapperPage extends Mapper {
} }
return false; return false;
} }
public function GetPages($aFilter) { public function GetPages($aFilter) {
$sPidNULL=''; $sPidNULL='';
if (array_key_exists('pid',$aFilter) and is_null($aFilter['pid'])) { if (array_key_exists('pid',$aFilter) and is_null($aFilter['pid'])) {
@ -120,15 +120,15 @@ class PluginPage_ModulePage_MapperPage extends Mapper {
ORDER by page_sort desc; ORDER by page_sort desc;
"; ";
if ($aRows=$this->oDb->select($sql, if ($aRows=$this->oDb->select($sql,
isset($aFilter['active']) ? $aFilter['active']:DBSIMPLE_SKIP, isset($aFilter['active']) ? $aFilter['active']:DBSIMPLE_SKIP,
isset($aFilter['main']) ? $aFilter['main']:DBSIMPLE_SKIP, isset($aFilter['main']) ? $aFilter['main']:DBSIMPLE_SKIP,
(array_key_exists('pid',$aFilter) and !is_null($aFilter['pid'])) ? $aFilter['pid'] : DBSIMPLE_SKIP (array_key_exists('pid',$aFilter) and !is_null($aFilter['pid'])) ? $aFilter['pid'] : DBSIMPLE_SKIP
)) { )) {
return $aRows; return $aRows;
} }
return null; return null;
} }
public function GetCountPage() { public function GetCountPage() {
$sql = "SELECT count(*) as count FROM ".Config::Get('plugin.page.table.page')." "; $sql = "SELECT count(*) as count FROM ".Config::Get('plugin.page.table.page')." ";
if ($aRow=$this->oDb->selectRow($sql)) { if ($aRow=$this->oDb->selectRow($sql)) {
@ -136,7 +136,7 @@ class PluginPage_ModulePage_MapperPage extends Mapper {
} }
return null; return null;
} }
public function GetPagesByPid($sPid) { public function GetPagesByPid($sPid) {
$sql = "SELECT $sql = "SELECT
* *
@ -152,7 +152,7 @@ class PluginPage_ModulePage_MapperPage extends Mapper {
} }
return $aResult; return $aResult;
} }
public function GetNextPageBySort($iSort,$sPid,$sWay) { public function GetNextPageBySort($iSort,$sPid,$sWay) {
if ($sWay=='up') { if ($sWay=='up') {
$sWay='>'; $sWay='>';
@ -171,7 +171,7 @@ class PluginPage_ModulePage_MapperPage extends Mapper {
} }
return null; return null;
} }
public function GetMaxSortByPid($sPid) { public function GetMaxSortByPid($sPid) {
$sPidNULL=''; $sPidNULL='';
if (is_null($sPid)) { if (is_null($sPid)) {
@ -183,16 +183,16 @@ class PluginPage_ModulePage_MapperPage extends Mapper {
} }
return 0; return 0;
} }
/** /**
* List of active pages * List of active pages
* *
* @param integer $iCount * @param integer $iCount
* @param integer $iCurrPage * @param integer $iCurrPage
* @param integer $iPerPage * @param integer $iPerPage
* @return array * @return array
*/ */
public function getListOfActivePages(&$iCount, $iCurrPage, $iPerPage) { public function getListOfActivePages(&$iCount, $iCurrPage, $iPerPage) {
$sql = 'SELECT $sql = 'SELECT
`page`.* `page`.*
@ -215,10 +215,10 @@ class PluginPage_ModulePage_MapperPage extends Mapper {
} }
/** /**
* Count of active pages * Count of active pages
* *
* @return integer * @return integer
*/ */
public function getCountOfActivePages() { public function getCountOfActivePages() {
$sql = 'SELECT $sql = 'SELECT
COUNT(`page`.`page_id`) COUNT(`page`.`page_id`)

View file

@ -21,10 +21,10 @@
class PluginPage_ModuleSitemap extends PluginPage_Inherit_PluginSitemap_ModuleSitemap { class PluginPage_ModuleSitemap extends PluginPage_Inherit_PluginSitemap_ModuleSitemap {
/** /**
* Change data for Sitemap Index * Change data for Sitemap Index
* *
* @return array * @return array
*/ */
public function getExternalCounters() { public function getExternalCounters() {
$aCounters = parent::getExternalCounters(); $aCounters = parent::getExternalCounters();
$aCounters['pages'] = ceil($this->PluginPage_Page_GetCountOfActivePages() / Config::Get('plugin.sitemap.objects_per_page')); $aCounters['pages'] = ceil($this->PluginPage_Page_GetCountOfActivePages() / Config::Get('plugin.sitemap.objects_per_page'));
@ -34,10 +34,10 @@ class PluginPage_ModuleSitemap extends PluginPage_Inherit_PluginSitemap_ModuleSi
/** /**
* Get data for static pages Sitemap * Get data for static pages Sitemap
* *
* @param integer $iCurrPage * @param integer $iCurrPage
* @return array * @return array
*/ */
public function getDataForPages($iCurrPage) { public function getDataForPages($iCurrPage) {
$iPerPage = Config::Get('plugin.sitemap.objects_per_page'); $iPerPage = Config::Get('plugin.sitemap.objects_per_page');
$sCacheKey = "sitemap_pages_{$iCurrPage}_" . $iPerPage; $sCacheKey = "sitemap_pages_{$iCurrPage}_" . $iPerPage;
@ -49,10 +49,10 @@ class PluginPage_ModuleSitemap extends PluginPage_Inherit_PluginSitemap_ModuleSi
$aData = array(); $aData = array();
foreach ($aPages as $oPage) { foreach ($aPages as $oPage) {
$aData[] = $this->PluginSitemap_Sitemap_GetDataForSitemapRow( $aData[] = $this->PluginSitemap_Sitemap_GetDataForSitemapRow(
Router::GetPath('page') . $oPage->getUrlFull(), Router::GetPath('page') . $oPage->getUrlFull(),
$oPage->getDateLastMod(), $oPage->getDateLastMod(),
Config::Get('plugin.page.sitemap.sitemap_priority'), Config::Get('plugin.page.sitemap.sitemap_priority'),
Config::Get('plugin.page.sitemap.sitemap_changefreq') Config::Get('plugin.page.sitemap.sitemap_changefreq')
); );
} }

View file

@ -1,99 +0,0 @@
{include file='window_load_img.tpl' sToLoad='page_text'}
<link rel="stylesheet" type="text/css" href="{$sTemplateWebPathPlugin}css/style.css" media="all" />
{if $oConfig->GetValue('view.tinymce')}
<script type="text/javascript" src="{cfg name='path.root.engine_lib'}/external/tinymce/tiny_mce.js"></script>
{literal}
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_buttons1 : "lshselect,bold,italic,underline,strikethrough,|,bullist,numlist,|,undo,redo,|,lslink,unlink,lsvideo,lsimage,code",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : 0,
theme_advanced_resizing_use_cookie : 0,
theme_advanced_path : false,
object_resizing : true,
force_br_newlines : true,
forced_root_block : '', // Needed for 3.x
force_p_newlines : false,
plugins : "lseditor,safari,inlinepopups,media",
convert_urls : false,
extended_valid_elements : "embed[src|type|allowscriptaccess|allowfullscreen|width|height]",
language : TINYMCE_LANG
});
</script>
{/literal}
{/if}
<form action="" method="POST">
{hook run='plugin_page_form_add_begin'}
<input type="hidden" name="security_ls_key" value="{$LIVESTREET_SECURITY_KEY}" />
<p><label for="page_pid">{$aLang.page_create_parent_page}</label><br />
<select name="page_pid" id="page_pid" class="input-300">
<option value="0"></option>
{foreach from=$aPages item=oPage}
<option style="margin-left: {$oPage->getLevel()*20}px;" value="{$oPage->getId()}" {if $_aRequest.page_pid==$oPage->getId()}selected{/if}>{$oPage->getTitle()}(/{$oPage->getUrlFull()}/)</option>
{/foreach}
</select></p>
<p><label for="page_title">{$aLang.page_create_title}:</label><br />
<input type="text" id="page_title" name="page_title" value="{$_aRequest.page_title}" class="input-wide" /> </p>
<p><label for="page_url">{$aLang.page_create_url}:</label><br />
<input type="text" id="page_url" name="page_url" value="{$_aRequest.page_url}" class="input-wide" /> </p>
<label for="topic_text">{$aLang.page_create_text}:</label>
{if !$oConfig->GetValue('view.tinymce')}
<div class="panel-form" style="background: #eaecea; ">
<a href="#" onclick="lsPanel.putTagAround('page_text','b'); return false;"><img src="{$sTemplateWebPathPlugin}images/panel/bold_ru.gif" width="20" height="20" title="{$aLang.panel_b}"></a>
<a href="#" onclick="lsPanel.putTagAround('page_text','i'); return false;"><img src="{$sTemplateWebPathPlugin}images/panel/italic_ru.gif" width="20" height="20" title="{$aLang.panel_i}"></a>
<a href="#" onclick="lsPanel.putTagAround('page_text','u'); return false;"><img src="{$sTemplateWebPathPlugin}images/panel/underline_ru.gif" width="20" height="20" title="{$aLang.panel_u}"></a>
<a href="#" onclick="lsPanel.putTagAround('page_text','s'); return false;"><img src="{$sTemplateWebPathPlugin}images/panel/strikethrough.gif" width="20" height="20" title="{$aLang.panel_s}"></a>
&nbsp;
<a href="#" onclick="lsPanel.putTagUrl('page_text','URL:'); return false;"><img src="{$sTemplateWebPathPlugin}images/panel/link.gif" width="20" height="20" title="{$aLang.panel_url}"></a>
<a href="#" onclick="lsPanel.putTagAround('page_text','code'); return false;"><img src="{$sTemplateWebPathPlugin}images/panel/code.gif" width="30" height="20" title="{$aLang.panel_code}"></a>
<a href="#" onclick="showImgUploadForm(); return false;"><img src="{$sTemplateWebPathPlugin}images/panel/img.gif" width="20" height="20" title="{$aLang.panel_image}"></a>
</div>
{/if}
<textarea name="page_text" id="page_text" rows="20" class="input-wide">{$_aRequest.page_text}</textarea><br /><br />
<p><label for="page_seo_keywords">{$aLang.page_create_seo_keywords}:</label><br />
<input type="text" id="page_seo_keywords" name="page_seo_keywords" value="{$_aRequest.page_seo_keywords}" class="input-wide" />
<span class="note">{$aLang.page_create_seo_keywords_notice}</span></p>
<p><label for="page_seo_description">{$aLang.page_create_seo_description}:</label><br />
<input type="text" id="page_seo_description" name="page_seo_description" value="{$_aRequest.page_seo_description}" class="input-wide" />
<span class="note">{$aLang.page_create_seo_description_notice}</span></p>
<p><label for="page_sort">{$aLang.page_create_sort}:</label><br />
<input type="text" id="page_sort" name="page_sort" value="{$_aRequest.page_sort}" class="input-wide" />
<span class="note">{$aLang.page_create_sort_notice}</span></p>
<p><label><input type="checkbox" id="page_auto_br" name="page_auto_br" value="1" class="checkbox" {if $_aRequest.page_auto_br==1}checked{/if}/>{$aLang.page_create_auto_br}</label></p>
<p><label><input type="checkbox" id="page_active" name="page_active" value="1" class="checkbox" {if $_aRequest.page_active==1}checked{/if} />{$aLang.page_create_active}</label></p>
<p><label><input type="checkbox" id="page_main" name="page_main" value="1" class="checkbox" {if $_aRequest.page_main==1}checked{/if} />{$aLang.page_create_main}</label></p>
{hook run='plugin_page_form_add_end'}
<p>
<input type="submit" name="submit_page_save" value="{$aLang.page_create_submit_save}" />
<input type="submit" name="submit_page_cancel" value="{$aLang.page_create_submit_cancel}" onclick="window.location='{router page='page'}admin/'; return false;" />
</p>
<input type="hidden" name="page_id" value="{$_aRequest.page_id}">
</form>

View file

@ -1,69 +0,0 @@
{include file='header.tpl'}
<link rel="stylesheet" type="text/css" href="{$sTemplateWebPathPlugin}css/style.css" media="all" />
<div>
<h2>{$aLang.page_admin}</h2>
{if $aParams.0=='new'}
<h3>{$aLang.page_create}</h3>
{include file="$sTemplatePathPlugin/actions/ActionPage/add.tpl"}
{elseif $aParams.0=='edit'}
<h3>{$aLang.page_edit} «{$oPageEdit->getTitle()}»</h3>
{include file="$sTemplatePathPlugin/actions/ActionPage/add.tpl"}
{else}
<a href="{router page='page'}admin/new/" class="page-new">{$aLang.page_new}</a><br /><br />
{/if}
<table cellspacing="0" class="table">
<thead>
<tr>
<td width="180px">{$aLang.page_admin_title}</td>
<td align="center" >{$aLang.page_admin_url}</td>
<td align="center" width="50px">{$aLang.page_admin_active}</td>
<td align="center" width="70px">{$aLang.page_admin_main}</td>
<td align="center" width="80px">{$aLang.page_admin_action}</td>
</tr>
</thead>
<tbody>
{foreach from=$aPages item=oPage name=el2}
<tr>
<td>
<img src="{$sTemplateWebPathPlugin}images/{if $oPage->getLevel()==0}folder{else}document{/if}.gif" alt="" title="" border="0" style="margin-left: {$oPage->getLevel()*20}px;"/>
<a href="{router page='page'}{$oPage->getUrlFull()}/">{$oPage->getTitle()}</a>
</td>
<td>
/{$oPage->getUrlFull()}/
</td>
<td align="center">
{if $oPage->getActive()}
{$aLang.page_admin_active_yes}
{else}
{$aLang.page_admin_active_no}
{/if}
</td>
<td align="center">
{if $oPage->getMain()}
{$aLang.page_admin_active_yes}
{else}
{$aLang.page_admin_active_no}
{/if}
</td>
<td align="center">
<a href="{router page='page'}admin/edit/{$oPage->getId()}/"><img src="{$sTemplateWebPathPlugin}images/edit.png" alt="{$aLang.page_admin_action_edit}" title="{$aLang.page_admin_action_edit}" /></a>
<a href="{router page='page'}admin/delete/{$oPage->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}" onclick="return confirm('«{$oPage->getTitle()}»: {$aLang.page_admin_action_delete_confirm}');"><img src="{$sTemplateWebPathPlugin}images/delete.png" alt="{$aLang.page_admin_action_delete}" title="{$aLang.page_admin_action_delete}" /></a>
<a href="{router page='page'}admin/sort/{$oPage->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}"><img src="{$sTemplateWebPathPlugin}images/up.png" alt="{$aLang.page_admin_sort_up}" title="{$aLang.page_admin_sort_up} ({$oPage->getSort()})" /></a>
<a href="{router page='page'}admin/sort/{$oPage->getId()}/down/?security_ls_key={$LIVESTREET_SECURITY_KEY}"><img src="{$sTemplateWebPathPlugin}images/down.png" alt="{$aLang.page_admin_sort_down}" title="{$aLang.page_admin_sort_down} ({$oPage->getSort()})" /></a>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{include file='footer.tpl'}

View file

@ -1,18 +0,0 @@
{assign var="noSidebar" value=true}
{include file='header.tpl'}
<div class="topic">
<div class="content">
{if $oConfig->GetValue('view.tinymce')}
{$oPage->getText()}
{else}
{if $oPage->getAutoBr()}
{$oPage->getText()|nl2br}
{else}
{$oPage->getText()}
{/if}
{/if}
</div>
</div>
{include file='footer.tpl'}

View file

@ -1,14 +0,0 @@
.table a { color: #333; }
.table a:hover { color: #666; }
.table { width: 100%; margin-bottom: 10px; }
.table thead td { background: #fafafa; }
.table td { border: 1px solid #ddd; padding: 5px; }
.page-new { padding-left: 13px; background: url(../images/document.gif) no-repeat 0 3px; color: #555; }
.input-wide { width: 98%; _width: 97%; padding: 2px; }
.input-100 { width: 100px; padding: 2px; }
.input-200 { width: 200px; padding: 2px; }
.input-300 { width: 300px; padding: 2px; }
.checkbox { position: relative; top: 2px; margin: 0 4px 0 1px; }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 937 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 B

View file

@ -1,3 +0,0 @@
{foreach from=$aPagesMain item=oPage}
<li {if $sAction=='page' and $sEvent==$oPage->getUrl()}class="active"{/if}><a href="{router page='page'}{$oPage->getUrlFull()}/" >{$oPage->getTitle()}</a></li>
{/foreach}

View file

@ -1,98 +0,0 @@
{include file='window_load_img.tpl' sToLoad='page_text'}
<link rel="stylesheet" type="text/css" href="{$sTemplateWebPathPlugin}css/style.css" media="all" />
{if $oConfig->GetValue('view.tinymce')}
<script type="text/javascript" src="{cfg name='path.root.engine_lib'}/external/tinymce-jq/tiny_mce.js"></script>
{literal}
<script type="text/javascript">
jQuery(function($){
tinyMCE.init({
mode : "textareas",
theme : "advanced",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_buttons1 : "lshselect,bold,italic,underline,strikethrough,|,bullist,numlist,|,undo,redo,|,lslink,unlink,lsvideo,lsimage,code",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : 0,
theme_advanced_resizing_use_cookie : 0,
theme_advanced_path : false,
object_resizing : true,
force_br_newlines : true,
forced_root_block : '', // Needed for 3.x
force_p_newlines : false,
plugins : "lseditor,safari,inlinepopups,media",
convert_urls : false,
extended_valid_elements : "embed[src|type|allowscriptaccess|allowfullscreen|width|height]",
language : TINYMCE_LANG
});
});
</script>
{/literal}
{else}
{include file='window_load_img.tpl' sToLoad='page_text'}
<script type="text/javascript">
jQuery(document).ready(function($){
ls.lang.load({lang_load name="panel_b,panel_i,panel_u,panel_s,panel_url,panel_url_promt,panel_code,panel_video,panel_image,panel_cut,panel_quote,panel_list,panel_list_ul,panel_list_ol,panel_title,panel_clear_tags,panel_video_promt,panel_list_li"});
// Подключаем редактор
$('#page_text').markItUp(getMarkitupSettings());
});
</script>
{/if}
<form action="" method="POST">
{hook run='plugin_page_form_add_begin'}
<input type="hidden" name="security_ls_key" value="{$LIVESTREET_SECURITY_KEY}" />
<p><label for="page_pid">{$aLang.page_create_parent_page}</label><br />
<select name="page_pid" id="page_pid" class="input-300">
<option value="0"></option>
{foreach from=$aPages item=oPage}
<option style="margin-left: {$oPage->getLevel()*20}px;" value="{$oPage->getId()}" {if $_aRequest.page_pid==$oPage->getId()}selected{/if}>{$oPage->getTitle()}(/{$oPage->getUrlFull()}/)</option>
{/foreach}
</select></p>
<p><label for="page_title">{$aLang.page_create_title}:</label><br />
<input type="text" id="page_title" name="page_title" value="{$_aRequest.page_title}" class="input-wide" /> </p>
<p><label for="page_url">{$aLang.page_create_url}:</label><br />
<input type="text" id="page_url" name="page_url" value="{$_aRequest.page_url}" class="input-wide" /> </p>
<label for="topic_text">{$aLang.page_create_text}:</label>
<textarea name="page_text" id="page_text" rows="20" class="input-wide">{$_aRequest.page_text}</textarea><br /><br />
<p><label for="page_seo_keywords">{$aLang.page_create_seo_keywords}:</label><br />
<input type="text" id="page_seo_keywords" name="page_seo_keywords" value="{$_aRequest.page_seo_keywords}" class="input-wide" />
<span class="note">{$aLang.page_create_seo_keywords_notice}</span></p>
<p><label for="page_seo_description">{$aLang.page_create_seo_description}:</label><br />
<input type="text" id="page_seo_description" name="page_seo_description" value="{$_aRequest.page_seo_description}" class="input-wide" />
<span class="note">{$aLang.page_create_seo_description_notice}</span></p>
<p><label for="page_sort">{$aLang.page_create_sort}:</label><br />
<input type="text" id="page_sort" name="page_sort" value="{$_aRequest.page_sort}" class="input-wide" />
<span class="note">{$aLang.page_create_sort_notice}</span></p>
<p><label><input type="checkbox" id="page_auto_br" name="page_auto_br" value="1" class="checkbox" {if $_aRequest.page_auto_br==1}checked{/if}/>{$aLang.page_create_auto_br}</label></p>
<p><label><input type="checkbox" id="page_active" name="page_active" value="1" class="checkbox" {if $_aRequest.page_active==1}checked{/if} />{$aLang.page_create_active}</label></p>
<p><label><input type="checkbox" id="page_main" name="page_main" value="1" class="checkbox" {if $_aRequest.page_main==1}checked{/if} />{$aLang.page_create_main}</label></p>
{hook run='plugin_page_form_add_end'}
<p>
<input type="submit" name="submit_page_save" value="{$aLang.page_create_submit_save}" />
<input type="submit" name="submit_page_cancel" value="{$aLang.page_create_submit_cancel}" onclick="window.location='{router page='page'}admin/'; return false;" />
</p>
<input type="hidden" name="page_id" value="{$_aRequest.page_id}">
</form>

View file

@ -1,69 +0,0 @@
{include file='header.tpl'}
<link rel="stylesheet" type="text/css" href="{$sTemplateWebPathPlugin}css/style.css" media="all" />
<div>
<h2>{$aLang.page_admin}</h2>
{if $aParams.0=='new'}
<h3>{$aLang.page_create}</h3>
{include file="$sTemplatePathPlugin/actions/ActionPage/add.tpl"}
{elseif $aParams.0=='edit'}
<h3>{$aLang.page_edit} «{$oPageEdit->getTitle()}»</h3>
{include file="$sTemplatePathPlugin/actions/ActionPage/add.tpl"}
{else}
<a href="{router page='page'}admin/new/" class="page-new">{$aLang.page_new}</a><br /><br />
{/if}
<table cellspacing="0" class="table">
<thead>
<tr>
<td width="180px">{$aLang.page_admin_title}</td>
<td align="center" >{$aLang.page_admin_url}</td>
<td align="center" width="50px">{$aLang.page_admin_active}</td>
<td align="center" width="70px">{$aLang.page_admin_main}</td>
<td align="center" width="80px">{$aLang.page_admin_action}</td>
</tr>
</thead>
<tbody>
{foreach from=$aPages item=oPage name=el2}
<tr>
<td>
<img src="{$sTemplateWebPathPlugin}images/{if $oPage->getLevel()==0}folder{else}document{/if}.gif" alt="" title="" border="0" style="margin-left: {$oPage->getLevel()*20}px;"/>
<a href="{router page='page'}{$oPage->getUrlFull()}/">{$oPage->getTitle()}</a>
</td>
<td>
/{$oPage->getUrlFull()}/
</td>
<td align="center">
{if $oPage->getActive()}
{$aLang.page_admin_active_yes}
{else}
{$aLang.page_admin_active_no}
{/if}
</td>
<td align="center">
{if $oPage->getMain()}
{$aLang.page_admin_active_yes}
{else}
{$aLang.page_admin_active_no}
{/if}
</td>
<td align="center">
<a href="{router page='page'}admin/edit/{$oPage->getId()}/"><img src="{$sTemplateWebPathPlugin}images/edit.png" alt="{$aLang.page_admin_action_edit}" title="{$aLang.page_admin_action_edit}" /></a>
<a href="{router page='page'}admin/delete/{$oPage->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}" onclick="return confirm('«{$oPage->getTitle()}»: {$aLang.page_admin_action_delete_confirm}');"><img src="{$sTemplateWebPathPlugin}images/delete.png" alt="{$aLang.page_admin_action_delete}" title="{$aLang.page_admin_action_delete}" /></a>
<a href="{router page='page'}admin/sort/{$oPage->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}"><img src="{$sTemplateWebPathPlugin}images/up.png" alt="{$aLang.page_admin_sort_up}" title="{$aLang.page_admin_sort_up} ({$oPage->getSort()})" /></a>
<a href="{router page='page'}admin/sort/{$oPage->getId()}/down/?security_ls_key={$LIVESTREET_SECURITY_KEY}"><img src="{$sTemplateWebPathPlugin}images/down.png" alt="{$aLang.page_admin_sort_down}" title="{$aLang.page_admin_sort_down} ({$oPage->getSort()})" /></a>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{include file='footer.tpl'}

View file

@ -1,18 +0,0 @@
{assign var="noSidebar" value=true}
{include file='header.tpl'}
<div class="topic">
<div class="content">
{if $oConfig->GetValue('view.tinymce')}
{$oPage->getText()}
{else}
{if $oPage->getAutoBr()}
{$oPage->getText()|nl2br}
{else}
{$oPage->getText()}
{/if}
{/if}
</div>
</div>
{include file='footer.tpl'}

View file

@ -1,14 +0,0 @@
.table a { color: #333; }
.table a:hover { color: #666; }
.table { width: 100%; margin-bottom: 10px; }
.table thead td { background: #fafafa; }
.table td { border: 1px solid #ddd; padding: 5px; }
.page-new { padding-left: 13px; background: url(../images/document.gif) no-repeat 0 3px; color: #555; }
.input-wide { width: 100%; _width: 99%; padding: 2px; }
.input-100 { width: 100px; padding: 2px; }
.input-200 { width: 200px; padding: 2px; }
.input-300 { width: 300px; padding: 2px; }
.checkbox { position: relative; top: 2px; margin: 0 4px 0 1px; }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 937 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 B

View file

@ -1,3 +0,0 @@
{foreach from=$aPagesMain item=oPage}
<li {if $sAction=='page' and $sEvent==$oPage->getUrl()}class="active"{/if}><a href="{router page='page'}{$oPage->getUrlFull()}/" >{$oPage->getTitle()}</a></li>
{/foreach}

View file

@ -1,106 +0,0 @@
{include file='window_load_img.tpl' sToLoad='page_text'}
{if $oConfig->GetValue('view.tinymce')}
<script type="text/javascript" src="{cfg name='path.root.engine_lib'}/external/tinymce/tiny_mce.js"></script>
{literal}
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_buttons1 : "lshselect,bold,italic,underline,strikethrough,|,bullist,numlist,|,undo,redo,|,lslink,unlink,lsvideo,lsimage,code",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : 0,
theme_advanced_resizing_use_cookie : 0,
theme_advanced_path : false,
object_resizing : true,
force_br_newlines : true,
forced_root_block : '', // Needed for 3.x
force_p_newlines : false,
plugins : "lseditor,safari,inlinepopups,media",
convert_urls : false,
extended_valid_elements : "embed[src|type|allowscriptaccess|allowfullscreen|width|height]",
language : TINYMCE_LANG
});
</script>
{/literal}
{/if}
<form action="" method="POST">
{hook run='plugin_page_form_add_begin'}
<input type="hidden" name="security_ls_key" value="{$LIVESTREET_SECURITY_KEY}" />
<p><label for="page_pid">{$aLang.page_create_parent_page}</label>
<select name="page_pid" id="page_pid" >
<option value="0"></option>
{foreach from=$aPages item=oPage}
<option style="margin-left: {$oPage->getLevel()*20}px;" value="{$oPage->getId()}" {if $_aRequest.page_pid==$oPage->getId()}selected{/if}>{$oPage->getTitle()}(/{$oPage->getUrlFull()}/)</option>
{/foreach}
</select>
</p>
<p><label for="page_title">{$aLang.page_create_title}:</label>
<input type="text" id="page_title" name="page_title" value="{$_aRequest.page_title}" class="w100p" /><br />
</p>
<p><label for="page_url">{$aLang.page_create_url}:</label>
<input type="text" id="page_url" name="page_url" value="{$_aRequest.page_url}" class="w100p" /><br />
</p>
<p><label for="topic_text">{$aLang.page_create_text}:</label>
{if !$oConfig->GetValue('view.tinymce')}
<div class="panel_form">
<a href="#" onclick="lsPanel.putTagAround('page_text','b'); return false;" class="button"><img src="{cfg name='path.static.skin'}/images/panel/bold.png" title="{$aLang.panel_b}"></a>
<a href="#" onclick="lsPanel.putTagAround('page_text','i'); return false;" class="button"><img src="{cfg name='path.static.skin'}/images/panel/italic.png" title="{$aLang.panel_i}"></a>
<a href="#" onclick="lsPanel.putTagAround('page_text','u'); return false;" class="button"><img src="{cfg name='path.static.skin'}/images/panel/underline.png" title="{$aLang.panel_u}"></a>
<a href="#" onclick="lsPanel.putTagAround('page_text','s'); return false;" class="button"><img src="{cfg name='path.static.skin'}/images/panel/strikethrough.png" title="{$aLang.panel_s}"></a>
&nbsp;
<a href="#" onclick="lsPanel.putTagUrl('page_text','{$aLang.panel_url_promt}'); return false;" class="button"><img src="{cfg name='path.static.skin'}/images/panel/link.png" title="{$aLang.panel_url}"></a>
<a href="#" onclick="lsPanel.putQuote('page_text'); return false;" class="button"><img src="{cfg name='path.static.skin'}/images/panel/quote.png" title="{$aLang.panel_quote}"></a>
<a href="#" onclick="lsPanel.putTagAround('page_text','code'); return false;" class="button"><img src="{cfg name='path.static.skin'}/images/panel/code.png" title="{$aLang.panel_code}"></a>
<a href="#" onclick="lsPanel.putTagAround('page_text','video'); return false;" class="button"><img src="{cfg name='path.static.skin'}/images/panel/video.png" title="{$aLang.panel_video}"></a>
<a href="#" onclick="showImgUploadForm(); return false;" class="button"><img src="{cfg name='path.static.skin'}/images/panel/img.png" title="{$aLang.panel_image}"></a>
<a href="#" onclick="lsPanel.putText('page_text','<cut>'); return false;" class="button"><img src="{cfg name='path.static.skin'}/images/panel/cut.png" title="{$aLang.panel_cut}"></a>
</div>
{/if}
<textarea name="page_text" id="page_text" rows="20">{$_aRequest.page_text}</textarea></p>
<p><label for="page_seo_keywords">{$aLang.page_create_seo_keywords}:</label>
<input type="text" id="page_seo_keywords" name="page_seo_keywords" value="{$_aRequest.page_seo_keywords}" class="w100p" /><br />
<span class="form_note">{$aLang.page_create_seo_keywords_notice}</span>
</p>
<p><label for="page_seo_description">{$aLang.page_create_seo_description}:</label>
<input type="text" id="page_seo_description" name="page_seo_description" value="{$_aRequest.page_seo_description}" class="w100p" /><br />
<span class="form_note">{$aLang.page_create_seo_description_notice}</span>
</p>
<p><label for="page_sort">{$aLang.page_create_sort}:</label><br />
<input type="text" id="page_sort" name="page_sort" value="{$_aRequest.page_sort}" class="w100p" />
<span class="form_note">{$aLang.page_create_sort_notice}</span></p>
<p><input type="checkbox" id="page_auto_br" name="page_auto_br" value="1" {if $_aRequest.page_auto_br==1}checked{/if}/>
<label for="page_auto_br"> &mdash; {$aLang.page_create_auto_br}</label>
</p>
<p><input type="checkbox" id="page_active" name="page_active" value="1" {if $_aRequest.page_active==1}checked{/if}/>
<label for="page_active"> &mdash; {$aLang.page_create_active}</label>
</p>
<p><input type="checkbox" id="page_main" name="page_main" value="1" {if $_aRequest.page_main==1}checked{/if}/>
<label for="page_main"> &mdash; {$aLang.page_create_main}</label>
</p>
{hook run='plugin_page_form_add_end'}
<p class="buttons">
<input type="submit" name="submit_page_save" value="{$aLang.page_create_submit_save}">&nbsp;
<input type="submit" name="submit_page_cancel" value="{$aLang.page_create_submit_cancel}" onclick="window.location='{router page='page'}admin/'; return false;">&nbsp;
</p>
<input type="hidden" name="page_id" value="{$_aRequest.page_id}">
</form>

View file

@ -1,73 +0,0 @@
{include file='header.tpl'}
<div class=topic>
<h2>{$aLang.page_admin}</h2>
<br>
{if $aParams.0=='new'}
<h4>{$aLang.page_create}</h4>
{include file="$sTemplatePathPlugin/actions/ActionPage/add.tpl"}
{elseif $aParams.0=='edit'}
<h4>{$aLang.page_edit} «{$oPageEdit->getTitle()}»</h4>
{include file="$sTemplatePathPlugin/actions/ActionPage/add.tpl"}
{else}
<a href="{router page='page'}admin/new/">{$aLang.page_new}</a>
{/if}
<table width="100%" cellspacing="0" class="admin_page">
<tr>
<th align="left">{$aLang.page_admin_title}</th>
<th align="center" width="250px">{$aLang.page_admin_url}</th>
<th align="center" width="50px">{$aLang.page_admin_active}</th>
<th align="center" width="70px">{$aLang.page_admin_main}</th>
<th align="center" width="80px">{$aLang.page_admin_action}</th>
</tr>
{foreach from=$aPages item=oPage name=el2}
{if $smarty.foreach.el2.iteration % 2 == 0}
{assign var=className value=''}
{else}
{assign var=className value='colored'}
{/if}
<tr class="{$className}" onmouseover="this.className='colored_sel';" onmouseout="this.className='{$className}';">
<td align="left" valign="middle">
<img src="{$sTemplateWebPathPlugin}images/{if $oPage->getLevel()==0}folder{else}new{/if}_16x16.gif" alt="" title="" border="0" style="margin-left: {$oPage->getLevel()*20}px;"/>
<a href="{router page='page'}{$oPage->getUrlFull()}/">{$oPage->getTitle()}</a>
</td>
<td align="left">
/{$oPage->getUrlFull()}/
</td>
<td align="center">
{if $oPage->getActive()}
{$aLang.page_admin_active_yes}
{else}
{$aLang.page_admin_active_no}
{/if}
</td>
<td align="center">
{if $oPage->getMain()}
{$aLang.page_admin_active_yes}
{else}
{$aLang.page_admin_active_no}
{/if}
</td>
<td align="center">
<a href="{router page='page'}admin/edit/{$oPage->getId()}/"><img src="{$sTemplateWebPathPlugin}images/edit.gif" alt="{$aLang.page_admin_action_edit}" title="{$aLang.page_admin_action_edit}" border="0"/></a>
&nbsp;
<a href="{router page='page'}admin/delete/{$oPage->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}" onclick="return confirm('«{$oPage->getTitle()}»: {$aLang.page_admin_action_delete_confirm}');"><img src="{$sTemplateWebPathPlugin}images/delete.gif" alt="{$aLang.page_admin_action_delete}" title="{$aLang.page_admin_action_delete}" border="0"/></a>
<a href="{router page='page'}admin/sort/{$oPage->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}"><img src="{$sTemplateWebPathPlugin}images/up.png" alt="{$aLang.page_admin_sort_up}" title="{$aLang.page_admin_sort_up} ({$oPage->getSort()})" /></a>
<a href="{router page='page'}admin/sort/{$oPage->getId()}/down/?security_ls_key={$LIVESTREET_SECURITY_KEY}"><img src="{$sTemplateWebPathPlugin}images/down.png" alt="{$aLang.page_admin_sort_down}" title="{$aLang.page_admin_sort_down} ({$oPage->getSort()})" /></a>
</td>
</tr>
{/foreach}
</table>
</div>
{include file='footer.tpl'}

View file

@ -1,18 +0,0 @@
{assign var="bNoSidebar" value=true}
{include file='header.tpl'}
<div class=topic>
<div class="content">
{if $oConfig->GetValue('view.tinymce')}
{$oPage->getText()}
{else}
{if $oPage->getAutoBr()}
{$oPage->getText()|nl2br}
{else}
{$oPage->getText()}
{/if}
{/if}
</div>
</div>
{include file='footer.tpl'}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 B

View file

@ -1,3 +0,0 @@
{foreach from=$aPagesMain item=oPage}
<li {if $sAction=='page' and $sEvent==$oPage->getUrl()}class="active"{/if}><a href="{router page='page'}{$oPage->getUrlFull()}/" >{$oPage->getTitle()}</a></li>
{/foreach}