1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-03 06:55:03 +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'))) {
$oViewer=$this->Viewer_GetLocalViewer();
$oViewer->Assign('aComments',$aComments);
$sTextResult=$oViewer->Fetch("block.stream_comment.tpl");
$sTextResult=$oViewer->Fetch("blocks/block.stream_comment.tpl");
$this->Viewer_AssignAjax('sText',$sTextResult);
} else {
$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'))) {
$oViewer=$this->Viewer_GetLocalViewer();
$oViewer->Assign('oTopics',$oTopics);
$sTextResult=$oViewer->Fetch("block.stream_topic.tpl");
$sTextResult=$oViewer->Fetch("blocks/block.stream_topic.tpl");
$this->Viewer_AssignAjax('sText',$sTextResult);
} else {
$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'];
$oViewer=$this->Viewer_GetLocalViewer();
$oViewer->Assign('aBlogs',$aBlogs);
$sTextResult=$oViewer->Fetch("block.blogs_top.tpl");
$sTextResult=$oViewer->Fetch("blocks/block.blogs_top.tpl");
$this->Viewer_AssignAjax('sText',$sTextResult);
} else {
$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'))) {
$oViewer=$this->Viewer_GetLocalViewer();
$oViewer->Assign('aBlogs',$aBlogs);
$sTextResult=$oViewer->Fetch("block.blogs_top.tpl");
$sTextResult=$oViewer->Fetch("blocks/block.blogs_top.tpl");
$this->Viewer_AssignAjax('sText',$sTextResult);
} else {
$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'))) {
$oViewer=$this->Viewer_GetLocalViewer();
$oViewer->Assign('aBlogs',$aBlogs);
$sTextResult=$oViewer->Fetch("block.blogs_top.tpl");
$sTextResult=$oViewer->Fetch("blocks/block.blogs_top.tpl");
$this->Viewer_AssignAjax('sText',$sTextResult);
} else {
$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'),
'sMsg'=>$this->Lang_Get('blog_user_invite_add_ok',array('login'=>htmlspecialchars($sUser))),
'sUserLogin'=>htmlspecialchars($sUser),
'sUserWebPath'=>$oUser->getUserWebPath()
'sUserWebPath'=>$oUser->getUserWebPath(),
'sUserAvatar48'=>$oUser->getProfileAvatarPath(48)
);
$this->SendBlogInvite($oBlog,$oUser);
} else {

View file

@ -26,6 +26,7 @@ class ActionPeople extends Action {
* @var unknown_type
*/
protected $sMenuHeadItemSelect='people';
protected $sMenuItemSelect='all';
/**
* Инициализация
@ -162,6 +163,7 @@ class ActionPeople extends Action {
*
*/
protected function EventOnline() {
$this->sMenuItemSelect='online';
/**
* Последние по визиту на сайт
*/
@ -177,6 +179,7 @@ class ActionPeople extends Action {
*
*/
protected function EventNew() {
$this->sMenuItemSelect='new';
/**
* Последние по регистрации
*/
@ -268,6 +271,7 @@ class ActionPeople extends Action {
* Загружаем в шаблон необходимые переменные
*/
$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 $sMenuSubItemSelect='';
protected $oUserCurrent;
public function Init() {
@ -137,6 +139,7 @@ class ActionProfile extends Action {
if (!$this->CheckUserProfile()) {
return parent::EventNotFound();
}
$this->sMenuSubItemSelect='topics';
/**
* Передан ли номер страницы
*/
@ -174,6 +177,7 @@ class ActionProfile extends Action {
if (!$this->CheckUserProfile()) {
return parent::EventNotFound();
}
$this->sMenuSubItemSelect='comments';
/**
* Передан ли номер страницы
*/
@ -207,6 +211,7 @@ class ActionProfile extends Action {
if (!$this->CheckUserProfile()) {
return parent::EventNotFound();
}
$this->sMenuSubItemSelect='topics';
/**
* Передан ли номер страницы
*/
@ -247,7 +252,7 @@ class ActionProfile extends Action {
if (!$this->oUserCurrent or $this->oUserProfile->getId()!=$this->oUserCurrent->getId()) {
return parent::EventNotFound();
}
$this->sMenuSubItemSelect='topics';
$sTag=$this->GetParamEventMatch(3,0);
/*
* Передан ли номер страницы
@ -287,6 +292,7 @@ class ActionProfile extends Action {
if (!$this->CheckUserProfile()) {
return parent::EventNotFound();
}
$this->sMenuSubItemSelect='comments';
/**
* Передан ли номер страницы
*/
@ -587,6 +593,7 @@ class ActionProfile extends Action {
if (!$this->CheckUserProfile()) {
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('sMenuSubItemSelect',$this->sMenuSubItemSelect);
$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_ACCEPT',ModuleUser::USER_FRIEND_ACCEPT);

View file

@ -293,7 +293,8 @@ class ActionStream extends Action {
$this->Stream_subscribeUser($this->oUserCurrent->getId(), $oUser->getId());
$this->Viewer_AssignAjax('uid', $oUser->getId());
$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'));
}

View file

@ -26,6 +26,8 @@ class ActionTalk extends Action {
* @var unknown_type
*/
protected $oUserCurrent=null;
protected $sMenuSubItemSelect='';
/**
* Массив ID юзеров адресатов
*
@ -126,6 +128,7 @@ class ActionTalk extends Action {
$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') {
$this->sMenuSubItemSelect='new';
$aFilter['only_new']=true;
$iPerPage=50; // новых отображаем только последние 50 писем, без постраничности
}
@ -268,11 +272,13 @@ class ActionTalk extends Action {
}
protected function EventBlacklist() {
$this->sMenuSubItemSelect='blacklist';
$aUsersBlacklist=$this->Talk_GetBlacklistByUserId($this->oUserCurrent->getId());
$this->Viewer_Assign('aUsersBlacklist',$aUsersBlacklist);
}
protected function EventFavourites() {
protected function EventFavourites() {
$this->sMenuSubItemSelect='favourites';
/**
* Передан ли номер страницы
*/
@ -300,7 +306,8 @@ class ActionTalk extends Action {
$this->Viewer_AddHtmlTitle($this->Lang_Get('talk_favourite_inbox'));
}
protected function EventAdd() {
protected function EventAdd() {
$this->sMenuSubItemSelect='add';
$this->Viewer_AddHtmlTitle($this->Lang_Get('talk_menu_inbox_create'));
/**
@ -340,6 +347,7 @@ class ActionTalk extends Action {
protected function EventRead() {
$this->sMenuSubItemSelect='read';
/**
* Получаем номер сообщения из УРЛ и проверяем существует ли оно
*/
@ -697,7 +705,9 @@ class ActionTalk extends Action {
'sMsgTitle'=>$this->Lang_Get('attention'),
'sMsg'=>$this->Lang_Get('talk_blacklist_add_ok',array('login'=>htmlspecialchars($sUser))),
'sUserId'=>$oUser->getId(),
'sUserLogin'=>htmlspecialchars($sUser)
'sUserLogin'=>htmlspecialchars($sUser),
'sUserWebPath'=>$oUser->getUserWebPath(),
'sUserAvatar48'=>$oUser->getProfileAvatarPath(48)
);
} else {
$aResult[]=array(
@ -952,7 +962,9 @@ class ActionTalk extends Action {
'sMsg'=>$this->Lang_Get('talk_speaker_add_ok',array('login',htmlspecialchars($sUser))),
'sUserId'=>$oUser->getId(),
'sUserLogin'=>$oUser->getLogin(),
'sUserLink'=>$oUser->getUserWebPath()
'sUserLink'=>$oUser->getUserWebPath(),
'sUserWebPath'=>$oUser->getUserWebPath(),
'sUserAvatar48'=>$oUser->getProfileAvatarPath(48)
);
$bState=true;
} else {
@ -1008,7 +1020,9 @@ class ActionTalk extends Action {
'sMsg'=>$this->Lang_Get('talk_speaker_add_ok',array('login',htmlspecialchars($sUser))),
'sUserId'=>$oUser->getId(),
'sUserLogin'=>$oUser->getLogin(),
'sUserLink'=>$oUser->getUserWebPath()
'sUserLink'=>$oUser->getUserWebPath(),
'sUserWebPath'=>$oUser->getUserWebPath(),
'sUserAvatar48'=>$oUser->getProfileAvatarPath(48)
);
$bState=true;
} else {
@ -1073,6 +1087,7 @@ class ActionTalk extends Action {
$this->Viewer_Assign('iCountFavourite',$iCountCommentFavourite+$iCountTopicFavourite);
$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('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_title', $this->Lang_Get('error'));
$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'];
$oViewer=$this->Viewer_GetLocalViewer();
$oViewer->Assign('aBlogs',$aBlogs);
$sTextResult=$oViewer->Fetch("block.blogs_top.tpl");
$sTextResult=$oViewer->Fetch("blocks/block.blogs_top.tpl");
$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'))) {
$oViewer=$this->Viewer_GetLocalViewer();
$oViewer->Assign('aComments',$aComments);
$sTextResult=$oViewer->Fetch("block.stream_comment.tpl");
$sTextResult=$oViewer->Fetch("blocks/block.stream_comment.tpl");
$this->Viewer_Assign('sStreamComments',$sTextResult);
}
}

View file

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

View file

@ -18,10 +18,10 @@
class ModuleBlog_EntityBlogUser extends Entity
{
public function getBlogId() {
return $this->_aData['blog_id'];
return $this->_getDataOne('blog_id');
}
public function getUserId() {
return $this->_aData['user_id'];
return $this->_getDataOne('user_id');
}
public function getIsModerator() {
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);
}
public function getUserRole() {
return $this->_aData['user_role'];
return $this->_getDataOne('user_role');
}
public function getBlog() {
return $this->_aData['blog'];
return $this->_getDataOne('blog');
}
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
{
public function getId() {
return $this->_aData['comment_id'];
return $this->_getDataOne('comment_id');
}
public function getPid() {
return $this->_aData['comment_pid'];
return $this->_getDataOne('comment_pid');
}
public function getLeft() {
return $this->_aData['comment_left'];
return $this->_getDataOne('comment_left');
}
public function getRight() {
return $this->_aData['comment_right'];
return $this->_getDataOne('comment_right');
}
public function getTargetId() {
return $this->_aData['target_id'];
return $this->_getDataOne('target_id');
}
public function getTargetType() {
return $this->_aData['target_type'];
return $this->_getDataOne('target_type');
}
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() {
return $this->_aData['user_id'];
return $this->_getDataOne('user_id');
}
public function getText() {
return $this->_aData['comment_text'];
return $this->_getDataOne('comment_text');
}
public function getDate() {
return $this->_aData['comment_date'];
return $this->_getDataOne('comment_date');
}
public function getUserIp() {
return $this->_aData['comment_user_ip'];
return $this->_getDataOne('comment_user_ip');
}
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() {
return $this->_aData['comment_count_vote'];
return $this->_getDataOne('comment_count_vote');
}
public function getDelete() {
return $this->_aData['comment_delete'];
return $this->_getDataOne('comment_delete');
}
public function getPublish() {
return $this->_getDataOne('comment_publish') ? 1 : 0;
}
public function getTextHash() {
return $this->_aData['comment_text_hash'];
return $this->_getDataOne('comment_text_hash');
}
public function getLevel() {
return $this->_aData['comment_level'];
return $this->_getDataOne('comment_level');
}
public function isBad() {
if ($this->getRating()<=Config::Get('module.comment.bad')) {
@ -77,20 +77,20 @@ class ModuleComment_EntityComment extends Entity
return false;
}
public function getUser() {
return $this->_aData['user'];
return $this->_getDataOne('user');
}
public function getTarget() {
return $this->_aData['target'];
return $this->_getDataOne('target');
}
public function getVote() {
return $this->_aData['vote'];
return $this->_getDataOne('vote');
}
public function getIsFavourite() {
return $this->_aData['comment_is_favourite'];
return $this->_getDataOne('comment_is_favourite');
}
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
{
public function getTargetId() {
return $this->_aData['target_id'];
return $this->_getDataOne('target_id');
}
public function getTargetType() {
return $this->_aData['target_type'];
return $this->_getDataOne('target_type');
}
public function getCommentId() {
return $this->_aData['comment_id'];
return $this->_getDataOne('comment_id');
}
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) {

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
{
public function getTargetId() {
return $this->_aData['target_id'];
return $this->_getDataOne('target_id');
}
public function getUserId() {
return $this->_aData['user_id'];
return $this->_getDataOne('user_id');
}
public function getTargetPublish() {
return $this->_aData['target_publish'];
return $this->_getDataOne('target_publish');
}
public function getTargetType() {
return $this->_aData['target_type'];
return $this->_getDataOne('target_type');
}
public function getTagsArray() {
if ($this->getTags()) {

View file

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

View file

@ -18,34 +18,34 @@
class ModuleTalk_EntityTalk extends Entity
{
public function getId() {
return $this->_aData['talk_id'];
return $this->_getDataOne('talk_id');
}
public function getUserId() {
return $this->_aData['user_id'];
return $this->_getDataOne('user_id');
}
public function getTitle() {
return $this->_aData['talk_title'];
return $this->_getDataOne('talk_title');
}
public function getText() {
return $this->_aData['talk_text'];
return $this->_getDataOne('talk_text');
}
public function getDate() {
return $this->_aData['talk_date'];
return $this->_getDataOne('talk_date');
}
public function getDateLast() {
return $this->_aData['talk_date_last'];
return $this->_getDataOne('talk_date_last');
}
public function getUserIdLast() {
return $this->_aData['talk_user_id_last'];
return $this->_getDataOne('talk_user_id_last');
}
public function getUserIp() {
return $this->_aData['talk_user_ip'];
return $this->_getDataOne('talk_user_ip');
}
public function getCommentIdLast() {
return $this->_aData['talk_comment_id_last'];
return $this->_getDataOne('talk_comment_id_last');
}
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();
}
public function getUsers() {
return $this->_aData['users'];
return $this->_getDataOne('users');
}
public function getUser() {
return $this->_aData['user'];
return $this->_getDataOne('user');
}
public function getTalkUser() {
return $this->_aData['talk_user'];
return $this->_getDataOne('talk_user');
}
/**
* Возращает true, если разговор занесен в избранное
@ -75,7 +75,7 @@ class ModuleTalk_EntityTalk extends Entity
* @return bool
*/
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
*/
public function getTalkUsers() {
return $this->_aData['talk_users'];
return $this->_getDataOne('talk_users');
}

View file

@ -18,19 +18,19 @@
class ModuleTalk_EntityTalkUser extends Entity
{
public function getTalkId() {
return $this->_aData['talk_id'];
return $this->_getDataOne('talk_id');
}
public function getUserId() {
return $this->_aData['user_id'];
return $this->_getDataOne('user_id');
}
public function getDateLast() {
return $this->_aData['date_last'];
return $this->_getDataOne('date_last');
}
public function getCommentIdLast() {
return $this->_aData['comment_id_last'];
return $this->_getDataOne('comment_id_last');
}
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
*/
public function getUserActive(){
return (array_key_exists('talk_user_active',$this->_aData))
? $this->_aData['talk_user_active']
: ModuleTalk::TALK_USER_ACTIVE;
return $this->_getDataOne('talk_user_active') ? $this->_getDataOne('talk_user_active') : ModuleTalk::TALK_USER_ACTIVE;
}
/**
* Возвращает соответствующий пользователю объект UserEntity
@ -49,7 +47,7 @@ class ModuleTalk_EntityTalkUser extends Entity
* @return UserEntity | null
*/
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) {
$this->setTextHash(md5($this->getType().$sValue.$this->getTitle()));
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 $this->Lang_Get('topic_create_text_error_unique');
@ -90,85 +90,82 @@ class ModuleTopic_EntityTopic extends Entity {
public function getId() {
return $this->_aData['topic_id'];
return $this->_getDataOne('topic_id');
}
public function getBlogId() {
return $this->_aData['blog_id'];
return $this->_getDataOne('blog_id');
}
public function getUserId() {
return $this->_aData['user_id'];
return $this->_getDataOne('user_id');
}
public function getType() {
return $this->_aData['topic_type'];
return $this->_getDataOne('topic_type');
}
public function getTitle() {
return $this->_aData['topic_title'];
return $this->_getDataOne('topic_title');
}
public function getText() {
return $this->_aData['topic_text'];
return $this->_getDataOne('topic_text');
}
public function getTextShort() {
return $this->_aData['topic_text_short'];
return $this->_getDataOne('topic_text_short');
}
public function getTextSource() {
return $this->_aData['topic_text_source'];
return $this->_getDataOne('topic_text_source');
}
public function getExtra() {
if (isset($this->_aData['topic_extra'])) {
return $this->_aData['topic_extra'];
}
return serialize('');
return $this->_getDataOne('topic_extra') ? $this->_getDataOne('topic_extra') : serialize('');
}
public function getTags() {
return $this->_aData['topic_tags'];
return $this->_getDataOne('topic_tags');
}
public function getDateAdd() {
return $this->_aData['topic_date_add'];
return $this->_getDataOne('topic_date_add');
}
public function getDateEdit() {
return $this->_aData['topic_date_edit'];
return $this->_getDataOne('topic_date_edit');
}
public function getUserIp() {
return $this->_aData['topic_user_ip'];
return $this->_getDataOne('topic_user_ip');
}
public function getPublish() {
return $this->_aData['topic_publish'];
return $this->_getDataOne('topic_publish');
}
public function getPublishDraft() {
return $this->_aData['topic_publish_draft'];
return $this->_getDataOne('topic_publish_draft');
}
public function getPublishIndex() {
return $this->_aData['topic_publish_index'];
return $this->_getDataOne('topic_publish_index');
}
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() {
return $this->_aData['topic_count_vote'];
return $this->_getDataOne('topic_count_vote');
}
public function getCountVoteUp() {
return $this->_aData['topic_count_vote_up'];
return $this->_getDataOne('topic_count_vote_up');
}
public function getCountVoteDown() {
return $this->_aData['topic_count_vote_down'];
return $this->_getDataOne('topic_count_vote_down');
}
public function getCountVoteAbstain() {
return $this->_aData['topic_count_vote_abstain'];
return $this->_getDataOne('topic_count_vote_abstain');
}
public function getCountRead() {
return $this->_aData['topic_count_read'];
return $this->_getDataOne('topic_count_read');
}
public function getCountComment() {
return $this->_aData['topic_count_comment'];
return $this->_getDataOne('topic_count_comment');
}
public function getCutText() {
return $this->_aData['topic_cut_text'];
return $this->_getDataOne('topic_cut_text');
}
public function getForbidComment() {
return $this->_aData['topic_forbid_comment'];
return $this->_getDataOne('topic_forbid_comment');
}
public function getTextHash() {
return $this->_aData['topic_text_hash'];
return $this->_getDataOne('topic_text_hash');
}
public function getTagsArray() {
@ -178,19 +175,19 @@ class ModuleTopic_EntityTopic extends Entity {
return array();
}
public function getCountCommentNew() {
return $this->_aData['count_comment_new'];
return $this->_getDataOne('count_comment_new');
}
public function getDateRead() {
return $this->_aData['date_read'];
return $this->_getDataOne('date_read');
}
public function getUser() {
if (!isset($this->_aData['user'])) {
if (!$this->_getDataOne('user')) {
$this->_aData['user']=$this->User_GetUserById($this->getUserId());
}
return $this->_aData['user'];
return $this->_getDataOne('user');
}
public function getBlog() {
return $this->_aData['blog'];
return $this->_getDataOne('blog');
}
@ -202,10 +199,10 @@ class ModuleTopic_EntityTopic extends Entity {
}
}
public function getVote() {
return $this->_aData['vote'];
return $this->_getDataOne('vote');
}
public function getUserQuestionIsVote() {
return $this->_aData['user_question_is_vote'];
return $this->_getDataOne('user_question_is_vote');
}
public function getIsFavourite() {
if ($this->getFavourite()) {
@ -214,7 +211,7 @@ class ModuleTopic_EntityTopic extends Entity {
return false;
}
public function getCountFavourite() {
return $this->_aData['topic_count_favourite'];
return $this->_getDataOne('topic_count_favourite');
}
public function getSubscribeNewComment() {
if (!($oUserCurrent=$this->User_GetUserCurrent())) {

View file

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

View file

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

View file

@ -18,19 +18,19 @@
class ModuleTopic_EntityTopicRead extends Entity
{
public function getTopicId() {
return $this->_aData['topic_id'];
return $this->_getDataOne('topic_id');
}
public function getUserId() {
return $this->_aData['user_id'];
return $this->_getDataOne('user_id');
}
public function getDateRead() {
return $this->_aData['date_read'];
return $this->_getDataOne('date_read');
}
public function getCommentCountLast() {
return $this->_aData['comment_count_last'];
return $this->_getDataOne('comment_count_last');
}
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
{
public function getId() {
return $this->_aData['topic_tag_id'];
return $this->_getDataOne('topic_tag_id');
}
public function getTopicId() {
return $this->_aData['topic_id'];
return $this->_getDataOne('topic_id');
}
public function getUserId() {
return $this->_aData['user_id'];
return $this->_getDataOne('user_id');
}
public function getBlogId() {
return $this->_aData['blog_id'];
return $this->_getDataOne('blog_id');
}
public function getText() {
return $this->_aData['topic_tag_text'];
return $this->_getDataOne('topic_tag_text');
}
public function getCount() {
return $this->_aData['count'];
return $this->_getDataOne('count');
}
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 {
public function getId() {
return $this->_aData['id'];
return $this->_getDataOne('id');
}
public function getName(){
return $this->_aData['name'];
return $this->_getDataOne('name');
}
public function getType(){
return $this->_aData['type'];
return $this->_getDataOne('type');
}
public function getTitle(){
return $this->_aData['title'];
return $this->_getDataOne('title');
}
public function getPattern(){
return $this->_aData['pattern'];
return $this->_getDataOne('pattern');
}
public function getValue($bEscapeValue = false, $bTransformed = false){
if (!isset($this->_aData['value']) || !$this->_aData['value']) return '';

View file

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

View file

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

View file

@ -18,22 +18,22 @@
class ModuleUser_EntityReminder extends Entity
{
public function getCode() {
return $this->_aData['reminder_code'];
return $this->_getDataOne('reminder_code');
}
public function getUserId() {
return $this->_aData['user_id'];
return $this->_getDataOne('user_id');
}
public function getDateAdd() {
return $this->_aData['reminder_date_add'];
return $this->_getDataOne('reminder_date_add');
}
public function getDateUsed() {
return $this->_aData['reminder_date_used'];
return $this->_getDataOne('reminder_date_used');
}
public function getDateExpire() {
return $this->_aData['reminder_date_expire'];
return $this->_getDataOne('reminder_date_expire');
}
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
{
public function getKey() {
return $this->_aData['session_key'];
return $this->_getDataOne('session_key');
}
public function getUserId() {
return $this->_aData['user_id'];
return $this->_getDataOne('user_id');
}
public function getIpCreate() {
return $this->_aData['session_ip_create'];
return $this->_getDataOne('session_ip_create');
}
public function getIpLast() {
return $this->_aData['session_ip_last'];
return $this->_getDataOne('session_ip_last');
}
public function getDateCreate() {
return $this->_aData['session_date_create'];
return $this->_getDataOne('session_date_create');
}
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() {
return $this->_aData['user_id'];
return $this->_getDataOne('user_id');
}
public function getLogin() {
return $this->_aData['user_login'];
return $this->_getDataOne('user_login');
}
public function getPassword() {
return $this->_aData['user_password'];
return $this->_getDataOne('user_password');
}
public function getMail() {
return $this->_aData['user_mail'];
return $this->_getDataOne('user_mail');
}
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() {
return $this->_aData['user_date_register'];
return $this->_getDataOne('user_date_register');
}
public function getDateActivate() {
return $this->_aData['user_date_activate'];
return $this->_getDataOne('user_date_activate');
}
public function getDateCommentLast() {
return $this->_aData['user_date_comment_last'];
return $this->_getDataOne('user_date_comment_last');
}
public function getIpRegister() {
return $this->_aData['user_ip_register'];
return $this->_getDataOne('user_ip_register');
}
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() {
return $this->_aData['user_count_vote'];
return $this->_getDataOne('user_count_vote');
}
public function getActivate() {
return $this->_aData['user_activate'];
return $this->_getDataOne('user_activate');
}
public function getActivateKey() {
return $this->_aData['user_activate_key'];
return $this->_getDataOne('user_activate_key');
}
public function getProfileName() {
return $this->_aData['user_profile_name'];
return $this->_getDataOne('user_profile_name');
}
public function getProfileSex() {
return $this->_aData['user_profile_sex'];
return $this->_getDataOne('user_profile_sex');
}
public function getProfileCountry() {
return $this->_aData['user_profile_country'];
return $this->_getDataOne('user_profile_country');
}
public function getProfileRegion() {
return $this->_aData['user_profile_region'];
return $this->_getDataOne('user_profile_region');
}
public function getProfileCity() {
return $this->_aData['user_profile_city'];
return $this->_getDataOne('user_profile_city');
}
public function getProfileBirthday() {
return $this->_aData['user_profile_birthday'];
return $this->_getDataOne('user_profile_birthday');
}
public function getProfileAbout() {
return $this->_aData['user_profile_about'];
return $this->_getDataOne('user_profile_about');
}
public function getProfileDate() {
return $this->_aData['user_profile_date'];
return $this->_getDataOne('user_profile_date');
}
public function getProfileAvatar() {
return $this->_aData['user_profile_avatar'];
return $this->_getDataOne('user_profile_avatar');
}
public function getProfileAvatarType() {
return ($sPath=$this->getProfileAvatarPath()) ? pathinfo($sPath,PATHINFO_EXTENSION) : null;
}
public function getProfileFoto() {
return $this->_aData['user_profile_foto'];
return $this->_getDataOne('user_profile_foto');
}
public function getSettingsNoticeNewTopic() {
return $this->_aData['user_settings_notice_new_topic'];
return $this->_getDataOne('user_settings_notice_new_topic');
}
public function getSettingsNoticeNewComment() {
return $this->_aData['user_settings_notice_new_comment'];
return $this->_getDataOne('user_settings_notice_new_comment');
}
public function getSettingsNoticeNewTalk() {
return $this->_aData['user_settings_notice_new_talk'];
return $this->_getDataOne('user_settings_notice_new_talk');
}
public function getSettingsNoticeReplyComment() {
return $this->_aData['user_settings_notice_reply_comment'];
return $this->_getDataOne('user_settings_notice_reply_comment');
}
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);
}
public function getSession() {
if (!isset($this->_aData['session'])) {
if (!$this->_getDataOne('session')) {
$this->_aData['session']=$this->User_GetSessionByUserId($this->getId());
}
return $this->_aData['session'];
return $this->_getDataOne('session');
}
public function isOnline() {
if ($oSession=$this->getSession()) {
@ -195,13 +195,13 @@ class ModuleUser_EntityUser extends Entity {
return Config::Get('path.static.skin').'/images/user_foto_250.png';
}
public function getVote() {
return $this->_aData['vote'];
return $this->_getDataOne('vote');
}
public function getUserIsFriend() {
return $this->_aData['user_is_friend'];
return $this->_getDataOne('user_is_friend');
}
public function isAdministrator() {
return $this->_aData['user_is_administrator'];
return $this->_getDataOne('user_is_administrator');
}
public function getUserWebPath() {
return Router::GetPath('profile').$this->getLogin().'/';
@ -212,7 +212,7 @@ class ModuleUser_EntityUser extends Entity {
* @return int
*/
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
*/
public function AddVote(ModuleVote_EntityVote $oVote) {
if (!$oVote->getIp()) {
$oVote->setIp(func_getIp());
}
if ($this->oMapper->AddVote($oVote)) {
$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()}"));

View file

@ -18,23 +18,26 @@
class ModuleVote_EntityVote extends Entity
{
public function getTargetId() {
return $this->_aData['target_id'];
return $this->_getDataOne('target_id');
}
public function getTargetType() {
return $this->_aData['target_type'];
return $this->_getDataOne('target_type');
}
public function getVoterId() {
return $this->_aData['user_voter_id'];
return $this->_getDataOne('user_voter_id');
}
public function getDirection() {
return $this->_aData['vote_direction'];
return $this->_getDataOne('vote_direction');
}
public function getValue() {
return $this->_aData['vote_value'];
return $this->_getDataOne('vote_value');
}
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) {
$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,
vote_direction,
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;
}

View file

@ -231,8 +231,11 @@ class ModuleWall extends Module {
$aKeys=array_keys($aResult['collection']);
sort($aKeys,SORT_NUMERIC);
$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
*/
public function getWallUser() {
if (!isset($this->_aData['wall_user'])) {
if (!$this->_getDataOne('wall_user')) {
$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'),
'photoset' => array('add','edit')
),
'blocks' => array( 'right' => array('block.blogInfo.tpl') ),
'blocks' => array( 'right' => array('blocks/block.blogInfo.tpl') ),
);
$config['block']['rule_people'] = array(
'action' => array( 'people' ),

View file

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

View file

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

View file

@ -23,25 +23,25 @@
* @param Smarty $oSmarty
* @return string
*/
function smarty_insert_block($aParams,&$oSmarty) {
function smarty_insert_block($aParams,&$oSmarty) {
/**
* Устанавливаем шаблон
*/
$sBlock=ucfirst(basename($aParams['block']));
$sBlock=ucfirst(basename($aParams['block']));
/**
* Проверяем наличие шаблона. Определяем значения параметров работы в зависимости от того,
* Проверяем наличие шаблона. Определяем значения параметров работы в зависимости от того,
* принадлежит ли блок одному из плагинов, или является пользовательским классом движка
*/
if(isset($aParams['params']) and isset($aParams['params']['plugin'])) {
$sBlockTemplate = Plugin::GetTemplatePath($aParams['params']['plugin']).'/block.'.$aParams['block'].'.tpl';
$sBlock ='Plugin'.ucfirst($aParams['params']['plugin']).'_Block'.$sBlock;
} else {
$sBlockTemplate = Engine::getInstance()->Plugin_GetDelegate('template','block.'.$aParams['block'].'.tpl');
$sBlock ='Block'.$sBlock;
$sBlockTemplate = Plugin::GetTemplatePath($aParams['params']['plugin']).'/blocks/block.'.$aParams['block'].'.tpl';
$sBlock ='Plugin'.ucfirst($aParams['params']['plugin']).'_Block'.$sBlock;
} else {
$sBlockTemplate = Engine::getInstance()->Plugin_GetDelegate('template','blocks/block.'.$aParams['block'].'.tpl');
$sBlock ='Block'.$sBlock;
}
$sBlock=Engine::getInstance()->Plugin_GetDelegate('block',$sBlock);
$sBlock=Engine::getInstance()->Plugin_GetDelegate('block',$sBlock);
if (!isset($aParams['block']) or !$oSmarty->templateExists($sBlockTemplate)) {
trigger_error("Not found template for block: ".$sBlockTemplate,E_USER_WARNING);
return ;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,3 +1,4 @@
{hook run='people_sidebar_begin'}
<section class="block">
<header class="block-header">
<h3>{$aLang.user_stats}</h3>
@ -23,4 +24,6 @@
{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">
{hook run='profile_top_begin' oUserProfile=$oUserProfile}
<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}">
@ -18,4 +19,5 @@
{if $oUserProfile->getProfileName()}
<p class="user-name">{$oUserProfile->getProfileName()|escape:'html'}</p>
{/if}
{hook run='profile_top_end' oUserProfile=$oUserProfile}
</div>

View file

@ -1,3 +1,5 @@
{hook run='profile_sidebar_begin' oUserProfile=$oUserProfile}
<section class="block block-type-profile">
<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>
@ -90,10 +92,11 @@
</section>
{/if}
{hook run='profile_sidebar_menu_before' oUserProfile=$oUserProfile}
<section class="block block-type-profile-nav">
<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]=='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>
@ -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=='settings'}class="active"{/if}><a href="{router page='settings'}">{$aLang.settings_menu}</a></li>
{/if}
{hook run='profile_sidebar_menu_item_last' oUserProfile=$oUserProfile}
</ul>
</section>
{hook run='profile_sidebar_end' oUserProfile=$oUserProfile}

View file

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

View file

@ -26,6 +26,7 @@
<h2 class="page-header">{$aLang.registration}</h2>
{hook run='registration_begin'}
<form action="{router page='registration'}" method="post" id="registration-form">
{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>
</form>
{hook run='registration_end'}
{include file='footer.tpl'}

View file

@ -1,12 +1,16 @@
{include file='header.tpl'}
<h2 class="page-header">{$aLang.search}</h2>
{hook run='search_begin'}
<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="submit" value="" title="{$aLang.search_submit}" class="input-submit icon icon-search">
{hook run='search_form_end'}
</form>
{hook run='search_end'}
{include file='footer.tpl'}

View file

@ -6,8 +6,10 @@
<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="submit" value="" title="{$aLang.search_submit}" class="input-submit icon icon-search">
{hook run='search_form_end'}
</form>
@ -21,6 +23,8 @@
{$aLang.search_results_count_topics}
{elseif $sType=="comments"}
{$aLang.search_results_count_comments}
{else}
{hook run='search_result_item' sType=$sType}
{/if}
</a>
</li>
@ -32,6 +36,8 @@
{include file='topic_list.tpl'}
{elseif $aReq.sType == 'comments'}
{include file='comment_list.tpl'}
{else}
{hook run='search_result' sType=$aReq.sType}
{/if}
{else}
{$aLang.search_results_empty}

View file

@ -8,6 +8,7 @@
{include file='menu.settings.tpl'}
{hook run='settings_account_begin'}
<form method="post" enctype="multipart/form-data">
{hook run='form_settings_account_begin'}
@ -55,6 +56,6 @@
<button name="submit_account_edit" class="button button-primary" />{$aLang.settings_account_submit}</button>
</form>
{hook run='settings_account_end'}
{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>
{hook run='settings_invite_begin'}
<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}" />
<p>
@ -16,8 +19,11 @@
<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>
{hook run='form_settings_invite_end'}
<button name="submit_invite" class="button button-primary" />{$aLang.settings_invite_submit}</button>
</form>
{hook run='settings_invite_end'}
{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>
</p>
{hook run='settings_profile_begin'}
<form method="post" enctype="multipart/form-data" class="form-profile">
{hook run='form_settings_profile_begin'}
@ -199,6 +200,6 @@
<button name="submit_profile_edit" class="button button-primary" />{$aLang.settings_profile_submit}</button>
</form>
{hook run='settings_profile_end'}
{include file='footer.tpl'}

View file

@ -11,6 +11,8 @@
<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">
{hook run='form_settings_tuning_begin'}
@ -29,6 +31,6 @@
<input type="submit" name="submit_settings_tuning" value="{$aLang.settings_tuning_submit}" class="button" />
</form>
{hook run='settings_tuning_end'}
{include file='footer.tpl'}

View file

@ -7,6 +7,7 @@
{include file='actions/ActionTalk/friends.tpl'}
{hook run='talk_add_begin'}
<div class="topic" style="display: none;">
<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>
</form>
{hook run='talk_add_end'}
{include file='footer.tpl'}

View file

@ -1,4 +1,3 @@
/* Голосование
---------------------------------------------------------------*/
.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'}
{/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}">
{hook run='body_begin'}

View file

@ -3,7 +3,8 @@
<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">
</form>
{hook run='userbar_nav'}
<ul class="nav nav-userbar">
{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='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='login'}exit/?security_ls_key={$LIVESTREET_SECURITY_KEY}">{$aLang.exit}</a></li>
{hook run='userbar_item'}
<li><a href="{router page='login'}exit/?security_ls_key={$LIVESTREET_SECURITY_KEY}">{$aLang.exit}</a></li>
{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='registration'}" class="js-registration-form-show">{$aLang.registration_submit}</a></li>
{/if}
@ -28,8 +29,10 @@
<header id="header" role="banner">
{hook run='header_banner_begin'}
<hgroup class="site-info">
<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>
</hgroup>
{hook run='header_banner_end'}
</header>

View file

@ -1,9 +1,9 @@
<h2 class="page-header">{$aLang.user_list}</h2>
<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 $sEvent=='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=='all'}class="active"{/if}><a href="{router page='people'}">{$aLang.people_menu_users_all}</a></li>
<li {if $sMenuItemSelect=='online'}class="active"{/if}><a href="{router page='people'}online/">{$aLang.people_menu_users_online}</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'}
</ul>

View file

@ -1,20 +1,20 @@
<h3 class="profile-page-header">{$aLang.user_menu_publication}</h3>
<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>
</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>
</li>
{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>
</li>
{/if}
{hook run='menu_profile_created_item'}
{hook run='menu_profile_created_item' oUserProfile=$oUserProfile}
</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>
<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>
</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>
</li>
{hook run='menu_profile_favourite_item' oUserProfile=$oUserProfile}
</ul>
{hook run='menu_profile_favourite' oUserProfile=$oUserProfile}

View file

@ -1,13 +1,13 @@
<h3 class="profile-page-header">{$aLang.talk_menu_inbox}</h3>
<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}
<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}
<li {if $sEvent=='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 $sEvent=='blacklist'}class="active"{/if}><a href="{router page='talk'}blacklist/">{$aLang.talk_menu_inbox_blacklist}</a></li>
<li {if $sMenuSubItemSelect=='add'}class="active"{/if}><a href="{router page='talk'}add/">{$aLang.talk_menu_inbox_create}</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 $sMenuSubItemSelect=='blacklist'}class="active"{/if}><a href="{router page='talk'}blacklist/">{$aLang.talk_menu_inbox_blacklist}</a></li>
{hook run='menu_talk_talk_item'}
</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=='stream'}class="active"{/if}><a href="{router page='stream'}">{$aLang.stream_menu}</a></li>
{hook run='main_menu'}
{hook run='main_menu_item'}
</ul>
{hook run='main_menu'}
</nav>

View file

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

View file

@ -1,13 +1,3 @@
<aside class="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>

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 @@
{assign var="sTopicTemplateName" value="topic_`$oTopic->getType()`.tpl"}
{include file=$sTopicTemplateName}
{if $LS->Topic_IsAllowTopicType($oTopic->getType())}
{assign var="sTopicTemplateName" value="topic_`$oTopic->getType()`.tpl"}
{include file=$sTopicTemplateName}
{/if}

View file

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

View file

@ -39,7 +39,9 @@
<form method="POST" action="" enctype="multipart/form-data" id="block_upload_img_content_link" onsubmit="return false;" style="display: none;" class="tab-content">
<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>
{hook run="uploadimg_link_additional"}
<button class="button button-primary" onclick="ls.topic.insertImageToEditor(jQuery('#img_url').val());">{$aLang.uploadimg_link_submit_paste}</button>
{$aLang.or}
<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">
{hook run='login_popup_begin'}
<form action="{router page='login'}" method="post" id="popup-login-form">
{hook run='form_login_popup_begin'}
@ -46,6 +47,7 @@
<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>
</form>
{hook run='login_popup_end'}
</div>
@ -74,7 +76,7 @@
});
</script>
{hook run='registration_begin' isPopup=true}
<form action="{router page='registration'}" method="post" id="popup-registration-form">
{hook run='form_registration_begin' isPopup=true}
@ -115,6 +117,7 @@
<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>
</form>
{hook run='registration_end' isPopup=true}
</div>
{/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-link">{$aLang.topic_menu_saved} {if $iUserCurrentCountTopicDraft}({$iUserCurrentCountTopicDraft}){/if}</a>
</li>
{hook run='write_item' isPopup=true}
</ul>
</div>
{/strip}