02-24-2009, 12:50 PM
|
#13
|
|
Member
Join Date: Jun 2008
Location: TURKEY
Posts: 48
Rep Power: 5
|
Quote:
Originally Posted by bowers01
Hi,
Here is the code that makes the nice gallery, if someone could help me put it into the popup that would be great. Credit goes to newcastledirectory.
Code:
{if $preview!="Y"}
{* Display the breadcrumb *}
{include file="categories/breadcrumb.tpl"}
{* Are you an administrator? *}
{if $smarty.session.userlevel==1}
{include file="viewlisting/listingadminlinks.tpl"}
{/if}
{/if}
{* Now show the main table *}
<table class="tableborder">
<tr>
<th colspan="2"><strong>{$title}</strong></th>
</tr>
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="3" class="norm">
{if $viewseller=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_SELLER}:</strong></td>
<td>
{if $preview!="Y"}
<a href="viewmember.php?member={$owner}">{$username}</a>
{else}
{$username}
{/if}
</td>
</tr>
{/if}
{* This the image display portion *}
<script type="text/javascript" language="javascript">
{literal}
function showPic (whichpic) {
if (document.getElementById) {
document.getElementById('placeholder').src = whichpic.href;
return false;
} else {
return true;
}
}
{/literal}
</script>
{if $viewphotos=="Y"}
{if $data<>""}
<table width="450" height="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="400" height="350" align="center">
{section name=image loop=$data max=1}
<table border="1" align="center" cellpadding="5" cellspacing="0" bordercolor="#FFFBE7" bgcolor="#333333" style="border-collapse: collapse">
<tr>
<td>
<p align="center">
<img id="placeholder" src="photos/{$data[image].image}" alt="" class="imageborder" style="border-left:2px solid #999999; border-right:2px solid #999999; border-top:2px solid #999999; border-bottom:2px solid #999999; " width="450" />{/section}</p> </td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" height="60" align="center">
<table border="0" cellpadding="10" cellspacing="0" bgcolor="#E3E4E6">
<tr>
<td height="10">
{foreach from=$data item="entry"}
<a onClick="return showPic(this)" href="photos/{$entry.image}">
<img src="thumbs/small_{$entry.image}" hspace="0" vspace="0" border="0" class="imageborder" width="60" height="45" alt="" align="center" style="border: 2px solid #666666; "/></a>
{/foreach} </td>
</tr>
</table>
</div></td>
</tr>
</table>
{/if}
{/if}
{* This ends the image display portion *}
{if $viewaddress=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_ADDRESS}:</strong></td>
<td>{$address}</td>
</tr>
{/if}
{if $viewcity=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_CITY}:</strong></td>
<td>{$city}</td>
</tr>
{/if}
{if $viewstate=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_STATE}:</strong></td>
<td>{$state}</td>
</tr>
{/if}
{if $viewcountry=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_COUNTRY}:</strong></td>
<td>{$country}</td>
</tr>
{/if}
{if $viewphone=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_PHONE}:</strong></td>
<td>{$phone}</td>
</tr>
{/if}
{if $viewprice=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_PRICE}:</strong></td>
<td>{$price|format_money}</td>
</tr>
{/if}
{if $viewdate=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_DATE_ADDED}:</strong></td>
<td>{$dateadded|date_format:$dateformat}</td>
</tr>
{/if}
{if $viewexpiration=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_EXPIRATION}:</strong></td>
<td>{$expirationdays} Day(s)</td>
</tr>
{/if}
{if $url<>""}
<tr>
<td><strong>{$smarty.const.LANG_EXT_URL}:</strong></td>
<td>{$url|linkurl:30}</td>
</tr>
{/if}
{if $viewhits=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_VIEWS}:</strong></td>
<td>{$hitcount}</td>
</tr>
{/if}
{* Extra Fields *}
{foreach from=$extrafields item=extras}
<tr>
<td><strong>{$extras.title}:</strong></td>
<td>
{if isset($extras.value)}
{foreach key=key item=item from=$extras.value}
{$item}<br />
{foreachelse}
{$extras.value}
{/foreach}
{/if}
</td>
</tr>
{/foreach}
{* End Extra Fields *}
{if $description<>""}
<tr>
<td colspan="2"><strong>{$smarty.const.LANG_DESCRIPTIO N}: </strong><br />{$description|nl2br}</td>
</tr>
{/if}
</table>
<br />
</td>
<td valign="top"> {if $viewphotos=="Y" && $data <> ''}
{foreach from=$data item=image}
<p><a href="#" onMouseOver="window.status='View Large Image';return true" onMouseOut="window.status='';return true" onClick="window.open('{$smarty.const.URL}/viewimage.php?photo={$image.id}&width={$image. width}&height={$image.height}','_popup','width ={$image.width},height={$image.height},directories =no,location=no,menubar=no,scrollbars=yes,status=n o,toolbar=no,resizable=no,left=0,top=0,screenx=50, screeny=50');return false"> <img src="thumbs/small_{$image.image}" hspace="5" vspace="5" class="image" border="0" alt="{$image.title}" /></a><br />{$image.title}</p>
{foreachelse}
<img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/nophoto.gif" width="100" hspace="5" vspace="5" border="1" />
{/foreach}
{else}
<img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/nophoto.gif" width="100" hspace="5" vspace="5" border="1" />
{/if}
<p> </p>
</td>
</tr>
</table>
{if $preview!="Y"}
{include file=viewlisting/listingextras.tpl}
{/if}
<p> </p>
{if $pmon=="Y" && $smarty.session.uid > 0}
{elseif $allowcontact=="Y" && $display=="Y"}
{include file=contact/contactowner.tpl}
{/if}
|
I use this type of showlisting.php but when there is no image added , there was not any nophoto.jpg.
I want to show big nophoto images or I want to add adsense codes instead of ads photo when there is no added images
thank you for reading
__________________
� 2007 68 Classifieds - A division of 68 Designs, LLC - v4.0.3 Developer 
Another 68C site ; ikinci el kamyonlar
|
|
|