Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

GoogleMapAPI 2.4 released
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7362
Location: Lincoln Nebraska, USA

PostPosted: Wed Aug 01, 2007 4:23 pm    Post subject: GoogleMapAPI 2.4 released Reply with quote

Changelog 2.4:

fix a couple bugs with drawing the javascript map (drakos7,nmweb,mohrt)
fix lat/lon decimal when locale uses a comma (mohrt, Rene Schmidt)
fix javascript escapement errors (Greg Wilson, Jerome Combaz, mohrt)


http://www.phpinsider.com/php/code/GoogleMapAPI/
Back to top
View user's profile Send private message Visit poster's website
daiello@rinkatlas.com
Smarty Rookie


Joined: 19 Feb 2007
Posts: 7
Location: Newtown, PA

PostPosted: Thu Aug 30, 2007 6:08 pm    Post subject: 2.4 Changes Positively Impact iPhone Usability Reply with quote

Monte:

FYI, I substituted GoogleMapAPI 2.4 for 2.3 in my website RinkAtlas.com. This apparently solved a problem with info window object clickability on the iPhone.

Prior to the integration of GoogleMapAPI, none of the links inside the info window were clickable. I was showing this to some Apple employees at the iPhone Tech Talk seminar series event in New York City today. During the "supported coding" session in the afternoon, I noticed that you had revved GoogleMapAPI, so I updated my site and Safari on the iPhone started allowing me to click the links in the info window.

I'd be happy to discuss any other issues I discover with you (off list?), if you wish.
_________________
Dave Aiello
RinkAtlas.com
Back to top
View user's profile Send private message Visit poster's website
wessite
Smarty Rookie


Joined: 21 Mar 2007
Posts: 6

PostPosted: Thu Sep 13, 2007 8:35 am    Post subject: sidebar scroll Reply with quote

hello,

I have used your googlemaps class but I would like to make the sidebar scrollable. how do I do this ?

and also can you display the sidebar alphabetically

see in action here: http://www.bmxaction.net/blog/bmxspots
I already found it.

I also found a bug in the new release Exclamation
with the addMarkerIcon, to save some javascript it doesn't work. with the new code.

use this
Code:
               
$icon_key = md5(serialize($info));
if(!is_numeric($exist_icn[$icon_key])) {
      $exist_icn[$icon_key] = $i;

_________________
http://www.bmxaction.net
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
brown12321
Smarty Rookie


Joined: 10 Oct 2007
Posts: 8

PostPosted: Wed Oct 10, 2007 6:23 pm    Post subject: Reply with quote

Alright I just installed the latest version and went through the documentaion on how to get it intalled. It works with the simple example in the documentation but this is what I have

header.php and header.tpl

Inside the header.php I have this snippet:
Code:

$tpl = new TplLoad();
require('includes/GoogleMapAPI.class.php');
$map = new GoogleMapAPI('map');

$map->setAPIKey('MY CODE IS HERE');

$tpl->assign('google_map_header',$map->getHeaderJS());
$tpl->assign('google_map_js',$map->getMapJS());


Then in header.tpl i have inside the <header> tags:
Code:

{$google_map_header}
{$google_map_js}


then I have
Code:
<body onload="onLoad()">


Ok so that just the header which is included with every page.
I have a details.php and a details.tpl

in the details.php I have this snippet
Code:

//Google Maps
require('includes/GoogleMapAPI.class.php');
$map = new GoogleMapAPI('map');

$tplDetail=new TplLoad;


$map->addMarkerByAddress('3457 Holdrege St Lincoln NE 68502',"Valentino's","<b>Valentino's</b>");
$tplDetail->assign('google_map',$map->getMap());


Then in the detail.tpl file I have this snippet
Code:

<tr>
<td>{$google_map}</td>
</tr>


BUt nothing works. I was thinking its becuase there are 2 seperate files. Can anyone understand this and give me some suggestions?
Back to top
View user's profile Send private message
brown12321
Smarty Rookie


Joined: 10 Oct 2007
Posts: 8

PostPosted: Wed Oct 10, 2007 8:26 pm    Post subject: Reply with quote

Let me explain better

I have a header.php and header.tpl also a footer.php and footer.tpl that is included with every page

say I have

page1.php and page1.tpl
page2.php and page2.tpl
.
.
page(n).php and page(n).tpl

so each page includes the header and footer

Now the header is what has the Google map key and JS. How can I get the map to show say on page2.tpl?
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7362
Location: Lincoln Nebraska, USA

PostPosted: Wed Oct 10, 2007 8:43 pm    Post subject: Reply with quote

Check your HTML source in the browser, make sure GoogleMaps have everything you need to create the map. Also check your javascript console for errors.
Back to top
View user's profile Send private message Visit poster's website
brown12321
Smarty Rookie


Joined: 10 Oct 2007
Posts: 8

PostPosted: Wed Oct 10, 2007 9:33 pm    Post subject: Reply with quote

mohrt wrote:
Check your HTML source in the browser, make sure GoogleMaps have everything you need to create the map. Also check your javascript console for errors.


I am getting this error:

Error: document.getElementById("sidebar_map") has no properties
Source File: http://www.dev-domain.net/ad120-test-regions-2.html
Line: 50

Code:

document.getElementById("sidebar_map").innerHTML = "<ul class=\"gmapSidebar\">"+ sidebar_html +"<\/ul>";
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7362
Location: Lincoln Nebraska, USA

PostPosted: Thu Oct 11, 2007 2:13 am    Post subject: Reply with quote

is the sidebar disabled?
Back to top
View user's profile Send private message Visit poster's website
brown12321
Smarty Rookie


Joined: 10 Oct 2007
Posts: 8

PostPosted: Thu Oct 11, 2007 2:38 am    Post subject: Reply with quote

mohrt wrote:
is the sidebar disabled?


After disabling I get this error

Error: a has no properties
Source File: http://www.google.com/intl/en_us/mapfiles/89/maps2.api/main.js
Line: 391

And its coming from google maps URL above


Code:

Lc.prototype=new md;Lc.prototype.fromLatLngToPixel=function(a,b){var c=this,d=c.Pl[b],e=G(d.x+a.lng()*c.Rl[b]),f=Ha(Math.sin(qe(a.lat())),-0.9999,0.9999),g=G(d.y+0.5*Math.log((1+f)/(1-f))*-c.Sl[b]);return new o(e,g)};
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7362
Location: Lincoln Nebraska, USA

PostPosted: Thu Oct 11, 2007 3:02 am    Post subject: Reply with quote

This is a bit tough to debug without seeing the page. You have to figure out why that element is missing. Maybe something didn't get included/assigned.
Back to top
View user's profile Send private message Visit poster's website
brown12321
Smarty Rookie


Joined: 10 Oct 2007
Posts: 8

PostPosted: Thu Oct 11, 2007 1:54 pm    Post subject: Reply with quote

LEt me just show you my files


Header.tpl
Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$sitename} {$page}</title>
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta name="Generator" content="PHP Classifieds" />
<meta name="Description" content="{$meta_desc}" />
<link rel="shortcut icon" href="http://{$url}/layout_images/favicon.ico">
<link href="http://{$url}/style/style.css" rel="stylesheet" type="text/css" />
<link href="rss.php" title="{$sitename} - {$smarty.const.LA_RSS_FEED}" rel="alternate" id="list1" type="application/rss+xml" />

<script type="text/javascript" src="lightbox/js/prototype.js"></script>
<script type="text/javascript" src="lightbox/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="lightbox/js/lightbox.js"></script>
<script type="text/javascript" src="includes/swfobject.js"></script>
<link rel="stylesheet" href="lightbox/css/lightbox.css" type="text/css" media="screen" />

<script type="text/javascript" src="http://{$url}/javascript/domcollapse.js"></script>
<link href="http://{$url}/style/domcollapse.css" rel="stylesheet" type="text/css" />


<script type="text/javascript" src="http://{$url}/javascript/common.js"></script>
{if $html_editor}
<script language="Javascript" src="editor/scripts/innovaeditor.js" type="text/javascript"></script>
{/if}

{if $usetree}
<script language="JavaScript" src="http://{$url}/javascript/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="http://{$url}/javascript/tree_tpl.js" type="text/javascript"></script>
{/if}

{$google_map_header}
{$google_map_js}

</head>


<body>

<div id="container">

   <div class="containertable">
   
      <div id="top-table">
            <div id="logo"><a href="http://www.dev-domain.net"><img src="layout_images/new/logo.png" width="300" height="36" alt="dev-domain.net" /></a></div>
            
            <div id="top-nav">
               <div id="register-agent">{if $member}<a href="member.php"><img src="layout_images/new/control-panel.gif" alt="Member Control Panel"></a>{else}<a href="register.php"><img src="layout_images/new/register-agent.gif" alt="Register as an Agent"></a>{/if}</div>
               <div id="register-buyer"><a href="faq.php?t=sq&uin=4"><img src="layout_images/new/register-buyer.gif" alt="Register as a Buyer"></a></div>
               <div id="submit-ad"><a href="choose_cat.php"><img src="layout_images/new/submit-ad.gif" alt="Submit an Ad"></a></div>
            </div>
            <br style="clear:both; height: 0px;">      
      </div>   

         <table cellspacing="0">
            <tr id="nav">
               <td><a href="index.php" title="{$smarty.const.LA_FRONTPAGE}"><img src="layout_images/new/home_icon.png" width="16px" height="16px" alt="{$smarty.const.LA_FRONTPAGE}" style="margin:2px 0px;"/><br />{$smarty.const.LA_FRONTPAGE}</a></td>
               <td><a href="picturebrowse.php" title="{$smarty.const.LA_BROWSE}"><img src="layout_images/new/pictures_icon.png" width="16px" height="16px" alt="{$smarty.const.LA_BROWSE}" style="margin:2px 0px;"/><br />{$smarty.const.LA_BROWSE}</a></td>
               <td><a href="latestads.php" title="{$smarty.const.LA_LATEST}"><img src="layout_images/new/latest_icon.png" width="16px" height="16px" alt="{$smarty.const.LA_LATEST}" style="margin:2px 0px;"/><br />{$smarty.const.LA_LATEST}</a></td>
               <td><a href="mostviewed.php" title="{$smarty.const.LA_MOST}"><img src="layout_images/new/top_ads_icon.png" width="16px" height="16px" alt="{$smarty.const.LA_MOST}" style="margin:2px 0px;"/><br />{$smarty.const.LA_MOST}</a></td>
               <td><a href="search.php" title="{$smarty.const.LA_SEARCH}"><img src="layout_images/new/search_icon.png" width="16px" height="16px" alt="{$smarty.const.LA_SEARCH}" style="margin:2px 0px;"/><br />{$smarty.const.LA_SEARCH}</a></td>
               <td><a href="vendor.php" title="{$smarty.const.LA_YELLOW_PAGES}"><img src="layout_images/new/book_open.png" width="16px" height="16px" alt="{$smarty.const.LA_YELLOW_PAGES}" style="margin:2px 0px;"/><br />{$smarty.const.LA_YELLOW_PAGES}</a></td>
               <td><a href="faq.php" title="{$smarty.const.LA_FAQ}"><img src="layout_images/new/information.png" width="16px" height="16px" alt="{$smarty.const.LA_FAQ}" style="margin:2px 0px;"/><br />{$smarty.const.LA_FAQ}</a></td>
               <td><a href="emailalerts.php" title="{$smarty.const.LA_NEW_EMAIL_NOTIFICATION_MENU_NAME}"><img src="layout_images/new/email_alert.png" width="16px" height="16px" alt="{$smarty.const.LA_NEW_EMAIL_NOTIFICATION_MENU_NAME}" style="margin:2px 0px;"/><br />{$smarty.const.LA_NEW_EMAIL_NOTIFICATION_MENU_NAME}</a></td>

            </tr>
            <tr id="subnav">
               <td colspan="8">
                  <p style="float:left;">{$linked_path}</p>
               </td>
            </tr>


         </table>
         
<div id="banner_section1">
{php}
$section="banner_section1";
include "ad_get.php";
{/php}
</div>

</div>


header_inc.php
Code:

<?
if ($set_utf_disable!="1")
   header ("content-type: text/html; charset=utf-8");
if (getParam("set_template_dir",""))
   $_SESSION["set_template_dir"]=getParam("set_template_dir","");
require($full_path_to_public_program . "/admin/classes/TplLoad.php");

$tpl = new TplLoad();

if (!empty($set_stat))
   gatherStats();

if (isset($pagename))
   $page=$pagename;
else
   $page="";

if (!isset($meta_desc))
   $meta_desc="";

//Google Maps

$map = new GoogleMapAPI();


// enter YOUR Google Map Key
$map->setAPIKey('MY_KEY');
$map->disableSidebar();

$tpl->assign('google_map_header',$map->getHeaderJS());
$tpl->assign('google_map_js',$map->getMapJS());
$tpl->assign("banner",$lBanner);
$tpl->assign("url",$url);
$tpl->assign("set_favourites","$set_favourites");
$tpl->assign("set_rate","$set_rate");
$tpl->assign("set_vote_on_member","$set_vote_on_member");
$tpl->assign("sitename","$name_of_site");
$tpl->assign("meta_desc","$meta_desc");
$tpl->assign("page","$page");
$tpl->assign("usetree","$lUseTree");
$tpl->assign("html_editor","$html_editor");
$tpl->assign("linked_path",writeLinkedTitle($catid));
$tpl->assign("flag_params",getAllParams(array("setlang","ad_description","ad_title","ad_deion")));
$tpl->assign("charset",$lang_charset_custom);

if (isset($_SESSION["valid_user"]))
{
   $tpl->assign("member",$_SESSION["valid_user"]);
   $tpl->assign("member_name",$_SESSION["user_name"]);
}
$tpl->display("header.tpl");

//echo $lang_charset_custom . " ";
//echo date("d.m.Y H:i:s",$lang_date_custom);
?>



Deatil.tpl
Code:

<div class="containertable">

<!-- Start Content -->
<table cellspacing="0" class="box">
 <tr>
  <th colspan="2">{$ad_title|truncate:115:"...":true}</th>
 </tr>
 <tr>
 <td colspan="2" align="center" valign="top">
 
    <!-- START Images and videos -->
 
 
 
  <table cellpadding="0" cellspacing="0" class="property-pictures">
  <tr>
  <td align="left" valign="top">
  {if $set_slideshow AND $num_pictures>1  AND !$show_still}
 
  <script language="javascript">
  var imgArray=new Array({$num_pictures});
  var switchImage={$set_slideShow_sec};
  var switchImageCountFrom={$set_slideShow_count_from};
  {foreach item=image from=$image_list}
   imgArray[{$image.nr}]="{$image.file}";
  {/foreach}
  </script>
  {else}
  {foreach item=image from=$image_list}
   
   <a href="images/{$image.file_large}" rel="lightbox[large]" title="{$ad_title}" class="thumb">
   <!-- <a href="javascript:openLargeImage('large_picture.php?id={$image.id}')" class="thumb"> -->
   {if $set_image_program==0}
    <img src='images/{$image.file}' border='0' width="{$image.w}" heigth="{$image.h}" alt='' vspace="7" />
   {else}
    <img src='images/{$image.file}' border='0' alt='' vspace="7"/>
   {/if}
   </a>
  {/foreach}
  </td>
  </tr>
  </table>
  {/if}
 
 
  {if $show_still}
  <center><a href="?id={$ad_id}"><b>{$smarty.const.LA_SHOW_SHOW}</b></a></center>
  {/if}
 
  {if $set_slideshow AND $num_pictures>1 AND !$show_still}
  <p align="center"><b>{$smarty.const.LA_SLIDESHOW}</b></p>
  <img src="layout_images/blank.gif" alt='' id="gal_image" {if $image_max} width="{$image_max}" {/if} /><br /><br />
  {$smarty.const.LA_NEXT_SLIDE} <span id="co" align="center"></span></p>

  <center><a href="?id={$ad_id}&show_still=1"><b>{$smarty.const.LA_SHOW_STILL}</b></a></center>
 
  {literal}
  <script language="javascript">
  var n=0;
  var count=switchImageCountFrom;
  function slideShowImages()
  {
   n++;
   if (n==imgArray.length)
    n=0; 
   document.getElementById("gal_image").src="images/" + imgArray[n];
   setTimeout('slideShowImages();',switchImage);
   
  }
 
  function countDown()
  {
   document.getElementById("co").innerHTML=count--;
   setTimeout('countDown();',1000);
   if (count==0)
    count=switchImageCountFrom;
  }
 
  slideShowImages();
  countDown();
  </script>
  {/literal}
  {/if}
 
 
  {if $video_list}
  {foreach item=video from=$video_list}
 
 
  <b>{$video.file}</b><br />
 
  {if $video.ext=="avi" || $video.ext=="wmv"}
   <object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
   <param name="FileName" value="images/videos/{$video.file}" />
   <param name="autostart" value="false" />
   <embed type='application/x-mplayer2'
   pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
   src="images/videos/{$video.file}" autostart="false" loop="false">
   </embed></object>
  {elseif $video.ext=="mov"}
   
   <object width="240" height="196"
   classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
   codebase="http://www.apple.com/qtactivex/qtplugin.cab">
   <param name="src" value="images/videos/{$video.file}" />
   <param name="controller" value="true" />
   <param name="autoplay" value="true" />
   <embed src="images/videos/{$video.file}"   
   autoplay="true" controller="true"
   pluginspage="http://www.apple.com/quicktime/download/">
   </embed>
   </object>
  {elseif $video.ext=="rm" || $video.ext=="ram" || $video.ext=="mpg"}
   <object id='rvocx' classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'
   width="320" height="240">
   <param name='src' value="images/videos/{$video.file}" />
   <param name='autostart' value="false" />
   <param name='controls' value='imagewindow' />
   <param name='console' value='video' />
   <param name='loop' value="false" />
   <embed src="images/videos/{$video.file}" width="320" height="240"
   loop="true" type='audio/x-pn-realaudio-plugin' controls='imagewindow' console='video' autostart="false">
   </embed>
   </object>
   
  {/if}
  <br /><br />
  {/foreach}
  {/if}
 

 </td>
 </tr>
 
    <tr>
      <td colspan="2"><h1>{$ad_title}</h1></td>
    </tr>
    <tr>
 <td width="75%">
 
   
     
   <form method="post" action="detail.php">
           <table width="100%" style="align:left">
                <tr>
     <td>{if $sold==1}<p class="error"><b>{$smarty.const.LA_AD_IS_SOLD}</b></p>{/if}</td>
    </tr>
    <tr>
                  <td colspan="2"><h2>{$smarty.const.DESCRIPTION}:</h2></td>
                </tr>
                <tr>
                  <td colspan="2"><div id="dotted-box">{$ad_description}</div></td>
                </tr>
                <tr>
                  <td colspan="2"><h2>{$smarty.const.AD_DETAILS_TEXT}</h2></td>
                </tr>
                <tr>
                  <td colspan="2"><table class="dotted-box" width="60%">
                    <!-- Extra Fields: ADS Start  -->
  {foreach item=e from=$ads} {if $e.value} {if $e.description}
  <tr>
    <td colspan="2">
      <h2>{$e.description}</h2></td>
  </tr>
  {/if}
  <tr>
    <td valign="top" width="40%" class="ad-header">{$e.question}</td>
    <td valign="top"> {if $e.field==e_1 || $e.field==e_10 || $e.field==e_11} R {$e.value|commify:0} {else} {$e.value} {/if} </td>
  </tr>
  {/if} {/foreach}
  <!-- Extra Fields: ADS Stop  -->
                  </table></td>
                </tr>
                <tr>
                  <td colspan="2"><h2>Location details:</h2></td>
                </tr>
                <tr>
                  <td colspan="2">     
<table class="dotted-box" width="60%">

<tr>
    <td valign="top" class="ad-header">{$smarty.const.PROVINCE_ADD}</td>
    <td valign="top"> {$ad_province}</td>
</tr>
<tr>
    <td valign="top" class="ad-header">{$smarty.const.MUNIC_ADD}</td>
    <td valign="top"> {$ad_munic}</td>
  </tr>
  <tr>
    <td valign="top" class="ad-header">{$smarty.const.TOWN_ADD}</td>
    <td valign="top"> {$ad_town}</td>
  </tr>
  <tr>
    <td valign="top" class="ad-header">{$smarty.const.AREA_ADD}</td>
    <td valign="top"> {$ad_area}</td>
  </tr>
<tr>
<td valign="top" class="ad-header"><img src="../layout_images/new/gmap.gif" width="120" height="49"></td>                  
                   <td valign="top">&nbsp;</td>
                   </tr>

<tr>
<td colspan=2>{$google_map}</td>
{$google_onload}
</tr>
                       </table>
                    <br>
                    <table class="dotted-box" width="60%">
                      <tr>
                        <td width="40%" class="ad-header">{$smarty.const.DATE_ADDED}:</td>
                        <td> {$ad_added}</td>
                      </tr>
                      <tr>
                        <td class="ad-header">{$smarty.const.LA_ADID}:</td>
                        <td> {$ad_id} </td>
                      </tr>
                      <tr>
                        <td class="ad-header">{$smarty.const.AD_VIEWS}:</td>
                        <td>{$ad_hits}</td>
                      </tr>
                      <tr>
                        <td class="ad-header">{$smarty.const.LA_AD_EXPIRE}:</td>
                        <td> {$ad_expire} ({$smarty.const.LA_IN} {$num_days} {$smarty.const.DAYS})</td>
                      </tr>
                      <!-- RATE AD -->
        {if $rate_ad}
        <tr>
          <td class="ad-header"> {$smarty.const.LA_CURR_GRADE} </td>
          <td> {$ad_vote_img_result} ({$smarty.const.LA_AFTER} {$ad_ad_voters} {$smarty.const.LA_VOTES}) {if $rate_ad_requires_login && !$isLoggedIn} {else} <small> <a href='javascript:openWin2("rate.php?id={$ad_id}",300,250)'> <u>{$smarty.const.LA_GRADE_DETAIL}</u></a> </small> {/if} </td>
        </tr>
        {/if}
                  </table></td>
                </tr>
                <tr>
                  <td>
      <table class="dotted-box" width="60%">
      <tr>
      <td>
      <div class="unordered-list-no-padding">
     <ul> 
      <li><a href="javascript:toggle('sellers-details')">{$smarty.const.GENERAL_DETAILS}:</a></li>
      <li id="sellers-details">
         <table cellspacing="0" style="margin-top: 5px;">
         <tr>
          <td colspan="2">
           {if $VENDOR_URL AND $VENDOR_HOMEPAGE AND $IS_VENDOR}
            <a href='{$VENDOR_HOMEPAGE}' target='new'><img src='{$VENDOR_URL}' border='0'></a>
           {elseif $VENDOR_HOMEPAGE AND $IS_VENDOR}
            <a href='{$VENDOR_HOMEPAGE}' target='new'>{$VENDOR_HOMEPAGE}</a>
           {elseif $VENDOR_URL AND $IS_VENDOR} <img src="{$VENDOR_URL}" alt="" />
           {/if}
          </td>
         </tr>
         <tr>
        <td class="ad-header" width="41%">{$smarty.const.SOLD_BY_TEXT}:</td>
        <td><b><a href='user_info.php?user_id={$user_id}&amp;id={$ad_id}'>{$ad_username}</a></b>
         <!-- RATE MEMBERS -->
         {if $rate_member} ({$ad_member_votes} / # {$ad_member_voters}) {if $rate_member_requires_login && !$isLoggedIn} {else} <small> <a href='javascript:openWin2("rate_member.php?user_id={$user_id}",300,260)'> <u>{$smarty.const.LA_GRADE_DETAIL} {$ad_username}</u></a> </small> {/if} {/if} </td>
         </tr>
         <tr>
        <td class="ad-header">{$smarty.const.ADD_USER_EMAIL}:</td>
        <td> {if $hide_email} <a href="{$ad_link}&amp;contact=1"> {$smarty.const.LA_CONTACT_SALE}</a> {else} <a href="mailto:{$email}">{$email}</a> {/if} </td>
         </tr>
         <!-- Extra Fields: USERS Start  -->
         {foreach item=e from=$users} {if $e.value} {if $e.description}
        <tr>
          <td colspan="2">
         <h2>{$e.description}</h2></td>
        </tr>
        {/if}
        <tr>
          <td valign="top" class="ad-header">{$e.question}</td>
          <td valign="top"> {if $e.islink} <a href='{$e.value}' target='new' title='{$e.value}' />{$e.value|truncate:70:"...":true} {else} {$e.value} {/if} </td>
        </tr>
        {/if} {/foreach}
        <!-- Extra Fields: USERS Stop  -->
       
        {if $vendor_company}
         <tr>
          <td><b>Company Name:</b></td>
          <td>{$vendor_company}</td>
         </tr>
        {/if}
        {if $vendor_address}
         <tr>
          <td><b>Company Address:</b></td>
          <td>{$vendor_address}</td>
         </tr>
        {/if}
        {if $vendor_phone}
         <tr>
          <td><b>Company Phone:</b></td>
          <td>{$vendor_phone}</td>
         </tr>
        {/if}
        {if $vendor_about}
         <tr>
          <td><b>About Company:</b></td>
          <td>{$vendor_about}</td>
         </tr>
        {/if}
        {if $skype}
         <tr>
          <td><b>Skype Name:</b></td>
          <td>{$skype}</td>
         </tr>       
        <tr>
         <td>&nbsp;</td>
         <td>
         <!--
         Skype 'Skype Me?!' button
         http://www.skype.com/go/skypebuttons
         -->
         <script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>
         <a href="skype:{$skype}?call"><img src="layout_images/new/skype-call-me.gif" style="border: none;" alt="Call me now via Skype!" /></a>
         </td>
        </tr>
       {/if}
       </table>
      </li>
       </ul>
     </div>
     </td>
     </tr>
     </table>
     {literal}<script type="text/javascript">
        document.getElementById('sellers-details').style.display="none"; // collapse list
        function toggle(list){
        var listElementStyle=document.getElementById(list).style;
        if (listElementStyle.display=="none"){
        listElementStyle.display="block";
         }
        else{ listElementStyle.display="none";
         }
        } </script>{/literal}
     

                    <br></td>
                </tr>
  {if $set_comment_system}
  <tr>
    <td colspan="2"><h2>{$smarty.const.LA_COMMENT}</h2></td>
  </tr>
  {if $comment_list} {foreach item=c from=$comment_list}
  <tr>
    <td width="50%">#{$c.comment_id} {$smarty.const.LA_BY} <a href='user_info.php?user_id={$c.comment_userid}' alt=''>{$c.comment_by}</a> <br />
&nbsp;&nbsp;&nbsp;{$c.comment_date} {if $user_id==$isLoggedIn && $set_comment_admin_del} <a href='?id={$ad_id}&del={$c.comment_id}'><img src='layout_images/new/ad_delete.gif' border="0" /></a> {/if} </td>
    <td>{$c.comment_body}</td>
  </tr>
  {/foreach} {/if}
  <tr>
    <td colspan="2"> {if $set_comment_done} <b>{$smarty.const.LA_COMMENT_RECORDED}</b> {/if}
        <p></p>
        {$smarty.const.LA_COMMENT_QUESTION} {if !$isLoggedIn} {$smarty.const.LA_COMMENT_QUESTION2}.{/if}
        <input type="hidden" name="id" value="{$ad_id}" />
    </td>
  </tr>
  <!--
   
   <tr>
    <td>Title:</td>
    <td><input type="text" name="com_title" value="" size="39"></td>
   </tr>
   -->
  {if $isLoggedIn}
  <tr>
    <td>{$smarty.const.LA_COMMENT}</td>
    <td><textarea cols="40" rows="5" name="comment_body"></textarea></td>
  </tr>
  <tr>
    <td colspan="2"><input type="submit" name="submit" value="{$smarty.const.LA_COMMENT_ADD}"></td>
  </tr>
  {/if} {/if}
              </table>
   </form>

     
 </td>
 <td align="right" valign="top">
 
 {if $doc_list}
 <table id="tools" width="100%">
   <tr>
  <th>{$smarty.const.LA_UPLOADED_FILE}</th>
   </tr>
   {foreach item=image from=$doc_list}
   <tr>
  <td><img src="layout_images/new/{$image.ext}.gif" align="left" border="0" alt="{$image.ext}" /> <a href="images/docs/{$image.name}" target="_blank" title="{$image.display_name}"> <span style="padding-left: 8px; ">{$image.display_name|truncate:23:"...":true}</span></a></td>
  </tr>
   {/foreach}
 </table>
 {/if}

 <table id="tools" width="100%">
      <tr>
    <th>{$smarty.const.LA_TOOLS_TITLE}</th>
 </tr>
   <tr>
        <td>
 
  {if $fav_remove_link}
    <a href="javascript:openWin2('fav_popup.php?remove_fav={$ad_id}',220,130,'{$REMOVE_FAV}')" id="addfav">{$smarty.const.LA_REMOVE_FAV}</a>
   {elseif $fav_add_link}
    <a href="javascript:openWin2('fav_popup.php?add_fav={$ad_id}',220,130,'{$ADD_FAV}')" id="addfav">{$smarty.const.LA_ADD_FAV}</a>
  {/if}
 
  </td>
      </tr>
   <tr>
        <td><a href="{$link_adcat}" id="moread">{$smarty.const.LA_SIMILAR}</a></td>
      </tr>
      <tr>
        <td><a href="agent_{$user_id}.html" id="sellerad">{$smarty.const.LA_SIMILAR_ADS}</a></td>
      </tr>
      <tr>
        <td><a href="{$ad_link}&amp;contact=1" id="contactseller">{$smarty.const.LA_CONTACT_SALE}</a></td>
      </tr>
      <tr>
        <td><a href="{$ad_link}&amp;tellafriend=1" id="tellfriend">{$smarty.const.LA_TELL_A_FRIEND}</a></td>
      </tr>
      <tr>
        <td><a href="print-ad-{$ad_id}.html" id="print">{$smarty.const.LA_PRINT}</a></td>
      </tr>
   <tr>
        <td>
     {if $prev_link}
   <!-- <a href="{$prev_link}" id="arrow-backwards">{$smarty.const.PREVIOUS_ADS}</a> -->
<a href="ad{$prev_id}-{$prev_title|truncate:100:"...":true|sanitize}.html" id="arrow-backwards">{$smarty.const.PREVIOUS_ADS}</a>
  {/if}
  </td>
   </tr>
   <tr>
        <td>
  {if $next_link}
   <a href="ad{$next_id}-{$next_title|truncate:100:"...":true|sanitize}.html" id="arrow-forward">{$smarty.const.LA_N}</a>
  {/if}
  </td>
   </tr>
    </table>
 <table id="tools" width="100%">
      <tr>
    <th>Other Options</th>
 </tr>
   <tr>
        <td><img src="../layout_images/new/exclamation.png" align="left" width="16px" height="16px" border="0" title="Report this Ad to admin" />&nbsp;&nbsp;<a href="detail.php?id={$ad_id}&reportad=1">{$smarty.const.LA_REPORT_AD}</a></td>
      </tr>
   <tr>
     <td><img src="../layout_images/new/money.png" align="left" width="16px" height="16px" border="0" title="Apply for finance" />&nbsp;&nbsp;<a href="faq.php?t=sq&uin=6">Apply for Finance</a></td>
     </tr>
      </table>

  <div class="banner_box" style="background: #ffffff; ">
  <p>Advertisement</p>
   {php}
   $section="banner_section4";
   include "ad_get.php";
   {/php}
  </div>
 
  <div class="banner_box" style="background: #ffffff; ">
  <p>Advertisement</p>
   {php}
   $section="banner_section5";
   include "ad_get.php";
   {/php}
  </div>
 
 <br>
 
</td>
</tr>
</table>
!-- End Content -->
</div>


I know that alot of code but all you are looking for in that is
Code:

<tr>
<td colspan=2>{$google_map}</td>
{$google_onload}
</tr>


Then my deatil.php file
Code:

<?
$lSearchEngineArray=array("Google", "Fast", "Slurp", "Ink", "Atomz", "Scooter", "Crawler", "MSNbot", "Poodle", "Genius");
$lIsSearchE=0;
$lCommentDone=0;
foreach($lSearchEngineArray as $key => $val)
   if(strstr($_SERVER['HTTP_USER_AGENT'], $val))
      $lIsSearchE++;
if($lIsSearchE==0)
   session_start();

include_once("admin/inc.php");


$ad_id=round(getParam("id",""));
$lPrint=getParam("print","");

// If setting is not set, use these defaults...
if (!$set_outer_color) { $set_outer_color = "#A9B8D1";    }
if (!$set_inner_color) { $set_inner_color = "#FFFFFF";    }
if (!$set_descr_color) { $set_descr_color = "#FFFFFF";    }
if (!isset($set_descr_cell)) {   $set_descr_cell = 10;    }
if (isset($preview)) { $ad_id = $preview; $validation = 0;    }

if (!$ad_id)
   criticalError(LA_ERROR,LA_ERROR_NO_ID);


if ($validation == 1 && getParam("preview","")=="") { $val_string = " AND ad_is_validated = 1"; } else { $val_string = ""; }
$sql_links = "select * from $ads_tbl, $cat_tbl, $usr_tbl where cat_id=ad_cat_id AND user_id=ad_owner AND ad_id=$ad_id $val_string";
$result_from_ad = q($sql_links);
$row_from_ad=mysql_fetch_array($result_from_ad);

if (mysql_num_rows($result_from_ad) == 0)
   criticalError(LA_AD_REMOVED_CAPTION,formatString(LA_AD_REMOVED_CONTENT,array("http://$url")));

$sitetitle = $row_from_ad["ad_title"];
$ad_description = $row_from_ad["ad_description"];
$userid = $row_from_ad["user_id"];
$ad_date = $row_from_ad["ad_date"];
$ad_views = $row_from_ad["ad_views"];
$ad_votes = $row_from_ad["ad_votes"];
$ad_voters = $row_from_ad["ad_voters"];
$ad_totalscore = $row_from_ad["ad_totalscore"];
$votes = $row_from_ad["user_votes"];
$voters = $row_from_ad["user_voters"];
$name = $row_from_ad["user_name"];
$email = $row_from_ad["user_email"];
$catname = $row_from_ad["cat_name"];
$catid = $row_from_ad["cat_id"];
$vendor_url = $row_from_ad["user_vendor_url"];
$vendor_homepage = $row_from_ad["user_vendor_homepage"];

//Yellow Pages - Vendor details ***********************

$vendor_company = $row_from_ad["user_company_name"];
$vendor_address = $row_from_ad["user_company_address"];
$vendor_phone = $row_from_ad["user_company_phone"];
$skype = $row_from_ad["user_skype_name"];
$vendor_about = $row_from_ad["user_company_about"];

//*****************************************************

$sold = $row_from_ad["ad_is_sold"];
$cattpl = $row_from_ad["cat_tpl"];
$datestamp = $row_from_ad["ad_date"];
$ad_has_picture = $row_from_ad["ad_has_picture"];
$is_vendor = $row_from_ad["user_is_vendor"];
$hide_email = $row_from_ad["user_hide_email"];
$img_stored = $row_from_ad["img_stored"];
$user_id = $row_from_ad["user_id"];
$expire_days = $row_from_ad["ad_expires_after_days"];
$ad_expires=formatDateShort($row_from_ad["ad_date_expire"]);
$timestamp_expire_date=$row_from_ad["ad_date_expire"];
$ad_added=formatDateShort($row_from_ad["ad_date"]);

//Get Regions
$sql_links = "select * from $ads_tbl, $area_tbl, $town_tbl, $munic_tbl, $province_tbl where ad_id=$ad_id AND ad_aid=$area_tbl.aid AND $area_tbl.tid=$town_tbl.tid AND $town_tbl.mid=$munic_tbl.mid AND $munic_tbl.pid=$province_tbl.pid $val_string";
$result_from_ad = q($sql_links);
$row_from_ad=mysql_fetch_array($result_from_ad);

$ad_area=$row_from_ad["aname"];
$ad_town=$row_from_ad["tname"];
$ad_munic=$row_from_ad["mname"];
$ad_province=$row_from_ad["pname"];
$ad_centroidX=$row_from_ad["centroidX"];
$ad_centroidY=$row_from_ad["centroidY"];

$pagename= $sitename . " - " . cleanInput($sitetitle);
$meta_desc=cleanInput(dotString($ad_description,150));
if (empty($lPrint))
   include_once("header_inc.php");
else
{
   include ($full_path_to_public_program . "/admin/classes/TplLoad.php");
   echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>";
    echo "<html>";
    echo "<head>";
    echo "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>";
    echo "<title>Print Page</title>";
    echo "<link href='http://{$url}/style/style.css' rel='stylesheet' type='text/css' />";
    echo "</head>";
    echo "<body style='width:640px;'>";
    echo "<script language='javascript'>window.print()</script>";
    echo "<br><a href='".linkDetail($ad_id)."'><-- Back to website</a><br>";
}

// Start template system
$tplDetail=new TplLoad;

$map->addMarkerByAddress('642 Cascading Creek Ln',"The Brown's","<b>The Brown's</b>");

$tplDetail->assign('google_onload',$map->printOnLoad());
$tplDetail->assign('google_map',$map->getMap());

// Comment system
if (($_SESSION["valid_user"] !="") && (getParam("submit","") !="") && (getParam("comment_body","") !=""))
{
   $lfBody=strToDb(getParam("comment_body",""));
   $lfAdId=$ad_id;
   $lfUser=$_SESSION["valid_user"];
   //if ($lfUser==$user_id)
      //$lSql="insert into $com_tbl (comment_body,comment_date,comment_userid,comment_ad) values ('$lfBody',".time().",$lfUser,$lfAdId)";
   //else
      $lSql="insert into $com_tbl (comment_body,comment_date,comment_userid,comment_ad,comment_ip) values ('$lfBody',".time().",$lfUser,$lfAdId,'".getRemoteIp()."')";

   $lCommentRes=q($lSql);
   $lCommentDone=1;

}
if (getParam("del","") && $set_comment_admin_del)
{
   if ($_SESSION["valid_user"]==$user_id)
   {
      q("delete from $com_tbl where comment_id=" . getParamInt("del","") . " AND comment_ad=$ad_id");
   }
}
$lSql="select * from $com_tbl where comment_ad=" . $ad_id . " order by comment_id desc";
$lComment=q($lSql);
$i=0;
while ($lRow=mysql_fetch_array($lComment))
{
   $lComments[$i]["comment_body"]=strEnc($lRow["comment_body"]);
   $lComments[$i]["comment_id"]=$lRow["comment_id"];
   $lComments[$i]["comment_userid"]=$lRow["comment_userid"];
   $lComments[$i]["comment_date"]=formatDateShort($lRow["comment_date"]);
   $lSq="select user_name from $usr_tbl where user_id=" . $lRow["comment_userid"];
   $lResult=q($lSq);
   $lRow2=mysql_fetch_array($lResult);
   $lComments[$i]["comment_by"]=strEnc($lRow2["user_name"]);

   $i++;

}
$tplDetail->assign("comment_list",$lComments);


// END comment system

$tplDetail->assign("isLoggedIn",$_SESSION["valid_user"]);
$tplDetail->assign("set_outer_color",$set_outer_color);
$tplDetail->assign("set_inner_color",$set_inner_color);
$tplDetail->assign("set_descr_color",$set_descr_color);
$tplDetail->assign("set_descr_cell",$set_descr_cell);
$tplDetail->assign("set_comment_system",$set_comment_system);
$tplDetail->assign("set_comment_admin_del",$set_comment_admin_del);
$tplDetail->assign("id_ad","$ad_id");
$tplDetail->assign("ad_id","$ad_id");
$tplDetail->assign("ad_link",linkDetail($ad_id));


$tplDetail->assign("ad_area","$ad_area");
$tplDetail->assign("ad_town","$ad_town");
$tplDetail->assign("ad_munic","$ad_munic");
$tplDetail->assign("ad_province","$ad_province");
$tplDetail->assign("ad_centroidX","$ad_centroidX");
$tplDetail->assign("ad_centroidY","$ad_centroidY");


$tplDetail->assign("ad_title",strEnc("$sitetitle"));
$tplDetail->assign("ad_added","$ad_added");
$tplDetail->assign("ad_hits","$ad_views");
$tplDetail->assign("ad_expire","$ad_expires");
$tplDetail->assign("ad_catid","$catid");
$tplDetail->assign("ad_username",strEnc("$name"));
$tplDetail->assign("ad_email","$email");
$tplDetail->assign("ad_catname",strEnc($row_from_ad["cat_name"]));
$tplDetail->assign("banner","$lBanner");
if ($set_nl2br)
   $ad_description=nl2br($ad_description);
if ($lCommentDone)
   $tplDetail->assign("set_comment_done",1);
$tplDetail->assign("ad_description","$ad_description");
$tplDetail->assign("user_id","$user_id");
$tplDetail->assign("num_days",getHowManyDaysRemains($timestamp_expire_date,time()));
$tplDetail->assign("LA_REMOVE_FAV",urldecode(LA_REMOVE_FAV));
$tplDetail->assign("LA_ADD_FAV",urldecode(LA_ADD_FAV));
$tplDetail->assign("set_image_program",$set_image_program);

// mod_rewrite tags
$tplDetail->assign("link_adcat",linkCat($catid));
$tplDetail->assign("link_aduser",linkUser($user_id));

//Yellow Pages - Vendor details ***********************

$tplDetail->assign("vendor_company","$vendor_company");
$tplDetail->assign("vendor_address","$vendor_address");
$tplDetail->assign("vendor_phone","$vendor_phone");
$tplDetail->assign("skype","$skype");
$tplDetail->assign("vendor_about","$vendor_about");

//*****************************************************




// Print out linked title
writeLinkedTitle(getCategoryId($ad_id));

if ($set_detail_login_need==1)
   check_valid_user("");

if ($hide_email==1)
   $tplDetail->assign("hide_email",1);
else
   $tplDetail->assign("email","$email");


// Member Rating
if ($set_vote_on_member)
      $tplDetail->assign("rate_member",$set_vote_on_member);
if ($set_ratemem_login_need)
      $tplDetail->assign("rate_member_requires_login","$set_ratemem_login_need");
if ($voters > 0)
   $votes = round($votes/$voters, 1);
else {
   $votes=0;
   $voters=0;
}
$tplDetail->assign("sold","$sold");
$tplDetail->assign("ad_member_votes","$votes");
$tplDetail->assign("ad_member_voters","$voters");

// Ad Rating
if ($set_rate)
      $tplDetail->assign("rate_ad","$set_rate");
if ($set_rate_ad_require_member)
      $tplDetail->assign("rate_ad_requires_login","$set_rate_ad_require_member");

// Get image rating
$lStr=getStarRating($ad_totalscore);

$tplDetail->assign("ad_vote_img_result","$lStr");
$tplDetail->assign("ad_ad_votes","$ad_votes");
$tplDetail->assign("ad_ad_voters","$ad_voters");
$tplDetail->assign("ad_totalscore","$ad_totalscore");


// Code for prev next result
if ($sold == 1)
   $tplDetail->assign("isSold",1);

$tplDetail->assign("IS_VENDOR","$is_vendor");
$tplDetail->assign("VENDOR_URL",strEnc($vendor_url));
$tplDetail->assign("VENDOR_HOMEPAGE",strEnc($vendor_homepage));


$sql_prevad_id = "select ad_id, ad_title from $ads_tbl, $cat_tbl, $usr_tbl where cat_id=ad_cat_id AND ad_owner=user_id AND ad_id < $ad_id AND cat_id = $catid $val_string order by ad_id desc limit 1";
$result_prevad_id = q($sql_prevad_id);
$row_prev = mysql_fetch_array($result_prevad_id);
$prevad_id = $row_prev["ad_id"];
$prevad_title = $row_prev["ad_title"];

$sql_nextad_id = "select ad_id, ad_title from $ads_tbl, $cat_tbl, $usr_tbl where cat_id=ad_cat_id AND ad_owner=user_id AND ad_id > $ad_id AND cat_id = $catid $val_string order by ad_id asc limit 1";
$result_nextad_id = q($sql_nextad_id);
$row_next = mysql_fetch_array($result_nextad_id);
$nextad_id = $row_next["ad_id"];
$nextad_title = $row_next["ad_title"];

// PREV NEXT AD
if ($prevad_id)
{
   $lLinkPrev=linkDetail($prevad_id);
   if (ereg("\?",$lLinkPrev))
      $lLinkPrev.="&amp;catid=" . $catid;
   else
      $lLinkPrev.="?catid=" . $catid;
   $str_nav.="<a href='$lLinkPrev'>";
   $str_nav.="<img src='layout_images/arrow-back.gif' border='0' alt='' /> ".LA_P."</a>";
   $tplDetail->assign("prev_link",$lLinkPrev);
   $tplDetail->assign("prev_id",$prevad_id);
   $tplDetail->assign("prev_title",$prevad_title);
}
$str_nav.="&nbsp;&nbsp;&nbsp;";
if ($nextad_id)
{
   $lLinkNext=linkDetail($nextad_id);
   if (ereg("\?",$lLinkNext))
      $lLinkNext.="&amp;catid=" . $catid;
   else
      $lLinkNext.="?catid=" . $catid;
   $str_nav.="<a href='$lLinkNext'>";
   $str_nav.=LA_N . " <img src='layout_images/arrow-forw.gif' border='0' alt='' /></a>";

   $tplDetail->assign("next_link",$lLinkNext);

   $tplDetail->assign("next_id",$nextad_id);
   $tplDetail->assign("next_title",$nextad_title);

}
$tplDetail->assign("navigation","$str_nav");

if (getParam("reportad",""))
    include "reportad.php";
if (getParam("contact","")!="")
   include "contact.php";
if (getParam("tellafriend",""))
   include "tellafriend.php";


 $fExtraArray=getFieldArray($ad_id,$user_id,",");

 $tplDetail->assign("ads",$fExtraArray["ad"][$ad_id]);
 $tplDetail->assign("users",$fExtraArray["user"][$user_id]);


if ($set_favourites AND isset($_SESSION["valid_user"]))
{
   $sql = "select fid from $fav_tbl where f_adid=$ad_id AND f_user_id = ".$_SESSION["valid_user"];
   $r = mysql_query($sql);
   $number = mysql_num_rows($r);

   if ($number)
      $tplDetail->assign("fav_remove_link",1);
   else
      $tplDetail->assign("fav_add_link",1);
}




$query = "select * from $vid_tbl where video_adid=$ad_id";
$sql_result = q($query);
while ($row=mysql_fetch_array($sql_result))
{

   $id = $row["video_id"];
   $filename_stored = $row["video_file"];
   $array = split("\.",$filename_stored);
   $last=count($array)-1;
   $ext=$array[$last];

   $videoArray[$i]["file"]=$filename_stored;
   $videoArray[$i]["id"]=$id;
   $videoArray[$i]["ext"]=strtolower($ext);
   $i++;


}
$tplDetail->assign("video_list",$videoArray);


$query = "select * from $doc_tbl where f_adid=$ad_id order by f_id desc";
$sql_result_doc = q ($query);
$i=0;
while ($row=mysql_fetch_array($sql_result_doc))
{

   $id = $row["f_id"];
   $filetype = $row["filetype"];
   $filename = $row["f_file"];

   $fArray[$i]["id"] = $id;
   $fArray[$i]["name"] = $filename;
   $lSize=filesize("images/docs/" . $filename);
   $fArray[$i]["size"] = round($lSize/1024);

   $lDisplay=ereg_replace($ad_id . "_","",$filename);
   $fArray[$i]["display_name"] = $lDisplay;
   $lExtArray=split("\.",$filename);
   $lExt=end($lExtArray);
   $fArray[$i]["ext"] = strtolower($lExt);
   $i++;

}
$tplDetail->assign("doc_list", $fArray);



$query = "select id,filename from $pic_tbl where pic_ad_id=$ad_id";
$sql_result = q($query);
$num_ad_has_pictures =  mysql_num_rows($sql_result);

for ($i=0; $i<$num_ad_has_pictures; $i++)
{
   $row = mysql_fetch_array($sql_result);
   $id = $row["id"];
   $filename_stored = $row["filename"];
   if ($set_image_program==0)
   {
      $lSizeArray=setImageSize($filename_stored,getManualSize("small"),0);
      $imgArray[$i]["w"]=$lSizeArray[0];
      $imgArray[$i]["h"]=$lSizeArray[1];
   }
   else
      $filename_stored=ereg_replace("tmb2","tmb1",$filename_stored);

   $lFileOrig=ereg_replace("_tmb1","",$filename_stored);
   $lFileOrig=ereg_replace("_tmb2","",$lFileOrig);

     $imgArray[$i]["file"]=$filename_stored;
     $imgArray[$i]["file_large"]=$lFileOrig;
   $imgArray[$i]["id"]=$id;
   $imgArray[$i]["nr"]=$i;

}
if ($set_image_program==0)
   $tplDetail->assign("image_max",getManualSize("small"));
$tplDetail->assign("image_list",$imgArray);
$tplDetail->assign("set_slideshow",$set_slideShow);
$tplDetail->assign("set_slideShow_sec",$set_slideShow_sec*1000);
$tplDetail->assign("set_slideShow_count_from",$set_slideShow_sec);
$tplDetail->assign("num_pictures",$num_ad_has_pictures);
$tplDetail->assign("show_still",getParam("show_still",""));

$s = "UPDATE $ads_tbl set ad_views=ad_views+1 where ad_id=$ad_id";
$result1=q($s);

$tplDetail->display("detail.tpl");

if (empty($lPrint))
   include_once("footer_inc.php");
else
   echo formatString("<center>".LA_PRINT_CLEAN."</center>", array(formatDate(date("Ymd")),date("H:m"),"http://$url/detail.php?id=$ad_id"));
    echo "</body>";
    echo "</html>";
?>


Again a lot of code but this is what your looking for
Code:

$map->addMarkerByAddress('642 Cascading Creek Ln',"The Brown's","<b>The Brown's</b>");

$tplDetail->assign('google_onload',$map->printOnLoad());
$tplDetail->assign('google_map',$map->getMap());



You can see in the deatil.php file that I always include the header_inc.php file
Code:

 if (empty($lPrint))
   include_once("header_inc.php");


Thats what I was saying in an earlier post, that ever page includes that header_inc.php file. BUT, I only want the google maps to display on the detail.tpl/detail.php page.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7362
Location: Lincoln Nebraska, USA

PostPosted: Thu Oct 11, 2007 2:17 pm    Post subject: Reply with quote

Try stripping the page down to just the basics. Try to get the google map isolated from all other code and get it working. Then start adding things back in one at a time.
Back to top
View user's profile Send private message Visit poster's website
brown12321
Smarty Rookie


Joined: 10 Oct 2007
Posts: 8

PostPosted: Thu Oct 11, 2007 2:23 pm    Post subject: Reply with quote

mohrt wrote:
Try stripping the page down to just the basics. Try to get the google map isolated from all other code and get it working. Then start adding things back in one at a time.


I can only get it working if I put everything is the header_inc.php and header.tpl file.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7362
Location: Lincoln Nebraska, USA

PostPosted: Thu Oct 11, 2007 2:35 pm    Post subject: Reply with quote

Did you try using the body onload?

Code:
<body onload="onLoad()">
Back to top
View user's profile Send private message Visit poster's website
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7362
Location: Lincoln Nebraska, USA

PostPosted: Thu Oct 11, 2007 2:36 pm    Post subject: Reply with quote

See the enableOnLoad() in the README, it tells you that if you do not enable the onload, then the javascript must be placed within the <body> tags.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP