baltazor-vova
Профессор
- Регистрация
 - 4 Авг 2009
 
- Сообщения
 - 107
 
- Реакции
 - 35
 
- Автор темы
 - #1
 
Благодаря разработкам в этому посту Для просмотра ссылки Войди или  Зарегистрируйся удалось реализовать накладку надписи на ваши картинки, так как в том посту зделали накладку надписи на картинку только для product_detailed и тока при ее увеличении здесь я детально опишу как зделать накладку надписи на все фото включая: (product_brief.tpl.html product_detailed.tpl.html и естественно на "новинки" "спецпредложения" )
1) распаковуем архив и бросаем в корень сайта
2) в файле архива image.php - меняем название своей надписи на фото которое будет у вас в дальнейшем...
3) открываем файл шаблона product_brief.tpl.html
ищем
	
	
	
		
заменяем
 
	
	
	
		
4) открываем файл шаблона product_detailed.tpl.html - здесь намного сложнее так как много кто использует "highslide, lightbox" для увелечения картинки в моем случаи стоит "highslide" вот код который нада записать в файл вашего шаблона
ищем
	
	
	
		
заменяем
	
	
	
		
ищем
	
	
	
		
заменяем
	
	
	
		
ищем
	
	
	
		
заменяем
	
	
	
		
5) ну а если у Вас стоит по стандарту увеличение фото без всяких "highslide, lightbox" в product_detailed тогда вот этот код
ищем
	
	
	
		
заменяем
	
	
	
		
1) Новинки 
Новинки могут быть у Вас отдельной страничкой или же идти в шаблоне home.tpl.html, index.tpl.html
собственно реализация ишем в файлах шаблона (home.tpl.html index.tpl.html или же отдельный файл шаблона для новинок)ищем для "Новинок" код:
	
	
	
		
заменяем:
	
	
	
		
2) Реализация на "Спецпредложения"
Открываем файл шаблона home.tmpl.html ищем код:
	
	
	
		
заменяем
	
	
	
		
Вот собственно и все, если понравилась моя идея не забываем сказать спасибо........

	
		
			
		
		
	
				
			1) распаковуем архив и бросаем в корень сайта
2) в файле архива image.php - меняем название своей надписи на фото которое будет у вас в дальнейшем...
3) открываем файл шаблона product_brief.tpl.html
ищем
		PHP:
	
	{if $product_info.thumbnail}
        <a class="olive" href="index.php?productID={$product_info.productID}">
            <img src="products_pictures/{$product_info.thumbnail}" 
                alt="{$product_info.name}" 
                border=0><br>
            {$smarty.const.MORE_INFO_ON_PRODUCT}
        </a><br><br>
    {else} 
        {if $product_info.picture}
            <a class="olive" href="index.php?productID={$product_info.productID}">
                <img src="products_pictures/{$product_info.picture}" 
                    alt="{$product_info.name}" 
                    border=0>
                {$smarty.const.MORE_INFO_ON_PRODUCT}
            </a><br><br>
        {/if}
    {/if}
	
		PHP:
	
	{if $product_info.thumbnail}
        <a class="olive" href="index.php?productID={$product_info.productID}">
            <img src="image.php?main=products_pictures/{$product_info.thumbnail}" 
                alt="{$product_info.name}" 
                border=0><br>
            {$smarty.const.MORE_INFO_ON_PRODUCT}
        </a><br><br>
    {else} 
        {if $product_info.picture}
            <a class="olive" href="index.php?productID={$product_info.productID}">
                <img src="image.php?main=products_pictures/{$product_info.picture}" 
                    alt="{$product_info.name}" 
                    border=0>
                {$smarty.const.MORE_INFO_ON_PRODUCT}
            </a><br><br>
        {/if}
    {/if}
	ищем
		PHP:
	
	{if $product_info.picture}
				{if $product_info.big_picture}
					{if !$printable_version}<a class="olive" href="/products_pictures/{$product_info.big_picture}" class="highslide" onclick="return hs.expand(this, {literal}{captionId: 'caption1'}{/literal})"><img id="thumb1" border="0" src="/products_pictures/{$product_info.picture}" alt="{$product_info.name}"></a>{/if}
						{if !$printable_version}<br>
	
		PHP:
	
	{if $product_info.picture}
				{if $product_info.big_picture}
					{if !$printable_version}<a class="olive" href="image.php?main=products_pictures/{$product_info.big_picture}" class="highslide" onclick="return hs.expand(this, {literal}{captionId: 'caption1'}{/literal})"><img id="thumb1" border="0" src="image.php?main=products_pictures/{$product_info.picture}" alt="{$product_info.name}"></a>{/if}
						{if !$printable_version}<br>
	
		PHP:
	
	<a class="olive" href="/products_pictures/{$product_info.big_picture}" onclick="return hs.expand(this, {literal}{thumbnailId: 'thumb1',captionId: 'caption1'}{/literal})" style="font-size: 90%;"><center>{$smarty.const.ENLARGE_PICTURE}</center></a> <a class='highslide-caption' id='caption1'><b>{$product_info.name}</b><br>{$smarty.const.CLOSE_WINDOW}</a>
	
		PHP:
	
	<a class="olive" href="image.php?main=products_pictures/{$product_info.big_picture}" onclick="return hs.expand(this, {literal}{thumbnailId: 'thumb1',captionId: 'caption1'}{/literal})" style="font-size: 90%;"><center>{$smarty.const.ENLARGE_PICTURE}</center></a> <a class='highslide-caption' id='caption1'><b>{$product_info.name}</b><br>{$smarty.const.CLOSE_WINDOW}</a>
	
		PHP:
	
	</td></tr></table>
					{/if}
				{else}
					<img src="/products_pictures/{$product_info.picture}" border=0 alt="{$product_info.name|escape:'html'}">
				{/if}
			{else}
				{if $product_info.thumbnail}
					{if $product_info.big_picture}
						{if !$printable_version}<a href="/products_pictures/{$product_info.big_picture}" class="highslide" onclick="return hs.expand(this, {literal}{captionId: 'caption1'}{/literal})"><img id="thumb1" border="0" src="/products_pictures/{$product_info.thumbnail}" alt="{$product_info.name}" class="spacel"></a><br>
							{/if}
						<img border=0 src="/products_pictures/{$product_info.thumbnail}" alt="{$product_info.name}"></a>
							{if !$printable_version}<br>
							<table class="voting"><tr><td><img src="images/enlarge.gif"></td><td>
							<a class="olive" href="/products_pictures/{$product_info.big_picture}" onclick="return hs.expand(this, {literal}{thumbnailId: 'thumb1',captionId: 'caption1'}{/literal})" style="font-size: 90%;"><center>{$smarty.const.ENLARGE_PICTURE}</center></a> <a class='highslide-caption' id='caption1'><b>{$product_info.name}</b><br>{$smarty.const.CLOSE_WINDOW}</a>
						</td></tr></table>
						{/if}
					{else}
  						<img border=0 src="/products_pictures/{$product_info.thumbnail}" alt="{$product_info.name}">
					{/if}
				{/if}
			{/if}
	
		PHP:
	
	</td></tr></table>
					{/if}
				{else}
					<img src="image.php?main=products_pictures/{$product_info.picture}" border=0 alt="{$product_info.name|escape:'html'}">
				{/if}
			{else}
				{if $product_info.thumbnail}
					{if $product_info.big_picture}
						{if !$printable_version}<a href="image.php?main=products_pictures/{$product_info.big_picture}" class="highslide" onclick="return hs.expand(this, {literal}{captionId: 'caption1'}{/literal})"><img id="thumb1" border="0" src="image.php?main=products_pictures/{$product_info.thumbnail}" alt="{$product_info.name}" class="spacel"></a><br>
							{/if}
						<img border=0 src="image.php?main=products_pictures/{$product_info.thumbnail}" alt="{$product_info.name}"></a>
							{if !$printable_version}<br>
							<table class="voting"><tr><td><img src="images/enlarge.gif"></td><td>
							<a class="olive" href="image.php?main=products_pictures/{$product_info.big_picture}" onclick="return hs.expand(this, {literal}{thumbnailId: 'thumb1',captionId: 'caption1'}{/literal})" style="font-size: 90%;"><center>{$smarty.const.ENLARGE_PICTURE}</center></a> <a class='highslide-caption' id='caption1'><b>{$product_info.name}</b><br>{$smarty.const.CLOSE_WINDOW}</a>
						</td></tr></table>
						{/if}
					{else}
  						<img border=0 src="image.php?main=products_pictures/{$product_info.thumbnail}" alt="{$product_info.name}">
					{/if}
				{/if}
			{/if}
	ищем
		PHP:
	
	{* product detailed information view *}
{if $product_info ne NULL}
<table width=95% border=0 cellspacing=1 cellpadding=2 class="voting">
	<tr>
		<td width=1% align=center valign=top border=0>
{if $product_info.picture}
				{if $product_info.big_picture}
					{if !$printable_version}<a href="javascript:open_window('products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{/if}<img border=0 src="products_pictures/{$product_info.picture}" alt="{$product_info.name}"></a>
						{if !$printable_version}<br>
						<table class="voting"><tr><td><img src="images/enlarge.gif"></td><td>
							<a class="olive" href="javascript:open_window('products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{$smarty.const.ENLARGE_PICTURE}</a>
						</td></tr></table>
					{/if}
				{else}
					<img src="products_pictures/{$product_info.picture}" border=0 alt="{$product_info.name}">
				{/if}
			{else}
				{if $product_info.thumbnail}
					{if $product_info.big_picture}
						{if !$printable_version}<a href="javascript:open_window('products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{/if}<img border=0 src="products_pictures/{$product_info.thumbnail}" alt="{$product_info.name}"></a>{if !$printable_version}<br>
							<table class="voting"><tr><td><img src="images/enlarge.gif"></td><td>
							<a class="olive" href="javascript:open_window('products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{$smarty.const.ENLARGE_PICTURE}</a>
						</td></tr></table>
						{/if}
					{else}
  						<img border=0 src="products_pictures/{$product_info.thumbnail}" alt="{$product_info.name}">
					{/if}
				{/if}
			{/if}
	
		PHP:
	
	{* product detailed information view *}
{if $product_info ne NULL}
<table width=95% border=0 cellspacing=1 cellpadding=2 class="voting">
	<tr>
		<td width=1% align=center valign=top border=0>
{if $product_info.picture}
				{if $product_info.big_picture}
					{if !$printable_version}<a href="javascript:open_window('image.php?main=products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{/if}<img border=0 src="image.php?main=products_pictures/{$product_info.picture}" alt="{$product_info.name}"></a>
						{if !$printable_version}<br>
						<table class="voting"><tr><td><img src="images/enlarge.gif"></td><td>
							<a class="olive" href="javascript:open_window('image.php?main=products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{$smarty.const.ENLARGE_PICTURE}</a>
						</td></tr></table>
					{/if}
				{else}
					<img src="image.php?main=products_pictures/{$product_info.picture}" border=0 alt="{$product_info.name}">
				{/if}
			{else}
				{if $product_info.thumbnail}
					{if $product_info.big_picture}
						{if !$printable_version}<a href="javascript:open_window('image.php?main=products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{/if}<img border=0 src="image.php?main=products_pictures/{$product_info.thumbnail}" alt="{$product_info.name}"></a>{if !$printable_version}<br>
							<table class="voting"><tr><td><img src="images/enlarge.gif"></td><td>
							<a class="olive" href="javascript:open_window('image.php?main=products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{$smarty.const.ENLARGE_PICTURE}</a>
						</td></tr></table>
						{/if}
					{else}
  						<img border=0 src="image.php?main=products_pictures/{$product_info.thumbnail}" alt="{$product_info.name}">
					{/if}
				{/if}
			{/if}
	Новинки могут быть у Вас отдельной страничкой или же идти в шаблоне home.tpl.html, index.tpl.html
собственно реализация ишем в файлах шаблона (home.tpl.html index.tpl.html или же отдельный файл шаблона для новинок)ищем для "Новинок" код:
		PHP:
	
	<a href="index.php?productID={$new_product[i][2]}" target="_blank"><img border="0" width="150" src="/products_pictures/{$new_product[i][0]}" border=0></a>
	
		PHP:
	
	<a href="index.php?productID={$new_product[i][2]}" target="_blank"><img border="0" width="150" src="image.php?main=products_pictures/{$new_product[i][0]}" border=0></a>
	Открываем файл шаблона home.tmpl.html ищем код:
		PHP:
	
	{* now show special offers *}
<p>
<center>
<table border=0 width="464" cellspacing=1 cellpadding=5>
{section name=i loop=$special_offers} {if $smarty.section.i.index is div by 2}<tr>{/if}
<td valign=top>
 <table border=0 width=100% bgcolor=#{$smarty.const.CONF_MIDDLE_COLOR} cellpadding=0 cellspacing=1>
 <tr><td>
  <div align="left">
  <table border=0 bgcolor=white width=100%>
   <tr>
   <td colspan=2><a href="index.php?productID={$special_offers[i][0]}"><img src="products_pictures/{$special_offers[i][2]}" border=0></a></td>
   </tr>
   <tr>
   <td align=center class="product"><a href="index.php?productID={$special_offers[i][0]}">
	{$special_offers[i][1]}</a></td>
   </tr>
   <tr>
   <td align=center class="product_price"><b>{$special_offers[i][3]}</b></td>
   </tr>
  </table>
 	</div>
 </td></tr>
 </table>
</td>
{if ($smarty.section.i.index+1) is div by 3}</tr>{/if}
{/section}
	
		PHP:
	
	{* now show special offers *}
<p>
<center>
<table border=0 width="464" cellspacing=1 cellpadding=5>
{section name=i loop=$special_offers} {if $smarty.section.i.index is div by 2}<tr>{/if}
<td valign=top>
 <table border=0 width=100% bgcolor=#{$smarty.const.CONF_MIDDLE_COLOR} cellpadding=0 cellspacing=1>
 <tr><td>
  <div align="left">
  <table border=0 bgcolor=white width=100%>
   <tr>
   <td colspan=2><a href="index.php?productID={$special_offers[i][0]}"><img src="image.php?main=products_pictures/{$special_offers[i][2]}" border=0></a></td>
   </tr>
   <tr>
   <td align=center class="product"><a href="index.php?productID={$special_offers[i][0]}">
	{$special_offers[i][1]}</a></td>
   </tr>
   <tr>
   <td align=center class="product_price"><b>{$special_offers[i][3]}</b></td>
   </tr>
  </table>
 	</div>
 </td></tr>
 </table>
</td>
{if ($smarty.section.i.index+1) is div by 3}</tr>{/if}
{/section}
	

				
nezn: