From 8c0616e87284a1cd4b35aba3d2371f806cf5b2a1 Mon Sep 17 00:00:00 2001 From: Mzhelskiy Maxim Date: Sun, 28 Sep 2008 10:45:18 +0000 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=B9=20=D1=82=D0=B8=D0=BF=20?= =?UTF-8?q?=D1=82=D0=BE=D0=BF=D0=B8=D0=BA=D0=B0:=20=D1=81=D1=81=D1=8B?= =?UTF-8?q?=D0=BB=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/actions/ActionLink.class.php | 466 ++++++++++++++++++ classes/actions/ActionTopic.class.php | 9 +- .../topic/entity/Topic.entity.class.php | 77 ++- config/config.route.php | 1 + include/ajax/textPreview.php | 7 +- .../skin/habra/actions/ActionBlog/comment.tpl | 4 +- .../skin/habra/actions/ActionLink/add.tpl | 98 ++++ .../skin/habra/actions/ActionLogin/index.tpl | 1 - .../skin/habra/actions/ActionTag/index.tpl | 2 +- .../skin/habra/actions/ActionTalk/read.tpl | 4 +- .../skin/habra/actions/ActionTopic/add.tpl | 2 +- .../blog_info.tpl => block.blogInfo.tpl} | 0 templates/skin/habra/css/global.css | 50 +- templates/skin/habra/header.tpl | 4 +- templates/skin/habra/img/link_url.gif | Bin 0 -> 553 bytes templates/skin/habra/img/link_url_big.gif | Bin 0 -> 652 bytes templates/skin/habra/img/tagcloud.gif | Bin 0 -> 116 bytes templates/skin/habra/js/main.js | 4 +- templates/skin/habra/menu.action.tpl | 10 +- templates/skin/habra/topic.tpl | 10 +- templates/skin/habra/topic_list.tpl | 14 +- 21 files changed, 709 insertions(+), 54 deletions(-) create mode 100644 classes/actions/ActionLink.class.php create mode 100644 templates/skin/habra/actions/ActionLink/add.tpl rename templates/skin/habra/{actions/ActionTopic/blog_info.tpl => block.blogInfo.tpl} (100%) create mode 100644 templates/skin/habra/img/link_url.gif create mode 100644 templates/skin/habra/img/link_url_big.gif create mode 100644 templates/skin/habra/img/tagcloud.gif diff --git a/classes/actions/ActionLink.class.php b/classes/actions/ActionLink.class.php new file mode 100644 index 00000000..8bca3545 --- /dev/null +++ b/classes/actions/ActionLink.class.php @@ -0,0 +1,466 @@ +User_IsAuthorization()) { + $this->Message_AddErrorSingle('Для того чтобы что то написать, сначало нужно войти под своим аккаунтом.','Нет доступа'); + return Router::Action('error'); + } + $this->oUserCurrent=$this->User_GetUserCurrent(); + $this->SetDefaultEvent('add'); + $this->Viewer_AddHtmlTitle('Ссылки'); + } + /** + * Регистрируем евенты + * + */ + protected function RegisterEvent() { + $this->AddEvent('add','EventAdd'); + $this->AddEvent('edit','EventEdit'); + $this->AddEvent('go','EventGo'); + } + + + /********************************************************************************** + ************************ РЕАЛИЗАЦИЯ ЭКШЕНА *************************************** + ********************************************************************************** + */ + + /** + * Переход по ссылке + * + * @return unknown + */ + protected function EventGo() { + /** + * Получаем номер топика из УРЛ и проверяем существует ли он + */ + $sTopicId=$this->GetParam(0); + if (!$oTopic=$this->Topic_GetTopicById($sTopicId,$this->oUserCurrent)) { + return parent::EventNotFound(); + } + /** + * проверяем является ли топик ссылкой + */ + if ($oTopic->getType()!='link') { + return parent::EventNotFound(); + } + /** + * увелививаем число переходов по ссылке + */ + $oTopic->setLinkCountJump($oTopic->getLinkCountJump()+1); + $this->Topic_UpdateTopic($oTopic); + /** + * собственно сам переход по ссылке + */ + func_header_location($oTopic->getLinkUrl()); + } + + + /** + * Редактирование ссылки + * + * @return unknown + */ + protected function EventEdit() { + /** + * Меню + */ + $this->sMenuSubItemSelect=''; + $this->sMenuItemSelect=''; + /** + * Получаем номер топика из УРЛ и проверяем существует ли он + */ + $sTopicId=$this->GetParam(0); + if (!$oTopic=$this->Topic_GetTopicById($sTopicId,$this->oUserCurrent)) { + return parent::EventNotFound(); + } + /** + * проверяем кто владелец топика + */ + if ($oTopic->getUserId()!=$this->oUserCurrent->getId()) { + return parent::EventNotFound(); + } + /** + * Добавляем блок вывода информации о блоге + */ + $this->Viewer_AddBlocksRight(array('block.blogInfo.tpl')); + /** + * Получаем данные для отображения формы + */ + $aBlogsOwner=$this->Blog_GetBlogsByOwnerId($this->oUserCurrent->getId()); + $aBlogsUser=$this->Blog_GetRelationBlogUsersByUserId($this->oUserCurrent->getId()); + $aAllowBlogsUser=array(); + foreach ($aBlogsUser as $oBlogUser) { + $oBlog=$this->Blog_GetBlogById($oBlogUser->getBlogId()); + // делаем через "or" чтоб дать возможность юзеру отредактировать свой топик в блоге в котором он уже не может постить, т.е. для тех топиков что были запощены раньше и был доступ в блог + if ($this->ACL_CanAddTopic($this->oUserCurrent,$oBlog) or $oTopic->getBlogId()==$oBlog->getId()) { + $aAllowBlogsUser[]=$oBlogUser; + } + } + /** + * Загружаем переменные в шаблон + */ + $this->Viewer_Assign('aBlogsUser',$aAllowBlogsUser); + $this->Viewer_Assign('aBlogsOwner',$aBlogsOwner); + $this->Viewer_AddHtmlTitle('Редактирование ссылки'); + /** + * Устанавливаем шаблон вывода + */ + $this->SetTemplateAction('add'); + /** + * Проверяем отправлена ли форма с данными(хотяб одна кнопка) + */ + if (isset($_REQUEST['submit_topic_publish']) or isset($_REQUEST['submit_topic_save'])) { + /** + * Обрабатываем отправку формы + */ + return $this->SubmitEdit($oTopic); + } else { + /** + * Заполняем поля формы для редактирования + * Только перед отправкой формы! + */ + $_REQUEST['topic_title']=$oTopic->getTitle(); + $_REQUEST['topic_link_url']=$oTopic->getLinkUrl(); + $_REQUEST['topic_text']=$oTopic->getTextSource(); + $_REQUEST['topic_tags']=$oTopic->getTags(); + $_REQUEST['blog_id']=$oTopic->getBlogId(); + $_REQUEST['topic_id']=$oTopic->getId(); + } + } + /** + * Добавление ссылки + * + * @return unknown + */ + protected function EventAdd() { + /** + * Меню + */ + $this->sMenuSubItemSelect='add'; + /** + * Добавляем блок вывода информации о блоге + */ + $this->Viewer_AddBlocksRight(array('block.blogInfo.tpl')); + /** + * Получаем данные для отображения формы + */ + $aBlogsOwner=$this->Blog_GetBlogsByOwnerId($this->oUserCurrent->getId()); + $aBlogsUser=$this->Blog_GetRelationBlogUsersByUserId($this->oUserCurrent->getId()); + $aAllowBlogsUser=array(); + foreach ($aBlogsUser as $oBlogUser) { + $oBlog=$this->Blog_GetBlogById($oBlogUser->getBlogId()); + if ($this->ACL_CanAddTopic($this->oUserCurrent,$oBlog)) { + $aAllowBlogsUser[]=$oBlogUser; + } + } + /** + * Загружаем переменные в шаблон + */ + $this->Viewer_Assign('aBlogsUser',$aAllowBlogsUser); + $this->Viewer_Assign('aBlogsOwner',$aBlogsOwner); + $this->Viewer_AddHtmlTitle('Добавление ссылки'); + /** + * Обрабатываем отправку формы + */ + return $this->SubmitAdd(); + } + + /** + * Обработка добавлени топика + * + * @return unknown + */ + protected function SubmitAdd() { + /** + * Проверяем отправлена ли форма с данными(хотяб одна кнопка) + */ + if (!isset($_REQUEST['submit_topic_publish']) and !isset($_REQUEST['submit_topic_save'])) { + return false; + } + /** + * Проверка корректности полей формы + */ + if (!$this->checkTopicFields()) { + return false; + } + /** + * Определяем в какой блог делаем запись + */ + $iBlogId=getRequest('blog_id'); + if ($iBlogId==0) { + $oBlog=$this->Blog_GetPersonalBlogByUser($this->oUserCurrent); + } else { + $oBlog=$this->Blog_GetBlogById($iBlogId); + } + /** + * Если блог не определен выдаем предупреждение + */ + if (!$oBlog) { + $this->Message_AddErrorSingle('Пытаетесь запостить топик в неизвестный блог?','Ошибка'); + return false; + } + /** + * Проверка состоит ли юзер в блоге в который постит + */ + if (!$this->Blog_GetRelationBlogUserByBlogIdAndUserId($oBlog->getId(),$this->oUserCurrent->getId())) { + if ($oBlog->getOwnerId()!=$this->oUserCurrent->getId()) { + $this->Message_AddErrorSingle('Вы не состоите в этом блоге!','Ошибка'); + return false; + } + } + /** + * Проверяем есть ли права на постинг топика в этот блог + */ + if (!$this->ACL_CanAddTopic($this->User_GetUserCurrent(),$oBlog)) { + $this->Message_AddErrorSingle('Вы еще не достаточно окрепли чтобы постить в этот блог','Ошибка'); + return false; + } + /** + * Теперь можно смело добавлять топик к блогу + */ + $oTopic=new TopicEntity_Topic(); + $oTopic->setBlogId($oBlog->getId()); + $oTopic->setUserId($this->oUserCurrent->getId()); + $oTopic->setType('link'); + $oTopic->setTitle(getRequest('topic_title')); + $oTopic->setText(htmlspecialchars(getRequest('topic_text'))); + $oTopic->setTextShort(htmlspecialchars(getRequest('topic_text'))); + $oTopic->setTextSource(getRequest('topic_text')); + $oTopic->setLinkUrl(getRequest('topic_link_url')); + $oTopic->setTags(getRequest('topic_tags')); + $oTopic->setDateAdd(date("Y-m-d H:i:s")); + $oTopic->setUserIp(func_getIp()); + /** + * Публикуем или сохраняем + */ + if (isset($_REQUEST['submit_topic_publish'])) { + $oTopic->setPublish(1); + } else { + $oTopic->setPublish(0); + } + /** + * Добавляем топик + */ + if ($this->Topic_AddTopic($oTopic)) { + //Делаем рассылку спама всем, кто состоит в этом блоге + if ($oTopic->getPublish()==1 and $oBlog->getType()!='personal') { + $aBlogUsers=$this->Blog_GetRelationBlogUsersByBlogId($oBlog->getId()); + foreach ($aBlogUsers as $oBlogUser) { + if ($oBlogUser->getUserId()==$this->oUserCurrent->getId()) { + continue; + } + $this->Mail_SetAdress($oBlogUser->getUserMail(),$oBlogUser->getUserLogin()); + $this->Mail_SetSubject('Новый топик в блоге «'.htmlspecialchars($oBlog->getTitle()).'»'); + $this->Mail_SetBody(' + В блоге «'.htmlspecialchars($oBlog->getTitle()).'» опубликован топик - '.htmlspecialchars($oTopic->getTitle()).'
+ +
+ С уважением, администрация сайта '.SITE_NAME.' + '); + $this->Mail_setHTML(); + $this->Mail_Send(); + } + } + + func_header_location(DIR_WEB_ROOT.'/blog/'.$oTopic->getId().'.html'); + } else { + $this->Message_AddErrorSingle('Возникли технические неполадки при добавлении топика, пожалуйста повторите позже.','Внутреняя ошибка'); + return Router::Action('error'); + } + } + /** + * Обработка редактирования топика + * + * @param unknown_type $oTopic + * @return unknown + */ + protected function SubmitEdit($oTopic) { + /** + * Проверка корректности полей формы + */ + if (!$this->checkTopicFields()) { + return false; + } + /** + * Определяем в какой блог делаем запись + */ + $iBlogId=getRequest('blog_id'); + if ($iBlogId==0) { + $oBlog=$this->Blog_GetPersonalBlogByUser($this->oUserCurrent); + } else { + $oBlog=$this->Blog_GetBlogById($iBlogId); + } + /** + * Если блог не определен выдаем предупреждение + */ + if (!$oBlog) { + $this->Message_AddErrorSingle('Пытаетесь запостить топик в неизвестный блог?','Ошибка'); + return false; + } + /** + * Проверка состоит ли юзер в блоге в который постит + * Если нужно разрешить редактировать топик в блоге в котором юзер уже не стоит + */ + if (!$this->Blog_GetRelationBlogUserByBlogIdAndUserId($oBlog->getId(),$this->oUserCurrent->getId())) { + if ($oBlog->getOwnerId()!=$this->oUserCurrent->getId()) { + $this->Message_AddErrorSingle('Вы не сотоите в этом блоге!','Ошибка'); + return false; + } + } + /** + * Проверяем есть ли права на постинг топика в этот блог + * Условие $oBlog->getId()!=$oTopic->getBlogId() для того чтоб разрешить отредактировать топик в блоге в который сейчас юзер не имеет права на постинг, но раньше успел в него запостить этот топик + */ + if (!$this->ACL_CanAddTopic($this->User_GetUserCurrent(),$oBlog) and $oBlog->getId()!=$oTopic->getBlogId()) { + $this->Message_AddErrorSingle('Вы еще не достаточно окрепли чтобы постить в этот блог','Ошибка'); + return false; + } + /** + * Теперь можно смело редактировать топик + */ + $oTopic->setBlogId($oBlog->getId()); + $oTopic->setTitle(getRequest('topic_title')); + $oTopic->setText(htmlspecialchars(getRequest('topic_text'))); + $oTopic->setTextShort(htmlspecialchars(getRequest('topic_text'))); + $oTopic->setTextSource(getRequest('topic_text')); + $oTopic->setLinkUrl(getRequest('topic_link_url')); + $oTopic->setTags(getRequest('topic_tags')); + $oTopic->setUserIp(func_getIp()); + /** + * Публикуем или сохраняем в черновиках + */ + if (isset($_REQUEST['submit_topic_publish'])) { + $oTopic->setPublish(1); + } else { + $oTopic->setPublish(0); + } + /** + * Сохраняем топик + */ + if ($this->Topic_UpdateTopic($oTopic)) { + func_header_location(DIR_WEB_ROOT.'/blog/'.$oTopic->getId().'.html'); + } else { + $this->Message_AddErrorSingle('Возникли технические неполадки при изменении топика, пожалуйста повторите позже.','Внутреняя ошибка'); + return Router::Action('error'); + } + } + /** + * Проверка полей формы + * + * @return unknown + */ + protected function checkTopicFields() { + $bOk=true; + /** + * Проверяем есть ли блог в кторый постим + */ + if (!func_check(getRequest('blog_id'),'id')) { + $this->Message_AddError('Что то не то с блогом..','Ошибка'); + $bOk=false; + } + /** + * Проверяем есть ли заголовок топика + */ + if (!func_check(getRequest('topic_title'),'text',2,200)) { + $this->Message_AddError('Название топика должно быть от 2 до 200 символов','Ошибка'); + $bOk=false; + } + /** + * Проверяем есть ли ссылка + */ + if (!func_check(getRequest('topic_link_url'),'text',3,200)) { + $this->Message_AddError('Название топика должно быть от 2 до 200 символов','Ошибка'); + $bOk=false; + } + /** + * Проверяем есть ли описание топика-ссылки + */ + if (!func_check(getRequest('topic_text'),'text',10,500)) { + $this->Message_AddError('Описание ссылки должно быть от 10 до 500 символов','Ошибка'); + $bOk=false; + } + /** + * Проверяем есть ли теги(метки) + */ + if (!func_check(getRequest('topic_tags'),'text',2,500)) { + $this->Message_AddError('Метки топика должны быть от 2 до 50 символов с общей диной не более 500 символов','Ошибка'); + $bOk=false; + } + /** + * проверяем ввод тегов + */ + $sTags=getRequest('topic_tags'); + $aTags=explode(',',$sTags); + $aTagsNew=array(); + foreach ($aTags as $sTag) { + $sTag=trim($sTag); + if (func_check($sTag,'text',2,50)) { + $aTagsNew[]=$sTag; + } + } + if (!count($aTagsNew)) { + $this->Message_AddError('Проверьте правильность меток','Ошибка'); + $bOk=false; + } else { + $_REQUEST['topic_tags']=join(',',$aTagsNew); + } + return $bOk; + } + /** + * При завершении экшена загружаем необходимые переменные + * + */ + public function EventShutdown() { + $this->Viewer_Assign('sMenuItemSelect',$this->sMenuItemSelect); + $this->Viewer_Assign('sMenuSubItemSelect',$this->sMenuSubItemSelect); + } +} +?> \ No newline at end of file diff --git a/classes/actions/ActionTopic.class.php b/classes/actions/ActionTopic.class.php index 87e2dda2..eb23f2ec 100644 --- a/classes/actions/ActionTopic.class.php +++ b/classes/actions/ActionTopic.class.php @@ -82,7 +82,7 @@ class ActionTopic extends Action { /** * Меню */ - $this->sMenuSubItemSelect='saved'; + $this->sMenuSubItemSelect=''; $this->sMenuItemSelect=''; /** * Получаем номер топика из УРЛ и проверяем существует ли он @@ -100,7 +100,7 @@ class ActionTopic extends Action { /** * Добавляем блок вывода информации о блоге */ - $this->Viewer_AddBlocksRight(array('actions/'.$this->GetActionClass().'/blog_info.tpl')); + $this->Viewer_AddBlocksRight(array('block.blogInfo.tpl')); /** * Получаем данные для отображения формы */ @@ -157,7 +157,7 @@ class ActionTopic extends Action { /** * Добавляем блок вывода информации о блоге */ - $this->Viewer_AddBlocksRight(array('actions/'.$this->GetActionClass().'/blog_info.tpl')); + $this->Viewer_AddBlocksRight(array('block.blogInfo.tpl')); /** * Получаем данные для отображения формы */ @@ -322,8 +322,7 @@ class ActionTopic extends Action { $sTestShort=str_replace('[]',"\r\n",$sTestShort); $oTopic->setText($sText); $oTopic->setTextShort($sTestShort); - $oTopic->setTextSource(getRequest('topic_text')); - $oTopic->setExtra(''); + $oTopic->setTextSource(getRequest('topic_text')); $oTopic->setTags(getRequest('topic_tags')); $oTopic->setDateAdd(date("Y-m-d H:i:s")); $oTopic->setUserIp(func_getIp()); diff --git a/classes/modules/topic/entity/Topic.entity.class.php b/classes/modules/topic/entity/Topic.entity.class.php index 5869c0c1..30344f6a 100644 --- a/classes/modules/topic/entity/Topic.entity.class.php +++ b/classes/modules/topic/entity/Topic.entity.class.php @@ -17,6 +17,13 @@ class TopicEntity_Topic extends Entity { + /** + * массив объектов(не всегда) для дополнительных типов топиков(линки, опросы, подкасты и т.п.) + * + * @var unknown_type + */ + protected $aExtra=null; + public function getId() { return $this->_aData['topic_id']; } @@ -42,7 +49,10 @@ class TopicEntity_Topic extends Entity return $this->_aData['topic_text_source']; } public function getExtra() { - return $this->_aData['topic_extra']; + if (isset($this->_aData['topic_extra'])) { + return $this->_aData['topic_extra']; + } + return serialize(''); } public function getTags() { return $this->_aData['topic_tags']; @@ -72,6 +82,7 @@ class TopicEntity_Topic extends Entity return $this->_aData['topic_count_comment']; } + public function getTagsLink() { $aTags=explode(',',$this->getTags()); foreach ($aTags as $key => $value) { @@ -115,7 +126,69 @@ class TopicEntity_Topic extends Entity + /*************************************************************************************************************************************************** + * методы расширения типов топика + *************************************************************************************************************************************************** + */ + protected function extractExtra() { + if (is_null($this->aExtra)) { + $this->aExtra=unserialize($this->getExtra()); + } + } + + public function getLinkUrl($bShort=false) { + if ($this->getType()!='link') { + return null; + } + $this->extractExtra(); + if (isset($this->aExtra['url'])) { + if ($bShort) { + $sUrl=ltrim($this->aExtra['url'],'http://'); + $sUrlShort=substr($sUrl,0,30); + if (strlen($sUrlShort)!=strlen($sUrl)) { + return $sUrlShort.'...'; + } + return $sUrl; + } + $sUrl='http://'.ltrim($this->aExtra['url'],'http://'); + return $sUrl; + } + return null; + } + public function setLinkUrl($data) { + if ($this->getType()!='link') { + return; + } + $this->extractExtra(); + $this->aExtra['url']=$data; + $this->setExtra($this->aExtra); + } + public function getLinkCountJump() { + if ($this->getType()!='link') { + return null; + } + $this->extractExtra(); + if (isset($this->aExtra['count_jump'])) { + return (int)$this->aExtra['count_jump']; + } + return 0; + } + public function setLinkCountJump($data) { + if ($this->getType()!='link') { + return; + } + $this->extractExtra(); + $this->aExtra['count_jump']=$data; + $this->setExtra($this->aExtra); + } + + + + + + + //************************************************************************************************************************************************* public function setId($data) { $this->_aData['topic_id']=$data; } @@ -135,7 +208,7 @@ class TopicEntity_Topic extends Entity $this->_aData['topic_text']=$data; } public function setExtra($data) { - $this->_aData['topic_extra']=$data; + $this->_aData['topic_extra']=serialize($data); } public function setTextShort($data) { $this->_aData['topic_text_short']=$data; diff --git a/config/config.route.php b/config/config.route.php index 09609562..720e46be 100644 --- a/config/config.route.php +++ b/config/config.route.php @@ -39,6 +39,7 @@ return array( 'comments' => 'ActionComments', 'talk' => 'ActionTalk', 'rss' => 'ActionRss', + 'link' => 'ActionLink', ), 'config' => array( 'action_default' => 'index', diff --git a/include/ajax/textPreview.php b/include/ajax/textPreview.php index 34742e1c..480a487d 100644 --- a/include/ajax/textPreview.php +++ b/include/ajax/textPreview.php @@ -24,10 +24,15 @@ chdir(dirname(dirname(dirname(__FILE__)))); require_once("./config/config.ajax.php"); $sText=@$_REQUEST['text']; +$bSave=@$_REQUEST['save']; $bStateError=true; $sTextResult=''; if ($oEngine->User_IsAuthorization()) { - $sTextResult=$oEngine->Text_Parser($sText); + if ($bSave) { + $sTextResult=htmlspecialchars($sText); + } else { + $sTextResult=$oEngine->Text_Parser($sText); + } $bStateError=false; } diff --git a/templates/skin/habra/actions/ActionBlog/comment.tpl b/templates/skin/habra/actions/ActionBlog/comment.tpl index c4ad1447..131ec73c 100644 --- a/templates/skin/habra/actions/ActionBlog/comment.tpl +++ b/templates/skin/habra/actions/ActionBlog/comment.tpl @@ -12,7 +12,7 @@
- +
@@ -56,7 +56,7 @@ function showCommentForm(reply) { {if count($aComments)}
- + комментарии({$oTopic->getCountComment()}): 
diff --git a/templates/skin/habra/actions/ActionLink/add.tpl b/templates/skin/habra/actions/ActionLink/add.tpl new file mode 100644 index 00000000..8f2f8579 --- /dev/null +++ b/templates/skin/habra/actions/ActionLink/add.tpl @@ -0,0 +1,98 @@ +{include file='header.tpl'} + +{include file='menu.action.tpl'} + +{include file='system_message.tpl'} + + +{literal} + +{/literal} + + + + + +
+ + +
+
+
+ + + + +

+ +

+ +
+ + Заголовок должен быть наполнен смыслом, чтобы можно было понять, о чем будет топик.
+ +

+ +

+ +
+ + Например, http://livestreet.ru/blog/dev_livestreet/113.html
+ +

+ + + +
+ + +

+ +
+ Метки нужно разделять запятой. Например: клон хабры, блоги, рейтинг, google, сиськи, кирпич. + +

+ + + +

+   +   +   +

+ +
Если нажать кнопку «Сохранить в черновиках», топик + будет виден только Вам, а рядом с его заголовком будет отображаться замочек. + Чтобы топик был виден всем, нажмите «Опубликовать».
+ +

Может быть, перейти на заглавную страницу блогов?

+ +
+
+ + + + +{include file='footer.tpl'} + diff --git a/templates/skin/habra/actions/ActionLogin/index.tpl b/templates/skin/habra/actions/ActionLogin/index.tpl index 31d55ec2..f5c935b6 100644 --- a/templates/skin/habra/actions/ActionLogin/index.tpl +++ b/templates/skin/habra/actions/ActionLogin/index.tpl @@ -13,7 +13,6 @@ {/if}
-

Логин или e-mail:

diff --git a/templates/skin/habra/actions/ActionTag/index.tpl b/templates/skin/habra/actions/ActionTag/index.tpl index 52e2e30e..c4254f7c 100644 --- a/templates/skin/habra/actions/ActionTag/index.tpl +++ b/templates/skin/habra/actions/ActionTag/index.tpl @@ -8,7 +8,7 @@ -  → +  → diff --git a/templates/skin/habra/actions/ActionTalk/read.tpl b/templates/skin/habra/actions/ActionTalk/read.tpl index 802a2616..6b4c516b 100644 --- a/templates/skin/habra/actions/ActionTalk/read.tpl +++ b/templates/skin/habra/actions/ActionTalk/read.tpl @@ -72,7 +72,7 @@ function showCommentForm(reply) { {if count($aComments)}

- + ответы({$oTalk->getCountComment()}): 
@@ -99,7 +99,7 @@ function showCommentForm(reply) {
- ответить + ответить
diff --git a/templates/skin/habra/actions/ActionTopic/add.tpl b/templates/skin/habra/actions/ActionTopic/add.tpl index 31122fe8..947f4661 100644 --- a/templates/skin/habra/actions/ActionTopic/add.tpl +++ b/templates/skin/habra/actions/ActionTopic/add.tpl @@ -140,7 +140,7 @@ document.addEvent('domready', function() {

    -   +  

Если нажать кнопку «Сохранить в черновиках», текст топика diff --git a/templates/skin/habra/actions/ActionTopic/blog_info.tpl b/templates/skin/habra/block.blogInfo.tpl similarity index 100% rename from templates/skin/habra/actions/ActionTopic/blog_info.tpl rename to templates/skin/habra/block.blogInfo.tpl diff --git a/templates/skin/habra/css/global.css b/templates/skin/habra/css/global.css index 4db60924..c05fb4a2 100644 --- a/templates/skin/habra/css/global.css +++ b/templates/skin/habra/css/global.css @@ -432,16 +432,10 @@ h3{ #screen{ position: absolute; top: 0; left: 0; right: 0; width: 100%; height: 100%; z-index: 98; display: none; - background: url(http://www.habrahabr.ru/i/0-3.png); -} -* html #screen{ - background-color: #333; - background-color: transparent; - background-image: url(http://www.habrahabr.ru/i/spacer.gif); - filter: progid:DXImageTransform.Microsoft.AlphaImageLoader( - src="http://www.habrahabr.ru/i/0-3.png", sizingMethod="scale"); + } + /* content */ #content{ clear: both; @@ -841,7 +835,7 @@ div.rating .company_position_up, div.rating .company_position_down { padding: 0.5em 0; /*margin-left:40px;*/ padding-left:20px; - background:url(http://www.habrahabr.ru/i/tags.gif) no-repeat 0 8px; + clear: both; } .voice { @@ -3072,10 +3066,7 @@ div.date a:hover span { background-color:#336699!important; color:white; } -*html div.date a:hover span { - background-color:white; - color:#336699; -} + div.date a:hover { background:url(../img/date.gif) center left no-repeat; @@ -3095,16 +3086,29 @@ div.user a:hover span { background:#CC0000; color:white; } -*html div.user a:hover span { - background:white; - color:#CC0000; -} + div.user a:hover { background:url(../img/user.gif) left center no-repeat; } + +div.link_url a { + padding-left:14px; + background:url(../img/link_url.gif) center left no-repeat; + color:#CC0000; + text-decoration:none; +} +div.link_url a:hover span { + background:#CC0000; + color:white; +} + +div.link_url a:hover { + background:url(../img/link_url.gif) left center no-repeat; +} + div.down a { padding-left:14px; - background:url(../img/user.giff) left center no-repeat; + background:url(../img/user.gif) left center no-repeat; text-decoration:none; color:#339900; } @@ -3112,10 +3116,7 @@ div.down a:hover span { background:#339900; color:white; } -*html div.down a:hover span { - background:white; - color:#339900; -} + div.down a:hover { background:url(http://habrahabr.ru/i/plashka_down_hover.gif) center left no-repeat; } @@ -3155,10 +3156,7 @@ div.comment_plashka a:hover span.green { background-color:#339900!important; color:white; } -*html div.comment_plashka a:hover span { - background-color:white!important; - color:#336699!important; -} + div.link { diff --git a/templates/skin/habra/header.tpl b/templates/skin/habra/header.tpl index 6d852fb9..c40beb62 100644 --- a/templates/skin/habra/header.tpl +++ b/templates/skin/habra/header.tpl @@ -9,7 +9,7 @@ - + @@ -22,7 +22,7 @@ - + {literal} diff --git a/templates/skin/habra/img/link_url.gif b/templates/skin/habra/img/link_url.gif new file mode 100644 index 0000000000000000000000000000000000000000..c402a0dffc4aa45dcf15df7bdef8922442a68a47 GIT binary patch literal 553 zcmZ?wbhEHbuqD-T~OZ(X_e?)S<2pE_q9kPF=xyXe;Li*M$x*q+#Y`r^Y+%Qoz>D>*u6$@Yfb zZ`1=iI#-nexse4ymd4KxBCyk_I)&1*2>P~$A|9`>iU8leOJ^c2U zUGBk);@2PI3lH%^AEGOj?9iXoo z$0Wle6r03vB$3U_6rOAm%w=XA=$|XX&T7q<6&h)u8f9qXRG=yBVqlseCK_hh#b)cQ Wr68}!(bW{esGGyY5GcaIU=0A+FblE( literal 0 HcmV?d00001 diff --git a/templates/skin/habra/img/link_url_big.gif b/templates/skin/habra/img/link_url_big.gif new file mode 100644 index 0000000000000000000000000000000000000000..42b32f9694f8fb5b03a55e417b21527c4ba7ac63 GIT binary patch literal 652 zcmV;70(1RGNk%w1VGsZi0Oo%HEm*h|L9aVqy3zIh_5J_m`u-(bx(qq1Vt1wZ{r<1c z>ErkP-uL|yL$Krd{)@EM+vxT3{r_5r%z>!deXrir)!9LN$u?WMrr7Z!NTryiwCd{Y ztFymPj?rj}&We?;sIb2A`TZ(ky&+1kuJZl6(Ce|)?iNV0dd2CLvEDXt#8#HoNQcfH zQnwpUvFYmT=;`XJu)gQ$>5bgGApA`u-nDr;5Jiu-@~V&Fq7l zwoir3xZ(7K(C@Mug46?D@IX?ueYUirDh9%IU(^ z?zGG4U6;|u>-f&~{J!J$tLphWb;f_R;OqMS?fd@j{QhO2+5i9lA^8LW004ggEC2ui z01yBW000N+fPaF5FdP~h94~{5e=Mo?5hHzXuCcszGKbT1$)MJ8n?O*1oaL0?8Y zerh!=D-;TPYbYpIQchhIL^U*dY#kFgNp4C^VqsiA7HEJFp+drhDG(sYLDGSR1r;J< zyl`Q_hJ-mKO2h$kMuiOnE)*d+(Zax!6e-Mj5MiLj2?T_61ZV)jgNG>^ZKrljpQ!OJ9_+%t#LyQj}Vx(ad2mm|H5L^2I literal 0 HcmV?d00001 diff --git a/templates/skin/habra/img/tagcloud.gif b/templates/skin/habra/img/tagcloud.gif new file mode 100644 index 0000000000000000000000000000000000000000..69e74421627b27e2f5dd0da1b72627cc8f2dd5cb GIT binary patch literal 116 zcmZ?wbhEHb6lM@+n8?8J|NsBZ2anx+{GNe - Новые + Новые @@ -40,7 +40,7 @@ - +{if $sMenuSubItemSelect=='add'} @@ -53,11 +53,11 @@ - + --> - --> + @@ -66,5 +66,5 @@ - +{/if} diff --git a/templates/skin/habra/topic.tpl b/templates/skin/habra/topic.tpl index ec792471..c08c6af6 100644 --- a/templates/skin/habra/topic.tpl +++ b/templates/skin/habra/topic.tpl @@ -3,12 +3,15 @@

{$oTopic->getBlogTitle()|escape:'html'} →  + {if $oTopic->getType()=='link'} + ссылка + {/if} {if $oTopic->getPublish()==0} {/if} {$oTopic->getTitle()|escape:'html'} {if $oUserCurrent and $oUserCurrent->getId()==$oTopic->getUserId()} - + {/if}

@@ -73,6 +76,11 @@  
{/if} + {if $oTopic->getType()=='link'} + + {/if} diff --git a/templates/skin/habra/topic_list.tpl b/templates/skin/habra/topic_list.tpl index d628fde1..3b31bdc7 100644 --- a/templates/skin/habra/topic_list.tpl +++ b/templates/skin/habra/topic_list.tpl @@ -6,12 +6,15 @@

{$oTopic->getBlogTitle()|escape:'html'} →  + {if $oTopic->getType()=='link'} + ссылка + {/if} {if $oTopic->getPublish()==0} {/if} - {$oTopic->getTitle()|escape:'html'} + {$oTopic->getTitle()|escape:'html'} {if $oUserCurrent and $oUserCurrent->getId()==$oTopic->getUserId()} - + {/if}

@@ -66,7 +69,12 @@
+
+ {if $oTopic->getType()=='link'} + + {/if}