Блок с данными автора
Пытаюсь переделать блок с данными автора от BorisBritva под 0.3, обсуждалось здесь В общем тупо в 0.3 сделал как там он описал, почти получилось. Никак не могу в этом блоке вывести стрелки для голосования за юзера. Пробовал пути менять вместо img в шаблоне прописывал images, туда по отдельности стрелки новые с нового шаблона загружал, не получается… короче не хватает мозгов:). Сейчас у меня код шаблона block.cabinet.tpl выглядит так:
Сам блок выглядит так:
Помогите пожалуйста переделать под 0.3
{if $oTopic}
<div class="block stream">
<div class="tl"><div class="tr"></div></div>
<div class="cl"><div class="cr">
<h1>Автор</h1>
<div class="live_section">
<A href="{$DIR_WEB_ROOT}/profile/{$oTopic->getUserLogin()}/"><IMG align="left" class=img_border aheight=64 alt="" src="{$myUser->getProfileAvatarPath(64)}" style="margin: 0 10px 0 0;" width=64 border=0></A>
<DIV class=hello>
<b><A class=hello_nickname href="{$DIR_WEB_ROOT}/profile/{$oTopic->getUserLogin()}/">{$oTopic->getUserLogin()}</A></b><BR />
<A class=hello_nickname href="{$DIR_WEB_ROOT}/my/{$oTopic->getUserLogin()}/">записи</A><br />
<A class=hello_nickname href="{$DIR_WEB_ROOT}/my/{$oTopic->getUserLogin()}/comment/">комментарии</A>
</DIV>
</div>
<div class="live_section">
<br />
<table border="0">
<tr valign="top">
<td align="center" valign="top">
<span class="userinfo_karma_text">{$aLang.user_rating}</span>
<span class="userinfo_karma">
<nobr>
<span id="user_vote_self_{$oTopic->getUserId()}" style="display: none;" >
<img src="{$DIR_STATIC_SKIN}/img/vote_up_gray.gif" width="16" height="16" alt="{$aLang.user_vote_up}" title="{$aLang.user_vote_self}" />
<span id="user_rating_self_{$oTopic->getUserId()}" style="color: {if $myUser->getRating()<0}#d00000{else}#008000{/if};">{$myUser->getRating()}</span>
<img src="{$DIR_STATIC_SKIN}/img/vote_down_gray.gif" width="16" height="16" alt="{$aLang.user_vote_down}" title="{$aLang.user_vote_self}" />
</span>
<span id="user_vote_anonim_{$oTopic->getUserId()}" style="display: none;" >
<img src="{$DIR_STATIC_SKIN}/img/vote_up_gray.gif" width="16" height="16" alt="{$aLang.user_vote_up}" title="{$aLang.user_vote_guest}" />
<span id="user_rating_anonim_{$oTopic->getUserId()}" style="color: {if $myUser->getRating()<0}#d00000{else}#008000{/if};">{$myUser->getRating()}</span>
<img src="{$DIR_STATIC_SKIN}/img/vote_down_gray.gif" width="16" height="16" alt="{$aLang.user_vote_down}" title="{$aLang.user_vote_guest}" />
</span>
<span id="user_vote_is_vote_down_{$oTopic->getUserId()}" style="display: none;" >
<img src="{$DIR_STATIC_SKIN}/img/vote_up_gray.gif" width="16" height="16" alt="{$aLang.user_vote_up}" title="{$aLang.user_vote_already}" />
<span id="user_rating_is_vote_down_{$oTopic->getUserId()}" style="color: {if $myUser->getRating()<0}#d00000{else}#008000{/if};">{$myUser->getRating()}</span>
<img src="{$DIR_STATIC_SKIN}/img/vote_down.gif" width="16" height="16" alt="{$aLang.user_vote_down}" title="{$aLang.user_vote_already}" />
</span>
<span id="user_vote_is_vote_up_{$oTopic->getUserId()}" style="display: none;" >
<img src="{$DIR_STATIC_SKIN}/img/vote_up.gif" width="16" height="16" alt="{$aLang.user_vote_up}" title="{$aLang.user_vote_already}" />
<span id="user_rating_is_vote_up_{$oTopic->getUserId()}" style="color: {if $myUser->getRating()<0}#d00000{else}#008000{/if};">{$myUser->getRating()}</span>
<img src="{$DIR_STATIC_SKIN}/img/vote_down_gray.gif" width="16" height="16" alt="{$aLang.user_vote_down}" title="{$aLang.user_vote_already}" />
</span>
<span id="user_vote_ok_{$oTopic->getUserId()}" style="display: none;" >
<a href="#" onclick="ajaxVoteUser({$oTopic->getUserId()},1); return false;"><img src="{$DIR_STATIC_SKIN}/img/vote_up.gif" width="16" height="16" alt="{$aLang.user_vote_up}" title="{$aLang.user_vote_up}" /></a>
<span id="user_rating_ok_{$oTopic->getUserId()}" style="color: {if $myUser->getRating()<0}#d00000{else}#008000{/if};">{$myUser->getRating()}</span>
<a href="#" onclick="ajaxVoteUser({$oTopic->getUserId()},-1); return false;"><img src="{$DIR_STATIC_SKIN}/img/vote_down.gif" width="16" height="16" alt="{$aLang.user_vote_down}" title="{$aLang.user_vote_down}" /></a>
</span>
{if $oUserCurrent}
{if $oUserCurrent->getId()==$oTopic->getUserId()}
<script>showUserVote('user_vote_self',{$oTopic->getUserId()});</script>
{else}
{if $myUser->getUserIsVote()}
{if $myUser->getUserVoteDelta()>0}
<script>showUserVote('user_vote_is_vote_up',{$oTopic->getUserId()});</script>
{else}
<script>showUserVote('user_vote_is_vote_down',{$oTopic->getUserId()});</script>
{/if}
{else}
<script>showUserVote('user_vote_ok',{$oTopic->getUserId()});</script>
{/if}
{/if}
{else}
<script>showUserVote('user_vote_anonim',{$oTopic->getUserId()});</script>
{/if}
</nobr>
</span>
<div class="userinfo_karma_text"><span id="user_count_vote_{$oTopic->getUserId()}">{$myUser->getCountVote()}</span> {$aLang.user_vote_count}<br /></div>
</td>
<td align="center" valign="top">
<span class="userinfo_karma_text">{$aLang.user_skill}</span>
<span class="userinfo_karma">
<span id="user_skill_{$oTopic->getUserId()}" style="color: #ffffff; background-color: #25a8ff;">{$myUser->getSkill()}</span>
</span>
</td>
</tr>
</table>
</div>
<h3 class="new_group_sections">↓ Другие записи ({$myCount})</h3>
<div class="live_section">
{foreach from=$aMyTopics item=oTopics}
<div class="live_section_navtext_title">
→
<a href="{$oTopics->getBlogUrlFull()}" class="live_section_navtext_title_sec">{$oTopics->getBlogTitle()|escape:'html'}</a> /
<a href="{$DIR_WEB_ROOT}/blog/{if $oTopics->getBlogUrl()}{$oTopics->getBlogUrl()}/{/if}{$oTopics->getId()}.html" class="live_section_navtext_title">{$oTopics->getTitle()}</a>
</div>
{/foreach}
</div>
</div>
<div class="bl"><div class="br"></div></div>
</div>
{/if}
Сам блок выглядит так:
Помогите пожалуйста переделать под 0.3
6 комментариев