+0.99
Рейтинг
2.83
Сила
Вот весь код profile_top.tpl (рабочий):
<div class="profile">
	{hook run='profile_top_begin' oUserProfile=$oUserProfile}
	
	<div class="vote-profile">
		<div id="vote_area_user_{$oUserProfile->getId()}" class="vote-topic
																	{if $oUserProfile->getRating() > 0}
																		vote-count-positive
																	{elseif $oUserProfile->getRating() < 0}
																		vote-count-negative
																	{elseif $oUserProfile->getRating() == 0}
																		vote-count-zero
																	{/if}
																	
																	{if $oVote} 
																		voted 
																		
																		{if $oVote->getDirection() > 0}
																			voted-up
																		{elseif $oVote->getDirection() < 0}
																			voted-down
																		{/if}
																	{else}
																		not-voted
																	{/if}
																	
																	{if ($oUserCurrent && $oUserProfile->getId() == $oUserCurrent->getId()) || !$oUserCurrent}
																		vote-nobuttons
																	{/if}">
			<div class="vote-item vote-down" onclick="return ls.vote.vote({$oUserProfile->getId()},this,-1,'user');"><span><i></i></span></div>
			<div class="vote-item vote-count" title="{$aLang.user_vote_count}: {$oUserProfile->getCountVote()}">
				<span id="vote_total_user_{$oUserProfile->getId()}">{if $oUserProfile->getRating() > 0}+{/if}{$oUserProfile->getRating()}</span>
			</div>
			<div class="vote-item vote-up" onclick="return ls.vote.vote({$oUserProfile->getId()},this,1,'user');"><span><i></i></span></div>
		</div>
		<div class="vote-label">{$aLang.user_rating}</div>
	</div>
	
	<div class="strength">
		<div class="count" id="user_skill_{$oUserProfile->getId()}">{$oUserProfile->getSkill()}</div>
		<div class="vote-label">{$aLang.user_skill}</div>
	</div>

	{if $oUserCurrent && $oUserCurrent->getId()!=$oUserProfile->getId()}
		<a href="{router page='talk'}add/?talk_users={$oUserProfile->getLogin()}"><button type="submit"  class="button button-action button-action-send-message"><i class="icon-synio-send-message"></i><span>{$aLang.user_write_prvmsg}</span></button></a>
	
    {if $oUserProfile->getUserFriend() and ($oUserProfile->getUserFriend()->getFriendStatus()==$USER_FRIEND_ACCEPT+$USER_FRIEND_OFFER or $oUserProfile->getUserFriend()->getFriendStatus()==$USER_FRIEND_ACCEPT+$USER_FRIEND_ACCEPT)}
	
	{elseif $oUserProfile->getUserFriend() and $oUserProfile->getUserFriend()->getStatusTo()==$USER_FRIEND_REJECT and $oUserProfile->getUserFriend()->getStatusFrom()==$USER_FRIEND_OFFER and $oUserProfile->getUserFriend()->getUserTo()==$oUserCurrent->getId()}
	<a href="#" title="{$aLang.user_friend_add}" onclick="return ls.user.addFriend(this,{$oUserProfile->getId()},'accept');"><button type="submit"  class="button button-action button-action-add-friend"><i class="icon-synio-add-friend"></i><span>{$aLang.user_friend_add}</span></button></a>
	{elseif $oUserProfile->getUserFriend() and $oUserProfile->getUserFriend()->getFriendStatus()==$USER_FRIEND_OFFER+$USER_FRIEND_REJECT and $oUserProfile->getUserFriend()->getUserTo()!=$oUserCurrent->getId()}							
	
	{elseif $oUserProfile->getUserFriend() and $oUserProfile->getUserFriend()->getFriendStatus()==$USER_FRIEND_OFFER+$USER_FRIEND_NULL and $oUserProfile->getUserFriend()->getUserFrom()==$oUserCurrent->getId()}						
	
	{elseif $oUserProfile->getUserFriend() and $oUserProfile->getUserFriend()->getFriendStatus()==$USER_FRIEND_OFFER+$USER_FRIEND_NULL and $oUserProfile->getUserFriend()->getUserTo()==$oUserCurrent->getId()}
	<a href="#" title="{$aLang.user_friend_add}" onclick="return ls.user.addFriend(this,{$oUserProfile->getId()},'accept');"><button type="submit"  class="button button-action button-action-add-friend"><i class="icon-synio-add-friend"></i><span>{$aLang.user_friend_add}</span></button></a>
    {elseif !($oUserProfile->getUserFriend())}
	<div id="add_friend_form" class="modal">
		<header class="modal-header">
			<h3>{$aLang.profile_add_friend}</h3>
			<a href="#" class="close jqmClose"></a>
		</header>

		<form onsubmit="return ls.user.addFriend(this,{$oUserProfile->getId()},'add');" class="modal-content">
			<p><label for="add_friend_text">{$aLang.user_friend_add_text_label}</label>
			<textarea id="add_friend_text" rows="3" class="input-text input-width-full"></textarea></p>

			<button type="submit"  class="button button-primary">{$aLang.user_friend_add_submit}</button>
		</form>
	</div>
	<a href="#" title="{$aLang.user_friend_add}" onclick="return ls.user.addFriend(this,{$oUserProfile->getId()},'link');"><button type="submit"  class="button button-action button-action-add-friend"><i class="icon-synio-add-friend"></i><span>{$aLang.user_friend_add}</span></button></a>
	{else}
	<a href="#" title="{$aLang.user_friend_add}" onclick="return ls.user.addFriend(this,{$oUserProfile->getId()},'link');"><button type="submit"  class="button button-action button-action-add-friend"><i class="icon-synio-add-friend"></i><span>{$aLang.user_friend_add}</span></button></a>
	{/if}

    {/if}

	<h2 class="page-header user-login word-wrap {if !$oUserProfile->getProfileName()}no-user-name{/if}" itemprop="nickname">{$oUserProfile->getLogin()}</h2>
	
	{if $oUserProfile->getProfileName()}
		<p class="user-name" itemprop="name">{$oUserProfile->getProfileName()|escape:'html'}</p>
	{/if}
	
	{hook run='profile_top_end' oUserProfile=$oUserProfile}
</div>
почему нельзя?
В БД можно вручную удалить
нет, не мой
пример на ЛС: kosmetista.ru/page/advertising/
Что бы имя было заполнено, можно в форму регистрации добавить обязательное поля «Имя»
Если нужен базовый функционал (как на этом сайте), то за 300$ вам поднимут сайт на LS со стандартным (неплохим) функционалом, дизайном и основными плагинами. Срок — 2 дня.
Да между VPS и DS разницы принципиальной нету, только ресурсы. Интересно какие связки вебсервер-php-кешеры используются, почему именно такие и как сконфигурены.
У меня, например, все работает на Debian 6: nginx+php_fpm+APC+memcached
пишите, про настройку VPS интересно будет почитать
у меня все верно написано, просто надо внимательнее читать инструкции
Хак рабочий, проверено, самому себе в друзья нет возмонжости добавиться, т.к. кнопка добавления в друзья обернута в проверку
{if $oUserCurrent && $oUserCurrent->getId()!=$oUserProfile->getId()}


если кнопка «написать сообщение» в своем профиле у вас тоже показывается, то значит вы и её забыли обернуть в проверку.
мой пример поможет вспомнить пароль большинству юзеров, при этом не показывая его явно
1***9 лучше чем совсем ничего, имхо
Супер, все работает, автор молодец =)
спасибо, сейчас потестим
не, ну вместо того что бы минусовать лучше бы объяснили с чем не согласны
Честно, не понял, зачем нам 3 столбца вместо одного. В ваших рассуждениях вы меняете значения стоблцов date_last и comment_count_new одновременно, значит, один столбец можем выкинуть. comment_id_last, как я понимаю, нужен только как ключ для связи с таблицой -_opinion, но я бы из-за одного столбца не стал бы выносить сущность в отдельную таблицу.
Если сможете реализовать, скажу большое спасибо, т.к. я в php не силен.
неужели никто не знает?=)
Сейчас, при появлении нового мнения, пользователь не узнает об этом, пока не зайдет в раздел «Мнения обо мне». Логично было бы допилить функционал так, что бы при появлении нового мнения у пользователя этот раздел как-то выделялся.
можно, в конфиге плагина настраивается
это сделано бесплатным плагином «Мнения» livestreetcms.com/addons/view/483/

Его, кстати, в ближайшее время тоже планирую «допилить», результаты выложу.