1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-03 06:55:03 +03:00

Merge remote-tracking branch 'livestreet/master' into com

* livestreet/master:
  Fixes #118: Fix navigation
  Fix editor
  Fixes #248
  Fixes #255
  Synio, blog categories
  Restore install folder
  Функционал категорий для блогов
  fix Router - remove empty last param
  fix plugin page
This commit is contained in:
vatseek 2013-04-10 10:23:47 +03:00
commit 25ff74cd8e
154 changed files with 25219 additions and 746 deletions

View file

@ -62,6 +62,11 @@ class ActionAdmin extends Action {
$this->AddEvent('recalcfavourite','EventRecalculateFavourite');
$this->AddEvent('recalcvote','EventRecalculateVote');
$this->AddEvent('recalctopic','EventRecalculateTopic');
$this->AddEventPreg('/^blogcategory$/i','/^modal-add$/i','EventBlogCategoryModalAdd');
$this->AddEventPreg('/^blogcategory$/i','/^modal-edit$/i','EventBlogCategoryModalEdit');
$this->AddEventPreg('/^blogcategory$/i','/^add$/i','EventBlogCategoryAdd');
$this->AddEventPreg('/^blogcategory$/i','/^edit$/i','EventBlogCategoryEdit');
$this->AddEvent('blogcategory','EventBlogCategory');
}
@ -77,6 +82,146 @@ class ActionAdmin extends Action {
protected function EventIndex() {
}
/**
* Список категорий блогов
*/
protected function EventBlogCategory() {
/**
* Обработка удаления
*/
if ($this->GetParam(0)=='delete' and $oCategory=$this->Blog_GetCategoryById($this->GetParam(1))) {
$this->Security_ValidateSendForm();
/**
* Получаем все дочернии категории
*/
$aCategoriesId=$this->Blog_GetChildrenCategoriesById($oCategory->getId(),true);
$aCategoriesId[]=$oCategory->getId();
/**
* У блогов проставляем category_id = null
*/
$this->Blog_ReplaceBlogsCategoryByCategoryId($aCategoriesId,null);
/**
* Удаляем категории
*/
$this->Blog_DeleteCategoryByArrayId($aCategoriesId);
}
/**
* Обработка изменения сортировки
*/
if ($this->GetParam(0)=='sort' and $oCategory=$this->Blog_GetCategoryById($this->GetParam(1))) {
$this->Security_ValidateSendForm();
$sWay=$this->GetParam(2)=='down' ? 'down' : 'up';
$iSortOld=$oCategory->getSort();
if ($oCategoryPrev=$this->Blog_GetNextCategoryBySort($iSortOld,$oCategory->getPid(),$sWay)) {
$iSortNew=$oCategoryPrev->getSort();
$oCategoryPrev->setSort($iSortOld);
$this->Blog_UpdateCategory($oCategoryPrev);
} else {
if ($sWay=='down') {
$iSortNew=$iSortOld-1;
} else {
$iSortNew=$iSortOld+1;
}
}
/**
* Меняем значения сортировки местами
*/
$oCategory->setSort($iSortNew);
$this->Blog_UpdateCategory($oCategory);
}
$aCategories=$this->Blog_GetCategoriesTree();
$this->Viewer_Assign("aCategories",$aCategories);
}
/**
* Загружает модальное окно создания категории бога
*/
protected function EventBlogCategoryModalAdd() {
$this->Viewer_SetResponseAjax('json');
$aCategories=$this->Blog_GetCategoriesTree();
$oViewer=$this->Viewer_GetLocalViewer();
$oViewer->Assign('aCategories',$aCategories);
/**
* Устанавливаем переменные для ajax ответа
*/
$this->Viewer_AssignAjax('sText',$oViewer->Fetch("actions/ActionAdmin/blogcategory_form_add.tpl"));
}
/**
* Загружает модальное окно редактирования категории бога
*/
protected function EventBlogCategoryModalEdit() {
$this->Viewer_SetResponseAjax('json');
if (!($oCategory=$this->Blog_GetCategoryById(getRequestStr('id')))) {
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
return;
}
$aCategories=$this->Blog_GetCategoriesTree();
$oViewer=$this->Viewer_GetLocalViewer();
$oViewer->Assign('oCategory',$oCategory);
$oViewer->Assign('aCategories',$aCategories);
/**
* Устанавливаем переменные для ajax ответа
*/
$this->Viewer_AssignAjax('sText',$oViewer->Fetch("actions/ActionAdmin/blogcategory_form_add.tpl"));
}
protected function EventBlogCategoryAdd() {
$this->Viewer_SetResponseAjax('json');
/**
* Создаем категорию
*/
$oCategory=Engine::GetEntity('ModuleBlog_EntityBlogCategory');
$oCategory->setTitle(getRequestStr('title'));
$oCategory->setUrl(getRequestStr('url'));
$oCategory->setSort(getRequestStr('sort'));
$oCategory->setPid(getRequestStr('pid'));
if ($oCategory->_Validate()) {
if ($this->Blog_AddCategory($oCategory)) {
return;
}
} else {
$this->Message_AddError($oCategory->_getValidateError(),$this->Lang_Get('error'));
}
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
}
protected function EventBlogCategoryEdit() {
$this->Viewer_SetResponseAjax('json');
if (!($oCategory=$this->Blog_GetCategoryById(getRequestStr('id')))) {
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
return;
}
/**
* Создаем категорию
*/
$oCategory->setTitle(getRequestStr('title'));
$oCategory->setUrl(getRequestStr('url'));
$oCategory->setSort(getRequestStr('sort'));
$oCategory->setPid(getRequestStr('pid'));
if ($oCategory->_Validate()) {
if ($this->Blog_UpdateCategory($oCategory)) {
/**
* Проверяем корректность вложений
*/
if (count($this->Blog_GetCategoriesTree())<$this->Blog_GetCountCategories()) {
$oCategory->setPid(null);
$oCategory->setUrlFull($oCategory->getUrl());
$this->Blog_UpdateCategory($oCategory);
}
$this->Blog_RebuildCategoryUrlFull($oCategory);
return;
}
} else {
$this->Message_AddError($oCategory->_getValidateError(),$this->Lang_Get('error'));
}
$this->Message_AddError($this->Lang_Get('system_error'),$this->Lang_Get('error'));
}
/**
* Перестроение дерева комментариев, актуально при $config['module']['comment']['use_nested'] = true;
*

View file

@ -186,6 +186,11 @@ class ActionBlog extends Action {
return Router::Action('error');
}
$this->Hook_Run('blog_add_show');
/**
* Прогружаем категории блогов
*/
$aCategories=$this->Blog_GetCategoriesTree();
$this->Viewer_Assign('aBlogCategories',$aCategories);
/**
* Запускаем проверку корректности ввода полей при добалении блога.
* Дополнительно проверяем, что был отправлен POST запрос.
@ -220,6 +225,16 @@ class ActionBlog extends Action {
return false;
}
}
/**
* Устанавливаем категорию для блога
*/
if (Config::Get('module.blog.category_allow') and ($this->oUserCurrent->isAdministrator() or !Config::Get('module.blog.category_only_admin'))) {
if (getRequestStr('blog_category')) {
$oBlog->setCategoryId(getRequestStr('blog_category'));
} elseif (Config::Get('module.blog.category_allow_empty')) {
$oBlog->setCategoryId(null);
}
}
/**
* Создаём блог
*/
@ -230,6 +245,12 @@ class ActionBlog extends Action {
* Получаем блог, это для получение полного пути блога, если он в будущем будет зависит от других сущностей(компании, юзер и т.п.)
*/
$oBlog->Blog_GetBlogById($oBlog->getId());
/**
* Меняем количество блогов в категории
*/
if ($oBlog->getCategoryId()) {
$this->Blog_IncreaseCategoryCountBlogs($oBlog->getCategoryId());
}
/**
* Добавляем событие в ленту
@ -278,6 +299,11 @@ class ActionBlog extends Action {
}
$this->Hook_Run('blog_edit_show',array('oBlog'=>$oBlog));
/**
* Прогружаем категории блогов
*/
$aCategories=$this->Blog_GetCategoriesTree();
$this->Viewer_Assign('aBlogCategories',$aCategories);
/**
* Устанавливаем title страницы
*/
@ -317,6 +343,17 @@ class ActionBlog extends Action {
if ($this->oUserCurrent->isAdministrator()) {
$oBlog->setUrl(getRequestStr('blog_url')); // разрешаем смену URL блога только админу
}
/**
* Устанавливаем категорию для блога
*/
$iCategoryIdOld=$oBlog->getCategoryId();
if (Config::Get('module.blog.category_allow') and ($this->oUserCurrent->isAdministrator() or !Config::Get('module.blog.category_only_admin'))) {
if (getRequestStr('blog_category')) {
$oBlog->setCategoryId(getRequestStr('blog_category'));
} elseif (Config::Get('module.blog.category_allow_empty')) {
$oBlog->setCategoryId(null);
}
}
/**
* Загрузка аватара, делаем ресайзы
*/
@ -341,6 +378,17 @@ class ActionBlog extends Action {
$this->Hook_Run('blog_edit_before', array('oBlog'=>$oBlog));
if ($this->Blog_UpdateBlog($oBlog)) {
$this->Hook_Run('blog_edit_after', array('oBlog'=>$oBlog));
/**
* Меняем количество блогов в категории
*/
if ($iCategoryIdOld and $iCategoryIdOld!=$oBlog->getCategoryId()) {
$this->Blog_DecreaseCategoryCountBlogs($iCategoryIdOld);
}
if ($oBlog->getCategoryId()) {
$this->Blog_IncreaseCategoryCountBlogs($oBlog->getCategoryId());
}
Router::Location($oBlog->getUrlFull());
} else {
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
@ -353,6 +401,7 @@ class ActionBlog extends Action {
$_REQUEST['blog_title']=$oBlog->getTitle();
$_REQUEST['blog_url']=$oBlog->getUrl();
$_REQUEST['blog_type']=$oBlog->getType();
$_REQUEST['blog_category']=$oBlog->getCategoryId();
$_REQUEST['blog_description']=$oBlog->getDescription();
$_REQUEST['blog_limit_rating_topic']=$oBlog->getLimitRatingTopic();
$_REQUEST['blog_id']=$oBlog->getId();
@ -562,6 +611,26 @@ class ActionBlog extends Action {
$this->Message_AddError($this->Lang_Get('blog_create_rating_error'),$this->Lang_Get('error'));
$bOk=false;
}
/**
* Проверяем категорию блога
*/
if (Config::Get('module.blog.category_allow')) {
if ($oCategory=$this->Blog_GetCategoryById(getRequestStr('blog_category'))) {
/**
* Проверяем есть ли у этой категории дочернии
*/
if (Config::Get('module.blog.category_only_children') and $this->Blog_GetCategoriesByPid($oCategory->getId())) {
$this->Message_AddError($this->Lang_Get('blog_create_category_error_only_children'),$this->Lang_Get('error'));
$bOk=false;
}
} else {
$_REQUEST['blog_category']=null;
if (!Config::Get('module.blog.category_allow_empty')) {
$this->Message_AddError($this->Lang_Get('blog_create_category_error'),$this->Lang_Get('error'));
$bOk=false;
}
}
}
/**
* Выполнение хуков
*/

View file

@ -22,6 +22,10 @@
* @since 1.0
*/
class ActionBlogs extends Action {
protected $iPageCurrent=1;
protected $sPageRoot=null;
protected $aCategoriesCurrent=array();
/**
* Инициализация
*/
@ -32,6 +36,7 @@ class ActionBlogs extends Action {
$this->Lang_AddLangJs(array(
'blog_join','blog_leave'
));
$this->sPageRoot=Router::GetPath('blogs');
}
/**
* Регистрируем евенты
@ -39,6 +44,7 @@ class ActionBlogs extends Action {
protected function RegisterEvent() {
$this->AddEventPreg('/^(page([1-9]\d{0,5}))?$/i','EventShowBlogs');
$this->AddEventPreg('/^ajax-search$/i','EventAjaxSearch');
$this->AddEventPreg('/^[\w\-\_]+$/i','EventShowBlogsCategory');
}
@ -78,6 +84,42 @@ class ActionBlogs extends Action {
$oViewer->Assign('sBlogsEmptyList',$this->Lang_Get('blogs_search_empty'));
$this->Viewer_AssignAjax('sText',$oViewer->Fetch("blog_list.tpl"));
}
protected function EventShowBlogsCategory() {
$aParams=$this->GetParams();
if (count($aParams)) {
if (preg_match('/^page(\d{1,5})$/i',$aParams[count($aParams)-1],$aMatch)) {
$this->iPageCurrent=$aMatch[1];
array_pop($aParams);
}
}
$sUrlFull=join('/',$aParams);
if ($sUrlFull!='') {
$sUrlFull=$this->sCurrentEvent.'/'.$sUrlFull;
} else {
$sUrlFull=$this->sCurrentEvent;
}
/**
* Получаем текущую категорию
*/
if ($oCategory=$this->Blog_GetCategoryByUrlFull($sUrlFull)) {
/**
* Получаем все дочерние категории
*/
$aCategoriesId=$this->Blog_GetChildrenCategoriesById($oCategory->getId(),true);
$aCategoriesId[]=$oCategory->getId();
$this->aCategoriesCurrent=$aCategoriesId;
$this->sPageRoot=$oCategory->getUrlWeb();
$this->Viewer_Assign('oBlogCategoryCurrent',$oCategory);
$this->Viewer_Assign('sBlogsRootPage',$oCategory->getUrlWeb());
} else {
return $this->EventNotFound();
}
return $this->EventShowBlogs();
}
/**
* Отображение списка блогов
*/
@ -105,7 +147,13 @@ class ActionBlogs extends Action {
/**
* Передан ли номер страницы
*/
$iPage= preg_match("/^\d+$/i",$this->GetEventMatch(2)) ? $this->GetEventMatch(2) : 1;
$iPage=$this->iPageCurrent;
if ($this->GetEventMatch(2)) {
$iPage=$this->GetEventMatch(2);
}
if ($this->aCategoriesCurrent) {
$aFilter['category_id']=$this->aCategoriesCurrent;
}
/**
* Получаем список блогов
*/
@ -114,7 +162,7 @@ class ActionBlogs extends Action {
/**
* Формируем постраничность
*/
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.blog.per_page'),Config::Get('pagination.pages.count'),Router::GetPath('blogs'),array('order'=>$sOrder,'order_way'=>$sOrderWay));
$aPaging=$this->Viewer_MakePaging($aResult['count'],$iPage,Config::Get('module.blog.per_page'),Config::Get('pagination.pages.count'),$this->sPageRoot,array('order'=>$sOrder,'order_way'=>$sOrderWay));
/**
* Загружаем переменные в шаблон
*/

View file

@ -0,0 +1,35 @@
<?php
/*-------------------------------------------------------
*
* LiveStreet Engine Social Networking
* Copyright © 2008 Mzhelskiy Maxim
*
*--------------------------------------------------------
*
* Official site: www.livestreet.ru
* Contact e-mail: rus.engine@gmail.com
*
* GNU General Public License, version 2:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
---------------------------------------------------------
*/
/**
* Обрабатывает блок категорий для блогов
*
* @package blocks
* @since 1.1
*/
class BlockCategoryBlog extends Block {
/**
* Запуск обработки
*/
public function Exec() {
$aCategories=$this->Blog_GetCategoriesTree();
$aBlogsAll=$this->Blog_GetBlogsByFilter(array('exclude_type' => 'personal'),array(),1,1,array());
$this->Viewer_Assign("aBlogCategories",$aCategories);
$this->Viewer_Assign("iCountBlogsAll",$aBlogsAll['count']);
}
}
?>

View file

@ -754,7 +754,10 @@ class ModuleBlog extends Module {
*/
public function DeleteBlog($iBlogId) {
if($iBlogId instanceof ModuleBlog_EntityBlog){
$iBlogId = $iBlogId->getId();
$oBlog=$iBlogId;
$iBlogId = $oBlog->getId();
} else {
$oBlog=$this->Blog_GetBlogById($iBlogId);
}
/**
* Получаем идентификаторы топиков блога. Удаляем топики блога.
@ -793,6 +796,12 @@ class ModuleBlog extends Module {
* Удаляем голосование за блог
*/
$this->Vote_DeleteVoteByTarget($iBlogId, 'blog');
/**
* Обновляем категорию блога
*/
if ($oBlog->getCategoryId()) {
$this->DecreaseCategoryCountBlogs($oBlog->getCategoryId());
}
return true;
}
/**
@ -901,5 +910,232 @@ class ModuleBlog extends Module {
public function GetBlogItemsByArrayId($aBlogId) {
return $this->GetBlogsByArrayId($aBlogId);
}
/**
* Получает список категорий блогов
*
* @param int|null|bool $iPid ID родительской категории, если false, то не учитывается в выборке
* @return array
*/
public function GetCategoriesByPid($iPid) {
return $this->oMapperBlog->GetCategoriesByPid($iPid);
}
/**
* Получает категорию по полному урлу
*
* @param string $sUrl УРЛ
* @return ModuleBlog_EntityBlogCategory|null
*/
public function GetCategoryByUrlFull($sUrl) {
return $this->oMapperBlog->GetCategoryByUrlFull($sUrl);
}
/**
* Возвращает дерево категорий блогов
*
* @return array
*/
public function GetCategoriesTree() {
$aResult=array();
$aCategoriesRow=$this->oMapperBlog->GetCategoriesTree();
if (count($aCategoriesRow)) {
$aResult=$this->BuildCategoriesRecursive($aCategoriesRow);
}
return $aResult;
}
/**
* Возвращает дочерние категории
*
* @param int $iId ID Основной категории
* @param bool $bOnlyIds Возвращать сами объекты или только ID
* @param array $aCategories Служебный параметр - дочерний список категорий
* @param bool $bBegin Служебный параметр - старт рекурсии
* @param null $iIdParent Служебный параметр - ID родительской категории
*
* @return array
*/
public function GetChildrenCategoriesById($iId,$bOnlyIds=false,$aCategories=array(),$bBegin=true,$iIdParent=null) {
static $aResult;
if ($bBegin) {
$aResult=array();
$aCategories=$this->oMapperBlog->GetCategoriesTree();
}
foreach ($aCategories as $aCategory) {
$aCategory['children']=array();
$aTmp=$aCategory;
unset($aTmp['childNodes']);
$aResult[$aCategory['id']]=$aTmp;
if ($iIdParent) {
$aResult[$iIdParent]['children'][]=$bOnlyIds ? $aCategory['id'] : Engine::GetEntity('ModuleBlog_EntityBlogCategory',$aTmp);
}
if (isset($aCategory['childNodes']) and count($aCategory['childNodes'])>0) {
$this->GetChildrenCategoriesById($iId,$bOnlyIds,$aCategory['childNodes'],false,$aCategory['id']);
if ($iIdParent) {
$aResult[$iIdParent]['children']=array_merge($aResult[$iIdParent]['children'],$aResult[$aCategory['id']]['children']);
}
}
}
if (isset($aResult[$iId])) {
return $aResult[$iId]['children'];
}
return array();
}
/**
* Строит дерево категорий блогов
*
* @param array $aCategories
* @param bool $bBegin
* @param ModuleBlog_EntityBlogCategory|null $oCategoryParent
* @return array
*/
protected function BuildCategoriesRecursive($aCategories,$bBegin=true,$oCategoryParent=null) {
static $aResult;
static $iLevel;
if ($bBegin) {
$aResult=array();
$iLevel=0;
}
foreach ($aCategories as $aCategory) {
$aTemp=$aCategory;
$aTemp['level']=$iLevel;
unset($aTemp['childNodes']);
$oCategory=Engine::GetEntity('ModuleBlog_EntityBlogCategory',$aTemp);
$aResult[]=$oCategory;
if (isset($aCategory['childNodes']) and count($aCategory['childNodes'])>0) {
$iLevel++;
$this->BuildCategoriesRecursive($aCategory['childNodes'],false,$oCategory);
}
if ($oCategoryParent) {
$oCategoryParent->setCountBlogs($oCategory->getCountBlogs()+$oCategoryParent->getCountBlogs());
}
}
$iLevel--;
return $aResult;
}
/**
* Получает категорию по ID
*
* @param int $iId УРЛ
* @return ModuleBlog_EntityBlogCategory|null
*/
public function GetCategoryById($iId) {
return $this->oMapperBlog->GetCategoryById($iId);
}
/**
* Получает следующую категорию по сортировке
*
* @param $iSort
* @param $sPid
* @param $sWay
*
* @return ModuleBlog_EntityBlogCategory|null
*/
public function GetNextCategoryBySort($iSort,$sPid,$sWay='up') {
return $this->oMapperBlog->GetNextCategoryBySort($iSort,$sPid,$sWay);
}
/**
* Обновление категории
*
* @param ModuleBlog_EntityBlogCategory $oObject Объект категории
*
* @return bool
*/
public function UpdateCategory($oObject) {
return $this->oMapperBlog->UpdateCategory($oObject);
}
/**
* Добавление категории
*
* @param ModuleBlog_EntityBlogCategory $oObject
*
* @return int|bool
*/
public function AddCategory($oObject) {
return $this->oMapperBlog->AddCategory($oObject);
}
/**
* Возвращает максимальное значение сортировки для родительской категории
*
* @param int|null $sPid
*
* @return int
*/
public function GetCategoryMaxSortByPid($sPid) {
return $this->oMapperBlog->GetCategoryMaxSortByPid($sPid);
}
public function RebuildCategoryUrlFull($oCategoryStart,$bStart=true) {
static $aRebuildIds;
if ($bStart) {
$aRebuildIds=array();
}
$aCategories=$this->GetCategoriesByPid($oCategoryStart->getId());
foreach ($aCategories as $oCategory) {
if ($oCategory->getId()==$oCategoryStart->getId()) {
continue;
}
if (in_array($oCategory->getId(),$aRebuildIds)) {
continue;
}
$aRebuildIds[]=$oCategory->getId();
$oCategory->setUrlFull($oCategoryStart->getUrlFull().'/'.$oCategory->getUrl());
$this->UpdateCategory($oCategory);
$this->RebuildCategoryUrlFull($oCategory,false);
}
}
/**
* Возвращает количество категорий
*
* @return int
*/
public function GetCountCategories() {
return $this->oMapperBlog->GetCountCategories();
}
/**
* Увеличивает количество блогов у категории
*
* @param int $sId ID категории
* @return bool
*/
public function IncreaseCategoryCountBlogs($sId) {
return $this->oMapperBlog->IncreaseCategoryCountBlogs($sId);
}
/**
* Уменьшает количество блогов у категории
*
* @param int $sId ID категории
* @return bool
*/
public function DecreaseCategoryCountBlogs($sId) {
return $this->oMapperBlog->DecreaseCategoryCountBlogs($sId);
}
/**
* Удаляет категории по списку их ID
*
* @param array $aArrayId Список ID категорий
*
* @return bool
*/
public function DeleteCategoryByArrayId($aArrayId) {
return $this->oMapperBlog->DeleteCategoryByArrayId($aArrayId);
}
/**
* Заменяет категорию на новую у блогов
*
* @param int| null $iIdOld Старая категори
* @param int| null $iIdNew Новая категория
*
* @return bool
*/
public function ReplaceBlogsCategoryByCategoryId($iIdOld,$iIdNew) {
$res=$this->oMapperBlog->ReplaceBlogsCategoryByCategoryId($iIdOld,$iIdNew);
$this->Cache_Clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG,array('blog_update'));
return $res;
}
}
?>

View file

@ -38,6 +38,14 @@ class ModuleBlog_EntityBlog extends Entity {
public function getOwnerId() {
return $this->_getDataOne('user_owner_id');
}
/**
* Возвращает ID категории
*
* @return int|null
*/
public function getCategoryId() {
return $this->_getDataOne('category_id');
}
/**
* Возвращает название блога
*
@ -226,6 +234,14 @@ class ModuleBlog_EntityBlog extends Entity {
public function setOwnerId($data) {
$this->_aData['user_owner_id']=$data;
}
/**
* Устанавливает ID категории блога
*
* @param int $data
*/
public function setCategoryId($data) {
$this->_aData['category_id']=$data;
}
/**
* Устанавливает заголовок блога
*

View file

@ -0,0 +1,82 @@
<?php
/*-------------------------------------------------------
*
* LiveStreet Engine Social Networking
* Copyright © 2008 Mzhelskiy Maxim
*
*--------------------------------------------------------
*
* Official site: www.livestreet.ru
* Contact e-mail: rus.engine@gmail.com
*
* GNU General Public License, version 2:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
---------------------------------------------------------
*/
/**
* Сущность категории блога
*
* @package modules.blog
* @since 1.1
*/
class ModuleBlog_EntityBlogCategory extends Entity {
/**
* Определяем правила валидации
*
* @var array
*/
protected $aValidateRules=array(
array('url','regexp','pattern'=>'/^[\w\-_]+$/i','allowEmpty'=>false),
array('title','string','max'=>100,'min'=>1,'allowEmpty'=>false),
array('sort','number','integerOnly'=>true),
array('pid','parent_category'),
array('sort','sort_check'),
);
/**
* Проверка родительской категории
*
* @param string $sValue Валидируемое значение
* @param array $aParams Параметры
* @return bool
*/
public function ValidateParentCategory($sValue,$aParams) {
if ($this->getPid()) {
if ($oCategory=$this->Blog_GetCategoryById($this->getPid())) {
if ($oCategory->getId()==$this->getId()) {
return 'Попытка вложить категорию в саму себя';
}
$this->setUrlFull($oCategory->getUrlFull().'/'.$this->getUrl());
} else {
return 'Неверная категория';
}
} else {
$this->setPid(null);
$this->setUrlFull($this->getUrl());
}
return true;
}
/**
* Установка дефолтной сортировки
*
* @param string $sValue Валидируемое значение
* @param array $aParams Параметры
* @return bool
*/
public function ValidateSortCheck($sValue,$aParams) {
if (!$this->getSort()) {
$this->setSort($this->Blog_GetCategoryMaxSortByPid($this->getPid())+1);
}
return true;
}
/**
* Возвращает полный URL категории
*
* @return string
*/
public function getUrlWeb() {
return Router::GetPath('blogs').$this->getUrlFull().'/';
}
}
?>

View file

@ -34,14 +34,15 @@ class ModuleBlog_MapperBlog extends Mapper {
blog_title,
blog_description,
blog_type,
category_id,
blog_date_add,
blog_limit_rating_topic,
blog_url,
blog_avatar
)
VALUES(?d, ?, ?, ?, ?, ?, ?, ?)
VALUES(?d, ?, ?, ?, ?, ?, ?, ?, ?)
";
if ($iId=$this->oDb->query($sql,$oBlog->getOwnerId(),$oBlog->getTitle(),$oBlog->getDescription(),$oBlog->getType(),$oBlog->getDateAdd(),$oBlog->getLimitRatingTopic(),$oBlog->getUrl(),$oBlog->getAvatar())) {
if ($iId=$this->oDb->query($sql,$oBlog->getOwnerId(),$oBlog->getTitle(),$oBlog->getDescription(),$oBlog->getType(),$oBlog->getCategoryId(),$oBlog->getDateAdd(),$oBlog->getLimitRatingTopic(),$oBlog->getUrl(),$oBlog->getAvatar())) {
return $iId;
}
return false;
@ -58,6 +59,7 @@ class ModuleBlog_MapperBlog extends Mapper {
blog_title= ?,
blog_description= ?,
blog_type= ?,
category_id= ?,
blog_date_edit= ?,
blog_rating= ?f,
blog_count_vote = ?d,
@ -69,7 +71,7 @@ class ModuleBlog_MapperBlog extends Mapper {
WHERE
blog_id = ?d
";
if ($this->oDb->query($sql,$oBlog->getTitle(),$oBlog->getDescription(),$oBlog->getType(),$oBlog->getDateEdit(),$oBlog->getRating(),$oBlog->getCountVote(),$oBlog->getCountUser(),$oBlog->getCountTopic(),$oBlog->getLimitRatingTopic(),$oBlog->getUrl(),$oBlog->getAvatar(),$oBlog->getId())) {
if ($this->oDb->query($sql,$oBlog->getTitle(),$oBlog->getDescription(),$oBlog->getType(),$oBlog->getCategoryId(),$oBlog->getDateEdit(),$oBlog->getRating(),$oBlog->getCountVote(),$oBlog->getCountUser(),$oBlog->getCountTopic(),$oBlog->getLimitRatingTopic(),$oBlog->getUrl(),$oBlog->getAvatar(),$oBlog->getId())) {
return true;
}
return false;
@ -116,6 +118,242 @@ class ModuleBlog_MapperBlog extends Mapper {
}
return $aBlogs;
}
/**
* Получает список категорий блогов
*
* @param int|null|bool $iPid ID родительской категории, если false, то не учитывается в выборке
* @return array
*/
public function GetCategoriesByPid($iPid) {
$sql = "SELECT
*
FROM
".Config::Get('db.table.blog_category')."
WHERE
1 = 1
{ AND pid = ?d }
{ AND pid IS NULL and 1=?d }
ORDER by title asc
";
$aReturn=array();
if ($aRows=$this->oDb->select($sql,$iPid ? $iPid : DBSIMPLE_SKIP,is_null($iPid) ? 1 : DBSIMPLE_SKIP)) {
foreach ($aRows as $aRow) {
$aReturn[]=Engine::GetEntity('ModuleBlog_EntityBlogCategory',$aRow);
}
}
return $aReturn;
}
/**
* Возвращает список категорий с учетом вложенности
*
* @return array|null
*/
public function GetCategoriesTree() {
$sql = "SELECT
*,
id as ARRAY_KEY,
pid as PARENT_KEY
FROM
".Config::Get('db.table.blog_category')."
ORDER by sort desc;
";
if ($aRows=$this->oDb->select($sql)) {
return $aRows;
}
return null;
}
/**
* Получает категорию по полному урлу
*
* @param string $sUrl УРЛ
* @return ModuleBlog_EntityBlogCategory|null
*/
public function GetCategoryByUrlFull($sUrl) {
$sql = "SELECT * FROM ".Config::Get('db.table.blog_category')." WHERE url_full = ? ";
if ($aRow=$this->oDb->selectRow($sql,$sUrl)) {
return Engine::GetEntity('ModuleBlog_EntityBlogCategory',$aRow);
}
return null;
}
/**
* Получает категорию по ID
*
* @param int $iId УРЛ
* @return ModuleBlog_EntityBlogCategory|null
*/
public function GetCategoryById($iId) {
$sql = "SELECT * FROM ".Config::Get('db.table.blog_category')." WHERE id = ?d ";
if ($aRow=$this->oDb->selectRow($sql,$iId)) {
return Engine::GetEntity('ModuleBlog_EntityBlogCategory',$aRow);
}
return null;
}
/**
* Получает следующую категорию по сортировке
*
* @param $iSort
* @param $sPid
* @param $sWay
*
* @return ModuleBlog_EntityBlogCategory|null
*/
public function GetNextCategoryBySort($iSort,$sPid,$sWay) {
if ($sWay=='up') {
$sWay='>';
$sOrder='asc';
} else {
$sWay='<';
$sOrder='desc';
}
$sPidNULL='';
if (is_null($sPid)) {
$sPidNULL='pid IS NULL and';
}
$sql = "SELECT * FROM ".Config::Get('db.table.blog_category')." WHERE { pid = ? and } {$sPidNULL} sort {$sWay} ? order by sort {$sOrder} limit 0,1";
if ($aRow=$this->oDb->selectRow($sql,is_null($sPid) ? DBSIMPLE_SKIP : $sPid, $iSort)) {
return Engine::GetEntity('ModuleBlog_EntityBlogCategory',$aRow);
}
return null;
}
/**
* Возвращает максимальное значение сортировки для родительской категории
*
* @param int|null $sPid
*
* @return int
*/
public function GetCategoryMaxSortByPid($sPid) {
$sql = "SELECT max(sort) as max_sort FROM ".Config::Get('db.table.blog_category')." WHERE 1=1 { and pid = ? } { and pid IS NULL and 1=?d } ";
if ($aRow=$this->oDb->selectRow($sql,is_null($sPid) ? DBSIMPLE_SKIP : $sPid,!is_null($sPid) ? DBSIMPLE_SKIP : 1)) {
return $aRow['max_sort'];
}
return 0;
}
/**
* Обновление категории
*
* @param ModuleBlog_EntityBlogCategory $oObject Объект категории
*
* @return bool
*/
public function UpdateCategory($oObject) {
$sql = "UPDATE ".Config::Get('db.table.blog_category')." SET ?a WHERE id = ?d ";
$res=$this->oDb->query($sql,$oObject->_getData(array('pid','title','url','url_full','sort','count_blogs')),$oObject->getId());
return $res===false or is_null($res) ? false : true;
}
/**
* Добавление категории
*
* @param ModuleBlog_EntityBlogCategory $oObject
*
* @return int|bool
*/
public function AddCategory($oObject) {
$sql = "INSERT INTO ".Config::Get('db.table.blog_category')." SET ?a ";
if ($iId=$this->oDb->query($sql,$oObject->_getData())) {
return $iId;
}
return false;
}
/**
* Возвращает количество категорий
*
* @return int
*/
public function GetCountCategories() {
$sql = "SELECT count(*) as count FROM ".Config::Get('db.table.blog_category')." ";
if ($aRow=$this->oDb->selectRow($sql)) {
return $aRow['count'];
}
return 0;
}
/**
* Увеличивает количество блогов у категории
*
* @param int $sId ID категории
* @return bool
*/
public function IncreaseCategoryCountBlogs($sId) {
$sql = "UPDATE ".Config::Get('db.table.blog_category')."
SET
count_blogs=count_blogs+1
WHERE
id = ?
";
if ($this->oDb->query($sql,$sId)) {
return true;
}
return false;
}
/**
* Уменьшает количество блогов у категории
*
* @param int $sId ID категории
* @return bool
*/
public function DecreaseCategoryCountBlogs($sId) {
$sql = "UPDATE ".Config::Get('db.table.blog_category')."
SET
count_blogs=count_blogs-1
WHERE
id = ?
";
if ($this->oDb->query($sql,$sId)) {
return true;
}
return false;
}
/**
* Удаляет категории по списку их ID
*
* @param array $aArrayId Список ID категорий
*
* @return bool
*/
public function DeleteCategoryByArrayId($aArrayId) {
if (!is_array($aArrayId)) {
$aArrayId=array($aArrayId);
}
$sql = "DELETE FROM ".Config::Get('db.table.blog_category')."
WHERE
id IN (?a)
";
if ($this->oDb->query($sql,$aArrayId)) {
return true;
}
return false;
}
/**
* Заменяет категорию на новую у блогов
*
* @param int|array|null $iIdOld Старая категори
* @param int|null $iIdNew Новая категория
*
* @return bool
*/
public function ReplaceBlogsCategoryByCategoryId($iIdOld,$iIdNew) {
if (!is_null($iIdOld) and !is_array($iIdOld)) {
$iIdOld=array($iIdOld);
}
$sql = "UPDATE ".Config::Get('db.table.blog')."
SET
category_id = ?
WHERE
1 = 1
{ and category_id IN ( ?a ) }
{ and category_id IS NULL and 1 = ?d }
";
if ($this->oDb->query($sql,$iIdNew,is_null($iIdOld) ? DBSIMPLE_SKIP : $iIdOld,!is_null($iIdOld) ? DBSIMPLE_SKIP : 1)) {
return true;
}
return false;
}
/**
* Добавляет свзяь пользователя с блогом в БД
*
@ -528,6 +766,9 @@ class ModuleBlog_MapperBlog extends Mapper {
if (isset($aFilter['type']) and !is_array($aFilter['type'])) {
$aFilter['type']=array($aFilter['type']);
}
if (isset($aFilter['category_id']) and !is_array($aFilter['category_id'])) {
$aFilter['category_id']=array($aFilter['category_id']);
}
$sql = "SELECT
blog_id
@ -541,6 +782,8 @@ class ModuleBlog_MapperBlog extends Mapper {
{ AND blog_type not IN (?a) }
{ AND blog_url = ? }
{ AND blog_title LIKE ? }
{ AND category_id IN (?a) }
{ AND category_id IS NULL and 1=?d}
ORDER by {$sOrder}
LIMIT ?d, ?d ;
";
@ -552,6 +795,8 @@ class ModuleBlog_MapperBlog extends Mapper {
(isset($aFilter['exclude_type']) and count($aFilter['exclude_type']) ) ? $aFilter['exclude_type'] : DBSIMPLE_SKIP,
isset($aFilter['url']) ? $aFilter['url'] : DBSIMPLE_SKIP,
isset($aFilter['title']) ? $aFilter['title'] : DBSIMPLE_SKIP,
(isset($aFilter['category_id']) and count($aFilter['category_id'])) ? $aFilter['category_id'] : DBSIMPLE_SKIP,
(array_key_exists('category_id',$aFilter) and is_null($aFilter['category_id'])) ? 1 : DBSIMPLE_SKIP,
($iCurrPage-1)*$iPerPage, $iPerPage
)) {
foreach ($aRows as $aRow) {

View file

@ -188,6 +188,10 @@ $config['module']['blog']['collective_good'] = -3; // рейтинг топи
$config['module']['blog']['index_good'] = 8; // Рейтинг топика выше которого(включительно) он попадает на главную
$config['module']['blog']['encrypt'] = 'livestreet'; // Ключ XXTEA шифрования идентификаторов в ссылках приглашения в блоги
$config['module']['blog']['avatar_size'] = array(100,64,48,24,0); // Список размеров аватаров у блога. 0 - исходный размер
$config['module']['blog']['category_allow'] = true; // Разрешить использование категорий бля блогов
$config['module']['blog']['category_only_admin'] = true; // Задавать и менять категории для блога может только админ
$config['module']['blog']['category_only_children'] = true; // Для блога можно выбрать только конечную категорию, у которой нет других вложенных
$config['module']['blog']['category_allow_empty'] = true; // Разрешить блоги без категории
// Модуль Topic
$config['module']['topic']['new_time'] = 60*60*24*1; // Время в секундах в течении которого топик считается новым
$config['module']['topic']['per_page'] = 10; // Число топиков на одну страницу
@ -323,6 +327,7 @@ $config['db']['table']['prefix'] = 'prefix_';
$config['db']['table']['user'] = '___db.table.prefix___user';
$config['db']['table']['blog'] = '___db.table.prefix___blog';
$config['db']['table']['blog_category'] = '___db.table.prefix___blog_category';
$config['db']['table']['topic'] = '___db.table.prefix___topic';
$config['db']['table']['topic_tag'] = '___db.table.prefix___topic_tag';
$config['db']['table']['comment'] = '___db.table.prefix___comment';
@ -447,7 +452,7 @@ $config['block']['rule_tag'] = array(
);
$config['block']['rule_blogs'] = array(
'action' => array( 'blogs' ),
'blocks' => array( 'right' => array('stream') ),
'blocks' => array( 'right' => array('categoryBlog') ),
);
$config['block']['userfeedBlogs'] = array(
@ -532,6 +537,8 @@ $config['head']['default']['js'] = array(
"___path.static.framework___/js/livestreet/toolbar.js",
"___path.static.framework___/js/livestreet/settings.js",
"___path.static.framework___/js/livestreet/topic.js",
"___path.static.framework___/js/livestreet/admin.js",
"___path.static.framework___/js/livestreet/init.js",
"http://yandex.st/share/share.js" => array('merge'=>false),
);

View file

@ -178,7 +178,7 @@ class Router extends LsObject {
* @return array
*/
protected function GetRequestArray($sReq) {
$aRequestUrl = ($sReq=='') ? array() : explode('/',$sReq);
$aRequestUrl = ($sReq=='') ? array() : explode('/',trim($sReq,'/'));
for ($i=0;$i<Config::Get('path.offset_request_url');$i++) {
array_shift($aRequestUrl);
}

16
install/build.sh Normal file
View file

@ -0,0 +1,16 @@
#!/bin/sh
ABSOLUTE_FILENAME=`readlink -e "$0"`
DIRECTORY=`dirname "$ABSOLUTE_FILENAME"`
if [ ! -e "$DIRECTORY/../config/config.local.php" ]; then
cp $DIRECTORY/../config/config.local.dist.php $DIRECTORY/../config/config.local.php
fi
chmod 777 $DIRECTORY/../config/config.local.php
chmod 777 $DIRECTORY/../tmp
chmod 777 $DIRECTORY/../logs
chmod 777 $DIRECTORY/../uploads
chmod 777 $DIRECTORY/../templates/compiled
chmod 777 $DIRECTORY/../templates/cache
chmod 777 $DIRECTORY/../plugins

View file

@ -0,0 +1,139 @@
ALTER TABLE `prefix_topic` ADD `topic_count_favourite` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `topic_count_comment`;
ALTER TABLE `prefix_comment` ADD `comment_count_favourite` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `comment_count_vote`;
ALTER TABLE `prefix_topic` ADD `topic_count_vote_up` INT NOT NULL DEFAULT '0' AFTER `topic_count_vote` ,
ADD `topic_count_vote_down` INT NOT NULL DEFAULT '0' AFTER `topic_count_vote_up` ,
ADD `topic_count_vote_abstain` INT NOT NULL DEFAULT '0' AFTER `topic_count_vote_down`;
ALTER TABLE `prefix_blog` ADD `blog_count_topic` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `blog_count_user` ,
ADD INDEX ( `blog_count_topic` );
CREATE TABLE IF NOT EXISTS `prefix_subscribe` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`target_type` varchar(20) NOT NULL,
`target_id` int(11) DEFAULT NULL,
`mail` varchar(50) NOT NULL,
`date_add` datetime NOT NULL,
`date_remove` datetime DEFAULT NULL,
`ip` varchar(20) NOT NULL,
`key` varchar(32) DEFAULT NULL,
`status` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `type` (`target_type`),
KEY `mail` (`mail`),
KEY `status` (`status`),
KEY `key` (`key`),
KEY `target_id` (`target_id`),
KEY `ip` (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `prefix_wall` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pid` int(11) DEFAULT NULL,
`wall_user_id` int(11) unsigned NOT NULL,
`user_id` int(11) unsigned NOT NULL,
`count_reply` int(11) NOT NULL DEFAULT '0',
`last_reply` varchar(100) NOT NULL,
`date_add` datetime NOT NULL,
`ip` varchar(20) NOT NULL,
`text` text NOT NULL,
PRIMARY KEY (`id`),
KEY `pid` (`pid`),
KEY `wall_user_id` (`wall_user_id`),
KEY `ip` (`ip`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `prefix_wall`
ADD CONSTRAINT `prefix_wall_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `prefix_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `prefix_wall_ibfk_1` FOREIGN KEY (`wall_user_id`) REFERENCES `prefix_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `prefix_user_field` ADD `type` VARCHAR( 50 ) NOT NULL AFTER `id` ,
ADD INDEX ( `type` );
CREATE TABLE IF NOT EXISTS `prefix_user_note` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`target_user_id` int(11) unsigned NOT NULL,
`user_id` int(11) unsigned NOT NULL,
`text` text NOT NULL,
`date_add` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `target_user_id` (`target_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `prefix_user_note`
ADD CONSTRAINT `prefix_user_note_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `prefix_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `prefix_user_note_ibfk_1` FOREIGN KEY (`target_user_id`) REFERENCES `prefix_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `prefix_favourite` ADD `tags` VARCHAR( 250 ) NOT NULL;
CREATE TABLE IF NOT EXISTS `prefix_favourite_tag` (
`user_id` int(10) unsigned NOT NULL,
`target_id` int(11) NOT NULL,
`target_type` enum('topic','comment','talk') NOT NULL,
`is_user` tinyint(1) NOT NULL DEFAULT '0',
`text` varchar(50) NOT NULL,
KEY `user_id_target_type_id` (`user_id`,`target_type`,`target_id`),
KEY `target_type_id` (`target_type`,`target_id`),
KEY `is_user` (`is_user`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `prefix_favourite_tag`
ADD CONSTRAINT `prefix_favourite_tag_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `prefix_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `prefix_topic` ADD INDEX ( `topic_count_comment` );
ALTER TABLE `prefix_talk` ADD `talk_user_id_last` INT NOT NULL AFTER `talk_date_last` ,
ADD INDEX ( `talk_user_id_last` );
ALTER TABLE `prefix_talk` ADD `talk_comment_id_last` INT NULL DEFAULT NULL AFTER `talk_user_ip`;
ALTER TABLE `prefix_talk_user` ADD INDEX ( `comment_count_new` );
DROP TABLE `prefix_country_user`;
DROP TABLE `prefix_country`;
DROP TABLE `prefix_city_user`;
DROP TABLE `prefix_city`;
INSERT INTO `prefix_user_field` (`type`, `name`, `title`, `pattern`) VALUES
('contact', 'phone', 'Телефон', ''),
('contact', 'mail', 'E-mail', '<a href="mailto:{*}" rel="nofollow">{*}</a>'),
('contact', 'skype', 'Skype', '<a href="skype:{*}" rel="nofollow">{*}</a>'),
('contact', 'icq', 'ICQ', '<a href="http://www.icq.com/people/about_me.php?uin={*}" rel="nofollow">{*}</a>'),
('contact', 'www', 'Сайт', '<a href="http://{*}" rel="nofollow">{*}</a>'),
('social', 'twitter', 'Twitter', '<a href="http://twitter.com/{*}/" rel="nofollow">{*}</a>'),
('social', 'facebook', 'Facebook', '<a href="http://facebook.com/{*}" rel="nofollow">{*}</a>'),
('social', 'vkontakte', 'ВКонтакте', '<a href="http://vk.com/{*}" rel="nofollow">{*}</a>'),
('social', 'odnoklassniki', 'Одноклассники', '<a href="http://www.odnoklassniki.ru/profile/{*}/" rel="nofollow">{*}</a>');
ALTER TABLE `prefix_favourite_tag` ADD INDEX ( `text` );
ALTER TABLE `prefix_vote` ADD `vote_ip` VARCHAR( 15 ) NOT NULL DEFAULT '',
ADD INDEX ( `vote_ip` );
ALTER TABLE `prefix_user` ADD `user_settings_timezone` VARCHAR( 6 ) NULL DEFAULT NULL AFTER `user_settings_notice_new_friend`;
CREATE TABLE IF NOT EXISTS `prefix_user_changemail` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) unsigned NOT NULL,
`date_add` datetime NOT NULL,
`date_used` datetime DEFAULT NULL,
`date_expired` datetime NOT NULL,
`mail_from` varchar(50) NOT NULL,
`mail_to` varchar(50) NOT NULL,
`code_from` varchar(32) NOT NULL,
`code_to` varchar(32) NOT NULL,
`confirm_from` tinyint(1) NOT NULL DEFAULT '0',
`confirm_to` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `code_from` (`code_from`),
KEY `code_to` (`code_to`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `prefix_user_changemail`
ADD CONSTRAINT `prefix_user_changemail_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `prefix_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

View file

@ -0,0 +1,33 @@
ALTER TABLE `prefix_user` ADD `user_settings_timezone` VARCHAR( 6 ) NULL DEFAULT NULL AFTER `user_settings_notice_new_friend`;
--
-- Структура таблицы `prefix_user_changemail`
--
CREATE TABLE IF NOT EXISTS `prefix_user_changemail` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) unsigned NOT NULL,
`date_add` datetime NOT NULL,
`date_used` datetime DEFAULT NULL,
`date_expired` datetime NOT NULL,
`mail_from` varchar(50) NOT NULL,
`mail_to` varchar(50) NOT NULL,
`code_from` varchar(32) NOT NULL,
`code_to` varchar(32) NOT NULL,
`confirm_from` tinyint(1) NOT NULL DEFAULT '0',
`confirm_to` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `code_from` (`code_from`),
KEY `code_to` (`code_to`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Ограничения внешнего ключа сохраненных таблиц
--
--
-- Ограничения внешнего ключа таблицы `prefix_user_changemail`
--
ALTER TABLE `prefix_user_changemail`
ADD CONSTRAINT `prefix_user_changemail_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `prefix_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

19561
install/geo_base.sql Normal file

File diff suppressed because it is too large Load diff

1923
install/index.php Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,123 @@
<?php
/*-------------------------------------------------------
*
* LiveStreet Engine Social Networking
* Copyright © 2008 Mzhelskiy Maxim
*
*--------------------------------------------------------
*
* Official site: www.livestreet.ru
* Contact e-mail: rus.engine@gmail.com
*
* GNU General Public License, version 2:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
---------------------------------------------------------
*/
/**
* English language file.
*
*/
return array(
"config_file_not_exists"=>"File %%path%% doesn't exist.",
"config_file_not_writable"=>"File %%path%% is not writable.",
'error_db_invalid'=>'Unable to choose or create Database',
'error_db_connection_invalid'=>"Can't connect to the Database. Please check configuration details.",
'error_db_saved'=>'Unable to save data into the DB.',
'error_db_no_data'=>"Unable to get data from the DB.",
'error_local_config_invalid'=>"Can't find local configuration file - /config/config.local.php.",
'site_name_invalid'=>'Chosen site name is not allowed.',
'site_description_invalid'=>'Chosen site description is not allowed.',
'site_keywords_invalid'=>'Chosen keywords are invalid.',
'skin_name_invalid'=>'Chosen skin name is invalid.',
'mail_sender_invalid'=>'Chosen invalid e-mail address.',
'mail_name_invalid'=>'Chosen invalid notification sender name.',
'lang_current_invalid'=>'Chosen language is not allowed.',
'lang_default_invalid'=>'Chosen default language is not allowed.',
'admin_login_invalid'=>'Invalid Administrator login.',
'admin_mail_invalid'=>'Invalid Administrator e-mail.',
'admin_password_invalid'=>'Invalid Administrator password.',
'admin_repassword_invalid'=>'Invalid password confirmation.',
'ok_db_created'=>'Database created successfully. Configuration saved into configuration file.',
'yes' => 'Yes',
'no' => 'No',
'next' => 'Next',
'prev' => 'Back',
'valid_mysql_server'=>'LiveStreet requires MySQL version 5 or higher.',
'install_title'=>'LiveStreet Installation',
'step'=>'Step',
'start_paragraph'=>'<p>Welcome to LiveStreet &copy; 1.0.1 installation. </p><p><b>Notice:</b> You have to rename file - /config/config.local.php.dist to /config/config.local.php and apply read-write (rw) permision to it.</p><p><b>Notice:</b> Make sure that the following directories have rw permissions: /tmp, /logs, /uploads, /templates/compiled, /templates/cache</p>',
'php_params'=>'General PHP Configuration',
'php_params_version'=>'PHP ver. 5.2.0 or higher',
'php_params_safe_mode'=>'Safe mode is on',
'php_params_utf8'=>'UTF8 support in PCRE',
'php_params_mbstring'=>'Mbstring support',
'php_params_simplexml'=>'SimpleXML support',
'local_config'=>'Local Configuration',
'local_config_file'=>'File /config/config.local.php exists and writable',
'local_temp_dir'=>'Directory /tmp exists and writable',
'local_logs_dir'=>'Directory /logs exists and writable',
'local_uploads_dir'=>'Directory /uploads exists and writable',
'local_templates_dir'=>'Directory /templates/compiled exists and writable',
'local_templates_cache_dir'=>'Directory /templates/cache exists and writable',
'local_plugins_dir'=>'Directory /plugins exists and writable',
'db_params'=>'Database (DB) configuration',
'db_params_host'=>'DB hostname',
'db_params_port'=>'DB port',
'db_params_port_notice'=>'It might be a good choice to leave it as 3306 :)',
'db_params_name'=>'DB name',
'db_params_create'=>'Create DB',
'db_params_convert'=>'Convert 0.5.1 DB to 1.0.1',
'db_params_convert_from_10'=>'Convert 1.0 DB to 1.0.1',
'db_params_user'=>'Username',
'db_params_password'=>'Password',
'db_params_prefix'=>"Table's prefix",
'db_params_prefix_notice'=>'This prefix will be appended to all table names',
'db_params_engine'=>'Tables engine',
'db_params_engine_notice'=>'InnoDB is recommended',
'error_table_select'=>'Query error whilst getting data from %%table%%',
'error_database_converted_already'=>'DB structure suits v. 1.0.1 hence conversion aborted',
'admin_params'=>'Administrator Details Configuration',
'admin_params_login'=>'Login',
'admin_params_mail'=>'E-mail',
'admin_params_pass'=>'Password',
'admin_params_repass'=>'Confirm password',
'end_paragraph' => 'Congratulations! LiveStreet successfully installed.<br />To ensure that your installation is secure, please delete [Install] directory.<br /><br />You can continue configuration in extended mode.<br /><br /><a href="../">Go to the main page</a><br /><br />',
'extend_mode'=> 'Extended mode',
'view_params'=> 'HTML view configuration',
'view_params_name'=> 'Site name',
'view_params_description'=> 'Site description',
'view_params_keywords'=> 'Keywords',
'view_params_skin'=> 'Skin name',
'mail_params'=> 'E-mail notification parameters',
'mail_params_sender'=> 'Sent from E-mail address (for notifications)',
'mail_params_name'=> 'Sent from Name (ex. John Doe)',
'general_params'=> 'General Configuration',
'general_params_close'=> 'Use "closed mode" for your site',
'general_params_active'=> 'Use registration activation',
'general_params_invite'=> 'Use registration by invitation',
'language_params'=> 'Language settings',
'language_params_current'=> 'Current language',
'language_params_default'=> 'Default language',
'finish_paragraph' => 'Congratulations! LiveStreet successfully installed.<br />To ensure that your installation is secure, please delete [Install] directory.<br /><br /><a href="../">Then to go to the main page by clicking this link.</a>',
);

View file

@ -0,0 +1,123 @@
<?php
/*-------------------------------------------------------
*
* LiveStreet Engine Social Networking
* Copyright © 2008 Mzhelskiy Maxim
*
*--------------------------------------------------------
*
* Official site: www.livestreet.ru
* Contact e-mail: rus.engine@gmail.com
*
* GNU General Public License, version 2:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
---------------------------------------------------------
*/
/**
* Русский языковой файл.
* Содержит текстовки инсталлятора.
*/
return array(
"config_file_not_exists"=>"Файл %%path%% не существует.",
"config_file_not_writable"=>"Файл %%path%% недосупен для записи.",
'error_db_invalid'=>'Невозможно выбрать или создать базу данных',
'error_db_connection_invalid'=>'Не удалось подключиться к базе данных. Проверьте корректность введенных вами настроек.',
'error_db_saved'=>'Не удалось сохранить данные в базе.',
'error_db_no_data'=>"Не удалось получить данные из базы.",
'error_local_config_invalid'=>'Файл локальной конфигурации /config/config.local.php не найден.',
'site_name_invalid'=>'Указано недопустимое название сайта.',
'site_description_invalid'=>'Указано недопустимое описание сайта.',
'site_keywords_invalid'=>'Указано недопустимые ключевые слова.',
'skin_name_invalid'=>'Указано недопустимое имя шаблона.',
'mail_sender_invalid'=>'Указано недопустимый e-mail.',
'mail_name_invalid'=>'Указано недопустимое имя отправителя уведомлений.',
'lang_current_invalid'=>'Указан недопустимый язык.',
'lang_default_invalid'=>'Указан недопустимый язык по-умолчанию.',
'admin_login_invalid'=>'Логин администратора введен не верно.',
'admin_mail_invalid'=>'E-mail администратора введен не верно.',
'admin_password_invalid'=>'Пароль администратора введен не верно.',
'admin_repassword_invalid'=>'Подтверждение пароля не совпадает с самим паролем.',
'ok_db_created'=>'База данных успешно создана. Данные записаны в конфигурационный файл.',
'yes' => 'Да',
'no' => 'Нет',
'next' => 'Дальше',
'prev' => 'Назад',
'valid_mysql_server'=>'Для работы LiveStreet необходим сервер MySQL версии не ниже 5.',
'install_title'=>'Установка LiveStreet',
'step'=>'Шаг',
'start_paragraph'=>'<p>Добро пожаловать в инсталлятор LiveStreet &copy; 1.0.1. Ознакомьтесь с результатами и следуйте подсказкам.</p><p><b>Внимание.</b> Для успешной иснталяции вы должны переименовать файл /config/config.local.php.dist на /config/config.local.php и дать этому файлу права на запись.</p><p><b>Внимание.</b> Директории /tmp, /logs, /uploads, /templates/compiled, /templates/cache должны иметь права на запись.</p>',
'php_params'=>'Основные настройки PHP',
'php_params_version'=>'PHP версии не ниже 5.2.0',
'php_params_safe_mode'=>'Safe mode выключен',
'php_params_utf8'=>'Поддержка UTF8 в PCRE',
'php_params_mbstring'=>'Поддержка Mbstring',
'php_params_simplexml'=>'Поддержка SimpleXML',
'local_config'=>'Локальная конфигурация',
'local_config_file'=>'Файл /config/config.local.php существует и доступен для записи',
'local_temp_dir'=>'Директория /tmp существует и доступна для записи',
'local_logs_dir'=>'Директория /logs существует и доступна для записи',
'local_uploads_dir'=>'Директория /uploads существует и доступна для записи',
'local_templates_dir'=>'Директория /templates/compiled существует и доступна для записи',
'local_templates_cache_dir'=>'Директория /templates/cache существует и доступна для записи',
'local_plugins_dir'=>'Директория /plugins существует и доступна для записи',
'db_params'=>'Настройка базы данных',
'db_params_host'=>'Имя сервера БД',
'db_params_port'=>'Порт сервера БД',
'db_params_port_notice'=>'Скорее всего правильным решение будет оставить 3306 :)',
'db_params_name'=>'Название базы данных',
'db_params_create'=>'Создать базу данных',
'db_params_convert'=>'Конвертировать базу 0.5.1 в 1.0.1',
'db_params_convert_from_10'=>'Конвертировать базу 1.0 в 1.0.1',
'db_params_user'=>'Имя пользователя',
'db_params_password'=>'Пароль',
'db_params_prefix'=>'Префикс таблиц',
'db_params_prefix_notice'=>'Указанный префикс будет приставлен к названию всех таблиц',
'db_params_engine'=>'Tables engine',
'db_params_engine_notice'=>'Рекомендуется использовать InnoDB',
'error_table_select'=>'Ошибка запроса на выборку данных из таблицы %%table%%',
'error_database_converted_already'=>'Конвертация отменена, так как структура базы данных соответствует версии 1.0.1',
'admin_params'=>'Настройка данных администратора',
'admin_params_login'=>'Логин',
'admin_params_mail'=>'E-mail',
'admin_params_pass'=>'Пароль',
'admin_params_repass'=>'Еще раз',
'end_paragraph' => 'Примите поздравления! LiveStreet успешно установлена.<br />Для обеспечения безопасности работы системы, удалите директорию Install.<br /><br />Вы можете продолжить настройку в расширенном режиме.<br /><br /><a href="../">Перейти на главную страницу</a><br /><br />',
'extend_mode'=> 'Расширенный режим',
'view_params'=> 'Настройки HTML вида',
'view_params_name'=> 'Название сайта',
'view_params_description'=> 'Описание сайта',
'view_params_keywords'=> 'Ключевые слова',
'view_params_skin'=> 'Название шаблона',
'mail_params'=> 'Настройки почтовых уведомлений',
'mail_params_sender'=> 'E-mail с которого отправляются уведомления',
'mail_params_name'=> 'Имя от которого отправляются уведомления',
'general_params'=> 'Общие настройки',
'general_params_close'=> 'Использовать закрытый режим работы сайта',
'general_params_active'=> 'Использовать активацию при регистрации',
'general_params_invite'=> 'Использовать режим регистрации по приглашению',
'language_params'=> 'Языковые настройки',
'language_params_current'=> 'Текущий язык',
'language_params_default'=> 'Язык, который будет использоваться по умолчанию',
'finish_paragraph' => 'Примите поздравления! LiveStreet успешно установлена.<br />Для обеспечения безопасности работы системы, удалите директорию Install.<br /><br /><a href="../">Перейти на главную страницу</a>',
);

View file

@ -1,2 +1,32 @@
ALTER TABLE `prefix_subscribe` ADD `user_id` INT( 11 ) UNSIGNED NULL DEFAULT NULL AFTER `target_id` ,
ADD INDEX ( `user_id` ) ;
ADD INDEX ( `user_id` ) ;
CREATE TABLE IF NOT EXISTS `prefix_blog_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pid` int(11) DEFAULT NULL,
`title` varchar(200) NOT NULL,
`url` varchar(100) NOT NULL,
`url_full` varchar(200) NOT NULL,
`sort` int(11) NOT NULL DEFAULT '0',
`count_blogs` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `pid` (`pid`),
KEY `count_blogs` (`count_blogs`),
KEY `title` (`title`),
KEY `url` (`url`),
KEY `url_full` (`url_full`),
KEY `sort` (`sort`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `prefix_blog_category`
ADD CONSTRAINT `prefix_blog_category_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `prefix_blog_category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `prefix_blog` ADD `category_id` INT NULL DEFAULT NULL AFTER `user_owner_id` ,
ADD INDEX ( `category_id` ) ;
ALTER TABLE `prefix_blog` ADD FOREIGN KEY ( `category_id` ) REFERENCES `prefix_blog_category` (
`id`
) ON DELETE CASCADE ON UPDATE CASCADE ;

165
install/sphinx.conf Normal file
View file

@ -0,0 +1,165 @@
## Конфигурационный файл Sphinx-а для индексации LiveStreet
#######################
#
# Описываем индексы
#
#######################
# Источник-родитель для всех остальных источников. Здесь указываются параметры доступа
# к базе данных сайта
source lsParentSource
{
type = mysql
sql_host = localhost
sql_user = user
sql_pass = pass
sql_db = livestreet
sql_port = 3306
# Для ускорения работы прописываем путь до MySQL-го UNIX-сокета (чтобы
# операции с БД происходили не через TCP/IP стек сервера)
sql_sock = /var/run/mysqld/mysqld.sock
mysql_connect_flags = 32 # 32- включение сжатие при обмене данными с БД
# Включам нужную кодировку соединения и выключаем кеш запросов
sql_query_pre = SET NAMES utf8
sql_query_pre = SET SESSION query_cache_type=OFF
}
# Источник топиков
source topicsSource : lsParentSource
{
# запрос на получения данных топиков
sql_query = \
SELECT t_fast.topic_id, t_fast.topic_title, UNIX_TIMESTAMP(t_fast.topic_date_add) as topic_date_add, \
tc.topic_text, t_fast.topic_publish \
FROM prefix_topic as t_fast, prefix_topic_content AS tc \
WHERE t_fast.topic_id=tc.topic_id AND t_fast.topic_id>=$start AND t_fast.topic_id<=$end
# запрос для дробления получения топиков на неколько итераций
sql_query_range = SELECT MIN(topic_id),MAX(topic_id) FROM prefix_topic
# сколько получать объектов за итерацию
sql_range_step = 1000
# Указываем булевый атрибут критерия "топик опубликован". Для возможности указания этого критерия при поиске
sql_attr_uint = topic_publish
# Атрибут даты добавления, типа "время"
sql_attr_timestamp = topic_date_add
# мульти-аттрибут "теги топика"
sql_attr_multi = uint tag from query; SELECT topic_id, topic_tag_id FROM prefix_topic_tag
sql_ranged_throttle = 0
}
# Источник комментариев
source commentsSource : lsParentSource
{
sql_query = \
SELECT comment_id, comment_text, UNIX_TIMESTAMP(comment_date) as comment_date, comment_delete \
FROM prefix_comment \
WHERE target_type='topic' AND comment_id>=$start AND comment_id<=$end AND comment_publish=1
sql_query_range = SELECT MIN(comment_id),MAX(comment_id) FROM prefix_comment
sql_range_step = 5000
sql_attr_uint = comment_delete
sql_attr_timestamp = comment_date
}
#######################
#
# Описываем индексы
#
#######################
index topicsIndex
{
# Источник, который будет хранить данный индекса
source = topicsSource
path = /var/lib/sphinx/topicIndex
# Тип хранения аттрибутов
docinfo = extern
mlock = 0
# Используемые морфологические движки
morphology = stem_enru
# Кодировака данных из источника
charset_type = utf-8
# Из данных источника HTML-код нужно вырезать
html_strip = 1
html_remove_elements = style, script, code
}
# Индекс комментариев
index commentsIndex
{
source = commentsSource
path = /var/lib/sphinx/commentsIndex
docinfo = extern
mlock = 0
morphology = stem_enru
charset_type = utf-8
# Из данных источника HTML-код нужно вырезать
html_strip = 1
html_remove_elements = style, script, code
}
#######################
#
# Настройки индексатора
#
#######################
indexer
{
# Лимит памяти, который может использавать демон-индексатор
mem_limit = 128M
}
#######################
#
# Настройка демона-поисковика
#
#######################
searchd
{
# Адрес, на котором будет прослушиваться порт
address = 127.0.0.1
# Ну и собственно номер порта демона searchd
port = 3312
# Лог-файл демона
log = /var/log/sphinx/searchd.log
# Лог поисковых запросов. Если закомментировать,то логировать поисковые строки не будет
query_log = /var/log/sphinx/query.log
# Время в секундах, которое ждет демон при обмене данными с клиентом. По исчерпании происходит разрыв коннекта
read_timeout = 5
# Максимальное количество одновременно-обрабатываемых запросов. 0 означает дофига, а точнее без ограничения
max_children = 100
# Файл, в который сохраняется PID-процесса при запуске
pid_file = /var/log/sphinx/searchd.pid
}

1031
install/sql.sql Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,34 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ru" xml:lang="ru">
<head>
<title>___LANG_INSTALL_TITLE___</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="templates/styles/style.css?v=1" />
</head>
<body>
<div id="container">
<div id="header">
<h1>___LANG_INSTALL_TITLE___ ___INSTALL_VERSION___ <span>___LANG_STEP___ ___INSTALL_STEP_NUMBER___ / ___INSTALL_STEP_COUNT___</span></h1>
<div class="lang"><a href="?lang=russian">RUS</a> | <a href="?lang=english">ENG</a></div>
</div>
<div id="content">
___SYSTEM_MESSAGES___
<form action="___FORM_ACTION___" method="POST">
___CONTENT___
<br />
<input type="submit" class="button" name="install_step_prev" value="___LANG_PREV___" ___PREV_STEP_DISABLED___ style="display:___PREV_STEP_DISPLAY___;" />
<input type="submit" class="button button-primary" name="install_step_next" value="___LANG_NEXT___" ___NEXT_STEP_DISABLED___ style="display:___NEXT_STEP_DISPLAY___;" />
</form>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1 @@
<div class="system-messages-___MESSAGE_STYLE_CLASS___"><ul><li>___MESSAGE_CONTENT___</li></ul></div>

View file

@ -0,0 +1,15 @@
<h3>___LANG_ADMIN_PARAMS___</h3>
<input type="hidden" name="install_admin_params" value="1" />
<p><label for="install_admin_login">___LANG_ADMIN_PARAMS_LOGIN___:</label>
<input type="text" class="input-text input-width-300" name="install_admin_login" value="___INSTALL_ADMIN_LOGIN___" id="install_admin_login" /></p>
<p><label for="install_admin_mail">___LANG_ADMIN_PARAMS_MAIL___:</label>
<input type="text" class="input-text input-width-300" name="install_admin_mail" value="___INSTALL_ADMIN_MAIL___" id="install_admin_mail" /></p>
<p><label for="install_admin_pass">___LANG_ADMIN_PARAMS_PASS___:</label>
<input type="password" class="input-text input-width-300" name="install_admin_pass" autocomplete="off" value="" id="install_admin_pass" /></p>
<p><label for="install_admin_repass">___LANG_ADMIN_PARAMS_REPASS___:</label>
<input type="password" class="input-text input-width-300" name="install_admin_repass" autocomplete="off" value="" id="install_admin_repass" /></p>

View file

@ -0,0 +1,41 @@
<h3>___LANG_DB_PARAMS___</h3>
<input type="hidden" name="install_db_params" value="1" />
<p><label for="install_db_server">___LANG_DB_PARAMS_HOST___:</label>
<input type="text" class="input-text input-width-300" class="input-text" name="install_db_server" value="___INSTALL_DB_SERVER___" id="install_db_server" />
</p>
<p><label for="install_db_server">___LANG_DB_PARAMS_PORT___:</label>
<input type="text" class="input-text input-width-300" name="install_db_port" value="___INSTALL_DB_PORT___" id="install_db_port" />
<small class="note">___LANG_DB_PARAMS_PORT_NOTICE___</small></p>
<p><label for="install_db_name">___LANG_DB_PARAMS_NAME___:</label>
<input type="text" class="input-text input-width-300" name="install_db_name" value="___INSTALL_DB_NAME___" id="install_db_name" />
</p>
<p>
<label><input type="checkbox" class="input-checkbox" name="install_db_create" value="1" ___INSTALL_DB_CREATE_CHECK___ /> ___LANG_DB_PARAMS_CREATE___</label>
<label><input type="checkbox" class="input-checkbox" name="install_db_convert" value="1" ___INSTALL_DB_CONVERT_CHECK___ /> ___LANG_DB_PARAMS_CONVERT___</label>
<label><input type="checkbox" class="input-checkbox" name="install_db_convert_from_10" value="1" ___INSTALL_DB_CONVERT_FROM_10_CHECK___ /> ___LANG_DB_PARAMS_CONVERT_FROM_10___</label>
</p>
<p><label for="install_db_user">___LANG_DB_PARAMS_USER___:</label>
<input type="text" class="input-text input-width-300" name="install_db_user" value="___INSTALL_DB_USER___" id="install_db_user" />
</p>
<p><label for="install_db_password">___LANG_DB_PARAMS_PASSWORD___:</label>
<input type="text" class="input-text input-width-300" name="install_db_password" value="___INSTALL_DB_PASSWORD___" id="install_db_password" />
</p>
<p><label for="install_db_name">___LANG_DB_PARAMS_PREFIX___:</label>
<input type="text" class="input-text input-width-300" name="install_db_prefix" value="___INSTALL_DB_PREFIX___" id="install_db_prefix" />
<small class="note">___LANG_DB_PARAMS_PREFIX_NOTICE___</small></p>
<p><label for="install_db_engine">___LANG_DB_PARAMS_ENGINE___:</label>
<select name="install_db_engine" id="install_db_engine" value="___INSTALL_DB_ENGINE___" class="input-text input-width-300">
<option value="InnoDB" ___INSTALL_DB_ENGINE_INNODB___>InnoDB</option>
<option value="MyISAM" ___INSTALL_DB_ENGINE_MYISAM___>MyISAM</option>
</select>
<small class="note">___LANG_DB_PARAMS_ENGINE_NOTICE___</small></p>

View file

@ -0,0 +1,5 @@
<p>
___LANG_END_PARAGRAPH___
<input type="submit" class="button" name="install_step_extend" value="___LANG_EXTEND_MODE___" />
</p>

View file

@ -0,0 +1,54 @@
<input type="hidden" name="install_extend_params" value="1" />
<h3>___LANG_VIEW_PARAMS___</h3>
<p><label for="install_view_name">___LANG_VIEW_PARAMS_NAME___:</label>
<input type="text" class="input-text input-width-full" name="install_view_name" value="___INSTALL_VIEW_NAME___" id="install_view_name" /></p>
<p><label for="install_view_description">___LANG_VIEW_PARAMS_DESCRIPTION___:</label>
<input type="text" class="input-text input-width-full" name="install_view_description" value="___INSTALL_VIEW_DESCRIPTION___" id="install_view_description" /></p>
<p><label for="install_view_keywords">___LANG_VIEW_PARAMS_KEYWORDS___:</label>
<input type="text" class="input-text input-width-full" name="install_view_keywords" value="___INSTALL_VIEW_KEYWORDS___" id="install_view_keywords" /></p>
<p><label for="install_view_skin">___LANG_VIEW_PARAMS_SKIN___:</label>
<select name="install_view_skin" id="install_view_skin" value="___INSTALL_VIEW_SKIN___" class="input-width-200">
___INSTALL_VIEW_SKIN_OPTIONS___
</select>
</p>
<br />
<h3>___LANG_MAIL_PARAMS___</h3>
<p><label for="install_mail_sender">___LANG_MAIL_PARAMS_SENDER___:</label>
<input type="text" class="input-text input-width-300" name="install_mail_sender" value="___INSTALL_MAIL_SENDER___" id="install_mail_sender" /></p>
<p><label for="install_mail_name">___LANG_MAIL_PARAMS_NAME___:</label>
<input type="text" class="input-text input-width-300" name="install_mail_name" value="___INSTALL_MAIL_NAME___" id="install_mail_name" /></p>
<br />
<h3>___LANG_GENERAL_PARAMS___</h3>
<label><input type="checkbox" class="input-checkbox" name="install_general_close" value="1" ___INSTALL_GENERAL_CLOSE_CHECK___ /> ___LANG_GENERAL_PARAMS_CLOSE___</label>
<label><input type="checkbox" class="input-checkbox" name="install_general_active" value="1" ___INSTALL_GENERAL_ACTIVE_CHECK___ /> ___LANG_GENERAL_PARAMS_ACTIVE___</label>
<label><input type="checkbox" class="input-checkbox" name="install_general_invite" value="1" ___INSTALL_GENERAL_INVITE_CHECK___ /> ___LANG_GENERAL_PARAMS_INVITE___</label>
<br />
<br />
<h3>___LANG_LANGUAGE_PARAMS___</h3>
<p><label for="install_lang_current">___LANG_LANGUAGE_PARAMS_CURRENT___:</label>
<select name="install_lang_current" id="install_lang_current" value="___INSTALL_LANG_CURRENT___" class="input-width-200">
___INSTALL_LANG_OPTIONS___
</select>
</p>
<p><label for="install_lang_default">___LANG_LANGUAGE_PARAMS_DEFAULT___:</label>
<select name="install_lang_default" id="install_lang_default" value="___INSTALL_LANG_DEFAULT___" class="input-width-200">
___INSTALL_LANG_DEFAULT_OPTIONS___
</select>
</p>

View file

@ -0,0 +1,3 @@
<p>
___LANG_FINISH_PARAGRAPH___
</p>

View file

@ -0,0 +1,48 @@
___LANG_START_PARAGRAPH___
<input type="hidden" name="install_env_params" value="1" />
<h3>___LANG_PHP_PARAMS___</h3>
<table class="table">
<tr>
<td>___LANG_PHP_PARAMS_VERSION___</td><td class="result">___VALIDATE_PHP_VERSION___</td>
</tr>
<tr>
<td>___LANG_PHP_PARAMS_SAFE_MODE___</td><td class="result">___VALIDATE_SAFE_MODE___</td>
</tr>
<tr>
<td>___LANG_PHP_PARAMS_UTF8___</td><td class="result">___VALIDATE_UTF8___</td>
</tr>
<tr>
<td>___LANG_PHP_PARAMS_MBSTRING___</td><td class="result">___VALIDATE_MBSTRING___</td>
</tr>
<tr>
<td>___LANG_PHP_PARAMS_SIMPLEXML___</td><td class="result">___VALIDATE_SIMPLEXML___</td>
</tr>
</table>
<br />
<h3>___LANG_LOCAL_CONFIG___</h3>
<table class="table">
<tr>
<td>___LANG_LOCAL_CONFIG_FILE___</td><td class="result">___VALIDATE_LOCAL_CONFIG___</td>
</tr>
<tr>
<td>___LANG_LOCAL_TEMP_DIR___</td><td class="result">___VALIDATE_LOCAL_TEMP___</td>
</tr>
<tr>
<td>___LANG_LOCAL_LOGS_DIR___</td><td class="result">___VALIDATE_LOCAL_LOGS___</td>
</tr>
<tr>
<td>___LANG_LOCAL_UPLOADS_DIR___</td><td class="result">___VALIDATE_LOCAL_UPLOADS___</td>
</tr>
<tr>
<td>___LANG_LOCAL_TEMPLATES_DIR___</td><td class="result">___VALIDATE_LOCAL_TEMPLATES___</td>
</tr>
<tr>
<td>___LANG_LOCAL_TEMPLATES_CACHE_DIR___</td><td class="result">___VALIDATE_LOCAL_TEMPLATES_CACHE___</td>
</tr>
<tr>
<td>___LANG_LOCAL_PLUGINS_DIR___</td><td class="result">___VALIDATE_LOCAL_PLUGINS___</td>
</tr>
</table>

View file

@ -0,0 +1,185 @@
/* Reset
-------------------------------------------------------------------*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td { padding: 0; margin: 0; }
ul, ol { list-style: none; }
img { border: none; }
/* Body
-------------------------------------------------------------------*/
body { font: 13px/18px Arial, Helvetica, sans-serif; color: #333; background: #FBFCFC; }
h1, h2, h3, h4, h5, h6 { color: #333; }
h1 { font-size: 22px; line-height: 26px; margin-bottom: 0; }
h2 { font-size: 20px; line-height: 24px; margin-bottom: 10px; }
h3 { font-size: 18px; line-height: 22px; margin-bottom: 10px; }
h4 { font-size: 18px; line-height: 22px; margin-bottom: 5px; }
h5 { font-size: 18px; line-height: 22px; margin-bottom: 5px; }
h6 { font-size: 18px; line-height: 22px; margin-bottom: 5px; }
a { color: #275EC2; }
a:hover { text-decoration: none; }
.voting a { outline: none; }
h1 span { color: #bbb; margin-left: 20px; }
/* Grid
-------------------------------------------------------------------*/
#container { width: 700px; background: #fff; margin: 50px auto; box-shadow: 0 0 5px rgba(0,0,0,.1); border-radius: 10px; overflow: hidden; }
#header {
padding: 20px 30px;
background: rgb(255,255,255);
background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(250,250,250,1) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(250,250,250,1)));
background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(250,250,250,1) 100%);
background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(250,250,250,1) 100%);
background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(250,250,250,1) 100%);
background: linear-gradient(top, rgba(255,255,255,1) 0%,rgba(250,250,250,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fafafa',GradientType=0 );
border-bottom: 1px solid #eee;
border-radius: 10px 10px 0 0;
position: relative;
}
#header .lang { position: absolute; top: 23px; right: 30px; text-transform: lowercase; color: #ccc; }
#content { padding: 30px 30px; }
/* Forms
-------------------------------------------------------------------*/
.input-text {
width: 150px;
padding: 5px;
border: 1px solid #c9c9c9;
box-shadow: 0 2px 4px rgba(0,0,0,.07) inset;
border-radius: 3px;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.input-text:focus { border-color: #4D90FE; box-shadow: 0 2px 4px rgba(0,0,0,.07) inset, 0 0 3px #4D90FE; outline: none; }
.input-checkbox { position: relative; top: 1px; margin: 0 2px 0 1px; }
.input-width-full { width: 100%; }
.input-width-50 { width: 50px; }
.input-width-100 { width: 100px; }
.input-width-150 { width: 150px; }
.input-width-200 { width: 200px; }
.input-width-250 { width: 250px; }
.input-width-300 { width: 300px; }
.input-width-400 { width: 400px; }
.input-width-500 { width: 500px; }
textarea { -moz-box-sizing: border-box; box-sizing: border-box; }
select { padding: 4px; border: 1px solid #ddd; border-radius: 3px; }
fieldset { margin-bottom: 30px; padding-top: 20px; border-top: 1px solid #eaeaea; }
fieldset legend { color: #000; font-size: 18px; padding-right: 10px; }
form p { margin-bottom: 20px; }
form label { display: block; margin-bottom: 3px; }
form .icon-question-sign { cursor: help; }
.note { display: block; margin-top: 3px; font-size: 12px; line-height: 16px; color: #aaa; }
/* Notifications
-------------------------------------------------------------------*/
.system-messages-error { background: #f0c8c8; color: #b22626; padding: 10px 15px; margin-bottom: 15px; border-radius: 5px; }
.system-messages-notice { background: #dafad8; color: #4bb23b; padding: 10px 15px; margin-bottom: 15px; border-radius: 5px; }
/* Tables
-------------------------------------------------------------------*/
.table { width: 100%; margin-bottom: 15px; border-collapse: collapse; }
.table td { padding: 10px 10px; background: #fafafa; border-bottom: 2px solid #fff; }
.table tr:hover td { background: #bbffe1; }
.table td.result { width: 50px; text-align: center; }
/* Button
-------------------------------------------------------------------*/
.button {
display: inline-block;
padding: 3px 10px 6px;
*padding: 3px 10px 4px;
text-align: center;
border: 1px solid #dfe3e8;
border-radius: 5px;
font-size: 13px;
line-height: 16px;
color: #434343;
background: #fbfcfc;
background: -moz-linear-gradient(top, #fbfcfc 0%, #f0f2f5 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fbfcfc), color-stop(100%,#f0f2f5));
background: -webkit-linear-gradient(top, #fbfcfc 0%,#f0f2f5 100%);
background: -o-linear-gradient(top, #fbfcfc 0%,#f0f2f5 100%);
background: -ms-linear-gradient(top, #fbfcfc 0%,#f0f2f5 100%);
background: linear-gradient(top, #fbfcfc 0%,#f0f2f5 100%);
font-family: Verdana, sans-serif;
cursor: pointer;
text-decoration: none;
*margin-right: 5px;
}
.button:hover { text-decoration: none; background: #f0f2f5; }
.button:active {
-moz-box-shadow: 0 0 3px rgba(0, 0, 0, .3) inset;
-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, .3) inset;
box-shadow: 0 0 3px rgba(0, 0, 0, .3) inset;
}
.button.fl-r { *margin-right: 0; }
/* Button Primary */
.button.button-primary {
background: #66cfff;
background: -moz-linear-gradient(top, #66cfff 0%, #2abcfe 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#66cfff), color-stop(100%,#2abcfe));
background: -webkit-linear-gradient(top, #66cfff 0%,#2abcfe 100%);
background: -o-linear-gradient(top, #66cfff 0%,#2abcfe 100%);
background: -ms-linear-gradient(top, #66cfff 0%,#2abcfe 100%);
background: linear-gradient(top, #66cfff 0%,#2abcfe 100%);
border: 1px solid #27ace8;
color: #fff;
}
.button.button-primary:hover { background: #2abcfe; }

View file

@ -9,7 +9,7 @@
{/literal}
{else}
{include file='modals/modal_load_img.tpl' sToLoad='page_text'}
{include file='modals/modal.load_img.tpl' sToLoad='page_text'}
<script type="text/javascript">
jQuery(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,panel_image_promt,panel_user,panel_user_promt"});

View file

@ -1,228 +1,6 @@
{assign var="noSidebar" value=true}
{include file='header.tpl'}
<script>
jQuery(document).ready(function($) {
//ls.tooltip.add('.js-tooltip', { position: 'top'});
//$.fn.poshytip.defaults.className = 'tooltip'
});
</script>
<h2 class="page-header">Popover</h2>
<a href="#" data-type="popover-toggle" title="Popover header title" data-option-title="Popover header" data-option-content="Lorem ipsum dolor sit amet, consectetur adipisicing elit. Numquam ipsum beatae veritatis mollitia fugiat earum labore magnam a totam natus? Cumque non maxime doloremque atque rem ex quisquam. Excepturi pariatur.">Popover</a>
<br>
<br>
<br>
<h2 class="page-header">Tooltip</h2>
<a href="#" data-type="tooltip-toggle" class="js-tooltip" title="Lorem ipsum dolor sit amet, consectetur adipisicing elit. Numquam ipsum beatae veritatis mollitia fugiat earum labore magnam a totam natus? Cumque non maxime doloremque atque rem ex quisquam. Excepturi pariatur.">Top tooltip</a>
<br>
<br>
<br>
<h2 class="page-header">Dropdowns</h2>
<div class="dropdown dropdown-toggle" id="dd1"
data-type="dropdown-toggle"
data-option-target="js-dropdown-test"
data-option-activate-items="true"
data-option-change-text="true"><i class="icon-trash icon-white"></i> <span data-type="dropdown-text">Dropdown</span></div>
<ul class="dropdown-menu" id="js-dropdown-test" data-type="dropdown-target">
<li><a href="#" onclick="return false;">{$aLang.blog_menu_top_period_24h}</a></li>
<li><a href="#" onclick="return false;">{$aLang.blog_menu_top_period_7d}</a></li>
<li class="divider"></li>
<li><a href="#" onclick="return false;">За все время</a></li>
</ul>
<!-- Ajax dropdown -->
<div class="dropdown dropdown-toggle"
data-type="dropdown-toggle"
data-option-target="js-dropdown-ajax"
data-option-template="<div class='dropdown-menu' id='js-dropdown-ajax' data-type='dropdown-target'></div>"
data-param-i-blog-id="2"
data-option-url="http://lshead/ajax/infobox/info/blog/"><span data-type="dropdown-text">Test ajax</span></div>
<div class="dropdown-menu" id="js-dropdown-ajax" data-type="dropdown-target"></div>
<br />
<br />
<h2 class="page-header">Modals</h2>
<button class="button button-primary" data-type="modal-toggle" data-option-target="my-modal">Show modal</button>
<button class="button button-primary" data-type="modal-toggle" data-option-target="modal-long">Show looong modal</button>
<button class="button" onclick="$('#modal-custom').modal('show');">Modal with custom content</button>
<button class="button button-primary" data-type="modal-toggle" data-option-url="{cfg name='path.root.web'}">Show ajax modal</button>
<div class="modal js-modal-default" id="modal-custom" data-type="modal">
<div class="modal-header">
<h3>Modal header</h3>
</div>
<div class="modal-content">
asdfasdfasdf
<button class="button button-primary" data-type="modal-toggle" data-option-target="modal-long">Show ajax modal</button>
</div>
<div class="modal-footer">
<button class="button button-primary" data-type="modal-close">Close</button>
</div>
</div>
<div class="modal js-modal-default" id="modal-inner" data-type="modal">
<div class="modal-header">
<h3>Modal header</h3>
</div>
<div class="modal-content">
asdfasdfasdf
</div>
<div class="modal-footer">
<button class="button button-primary" data-type="modal-close">Close</button>
</div>
</div>
<div class="modal js-modal-default" id="my-modal" data-type="modal">
<div class="modal-header">
<h3>Modal header</h3>
</div>
<div class="modal-content">
<div>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deserunt beatae saepe veritatis iusto obcaecati neque? Odio modi tenetur corporis voluptas sed nesciunt quas dolorem cum! Officiis amet dicta dolorum cumque!</div>
<div>Dolore laboriosam sequi voluptatem sint labore tempore magni architecto consequuntur quibusdam adipisci itaque minus ad aspernatur rem repellat debitis nobis in totam cupiditate blanditiis commodi non illo quaerat obcaecati vitae.</div>
<div>Nobis fugit rem molestiae est corporis repudiandae laboriosam temporibus iste pariatur omnis itaque explicabo dolore mollitia possimus totam at illum tempora natus ipsam voluptatibus et vitae beatae architecto hic sint.</div>
<br>
<button class="button button-primary" data-type="modal-close">Close</button>
</div>
</div>
<div class="modal js-modal-default" id="modal-long" data-type="modal">
<div class="modal-header">
<h3>Modal header</h3>
</div>
<div class="modal-content">
<div>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deserunt beatae saepe veritatis iusto obcaecati neque? Odio modi tenetur corporis voluptas sed nesciunt quas dolorem cum! Officiis amet dicta dolorum cumque!</div>
<div>Dolore laboriosam sequi voluptatem sint labore tempore magni architecto consequuntur quibusdam adipisci itaque minus ad aspernatur rem repellat debitis nobis in totam cupiditate blanditiis commodi non illo quaerat obcaecati vitae.</div>
<div>Nobis fugit rem molestiae est corporis repudiandae laboriosam temporibus iste pariatur omnis itaque explicabo dolore mollitia possimus totam at illum tempora natus ipsam voluptatibus et vitae beatae architecto hic sint.</div>
<div>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloremque minima odit quibusdam eveniet repudiandae unde voluptatum tempore beatae sed! Veritatis nihil est quibusdam quasi quis animi optio magni nostrum consectetur.</div>
<div>Libero eos adipisci tempora itaque nam cum doloribus nostrum quisquam commodi neque! Tempore incidunt nesciunt id ipsam quibusdam sunt optio nostrum facere voluptatibus commodi atque ratione aperiam officiis facilis amet.</div>
<div>Eius tempora temporibus necessitatibus itaque animi reiciendis sint facilis quod mollitia quaerat voluptatum nostrum sunt cupiditate totam quo saepe quisquam velit perferendis minus neque. Ex aliquam tempore non vero quisquam!</div>
<div>Fuga at assumenda modi nobis iste quaerat quisquam culpa cum unde eaque voluptates recusandae maiores quam alias deleniti sed possimus nisi rem animi reprehenderit dolorem voluptatibus accusantium error praesentium vel!</div>
<div>Magni atque dolores vitae dolorum asperiores illo ipsa obcaecati accusantium nihil cupiditate qui eum tempora natus voluptatibus sed at eligendi? Nam debitis atque voluptate culpa a odit provident sit quod.</div>
<div>Magnam odit beatae reprehenderit voluptates libero in ut quos ratione veritatis explicabo eum earum corporis sapiente id molestias repellat nostrum quae cupiditate quam quidem maxime nisi pariatur dolorum accusamus animi.</div>
<div>Quia unde illo itaque quam numquam amet similique corporis. Excepturi corporis repellendus eaque beatae expedita in. Fugiat eos enim sunt accusantium laudantium nulla repudiandae eaque ex doloremque sint adipisci reiciendis!</div>
<div>Consectetur accusantium animi ab laudantium commodi consequuntur ducimus quas. Molestias sunt aperiam similique accusamus nobis quasi ut quia nostrum impedit in temporibus deleniti maiores consequuntur ratione neque sit quibusdam necessitatibus.</div>
<div>Repellendus eaque error nisi temporibus est repudiandae hic ex quaerat quis rem molestiae tenetur reiciendis quo praesentium saepe voluptas similique illum modi asperiores qui laudantium fugit rerum eum impedit deserunt!</div>
<div>Modi minima atque in quos porro repellat tempora doloremque optio iste at totam nulla sapiente rem ipsa mollitia ratione numquam? Saepe fugit eveniet officiis doloremque ducimus numquam nemo quos ab.</div>
<div>Quia unde illo itaque quam numquam amet similique corporis. Excepturi corporis repellendus eaque beatae expedita in. Fugiat eos enim sunt accusantium laudantium nulla repudiandae eaque ex doloremque sint adipisci reiciendis!</div>
<div>Consectetur accusantium animi ab laudantium commodi consequuntur ducimus quas. Molestias sunt aperiam similique accusamus nobis quasi ut quia nostrum impedit in temporibus deleniti maiores consequuntur ratione neque sit quibusdam necessitatibus.</div>
<div>Repellendus eaque error nisi temporibus est repudiandae hic ex quaerat quis rem molestiae tenetur reiciendis quo praesentium saepe voluptas similique illum modi asperiores qui laudantium fugit rerum eum impedit deserunt!</div>
<div>Modi minima atque in quos porro repellat tempora doloremque optio iste at totam nulla sapiente rem ipsa mollitia ratione numquam? Saepe fugit eveniet officiis doloremque ducimus numquam nemo quos ab.</div>
<br>
<button class="button button-primary" data-type="modal-close">Close</button>
</div>
</div>
<br />
<br />
<br />
<h2 class="page-header">Tabs</h2>
<ul class="nav nav-tabs" data-type="tabs">
<li data-type="tab" data-option-target="tabs-pages-1" class="active"><a href="#">Tab One</a></li>
<li data-type="tab" data-option-target="tabs-pages-2"><a href="#">Tab Two</a></li>
<li data-type="tab" data-option-target="tabs-pages-3"><a href="#">Tab Three</a></li>
<li>
<a href="#" class="dropdown-toggle"
data-type="dropdown-toggle"
data-option-target="js-dropdown-date2"
data-option-append-to-body="false"
data-option-align-x="right"
data-option-activate-items="true"
data-option-change-text="true">
<i class="icon-trash"></i> More tabs</a>
<ul class="dropdown-menu" id="js-dropdown-date2" data-type="dropdown-target">
<li data-type="tab" data-option-target="tabs-pages-4"><a href="#">{$aLang.blog_menu_top_period_24h}</a></li>
<li data-type="tab" data-option-target="tabs-pages-5"><a href="#">{$aLang.blog_menu_top_period_7d}</a></li>
</ul>
</li>
</ul>
<div data-type="tab-content">
<div id="tabs-pages-1" class="tab-pane" data-type="tab-pane" style="display: block">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Hic magnam error eligendi odio nemo itaque ea vero adipisci fugit exercitationem totam quasi asperiores dolores harum saepe laudantium provident. Voluptates tenetur.</div>
<div id="tabs-pages-2" class="tab-pane" data-type="tab-pane">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eaque iste vel sit necessitatibus voluptatum cumque quos ipsam ab eligendi blanditiis accusamus nostrum consectetur magnam harum provident dolorem minima iure ex.</div>
<div id="tabs-pages-3" class="tab-pane" data-type="tab-pane">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Pariatur esse odit sequi dolorum ab perspiciatis sint eveniet tenetur praesentium cumque deserunt quidem ipsa perferendis reprehenderit corporis vero explicabo ratione suscipit!</div>
<div id="tabs-pages-4" class="tab-pane" data-type="tab-pane">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maxime quam magnam quaerat molestiae provident error blanditiis sequi recusandae nisi adipisci. Voluptatibus optio assumenda in quaerat ab eaque placeat nesciunt animi.</div>
<div id="tabs-pages-5" class="tab-pane" data-type="tab-pane"><div>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Magni similique dolores ab exercitationem sint tempora eius magnam est dignissimos cumque ad id excepturi voluptatibus esse molestiae ut sit voluptates quod!</div>
<div>Iure quibusdam eum eveniet autem veritatis aliquid neque repellat labore obcaecati modi facilis eaque in officia magni officiis tempora itaque eos natus quod quidem quam dolorum nobis distinctio possimus quo.</div>
<div>Error iure ut nihil voluptate perspiciatis ipsam ex officia quis eveniet reprehenderit hic quod voluptas? Iusto dolore ad fugit ullam quos quis iure vitae quas vero nam repudiandae modi eaque.</div>
<div>Sed eos dolorem dolore pariatur perspiciatis atque aspernatur autem cumque perferendis quae ab quisquam quasi hic magnam animi tenetur incidunt impedit nesciunt consequuntur sequi minima ad rerum aperiam dolores veritatis.</div></div>
</div>
<br />
<br />
<h2 class="page-header">Tabs pills</h2>
<ul class="nav nav-pills" data-type="tabs">
<li data-type="tab" data-option-target="tab-pages-1"><a href="#">Tab One</a></li>
<li data-type="tab" data-option-target="tab-pages-2"><a href="#">Tab Two</a></li>
<li data-type="tab" data-option-target="tab-pages-3"><a href="#">Tab Three</a></li>
<li>
<a href="#" class="dropdown-toggle" data-type="dropdown-toggle" data-option-target="js-dropdown-date" data-option-append-to-body="false" data-option-change-text="true">
<span data-type="dropdown-text">Dropdown</span></a>
<ul class="dropdown-menu" id="js-dropdown-date">
<li data-type="tab" data-option-target="tab-pages-4"><a href="#">{$aLang.blog_menu_top_period_24h}</a></li>
<li data-type="tab" data-option-target="tab-pages-5"><a href="#">{$aLang.blog_menu_top_period_7d}</a></li>
</ul>
</li>
</ul>
<div data-type="tab-content">
<div id="tab-pages-1" class="tab-pane" data-type="tab-pane">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Hic magnam error eligendi odio nemo itaque ea vero adipisci fugit exercitationem totam quasi asperiores dolores harum saepe laudantium provident. Voluptates tenetur.</div>
<div id="tab-pages-2" class="tab-pane" data-type="tab-pane">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eaque iste vel sit necessitatibus voluptatum cumque quos ipsam ab eligendi blanditiis accusamus nostrum consectetur magnam harum provident dolorem minima iure ex.</div>
<div id="tab-pages-3" class="tab-pane" data-type="tab-pane">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Pariatur esse odit sequi dolorum ab perspiciatis sint eveniet tenetur praesentium cumque deserunt quidem ipsa perferendis reprehenderit corporis vero explicabo ratione suscipit!</div>
<div id="tab-pages-4" class="tab-pane" data-type="tab-pane">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maxime quam magnam quaerat molestiae provident error blanditiis sequi recusandae nisi adipisci. Voluptatibus optio assumenda in quaerat ab eaque placeat nesciunt animi.</div>
<div id="tab-pages-5" class="tab-pane" data-type="tab-pane"><div>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Magni similique dolores ab exercitationem sint tempora eius magnam est dignissimos cumque ad id excepturi voluptatibus esse molestiae ut sit voluptates quod!</div>
<div>Iure quibusdam eum eveniet autem veritatis aliquid neque repellat labore obcaecati modi facilis eaque in officia magni officiis tempora itaque eos natus quod quidem quam dolorum nobis distinctio possimus quo.</div>
<div>Error iure ut nihil voluptate perspiciatis ipsam ex officia quis eveniet reprehenderit hic quod voluptas? Iusto dolore ad fugit ullam quos quis iure vitae quas vero nam repudiandae modi eaque.</div>
<div>Sed eos dolorem dolore pariatur perspiciatis atque aspernatur autem cumque perferendis quae ab quisquam quasi hic magnam animi tenetur incidunt impedit nesciunt consequuntur sequi minima ad rerum aperiam dolores veritatis.</div></div>
</div>
<br />
<br />
<div class="topic">
<div class="topic-content text">
@ -238,4 +16,5 @@ jQuery(document).ready(function($) {
</div>
</div>
{include file='footer.tpl'}

View file

@ -21,7 +21,7 @@
-o-user-select: none;
user-select: none;
}
.dropdown.open { background: #0088cc; color: #fff; }
/* Dropdown toggle */
.dropdown-toggle {
@ -40,7 +40,6 @@
border: 4px solid rgba(255,255,255,0);
border-top-color: #fff;
}
.dropdown-toggle.open { background: #0088cc; color: #fff; }
.dropdown-toggle.open:after { border-top-color: #fff; }

View file

@ -83,9 +83,4 @@
.nav.nav-main { background: #222; background: -moz-linear-gradient(top, #333 0%, #222 100%); }
.nav.nav-main li a { color: #ddd; }
.nav.nav-main li a:hover { background: #333; }
.nav.nav-main li:first-child a { border-radius: 4px 0 0 4px; }
.nav.nav-main li:last-child a { border-radius: 0 4px 4px 0; }
.nav.nav-main li.active a { background: #3a3a3a; color: #bbb; -webkit-box-shadow: 0 0 7px rgba(0,0,0,.15) inset; box-shadow: 0 0 7px rgba(0,0,0,.15) inset; }
/* Dropdown support */
.nav.nav-main .dropdown-toggle.open:hover { background: #0088cc; }
.nav.nav-main li.active a { background: #3a3a3a; color: #bbb; -webkit-box-shadow: 0 0 7px rgba(0,0,0,.15) inset; box-shadow: 0 0 7px rgba(0,0,0,.15) inset; }

View file

@ -490,7 +490,7 @@ ls = (function ($) {
/**
* Загрузка изображения
*/
this.ajaxUploadImg = function(form, sToLoad) {
this.ajaxUploadImg = function(form) {
ls.hook.marker('ajaxUploadImgBefore');
ls.ajaxSubmit('upload/image/',form,function(data){
if (data.bStateError) {

View file

@ -0,0 +1,41 @@
var ls = ls || {};
/**
* JS функционал админки
*/
ls.admin = (function ($) {
this.addCategoryBlog = function(form) {
var url = aRouter.admin+'blogcategory/add/';
ls.ajaxSubmit(url, form, function(result) {
if (typeof(form)=='string') {
form=$('#'+form);
}
if (result.bStateError) {
ls.msg.error(result.sMsgTitle,result.sMsg);
} else {
$(form.parents('.modal-ajax')).jqmHide();
window.location.href=window.location.href;
}
}.bind(this));
};
this.editCategoryBlog = function(form) {
var url = aRouter.admin+'blogcategory/edit/';
ls.ajaxSubmit(url, form, function(result) {
if (typeof(form)=='string') {
form=$('#'+form);
}
if (result.bStateError) {
ls.msg.error(result.sMsgTitle,result.sMsg);
} else {
$(form.parents('.modal-ajax')).jqmHide();
window.location.href=window.location.href;
}
}.bind(this));
};
return this;
}).call(ls.admin || {},jQuery);

View file

@ -0,0 +1,47 @@
jQuery(document).ready(function($) {
$('html').removeClass('no-js');
// Определение браузера
if ($.browser.opera) {
$('body').addClass('opera opera' + parseInt($.browser.version));
}
if ($.browser.mozilla) {
$('body').addClass('mozilla mozilla' + parseInt($.browser.version));
}
if ($.browser.webkit) {
$('body').addClass('webkit webkit' + parseInt($.browser.version));
}
if ($.browser.msie) {
$('body').addClass('ie');
if (parseInt($.browser.version) > 8) {
$('body').addClass('ie' + parseInt($.browser.version));
}
}
// Фикс бага с z-index у встроенных видео
$("iframe").each(function(){
var ifr_source = $(this).attr('src');
if(ifr_source) {
var wmode = "wmode=opaque";
if (ifr_source.indexOf('?') != -1)
$(this).attr('src',ifr_source+'&'+wmode);
else
$(this).attr('src',ifr_source+'?'+wmode);
}
});
/**
* IE
* TODO: Check browser
*/
// эмуляция border-sizing в IE
var inputs = $('input.input-text, textarea');
ls.ie.bordersizing(inputs);
// эмуляция placeholder'ов в IE
inputs.placeholder();
});

View file

@ -115,6 +115,10 @@ return array(
'blog_delete' => 'Delete',
'blog_create' => 'Create new blog',
'blog_create_acl' => "You don't have enough power to create a blog",
'blog_create_category' => 'Category',
'blog_create_category_notice' => 'Blogs can assign a category, it will allow a more structured site',
'blog_create_category_error' => 'Could not find the category',
'blog_create_category_error_only_children' => 'You can select only the final category (without children)',
'blog_create_title' => "Blog's title",
'blog_create_title_notice' => "Blog's title should be meaningful.",
'blog_create_title_error' => "Blog's title should be at least 2 and upto 200 characters",
@ -762,6 +766,8 @@ return array(
'block_friends_check' => 'Check all',
'block_friends_uncheck' => 'Uncheck',
'block_friends_empty' => 'Empty friends list',
'block_category_blog' => 'Categories',
'block_category_blog_all' => 'All',
'site_history_back' => 'Go back',
'site_go_main' => 'Go to the main page',
/**
@ -925,10 +931,27 @@ return array(
'admin_header' => 'Admin panel',
'admin_list_plugins' => 'Manage plugins',
'admin_list_userfields' => 'Configuring custom fields',
'admin_list_blogcategory' => 'Settings categories of blogs',
'admin_list_restorecomment' => 'Rebuilding a tree comments',
'admin_list_recalcfavourite' => 'Recalculate counters of favorites',
'admin_list_recalcvote' => 'Recalculate counters of votes',
'admin_list_recalctopic' => 'Recalculate count topics of blogs',
/**
* Setting categories of blogs
*/
'admin_blogcategory_add' => 'Create new category',
'admin_blogcategory_items_title' => 'Title',
'admin_blogcategory_items_url' => 'URL',
'admin_blogcategory_items_action' => 'Action',
'admin_blogcategory_items_delete_confirm' => 'Really delete this category with all attachments?',
'admin_blogcategory_form_add' => 'Create category',
'admin_blogcategory_form_edit' => 'Update category',
'admin_blogcategory_form_field_parent' => 'Attach to',
'admin_blogcategory_form_field_title' => 'Title',
'admin_blogcategory_form_field_url' => 'URL',
'admin_blogcategory_form_field_sort' => 'Sort',
'admin_blogcategory_form_add_submit' => 'Add',
'admin_blogcategory_form_edit_submit' => 'Save',
/**
* Rating TOP
*/

View file

@ -115,6 +115,10 @@ return array(
'blog_delete' => 'Удалить',
'blog_create' => 'Создание нового блога',
'blog_create_acl' => 'Вы еще не достаточно окрепли, чтобы создавать свой блог',
'blog_create_category' => 'Категория бога',
'blog_create_category_notice' => 'Блогу можно назначить категорию, что позволяет более глубоко структурировать сайт',
'blog_create_category_error' => 'Не удалось найти категорию блога',
'blog_create_category_error_only_children' => 'Можно выбрать только конечную категорию (без дочерних)',
'blog_create_title' => 'Название блога',
'blog_create_title_notice' => 'Название блога должно быть наполнено смыслом, чтобы можно было понять, о чем будет блог.',
'blog_create_title_error' => 'Название блога должно быть от 2 до 200 символов',
@ -764,6 +768,8 @@ return array(
'block_friends_check' => 'Отметить всех',
'block_friends_uncheck' => 'Снять отметку',
'block_friends_empty' => 'Список ваших друзей пуст',
'block_category_blog' => 'Категории',
'block_category_blog_all' => 'Все',
'site_history_back' => 'Вернуться назад',
'site_go_main' => 'перейти на главную',
/**
@ -926,10 +932,27 @@ return array(
'admin_header' => 'Админка',
'admin_list_plugins' => 'Управление плагинами',
'admin_list_userfields' => 'Настройка пользовательских полей',
'admin_list_blogcategory' => 'Настройка категорий блогов',
'admin_list_restorecomment' => 'Перестроение дерева комментариев',
'admin_list_recalcfavourite' => 'Пересчитать счетчики избранных',
'admin_list_recalcvote' => 'Пересчитать счетчики голосований',
'admin_list_recalctopic' => 'Пересчитать количество топиков в блогах',
/**
* Управление категориями блогов
*/
'admin_blogcategory_add' => 'Добавить новую категорию',
'admin_blogcategory_items_title' => 'Название',
'admin_blogcategory_items_url' => 'УРЛ',
'admin_blogcategory_items_action' => 'Действие',
'admin_blogcategory_items_delete_confirm' => 'Действительно удалить категорию со всеми вложенными?',
'admin_blogcategory_form_add' => 'Добавление категории',
'admin_blogcategory_form_edit' => 'Редактирование категории',
'admin_blogcategory_form_field_parent' => 'Вложить в',
'admin_blogcategory_form_field_title' => 'Название',
'admin_blogcategory_form_field_url' => 'УРЛ',
'admin_blogcategory_form_field_sort' => 'Сортировка',
'admin_blogcategory_form_add_submit' => 'Добавить',
'admin_blogcategory_form_edit_submit' => 'Сохранить',
/**
* Рейтинг TOP
*/
@ -1045,7 +1068,7 @@ return array(
'validate_compare_must_less' => 'Поле %%field%% должно быть меньше чем %%compare_value%%',
'validate_compare_must_less_equal' => 'Поле %%field%% должно быть меньше или равно %%compare_value%%',
'validate_compare_invalid_operator' => 'У поля %%field%% неверный оператор сравнения %%operator%%',
'validate_regexp_not_valid' => 'Поля %%field%% неверное',
'validate_regexp_not_valid' => 'Поле %%field%% неверное',
'validate_regexp_invalid_pattern' => 'У поля %%field%% неверное регулярное выражение',
'validate_tags_count_more' => 'Поле %%field%% содержит слишком много тегов (максимально допустимо %%count%%)',
'validate_tags_empty' => 'Поле %%field%% не содержит тегов, либо содержит неверные теги (размер тега допустим от %%min%% до %%max%% символов)',

View file

@ -0,0 +1,43 @@
{assign var="noSidebar" value=true}
{include file='header.tpl'}
<h2 class="page-header"><a href="{router page='admin'}">{$aLang.admin_header}</a> <span>&raquo;</span> {$aLang.admin_list_blogcategory}</h2>
<button class="button button-primary" data-type="modal-toggle" data-option-url="{router page='admin'}blogcategory/modal-add/">{$aLang.admin_blogcategory_add}</button>
<br />
<br />
<table cellspacing="0" class="table">
<thead>
<tr>
<th width="180px">{$aLang.admin_blogcategory_items_title}</th>
<th align="center" >{$aLang.admin_blogcategory_items_url}</th>
<th align="center" width="80px">{$aLang.admin_blogcategory_items_action}</th>
</tr>
</thead>
<tbody>
{foreach from=$aCategories item=oCategory}
<tr>
<td>
<i class="icon-file" style="margin-left: {$oCategory->getLevel()*20}px;"></i>
<a href="{$oCategory->getUrlWeb()}" border="0">{$oCategory->getTitle()|escape:'html'}</a>
</td>
<td>
/{$oCategory->getUrlFull()}/
</td>
<td align="center">
<a href="#" data-type="modal-toggle" data-option-url="{router page='admin'}blogcategory/modal-edit/" data-param-id="{$oCategory->getId()}" class="icon-edit"></a>
<a href="{router page='admin'}blogcategory/delete/{$oCategory->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}" onclick="return confirm('«{$oCategory->getTitle()|escape:'html'}»: {$aLang.admin_blogcategory_items_delete_confirm}');" class="icon-remove"></a>
<a href="{router page='admin'}blogcategory/sort/{$oCategory->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}" class="icon-arrow-up"></a>
<a href="{router page='admin'}blogcategory/sort/{$oCategory->getId()}/down/?security_ls_key={$LIVESTREET_SECURITY_KEY}" class="icon-arrow-down"></a>
</td>
</tr>
{/foreach}
</tbody>
</table>
{include file='footer.tpl'}

View file

@ -0,0 +1,44 @@
{extends file='modals/modal_base.tpl'}
{block name='id'}modal-category-add{/block}
{block name='class'}js-modal-default{/block}
{block name='title'}
{if $oCategory}
{$aLang.admin_blogcategory_form_edit}
{else}
{$aLang.admin_blogcategory_form_add}
{/if}
{/block}
{block name='content'}
<form action="" method="post" id="form-category-blog-add" onsubmit="ls.admin.{if $oCategory}editCategoryBlog{else}addCategoryBlog{/if}('form-category-blog-add'); return false;">
<p><label for="pid">{$aLang.admin_blogcategory_form_field_parent}</label>
<select name="pid" id="pid" class="width-full">
<option value="0"></option>
{foreach from=$aCategories item=oCategoryItem}
<option {if $oCategory and $oCategory->getPid()==$oCategoryItem->getId()}selected="selected"{/if} style="margin-left: {$oCategoryItem->getLevel()*20}px;" value="{$oCategoryItem->getId()}">{$oCategoryItem->getTitle()|escape:'html'}</option>
{/foreach}
</select></p>
<p><label for="title">{$aLang.admin_blogcategory_form_field_title}</label>
<input type="text" name="title" id="title" class="width-full" value="{if $oCategory}{$oCategory->getTitle()}{/if}"></p>
<p><label for="url">{$aLang.admin_blogcategory_form_field_url}</label>
<input type="text" name="url" id="url" class="width-full" value="{if $oCategory}{$oCategory->getUrl()}{/if}"></p>
<label for="sort">{$aLang.admin_blogcategory_form_field_sort}</label>
<input type="text" name="sort" id="sort" class="width-full" value="{if $oCategory}{$oCategory->getSort()}{/if}">
{if $oCategory}
<input type="hidden" name="id" value="{$oCategory->getId()}">
{/if}
</form>
{/block}
{block name='footer'}
<button type="submit" name="submit" class="button button-primary" onclick="jQuery('#form-category-blog-add').submit()">
{if $oCategory}{$aLang.admin_blogcategory_form_edit_submit}{else}{$aLang.admin_blogcategory_form_add_submit}{/if}
</button>
{/block}

View file

@ -7,6 +7,7 @@
<ul>
<li><a href="{router page="admin"}plugins/">{$aLang.admin_list_plugins}</a></li>
<li><a href="{router page="admin"}userfields/">{$aLang.admin_list_userfields}</a></li>
<li><a href="{router page="admin"}blogcategory/">{$aLang.admin_list_blogcategory}</a></li>
<li><a href="{router page="admin"}restorecomment/?security_ls_key={$LIVESTREET_SECURITY_KEY}">{$aLang.admin_list_restorecomment}</a></li>
<li><a href="{router page="admin"}recalcfavourite/?security_ls_key={$LIVESTREET_SECURITY_KEY}">{$aLang.admin_list_recalcfavourite}</a></li>
<li><a href="{router page="admin"}recalcvote/?security_ls_key={$LIVESTREET_SECURITY_KEY}">{$aLang.admin_list_recalcvote}</a></li>

View file

@ -1,11 +1,11 @@
{if $sEvent=='add'}
{include file='header.tpl' menu='create'}
{include file='header.tpl' nav='create'}
{else}
{include file='header.tpl'}
{include file='menu.blog_edit.tpl'}
{include file='navs/nav.blog_edit.tpl'}
{/if}
{include file='editor.tpl' sImgToLoad='blog_description' sSettingsTinymce='ls.settings.getTinymceComment()' sSettingsMarkitup='ls.settings.getMarkitupComment()'}
{include file='editor.tpl' sSettingsTinymce='ls.settings.getTinymceComment()' sSettingsMarkitup='ls.settings.getMarkitupComment()'}
<script type="text/javascript">
jQuery(document).ready(function($){
@ -29,7 +29,19 @@
<p><label for="blog_url">{$aLang.blog_create_url}:</label>
<input type="text" id="blog_url" name="blog_url" value="{$_aRequest.blog_url}" class="input-text input-width-full" {if $_aRequest.blog_id and !$oUserCurrent->isAdministrator()}disabled{/if} />
<small class="note">{$aLang.blog_create_url_notice}</small></p>
{if Config::Get('module.blog.category_allow') and ($oUserCurrent->isAdministrator() or !Config::Get('module.blog.category_only_admin'))}
<p><label for="blog_category">{$aLang.blog_create_category}:</label>
<select name="blog_category" id="blog_category" class="input-width-200" >
{if Config::Get('module.blog.category_allow_empty')}
<option value="0"></option>
{/if}
{foreach from=$aBlogCategories item=oBlogCategory}
<option {if $_aRequest.blog_category==$oBlogCategory->getId()}selected{/if} value="{$oBlogCategory->getId()}" style="margin-left: {$oBlogCategory->getLevel()*20}px;">{$oBlogCategory->getTitle()|escape:'html'}</option>
{/foreach}
</select>
<small class="note" id="blog_category_note">{$aLang.blog_create_category_notice}</small></p>
{/if}
<p><label for="blog_type">{$aLang.blog_create_type}:</label>
<select name="blog_type" id="blog_type" class="input-width-200" onChange="ls.blog.loadInfoType(jQuery(this).val());">

View file

@ -1,5 +1,5 @@
{include file='header.tpl'}
{include file='menu.blog_edit.tpl'}
{include file='navs/nav.blog_edit.tpl'}

View file

@ -101,7 +101,7 @@
{hook run='blog_info' oBlog=$oBlog}
{include file='menu.blog_single.tpl'}
{include file='navs/nav.blog_single.tpl'}
{if $bCloseBlog}
{$aLang.blog_close_show}

View file

@ -1,4 +1,4 @@
{include file='header.tpl' menu='blog'}
{include file='header.tpl' nav='blog'}
{include file='topic_list.tpl'}
{include file='footer.tpl'}

View file

@ -1,4 +1,4 @@
{include file='header.tpl' menu='blog'}
{include file='header.tpl' nav='blog'}
{include file='topic.tpl'}
{include

View file

@ -9,7 +9,9 @@
<div id="blogs-list-search" style="display:none;"></div>
<div id="blogs-list-original">
{router page='blogs' assign=sBlogsRootPage}
{if !$sBlogsRootPage}
{router page='blogs' assign=sBlogsRootPage}
{/if}
{include file='blog_list.tpl' bBlogsUseOrder=true sBlogsRootPage=$sBlogsRootPage}
{include file='paging.tpl' aPaging=$aPaging}
</div>

View file

@ -1,3 +1,3 @@
{include file='header.tpl' menu='blog'}
{include file='header.tpl' nav='blog'}
{include file='topic_list.tpl'}
{include file='footer.tpl'}

View file

@ -1,5 +1,5 @@
{if $sEvent=='add'}
{include file='header.tpl' menu='create'}
{include file='header.tpl' nav='create'}
{else}
{include file='header.tpl'}
<h2 class="page-header">{$aLang.topic_link_edit}</h2>

View file

@ -1,4 +1,4 @@
{include file='header.tpl' menu='people'}
{include file='header.tpl' nav='people'}
<form action="" method="POST" id="form-users-search" onsubmit="return false;" class="search search-item">
<input id="search-user-login" type="text" placeholder="{$aLang.user_search_title_hint}" autocomplete="off" name="user_login" value="" class="input-text" onkeyup="ls.timer.run(ls.user.searchUsers,'users_search',['form-users-search'],1000);">

View file

@ -1,4 +1,4 @@
{include file='header.tpl' menu='people'}
{include file='header.tpl' nav='people'}
{include file='user_list.tpl' aUsersList=$aUsersRegister}

View file

@ -1,4 +1,4 @@
{include file='header.tpl' menu='people'}
{include file='header.tpl' nav='people'}
{include file='user_list.tpl' aUsersList=$aUsersLast}

View file

@ -1,3 +1,3 @@
{include file='header.tpl' menu='blog'}
{include file='header.tpl' nav='blog'}
{include file='topic_list.tpl'}
{include file='footer.tpl'}

View file

@ -1,5 +1,5 @@
{if $sEvent=='add'}
{include file='header.tpl' menu='create'}
{include file='header.tpl' nav='create'}
{else}
{include file='header.tpl'}
<h2 class="page-header">{$aLang.topic_photoset_edit}</h2>

View file

@ -4,7 +4,7 @@
{include file='actions/ActionProfile/profile_top.tpl'}
{include file='menu.profile_created.tpl'}
{include file='navs/nav.profile_created.tpl'}

View file

@ -4,7 +4,7 @@
{include file='actions/ActionProfile/profile_top.tpl'}
{include file='menu.profile_created.tpl'}
{include file='navs/nav.profile_created.tpl'}
{if $aNotes}

View file

@ -4,7 +4,7 @@
{include file='actions/ActionProfile/profile_top.tpl'}
{include file='menu.profile_created.tpl'}
{include file='navs/nav.profile_created.tpl'}

View file

@ -5,7 +5,7 @@
{include file='actions/ActionProfile/profile_top.tpl'}
{include file='menu.profile_favourite.tpl'}
{include file='navs/nav.profile_favourite.tpl'}
{include file='comment_list.tpl'}

View file

@ -5,7 +5,7 @@
{include file='actions/ActionProfile/profile_top.tpl'}
{include file='menu.profile_favourite.tpl'}
{include file='navs/nav.profile_favourite.tpl'}
{if $oUserCurrent and $oUserCurrent->getId()==$oUserProfile->getId()}
{$aBlockParams.user=$oUserProfile}

View file

@ -1,5 +1,5 @@
{if $sEvent=='add'}
{include file='header.tpl' menu='create'}
{include file='header.tpl' nav='create'}
{else}
{include file='header.tpl'}
<h2 class="page-header">{$aLang.topic_question_edit}</h2>

View file

@ -31,26 +31,26 @@
<form action="{router page='registration'}" method="post" id="registration-form">
{hook run='form_registration_begin'}
<p><label for="popup-registration-login">{$aLang.registration_login}</label>
<input type="text" name="login" id="popup-registration-login" value="{$_aRequest.login}" class="input-text input-width-300 js-ajax-validate" />
<p><label for="registration-login">{$aLang.registration_login}</label>
<input type="text" name="login" id="registration-login" value="{$_aRequest.login}" class="input-text input-width-300 js-ajax-validate" />
<i class="icon-ok-green validate-ok-field-login" style="display: none"></i>
<i class="icon-question-sign js-tip-help" title="{$aLang.registration_login_notice}"></i>
<small class="validate-error-hide validate-error-field-login"></small></p>
<p><label for="popup-registration-mail">{$aLang.registration_mail}</label>
<input type="text" name="mail" id="popup-registration-mail" value="{$_aRequest.mail}" class="input-text input-width-300 js-ajax-validate" />
<p><label for="registration-mail">{$aLang.registration_mail}</label>
<input type="text" name="mail" id="registration-mail" value="{$_aRequest.mail}" class="input-text input-width-300 js-ajax-validate" />
<i class="icon-ok-green validate-ok-field-mail" style="display: none"></i>
<i class="icon-question-sign js-tip-help" title="{$aLang.registration_mail_notice}"></i>
<small class="validate-error-hide validate-error-field-mail"></small></p>
<p><label for="popup-registration-user-password">{$aLang.registration_password}</label>
<input type="password" name="password" id="popup-registration-user-password" value="" class="input-text input-width-300 js-ajax-validate" />
<p><label for="registration-user-password">{$aLang.registration_password}</label>
<input type="password" name="password" id="registration-user-password" value="" class="input-text input-width-300 js-ajax-validate" />
<i class="icon-ok-green validate-ok-field-password" style="display: none"></i>
<i class="icon-question-sign js-tip-help" title="{$aLang.registration_password_notice}"></i>
<small class="validate-error-hide validate-error-field-password"></small></p>
<p><label for="popup-registration-user-password-confirm">{$aLang.registration_password_retry}</label>
<input type="password" value="" id="popup-registration-user-password-confirm" name="password_confirm" class="input-text input-width-300 js-ajax-validate" />
<p><label for="registration-user-password-confirm">{$aLang.registration_password_retry}</label>
<input type="password" value="" id="registration-user-password-confirm" name="password_confirm" class="input-text input-width-300 js-ajax-validate" />
<i class="icon-ok-green validate-ok-field-password_confirm" style="display: none"></i>
<small class="validate-error-hide validate-error-field-password_confirm"></small></p>

View file

@ -3,7 +3,7 @@
{include file='actions/ActionProfile/profile_top.tpl'}
{include file='menu.settings.tpl'}
{include file='navs/nav.settings.tpl'}
{hook run='settings_account_begin'}

View file

@ -3,7 +3,7 @@
{include file='actions/ActionProfile/profile_top.tpl'}
{include file='menu.settings.tpl'}
{include file='navs/nav.settings.tpl'}
<small class="note note-header input-width-400">{$aLang.settings_invite_notice} "{$aLang.settings_invite_submit}"</small>

View file

@ -3,7 +3,7 @@
{include file='header.tpl'}
{include file='modals/modal.profile_avatar_upload.tpl'}
{include file='actions/ActionProfile/profile_top.tpl'}
{include file='menu.settings.tpl'}
{include file='navs/nav.settings.tpl'}
<script type="text/javascript">

View file

@ -3,7 +3,7 @@
{include file='actions/ActionProfile/profile_top.tpl'}
{include file='menu.settings.tpl'}
{include file='navs/nav.settings.tpl'}
{hook run='settings_tuning_begin'}

View file

@ -1,5 +1,5 @@
{assign var="noSidebar" value=true}
{include file='header.tpl' menu="stream"}
{include file='header.tpl' nav="stream"}
{if count($aStreamEvents)}
<ul class="stream-list" id="stream-list">

View file

@ -1,4 +1,4 @@
{include file='header.tpl' menu="stream"}
{include file='header.tpl' nav="stream"}
{if count($aStreamEvents)}
<ul class="stream-list" id="stream-list">

View file

@ -2,7 +2,7 @@
{include file='header.tpl'}
{include file='actions/ActionProfile/profile_top.tpl'}
{include file='menu.talk.tpl'}
{include file='navs/nav.talk.tpl'}
{include file='actions/ActionTalk/friends.tpl'}
@ -13,7 +13,7 @@
<div class="content" id="text_preview"></div>
</div>
{include file='editor.tpl' sImgToLoad='talk_text' sSettingsTinymce='ls.settings.getTinymceComment()' sSettingsMarkitup='ls.settings.getMarkitupComment()'}
{include file='editor.tpl' sSettingsTinymce='ls.settings.getTinymceComment()' sSettingsMarkitup='ls.settings.getMarkitupComment()'}
<form action="" method="POST" enctype="multipart/form-data">
{hook run='form_add_talk_begin'}

View file

@ -2,7 +2,7 @@
{include file='header.tpl'}
{include file='actions/ActionProfile/profile_top.tpl'}
{include file='menu.talk.tpl'}
{include file='navs/nav.talk.tpl'}
<section class="block">
<header class="block-header">

View file

@ -2,7 +2,7 @@
{include file='header.tpl'}
{include file='actions/ActionProfile/profile_top.tpl'}
{include file='menu.talk.tpl'}
{include file='navs/nav.talk.tpl'}

View file

@ -2,7 +2,7 @@
{include file='header.tpl' noShowSystemMessage=false}
{include file='actions/ActionProfile/profile_top.tpl'}
{include file='menu.talk.tpl'}
{include file='navs/nav.talk.tpl'}
{if $aTalks}

View file

@ -2,7 +2,7 @@
{include file='header.tpl'}
{include file='actions/ActionProfile/profile_top.tpl'}
{include file='menu.talk.tpl'}
{include file='navs/nav.talk.tpl'}
{assign var="oUser" value=$oTalk->getUser()}

View file

@ -1,5 +1,5 @@
{if $sEvent=='add'}
{include file='header.tpl' menu='create'}
{include file='header.tpl' nav='create'}
{else}
{include file='header.tpl'}
<h2 class="page-header">{$aLang.topic_topic_edit}</h2>

View file

@ -1,3 +1,3 @@
{include file='header.tpl' menu='create'}
{include file='header.tpl' nav='create'}
{include file='topic_list.tpl'}
{include file='footer.tpl'}

View file

@ -1,4 +1,4 @@
{include file='header.tpl' menu='blog'}
{include file='header.tpl' nav='blog'}
{include file='topic_list.tpl'}

View file

@ -0,0 +1,21 @@
{if $aBlogCategories}
<section class="block block-type-blog-categories">
<header class="block-header">
<h3>{$aLang.block_category_blog}</h3>
{if $oUserCurrent and $oUserCurrent->isAdministrator()}
<a href="{router page="admin"}blogcategory/" title="{$aLang.admin_list_blogcategory}" class="icon-cog blog-categories-admin"></a>
{/if}
</header>
<div class="block-content">
<ul class="blog-category-list">
<li {if !$oBlogCategoryCurrent}class="active"{/if}><a href="{router page='blogs'}">{$aLang.block_category_blog_all} ({$iCountBlogsAll})</a></li>
{foreach from=$aBlogCategories item=oCategory}
<li {if $oBlogCategoryCurrent and $oBlogCategoryCurrent->getId()==$oCategory->getId()}class="active"{/if}><a style="margin-left: {$oCategory->getLevel()*20}px;" href="{$oCategory->getUrlWeb()}">{$oCategory->getTitle()|escape:'html'} ({$oCategory->getCountBlogs()})</a></li>
{/foreach}
</ul>
</div>
</section>
{/if}

View file

@ -54,7 +54,7 @@
{$sNoticeNotAllow}
{else}
{if $oUserCurrent}
{include file='editor.tpl' sImgToLoad='form_comment_text' sSettingsTinymce='ls.settings.getTinymceComment()' sSettingsMarkitup='ls.settings.getMarkitupComment()'}
{include file='editor.tpl' sSettingsTinymce='ls.settings.getTinymceComment()' sSettingsMarkitup='ls.settings.getMarkitupComment()'}
<h4 class="reply-header" id="comment_id_0">
<a href="#" class="link-dotted" onclick="ls.comments.toggleCommentForm(0); return false;">{$sNoticeCommentAdd}</a>

View file

@ -55,4 +55,11 @@
.block.block-type-foldable .block-content { display: none; background: #fafafa; }
.block.block-type-talk-search { margin-bottom: 10px; }
.block.block-type-talk-friends { margin-bottom: 10px; }
.block.block-type-talk-friends { margin-bottom: 10px; }
/* Block Type - Blog Categories */
.block.block-type-blog-categories .block-header .blog-categories-admin { position: absolute; top: 13px; right: 13px; }
.block.block-type-blog-categories li a { display: block; margin-bottom: 1px; padding: 5px 9px; }
.block.block-type-blog-categories li.active a { color: #fff; text-decoration: none; background: #5560D5; }

View file

@ -10,12 +10,9 @@
});
</script>
{else}
{if !$sImgToLoad}
{assign var="sImgToLoad" value="topic_text"}
{/if}
{include file='modals/modal.load_img.tpl' sToLoad=$sImgToLoad}
{include file='modals/modal.load_img.tpl'}
{if !$sSettingsTinymce}
{if !$sSettingsMarkitup}
{assign var="sSettingsMarkitup" value="ls.settings.getMarkitup()"}
{/if}
<script type="text/javascript">

View file

@ -1,247 +1,208 @@
jQuery(document).ready(function($){
// Хук начала инициализации javascript-составляющих шаблона
ls.hook.run('ls_template_init_start',[],window);
$('html').removeClass('no-js');
// Определение браузера
if ($.browser.opera) {
$('body').addClass('opera opera' + parseInt($.browser.version));
}
if ($.browser.mozilla) {
$('body').addClass('mozilla mozilla' + parseInt($.browser.version));
}
if ($.browser.webkit) {
$('body').addClass('webkit webkit' + parseInt($.browser.version));
}
if ($.browser.msie) {
$('body').addClass('ie');
if (parseInt($.browser.version) > 8) {
$('body').addClass('ie' + parseInt($.browser.version));
}
}
/**
* Popovers
*/
$(document).popover({ selector: '.js-popover-default' });
/**
* Modals
*/
$('.js-modal-default').modal();
/**
* Datepicker
*/
$('.date-picker').datepicker();
/**
* Dropdowns
*/
$('.js-dropdown-default').dropdown();
/**
* Tooltips
*/
$('.js-tooltip').tooltip();
$('.js-title-talk').tooltip({
alignX: 'left',
alignY: 'center'
});
$('.js-tip-help').tooltip({
alignX: 'right',
alignY: 'center'
});
if (ls.registry.get('block_stream_show_tip')) {
$(document).tooltip({
selector: '.js-title-comment, .js-title-topic',
alignX: 'left',
alignY: 'center',
delay: 1500
});
}
/**
* Autocomplete
*/
ls.autocomplete.add($(".autocomplete-tags-sep"), aRouter['ajax']+'autocompleter/tag/', true);
ls.autocomplete.add($(".autocomplete-tags"), aRouter['ajax']+'autocompleter/tag/', false);
ls.autocomplete.add($(".autocomplete-users-sep"), aRouter['ajax']+'autocompleter/user/', true);
ls.autocomplete.add($(".autocomplete-users"), aRouter['ajax']+'autocompleter/user/', false);
/**
* Scroll
*/
$(window)._scrollable();
/**
* Toolbar
*/
ls.toolbar.topic.init(); // Тул-бар топиков
ls.toolbar.up.init(); // Кнопка "UP"
/**
* Code highlight
*/
prettyPrint();
/**
* Blocks
*/
ls.blocks.init('stream',{group_items: true, group_min: 3});
ls.blocks.init('blogs');
ls.blocks.initSwitch('tags');
ls.blocks.initSwitch('upload-img');
ls.blocks.initSwitch('favourite-topic-tags');
ls.blocks.initSwitch('popup-login');
/**
* Misc
*/
// Фикс бага с z-index у встроенных видео
$("iframe").each(function(){
var ifr_source = $(this).attr('src');
if(ifr_source) {
var wmode = "wmode=opaque";
if (ifr_source.indexOf('?') != -1)
$(this).attr('src',ifr_source+'&'+wmode);
else
$(this).attr('src',ifr_source+'?'+wmode);
}
});
/**
* Auth modal
*/
$('.js-registration-form-show').click(function(){
if ($('[data-option-target=tab-pane-registration]').length) {
$('#modal-login').modal('option', 'onShow', function () { $('[data-option-target=tab-pane-registration]').tab('activate') });
$('#modal-login').modal('show');
} else {
window.location=aRouter.registration;
}
return false;
});
$('.js-login-form-show').click(function(){
if ($('[data-option-target=tab-pane-login]').length) {
$('#modal-login').modal('option', 'onShow', function () { $('[data-option-target=tab-pane-login]').tab('activate') });
$('#modal-login').modal('show');
} else {
window.location=aRouter.login;
}
return false;
});
// Поиск по тегам
$('.js-tag-search-form').submit(function(){
var val=$(this).find('.js-tag-search').val();
if (val) {
window.location = aRouter['tag']+encodeURIComponent(val)+'/';
}
return false;
});
// комментарии
ls.comments.options.folding = false;
ls.comments.init();
// избранное
ls.hook.add('ls_favourite_toggle_after',function(idTarget,objFavourite,type,params,result){
$('#fav_count_'+type+'_'+idTarget).text((result.iCount>0) ? result.iCount : '');
});
/****************
* TALK
*/
// Добавляем или удаляем друга из списка получателей
$('#friends input:checkbox').change(function(){
ls.talk.toggleRecipient($('#'+$(this).attr('id')+'_label').text(), $(this).attr('checked'));
});
// Добавляем всех друзей в список получателей
$('#friend_check_all').click(function(){
$('#friends input:checkbox').each(function(index, item){
ls.talk.toggleRecipient($('#'+$(item).attr('id')+'_label').text(), true);
$(item).attr('checked', true);
});
return false;
});
// Удаляем всех друзей из списка получателей
$('#friend_uncheck_all').click(function(){
$('#friends input:checkbox').each(function(index, item){
ls.talk.toggleRecipient($('#'+$(item).attr('id')+'_label').text(), false);
$(item).attr('checked', false);
});
return false;
});
// Удаляем пользователя из черного списка
$("#black_list_block").delegate("a.delete", "click", function(){
ls.talk.removeFromBlackList(this);
return false;
});
// Удаляем пользователя из переписки
$("#speaker_list_block").delegate("a.delete", "click", function(){
ls.talk.removeFromTalk(this, $('#talk_id').val());
return false;
});
// Help-tags link
$('.js-tags-help-link').click(function(){
var target=ls.registry.get('tags-help-target-id');
if (!target || !$('#'+target).length) {
return false;
}
target=$('#'+target);
if ($(this).data('insert')) {
var s=$(this).data('insert');
} else {
var s=$(this).text();
}
$.markItUp({target: target, replaceWith: s});
return false;
});
/**
* IE
* TODO: Check browser
*/
// эмуляция border-sizing в IE
var inputs = $('input.input-text, textarea');
ls.ie.bordersizing(inputs);
// эмуляция placeholder'ов в IE
inputs.placeholder();
// Хук конца инициализации javascript-составляющих шаблона
ls.hook.run('ls_template_init_end',[],window);
jQuery(document).ready(function($){
// Хук начала инициализации javascript-составляющих шаблона
ls.hook.run('ls_template_init_start',[],window);
/**
* Popovers
*/
$(document).popover({ selector: '.js-popover-default' });
/**
* Modals
*/
$('.js-modal-default').modal();
/**
* Datepicker
*/
$('.date-picker').datepicker();
/**
* Dropdowns
*/
$('.js-dropdown-default').dropdown();
/**
* Tooltips
*/
$('.js-tooltip').tooltip();
$('.js-title-talk').tooltip({
alignX: 'left',
alignY: 'center'
});
$('.js-tip-help').tooltip({
alignX: 'right',
alignY: 'center'
});
if (ls.registry.get('block_stream_show_tip')) {
$(document).tooltip({
selector: '.js-title-comment, .js-title-topic',
alignX: 'left',
alignY: 'center',
delay: 1500
});
}
/**
* Autocomplete
*/
ls.autocomplete.add($(".autocomplete-tags-sep"), aRouter['ajax']+'autocompleter/tag/', true);
ls.autocomplete.add($(".autocomplete-tags"), aRouter['ajax']+'autocompleter/tag/', false);
ls.autocomplete.add($(".autocomplete-users-sep"), aRouter['ajax']+'autocompleter/user/', true);
ls.autocomplete.add($(".autocomplete-users"), aRouter['ajax']+'autocompleter/user/', false);
/**
* Scroll
*/
$(window)._scrollable();
/**
* Toolbar
*/
ls.toolbar.topic.init(); // Тул-бар топиков
ls.toolbar.up.init(); // Кнопка "UP"
/**
* Code highlight
*/
prettyPrint();
/**
* Blocks
*/
ls.blocks.init('stream',{group_items: true, group_min: 3});
ls.blocks.init('blogs');
ls.blocks.initSwitch('tags');
ls.blocks.initSwitch('upload-img');
ls.blocks.initSwitch('favourite-topic-tags');
ls.blocks.initSwitch('popup-login');
/**
* Auth modal
*/
$('.js-registration-form-show').click(function(){
if ($('[data-option-target=tab-pane-registration]').length) {
$('#modal-login').modal('option', 'onShow', function () { $('[data-option-target=tab-pane-registration]').tab('activate') });
$('#modal-login').modal('show');
} else {
window.location=aRouter.registration;
}
return false;
});
$('.js-login-form-show').click(function(){
if ($('[data-option-target=tab-pane-login]').length) {
$('#modal-login').modal('option', 'onShow', function () { $('[data-option-target=tab-pane-login]').tab('activate') });
$('#modal-login').modal('show');
} else {
window.location=aRouter.login;
}
return false;
});
// Поиск по тегам
$('.js-tag-search-form').submit(function(){
var val=$(this).find('.js-tag-search').val();
if (val) {
window.location = aRouter['tag']+encodeURIComponent(val)+'/';
}
return false;
});
// комментарии
ls.comments.options.folding = false;
ls.comments.init();
// избранное
ls.hook.add('ls_favourite_toggle_after',function(idTarget,objFavourite,type,params,result){
$('#fav_count_'+type+'_'+idTarget).text((result.iCount>0) ? result.iCount : '');
});
/****************
* TALK
*/
// Добавляем или удаляем друга из списка получателей
$('#friends input:checkbox').change(function(){
ls.talk.toggleRecipient($('#'+$(this).attr('id')+'_label').text(), $(this).attr('checked'));
});
// Добавляем всех друзей в список получателей
$('#friend_check_all').click(function(){
$('#friends input:checkbox').each(function(index, item){
ls.talk.toggleRecipient($('#'+$(item).attr('id')+'_label').text(), true);
$(item).attr('checked', true);
});
return false;
});
// Удаляем всех друзей из списка получателей
$('#friend_uncheck_all').click(function(){
$('#friends input:checkbox').each(function(index, item){
ls.talk.toggleRecipient($('#'+$(item).attr('id')+'_label').text(), false);
$(item).attr('checked', false);
});
return false;
});
// Удаляем пользователя из черного списка
$("#black_list_block").delegate("a.delete", "click", function(){
ls.talk.removeFromBlackList(this);
return false;
});
// Удаляем пользователя из переписки
$("#speaker_list_block").delegate("a.delete", "click", function(){
ls.talk.removeFromTalk(this, $('#talk_id').val());
return false;
});
// Help-tags link
$('.js-tags-help-link').click(function(){
var target=ls.registry.get('tags-help-target-id');
if (!target || !$('#'+target).length) {
return false;
}
target=$('#'+target);
if ($(this).data('insert')) {
var s=$(this).data('insert');
} else {
var s=$(this).text();
}
$.markItUp({target: target, replaceWith: s});
return false;
});
/**
* IE
* TODO: Check browser
*/
// эмуляция border-sizing в IE
var inputs = $('input.input-text, textarea');
ls.ie.bordersizing(inputs);
// эмуляция placeholder'ов в IE
inputs.placeholder();
// Хук конца инициализации javascript-составляющих шаблона
ls.hook.run('ls_template_init_end',[],window);
});

View file

@ -42,7 +42,7 @@
</div>
<div class="modal-footer">
<button type="submit" class="button button-primary" onclick="ls.ajaxUploadImg('tab-upload-pc','{$sToLoad}');">{$aLang.uploadimg_submit}</button>
<button type="submit" class="button button-primary" onclick="ls.ajaxUploadImg('tab-upload-pc');">{$aLang.uploadimg_submit}</button>
<button type="button" class="button" data-type="modal-close">{$aLang.uploadimg_cancel}</button>
</div>
</form>
@ -71,7 +71,7 @@
<div class="modal-footer">
<button type="submit" class="button button-primary" onclick="ls.topic.insertImageToEditor(jQuery('#img_url').val(),jQuery('#form-image-url-align').val(),jQuery('#form-image-url-title').val());">{$aLang.uploadimg_link_submit_paste}</button>
<button type="submit" class="button button-primary" onclick="ls.ajaxUploadImg('tab-upload-link','{$sToLoad}');">{$aLang.uploadimg_link_submit_load}</button>
<button type="submit" class="button button-primary" onclick="ls.ajaxUploadImg('tab-upload-link');">{$aLang.uploadimg_link_submit_load}</button>
<button type="button" class="button" data-type="modal-close">{$aLang.uploadimg_cancel}</button>
</div>
</form>

View file

@ -1,11 +1,11 @@
{if $menu or $menu_content}
{if $nav or $nav_content}
<div class="nav-group">
{if $menu}
{if in_array($menu,$aMenuContainers)}{$aMenuFetch.$menu}{else}{include file="menu.$menu.tpl"}{/if}
{if $nav}
{if in_array($nav,$aMenuContainers)}{$aMenuFetch.$nav}{else}{include file="navs/nav.$nav.tpl"}{/if}
{/if}
{if $menu_content}
{include file="menu.$menu_content.content.tpl"}
{if $nav_content}
{include file="navs/nav.$nav_content.content.tpl"}
{/if}
</div>
{/if}

View file

@ -21,7 +21,7 @@ $config['view']['grid']['fluid_max_width'] = 1400;
$config['view']['grid']['fixed_width'] = 1000;
$config['head']['default']['js'] = Config::Get('head.default.js');
$config['head']['default']['js'][] = '___path.static.skin___/js/template.js';
$config['head']['default']['js'][] = '___path.static.skin___/js/init.js';
$config['head']['default']['css'] = array_merge(Config::Get('head.default.css'), array(
// Template styles

View file

@ -0,0 +1,43 @@
{assign var="noSidebar" value=true}
{include file='header.tpl'}
<h2 class="page-header"><a href="{router page='admin'}">{$aLang.admin_header}</a> <span>&raquo;</span> {$aLang.admin_list_blogcategory}</h2>
<button class="button button-primary" data-type="modal-toggle" data-option-url="{router page='admin'}blogcategory/modal-add/">{$aLang.admin_blogcategory_add}</button>
<br />
<br />
<table cellspacing="0" class="table">
<thead>
<tr>
<th width="180px">{$aLang.admin_blogcategory_items_title}</th>
<th align="center" >{$aLang.admin_blogcategory_items_url}</th>
<th align="center" width="80px">{$aLang.admin_blogcategory_items_action}</th>
</tr>
</thead>
<tbody>
{foreach from=$aCategories item=oCategory}
<tr>
<td>
<i class="icon-file" style="margin-left: {$oCategory->getLevel()*20}px;"></i>
<a href="{$oCategory->getUrlWeb()}" border="0">{$oCategory->getTitle()|escape:'html'}</a>
</td>
<td>
/{$oCategory->getUrlFull()}/
</td>
<td align="center">
<a href="#" data-type="modal-toggle" data-option-url="{router page='admin'}blogcategory/modal-edit/" data-param-id="{$oCategory->getId()}" class="icon-edit"></a>
<a href="{router page='admin'}blogcategory/delete/{$oCategory->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}" onclick="return confirm('«{$oCategory->getTitle()|escape:'html'}»: {$aLang.admin_blogcategory_items_delete_confirm}');" class="icon-remove"></a>
<a href="{router page='admin'}blogcategory/sort/{$oCategory->getId()}/?security_ls_key={$LIVESTREET_SECURITY_KEY}" class="icon-arrow-up"></a>
<a href="{router page='admin'}blogcategory/sort/{$oCategory->getId()}/down/?security_ls_key={$LIVESTREET_SECURITY_KEY}" class="icon-arrow-down"></a>
</td>
</tr>
{/foreach}
</tbody>
</table>
{include file='footer.tpl'}

View file

@ -0,0 +1,44 @@
{extends file='modals/modal_base.tpl'}
{block name='id'}modal-category-add{/block}
{block name='class'}js-modal-default{/block}
{block name='title'}
{if $oCategory}
{$aLang.admin_blogcategory_form_edit}
{else}
{$aLang.admin_blogcategory_form_add}
{/if}
{/block}
{block name='content'}
<form action="" method="post" id="form-category-blog-add" onsubmit="ls.admin.{if $oCategory}editCategoryBlog{else}addCategoryBlog{/if}('form-category-blog-add'); return false;">
<p><label for="pid">{$aLang.admin_blogcategory_form_field_parent}</label>
<select name="pid" id="pid" class="width-full">
<option value="0"></option>
{foreach from=$aCategories item=oCategoryItem}
<option {if $oCategory and $oCategory->getPid()==$oCategoryItem->getId()}selected="selected"{/if} style="margin-left: {$oCategoryItem->getLevel()*20}px;" value="{$oCategoryItem->getId()}">{$oCategoryItem->getTitle()|escape:'html'}</option>
{/foreach}
</select></p>
<p><label for="title">{$aLang.admin_blogcategory_form_field_title}</label>
<input type="text" name="title" id="title" class="width-full" value="{if $oCategory}{$oCategory->getTitle()}{/if}"></p>
<p><label for="url">{$aLang.admin_blogcategory_form_field_url}</label>
<input type="text" name="url" id="url" class="width-full" value="{if $oCategory}{$oCategory->getUrl()}{/if}"></p>
<label for="sort">{$aLang.admin_blogcategory_form_field_sort}</label>
<input type="text" name="sort" id="sort" class="width-full" value="{if $oCategory}{$oCategory->getSort()}{/if}">
{if $oCategory}
<input type="hidden" name="id" value="{$oCategory->getId()}">
{/if}
</form>
{/block}
{block name='footer'}
<button type="submit" name="submit" class="button button-primary" onclick="jQuery('#form-category-blog-add').submit()">
{if $oCategory}{$aLang.admin_blogcategory_form_edit_submit}{else}{$aLang.admin_blogcategory_form_add_submit}{/if}
</button>
{/block}

View file

@ -7,6 +7,7 @@
<ul>
<li><a href="{router page="admin"}plugins/">{$aLang.admin_list_plugins}</a></li>
<li><a href="{router page="admin"}userfields/">{$aLang.admin_list_userfields}</a></li>
<li><a href="{router page="admin"}blogcategory/">{$aLang.admin_list_blogcategory}</a></li>
<li><a href="{router page="admin"}restorecomment/?security_ls_key={$LIVESTREET_SECURITY_KEY}">{$aLang.admin_list_restorecomment}</a></li>
<li><a href="{router page="admin"}recalcfavourite/?security_ls_key={$LIVESTREET_SECURITY_KEY}">{$aLang.admin_list_recalcfavourite}</a></li>
<li><a href="{router page="admin"}recalcvote/?security_ls_key={$LIVESTREET_SECURITY_KEY}">{$aLang.admin_list_recalcvote}</a></li>

View file

@ -2,11 +2,11 @@
{include file='header.tpl' menu_content='create'}
{else}
{include file='header.tpl'}
{include file='menu.blog_edit.tpl'}
{include file='navs/nav.blog_edit.tpl'}
{/if}
{include file='editor.tpl' sImgToLoad='blog_description' sSettingsTinymce='ls.settings.getTinymceComment()' sSettingsMarkitup='ls.settings.getMarkitupComment()'}
{include file='editor.tpl' sSettingsTinymce='ls.settings.getTinymceComment()' sSettingsMarkitup='ls.settings.getMarkitupComment()'}
<script type="text/javascript">
jQuery(document).ready(function($){
@ -30,7 +30,19 @@
<p><label for="blog_url">{$aLang.blog_create_url}:</label>
<input type="text" id="blog_url" name="blog_url" value="{$_aRequest.blog_url}" class="input-text input-width-full" {if $_aRequest.blog_id and !$oUserCurrent->isAdministrator()}disabled{/if} />
<small class="note">{$aLang.blog_create_url_notice}</small></p>
{if Config::Get('module.blog.category_allow') and ($oUserCurrent->isAdministrator() or !Config::Get('module.blog.category_only_admin'))}
<p><label for="blog_category">{$aLang.blog_create_category}:</label>
<select name="blog_category" id="blog_category" class="input-width-200" >
{if Config::Get('module.blog.category_allow_empty')}
<option value="0"></option>
{/if}
{foreach from=$aBlogCategories item=oBlogCategory}
<option {if $_aRequest.blog_category==$oBlogCategory->getId()}selected{/if} value="{$oBlogCategory->getId()}" style="margin-left: {$oBlogCategory->getLevel()*20}px;">{$oBlogCategory->getTitle()|escape:'html'}</option>
{/foreach}
</select>
<small class="note" id="blog_category_note">{$aLang.blog_create_category_notice}</small></p>
{/if}
<p><label for="blog_type">{$aLang.blog_create_type}:</label>
<select name="blog_type" id="blog_type" class="input-width-200" onChange="ls.blog.loadInfoType(jQuery(this).val());">

View file

@ -1,5 +1,5 @@
{include file='header.tpl'}
{include file='menu.blog_edit.tpl'}
{include file='navs/nav.blog_edit.tpl'}

View file

@ -145,7 +145,7 @@
{hook run='blog_info' oBlog=$oBlog}
{include file='menu.blog_single.tpl'}
{include file='navs/nav.blog_single.tpl'}
{if $bCloseBlog}

View file

@ -1,3 +1,3 @@
{include file='header.tpl' menu='blog' menu_content='blog'}
{include file='header.tpl' nav='blog' menu_content='blog'}
{include file='topic_list.tpl'}
{include file='footer.tpl'}

Some files were not shown because too many files have changed in this diff Show more