Google maps

9 posts by 3 authors in: Forums > CMS Builder
Last Post: November 30, 2009   (RSS)

Code in my listing detail.php:

<a href="http://maps.google.com/maps?q=<?php echo urlencode($listings['address']) ?>,<?php echo urlencode($listings['city']) ?>,<?php echo urlencode($listings['state']) ?>" target="_blank">Click Here to view map of area</a>


Error I recieve:

[/#cc0000][url "http://maps.google.com/maps?q=Notice:+Undefined+variable:+listings+record+in+D:%5CHosting%5C5228253%5Chtml%5Clistingdetail.php+on+line+104,Notice:+Undefined+variable:+listingsrecord+in+D:%5CHosting%5C5228253%5Chtml%5Clistingdetail.php+on+line+104,Notice:+Undefined+variable:+listingsrecord+in+D:%5CHosting%5C5228253%5Chtml%5Clistingdetail.php+on+line+104&ie=UTF8&hl=en&oi=localspell&ct=clnk&cd=1"]Notice: Undefined variable: listings record in D:\Hosting\5228253\html\listingdetail.php on line 104,Notice: Undefined variable: listingsrecord in D:\Hosting\5228253\html\listingdetail.php on line 104,Notice: Undefined variable: listingsrecord in D:\Hosting\5228253\html\listingdetail.php on line 104[/#0000cc][/url]

When I do a search the addres, city and state show up fine in the lisiting.php and listingsdetail.php.

Re: [k4tlove] Google maps

By Luke - November 26, 2009

Hi k4tlove ,

It's a little hard to tell what's causing the problem without looking at the source code.

Would it be possible for you to post the full source code of your listingsdetail.php page?

Cheers,
Luke
Luke Holzken
Product Development

Re: [Luke] Google maps

By k4tlove - November 26, 2009 - edited: November 26, 2009



I removed the following line and Google maps works, but when I search for the properties I always get the same location.

'where' => whereRecordNumberInUrl(1),


So I put the above code back in and now both Google Maps and the search for properties works. Not sure how I made that happen.

Thanks,

Re: [k4tlove] Google maps

By Chris - November 27, 2009

Hi k4tlove,

on my check boxes it shows "0" instead of "NO" and "1" instead of "Yes".


If you're using CMS Builder version 1.34 or later, you can use the ':text' psuedo-field to display Yes/No instead of 1/0. For example:

<?php echo $listingsRecord['fireplace:text'] ?>

If you're using an older version and can't upgrade, please let me know and I'll find you another solution.

I want my image thumbnails to show up in 2 rows horizontal with the larger image above the thumnails.


I'm not sure I fully understand what you're trying to accomplish. What is the larger image?
All the best,
Chris

Gallery

I fixed the check box issue by doing the following:

<?php echo $listingsRecord['garage'] ? "Yes" : "No"; ?>

Concerning the images(gallery), they all appear in a verticle column which makes the page very long and when you click on the image it opens up in another window.

I would like the images to appear as on this webpage: http://www.resiwealth.com/ (click on buying, then NSW, then one of the properties and you will see the large image above the thumbnails. When you mouseover the image it shows that image in the large window. Not sure if this is a 3rd party viewer or ?

Re: [k4tlove] Gallery

By Chris - November 30, 2009

Hi k4tlove,

To get your images to display in a 2-column list with captions, you can use a table and add some PHP code to start a new table row after every second image. For example:

<table>
<tr>
<?php foreach ($listingsRecord['uploads'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<?php $maxCols=2; if (@++$count % $maxCols == 0): ?>
</tr><tr>
<?php endif ?>
<td>
<a href="<?php echo $upload['urlPath'] ?>">
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" border="1" alt="Photo" />
</a><br/>
<?php echo $upload['info1'] ?>
</td>
<?php endif ?>
<?php endforeach ?>
</tr>
</table>


The gallery on the website you directed me to uses [url http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm]Image Thumbnail Viewer II[/url].

I hope this helps. Please let me know if you have any questions.
All the best,
Chris

Re: [chris] Gallery

[cool] That worked great. Now if I have 2 columns how would I get the larger image to open on the same page in a frame next to the 2 columns as oppose to it opening in a new window. Right now when you click on the thumbnail to view it larger it opens in a new window. I would like it to open on the same page in a frame next to the thumbnails and when you mouse over the thumbnail that picture appears in the frame.

Re: [k4tlove] Gallery

By Chris - November 30, 2009

Hi k4tlove,

You'd need to do something like that with Javascript, for example, with the Image Thumbnail Viewer II script. Unfortunately we don't provide support for Javascript, however, we do offer this through our consulting service. If you are interested, please visit [url interactivetools.com/consulting]our consulting page[/url].
All the best,
Chris