Особенности скрипта:
— Всегда находится в правом нижнем углу браузера.
— Работает как для зарегистрированных, так и для не зарегистрированных пользователей.
— Занимает мало-места.
— Умеет уведомлять о личных сообщениях
Демо версия:
Гость | Зарегистрированный пользователь
Как устанавливать?
1. Заходим в шаблон «Форма входа пользователей» и всё что там есть заменяем на:
Code
<div class="userprofileContentFr">
<label for="authLogin"><?if($UID_ICON$)?>Электронная почта<?else?>Логин<?endif?>:</label><br />
<input type="text" id="authLogin" name="user" />
</div>
<div class="userprofileContentFr">
<label for="authPassword">Пароль:</label><br />
<input type="password" id="authPassword" name="password" />
</div>
<div class="userprofileContentFrChecks">
<div class="userprofileContentFrCheck">
<a href="$REMINDER_LINK$">Вспомнить пароль</a>
</div>
<div class="userprofileContentFrCheck">
<input type="checkbox" id="rem$PAGE_ID$" name="rem" /> <label for="rem$PAGE_ID$">Запомнить меня</label>
</div>
<?if($HIDDEN_ALLOWED$)?>
<div class="userprofileContentFrCheck">
<input type="checkbox" id="hid$PAGE_ID$" name="hidden" /> <label for="hid$PAGE_ID$">Режим невидимости</label>
</div>
<?endif?>
</div>
<div class="userprofileContenButton">
<input type="submit" value="Войти в аккаунт" name="sbm" /> $ERROR$
</div>
2. Создаём глобальный блок с имененм «USERPR» и вставляем туда:
Quote
<?if($USER_LOGGED_IN$)?>
<div class="userprofile" id="userprofile">
<a href="javascript://" onclick="$('#userprofileContent').show('');$('#userprofile').hide('');">Мини-профиль</a> <?if($UNREAD_PM$>"0")?><span class="userprofileContentNewPM" id="newpmsm">— 15</span>
<script type="text/javascript">function flashit(id,cl){var c=document.getElementById(id);if (c.style.color=='red'){c.style.color=cl;}else {c.style.color='red';}}setInterval("flashit('newpmsm','')",500)</script><?endif?>
</div>
<div class="userprofileContent" id="userprofileContent">
<div class="userprofileContentOverflow">
<?if($USER_AVATAR_URL$)?>
<div class="userprofileContentAvatar"><img src="$USER_AVATAR_URL$" alt="$USERNAME$" /></div>
<?endif?>
<div class="userprofileContentInfo">
<strong><a href="/index/8" onclick="window.open('/index/8','upp','scrollbars=1,top=0,left=0,resizable=1,width=680,height=350');return false;">$USERNAME$</a></strong><br />
Группа: «$USER_GROUP$»
</div>
</div>
<div class="userprofileContentActions">
<ul>
<li><a href="/index/8" onclick="window.open('/index/8','upp','scrollbars=1,top=0,left=0,resizable=1,width=680,height=350');return false;">Полный профиль</a></li>
<li><a href="/index/14" onclick="window.open('/index/14','pmw','scrollbars=1,top=0,left=0,resizable=1,width=680,height=350');return false;">Личные ссобщения</a><?if($UNREAD_PM$>"0")?> <span class="userprofileContentNewPM" id="newpm">— 15</span></li>
<script type="text/javascript">function flashit(id,cl){var c=document.getElementById(id);if (c.style.color=='red'){c.style.color=cl;}else {c.style.color='red';}}setInterval("flashit('newpm','')",500)</script>
<?endif?>
<li><a href="/index/11" onclick="window.open('/index/11','pedit','scrollbars=1,top=0,left=0,resizable=1,width=680,height=350');return false;">Редактировать профиль</a></li>
<li><a href="$LOGOUT_LINK$">Выйти из аккаунта</a></li>
</ul>
</div>
<div class="userprofileContentClose"><a href="javascript://" onclick="$('#userprofileContent').hide('');$('#userprofile').show('');">Закрыть мини-профиль</a></div>
</div>
<?else?>
<div class="userprofile" id="userprofile">
<a href="javascript://" onclick="$('#userprofileContent').show('');$('#userprofile').hide('');">Войти в аккаунт</a> |
<a href="$REGISTER_LINK$" class="userprofileLink">Регистрация</a>
</div>
<div class="userprofileContent" id="userprofileContent">
<div class="userprofileContentForm">
<div class="userprofileContentTitle">Авторизация</div>
$LOGIN_FORM$
</div>
<div class="userprofileContentClose">
<a href="javascript://" onclick="$('#userprofileContent').hide('');$('#userprofile').show('');">Я передумал</a> |
<a href="$REGISTER_LINK$" class="userprofileContentCloseLink">Регистрация</a>
</div>
</div>
<?endif?>
3. На всех страницах где нужен мини-профиль перед </body> добавляем $GLOBAL_USERPR$.
4. Открываем шаблон «Таблица стилей (CSS)» и в самый конец вставляем:
Доступно только для пользователей