Page 1 of 1

Help on google maps script and index.html file

Posted: Sat Jul 29, 2006 2:15 pm
by kamunsa
Hi, The whole idea is to try and get customers who vist my site to login and get easy acesseble info and order from my website. I am currentlying running Joomla 1.1.10 on the site.

I am trying to add the info -googlemaps to the following script:

Code: Select all

<?php defined( "_VALID_MOS" ) or die( "Direct Access to this location is not allowed." );$iso = split( '=', _ISO );echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';?>
<!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>
<?php mosShowHead(); ?>
<meta http-equiv="Content-Type" content="text/html;><?php echo _ISO; ?>" />
<?php if ( $my->id ) { initEditor(); } ?>
<?php echo "<link rel=\"stylesheet\" href=\"$GLOBALS[mosConfig_live_site]/templates/$GLOBALS[cur_template]/css/template_css.css\" type=\"text/css\"/>" ; ?><?php echo "<link rel=\"shortcut icon\" href=\"$GLOBALS[mosConfig_live_site]/templates/247portal-b-brown/favicon.ico\" />" ; ?>
<link rel="shortcut icon" href="<?php echo $mosConfig_live_site; ?>/templates/anywaypc_b/favicon.ico" />
<link rel="alternate" title="<?php echo $mosConfig_sitename; ?>" href="<?php echo $GLOBALS['mosConfig_live_site']; ?>/index2.php?option=com_rss&no_html=1" type="application/rss+xml" />
<script language="JavaScript" type="text/javascript">
    <!--
    function MM_reloadPage(init) {  //reloads the window if Nav4 resized
      if (init==true) with (navigator) {if ((appName=="Netscape")&(parseInt(appVersion)==4)) {
        document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
      else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    }
    MM_reloadPage(true);
    //-->
  </script>
<script src="includes/js/myutility.js"></script>
</head>
<body <?php if($printing) { echo "onLoad=\"window.print()\""; $printsuffix="-print"; $mainbg="#FFFFFF"; } else { $printsuffix=""; $mainbg="#F4F4EA"; echo " style='background:#f4f4ea;'"; } ?>>
<a name="up" id="up"></a>
<table width="100%" height="300"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><?php if(!$printing) { ?>
      <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" background="<?php echo $mosConfig_live_site;?>/templates/anywaypc_b/images/center1.jpg">
        <!-- <tr> 
          <td colspan="4"><img border="0" src="<?php echo $mosConfig_live_site;?>/templates/anywaypc_b/images/space.gif" width="760" height="1" /></td> 
        </tr>  -->
        <tr>
          <td width="46" background="<?php echo $mainbg; ?>"><img src="<?php echo $mosConfig_live_site;?>/templates/anywaypc_b/images/left1.jpg" /></td>
          <td width="100%" id="header" ><a href="<?php echo $mosConfig_live_site;?>" title="<?php echo $mosConfig_sitename; ?>"><img border="0" width="450" height="71" src="<?php echo $mosConfig_live_site;?>/templates/anywaypc_b/images/space.gif" /></a></td>
          <td width="188"><table width="100" height="71" border="0" align="right" cellpadding="0" cellspacing="0" >
              <tr>
                <td align="right" valign="bottom"><br />
                  <br />
                  <br />
                  <?php // mosLoadComponent( 'mambelfish' ); ?>
                  <?php //mosLoadModules ( 'cpanel'); ?></td>
              </tr>
            </table></td>
          <td width="45" background="<?php echo $mainbg; ?>"><img src="<?php echo $mosConfig_live_site;?>/templates/anywaypc_b/images/right1.jpg" /></td>
        </tr>
        <tr>
          <td width="46" rowspan="2" valign="top"><img src="<?php echo $mosConfig_live_site;?>/templates/anywaypc_b/images/left2.jpg" /></td>
          <td colspan="2"><table width="100%" height="24"  border="0" cellpadding="0" cellspacing="0" align="center">
              <tr>
                <td align="center"><div style="padding-top:8px;" align="center">
                    <?php mosLoadModules ( 'user3', -2); ?>
                  </div></td>
              </tr>
            </table></td>
          <td width="45" rowspan="2" valign="top"><img src="<?php echo $mosConfig_live_site;?>/templates/anywaypc_b/images/right2.jpg" /></td>
        </tr>
        <tr>
          <td colspan="2" align="center"><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td style="padding-top:10px; "><?php mosPathWay(); ?></td>
                <td align="right" style="padding-top:10px; "><div align="right"><span class="date"><?php echo mosCurrentDate(); ?></span></div></td>
              </tr>
            </table></td>
Here are the instructions to do this:

Code: Select all

Set The DOCTYPE and style info from the API documentation:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">

   3B: Modify the <body> tag as follows:

<body <?php if ($option=='com_google_maps') { echo 'onload="initMap()" onunload="GUnload()"'; } ?> >

       This is needed because Internet Explorer does not handle changes to the loading document prior to it being completely loaded.

Posted: Sat Jul 29, 2006 4:32 pm
by onion2k
What's the problem?

Problem is........

Posted: Sat Jul 29, 2006 4:56 pm
by kamunsa
I need to insert the folowing into the body tag:

Code: Select all

<body <?php if ($option=='com_google_maps') { echo 'onload="initMap()" onunload="GUnload()"'; } ?> >
I need to insert it to the following code:

3B: Modify the <body> tag as follows:

Code: Select all

<body <?php if($printing) { echo "onLoad=\"window.print()\""; $printsuffix="-print"; $mainbg="#FFFFFF"; } else { $printsuffix=""; $mainbg="#F4F4EA"; echo " style='background:#f4f4ea;'"; } ?>>
This is needed because Internet Explorer does not handle changes to the loading document prior to it being completely loaded.
Please help if you can

Posted: Sun Jul 30, 2006 4:07 am
by onion2k
You still haven't stated what exactly it is you're unable to do. According to those instructions you some have something like:

Code: Select all

<body <?php if ($option=='com_google_maps') { echo 'onload="initMap()" onunload="GUnload()"'; } ?><?php if($printing) { echo "onLoad=\"window.print()\""; $printsuffix="-print"; $mainbg="#FFFFFF"; } else { $printsuffix=""; $mainbg="#F4F4EA"; echo " style='background:#f4f4ea;'"; } ?>>
Pretty horrible code there, but that's what happens when you use a rubbish framework like Joomla. It's easy enough to set up, but adding features results in a horrible mess.

Posted: Sun Jul 30, 2006 4:40 am
by Charles256
erm..just for fun..

Code: Select all

<body 
<?php
 if($printing) 
{ 
   echo "onLoad=\"window.print()\"";
   $printsuffix="-print";
   $mainbg="#FFFFFF";
}
else 
{
  $printsuffix="";
   $mainbg="#F4F4EA"; 
  echo " style='background:#f4f4ea;'";
}
?>
>
no idea what ya want but that's easier to read