1
0
Fork 0
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:
Mzhelskiy Maxim 2011-08-14 10:00:58 +00:00
parent 6f8764e386
commit 56e119db3d
5 changed files with 48 additions and 49 deletions

View file

@ -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());

View file

@ -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`"} &rarr;
{/if}
</a>
{/if}
{else}
{$oTopic->getText()}
{/if}
</div>
<!-- Topic Photo Image List -->
{if !$bTopicList}

View file

@ -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`"} &rarr;</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`"} &rarr;
{/if}
</a>
{/if}
{else}
{$oTopic->getText()}

View file

@ -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`"} &rarr;
{/if}
</a>
{/if}

View file

@ -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`"} &rarr;</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`"} &rarr;
{/if}
</a>
{/if}
{else}
{$oTopic->getText()}