Skocz do zawartości

Instalacja adsense w smartach plik.tpl


bestos

Rekomendowane odpowiedzi

Nie potrafie umieścic reklam adsense w plikach .tpl rozwala strone całkowicie i reklamy wyglądają całkiem inaczej...

Chce umieścić reklamy powyżej include footer.tpl

{* Calculate title from path *}
{capture name="title"}
  {if count($path) > 1} - {/if}
  {foreach from=$path item=category name=path}
  {if $smarty.foreach.path.iteration gt 2}
	 >
  {/if}
  {if not $smarty.foreach.path.first}
	 {$category.TITLE}
  {/if}
  {/foreach}
{/capture}

{strip}
{if $title_prefix}
  {assign var="in_page_title" value=$title_prefix|cat:$category.TITLE}
{else}
  {assign var="in_page_title" value=$category.TITLE}
{/if}
{assign var="description" value=$category.DESCRIPTION}
{assign var="tdescription" value=$category.TDESCRIPTION}
{assign var="catcontent" value=$category.CATCONTENT}
{include file="header.tpl"}

{include file="top_bar.tpl"}

{* Calculate the number of categories per row *}


  {php}
  $this->assign('cats_per_col', ceil(count($this->get_template_vars('categs')) / CATS_PER_ROW));
  {/php}

{if $cats_per_col > 15}
  {php}
  $this->assign('cats_per_col', ceil(count($this->get_template_vars('categs')) / (CATS_PER_ROW + 1)));
  {/php}
{/if}

{* Show category search results *}
{if $search_category}
  {$search_category}
  <br />
{/if}


{if isset($have_search_results) and $have_search_results == 0}
  <div class="noResults">
  <p>{l}Sorry, no records found that match your keyword(s){/l}: "{$search|escape|wordwrap:200:"\n":true}"</p>
  <p><strong>{l}Suggestions{/l}:</strong></p>
  <p>
	 <ul>
		<li>{l}Make sure all words are spelled correctly{/l}.</li>
		<li>{l}Try different keywords{/l}.</li>
		<li>{l}Try more general keywords{/l}.</li>
	 </ul>
  </p>
  </div>
{/if}

{*no links in category*}
{if count($links) eq 0 and $category.ID gt 0 and empty($feat_links)} <div align="center"><br /><br /> {l} No Links In This Category {/l}<a href="{$smarty.const.DOC_ROOT}/submit.php?id={$category.ID}" class="linkMore">{l}Add A Link Today.</a>{/l}<br></div><br /><br /> {/if}
{*no articles in category*}
{if count($articles) eq 0 and $category.ID gt 0} <div align="center"><br /><br /><span style="color:#FCD59C;">{l} No Articles In This Category {/l}</span><a href="{$smarty.const.DOC_ROOT}/submit_article.php?id={$category.ID}" class="linkMore">{l}Add An Article Today.</a>{/l}</div> <br /><br /> {/if}


<div align="center" style="padding:2px">
{*gt 1 links in category*}
{if count($links) gt 0 and $category.ID gt 0 and empty($feat_links)} <a href="{$smarty.const.DOC_ROOT}/submit.php?id={$category.ID}" class="linkMore" style="margin:1px">{l}Add A Link Today.</a>{/l}{/if}
{*no articles in category*}
{if count($articles) gt 0 and $category.ID gt 0}<a href="{$smarty.const.DOC_ROOT}/submit_article.php?id={$category.ID}" class="linkMore" style="margin:1px">{l}Add An Article Today.</a>{/l}{/if}</div>

{* Categories *}
{if !empty($categs)}
  {if !empty($category.ID)}
  <h3>{l}Categories{/l}</h3>
  {/if}

  <table border="0" cellpadding="0" cellspacing="2">
  <tr>
  {foreach from=$categs item=cat name=categs}
  {if ($smarty.foreach.categs.iteration mod $cats_per_col eq 1 and $cats_per_col gt 1) or $smarty.foreach.categs.first}<td>{/if}
  <h2><a href="{$smarty.const.DOC_ROOT}/{$cat.CACHE_URL|escape}" title="{$cat.TITLE|escape}" class="catHomeMain">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="catHomeCount">({$cat.COUNT})</span>{/if}</h2>

  {* Display subcategories *}
  {if !empty($cat.SUBCATS)}
  <div class="catHomeSubcats">
	 {foreach from=$cat.SUBCATS item=scat name=scategs}
		<a href="{$smarty.const.DOC_ROOT}/{$scat.CACHE_URL|escape}" class="catHomeSub">
		{$scat.TITLE|escape}</a><br />{/foreach}
  </div>
  {/if}
  {if ($smarty.foreach.categs.iteration mod $cats_per_col eq 0 and $cats_per_col gt 1) or $smarty.foreach.categs.last}</td>{/if}
  {/foreach}
  </tr>
  </table>
{/if}

{if $smarty.const.FTR_ENABLE == 1 and !empty($feat_links)}
  <h3>{l}Featured Links{/l}</h3>
  {foreach from=$feat_links item=link name=links}
  <div class="featBox">
	  {include file="link.tpl" link=$link}
</div>
<br />
  {/foreach}
{/if}

{* Links heading and sorting*}
{if ($uid or $search or !empty($category.ID) or $list) and !empty($links)}
  <h3>{l}Links{/l} {if not $list}<span class="small" style="margin-left:260px;">{l}Sort by{/l}:
  {if $smarty.const.ENABLE_PAGERANK and $smarty.const.SHOW_PAGERANK}{if $sort eq 'P'}<span class="sort"> {l}PageRank{/l}</span>{else}<a href="?s=P{if not $smarty.const.ENABLE_REWRITE}&c={$category.ID}{/if}{if $search}&search={$search}{/if}{if $uid}&uid={$uid}{/if}{if !empty($p)}&p={$p}{/if}"> {l}PageRank{/l}</a>{/if} |{/if}
  {if $sort eq 'H'} <span class="sort">{l}Hits{/l}</span>{else} <a href="?s=H{if not $smarty.const.ENABLE_REWRITE}&c={$category.ID}{/if}{if $search}&search={$search}{/if}{if $uid}&uid={$uid}{/if}{if !empty($p)}&p={$p}{/if}">{l}Hits{/l}</a>{/if}
  {if $sort eq 'A'} | <span class="sort">{l}Alphabetical{/l}</span>{else} | <a href="?s=A{if not $smarty.const.ENABLE_REWRITE}&c={$category.ID}{/if}{if $search}&search={$search}{/if}{if $uid}&uid={$uid}{/if}{if !empty($p)}&p={$p}{/if}">{l}Alphabetical{/l}</a>{/if}
  </span>{/if}</h3>
  <div id="links">
  {foreach from=$links item=link name=links}
  {include file="link.tpl" link=$link}
  {/foreach}
  </div>
{/if}






{* Show article search results *}
{if $search_article}
  {$search_article}
{/if}
{* Articles heading *}
{if !empty($articles) and !$search}
  <h3>{l}Articles{/l}</h3>
  <div id="articles">
  <table>
  {foreach from=$articles item=article name=name}
	 {include file="articlelink.tpl" link=$article}
  {/foreach}
  </table>
  </div>
{/if}



{if !$uid & !$search & empty($category.ID) & !$list & $scriptname == "index"}
<h3>{l}Ostatnie artykuły{/l}</h3>
	{if !empty($articles)}
		{section name=i loop=$articles}
		<div {if $smarty.section.i.last}class="boxSponsoredLast"{else}class="boxSponsored"{/if}>
			<a class="boxSponsoredA" href="{$smarty.const.DOC_ROOT}/{if $smarty.const.ENABLE_REWRITE}articles/article-{$articles[i].ID}.html{else}article.php?id={$articles[i].ID}{/if}" title="{$articles[i].TITLE|escape|trim}">
				{$articles[i].TITLE|escape|trim}
			</a>
			<br/>
			{$articles[i].DESCRIPTION|escape|trim}
		</div>
		{/section}
	{else}
		{section name=i loop=$latest_art max=5}
		<div {if $smarty.section.i.last}class="boxSponsoredLast"{else}class="boxSponsored"{/if}>
			<a class="boxSponsoredA" href="{$smarty.const.DOC_ROOT}/{if $smarty.const.ENABLE_REWRITE}articles/article-{$latest_art[i].ID}.html{else}article.php?id={$latest_art[i].ID}{/if}" title="{$latest_art[i].TITLE|escape|trim}">
				{$latest_art[i].TITLE|escape|trim}
			</a>
			<br/>
			{$latest_art[i].DESCRIPTION|escape|trim}
		</div>
		{/section}
	{/if}

{/if}




{* Javascript for tracking link clicks *}
{if $StopLinkHits eq 0}
  <script type="text/javascript">
  /* <![CDATA[ */
  var root = '{$smarty.const.DOC_ROOT}';
  {literal}
  var a = document.getElementsByTagName("a");
  for(i = 0; i< a.length; i++)
	 if(a[i].id != '')
		a[i].onclick = count_link;
  function count_link() {
	 i = new Image();
	 i.src= root+'/cl.php?id='+this.id;
	 return true;
  }
  {/literal}
  /* ]]> */
  </script>


{/if}

{include file="footer.tpl"}
{/strip}

Już znalazłem rozwiązanie

{include file="reklamy.tpl"}

A w wolnej chwili forum-budowa.pl ew. praktycznie Uwaga awaria!

A to: portal branży budowlanej

Odnośnik do komentarza
Udostępnij na innych stronach

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę. Warunki użytkowania Polityka prywatności