mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-26 11:40:48 +03:00
fix topic-photoset
This commit is contained in:
parent
6f8764e386
commit
56e119db3d
|
@ -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'));
|
||||
/**
|
||||
* Получаемый и устанавливаем разрезанный текст по тегу <cut>
|
||||
*/
|
||||
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'));
|
||||
/**
|
||||
* Получаемый и устанавливаем разрезанный текст по тегу <cut>
|
||||
*/
|
||||
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());
|
||||
|
|
|
@ -34,22 +34,23 @@
|
|||
</div>
|
||||
<!-- /Topic Photo Preview -->
|
||||
|
||||
<div class="content">
|
||||
{if $bTopicList}
|
||||
{$oTopic->getTextShort()}
|
||||
{if $oTopic->getTextShort()!=$oTopic->getText()}
|
||||
<a href="{$oTopic->getUrl()}#cut" title="{$aLang.topic_read_more}">
|
||||
{if $oTopic->getCutText()}
|
||||
{$oTopic->getCutText()}
|
||||
{else}
|
||||
{$aLang.topic_read_more}
|
||||
{/if}
|
||||
</a>
|
||||
{/if}
|
||||
{else}
|
||||
{$oTopic->getText()}
|
||||
{/if}
|
||||
</div>
|
||||
{assign var=iPhotosCount value=$oTopic->getPhotosetCount()}
|
||||
<div class="content">
|
||||
{if $bTopicList}
|
||||
{$oTopic->getTextShort()}
|
||||
{if $oTopic->getTextShort()!=$oTopic->getText()}
|
||||
<br /><a href="{$oTopic->getUrl()}#cut" title="{$aLang.topic_read_more}">
|
||||
{if $oTopic->getCutText()}
|
||||
{$oTopic->getCutText()}
|
||||
{else}
|
||||
{$aLang.topic_photoset_show_all|ls_lang:"COUNT%%`$iPhotosCount`"} →
|
||||
{/if}
|
||||
</a>
|
||||
{/if}
|
||||
{else}
|
||||
{$oTopic->getText()}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<!-- Topic Photo Image List -->
|
||||
{if !$bTopicList}
|
||||
|
|
|
@ -37,25 +37,18 @@
|
|||
</div>
|
||||
<!-- /Topic Photo Preview -->
|
||||
|
||||
|
||||
{assign var=iPhotosCount value=$oTopic->getPhotosetCount()}
|
||||
<div class="content">
|
||||
{if $bTopicList}
|
||||
{$oTopic->getTextShort()}
|
||||
|
||||
|
||||
<!-- Cut link -->
|
||||
<br /><br /><a href="{$oTopic->getUrl()}">{$aLang.topic_photoset_show_all|ls_lang:"COUNT%%`$iPhotosCount`"} →</a>
|
||||
<!-- /Cut link -->
|
||||
|
||||
|
||||
{if $oTopic->getTextShort()!=$oTopic->getText()}
|
||||
<br><br>( <a href="{$oTopic->getUrl()}#cut" title="{$aLang.topic_read_more}">
|
||||
<br /><a href="{$oTopic->getUrl()}#cut" title="{$aLang.topic_read_more}">
|
||||
{if $oTopic->getCutText()}
|
||||
{$oTopic->getCutText()}
|
||||
{else}
|
||||
{$aLang.topic_read_more}
|
||||
{/if}
|
||||
</a> )
|
||||
{$aLang.topic_photoset_show_all|ls_lang:"COUNT%%`$iPhotosCount`"} →
|
||||
{/if}
|
||||
</a>
|
||||
{/if}
|
||||
{else}
|
||||
{$oTopic->getText()}
|
||||
|
|
|
@ -38,16 +38,16 @@
|
|||
<img src="{$oMainPhoto->getWebPath(500)}" alt="image" />
|
||||
</div>
|
||||
|
||||
|
||||
{assign var=iPhotosCount value=$oTopic->getPhotosetCount()}
|
||||
<div class="content">
|
||||
{if $bTopicList}
|
||||
{$oTopic->getTextShort()}
|
||||
{if $oTopic->getTextShort()!=$oTopic->getText()}
|
||||
<a href="{$oTopic->getUrl()}#cut" title="{$aLang.topic_read_more}">
|
||||
<br /><a href="{$oTopic->getUrl()}#cut" title="{$aLang.topic_read_more}">
|
||||
{if $oTopic->getCutText()}
|
||||
{$oTopic->getCutText()}
|
||||
{else}
|
||||
{$aLang.topic_read_more}
|
||||
{$aLang.topic_photoset_show_all|ls_lang:"COUNT%%`$iPhotosCount`"} →
|
||||
{/if}
|
||||
</a>
|
||||
{/if}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
{/if}
|
||||
</ul>
|
||||
|
||||
{assign var=iPhotosCount value=$oTopic->getPhotosCount()}
|
||||
{assign var=iPhotosCount value=$oTopic->getPhotosetCount()}
|
||||
<!-- Topic Photo Preview -->
|
||||
<div class="topic-photo-preview" style="width: 500px">
|
||||
{assign var=oMainPhoto value=$oTopic->getPhotosetMainPhoto()}
|
||||
|
@ -44,21 +44,14 @@
|
|||
<div class="content">
|
||||
{if $bTopicList}
|
||||
{$oTopic->getTextShort()}
|
||||
|
||||
|
||||
<!-- Cut link -->
|
||||
<br /><br /><a href="{$oTopic->getUrl()}">{$aLang.topic_photoset_show_all|ls_lang:"COUNT%%`$iPhotosCount`"} →</a>
|
||||
<!-- /Cut link -->
|
||||
|
||||
|
||||
{if $oTopic->getTextShort()!=$oTopic->getText()}
|
||||
<br><br>( <a href="{$oTopic->getUrl()}#cut" title="{$aLang.topic_read_more}">
|
||||
<br /><a href="{$oTopic->getUrl()}#cut" title="{$aLang.topic_read_more}">
|
||||
{if $oTopic->getCutText()}
|
||||
{$oTopic->getCutText()}
|
||||
{else}
|
||||
{$aLang.topic_read_more}
|
||||
{/if}
|
||||
</a> )
|
||||
{$aLang.topic_photoset_show_all|ls_lang:"COUNT%%`$iPhotosCount`"} →
|
||||
{/if}
|
||||
</a>
|
||||
{/if}
|
||||
{else}
|
||||
{$oTopic->getText()}
|
||||
|
|
Loading…
Reference in a new issue