1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-08 09:24:25 +03:00
Conflicts:
	templates/skin/developer-jquery/actions/ActionProfile/sidebar.tpl
	templates/skin/developer-jquery/css/common.css
This commit is contained in:
Denis Shakhov 2012-04-21 19:04:05 +07:00
commit e61fe859df
88 changed files with 427 additions and 496 deletions

View file

@ -723,7 +723,7 @@ class ActionAjax extends Action {
if ($aComments=$this->Comment_GetCommentsOnline('topic',Config::Get('block.stream.row'))) { if ($aComments=$this->Comment_GetCommentsOnline('topic',Config::Get('block.stream.row'))) {
$oViewer=$this->Viewer_GetLocalViewer(); $oViewer=$this->Viewer_GetLocalViewer();
$oViewer->Assign('aComments',$aComments); $oViewer->Assign('aComments',$aComments);
$sTextResult=$oViewer->Fetch("block.stream_comment.tpl"); $sTextResult=$oViewer->Fetch("blocks/block.stream_comment.tpl");
$this->Viewer_AssignAjax('sText',$sTextResult); $this->Viewer_AssignAjax('sText',$sTextResult);
} else { } else {
$this->Message_AddErrorSingle($this->Lang_Get('block_stream_comments_no'),$this->Lang_Get('attention')); $this->Message_AddErrorSingle($this->Lang_Get('block_stream_comments_no'),$this->Lang_Get('attention'));
@ -740,7 +740,7 @@ class ActionAjax extends Action {
if ($oTopics=$this->Topic_GetTopicsLast(Config::Get('block.stream.row'))) { if ($oTopics=$this->Topic_GetTopicsLast(Config::Get('block.stream.row'))) {
$oViewer=$this->Viewer_GetLocalViewer(); $oViewer=$this->Viewer_GetLocalViewer();
$oViewer->Assign('oTopics',$oTopics); $oViewer->Assign('oTopics',$oTopics);
$sTextResult=$oViewer->Fetch("block.stream_topic.tpl"); $sTextResult=$oViewer->Fetch("blocks/block.stream_topic.tpl");
$this->Viewer_AssignAjax('sText',$sTextResult); $this->Viewer_AssignAjax('sText',$sTextResult);
} else { } else {
$this->Message_AddErrorSingle($this->Lang_Get('block_stream_topics_no'),$this->Lang_Get('attention')); $this->Message_AddErrorSingle($this->Lang_Get('block_stream_topics_no'),$this->Lang_Get('attention'));
@ -758,7 +758,7 @@ class ActionAjax extends Action {
$aBlogs=$aResult['collection']; $aBlogs=$aResult['collection'];
$oViewer=$this->Viewer_GetLocalViewer(); $oViewer=$this->Viewer_GetLocalViewer();
$oViewer->Assign('aBlogs',$aBlogs); $oViewer->Assign('aBlogs',$aBlogs);
$sTextResult=$oViewer->Fetch("block.blogs_top.tpl"); $sTextResult=$oViewer->Fetch("blocks/block.blogs_top.tpl");
$this->Viewer_AssignAjax('sText',$sTextResult); $this->Viewer_AssignAjax('sText',$sTextResult);
} else { } else {
$this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error')); $this->Message_AddErrorSingle($this->Lang_Get('system_error'),$this->Lang_Get('error'));
@ -779,7 +779,7 @@ class ActionAjax extends Action {
if ($aBlogs=$this->Blog_GetBlogsRatingSelf($this->oUserCurrent->getId(),Config::Get('block.blogs.row'))) { if ($aBlogs=$this->Blog_GetBlogsRatingSelf($this->oUserCurrent->getId(),Config::Get('block.blogs.row'))) {
$oViewer=$this->Viewer_GetLocalViewer(); $oViewer=$this->Viewer_GetLocalViewer();
$oViewer->Assign('aBlogs',$aBlogs); $oViewer->Assign('aBlogs',$aBlogs);
$sTextResult=$oViewer->Fetch("block.blogs_top.tpl"); $sTextResult=$oViewer->Fetch("blocks/block.blogs_top.tpl");
$this->Viewer_AssignAjax('sText',$sTextResult); $this->Viewer_AssignAjax('sText',$sTextResult);
} else { } else {
$this->Message_AddErrorSingle($this->Lang_Get('block_blogs_self_error'),$this->Lang_Get('attention')); $this->Message_AddErrorSingle($this->Lang_Get('block_blogs_self_error'),$this->Lang_Get('attention'));
@ -800,7 +800,7 @@ class ActionAjax extends Action {
if ($aBlogs=$this->Blog_GetBlogsRatingJoin($this->oUserCurrent->getId(),Config::Get('block.blogs.row'))) { if ($aBlogs=$this->Blog_GetBlogsRatingJoin($this->oUserCurrent->getId(),Config::Get('block.blogs.row'))) {
$oViewer=$this->Viewer_GetLocalViewer(); $oViewer=$this->Viewer_GetLocalViewer();
$oViewer->Assign('aBlogs',$aBlogs); $oViewer->Assign('aBlogs',$aBlogs);
$sTextResult=$oViewer->Fetch("block.blogs_top.tpl"); $sTextResult=$oViewer->Fetch("blocks/block.blogs_top.tpl");
$this->Viewer_AssignAjax('sText',$sTextResult); $this->Viewer_AssignAjax('sText',$sTextResult);
} else { } else {
$this->Message_AddErrorSingle($this->Lang_Get('block_blogs_join_error'),$this->Lang_Get('attention')); $this->Message_AddErrorSingle($this->Lang_Get('block_blogs_join_error'),$this->Lang_Get('attention'));

View file

@ -1268,7 +1268,8 @@ class ActionBlog extends Action {
'sMsgTitle'=>$this->Lang_Get('attention'), 'sMsgTitle'=>$this->Lang_Get('attention'),
'sMsg'=>$this->Lang_Get('blog_user_invite_add_ok',array('login'=>htmlspecialchars($sUser))), 'sMsg'=>$this->Lang_Get('blog_user_invite_add_ok',array('login'=>htmlspecialchars($sUser))),
'sUserLogin'=>htmlspecialchars($sUser), 'sUserLogin'=>htmlspecialchars($sUser),
'sUserWebPath'=>$oUser->getUserWebPath() 'sUserWebPath'=>$oUser->getUserWebPath(),
'sUserAvatar48'=>$oUser->getProfileAvatarPath(48)
); );
$this->SendBlogInvite($oBlog,$oUser); $this->SendBlogInvite($oBlog,$oUser);
} else { } else {

View file

@ -26,6 +26,7 @@ class ActionPeople extends Action {
* @var unknown_type * @var unknown_type
*/ */
protected $sMenuHeadItemSelect='people'; protected $sMenuHeadItemSelect='people';
protected $sMenuItemSelect='all';
/** /**
* Инициализация * Инициализация
@ -162,6 +163,7 @@ class ActionPeople extends Action {
* *
*/ */
protected function EventOnline() { protected function EventOnline() {
$this->sMenuItemSelect='online';
/** /**
* Последние по визиту на сайт * Последние по визиту на сайт
*/ */
@ -177,6 +179,7 @@ class ActionPeople extends Action {
* *
*/ */
protected function EventNew() { protected function EventNew() {
$this->sMenuItemSelect='new';
/** /**
* Последние по регистрации * Последние по регистрации
*/ */
@ -268,6 +271,7 @@ class ActionPeople extends Action {
* Загружаем в шаблон необходимые переменные * Загружаем в шаблон необходимые переменные
*/ */
$this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect); $this->Viewer_Assign('sMenuHeadItemSelect',$this->sMenuHeadItemSelect);
$this->Viewer_Assign('sMenuItemSelect',$this->sMenuItemSelect);
} }
} }
?> ?>

View file

@ -27,6 +27,8 @@ class ActionProfile extends Action {
*/ */
protected $oUserProfile; protected $oUserProfile;
protected $sMenuSubItemSelect='';
protected $oUserCurrent; protected $oUserCurrent;
public function Init() { public function Init() {
@ -137,6 +139,7 @@ class ActionProfile extends Action {
if (!$this->CheckUserProfile()) { if (!$this->CheckUserProfile()) {
return parent::EventNotFound(); return parent::EventNotFound();
} }
$this->sMenuSubItemSelect='topics';
/** /**
* Передан ли номер страницы * Передан ли номер страницы
*/ */
@ -174,6 +177,7 @@ class ActionProfile extends Action {
if (!$this->CheckUserProfile()) { if (!$this->CheckUserProfile()) {
return parent::EventNotFound(); return parent::EventNotFound();
} }
$this->sMenuSubItemSelect='comments';
/** /**
* Передан ли номер страницы * Передан ли номер страницы
*/ */
@ -207,6 +211,7 @@ class ActionProfile extends Action {
if (!$this->CheckUserProfile()) { if (!$this->CheckUserProfile()) {
return parent::EventNotFound(); return parent::EventNotFound();
} }
$this->sMenuSubItemSelect='topics';
/** /**
* Передан ли номер страницы * Передан ли номер страницы
*/ */
@ -247,7 +252,7 @@ class ActionProfile extends Action {
if (!$this->oUserCurrent or $this->oUserProfile->getId()!=$this->oUserCurrent->getId()) { if (!$this->oUserCurrent or $this->oUserProfile->getId()!=$this->oUserCurrent->getId()) {
return parent::EventNotFound(); return parent::EventNotFound();
} }
$this->sMenuSubItemSelect='topics';
$sTag=$this->GetParamEventMatch(3,0); $sTag=$this->GetParamEventMatch(3,0);
/* /*
* Передан ли номер страницы * Передан ли номер страницы
@ -287,6 +292,7 @@ class ActionProfile extends Action {
if (!$this->CheckUserProfile()) { if (!$this->CheckUserProfile()) {
return parent::EventNotFound(); return parent::EventNotFound();
} }
$this->sMenuSubItemSelect='comments';
/** /**
* Передан ли номер страницы * Передан ли номер страницы
*/ */
@ -587,6 +593,7 @@ class ActionProfile extends Action {
if (!$this->CheckUserProfile()) { if (!$this->CheckUserProfile()) {
return parent::EventNotFound(); return parent::EventNotFound();
} }
$this->sMenuSubItemSelect='notes';
/** /**
* Заметки может читать только сам пользователь * Заметки может читать только сам пользователь
*/ */
@ -1157,6 +1164,7 @@ class ActionProfile extends Action {
} }
$this->Viewer_Assign('iCountFriendsUser',$this->User_GetCountUsersFriend($this->oUserProfile->getId())); $this->Viewer_Assign('iCountFriendsUser',$this->User_GetCountUsersFriend($this->oUserProfile->getId()));
$this->Viewer_Assign('sMenuSubItemSelect',$this->sMenuSubItemSelect);
$this->Viewer_Assign('USER_FRIEND_NULL',ModuleUser::USER_FRIEND_NULL); $this->Viewer_Assign('USER_FRIEND_NULL',ModuleUser::USER_FRIEND_NULL);
$this->Viewer_Assign('USER_FRIEND_OFFER',ModuleUser::USER_FRIEND_OFFER); $this->Viewer_Assign('USER_FRIEND_OFFER',ModuleUser::USER_FRIEND_OFFER);
$this->Viewer_Assign('USER_FRIEND_ACCEPT',ModuleUser::USER_FRIEND_ACCEPT); $this->Viewer_Assign('USER_FRIEND_ACCEPT',ModuleUser::USER_FRIEND_ACCEPT);

View file

@ -293,7 +293,8 @@ class ActionStream extends Action {
$this->Stream_subscribeUser($this->oUserCurrent->getId(), $oUser->getId()); $this->Stream_subscribeUser($this->oUserCurrent->getId(), $oUser->getId());
$this->Viewer_AssignAjax('uid', $oUser->getId()); $this->Viewer_AssignAjax('uid', $oUser->getId());
$this->Viewer_AssignAjax('user_login', $oUser->getLogin()); $this->Viewer_AssignAjax('user_login', $oUser->getLogin());
$this->Viewer_AssignAjax('user_web_path', $oUser->getuserWebPath()); $this->Viewer_AssignAjax('user_web_path', $oUser->getUserWebPath());
$this->Viewer_AssignAjax('user_avatar_48', $oUser->getProfileAvatarPath(48));
$this->Message_AddNotice($this->Lang_Get('userfeed_subscribes_updated'), $this->Lang_Get('attention')); $this->Message_AddNotice($this->Lang_Get('userfeed_subscribes_updated'), $this->Lang_Get('attention'));
} }

View file

@ -26,6 +26,8 @@ class ActionTalk extends Action {
* @var unknown_type * @var unknown_type
*/ */
protected $oUserCurrent=null; protected $oUserCurrent=null;
protected $sMenuSubItemSelect='';
/** /**
* Массив ID юзеров адресатов * Массив ID юзеров адресатов
* *
@ -126,6 +128,7 @@ class ActionTalk extends Action {
$this->Talk_MarkReadTalkUserByArray(array_keys($aTalksIdDel),$this->oUserCurrent->getId()); $this->Talk_MarkReadTalkUserByArray(array_keys($aTalksIdDel),$this->oUserCurrent->getId());
} }
} }
$this->sMenuSubItemSelect='inbox';
/** /**
* Количество сообщений на страницу * Количество сообщений на страницу
*/ */
@ -138,6 +141,7 @@ class ActionTalk extends Action {
* Если только новые, то добавляем условие в фильтр * Если только новые, то добавляем условие в фильтр
*/ */
if ($this->GetParam(0)=='new') { if ($this->GetParam(0)=='new') {
$this->sMenuSubItemSelect='new';
$aFilter['only_new']=true; $aFilter['only_new']=true;
$iPerPage=50; // новых отображаем только последние 50 писем, без постраничности $iPerPage=50; // новых отображаем только последние 50 писем, без постраничности
} }
@ -268,11 +272,13 @@ class ActionTalk extends Action {
} }
protected function EventBlacklist() { protected function EventBlacklist() {
$this->sMenuSubItemSelect='blacklist';
$aUsersBlacklist=$this->Talk_GetBlacklistByUserId($this->oUserCurrent->getId()); $aUsersBlacklist=$this->Talk_GetBlacklistByUserId($this->oUserCurrent->getId());
$this->Viewer_Assign('aUsersBlacklist',$aUsersBlacklist); $this->Viewer_Assign('aUsersBlacklist',$aUsersBlacklist);
} }
protected function EventFavourites() { protected function EventFavourites() {
$this->sMenuSubItemSelect='favourites';
/** /**
* Передан ли номер страницы * Передан ли номер страницы
*/ */
@ -301,6 +307,7 @@ class ActionTalk extends Action {
} }
protected function EventAdd() { protected function EventAdd() {
$this->sMenuSubItemSelect='add';
$this->Viewer_AddHtmlTitle($this->Lang_Get('talk_menu_inbox_create')); $this->Viewer_AddHtmlTitle($this->Lang_Get('talk_menu_inbox_create'));
/** /**
@ -340,6 +347,7 @@ class ActionTalk extends Action {
protected function EventRead() { protected function EventRead() {
$this->sMenuSubItemSelect='read';
/** /**
* Получаем номер сообщения из УРЛ и проверяем существует ли оно * Получаем номер сообщения из УРЛ и проверяем существует ли оно
*/ */
@ -697,7 +705,9 @@ class ActionTalk extends Action {
'sMsgTitle'=>$this->Lang_Get('attention'), 'sMsgTitle'=>$this->Lang_Get('attention'),
'sMsg'=>$this->Lang_Get('talk_blacklist_add_ok',array('login'=>htmlspecialchars($sUser))), 'sMsg'=>$this->Lang_Get('talk_blacklist_add_ok',array('login'=>htmlspecialchars($sUser))),
'sUserId'=>$oUser->getId(), 'sUserId'=>$oUser->getId(),
'sUserLogin'=>htmlspecialchars($sUser) 'sUserLogin'=>htmlspecialchars($sUser),
'sUserWebPath'=>$oUser->getUserWebPath(),
'sUserAvatar48'=>$oUser->getProfileAvatarPath(48)
); );
} else { } else {
$aResult[]=array( $aResult[]=array(
@ -952,7 +962,9 @@ class ActionTalk extends Action {
'sMsg'=>$this->Lang_Get('talk_speaker_add_ok',array('login',htmlspecialchars($sUser))), 'sMsg'=>$this->Lang_Get('talk_speaker_add_ok',array('login',htmlspecialchars($sUser))),
'sUserId'=>$oUser->getId(), 'sUserId'=>$oUser->getId(),
'sUserLogin'=>$oUser->getLogin(), 'sUserLogin'=>$oUser->getLogin(),
'sUserLink'=>$oUser->getUserWebPath() 'sUserLink'=>$oUser->getUserWebPath(),
'sUserWebPath'=>$oUser->getUserWebPath(),
'sUserAvatar48'=>$oUser->getProfileAvatarPath(48)
); );
$bState=true; $bState=true;
} else { } else {
@ -1008,7 +1020,9 @@ class ActionTalk extends Action {
'sMsg'=>$this->Lang_Get('talk_speaker_add_ok',array('login',htmlspecialchars($sUser))), 'sMsg'=>$this->Lang_Get('talk_speaker_add_ok',array('login',htmlspecialchars($sUser))),
'sUserId'=>$oUser->getId(), 'sUserId'=>$oUser->getId(),
'sUserLogin'=>$oUser->getLogin(), 'sUserLogin'=>$oUser->getLogin(),
'sUserLink'=>$oUser->getUserWebPath() 'sUserLink'=>$oUser->getUserWebPath(),
'sUserWebPath'=>$oUser->getUserWebPath(),
'sUserAvatar48'=>$oUser->getProfileAvatarPath(48)
); );
$bState=true; $bState=true;
} else { } else {
@ -1073,6 +1087,7 @@ class ActionTalk extends Action {
$this->Viewer_Assign('iCountFavourite',$iCountCommentFavourite+$iCountTopicFavourite); $this->Viewer_Assign('iCountFavourite',$iCountCommentFavourite+$iCountTopicFavourite);
$this->Viewer_Assign('iCountFriendsUser',$this->User_GetCountUsersFriend($this->oUserCurrent->getId())); $this->Viewer_Assign('iCountFriendsUser',$this->User_GetCountUsersFriend($this->oUserCurrent->getId()));
$this->Viewer_Assign('sMenuSubItemSelect',$this->sMenuSubItemSelect);
/** /**
* Передаем во вьевер константы состояний участников разговора * Передаем во вьевер константы состояний участников разговора
*/ */

View file

@ -198,7 +198,8 @@ class ActionUserfeed extends Action {
*/ */
$this->Viewer_AssignAjax('uid', $oUser->getId()); $this->Viewer_AssignAjax('uid', $oUser->getId());
$this->Viewer_AssignAjax('user_login', $oUser->getLogin()); $this->Viewer_AssignAjax('user_login', $oUser->getLogin());
$this->Viewer_AssignAjax('user_web_path', $oUser->getuserWebPath()); $this->Viewer_AssignAjax('user_web_path', $oUser->getUserWebPath());
$this->Viewer_AssignAjax('user_avatar_48', $oUser->getProfileAvatarPath(48));
$this->Viewer_AssignAjax('lang_error_msg', $this->Lang_Get('userfeed_subscribes_already_subscribed')); $this->Viewer_AssignAjax('lang_error_msg', $this->Lang_Get('userfeed_subscribes_already_subscribed'));
$this->Viewer_AssignAjax('lang_error_title', $this->Lang_Get('error')); $this->Viewer_AssignAjax('lang_error_title', $this->Lang_Get('error'));
$this->Message_AddNotice($this->Lang_Get('userfeed_subscribes_updated'), $this->Lang_Get('attention')); $this->Message_AddNotice($this->Lang_Get('userfeed_subscribes_updated'), $this->Lang_Get('attention'));

View file

@ -25,7 +25,7 @@ class BlockBlogs extends Block {
$aBlogs=$aResult['collection']; $aBlogs=$aResult['collection'];
$oViewer=$this->Viewer_GetLocalViewer(); $oViewer=$this->Viewer_GetLocalViewer();
$oViewer->Assign('aBlogs',$aBlogs); $oViewer->Assign('aBlogs',$aBlogs);
$sTextResult=$oViewer->Fetch("block.blogs_top.tpl"); $sTextResult=$oViewer->Fetch("blocks/block.blogs_top.tpl");
$this->Viewer_Assign('sBlogsTop',$sTextResult); $this->Viewer_Assign('sBlogsTop',$sTextResult);
} }
} }

View file

@ -24,7 +24,7 @@ class BlockStream extends Block {
if ($aComments=$this->Comment_GetCommentsOnline('topic',Config::Get('block.stream.row'))) { if ($aComments=$this->Comment_GetCommentsOnline('topic',Config::Get('block.stream.row'))) {
$oViewer=$this->Viewer_GetLocalViewer(); $oViewer=$this->Viewer_GetLocalViewer();
$oViewer->Assign('aComments',$aComments); $oViewer->Assign('aComments',$aComments);
$sTextResult=$oViewer->Fetch("block.stream_comment.tpl"); $sTextResult=$oViewer->Fetch("blocks/block.stream_comment.tpl");
$this->Viewer_Assign('sStreamComments',$sTextResult); $this->Viewer_Assign('sStreamComments',$sTextResult);
} }
} }

View file

@ -18,46 +18,46 @@
class ModuleBlog_EntityBlog extends Entity class ModuleBlog_EntityBlog extends Entity
{ {
public function getId() { public function getId() {
return $this->_aData['blog_id']; return $this->_getDataOne('blog_id');
} }
public function getOwnerId() { public function getOwnerId() {
return $this->_aData['user_owner_id']; return $this->_getDataOne('user_owner_id');
} }
public function getTitle() { public function getTitle() {
return $this->_aData['blog_title']; return $this->_getDataOne('blog_title');
} }
public function getDescription() { public function getDescription() {
return $this->_aData['blog_description']; return $this->_getDataOne('blog_description');
} }
public function getType() { public function getType() {
return $this->_aData['blog_type']; return $this->_getDataOne('blog_type');
} }
public function getDateAdd() { public function getDateAdd() {
return $this->_aData['blog_date_add']; return $this->_getDataOne('blog_date_add');
} }
public function getDateEdit() { public function getDateEdit() {
return $this->_aData['blog_date_edit']; return $this->_getDataOne('blog_date_edit');
} }
public function getRating() { public function getRating() {
return number_format(round($this->_aData['blog_rating'],2), 2, '.', ''); return number_format(round($this->_getDataOne('blog_rating'),2), 2, '.', '');
} }
public function getCountVote() { public function getCountVote() {
return $this->_aData['blog_count_vote']; return $this->_getDataOne('blog_count_vote');
} }
public function getCountUser() { public function getCountUser() {
return $this->_aData['blog_count_user']; return $this->_getDataOne('blog_count_user');
} }
public function getCountTopic() { public function getCountTopic() {
return $this->_aData['blog_count_topic']; return $this->_getDataOne('blog_count_topic');
} }
public function getLimitRatingTopic() { public function getLimitRatingTopic() {
return $this->_aData['blog_limit_rating_topic']; return $this->_getDataOne('blog_limit_rating_topic');
} }
public function getUrl() { public function getUrl() {
return $this->_aData['blog_url']; return $this->_getDataOne('blog_url');
} }
public function getAvatar() { public function getAvatar() {
return $this->_aData['blog_avatar']; return $this->_getDataOne('blog_avatar');
} }
public function getAvatarType() { public function getAvatarType() {
return ($sPath=$this->getAvatarPath()) ? pathinfo($sPath,PATHINFO_EXTENSION) : null; return ($sPath=$this->getAvatarPath()) ? pathinfo($sPath,PATHINFO_EXTENSION) : null;
@ -66,10 +66,10 @@ class ModuleBlog_EntityBlog extends Entity
public function getOwner() { public function getOwner() {
return $this->_aData['owner']; return $this->_getDataOne('owner');
} }
public function getVote() { public function getVote() {
return $this->_aData['vote']; return $this->_getDataOne('vote');
} }
public function getAvatarPath($iSize=48) { public function getAvatarPath($iSize=48) {
if ($sPath=$this->getAvatar()) { if ($sPath=$this->getAvatar()) {
@ -79,13 +79,13 @@ class ModuleBlog_EntityBlog extends Entity
} }
} }
public function getUserIsJoin() { public function getUserIsJoin() {
return $this->_aData['user_is_join']; return $this->_getDataOne('user_is_join');
} }
public function getUserIsAdministrator() { public function getUserIsAdministrator() {
return $this->_aData['user_is_administrator']; return $this->_getDataOne('user_is_administrator');
} }
public function getUserIsModerator() { public function getUserIsModerator() {
return $this->_aData['user_is_moderator']; return $this->_getDataOne('user_is_moderator');
} }
public function getUrlFull() { public function getUrlFull() {
if ($this->getType()=='personal') { if ($this->getType()=='personal') {

View file

@ -18,10 +18,10 @@
class ModuleBlog_EntityBlogUser extends Entity class ModuleBlog_EntityBlogUser extends Entity
{ {
public function getBlogId() { public function getBlogId() {
return $this->_aData['blog_id']; return $this->_getDataOne('blog_id');
} }
public function getUserId() { public function getUserId() {
return $this->_aData['user_id']; return $this->_getDataOne('user_id');
} }
public function getIsModerator() { public function getIsModerator() {
return ($this->getUserRole()==ModuleBlog::BLOG_USER_ROLE_MODERATOR); return ($this->getUserRole()==ModuleBlog::BLOG_USER_ROLE_MODERATOR);
@ -30,14 +30,14 @@ class ModuleBlog_EntityBlogUser extends Entity
return ($this->getUserRole()==ModuleBlog::BLOG_USER_ROLE_ADMINISTRATOR); return ($this->getUserRole()==ModuleBlog::BLOG_USER_ROLE_ADMINISTRATOR);
} }
public function getUserRole() { public function getUserRole() {
return $this->_aData['user_role']; return $this->_getDataOne('user_role');
} }
public function getBlog() { public function getBlog() {
return $this->_aData['blog']; return $this->_getDataOne('blog');
} }
public function getUser() { public function getUser() {
return $this->_aData['user']; return $this->_getDataOne('user');
} }

View file

@ -1,42 +0,0 @@
<?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
*
---------------------------------------------------------
*/
class ModuleBlog_EntityBlogVote extends Entity
{
public function getBlogId() {
return $this->_aData['blog_id'];
}
public function getVoterId() {
return $this->_aData['user_voter_id'];
}
public function getDelta() {
return $this->_aData['vote_delta'];
}
public function setBlogId($data) {
$this->_aData['blog_id']=$data;
}
public function setVoterId($data) {
$this->_aData['user_voter_id']=$data;
}
public function setDelta($data) {
$this->_aData['vote_delta']=$data;
}
}
?>

View file

@ -18,57 +18,57 @@
class ModuleComment_EntityComment extends Entity class ModuleComment_EntityComment extends Entity
{ {
public function getId() { public function getId() {
return $this->_aData['comment_id']; return $this->_getDataOne('comment_id');
} }
public function getPid() { public function getPid() {
return $this->_aData['comment_pid']; return $this->_getDataOne('comment_pid');
} }
public function getLeft() { public function getLeft() {
return $this->_aData['comment_left']; return $this->_getDataOne('comment_left');
} }
public function getRight() { public function getRight() {
return $this->_aData['comment_right']; return $this->_getDataOne('comment_right');
} }
public function getTargetId() { public function getTargetId() {
return $this->_aData['target_id']; return $this->_getDataOne('target_id');
} }
public function getTargetType() { public function getTargetType() {
return $this->_aData['target_type']; return $this->_getDataOne('target_type');
} }
public function getTargetParentId() { public function getTargetParentId() {
return (array_key_exists('target_parent_id',$this->_aData)) ? $this->_aData['target_parent_id'] : 0; return $this->_getDataOne('target_parent_id') ? $this->_getDataOne('target_parent_id') : 0;
} }
public function getUserId() { public function getUserId() {
return $this->_aData['user_id']; return $this->_getDataOne('user_id');
} }
public function getText() { public function getText() {
return $this->_aData['comment_text']; return $this->_getDataOne('comment_text');
} }
public function getDate() { public function getDate() {
return $this->_aData['comment_date']; return $this->_getDataOne('comment_date');
} }
public function getUserIp() { public function getUserIp() {
return $this->_aData['comment_user_ip']; return $this->_getDataOne('comment_user_ip');
} }
public function getRating() { public function getRating() {
return number_format(round($this->_aData['comment_rating'],2), 0, '.', ''); return number_format(round($this->_getDataOne('comment_rating'),2), 0, '.', '');
} }
public function getCountVote() { public function getCountVote() {
return $this->_aData['comment_count_vote']; return $this->_getDataOne('comment_count_vote');
} }
public function getDelete() { public function getDelete() {
return $this->_aData['comment_delete']; return $this->_getDataOne('comment_delete');
} }
public function getPublish() { public function getPublish() {
return $this->_getDataOne('comment_publish') ? 1 : 0; return $this->_getDataOne('comment_publish') ? 1 : 0;
} }
public function getTextHash() { public function getTextHash() {
return $this->_aData['comment_text_hash']; return $this->_getDataOne('comment_text_hash');
} }
public function getLevel() { public function getLevel() {
return $this->_aData['comment_level']; return $this->_getDataOne('comment_level');
} }
public function isBad() { public function isBad() {
if ($this->getRating()<=Config::Get('module.comment.bad')) { if ($this->getRating()<=Config::Get('module.comment.bad')) {
@ -77,20 +77,20 @@ class ModuleComment_EntityComment extends Entity
return false; return false;
} }
public function getUser() { public function getUser() {
return $this->_aData['user']; return $this->_getDataOne('user');
} }
public function getTarget() { public function getTarget() {
return $this->_aData['target']; return $this->_getDataOne('target');
} }
public function getVote() { public function getVote() {
return $this->_aData['vote']; return $this->_getDataOne('vote');
} }
public function getIsFavourite() { public function getIsFavourite() {
return $this->_aData['comment_is_favourite']; return $this->_getDataOne('comment_is_favourite');
} }
public function getCountFavourite() { public function getCountFavourite() {
return $this->_aData['comment_count_favourite']; return $this->_getDataOne('comment_count_favourite');
} }

View file

@ -18,16 +18,16 @@
class ModuleComment_EntityCommentOnline extends Entity class ModuleComment_EntityCommentOnline extends Entity
{ {
public function getTargetId() { public function getTargetId() {
return $this->_aData['target_id']; return $this->_getDataOne('target_id');
} }
public function getTargetType() { public function getTargetType() {
return $this->_aData['target_type']; return $this->_getDataOne('target_type');
} }
public function getCommentId() { public function getCommentId() {
return $this->_aData['comment_id']; return $this->_getDataOne('comment_id');
} }
public function getTargetParentId() { public function getTargetParentId() {
return (array_key_exists('target_parent_id',$this->_aData)) ? $this->_aData['target_parent_id'] : 0; return $this->_getDataOne('target_parent_id') ? $this->_getDataOne('target_parent_id') : 0;
} }
public function setTargetId($data) { public function setTargetId($data) {

View file

@ -1,41 +0,0 @@
<?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
*
---------------------------------------------------------
*/
class ModuleComment_EntityCommentVote extends Entity
{
public function getCommentId() {
return $this->_aData['comment_id'];
}
public function getVoterId() {
return $this->_aData['user_voter_id'];
}
public function getDelta() {
return $this->_aData['vote_delta'];
}
public function setCommentId($data) {
$this->_aData['comment_id']=$data;
}
public function setVoterId($data) {
$this->_aData['user_voter_id']=$data;
}
public function setDelta($data) {
$this->_aData['vote_delta']=$data;
}
}
?>

View file

@ -18,16 +18,16 @@
class ModuleFavourite_EntityFavourite extends Entity class ModuleFavourite_EntityFavourite extends Entity
{ {
public function getTargetId() { public function getTargetId() {
return $this->_aData['target_id']; return $this->_getDataOne('target_id');
} }
public function getUserId() { public function getUserId() {
return $this->_aData['user_id']; return $this->_getDataOne('user_id');
} }
public function getTargetPublish() { public function getTargetPublish() {
return $this->_aData['target_publish']; return $this->_getDataOne('target_publish');
} }
public function getTargetType() { public function getTargetType() {
return $this->_aData['target_type']; return $this->_getDataOne('target_type');
} }
public function getTagsArray() { public function getTagsArray() {
if ($this->getTags()) { if ($this->getTags()) {

View file

@ -18,25 +18,25 @@
class ModuleNotify_EntityTask extends Entity class ModuleNotify_EntityTask extends Entity
{ {
public function getTaskId() { public function getTaskId() {
return $this->_aData['notify_task_id']; return $this->_getDataOne('notify_task_id');
} }
public function getUserMail() { public function getUserMail() {
return $this->_aData['user_mail']; return $this->_getDataOne('user_mail');
} }
public function getUserLogin() { public function getUserLogin() {
return $this->_aData['user_login']; return $this->_getDataOne('user_login');
} }
public function getNotifyText() { public function getNotifyText() {
return $this->_aData['notify_text']; return $this->_getDataOne('notify_text');
} }
public function getDateCreated() { public function getDateCreated() {
return $this->_aData['date_created']; return $this->_getDataOne('date_created');
} }
public function getTaskStatus() { public function getTaskStatus() {
return $this->_aData['notify_task_status']; return $this->_getDataOne('notify_task_status');
} }
public function getNotifySubject() { public function getNotifySubject() {
return $this->_aData['notify_subject']; return $this->_getDataOne('notify_subject');
} }

View file

@ -18,34 +18,34 @@
class ModuleTalk_EntityTalk extends Entity class ModuleTalk_EntityTalk extends Entity
{ {
public function getId() { public function getId() {
return $this->_aData['talk_id']; return $this->_getDataOne('talk_id');
} }
public function getUserId() { public function getUserId() {
return $this->_aData['user_id']; return $this->_getDataOne('user_id');
} }
public function getTitle() { public function getTitle() {
return $this->_aData['talk_title']; return $this->_getDataOne('talk_title');
} }
public function getText() { public function getText() {
return $this->_aData['talk_text']; return $this->_getDataOne('talk_text');
} }
public function getDate() { public function getDate() {
return $this->_aData['talk_date']; return $this->_getDataOne('talk_date');
} }
public function getDateLast() { public function getDateLast() {
return $this->_aData['talk_date_last']; return $this->_getDataOne('talk_date_last');
} }
public function getUserIdLast() { public function getUserIdLast() {
return $this->_aData['talk_user_id_last']; return $this->_getDataOne('talk_user_id_last');
} }
public function getUserIp() { public function getUserIp() {
return $this->_aData['talk_user_ip']; return $this->_getDataOne('talk_user_ip');
} }
public function getCommentIdLast() { public function getCommentIdLast() {
return $this->_aData['talk_comment_id_last']; return $this->_getDataOne('talk_comment_id_last');
} }
public function getCountComment() { public function getCountComment() {
return $this->_aData['talk_count_comment']; return $this->_getDataOne('talk_count_comment');
} }
@ -61,13 +61,13 @@ class ModuleTalk_EntityTalk extends Entity
return $this->getText(); return $this->getText();
} }
public function getUsers() { public function getUsers() {
return $this->_aData['users']; return $this->_getDataOne('users');
} }
public function getUser() { public function getUser() {
return $this->_aData['user']; return $this->_getDataOne('user');
} }
public function getTalkUser() { public function getTalkUser() {
return $this->_aData['talk_user']; return $this->_getDataOne('talk_user');
} }
/** /**
* Возращает true, если разговор занесен в избранное * Возращает true, если разговор занесен в избранное
@ -75,7 +75,7 @@ class ModuleTalk_EntityTalk extends Entity
* @return bool * @return bool
*/ */
public function getIsFavourite() { public function getIsFavourite() {
return $this->_aData['talk_is_favourite']; return $this->_getDataOne('talk_is_favourite');
} }
/** /**
* Получает пользователей разговора * Получает пользователей разговора
@ -83,7 +83,7 @@ class ModuleTalk_EntityTalk extends Entity
* @return array * @return array
*/ */
public function getTalkUsers() { public function getTalkUsers() {
return $this->_aData['talk_users']; return $this->_getDataOne('talk_users');
} }

View file

@ -18,19 +18,19 @@
class ModuleTalk_EntityTalkUser extends Entity class ModuleTalk_EntityTalkUser extends Entity
{ {
public function getTalkId() { public function getTalkId() {
return $this->_aData['talk_id']; return $this->_getDataOne('talk_id');
} }
public function getUserId() { public function getUserId() {
return $this->_aData['user_id']; return $this->_getDataOne('user_id');
} }
public function getDateLast() { public function getDateLast() {
return $this->_aData['date_last']; return $this->_getDataOne('date_last');
} }
public function getCommentIdLast() { public function getCommentIdLast() {
return $this->_aData['comment_id_last']; return $this->_getDataOne('comment_id_last');
} }
public function getCommentCountNew() { public function getCommentCountNew() {
return $this->_aData['comment_count_new']; return $this->_getDataOne('comment_count_new');
} }
/** /**
@ -39,9 +39,7 @@ class ModuleTalk_EntityTalkUser extends Entity
* @return int * @return int
*/ */
public function getUserActive(){ public function getUserActive(){
return (array_key_exists('talk_user_active',$this->_aData)) return $this->_getDataOne('talk_user_active') ? $this->_getDataOne('talk_user_active') : ModuleTalk::TALK_USER_ACTIVE;
? $this->_aData['talk_user_active']
: ModuleTalk::TALK_USER_ACTIVE;
} }
/** /**
* Возвращает соответствующий пользователю объект UserEntity * Возвращает соответствующий пользователю объект UserEntity
@ -49,7 +47,7 @@ class ModuleTalk_EntityTalkUser extends Entity
* @return UserEntity | null * @return UserEntity | null
*/ */
public function getUser() { public function getUser() {
return $this->_aData['user']; return $this->_getDataOne('user');
} }

View file

@ -64,7 +64,7 @@ class ModuleTopic_EntityTopic extends Entity {
public function ValidateTopicUnique($sValue,$aParams) { public function ValidateTopicUnique($sValue,$aParams) {
$this->setTextHash(md5($this->getType().$sValue.$this->getTitle())); $this->setTextHash(md5($this->getType().$sValue.$this->getTitle()));
if ($oTopicEquivalent=$this->Topic_GetTopicUnique($this->getUserId(),$this->getTextHash())) { if ($oTopicEquivalent=$this->Topic_GetTopicUnique($this->getUserId(),$this->getTextHash())) {
if ($iId=$this->getTopicId() and $oTopicEquivalent->getId()==$iId) { // хак, запрашиваем не getId(), а getTopicId() - вернет null если это новый топик без ID if ($iId=$this->getId() and $oTopicEquivalent->getId()==$iId) {
return true; return true;
} }
return $this->Lang_Get('topic_create_text_error_unique'); return $this->Lang_Get('topic_create_text_error_unique');
@ -90,85 +90,82 @@ class ModuleTopic_EntityTopic extends Entity {
public function getId() { public function getId() {
return $this->_aData['topic_id']; return $this->_getDataOne('topic_id');
} }
public function getBlogId() { public function getBlogId() {
return $this->_aData['blog_id']; return $this->_getDataOne('blog_id');
} }
public function getUserId() { public function getUserId() {
return $this->_aData['user_id']; return $this->_getDataOne('user_id');
} }
public function getType() { public function getType() {
return $this->_aData['topic_type']; return $this->_getDataOne('topic_type');
} }
public function getTitle() { public function getTitle() {
return $this->_aData['topic_title']; return $this->_getDataOne('topic_title');
} }
public function getText() { public function getText() {
return $this->_aData['topic_text']; return $this->_getDataOne('topic_text');
} }
public function getTextShort() { public function getTextShort() {
return $this->_aData['topic_text_short']; return $this->_getDataOne('topic_text_short');
} }
public function getTextSource() { public function getTextSource() {
return $this->_aData['topic_text_source']; return $this->_getDataOne('topic_text_source');
} }
public function getExtra() { public function getExtra() {
if (isset($this->_aData['topic_extra'])) { return $this->_getDataOne('topic_extra') ? $this->_getDataOne('topic_extra') : serialize('');
return $this->_aData['topic_extra'];
}
return serialize('');
} }
public function getTags() { public function getTags() {
return $this->_aData['topic_tags']; return $this->_getDataOne('topic_tags');
} }
public function getDateAdd() { public function getDateAdd() {
return $this->_aData['topic_date_add']; return $this->_getDataOne('topic_date_add');
} }
public function getDateEdit() { public function getDateEdit() {
return $this->_aData['topic_date_edit']; return $this->_getDataOne('topic_date_edit');
} }
public function getUserIp() { public function getUserIp() {
return $this->_aData['topic_user_ip']; return $this->_getDataOne('topic_user_ip');
} }
public function getPublish() { public function getPublish() {
return $this->_aData['topic_publish']; return $this->_getDataOne('topic_publish');
} }
public function getPublishDraft() { public function getPublishDraft() {
return $this->_aData['topic_publish_draft']; return $this->_getDataOne('topic_publish_draft');
} }
public function getPublishIndex() { public function getPublishIndex() {
return $this->_aData['topic_publish_index']; return $this->_getDataOne('topic_publish_index');
} }
public function getRating() { public function getRating() {
return number_format(round($this->_aData['topic_rating'],2), 0, '.', ''); return number_format(round($this->_getDataOne('topic_rating'),2), 0, '.', '');
} }
public function getCountVote() { public function getCountVote() {
return $this->_aData['topic_count_vote']; return $this->_getDataOne('topic_count_vote');
} }
public function getCountVoteUp() { public function getCountVoteUp() {
return $this->_aData['topic_count_vote_up']; return $this->_getDataOne('topic_count_vote_up');
} }
public function getCountVoteDown() { public function getCountVoteDown() {
return $this->_aData['topic_count_vote_down']; return $this->_getDataOne('topic_count_vote_down');
} }
public function getCountVoteAbstain() { public function getCountVoteAbstain() {
return $this->_aData['topic_count_vote_abstain']; return $this->_getDataOne('topic_count_vote_abstain');
} }
public function getCountRead() { public function getCountRead() {
return $this->_aData['topic_count_read']; return $this->_getDataOne('topic_count_read');
} }
public function getCountComment() { public function getCountComment() {
return $this->_aData['topic_count_comment']; return $this->_getDataOne('topic_count_comment');
} }
public function getCutText() { public function getCutText() {
return $this->_aData['topic_cut_text']; return $this->_getDataOne('topic_cut_text');
} }
public function getForbidComment() { public function getForbidComment() {
return $this->_aData['topic_forbid_comment']; return $this->_getDataOne('topic_forbid_comment');
} }
public function getTextHash() { public function getTextHash() {
return $this->_aData['topic_text_hash']; return $this->_getDataOne('topic_text_hash');
} }
public function getTagsArray() { public function getTagsArray() {
@ -178,19 +175,19 @@ class ModuleTopic_EntityTopic extends Entity {
return array(); return array();
} }
public function getCountCommentNew() { public function getCountCommentNew() {
return $this->_aData['count_comment_new']; return $this->_getDataOne('count_comment_new');
} }
public function getDateRead() { public function getDateRead() {
return $this->_aData['date_read']; return $this->_getDataOne('date_read');
} }
public function getUser() { public function getUser() {
if (!isset($this->_aData['user'])) { if (!$this->_getDataOne('user')) {
$this->_aData['user']=$this->User_GetUserById($this->getUserId()); $this->_aData['user']=$this->User_GetUserById($this->getUserId());
} }
return $this->_aData['user']; return $this->_getDataOne('user');
} }
public function getBlog() { public function getBlog() {
return $this->_aData['blog']; return $this->_getDataOne('blog');
} }
@ -202,10 +199,10 @@ class ModuleTopic_EntityTopic extends Entity {
} }
} }
public function getVote() { public function getVote() {
return $this->_aData['vote']; return $this->_getDataOne('vote');
} }
public function getUserQuestionIsVote() { public function getUserQuestionIsVote() {
return $this->_aData['user_question_is_vote']; return $this->_getDataOne('user_question_is_vote');
} }
public function getIsFavourite() { public function getIsFavourite() {
if ($this->getFavourite()) { if ($this->getFavourite()) {
@ -214,7 +211,7 @@ class ModuleTopic_EntityTopic extends Entity {
return false; return false;
} }
public function getCountFavourite() { public function getCountFavourite() {
return $this->_aData['topic_count_favourite']; return $this->_getDataOne('topic_count_favourite');
} }
public function getSubscribeNewComment() { public function getSubscribeNewComment() {
if (!($oUserCurrent=$this->User_GetUserCurrent())) { if (!($oUserCurrent=$this->User_GetUserCurrent())) {

View file

@ -4,24 +4,24 @@ class ModuleTopic_EntityTopicPhoto extends Entity
{ {
public function getId() public function getId()
{ {
return $this->_aData['id']; return $this->_getDataOne('id');
} }
public function getTopicId() public function getTopicId()
{ {
return ( isset($this->_aData['topic_id'])) ? $this->_aData['topic_id'] : null; return $this->_getDataOne('topic_id');
} }
public function getTargetTmp() public function getTargetTmp()
{ {
return $this->_aData['target_tmp']; return $this->_getDataOne('target_tmp');
} }
public function getDescription() public function getDescription()
{ {
return ( isset($this->_aData['description'])) ? $this->_aData['description'] : null; return $this->_getDataOne('description');
} }
public function getPath() public function getPath()
{ {
return isset($this->_aData['path']) ? $this->_aData['path'] : null; return $this->_getDataOne('path');
} }
public function getWebPath($sWidth = null) public function getWebPath($sWidth = null)

View file

@ -18,13 +18,13 @@
class ModuleTopic_EntityTopicQuestionVote extends Entity class ModuleTopic_EntityTopicQuestionVote extends Entity
{ {
public function getTopicId() { public function getTopicId() {
return $this->_aData['topic_id']; return $this->_getDataOne('topic_id');
} }
public function getVoterId() { public function getVoterId() {
return $this->_aData['user_voter_id']; return $this->_getDataOne('user_voter_id');
} }
public function getAnswer() { public function getAnswer() {
return $this->_aData['answer']; return $this->_getDataOne('answer');
} }

View file

@ -18,19 +18,19 @@
class ModuleTopic_EntityTopicRead extends Entity class ModuleTopic_EntityTopicRead extends Entity
{ {
public function getTopicId() { public function getTopicId() {
return $this->_aData['topic_id']; return $this->_getDataOne('topic_id');
} }
public function getUserId() { public function getUserId() {
return $this->_aData['user_id']; return $this->_getDataOne('user_id');
} }
public function getDateRead() { public function getDateRead() {
return $this->_aData['date_read']; return $this->_getDataOne('date_read');
} }
public function getCommentCountLast() { public function getCommentCountLast() {
return $this->_aData['comment_count_last']; return $this->_getDataOne('comment_count_last');
} }
public function getCommentIdLast() { public function getCommentIdLast() {
return $this->_aData['comment_id_last']; return $this->_getDataOne('comment_id_last');
} }

View file

@ -18,26 +18,26 @@
class ModuleTopic_EntityTopicTag extends Entity class ModuleTopic_EntityTopicTag extends Entity
{ {
public function getId() { public function getId() {
return $this->_aData['topic_tag_id']; return $this->_getDataOne('topic_tag_id');
} }
public function getTopicId() { public function getTopicId() {
return $this->_aData['topic_id']; return $this->_getDataOne('topic_id');
} }
public function getUserId() { public function getUserId() {
return $this->_aData['user_id']; return $this->_getDataOne('user_id');
} }
public function getBlogId() { public function getBlogId() {
return $this->_aData['blog_id']; return $this->_getDataOne('blog_id');
} }
public function getText() { public function getText() {
return $this->_aData['topic_tag_text']; return $this->_getDataOne('topic_tag_text');
} }
public function getCount() { public function getCount() {
return $this->_aData['count']; return $this->_getDataOne('count');
} }
public function getSize() { public function getSize() {
return $this->_aData['size']; return $this->_getDataOne('size');
} }

View file

@ -1,42 +0,0 @@
<?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
*
---------------------------------------------------------
*/
class ModuleTopic_EntityTopicVote extends Entity
{
public function getTopicId() {
return $this->_aData['topic_id'];
}
public function getVoterId() {
return $this->_aData['user_voter_id'];
}
public function getDelta() {
return $this->_aData['vote_delta'];
}
public function setTopicId($data) {
$this->_aData['topic_id']=$data;
}
public function setVoterId($data) {
$this->_aData['user_voter_id']=$data;
}
public function setDelta($data) {
$this->_aData['vote_delta']=$data;
}
}
?>

View file

@ -17,19 +17,19 @@
class ModuleUser_EntityField extends Entity { class ModuleUser_EntityField extends Entity {
public function getId() { public function getId() {
return $this->_aData['id']; return $this->_getDataOne('id');
} }
public function getName(){ public function getName(){
return $this->_aData['name']; return $this->_getDataOne('name');
} }
public function getType(){ public function getType(){
return $this->_aData['type']; return $this->_getDataOne('type');
} }
public function getTitle(){ public function getTitle(){
return $this->_aData['title']; return $this->_getDataOne('title');
} }
public function getPattern(){ public function getPattern(){
return $this->_aData['pattern']; return $this->_getDataOne('pattern');
} }
public function getValue($bEscapeValue = false, $bTransformed = false){ public function getValue($bEscapeValue = false, $bTransformed = false){
if (!isset($this->_aData['value']) || !$this->_aData['value']) return ''; if (!isset($this->_aData['value']) || !$this->_aData['value']) return '';

View file

@ -28,10 +28,10 @@ class ModuleUser_EntityFriend extends Entity
if(!$sUserId) { if(!$sUserId) {
$sUserId=$this->getUserId(); $sUserId=$this->getUserId();
} }
if($this->_aData['user_from']==$sUserId) { if($this->_getDataOne('user_from')==$sUserId) {
return $this->_aData['user_to']; return $this->_aData['user_to'];
} }
if($this->_aData['user_to']==$sUserId) { if($this->_getDataOne('user_to')==$sUserId) {
return $this->_aData['user_from']; return $this->_aData['user_from'];
} }
return false; return false;
@ -43,24 +43,20 @@ class ModuleUser_EntityFriend extends Entity
* @return int * @return int
*/ */
public function getUserId() { public function getUserId() {
return array_key_exists('user',$this->_aData) return $this->_getDataOne('user');
? $this->_aData['user']
: null;
} }
public function getUserFrom() { public function getUserFrom() {
return $this->_aData['user_from']; return $this->_getDataOne('user_from');
} }
public function getUserTo() { public function getUserTo() {
return $this->_aData['user_to']; return $this->_getDataOne('user_to');
} }
public function getStatusFrom() { public function getStatusFrom() {
return $this->_aData['status_from']; return $this->_getDataOne('status_from');
} }
public function getStatusTo() { public function getStatusTo() {
return (empty($this->_aData['status_to'])) return $this->_getDataOne('status_to') ? $this->_getDataOne('status_to') : ModuleUser::USER_FRIEND_NULL;
? ModuleUser::USER_FRIEND_NULL
: $this->_aData['status_to'];
} }
public function getFriendStatus() { public function getFriendStatus() {
return $this->getStatusFrom()+$this->getStatusTo(); return $this->getStatusFrom()+$this->getStatusTo();

View file

@ -18,25 +18,25 @@
class ModuleUser_EntityInvite extends Entity class ModuleUser_EntityInvite extends Entity
{ {
public function getId() { public function getId() {
return $this->_aData['invite_id']; return $this->_getDataOne('invite_id');
} }
public function getCode() { public function getCode() {
return $this->_aData['invite_code']; return $this->_getDataOne('invite_code');
} }
public function getUserFromId() { public function getUserFromId() {
return $this->_aData['user_from_id']; return $this->_getDataOne('user_from_id');
} }
public function getUserToId() { public function getUserToId() {
return $this->_aData['user_to_id']; return $this->_getDataOne('user_to_id');
} }
public function getDateAdd() { public function getDateAdd() {
return $this->_aData['invite_date_add']; return $this->_getDataOne('invite_date_add');
} }
public function getDateUsed() { public function getDateUsed() {
return $this->_aData['invite_date_used']; return $this->_getDataOne('invite_date_used');
} }
public function getUsed() { public function getUsed() {
return $this->_aData['invite_used']; return $this->_getDataOne('invite_used');
} }

View file

@ -18,22 +18,22 @@
class ModuleUser_EntityReminder extends Entity class ModuleUser_EntityReminder extends Entity
{ {
public function getCode() { public function getCode() {
return $this->_aData['reminder_code']; return $this->_getDataOne('reminder_code');
} }
public function getUserId() { public function getUserId() {
return $this->_aData['user_id']; return $this->_getDataOne('user_id');
} }
public function getDateAdd() { public function getDateAdd() {
return $this->_aData['reminder_date_add']; return $this->_getDataOne('reminder_date_add');
} }
public function getDateUsed() { public function getDateUsed() {
return $this->_aData['reminder_date_used']; return $this->_getDataOne('reminder_date_used');
} }
public function getDateExpire() { public function getDateExpire() {
return $this->_aData['reminder_date_expire']; return $this->_getDataOne('reminder_date_expire');
} }
public function getIsUsed() { public function getIsUsed() {
return $this->_aData['reminde_is_used']; return $this->_getDataOne('reminde_is_used');
} }

View file

@ -18,22 +18,22 @@
class ModuleUser_EntitySession extends Entity class ModuleUser_EntitySession extends Entity
{ {
public function getKey() { public function getKey() {
return $this->_aData['session_key']; return $this->_getDataOne('session_key');
} }
public function getUserId() { public function getUserId() {
return $this->_aData['user_id']; return $this->_getDataOne('user_id');
} }
public function getIpCreate() { public function getIpCreate() {
return $this->_aData['session_ip_create']; return $this->_getDataOne('session_ip_create');
} }
public function getIpLast() { public function getIpLast() {
return $this->_aData['session_ip_last']; return $this->_getDataOne('session_ip_last');
} }
public function getDateCreate() { public function getDateCreate() {
return $this->_aData['session_date_create']; return $this->_getDataOne('session_date_create');
} }
public function getDateLast() { public function getDateLast() {
return $this->_aData['session_date_last']; return $this->_getDataOne('session_date_last');
} }

View file

@ -73,91 +73,91 @@ class ModuleUser_EntityUser extends Entity {
public function getId() { public function getId() {
return $this->_aData['user_id']; return $this->_getDataOne('user_id');
} }
public function getLogin() { public function getLogin() {
return $this->_aData['user_login']; return $this->_getDataOne('user_login');
} }
public function getPassword() { public function getPassword() {
return $this->_aData['user_password']; return $this->_getDataOne('user_password');
} }
public function getMail() { public function getMail() {
return $this->_aData['user_mail']; return $this->_getDataOne('user_mail');
} }
public function getSkill() { public function getSkill() {
return number_format(round($this->_aData['user_skill'],2), 2, '.', ''); return number_format(round($this->_getDataOne('user_skill'),2), 2, '.', '');
} }
public function getDateRegister() { public function getDateRegister() {
return $this->_aData['user_date_register']; return $this->_getDataOne('user_date_register');
} }
public function getDateActivate() { public function getDateActivate() {
return $this->_aData['user_date_activate']; return $this->_getDataOne('user_date_activate');
} }
public function getDateCommentLast() { public function getDateCommentLast() {
return $this->_aData['user_date_comment_last']; return $this->_getDataOne('user_date_comment_last');
} }
public function getIpRegister() { public function getIpRegister() {
return $this->_aData['user_ip_register']; return $this->_getDataOne('user_ip_register');
} }
public function getRating() { public function getRating() {
return number_format(round($this->_aData['user_rating'],2), 2, '.', ''); return number_format(round($this->_getDataOne('user_rating'),2), 2, '.', '');
} }
public function getCountVote() { public function getCountVote() {
return $this->_aData['user_count_vote']; return $this->_getDataOne('user_count_vote');
} }
public function getActivate() { public function getActivate() {
return $this->_aData['user_activate']; return $this->_getDataOne('user_activate');
} }
public function getActivateKey() { public function getActivateKey() {
return $this->_aData['user_activate_key']; return $this->_getDataOne('user_activate_key');
} }
public function getProfileName() { public function getProfileName() {
return $this->_aData['user_profile_name']; return $this->_getDataOne('user_profile_name');
} }
public function getProfileSex() { public function getProfileSex() {
return $this->_aData['user_profile_sex']; return $this->_getDataOne('user_profile_sex');
} }
public function getProfileCountry() { public function getProfileCountry() {
return $this->_aData['user_profile_country']; return $this->_getDataOne('user_profile_country');
} }
public function getProfileRegion() { public function getProfileRegion() {
return $this->_aData['user_profile_region']; return $this->_getDataOne('user_profile_region');
} }
public function getProfileCity() { public function getProfileCity() {
return $this->_aData['user_profile_city']; return $this->_getDataOne('user_profile_city');
} }
public function getProfileBirthday() { public function getProfileBirthday() {
return $this->_aData['user_profile_birthday']; return $this->_getDataOne('user_profile_birthday');
} }
public function getProfileAbout() { public function getProfileAbout() {
return $this->_aData['user_profile_about']; return $this->_getDataOne('user_profile_about');
} }
public function getProfileDate() { public function getProfileDate() {
return $this->_aData['user_profile_date']; return $this->_getDataOne('user_profile_date');
} }
public function getProfileAvatar() { public function getProfileAvatar() {
return $this->_aData['user_profile_avatar']; return $this->_getDataOne('user_profile_avatar');
} }
public function getProfileAvatarType() { public function getProfileAvatarType() {
return ($sPath=$this->getProfileAvatarPath()) ? pathinfo($sPath,PATHINFO_EXTENSION) : null; return ($sPath=$this->getProfileAvatarPath()) ? pathinfo($sPath,PATHINFO_EXTENSION) : null;
} }
public function getProfileFoto() { public function getProfileFoto() {
return $this->_aData['user_profile_foto']; return $this->_getDataOne('user_profile_foto');
} }
public function getSettingsNoticeNewTopic() { public function getSettingsNoticeNewTopic() {
return $this->_aData['user_settings_notice_new_topic']; return $this->_getDataOne('user_settings_notice_new_topic');
} }
public function getSettingsNoticeNewComment() { public function getSettingsNoticeNewComment() {
return $this->_aData['user_settings_notice_new_comment']; return $this->_getDataOne('user_settings_notice_new_comment');
} }
public function getSettingsNoticeNewTalk() { public function getSettingsNoticeNewTalk() {
return $this->_aData['user_settings_notice_new_talk']; return $this->_getDataOne('user_settings_notice_new_talk');
} }
public function getSettingsNoticeReplyComment() { public function getSettingsNoticeReplyComment() {
return $this->_aData['user_settings_notice_reply_comment']; return $this->_getDataOne('user_settings_notice_reply_comment');
} }
public function getSettingsNoticeNewFriend() { public function getSettingsNoticeNewFriend() {
return $this->_aData['user_settings_notice_new_friend']; return $this->_getDataOne('user_settings_notice_new_friend');
} }
@ -165,10 +165,10 @@ class ModuleUser_EntityUser extends Entity {
return $this->User_getUserFieldsValues($this->getId(), $bOnlyNoEmpty,$sType); return $this->User_getUserFieldsValues($this->getId(), $bOnlyNoEmpty,$sType);
} }
public function getSession() { public function getSession() {
if (!isset($this->_aData['session'])) { if (!$this->_getDataOne('session')) {
$this->_aData['session']=$this->User_GetSessionByUserId($this->getId()); $this->_aData['session']=$this->User_GetSessionByUserId($this->getId());
} }
return $this->_aData['session']; return $this->_getDataOne('session');
} }
public function isOnline() { public function isOnline() {
if ($oSession=$this->getSession()) { if ($oSession=$this->getSession()) {
@ -195,13 +195,13 @@ class ModuleUser_EntityUser extends Entity {
return Config::Get('path.static.skin').'/images/user_foto_250.png'; return Config::Get('path.static.skin').'/images/user_foto_250.png';
} }
public function getVote() { public function getVote() {
return $this->_aData['vote']; return $this->_getDataOne('vote');
} }
public function getUserIsFriend() { public function getUserIsFriend() {
return $this->_aData['user_is_friend']; return $this->_getDataOne('user_is_friend');
} }
public function isAdministrator() { public function isAdministrator() {
return $this->_aData['user_is_administrator']; return $this->_getDataOne('user_is_administrator');
} }
public function getUserWebPath() { public function getUserWebPath() {
return Router::GetPath('profile').$this->getLogin().'/'; return Router::GetPath('profile').$this->getLogin().'/';
@ -212,7 +212,7 @@ class ModuleUser_EntityUser extends Entity {
* @return int * @return int
*/ */
public function getUserFriend() { public function getUserFriend() {
return $this->_aData['user_friend']; return $this->_getDataOne('user_friend');
} }
/** /**
* Проверяет подписан ли текущий пользователь на этого * Проверяет подписан ли текущий пользователь на этого

View file

@ -1,42 +0,0 @@
<?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
*
---------------------------------------------------------
*/
class ModuleUser_EntityUserVote extends Entity
{
public function getUserId() {
return $this->_aData['user_id'];
}
public function getVoterId() {
return $this->_aData['user_voter_id'];
}
public function getDelta() {
return $this->_aData['vote_delta'];
}
public function setUserId($data) {
$this->_aData['user_id']=$data;
}
public function setVoterId($data) {
$this->_aData['user_voter_id']=$data;
}
public function setDelta($data) {
$this->_aData['vote_delta']=$data;
}
}
?>

View file

@ -37,6 +37,9 @@ class ModuleVote extends Module {
* @return unknown * @return unknown
*/ */
public function AddVote(ModuleVote_EntityVote $oVote) { public function AddVote(ModuleVote_EntityVote $oVote) {
if (!$oVote->getIp()) {
$oVote->setIp(func_getIp());
}
if ($this->oMapper->AddVote($oVote)) { if ($this->oMapper->AddVote($oVote)) {
$this->Cache_Delete("vote_{$oVote->getTargetType()}_{$oVote->getTargetId()}_{$oVote->getVoterId()}"); $this->Cache_Delete("vote_{$oVote->getTargetType()}_{$oVote->getTargetId()}_{$oVote->getVoterId()}");
$this->Cache_Clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG,array("vote_update_{$oVote->getTargetType()}_{$oVote->getVoterId()}")); $this->Cache_Clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG,array("vote_update_{$oVote->getTargetType()}_{$oVote->getVoterId()}"));

View file

@ -18,22 +18,25 @@
class ModuleVote_EntityVote extends Entity class ModuleVote_EntityVote extends Entity
{ {
public function getTargetId() { public function getTargetId() {
return $this->_aData['target_id']; return $this->_getDataOne('target_id');
} }
public function getTargetType() { public function getTargetType() {
return $this->_aData['target_type']; return $this->_getDataOne('target_type');
} }
public function getVoterId() { public function getVoterId() {
return $this->_aData['user_voter_id']; return $this->_getDataOne('user_voter_id');
} }
public function getDirection() { public function getDirection() {
return $this->_aData['vote_direction']; return $this->_getDataOne('vote_direction');
} }
public function getValue() { public function getValue() {
return $this->_aData['vote_value']; return $this->_getDataOne('vote_value');
} }
public function getDate() { public function getDate() {
return $this->_aData['vote_date']; return $this->_getDataOne('vote_date');
}
public function getIp() {
return $this->_getDataOne('vote_ip');
} }
@ -56,5 +59,8 @@ class ModuleVote_EntityVote extends Entity
public function setDate($data) { public function setDate($data) {
$this->_aData['vote_date']=$data; $this->_aData['vote_date']=$data;
} }
public function setIp($data) {
$this->_aData['vote_ip']=$data;
}
} }
?> ?>

View file

@ -25,11 +25,12 @@ class ModuleVote_MapperVote extends Mapper {
user_voter_id, user_voter_id,
vote_direction, vote_direction,
vote_value, vote_value,
vote_date vote_date,
vote_ip
) )
VALUES(?d, ?, ?d, ?d, ?f, ?) VALUES(?d, ?, ?d, ?d, ?f, ?, ?)
"; ";
if ($this->oDb->query($sql,$oVote->getTargetId(),$oVote->getTargetType(),$oVote->getVoterId(),$oVote->getDirection(),$oVote->getValue(),$oVote->getDate())===0) if ($this->oDb->query($sql,$oVote->getTargetId(),$oVote->getTargetType(),$oVote->getVoterId(),$oVote->getDirection(),$oVote->getValue(),$oVote->getDate(),$oVote->getIp())===0)
{ {
return true; return true;
} }

View file

@ -231,8 +231,11 @@ class ModuleWall extends Module {
$aKeys=array_keys($aResult['collection']); $aKeys=array_keys($aResult['collection']);
sort($aKeys,SORT_NUMERIC); sort($aKeys,SORT_NUMERIC);
$oWall->setLastReply(join(',',$aKeys)); $oWall->setLastReply(join(',',$aKeys));
$this->UpdateWall($oWall); } else {
$oWall->setCountReply(0);
$oWall->setLastReply('');
} }
$this->UpdateWall($oWall);
} }
/** /**

View file

@ -100,10 +100,10 @@ class ModuleWall_EntityWall extends Entity {
* @return mixed * @return mixed
*/ */
public function getWallUser() { public function getWallUser() {
if (!isset($this->_aData['wall_user'])) { if (!$this->_getDataOne('wall_user')) {
$this->_aData['wall_user']=$this->User_GetUserById($this->getWallUserId()); $this->_aData['wall_user']=$this->User_GetUserById($this->getWallUserId());
} }
return $this->_aData['wall_user']; return $this->_getDataOne('wall_user');
} }
/** /**

View file

@ -419,7 +419,7 @@ $config['block']['rule_topic_type'] = array(
'topic' => array('add','edit'), 'topic' => array('add','edit'),
'photoset' => array('add','edit') 'photoset' => array('add','edit')
), ),
'blocks' => array( 'right' => array('block.blogInfo.tpl') ), 'blocks' => array( 'right' => array('blocks/block.blogInfo.tpl') ),
); );
$config['block']['rule_people'] = array( $config['block']['rule_people'] = array(
'action' => array( 'people' ), 'action' => array( 'people' ),

View file

@ -544,7 +544,10 @@ class ModuleViewer extends Module {
* *
* @return array * @return array
*/ */
public function GetBlocks() { public function GetBlocks($bSort=false) {
if ($bSort) {
$this->SortBlocks();
}
return $this->aBlocks; return $this->aBlocks;
} }
/** /**
@ -554,7 +557,7 @@ class ModuleViewer extends Module {
* @return string('block','template','undefined') * @return string('block','template','undefined')
*/ */
protected function DefineTypeBlock($sName,$sDir=null) { protected function DefineTypeBlock($sName,$sDir=null) {
if ($this->TemplateExists(is_null($sDir)?'block.'.$sName.'.tpl':rtrim($sDir,'/').'/block.'.$sName.'.tpl')) { if ($this->TemplateExists(is_null($sDir)?'blocks/block.'.$sName.'.tpl':rtrim($sDir,'/').'/blocks/block.'.$sName.'.tpl')) {
/** /**
* Если найден шаблон вида block.name.tpl то считаем что тип 'block' * Если найден шаблон вида block.name.tpl то считаем что тип 'block'
*/ */

View file

@ -29,7 +29,7 @@ function smarty_function_get_blocks($params, &$smarty)
return; return;
} }
$smarty->assign($params['assign'], Engine::getInstance()->Viewer_GetBlocks()); $smarty->assign($params['assign'], Engine::getInstance()->Viewer_GetBlocks(true));
return ''; return '';
} }

View file

@ -33,10 +33,10 @@ function smarty_insert_block($aParams,&$oSmarty) {
* принадлежит ли блок одному из плагинов, или является пользовательским классом движка * принадлежит ли блок одному из плагинов, или является пользовательским классом движка
*/ */
if(isset($aParams['params']) and isset($aParams['params']['plugin'])) { if(isset($aParams['params']) and isset($aParams['params']['plugin'])) {
$sBlockTemplate = Plugin::GetTemplatePath($aParams['params']['plugin']).'/block.'.$aParams['block'].'.tpl'; $sBlockTemplate = Plugin::GetTemplatePath($aParams['params']['plugin']).'/blocks/block.'.$aParams['block'].'.tpl';
$sBlock ='Plugin'.ucfirst($aParams['params']['plugin']).'_Block'.$sBlock; $sBlock ='Plugin'.ucfirst($aParams['params']['plugin']).'_Block'.$sBlock;
} else { } else {
$sBlockTemplate = Engine::getInstance()->Plugin_GetDelegate('template','block.'.$aParams['block'].'.tpl'); $sBlockTemplate = Engine::getInstance()->Plugin_GetDelegate('template','blocks/block.'.$aParams['block'].'.tpl');
$sBlock ='Block'.$sBlock; $sBlock ='Block'.$sBlock;
} }

View file

@ -101,13 +101,16 @@ DROP TABLE `prefix_city`;
INSERT INTO `prefix_user_field` (`type`, `name`, `title`, `pattern`) VALUES INSERT INTO `prefix_user_field` (`type`, `name`, `title`, `pattern`) VALUES
('contact', 'phone', 'Телефон', ''), ('contact', 'phone', 'Телефон', ''),
('contact', 'mail', 'E-mail', '<a href="mailto:{*}">{*}</a>'), ('contact', 'mail', 'E-mail', '<a href="mailto:{*}" rel="nofollow">{*}</a>'),
('contact', 'skype', 'Skype', '<a href="skype:{*}">{*}</a>'), ('contact', 'skype', 'Skype', '<a href="skype:{*}" rel="nofollow">{*}</a>'),
('contact', 'icq', 'ICQ', '<a href="http://www.icq.com/people/about_me.php?uin={*}">{*}</a>'), ('contact', 'icq', 'ICQ', '<a href="http://www.icq.com/people/about_me.php?uin={*}" rel="nofollow">{*}</a>'),
('contact', 'www', 'Сайт', '<a href="http://{*}">{*}</a>'), ('contact', 'www', 'Сайт', '<a href="http://{*}" rel="nofollow">{*}</a>'),
('social', 'twitter', 'Twitter', '<a href="http://twitter.com/{*}/">{*}</a>'), ('social', 'twitter', 'Twitter', '<a href="http://twitter.com/{*}/" rel="nofollow">{*}</a>'),
('social', 'facebook', 'Facebook', '<a href="http://facebook.com/{*}">{*}</a>'), ('social', 'facebook', 'Facebook', '<a href="http://facebook.com/{*}" rel="nofollow">{*}</a>'),
('social', 'vkontakte', 'ВКонтакте', '<a href="http://vk.com/{*}">{*}</a>'), ('social', 'vkontakte', 'ВКонтакте', '<a href="http://vk.com/{*}" rel="nofollow">{*}</a>'),
('social', 'odnoklassniki', 'Одноклассники', '<a href="http://www.odnoklassniki.ru/profile/{*}/">{*}</a>'); ('social', 'odnoklassniki', 'Одноклассники', '<a href="http://www.odnoklassniki.ru/profile/{*}/" rel="nofollow">{*}</a>');
ALTER TABLE `prefix_favourite_tag` ADD INDEX ( `text` ); ALTER TABLE `prefix_favourite_tag` ADD INDEX ( `text` );
ALTER TABLE `prefix_vote` ADD `vote_ip` VARCHAR( 15 ) NOT NULL DEFAULT '',
ADD INDEX ( `vote_ip` );

View file

@ -706,14 +706,14 @@ CREATE TABLE IF NOT EXISTS `prefix_user_field` (
INSERT INTO `prefix_user_field` (`id`, `type`, `name`, `title`, `pattern`) VALUES INSERT INTO `prefix_user_field` (`id`, `type`, `name`, `title`, `pattern`) VALUES
(1, 'contact', 'phone', 'Телефон', ''), (1, 'contact', 'phone', 'Телефон', ''),
(2, 'contact', 'mail', 'E-mail', '<a href="mailto:{*}">{*}</a>'), (2, 'contact', 'mail', 'E-mail', '<a href="mailto:{*}" rel="nofollow">{*}</a>'),
(3, 'contact', 'skype', 'Skype', '<a href="skype:{*}">{*}</a>'), (3, 'contact', 'skype', 'Skype', '<a href="skype:{*}" rel="nofollow">{*}</a>'),
(4, 'contact', 'icq', 'ICQ', '<a href="http://www.icq.com/people/about_me.php?uin={*}">{*}</a>'), (4, 'contact', 'icq', 'ICQ', '<a href="http://www.icq.com/people/about_me.php?uin={*}" rel="nofollow">{*}</a>'),
(5, 'contact', 'www', 'Сайт', '<a href="http://{*}">{*}</a>'), (5, 'contact', 'www', 'Сайт', '<a href="http://{*}" rel="nofollow">{*}</a>'),
(6, 'social', 'twitter', 'Twitter', '<a href="http://twitter.com/{*}/">{*}</a>'), (6, 'social', 'twitter', 'Twitter', '<a href="http://twitter.com/{*}/" rel="nofollow">{*}</a>'),
(7, 'social', 'facebook', 'Facebook', '<a href="http://facebook.com/{*}">{*}</a>'), (7, 'social', 'facebook', 'Facebook', '<a href="http://facebook.com/{*}" rel="nofollow">{*}</a>'),
(8, 'social', 'vkontakte', 'ВКонтакте', '<a href="http://vk.com/{*}">{*}</a>'), (8, 'social', 'vkontakte', 'ВКонтакте', '<a href="http://vk.com/{*}" rel="nofollow">{*}</a>'),
(9, 'social', 'odnoklassniki', 'Одноклассники', '<a href="http://www.odnoklassniki.ru/profile/{*}/">{*}</a>'); (9, 'social', 'odnoklassniki', 'Одноклассники', '<a href="http://www.odnoklassniki.ru/profile/{*}/" rel="nofollow">{*}</a>');
-- -------------------------------------------------------- -- --------------------------------------------------------
@ -769,8 +769,10 @@ CREATE TABLE IF NOT EXISTS `prefix_vote` (
`vote_direction` tinyint(2) DEFAULT '0', `vote_direction` tinyint(2) DEFAULT '0',
`vote_value` float(9,3) NOT NULL DEFAULT '0.000', `vote_value` float(9,3) NOT NULL DEFAULT '0.000',
`vote_date` datetime NOT NULL, `vote_date` datetime NOT NULL,
`vote_ip` varchar(15) NOT NULL DEFAULT '',
PRIMARY KEY (`target_id`,`target_type`,`user_voter_id`), PRIMARY KEY (`target_id`,`target_type`,`user_voter_id`),
KEY `user_voter_id` (`user_voter_id`) KEY `user_voter_id` (`user_voter_id`),
KEY `vote_ip` (`vote_ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --

View file

@ -21,7 +21,7 @@
*/ */
class PluginPage_HookPage extends Hook { class PluginPage_HookPage extends Hook {
public function RegisterHook() { public function RegisterHook() {
$this->AddHook('template_main_menu','Menu'); $this->AddHook('template_main_menu_item','Menu');
} }
public function Menu() { public function Menu() {

View file

@ -14,6 +14,8 @@
{hook run='admin_action_item'} {hook run='admin_action_item'}
</ul> </ul>
{hook run='admin_action'}
{include file='footer.tpl'} {include file='footer.tpl'}

View file

@ -81,6 +81,7 @@
<footer class="blog-footer"> <footer class="blog-footer">
{hook run='blog_info_begin' oBlog=$oBlog}
<strong>{$aLang.blog_user_administrators} ({$iCountBlogAdministrators}):</strong> <strong>{$aLang.blog_user_administrators} ({$iCountBlogAdministrators}):</strong>
<a href="{$oUserOwner->getUserWebPath()}" class="user"><i class="icon-user"></i>{$oUserOwner->getLogin()}</a> <a href="{$oUserOwner->getUserWebPath()}" class="user"><i class="icon-user"></i>{$oUserOwner->getLogin()}</a>
{if $aBlogAdministrators} {if $aBlogAdministrators}
@ -115,13 +116,14 @@
{else} {else}
{$aLang.blog_user_readers_empty} {$aLang.blog_user_readers_empty}
{/if} {/if}
{hook run='blog_info_end' oBlog=$oBlog}
</footer> </footer>
</div> </div>
<a href="#" class="blog-more" id="blog-more" onclick="return ls.blog.toggleInfo()">{$aLang.blog_expand_info}</a> <a href="#" class="blog-more" id="blog-more" onclick="return ls.blog.toggleInfo()">{$aLang.blog_expand_info}</a>
</div> </div>
{hook run='blog_info' oBlog=$oBlog}
<div class="nav-filter-wrapper"> <div class="nav-filter-wrapper">
<ul class="nav nav-filter"> <ul class="nav nav-filter">

View file

@ -13,6 +13,8 @@
<h2 class="page-header">{$aLang.user_authorization}</h2> <h2 class="page-header">{$aLang.user_authorization}</h2>
{hook run='login_begin'}
<form action="{router page='login'}" method="POST" id="login-form"> <form action="{router page='login'}" method="POST" id="login-form">
{hook run='form_login_begin'} {hook run='form_login_begin'}
@ -48,6 +50,6 @@
</form> </form>
{/if} {/if}
{hook run='login_end'}
{include file='footer.tpl'} {include file='footer.tpl'}

View file

@ -1,3 +1,4 @@
{hook run='people_sidebar_begin'}
<section class="block"> <section class="block">
<header class="block-header"> <header class="block-header">
<h3>{$aLang.user_stats}</h3> <h3>{$aLang.user_stats}</h3>
@ -24,3 +25,5 @@
{insert name="block" block='tagsCountry'} {insert name="block" block='tagsCountry'}
{insert name="block" block='tagsCity'} {insert name="block" block='tagsCity'}
{hook run='people_sidebar_end'}

View file

@ -1,4 +1,5 @@
<div class="profile"> <div class="profile">
{hook run='profile_top_begin' oUserProfile=$oUserProfile}
<a href="{$oUserProfile->getUserWebPath()}"><img src="{$oUserProfile->getProfileAvatarPath(48)}" alt="avatar" class="avatar" /></a> <a href="{$oUserProfile->getUserWebPath()}"><img src="{$oUserProfile->getProfileAvatarPath(48)}" alt="avatar" class="avatar" /></a>
<div id="vote_area_user_{$oUserProfile->getId()}" class="vote {if $oUserProfile->getRating()>=0}vote-count-positive{else}vote-count-negative{/if} {if $oVote} voted {if $oVote->getDirection()>0}voted-up{elseif $oVote->getDirection()<0}voted-down{/if}{/if}"> <div id="vote_area_user_{$oUserProfile->getId()}" class="vote {if $oUserProfile->getRating()>=0}vote-count-positive{else}vote-count-negative{/if} {if $oVote} voted {if $oVote->getDirection()>0}voted-up{elseif $oVote->getDirection()<0}voted-down{/if}{/if}">
@ -18,4 +19,5 @@
{if $oUserProfile->getProfileName()} {if $oUserProfile->getProfileName()}
<p class="user-name">{$oUserProfile->getProfileName()|escape:'html'}</p> <p class="user-name">{$oUserProfile->getProfileName()|escape:'html'}</p>
{/if} {/if}
{hook run='profile_top_end' oUserProfile=$oUserProfile}
</div> </div>

View file

@ -1,3 +1,5 @@
{hook run='profile_sidebar_begin' oUserProfile=$oUserProfile}
<section class="block block-type-profile"> <section class="block block-type-profile">
<div class="profile-photo-wrapper"> <div class="profile-photo-wrapper">
<div class="status {if $oUserProfile->isOnline()}status-online{else}status-offline{/if}">{if $oUserProfile->isOnline()}{$aLang.user_status_online}{else}{$aLang.user_status_offline}{/if}</div> <div class="status {if $oUserProfile->isOnline()}status-online{else}status-offline{/if}">{if $oUserProfile->isOnline()}{$aLang.user_status_online}{else}{$aLang.user_status_offline}{/if}</div>
@ -90,10 +92,11 @@
</section> </section>
{/if} {/if}
{hook run='profile_sidebar_menu_before' oUserProfile=$oUserProfile}
<section class="block block-type-profile-nav"> <section class="block block-type-profile-nav">
<ul class="nav nav-pills nav-profile"> <ul class="nav nav-pills nav-profile">
{hook run='profile_sidebar_menu_item_first' oUserProfile=$oUserProfile}
<li {if $sAction=='profile' && ($aParams[0]=='whois' or $aParams[0]=='')}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}">{$aLang.user_menu_profile_whois}</a></li> <li {if $sAction=='profile' && ($aParams[0]=='whois' or $aParams[0]=='')}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}">{$aLang.user_menu_profile_whois}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='wall'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}wall/">{$aLang.user_menu_profile_wall}{if ($iCountWallUser)>0} ({$iCountWallUser}){/if}</a></li> <li {if $sAction=='profile' && $aParams[0]=='wall'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}wall/">{$aLang.user_menu_profile_wall}{if ($iCountWallUser)>0} ({$iCountWallUser}){/if}</a></li>
<li {if $sAction=='profile' && $aParams[0]=='created'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}created/topics/">{$aLang.user_menu_publication}{if ($iCountCreated)>0} ({$iCountCreated}){/if}</a></li> <li {if $sAction=='profile' && $aParams[0]=='created'}class="active"{/if}><a href="{$oUserProfile->getUserWebPath()}created/topics/">{$aLang.user_menu_publication}{if ($iCountCreated)>0} ({$iCountCreated}){/if}</a></li>
@ -105,5 +108,8 @@
<li {if $sAction=='talk'}class="active"{/if}><a href="{router page='talk'}">{$aLang.talk_menu_inbox}{if $iUserCurrentCountTalkNew} ({$iUserCurrentCountTalkNew}){/if}</a></li> <li {if $sAction=='talk'}class="active"{/if}><a href="{router page='talk'}">{$aLang.talk_menu_inbox}{if $iUserCurrentCountTalkNew} ({$iUserCurrentCountTalkNew}){/if}</a></li>
<li {if $sAction=='settings'}class="active"{/if}><a href="{router page='settings'}">{$aLang.settings_menu}</a></li> <li {if $sAction=='settings'}class="active"{/if}><a href="{router page='settings'}">{$aLang.settings_menu}</a></li>
{/if} {/if}
{hook run='profile_sidebar_menu_item_last' oUserProfile=$oUserProfile}
</ul> </ul>
</section> </section>
{hook run='profile_sidebar_end' oUserProfile=$oUserProfile}

View file

@ -75,7 +75,7 @@
</table> </table>
{/if} {/if}
{hook run='profile_whois_item_after_privat' oUserProfile=$oUserProfile}
{assign var="aUserFieldContactValues" value=$oUserProfile->getUserFieldValues(true,array('contact'))} {assign var="aUserFieldContactValues" value=$oUserProfile->getUserFieldValues(true,array('contact'))}
{if $aUserFieldContactValues} {if $aUserFieldContactValues}
@ -107,9 +107,6 @@
{/if} {/if}
{hook run='profile_whois_item' oUserProfile=$oUserProfile} {hook run='profile_whois_item' oUserProfile=$oUserProfile}
@ -215,5 +212,6 @@
{include file='user_list_avatar.tpl' aUsersList=$aUsersFriend} {include file='user_list_avatar.tpl' aUsersList=$aUsersFriend}
{/if} {/if}
{hook run='profile_whois_item_end' oUserProfile=$oUserProfile}
{include file='footer.tpl'} {include file='footer.tpl'}

View file

@ -26,6 +26,7 @@
<h2 class="page-header">{$aLang.registration}</h2> <h2 class="page-header">{$aLang.registration}</h2>
{hook run='registration_begin'}
<form action="{router page='registration'}" method="post" id="registration-form"> <form action="{router page='registration'}" method="post" id="registration-form">
{hook run='form_registration_begin'} {hook run='form_registration_begin'}
@ -67,6 +68,6 @@
<button name="submit_register" class="button button-primary" id="registration-form-submit" disabled="disabled">{$aLang.registration_submit}</button> <button name="submit_register" class="button button-primary" id="registration-form-submit" disabled="disabled">{$aLang.registration_submit}</button>
</form> </form>
{hook run='registration_end'}
{include file='footer.tpl'} {include file='footer.tpl'}

View file

@ -1,12 +1,16 @@
{include file='header.tpl'} {include file='header.tpl'}
<h2 class="page-header">{$aLang.search}</h2> <h2 class="page-header">{$aLang.search}</h2>
{hook run='search_begin'}
<form action="{router page='search'}topics/" class="search"> <form action="{router page='search'}topics/" class="search">
{hook run='search_form_begin'}
<input type="text" placeholder="{$aLang.search}" maxlength="255" name="q" class="input-text"> <input type="text" placeholder="{$aLang.search}" maxlength="255" name="q" class="input-text">
<input type="submit" value="" title="{$aLang.search_submit}" class="input-submit icon icon-search"> <input type="submit" value="" title="{$aLang.search_submit}" class="input-submit icon icon-search">
{hook run='search_form_end'}
</form> </form>
{hook run='search_end'}
{include file='footer.tpl'} {include file='footer.tpl'}

View file

@ -6,8 +6,10 @@
<form action="{router page='search'}topics/" class="search"> <form action="{router page='search'}topics/" class="search">
{hook run='search_form_begin'}
<input type="text" value="{$aReq.q|escape:'html'}" placeholder="{$aLang.search}" maxlength="255" name="q" class="input-text"> <input type="text" value="{$aReq.q|escape:'html'}" placeholder="{$aLang.search}" maxlength="255" name="q" class="input-text">
<input type="submit" value="" title="{$aLang.search_submit}" class="input-submit icon icon-search"> <input type="submit" value="" title="{$aLang.search_submit}" class="input-submit icon icon-search">
{hook run='search_form_end'}
</form> </form>
@ -21,6 +23,8 @@
{$aLang.search_results_count_topics} {$aLang.search_results_count_topics}
{elseif $sType=="comments"} {elseif $sType=="comments"}
{$aLang.search_results_count_comments} {$aLang.search_results_count_comments}
{else}
{hook run='search_result_item' sType=$sType}
{/if} {/if}
</a> </a>
</li> </li>
@ -32,6 +36,8 @@
{include file='topic_list.tpl'} {include file='topic_list.tpl'}
{elseif $aReq.sType == 'comments'} {elseif $aReq.sType == 'comments'}
{include file='comment_list.tpl'} {include file='comment_list.tpl'}
{else}
{hook run='search_result' sType=$aReq.sType}
{/if} {/if}
{else} {else}
{$aLang.search_results_empty} {$aLang.search_results_empty}

View file

@ -8,6 +8,7 @@
{include file='menu.settings.tpl'} {include file='menu.settings.tpl'}
{hook run='settings_account_begin'}
<form method="post" enctype="multipart/form-data"> <form method="post" enctype="multipart/form-data">
{hook run='form_settings_account_begin'} {hook run='form_settings_account_begin'}
@ -55,6 +56,6 @@
<button name="submit_account_edit" class="button button-primary" />{$aLang.settings_account_submit}</button> <button name="submit_account_edit" class="button button-primary" />{$aLang.settings_account_submit}</button>
</form> </form>
{hook run='settings_account_end'}
{include file='footer.tpl'} {include file='footer.tpl'}

View file

@ -4,7 +4,10 @@
<small class="note note-header input-width-400">{$aLang.settings_invite_notice} "{$aLang.settings_invite_submit}"</small> <small class="note note-header input-width-400">{$aLang.settings_invite_notice} "{$aLang.settings_invite_submit}"</small>
{hook run='settings_invite_begin'}
<form action="" method="POST" enctype="multipart/form-data"> <form action="" method="POST" enctype="multipart/form-data">
{hook run='form_settings_invite_begin'}
<input type="hidden" name="security_ls_key" value="{$LIVESTREET_SECURITY_KEY}" /> <input type="hidden" name="security_ls_key" value="{$LIVESTREET_SECURITY_KEY}" />
<p> <p>
@ -16,8 +19,11 @@
<input type="text" name="invite_mail" id="invite_mail" class="input-text input-width-200" /><br /> <input type="text" name="invite_mail" id="invite_mail" class="input-text input-width-200" /><br />
<small class="note">{$aLang.settings_invite_mail_notice}</small></p> <small class="note">{$aLang.settings_invite_mail_notice}</small></p>
{hook run='form_settings_invite_end'}
<button name="submit_invite" class="button button-primary" />{$aLang.settings_invite_submit}</button> <button name="submit_invite" class="button button-primary" />{$aLang.settings_invite_submit}</button>
</form> </form>
{hook run='settings_invite_end'}
{include file='footer.tpl'} {include file='footer.tpl'}

View file

@ -27,6 +27,7 @@
<a class="icon-remove" title="{$aLang.user_field_delete}" href="#" onclick="return ls.userfield.removeFormField(this);"></a> <a class="icon-remove" title="{$aLang.user_field_delete}" href="#" onclick="return ls.userfield.removeFormField(this);"></a>
</p> </p>
{hook run='settings_profile_begin'}
<form method="post" enctype="multipart/form-data" class="form-profile"> <form method="post" enctype="multipart/form-data" class="form-profile">
{hook run='form_settings_profile_begin'} {hook run='form_settings_profile_begin'}
@ -199,6 +200,6 @@
<button name="submit_profile_edit" class="button button-primary" />{$aLang.settings_profile_submit}</button> <button name="submit_profile_edit" class="button button-primary" />{$aLang.settings_profile_submit}</button>
</form> </form>
{hook run='settings_profile_end'}
{include file='footer.tpl'} {include file='footer.tpl'}

View file

@ -11,6 +11,8 @@
<small class="note note-header input-width-400">{$aLang.settings_tuning_notice}:</small> <small class="note note-header input-width-400">{$aLang.settings_tuning_notice}:</small>
{hook run='settings_tuning_begin'}
<form action="{router page='settings'}tuning/" method="POST" enctype="multipart/form-data"> <form action="{router page='settings'}tuning/" method="POST" enctype="multipart/form-data">
{hook run='form_settings_tuning_begin'} {hook run='form_settings_tuning_begin'}
@ -29,6 +31,6 @@
<input type="submit" name="submit_settings_tuning" value="{$aLang.settings_tuning_submit}" class="button" /> <input type="submit" name="submit_settings_tuning" value="{$aLang.settings_tuning_submit}" class="button" />
</form> </form>
{hook run='settings_tuning_end'}
{include file='footer.tpl'} {include file='footer.tpl'}

View file

@ -7,6 +7,7 @@
{include file='actions/ActionTalk/friends.tpl'} {include file='actions/ActionTalk/friends.tpl'}
{hook run='talk_add_begin'}
<div class="topic" style="display: none;"> <div class="topic" style="display: none;">
<div class="content" id="text_preview"></div> <div class="content" id="text_preview"></div>
@ -33,5 +34,6 @@
<button class="button" name="submit_preview" onclick="jQuery('#text_preview').parent().show(); ls.tools.textPreview('talk_text',false); return false;">{$aLang.topic_create_submit_preview}</button> <button class="button" name="submit_preview" onclick="jQuery('#text_preview').parent().show(); ls.tools.textPreview('talk_text',false); return false;">{$aLang.topic_create_submit_preview}</button>
</form> </form>
{hook run='talk_add_end'}
{include file='footer.tpl'} {include file='footer.tpl'}

View file

@ -1,4 +1,3 @@
/* Голосование /* Голосование
---------------------------------------------------------------*/ ---------------------------------------------------------------*/
.vote .vote-count { display: inline-block; font-weight: bold; color: #aaa; font-size: 14px; } .vote .vote-count { display: inline-block; font-weight: bold; color: #aaa; font-size: 14px; }

View file

@ -80,7 +80,8 @@
{assign var=body_classes value=$body_classes|cat:' ls-user-role-not-admin'} {assign var=body_classes value=$body_classes|cat:' ls-user-role-not-admin'}
{/if} {/if}
{add_block group='toolbar' name='toolbar_admin.tpl' priority=100}
{add_block group='toolbar' name='toolbar_scrollup.tpl' priority=-100}
<body class="{$body_classes}"> <body class="{$body_classes}">
{hook run='body_begin'} {hook run='body_begin'}

View file

@ -4,6 +4,7 @@
<input type="submit" value="" title="{$aLang.search_submit}" class="input-submit icon icon-search"> <input type="submit" value="" title="{$aLang.search_submit}" class="input-submit icon icon-search">
</form> </form>
{hook run='userbar_nav'}
<ul class="nav nav-userbar"> <ul class="nav nav-userbar">
{if $oUserCurrent} {if $oUserCurrent}
@ -16,10 +17,10 @@
<li><a href="{router page='topic'}add/" class="write" id="modal_write_show">{$aLang.block_create}</a></li> <li><a href="{router page='topic'}add/" class="write" id="modal_write_show">{$aLang.block_create}</a></li>
<li><a href="{router page='talk'}" {if $iUserCurrentCountTalkNew}class="new-messages"{/if} id="new_messages" title="{if $iUserCurrentCountTalkNew}{$aLang.user_privat_messages_new}{/if}">{$aLang.user_privat_messages}{if $iUserCurrentCountTalkNew} ({$iUserCurrentCountTalkNew}){/if}</a></li> <li><a href="{router page='talk'}" {if $iUserCurrentCountTalkNew}class="new-messages"{/if} id="new_messages" title="{if $iUserCurrentCountTalkNew}{$aLang.user_privat_messages_new}{/if}">{$aLang.user_privat_messages}{if $iUserCurrentCountTalkNew} ({$iUserCurrentCountTalkNew}){/if}</a></li>
<li><a href="{router page='settings'}profile/">{$aLang.user_settings}</a></li> <li><a href="{router page='settings'}profile/">{$aLang.user_settings}</a></li>
<li><a href="{router page='login'}exit/?security_ls_key={$LIVESTREET_SECURITY_KEY}">{$aLang.exit}</a></li>
{hook run='userbar_item'} {hook run='userbar_item'}
<li><a href="{router page='login'}exit/?security_ls_key={$LIVESTREET_SECURITY_KEY}">{$aLang.exit}</a></li>
{else} {else}
{hook run='userbar_item'}
<li><a href="{router page='login'}" class="js-login-form-show">{$aLang.user_login_submit}</a></li> <li><a href="{router page='login'}" class="js-login-form-show">{$aLang.user_login_submit}</a></li>
<li><a href="{router page='registration'}" class="js-registration-form-show">{$aLang.registration_submit}</a></li> <li><a href="{router page='registration'}" class="js-registration-form-show">{$aLang.registration_submit}</a></li>
{/if} {/if}
@ -28,8 +29,10 @@
<header id="header" role="banner"> <header id="header" role="banner">
{hook run='header_banner_begin'}
<hgroup class="site-info"> <hgroup class="site-info">
<h1 class="site-name"><a href="{cfg name='path.root.web'}">{cfg name='view.name'}</a></h1> <h1 class="site-name"><a href="{cfg name='path.root.web'}">{cfg name='view.name'}</a></h1>
<h2 class="site-description">{cfg name='view.description'}</h2> <h2 class="site-description">{cfg name='view.description'}</h2>
</hgroup> </hgroup>
{hook run='header_banner_end'}
</header> </header>

View file

@ -1,9 +1,9 @@
<h2 class="page-header">{$aLang.user_list}</h2> <h2 class="page-header">{$aLang.user_list}</h2>
<ul class="nav nav-pills"> <ul class="nav nav-pills">
<li {if $sEvent=='' || $sEvent=='index'}class="active"{/if}><a href="{router page='people'}">{$aLang.people_menu_users_all}</a></li> <li {if $sMenuItemSelect=='all'}class="active"{/if}><a href="{router page='people'}">{$aLang.people_menu_users_all}</a></li>
<li {if $sEvent=='online'}class="active"{/if}><a href="{router page='people'}online/">{$aLang.people_menu_users_online}</a></li> <li {if $sMenuItemSelect=='online'}class="active"{/if}><a href="{router page='people'}online/">{$aLang.people_menu_users_online}</a></li>
<li {if $sEvent=='new'}class="active"{/if}><a href="{router page='people'}new/">{$aLang.people_menu_users_new}</a></li> <li {if $sMenuItemSelect=='new'}class="active"{/if}><a href="{router page='people'}new/">{$aLang.people_menu_users_new}</a></li>
{hook run='menu_people_people_item'} {hook run='menu_people_people_item'}
</ul> </ul>

View file

@ -1,20 +1,20 @@
<h3 class="profile-page-header">{$aLang.user_menu_publication}</h3> <h3 class="profile-page-header">{$aLang.user_menu_publication}</h3>
<ul class="nav nav-pills nav-pills-profile"> <ul class="nav nav-pills nav-pills-profile">
<li {if $aParams[1]=='topics' or $aParams[1]==''}class="active"{/if}> <li {if $sMenuSubItemSelect=='topics'}class="active"{/if}>
<a href="{$oUserProfile->getUserWebPath()}created/topics/">{$aLang.topic_title} {if $iCountTopicUser} ({$iCountTopicUser}) {/if}</a> <a href="{$oUserProfile->getUserWebPath()}created/topics/">{$aLang.topic_title} {if $iCountTopicUser} ({$iCountTopicUser}) {/if}</a>
</li> </li>
<li {if $aParams[1]=='comments'}class="active"{/if}> <li {if $sMenuSubItemSelect=='comments'}class="active"{/if}>
<a href="{$oUserProfile->getUserWebPath()}created/comments/">{$aLang.user_menu_publication_comment} {if $iCountCommentUser} ({$iCountCommentUser}) {/if}</a> <a href="{$oUserProfile->getUserWebPath()}created/comments/">{$aLang.user_menu_publication_comment} {if $iCountCommentUser} ({$iCountCommentUser}) {/if}</a>
</li> </li>
{if $oUserCurrent and $oUserCurrent->getId()==$oUserProfile->getId()} {if $oUserCurrent and $oUserCurrent->getId()==$oUserProfile->getId()}
<li {if $aParams[1]=='notes'}class="active"{/if}> <li {if $sMenuSubItemSelect=='notes'}class="active"{/if}>
<a href="{$oUserProfile->getUserWebPath()}created/notes/">{$aLang.user_menu_profile_notes} {if $iCountNoteUser} ({$iCountNoteUser}) {/if}</a> <a href="{$oUserProfile->getUserWebPath()}created/notes/">{$aLang.user_menu_profile_notes} {if $iCountNoteUser} ({$iCountNoteUser}) {/if}</a>
</li> </li>
{/if} {/if}
{hook run='menu_profile_created_item'} {hook run='menu_profile_created_item' oUserProfile=$oUserProfile}
</ul> </ul>
{hook run='menu_profile_created'} {hook run='menu_profile_created' oUserProfile=$oUserProfile}

View file

@ -1,10 +1,14 @@
<h3 class="profile-page-header">{$aLang.user_menu_profile_favourites}</h3> <h3 class="profile-page-header">{$aLang.user_menu_profile_favourites}</h3>
<ul class="nav nav-pills nav-pills-profile"> <ul class="nav nav-pills nav-pills-profile">
<li {if $aParams[1]=='topics' or $aParams[1]==''}class="active"{/if}> <li {if $sMenuSubItemSelect=='topics'}class="active"{/if}>
<a href="{$oUserProfile->getUserWebPath()}favourites/topics/">{$aLang.user_menu_profile_favourites_topics} {if $iCountTopicFavourite} ({$iCountTopicFavourite}) {/if}</a> <a href="{$oUserProfile->getUserWebPath()}favourites/topics/">{$aLang.user_menu_profile_favourites_topics} {if $iCountTopicFavourite} ({$iCountTopicFavourite}) {/if}</a>
</li> </li>
<li {if $aParams[1]=='comments'}class="active"{/if}> <li {if $sMenuSubItemSelect=='comments'}class="active"{/if}>
<a href="{$oUserProfile->getUserWebPath()}favourites/comments/">{$aLang.user_menu_profile_favourites_comments} {if $iCountCommentFavourite} ({$iCountCommentFavourite}) {/if}</a> <a href="{$oUserProfile->getUserWebPath()}favourites/comments/">{$aLang.user_menu_profile_favourites_comments} {if $iCountCommentFavourite} ({$iCountCommentFavourite}) {/if}</a>
</li> </li>
{hook run='menu_profile_favourite_item' oUserProfile=$oUserProfile}
</ul> </ul>
{hook run='menu_profile_favourite' oUserProfile=$oUserProfile}

View file

@ -1,13 +1,13 @@
<h3 class="profile-page-header">{$aLang.talk_menu_inbox}</h3> <h3 class="profile-page-header">{$aLang.talk_menu_inbox}</h3>
<ul class="nav nav-pills"> <ul class="nav nav-pills">
<li {if $sEvent=='inbox' and $aParams[0]!='new'}class="active"{/if}><a href="{router page='talk'}">{$aLang.talk_menu_inbox}</a></li> <li {if $sMenuSubItemSelect=='inbox'}class="active"{/if}><a href="{router page='talk'}">{$aLang.talk_menu_inbox}</a></li>
{if $iUserCurrentCountTalkNew} {if $iUserCurrentCountTalkNew}
<li {if $sEvent=='inbox' and $aParams[0]=='new'}class="active"{/if}><a href="{router page='talk'}inbox/new/">{$aLang.talk_menu_inbox_new}</a></li> <li {if $sMenuSubItemSelect=='new'}class="active"{/if}><a href="{router page='talk'}inbox/new/">{$aLang.talk_menu_inbox_new}</a></li>
{/if} {/if}
<li {if $sEvent=='add'}class="active"{/if}><a href="{router page='talk'}add/">{$aLang.talk_menu_inbox_create}</a></li> <li {if $sMenuSubItemSelect=='add'}class="active"{/if}><a href="{router page='talk'}add/">{$aLang.talk_menu_inbox_create}</a></li>
<li {if $sEvent=='favourites'}class="active"{/if}><a href="{router page='talk'}favourites/">{$aLang.talk_menu_inbox_favourites}{if $iCountTalkFavourite} ({$iCountTalkFavourite}){/if}</a></li> <li {if $sMenuSubItemSelect=='favourites'}class="active"{/if}><a href="{router page='talk'}favourites/">{$aLang.talk_menu_inbox_favourites}{if $iCountTalkFavourite} ({$iCountTalkFavourite}){/if}</a></li>
<li {if $sEvent=='blacklist'}class="active"{/if}><a href="{router page='talk'}blacklist/">{$aLang.talk_menu_inbox_blacklist}</a></li> <li {if $sMenuSubItemSelect=='blacklist'}class="active"{/if}><a href="{router page='talk'}blacklist/">{$aLang.talk_menu_inbox_blacklist}</a></li>
{hook run='menu_talk_talk_item'} {hook run='menu_talk_talk_item'}
</ul> </ul>

View file

@ -5,6 +5,7 @@
<li {if $sMenuHeadItemSelect=='people'}class="active"{/if}><a href="{router page='people'}">{$aLang.people}</a></li> <li {if $sMenuHeadItemSelect=='people'}class="active"{/if}><a href="{router page='people'}">{$aLang.people}</a></li>
<li {if $sMenuHeadItemSelect=='stream'}class="active"{/if}><a href="{router page='stream'}">{$aLang.stream_menu}</a></li> <li {if $sMenuHeadItemSelect=='stream'}class="active"{/if}><a href="{router page='stream'}">{$aLang.stream_menu}</a></li>
{hook run='main_menu'} {hook run='main_menu_item'}
</ul> </ul>
{hook run='main_menu'}
</nav> </nav>

View file

@ -1,5 +1,6 @@
{if $bIsShowStatsPerformance and $oUserCurrent and $oUserCurrent->isAdministrator()} {if $bIsShowStatsPerformance and $oUserCurrent and $oUserCurrent->isAdministrator()}
<div class="stat-performance"> <div class="stat-performance">
{hook run='statistics_performance_begin'}
<table> <table>
<tr> <tr>
<td> <td>
@ -19,7 +20,9 @@
time load modules: <strong>{$aStatsPerformance.engine.time_load_module}</strong><br /> time load modules: <strong>{$aStatsPerformance.engine.time_load_module}</strong><br />
full time: <strong>{$iTimeFullPerformance}</strong> full time: <strong>{$iTimeFullPerformance}</strong>
</td> </td>
{hook run='statistics_performance_item'}
</tr> </tr>
</table> </table>
{hook run='statistics_performance_end'}
</div> </div>
{/if} {/if}

View file

@ -1,13 +1,3 @@
<aside class="toolbar"> <aside class="toolbar">
{include file='blocks.tpl' group='toolbar'} {include file='blocks.tpl' group='toolbar'}
{if $oUserCurrent and $oUserCurrent->isAdministrator()}
<section class="toolbar-admin">
<a href="{router page='admin'}" title="{$aLang.admin_title}">
<i class="icon-cog"></i>
</a>
</section>
{/if}
{include file='toolbar_scrollup.tpl'}
</aside> </aside>

View file

@ -0,0 +1,7 @@
{if $oUserCurrent and $oUserCurrent->isAdministrator()}
<section class="toolbar-admin">
<a href="{router page='admin'}" title="{$aLang.admin_title}">
<i class="icon-cog"></i>
</a>
</section>
{/if}

View file

@ -1,2 +1,4 @@
{if $LS->Topic_IsAllowTopicType($oTopic->getType())}
{assign var="sTopicTemplateName" value="topic_`$oTopic->getType()`.tpl"} {assign var="sTopicTemplateName" value="topic_`$oTopic->getType()`.tpl"}
{include file=$sTopicTemplateName} {include file=$sTopicTemplateName}
{/if}

View file

@ -2,8 +2,10 @@
{add_block group='toolbar' name='toolbar_topic.tpl' iCountTopic=count($aTopics)} {add_block group='toolbar' name='toolbar_topic.tpl' iCountTopic=count($aTopics)}
{foreach from=$aTopics item=oTopic} {foreach from=$aTopics item=oTopic}
{if $LS->Topic_IsAllowTopicType($oTopic->getType())}
{assign var="sTopicTemplateName" value="topic_`$oTopic->getType()`.tpl"} {assign var="sTopicTemplateName" value="topic_`$oTopic->getType()`.tpl"}
{include file=$sTopicTemplateName bTopicList=true} {include file=$sTopicTemplateName bTopicList=true}
{/if}
{/foreach} {/foreach}
{include file='paging.tpl' aPaging=$aPaging} {include file='paging.tpl' aPaging=$aPaging}

View file

@ -40,6 +40,8 @@
<p><label for="img_file">{$aLang.uploadimg_url}:</label> <p><label for="img_file">{$aLang.uploadimg_url}:</label>
<input type="text" name="img_url" id="img_url" value="http://" class="input-text input-width-full" /></p> <input type="text" name="img_url" id="img_url" value="http://" class="input-text input-width-full" /></p>
{hook run="uploadimg_link_additional"}
<button class="button button-primary" onclick="ls.topic.insertImageToEditor(jQuery('#img_url').val());">{$aLang.uploadimg_link_submit_paste}</button> <button class="button button-primary" onclick="ls.topic.insertImageToEditor(jQuery('#img_url').val());">{$aLang.uploadimg_link_submit_paste}</button>
{$aLang.or} {$aLang.or}
<button class="button button-primary" onclick="ls.ajaxUploadImg('block_upload_img_content_link','{$sToLoad}');">{$aLang.uploadimg_link_submit_load}</button> <button class="button button-primary" onclick="ls.ajaxUploadImg('block_upload_img_content_link','{$sToLoad}');">{$aLang.uploadimg_link_submit_load}</button>

View file

@ -29,6 +29,7 @@
<div id="block_popup_login_content_login" class="tab-content"> <div id="block_popup_login_content_login" class="tab-content">
{hook run='login_popup_begin'}
<form action="{router page='login'}" method="post" id="popup-login-form"> <form action="{router page='login'}" method="post" id="popup-login-form">
{hook run='form_login_popup_begin'} {hook run='form_login_popup_begin'}
@ -46,6 +47,7 @@
<input type="hidden" name="return-path" value="{$PATH_WEB_CURRENT|escape:'html'}"> <input type="hidden" name="return-path" value="{$PATH_WEB_CURRENT|escape:'html'}">
<button name="submit_login" class="button button-primary" id="popup-login-form-submit" disabled="disabled">{$aLang.user_login_submit}</button> <button name="submit_login" class="button button-primary" id="popup-login-form-submit" disabled="disabled">{$aLang.user_login_submit}</button>
</form> </form>
{hook run='login_popup_end'}
</div> </div>
@ -74,7 +76,7 @@
}); });
</script> </script>
{hook run='registration_begin' isPopup=true}
<form action="{router page='registration'}" method="post" id="popup-registration-form"> <form action="{router page='registration'}" method="post" id="popup-registration-form">
{hook run='form_registration_begin' isPopup=true} {hook run='form_registration_begin' isPopup=true}
@ -115,6 +117,7 @@
<input type="hidden" name="return-path" value="{$PATH_WEB_CURRENT|escape:'html'}"> <input type="hidden" name="return-path" value="{$PATH_WEB_CURRENT|escape:'html'}">
<button name="submit_register" class="button button-primary" id="popup-registration-form-submit" disabled="disabled">{$aLang.registration_submit}</button> <button name="submit_register" class="button button-primary" id="popup-registration-form-submit" disabled="disabled">{$aLang.registration_submit}</button>
</form> </form>
{hook run='registration_end' isPopup=true}
</div> </div>
{/if} {/if}

View file

@ -31,6 +31,7 @@
<a href="{router page='topic'}saved/" class="write-item-image"></a> <a href="{router page='topic'}saved/" class="write-item-image"></a>
<a href="{router page='topic'}saved/" class="write-item-link">{$aLang.topic_menu_saved} {if $iUserCurrentCountTopicDraft}({$iUserCurrentCountTopicDraft}){/if}</a> <a href="{router page='topic'}saved/" class="write-item-link">{$aLang.topic_menu_saved} {if $iUserCurrentCountTopicDraft}({$iUserCurrentCountTopicDraft}){/if}</a>
</li> </li>
{hook run='write_item' isPopup=true}
</ul> </ul>
</div> </div>
{/strip} {/strip}