68 Classifieds Forums

Images in Viewlisting not showing

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 ...


Go Back   68 Classifieds Forums > v3.1 Legacy Help & Support > v3.1 Questions & Support

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 05-02-2006, 06:58 AM
Bucketman's Avatar
Member
 
Join Date: Mar 2006
Location: Brisbane, Australia
Posts: 91
Rep Power: 13
Bucketman is on a distinguished road
Default Images in Viewlisting not showing

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.

Attached Images
File Type: jpg installerror.jpg (56.8 KB, 10 views)
__________________
Regards,

Ashley McKinnon
Site Administrator

GoBuyItBrisbane
Reply With Quote
  #2  
Old 05-02-2006, 07:42 AM
Member
 
Join Date: Apr 2006
Posts: 80
Rep Power: 13
martini55 is on a distinguished road
Default

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?
Reply With Quote
  #3  
Old 05-02-2006, 11:11 AM
Bucketman's Avatar
Member
 
Join Date: Mar 2006
Location: Brisbane, Australia
Posts: 91
Rep Power: 13
Bucketman is on a distinguished road
Default Don't worry

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.

__________________
Regards,

Ashley McKinnon
Site Administrator

GoBuyItBrisbane
Reply With Quote
  #4  
Old 05-02-2006, 11:47 AM
Eric Barnes's Avatar
68 Classifieds Staff
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,305
Rep Power: 99
Eric Barnes is a jewel in the rough
Default

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
Reply With Quote
  #5  
Old 05-02-2006, 12:01 PM
Bucketman's Avatar
Member
 
Join Date: Mar 2006
Location: Brisbane, Australia
Posts: 91
Rep Power: 13
Bucketman is on a distinguished road
Default Thanks for that

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

__________________
Regards,

Ashley McKinnon
Site Administrator

GoBuyItBrisbane
Reply With Quote
  #6  
Old 05-02-2006, 12:14 PM
Eric Barnes's Avatar
68 Classifieds Staff
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,305
Rep Power: 99
Eric Barnes is a jewel in the rough
Default

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
Reply With Quote
  #7  
Old 05-02-2006, 06:17 PM
Bucketman's Avatar
Member
 
Join Date: Mar 2006
Location: Brisbane, Australia
Posts: 91
Rep Power: 13
Bucketman is on a distinguished road
Default Here it is

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>&nbsp;</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>&nbsp;</p>
{if $allowcontact=="Y" && $display=="Y"}
{include file=contact/contactowner.tpl.php}
{/if}
__________________
Regards,

Ashley McKinnon
Site Administrator

GoBuyItBrisbane
Reply With Quote
  #8  
Old 05-05-2006, 06:16 AM
Bucketman's Avatar
Member
 
Join Date: Mar 2006
Location: Brisbane, Australia
Posts: 91
Rep Power: 13
Bucketman is on a distinguished road
Default Any ideas ??????

Anyone ......
__________________
Regards,

Ashley McKinnon
Site Administrator

GoBuyItBrisbane
Reply With Quote
  #9  
Old 05-05-2006, 11:06 AM
Eric Barnes's Avatar
68 Classifieds Staff
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,305
Rep Power: 99
Eric Barnes is a jewel in the rough
Default

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>&nbsp;</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>&nbsp;</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
Reply With Quote
  #10  
Old 05-05-2006, 11:46 AM
Bucketman's Avatar
Member
 
Join Date: Mar 2006
Location: Brisbane, Australia
Posts: 91
Rep Power: 13
Bucketman is on a distinguished road
Default Thank you thank you thank you

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.

__________________
Regards,

Ashley McKinnon
Site Administrator

GoBuyItBrisbane
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT -4. The time now is 02:44 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22