diff --git a/classes/actions/ActionPhotoset.class.php b/classes/actions/ActionPhotoset.class.php index 7dc72a6b..f96e8801 100644 --- a/classes/actions/ActionPhotoset.class.php +++ b/classes/actions/ActionPhotoset.class.php @@ -430,14 +430,19 @@ class ActionPhotoset extends Action { $oTopic->setBlogId($oBlog->getId()); $oTopic->setUserId($this->oUserCurrent->getId()); $oTopic->setType('photoset'); - $oTopic->setTitle(getRequest('topic_title')); - $oTopic->setText(htmlspecialchars(getRequest('topic_text'))); - $oTopic->setTextShort(htmlspecialchars(getRequest('topic_text'))); + $oTopic->setTitle(getRequest('topic_title')); + /** + * Получаемый и устанавливаем разрезанный текст по тегу + */ + list($sTextShort,$sTextNew,$sTextCut) = $this->Text_Cut(getRequest('topic_text')); + $oTopic->setCutText($sTextCut); + $oTopic->setText($this->Text_Parser($sTextNew)); + $oTopic->setTextShort($this->Text_Parser($sTextShort)); + $oTopic->setTextSource(getRequest('topic_text')); $oTopic->setTags(getRequest('topic_tags')); $oTopic->setDateAdd(date("Y-m-d H:i:s")); $oTopic->setUserIp(func_getIp()); - $oTopic->setCutText(null); $oTopic->setTextHash(md5($oTopic->getType().$oTopic->getText().$oTopic->getTitle())); $sTargetTmp=$_COOKIE['ls_photoset_target_tmp']; @@ -571,8 +576,15 @@ class ActionPhotoset extends Action { * Теперь можно смело редактировать топик */ $oTopic->setBlogId($oBlog->getId()); - $oTopic->setText(htmlspecialchars(getRequest('topic_text'))); - $oTopic->setTextShort(htmlspecialchars(getRequest('topic_text'))); + $oTopic->setTitle(getRequest('topic_title')); + /** + * Получаемый и устанавливаем разрезанный текст по тегу + */ + list($sTextShort,$sTextNew,$sTextCut) = $this->Text_Cut(getRequest('topic_text')); + $oTopic->setCutText($sTextCut); + $oTopic->setText($this->Text_Parser($sTextNew)); + $oTopic->setTextShort($this->Text_Parser($sTextShort)); + $oTopic->setTextSource(getRequest('topic_text')); $oTopic->setTags(getRequest('topic_tags')); $oTopic->setUserIp(func_getIp()); diff --git a/templates/skin/developer-jquery/topic_photoset.tpl b/templates/skin/developer-jquery/topic_photoset.tpl index 0c15aeab..c915b631 100644 --- a/templates/skin/developer-jquery/topic_photoset.tpl +++ b/templates/skin/developer-jquery/topic_photoset.tpl @@ -34,22 +34,23 @@ -
- {if $bTopicList} - {$oTopic->getTextShort()} - {if $oTopic->getTextShort()!=$oTopic->getText()} - - {if $oTopic->getCutText()} - {$oTopic->getCutText()} - {else} - {$aLang.topic_read_more} - {/if} - - {/if} - {else} - {$oTopic->getText()} - {/if} -
+ {assign var=iPhotosCount value=$oTopic->getPhotosetCount()} +
+ {if $bTopicList} + {$oTopic->getTextShort()} + {if $oTopic->getTextShort()!=$oTopic->getText()} +
+ {if $oTopic->getCutText()} + {$oTopic->getCutText()} + {else} + {$aLang.topic_photoset_show_all|ls_lang:"COUNT%%`$iPhotosCount`"} → + {/if} + + {/if} + {else} + {$oTopic->getText()} + {/if} +
{if !$bTopicList} diff --git a/templates/skin/developer/topic_photoset.tpl b/templates/skin/developer/topic_photoset.tpl index d9e32e2d..0b23bde3 100644 --- a/templates/skin/developer/topic_photoset.tpl +++ b/templates/skin/developer/topic_photoset.tpl @@ -37,25 +37,18 @@ - + {assign var=iPhotosCount value=$oTopic->getPhotosetCount()}
{if $bTopicList} {$oTopic->getTextShort()} - - - -

{$aLang.topic_photoset_show_all|ls_lang:"COUNT%%`$iPhotosCount`"} → - - - {if $oTopic->getTextShort()!=$oTopic->getText()} -

( +
{if $oTopic->getCutText()} {$oTopic->getCutText()} {else} - {$aLang.topic_read_more} - {/if} - ) + {$aLang.topic_photoset_show_all|ls_lang:"COUNT%%`$iPhotosCount`"} → + {/if} + {/if} {else} {$oTopic->getText()} diff --git a/templates/skin/new-jquery/topic_photoset.tpl b/templates/skin/new-jquery/topic_photoset.tpl index 6bb3b31e..e7c9baa7 100644 --- a/templates/skin/new-jquery/topic_photoset.tpl +++ b/templates/skin/new-jquery/topic_photoset.tpl @@ -38,16 +38,16 @@ image
- + {assign var=iPhotosCount value=$oTopic->getPhotosetCount()}
{if $bTopicList} {$oTopic->getTextShort()} {if $oTopic->getTextShort()!=$oTopic->getText()} - +
{if $oTopic->getCutText()} {$oTopic->getCutText()} {else} - {$aLang.topic_read_more} + {$aLang.topic_photoset_show_all|ls_lang:"COUNT%%`$iPhotosCount`"} → {/if} {/if} diff --git a/templates/skin/new/topic_photoset.tpl b/templates/skin/new/topic_photoset.tpl index 3b22b045..e8c63ce2 100644 --- a/templates/skin/new/topic_photoset.tpl +++ b/templates/skin/new/topic_photoset.tpl @@ -28,7 +28,7 @@ {/if} - {assign var=iPhotosCount value=$oTopic->getPhotosCount()} + {assign var=iPhotosCount value=$oTopic->getPhotosetCount()}
{assign var=oMainPhoto value=$oTopic->getPhotosetMainPhoto()} @@ -44,21 +44,14 @@
{if $bTopicList} {$oTopic->getTextShort()} - - - -

{$aLang.topic_photoset_show_all|ls_lang:"COUNT%%`$iPhotosCount`"} → - - - {if $oTopic->getTextShort()!=$oTopic->getText()} -

( +
{if $oTopic->getCutText()} {$oTopic->getCutText()} {else} - {$aLang.topic_read_more} - {/if} - ) + {$aLang.topic_photoset_show_all|ls_lang:"COUNT%%`$iPhotosCount`"} → + {/if} + {/if} {else} {$oTopic->getText()}