This is a discussion on Images in Viewlisting not showing within the v3.1 Questions & Support forums, part of the v3.1 Legacy Help & Support category; I have just updated one of my test sites, GoBuyItSydney to version 3.1 from 3.015 and images aren't showing in ...
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
I have just updated one of my test sites, GoBuyItSydney to version 3.1 from 3.015 and images aren't showing in the viewlisting. It just displays the No Photo image, even though the Ad has images associated with it. The search and category list show images fine so they are making the database calls correctly - but it just won't display any images under viewlisting.
I also had an error when updating - jpg attached. |
|
#2
|
|||
|
|||
|
I got the exact same error when I updated, I ran the install again though and it never appeared, it said it had updated correctly. So far I haven't noticed any problems with my site. Perhaps it is due to the changes the update makes to the database?
|
|
#3
|
||||
|
||||
|
Sorted it out - my viewlistings are showing images now - the new files are somewhat different than what I'd gotten used to with the older ones.
|
|
#4
|
||||
|
||||
|
Even though that sql error displays it will not harm anything. It was a small query to change the fields of the membership table for those who where already running the beta release.
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter |
|
#5
|
||||
|
||||
|
I did the same as Martini55 and ran the install again and went through with no errors.
I got my image displaying now on the viewlisting page, but when it comes to an Ad with no images, it doesn't display the No Photo image - just doesn't display anything. I put the following code into my Viewlisting.tpl.php file to display the photos the way I want but it doesn't seem to be recognising the Else statement to display the nophoto image {if $viewphotos=="Y"} {if $data<>""} <table align="right" width="320" border="0" cellspacing="0" cellpadding="5"> <tr> <td width="100%"> <br> {if $data} {section name=image loop=$data max=1} <p align="center"><img src="photos/{$data[image].image}" alt="" name="placeholder" align="center" class="imageborder" id="placeholder" border="0" /></p> <p align="center" id="desc">{$data[image].title}</p> {/section}</td> </tr> <tr> <th colspan="1" align="center"><strong>{$smarty.const.LANG_CLICK_H ERE}</strong></th> </tr> <tr> <td> <DIV STYLE="height:185px; width:300px;overflow:auto"> <div align="center"> {foreach from=$data item="entry"}<a onclick="return showPic(this)" href="photos/{$entry.image}" title="{$entry.title}"><img src="thumbs/small_{$entry.image}" hspace="3" vspace="3" border="1" class="imageborder" /></a> {/foreach} </div> {else} <img src="images/nophotolarge.jpg" width="250" hspace="3" vspace="3" border="1" /> </div> anyone got any ideas ???? the example can be see HERE
|
|
#6
|
||||
|
||||
|
I think has to do with your if statements but I can't pinpoint it from that code. Can you post your whole viewlistings template file and wrap [ html ] [ /html ] tags around it?
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter |
|
#7
|
||||
|
||||
|
HTML Code:
{* $Id: viewlisting.tpl.php,v 1.3 2006/04/19 17:48:46 Eric Exp $ *}
<script type="text/javascript" language="javascript">
{literal}
function showPic (whichpic) {
if (document.getElementById) {
document.getElementById('placeholder').src = whichpic.href;
if (whichpic.title) {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
} else {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
}
return false;
} else {
return true;
}
}
{/literal}
</script>
{* Display the breadcrumb *}
<p class="breadcrumb">
{if $friendly}
<a href="category/" class="breadcrumb">{$smarty.const.LANG_BROWSE_CATEGORIES}</a>
{else}
<a href="category.php" class="breadcrumb">{$smarty.const.LANG_BROWSE_CATEGORIES}</a>
{/if}
{foreach from=$breadcrumb item="entry"}
{$smarty.const.LANG_CAT_SEPERATOR} {$entry}
{/foreach}
</p>
{* Are you an administrator? *}
{if $smarty.session.userlevel==1}
{include file="viewlisting/listingadminlinks.tpl.php"}
{/if}
{* Now show the main table *}
<table class="tableborder">
<tr>
<th colspan="2"><strong>{$listingtitle}</strong></th>
</tr>
<tr>
<td valign="top" class="pformleft">
<table width="80%" border="0" cellpadding="0" cellspacing="3" class="norm">
{if $viewseller=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_SELLER}:</strong></td>
<td><a href="viewmember.php?member={$ownerid}">{$ownername}</a></td>
<td><br><br></td>
</tr>
{/if}
{if $viewaddress=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_ADDRESS}:</strong></td>
<td>{$owneraddress}</td>
</tr>
{/if}
{if $viewstate=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_STATE}:</strong></td>
<td>{$ownerstate}</td>
</tr>
{/if}
{if $viewphone=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_PHONE}:</strong></td>
<td>{$ownerphone}</td>
</tr>
{/if}
{if $viewprice=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_PRICE}:</strong></td>
<td>{$listingprice}</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>{$listingexpiration|date_format:$dateformat}</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>{$listingviews}</td>
</tr>
{/if}
{* Extra Fields *}
{foreach from=$extra item=extras}
<tr>
<td><strong>{$extras.title}:</strong></td>
<td>
{if isset($extras.value)}
{foreach key=key item=item from=$extras.value}
{$item}<br />
{/foreach}
{/if}
</td>
</tr>
{/foreach}
{* End Extra Fields *}
{if $shortdescription<>""}
<tr>
<td colspan="2"><strong>{$smarty.const.LANG_SHORT_DESCRIPTION}: </strong><br />{$shortdescription}</td>
</tr>
{/if}
{if $description<>""}
<tr>
<br><br>
<tr>
<td colspan="3"><hr noshade /></td>
</tr>
</tr>
<tr>
<td colspan="2"><strong>{$smarty.const.LANG_DESCRIPTION}: </strong><br />{$description}</td>
</tr>
<tr>
<td colspan="3"><hr noshade /></td>
</tr>
{/if}
</table>
<br>
</td>
<td valign="top" class="pformright">
{* This the image display portion *}
{if $viewphotos=="Y"}
{if $data<>""}
<table align="right" width="320" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="100%">
<br>
{if $data}
{section name=image loop=$data max=1}
<p align="center"><img src="photos/{$data[image].image}" alt="" name="placeholder" align="center" class="imageborder" id="placeholder" border="0" /></p>
<p align="center" id="desc">{$data[image].title}</p>
{/section}</td>
</tr>
<tr>
<th colspan="1" align="center"><strong>{$smarty.const.LANG_CLICK_HERE}</strong></th>
</tr>
<tr>
<td>
<DIV STYLE="height:185px; width:300px;overflow:auto">
<div align="center">
{foreach from=$data item="entry"}<a onclick="return showPic(this)" href="photos/{$entry.image}" title="{$entry.title}"><img src="thumbs/small_{$entry.image}" hspace="3" vspace="3" border="1" class="imageborder" /></a>
{/foreach}
</div>
{else}
<img src="images/nophotolarge.jpg" width="250" hspace="3" vspace="3" border="1" />
</div>
{/if} </td>
</tr>
</table>
{/if}
{/if}
{* This ends the image display portion *}
<p> </p>
</td>
</tr>
<tr>
<td colspan="2"><img src="images/clearpixel.gif" width="100" height="1"></td>
</tr>
<tr>
<td colspan="2">{include file=viewlisting/listingextras.tpl.php}</td>
</tr>
</table>
<p> </p>
{if $allowcontact=="Y" && $display=="Y"}
{include file=contact/contactowner.tpl.php}
{/if}
|
|
#8
|
||||
|
||||
|
Anyone ......
|
|
#9
|
||||
|
||||
|
I believe I see the error. Can you try this code for the template file?
Please make a backup of your original. ![]() HTML Code:
{* $Id: viewlisting.tpl.php,v 1.3 2006/04/19 17:48:46 Eric Exp $ *}
<script type="text/javascript" language="javascript">
{literal}
function showPic (whichpic) {
if (document.getElementById) {
document.getElementById('placeholder').src = whichpic.href;
if (whichpic.title) {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
} else {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
}
return false;
} else {
return true;
}
}
{/literal}
</script>
{* Display the breadcrumb *}
<p class="breadcrumb">
{if $friendly}
<a href="category/" class="breadcrumb">{$smarty.const.LANG_BROWSE_CATEGORIES}</a>
{else}
<a href="category.php" class="breadcrumb">{$smarty.const.LANG_BROWSE_CATEGORIES}</a>
{/if}
{foreach from=$breadcrumb item="entry"}
{$smarty.const.LANG_CAT_SEPERATOR} {$entry}
{/foreach}
</p>
{* Are you an administrator? *}
{if $smarty.session.userlevel==1}
{include file="viewlisting/listingadminlinks.tpl.php"}
{/if}
{* Now show the main table *}
<table class="tableborder">
<tr>
<th colspan="2"><strong>{$listingtitle}</strong></th>
</tr>
<tr>
<td valign="top" class="pformleft">
<table width="80%" border="0" cellpadding="0" cellspacing="3" class="norm">
{if $viewseller=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_SELLER}:</strong></td>
<td><a href="viewmember.php?member={$ownerid}">{$ownername}</a></td>
<td><br><br></td>
</tr>
{/if}
{if $viewaddress=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_ADDRESS}:</strong></td>
<td>{$owneraddress}</td>
</tr>
{/if}
{if $viewstate=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_STATE}:</strong></td>
<td>{$ownerstate}</td>
</tr>
{/if}
{if $viewphone=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_PHONE}:</strong></td>
<td>{$ownerphone}</td>
</tr>
{/if}
{if $viewprice=="Y"}
<tr>
<td><strong>{$smarty.const.LANG_PRICE}:</strong></td>
<td>{$listingprice}</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>{$listingexpiration|date_format:$dateformat}</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>{$listingviews}</td>
</tr>
{/if}
{* Extra Fields *}
{foreach from=$extra item=extras}
<tr>
<td><strong>{$extras.title}:</strong></td>
<td>
{if isset($extras.value)}
{foreach key=key item=item from=$extras.value}
{$item}<br />
{/foreach}
{/if}
</td>
</tr>
{/foreach}
{* End Extra Fields *}
{if $shortdescription<>""}
<tr>
<td colspan="2"><strong>{$smarty.const.LANG_SHORT_DESCRIPTION}: </strong><br />{$shortdescription}</td>
</tr>
{/if}
{if $description<>""}
<tr>
<br><br>
<tr>
<td colspan="3"><hr noshade /></td>
</tr>
</tr>
<tr>
<td colspan="2"><strong>{$smarty.const.LANG_DESCRIPTION}: </strong><br />{$description}</td>
</tr>
<tr>
<td colspan="3"><hr noshade /></td>
</tr>
{/if}
</table>
<br>
</td>
<td valign="top" class="pformright">
{* This the image display portion *}
{if $viewphotos=="Y"}
{if $data<>""}
<table align="right" width="320" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="100%">
<br>
{section name=image loop=$data max=1}
<p align="center"><img src="photos/{$data[image].image}" alt="" name="placeholder" align="center" class="imageborder" id="placeholder" border="0" /></p>
<p align="center" id="desc">{$data[image].title}</p>
{/section}</td>
</tr>
<tr>
<th colspan="1" align="center"><strong>{$smarty.const.LANG_CLICK_HERE}</strong></th>
</tr>
<tr>
<td>
<DIV STYLE="height:185px; width:300px;overflow:auto">
<div align="center">
{foreach from=$data item="entry"}<a onclick="return showPic(this)" href="photos/{$entry.image}" title="{$entry.title}"><img src="thumbs/small_{$entry.image}" hspace="3" vspace="3" border="1" class="imageborder" /></a>
{/foreach}
</div>
</div>
</td>
</tr>
</table>
{else}
<table align="right" width="320" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="100%">
<DIV STYLE="height:185px; width:300px;overflow:auto">
<div align="center">
<img src="images/nophotolarge.jpg" width="250" hspace="3" vspace="3" border="1" />
</div>
</div>
</td></tr></table>
{/if}
{/if}
{* This ends the image display portion *}
<p> </p>
</td>
</tr>
<tr>
<td colspan="2"><img src="images/clearpixel.gif" width="100" height="1"></td>
</tr>
<tr>
<td colspan="2">{include file=viewlisting/listingextras.tpl.php}</td>
</tr>
</table>
<p> </p>
{if $allowcontact=="Y" && $display=="Y"}
{include file=contact/contactowner.tpl.php}
{/if}
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter |
|
#10
|
||||
|
||||
|
Worked a treat. Now on to more testing leading up to a go live.
once again thanks - I'll go through myself and try and work out what the problem was - it's all a learning process.
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ads showing as 'Not Completed' | Bucketman | v3.0 Questions & Support | 36 | 05-15-2007 07:17 AM |
| Strange Issue Cycling Through Images | bgordon | v3.1 Questions & Support | 2 | 09-15-2006 09:58 AM |
| Help with my thumbs images not showing | garysmith | v3.0 Questions & Support | 5 | 05-14-2006 02:09 PM |
| "Featured Ad" choice not showing... | garysmith | v3.1 Questions & Support | 2 | 05-10-2006 08:28 AM |
| Featured images | quickbiz | v3.0 Questions & Support | 2 | 04-10-2006 10:22 AM |