Плавающая шапка шаблона

Приветствую. Помню была на Лайвстрите тема про плавающую шапку ( плавающий header.tpl ). Искал, искал и ничего не нашел. Может кто кинет ссылку или подскажет как сделать это?

Буду очень признателен!

Smarty

{include file='header.tpl'  noShowSystemMessage=true}

Возможно ли через смарти отключить wrapper и content из header на определённой странице? Или же придется дублировать header без блоков — content и wrapper?

Как правильно создать условие для топика в header.tpl

Есть дополнительное поле.
{$oTopic->getAnonsContent()}

Это поле заполняется при создание топика и должно уходить на страницу топика
meta name="description" content="{$sHtmlDescription}"

Вопрос.

Читать дальше →

[1/2 Решено] определить условие {if} для вывода собственного шаблона для нескольких статических страниц/блогов?

Здравствуйте!

Задача заставить шаблон отображать отличный от основного фон в шапке (в header) для нескольких конкретных блогов и статичных страниц.

Имею почти совсем никакой опыт работы с LS, но пытаюсь своими силами разобраться. Помогите, пожалуйста, правильно составить условие для изменения стиля заголовка.

Читать дальше →

Уменьшение высоты header в шаблоне «News Street»

Добрый день!

Подскажите кто знает как уменьшить высоту header (черный прямоугольник)Шаблон «News Street»



header_top.tpl

	<!-- Header -->
	{if !$oUserCurrent}
	<div style="display: none;">
	<div class="login-popup" id="login-form">
		<a href="#" class="close-block" onclick="return false;"></a>
		<div class="content">
			<form action="{router page='login'}" method="POST">
				<h3>{$aLang.user_authorization}</h3>
				{hook run='form_login_popup_begin'}
				<div class="lite-note"><a href="{router page='registration'}">{$aLang.registration_submit}</a><label for="">{$aLang.user_login}</label></div>
				<p><input type="text" class="input-text" name="login" tabindex="1" id="login-input"/></p>
				<div class="lite-note"><a href="{router page='login'}reminder/" tabindex="-1">{$aLang.user_password_reminder}</a><label for="">{$aLang.user_password}</label></div>
				<p><input type="password" name="password" class="input-text" tabindex="2" /></p>
				{hook run='form_login_popup_end'}
				<div class="lite-note"><button type="submit" onfocus="blur()"><span><em>{$aLang.user_login_submit}</em></span></button><label for="" class="input-checkbox"><input type="checkbox" name="remember" checked tabindex="3" >{$aLang.user_login_remember}</label></div>
				<input type="hidden" name="submit_login">
			</form>
		</div>
	</div>
	</div>
	{/if}
	
	<div id="header"><div id="header-center">

		<ul class="nav-main">
			<li {if $sMenuHeadItemSelect=='blog'}class="active"{/if}><a href="{router page='blog'}">{$aLang.blogs}</a></li>
			<li {if $sMenuHeadItemSelect=='people'}class="active"{/if}><a href="{router page='people'}">{$aLang.people}</a></li>
			{hook run='main_menu'}
			<em></em>
			{if $oUserCurrent}
			<div class="profile">
				<a href="{$oUserCurrent->getUserWebPath()}" class="avatar"><img src="{$oUserCurrent->getProfileAvatarPath(24)}" alt="{$oUserCurrent->getLogin()}" /></a>
				<ul>
					<li><a href="{$oUserCurrent->getUserWebPath()}" class="author">{$oUserCurrent->getLogin()}</a></li>
					<li>
						{if $iUserCurrentCountTalkNew}
							<a href="{router page='talk'}" class="message" id="new_messages" title="{$aLang.user_privat_messages_new}">{$iUserCurrentCountTalkNew}</a> 
						{else}
							<a href="{router page='talk'}" class="message-empty" id="new_messages"> </a>
						{/if}
					</li>
					<li><a href="{router page='settings'}profile/" class="author">{$aLang.user_settings}</a></li>
					<li>{$aLang.user_rating} <strong>{$oUserCurrent->getRating()}</strong></li>
					{hook run='userbar_item'}
					<li><a href="{router page='login'}exit/?security_ls_key={$LIVESTREET_SECURITY_KEY}">{$aLang.exit}</a></li>
				</ul>
			</div>
			{else}
			<div class="profile guest">
				<ul>
					<li><a href="{router page='login'}" onclick="return showLoginForm();">{$aLang.user_login_submit}</a></li>
					<li>{$aLang.or}</li>
					<li><a href="{router page='registration'}" class="reg">{$aLang.registration_submit}</a></li>
				</ul>
			</div>
			{/if}
			
		</ul>
		<!-- лого сюда вставлять -->

		<!-- лого сюда вставлять -->
		

		<!-- Банер можно вставить -->
		<!-- Банер можно вставить -->

			
			{if $oTopic}
				{assign var="oBlog" value=$oTopic->getBlog()}
				{assign var="oUserOwner" value=$oBlog->getOwner()}
				{assign var="oVote" value=$oBlog->getVote()}
				{assign var="oUser" value=$oTopic->getUser()}
				{assign var="oUserId" value=$oBlog->getId()}
				
				{if $oBlog and $oBlog->getType() == 'open' or $oBlog->getType() == 'close'}
				
					<div class="header profile-blog">
						<div class="header profile-blog-content">
							<div class="voting {if $oBlog->getRating()>=0}positive{else}negative{/if} {if !$oUserCurrent || $oBlog->getOwnerId()==$oUserCurrent->getId()}guest{/if} {if $oVote} voted {if $oVote->getDirection()>0}plus{elseif $oVote->getDirection()<0}minus{/if}{/if}">
								<div class="clear">{$aLang.blog_rating}</div>
								<a href="#" class="plus" onclick="lsVote.vote({$oBlog->getId()},this,1,'blog'); return false;"></a>
								<div class="total">{if $oBlog->getRating()>0}+{/if}{$oBlog->getRating()}</div>
								<a href="#" class="minus" onclick="lsVote.vote({$oBlog->getId()},this,-1,'blog'); return false;"></a>
								<div class="clear"></div>
								<div class="text">{$aLang.blog_vote_count}:</div><div class="count">{$oBlog->getCountVote()}</div>
							</div>
							
							<img src="{$oBlog->getAvatarPath(48)}" alt="avatar" class="avatar" />
							<h2 class="title"><a href="{$oBlog->getUrlFull()}" class="title-link">{$oBlog->getTitle()|escape:'html'}</a></h2>
							<ul class="action">
								<li>Коллективный блог.</li>
								<li>Читателей: {$oBlog->getCountUser()}</li>
								<li class="rss"><a href="{router page='rss'}blog/{$oBlog->getUrl()}/">RSS блога</a></li>
								{if $oUserCurrent and $oUserCurrent->getId()!=$oBlog->getOwnerId()}
									<li class="join {if $oBlog->getUserIsJoin()}active{/if}">
										<a href="#" onclick="ajaxJoinLeaveBlog(this,{$oBlog->getId()}); return false;"></a>
									</li>
								{/if}
							</ul>
						</div>
					</div>
					
				{else}
				
					<div class="header profile-blog">
						<div class="header profile-blog-content">
							<div class="voting {if $oUser->getRating()>=0}positive{else}negative{/if} {if !$oUserCurrent || $oUser->getId()==$oUserCurrent->getId()}guest{/if} {if $oVote} voted {if $oVote->getDirection()>0}plus{elseif $oVote->getDirection()<0}minus{/if}{/if}">
								<div class="clear">{$aLang.user_rating}</div>
								<a href="#" class="plus" onclick="lsVote.vote({$oUser->getId()},this,1,'user'); return false;"></a>
								<div class="total">{if $oUser->getRating()>0}+{/if}{$oUser->getRating()}</div>
								<a href="#" class="minus" onclick="lsVote.vote({$oUser->getId()},this,-1,'user'); return false;"></a>
								<div class="clear"></div>
								<div class="text">{$aLang.user_vote_count}:</div><div class="count">{$oUser->getCountVote()}</div>
							</div>
							
							<img src="{$oUser->getProfileAvatarPath(48)}" alt="{$oUser->getLogin()}" class="avatar" />
							<h2 class="title">
								{if $oUser->getProfileSex()!='other'}
									{if $oUser->getProfileSex()=='man'}
										<a href="{$oUser->getUserWebPath()}" class="userman title-link">{$oUser->getLogin()}</a>
									{else}
										<a href="{$oUser->getUserWebPath()}" class="userwoman title-link">{$oUser->getLogin()}</a>
									{/if}
								{else}
									<a href="{$oUser->getUserWebPath()}" class="usernone title-link">{$oUser->getLogin()}</a>
								{/if}
							</h2>
							<ul class="action">
								<li>Персональный блог.</li>
							</ul>
						</div>
					</div>
					
				{/if}
				
			{else}
			

			
			{/if}
			
		</div>
		
	</div></div>
	<!-- /Header -->


style.css



/* Generic Blocks
-------------------------------------------------------------------*/
#container { min-width: 980px; }
#header { background: #181818 url(../images/bg-header.gif) repeat-x scroll 0 0; clear: both; height: 250px; overflow: hidden; }

#nav { clear: both; background: #e9e8ea; }
#nav-center { margin: 0px auto; padding: 0 5px; clear: both; width: 970px; }
#wrapper { border-bottom: 1px solid #D1D1D1; padding: 5px; margin: 0 auto; overflow: hidden; width: 970px; min-height: 200px; }
#content { clear: left; float: left; width: 665px; padding-bottom: 15px; }
#sidebar { float: left; margin-left: 25px; width: 280px; }
#footer { border-top: 1px solid #fff; clear: both; width: 970px; color: #333; margin: 0 auto; overflow: hidden; padding: 30px 5px; }

.white-back { padding-bottom: 15px ; }
.white-back #content { clear: none; }
.page-talk { padding-left: 3px !important; margin-right: 50px !important; }


/* Header
-------------------------------------------------------------------*/
#header h1 { background: url(../images/logo.png) no-repeat scroll center 0; float: left; height: 160px; margin: 25px 0 0; text-align: center; width: 200px; }
#header h1 a { color: #E6BA26; text-decoration: none; font: normal 40px/274px Arial, Sans-Serif; padding-top: 115px; }
#header h1 a strong { color: #eee; }

#header h3 { color: #AAA; font-size: 24px; font-weight: normal; margin: 15px 0 0 220px; padding: 17px 0px; }



/* Login and Lite Pages
-------------------------------------------------------------------*/
.lite-header { background: url(../images/logo.png) no-repeat scroll center 0; line-height: 60px; margin: 40px auto; padding-top: 115px; text-align: center; width: 473px; }
.lite-header a { color: #fff; font-size: 55px; padding-top: 115px; text-decoration: none; }
.lite-header a span { color: #E6BA26; }
.lite-header a:hover { color: #555; }
.lite-header a:hover span { color: #777; }


/* Header Promo Blocks
-------------------------------------------------------------------*/ 
#header .main-promo { height: 100px; margin: 15px 0 0 220px; width: 750px; }
#header .promo { background: #181818; border: 1px solid #333; box-shadow: 0 0 8px rgba(0, 0, 0, 0.9); float: left; height: 100px; margin: 0 0 0 28px; width: 229px; }
#header .promo.first { margin: 0; }
#header .promo:hover { border: 1px solid #E6BA26; }

/* Header Blog Block
-------------------------------------------------------------------*/ 
.header.profile-blog { background: #181818; border: 1px solid #333; margin-bottom: 0; padding: 20px; height: 60px; box-shadow: 0 0 8px rgba(0, 0, 0, 0.9); }
.header.profile-blog:hover { border: 1px solid #E6BA26; }
.header.profile-blog img.avatar { top: 26px; }
.header.profile-blog .action { overflow: hidden; margin: 0; line-height: 18px; padding-left: 60px; zoom: 1; }
.header.profile-blog .action li { float: left; margin-right: 10px; color: #AAA; }
.header.profile-blog .action li a { color: #aaa; outline: none; text-decoration: none; }
.header.profile-blog .action li.rss a { display: block; background: url(../images/rss.gif) no-repeat scroll left 1px; width: auto; height: 16px; padding-left: 20px; }
.header.profile-blog .action li.join a { display: block; height: 16px; width: 110px; background: url(../images/icon-blog-join-text.gif) no-repeat scroll 0 1px; padding-left: 20px; }
.header.profile-blog .action li.join a:hover { background: url(../images/icon-blog-join-text.gif) no-repeat scroll 0px -15px; }
.header.profile-blog .action li.join.active a { background: url(../images/icon-blog-join-text.gif) no-repeat scroll 0px -31px; }
.header.profile-blog .action li a:hover { text-decoration: underline; }
.profile-blog h2.title { font-size: 24px; line-height: 30px; color: #b0b0b0; padding-left: 60px; }
.profile-blog h2.title a.title-link { outline: none; }



Спасибо!

Добавить ссылку в шапку на другой сайт в header_top.tpl

Добавить ссылку в шапку на другой сайт в header_top.tpl

1) Вопрос что конкретно и куда в коде надо прописать в header_top.tpl чтобы в шапке сайта появилась ссылка на другой сайт?
2) Возможно ли добавить ссылку в шапку на другой сайт через плагин Static page?

Буду очень благодарен. Можно помощь за донейт.

Выделение пункта главного меню

В главное меню вынесена ссылка на статичную страницу со ссылкой
http://bye.com/page/fallout/fallout2/

1. Для добавления класса active странице /page/ используем
{if $sAction=='page'}class="active'{/if}

2. Для добавления класса active странице /page/fallout/ используем
{if $sAction=='page' and $sEvent=='fallout'}class="active"{/if}

Вопрос

Картинка в header.

Вставил в header.tpl код с картинкой, она отображается у меня под меню.
Как сделать, чтобы она была только на главной?

Заранее благодарен за понимание в незнании и за ответ.