Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-27-2008, 06:29 PM
Joey Link Joey Link is offline
 
Join Date: Aug 2008
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default I have a custom template problem - should be an easy fix

Here's the code I use for creating custom, integrated pages on my site. Of course, there's also the .php file in the directory, but this is the template code.



Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="tcat">Custom Title</td>
</tr>
<tr>
<td class="alt1">

<custom HTML goes here>

</td>
</tr>
</table>


$footer
</body>
</html>
This has been working fine for me, up until last night when I tried to add code 177627 characters in length and it wouldn't save it (blank gray background within the admin console). I played around it with and found that it wasn't in fact a size limit like I thought, because when I deleted the code above and just left the custom javascript code (177627 characters long) that it saved it just fine (but of course didn't display properly without the code above).

Can you guys see why this could be happening? It's something with the code above that seems to be causing the problem...
Reply With Quote
  #2  
Old 11-27-2008, 06:59 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The template looks fine to me. When you are talking about adding the javascript, where it that going? Inside the table? It's probably best to put it outside the table after the navbar.

Did you look in your error_log to see if anything was in there after you got the blank screen?
Reply With Quote
  #3  
Old 11-27-2008, 07:55 PM
Joey Link Joey Link is offline
 
Join Date: Aug 2008
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, it goes inside the table. I took it out of the table and just put it in the body, but it still doesn't work.

How can I view the error_log?
Reply With Quote
  #4  
Old 12-05-2008, 06:43 PM
Joey Link Joey Link is offline
 
Join Date: Aug 2008
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So I found the error logs, but there's nothing in any of them.

So, here is the exact code I'm trying to enter into the template. I had to remove some of the actual code to comply with the vb.org 20,000 character limit (actual size is around 195,000 characters), but it's just a repeat of the 'Define Marker' code, which creates each point on the map.

Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="tcat">NorthwestFirearms.com Firearm-Related Resource Map</td>
</tr>
<tr>
<td class="alt1">
<center>
<!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">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>NWFA Resource Map</title>
    <meta name="title" content="MapBuilder - GoogleMap API Source Code Generator." />
    <meta name="description" content="MapBuilder.net lets you tag locations on a map and publish it on your own site. Mapping is now easier than ever. It's free." />
    <meta name="keywords" content="Google Maps API, PHP, AJAX, XML" />
    <meta name="author" content="Andrew Bidochko. http://www.mapbuilder.net" />
    <style type="text/css">
      
      /* Generic map, side bar holder styles */
      .MapBuilder {font: normal small verdana, arial, helvetica, sans-serif; font-size: 10pt; margin: 0px;}
      .MapBuilder a {text-decoration: none; color: #0066CC; background-color: transparent;}
      .MapBuilder a:hover {color: #F60; background-color: transparent;}
      .MapBuilder h1 {font-weight: bold; font-size: 16pt; color: #369; border-bottom: 2px solid #369;}
      
      /* Info Window styles */
      .IW { width: 350px;}
      .IWContent {height: 120px; overflow:auto;}
      .IWCaption {font-weight: bold; font-size: 12pt; color: #369; border-bottom: 2px solid #369;}
      .IWFooter {margin-top: 5px; font-size: 8pt; }
      .IWFooterZoom {}
      .IWDirections{background-color:#FFF;}

 
      .MapBuilderSideBar {float:left; margin-left: 10px; }
 

            /* PDMarker */
      div.markerTooltip {
        color: black;
        background-color: white;
        white-space: nowrap;
        margin: 0;
        padding: 2px 4px;
        border: 1px solid black;
      }
      
    </style>

    <!-- Please, request sign up for your own GMAP KEY at http://www.google.com/apis/maps/signup.html and replace 'GMAPKEY' entry with generated key in the line below. -->
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=YOURGMAPKEY" type="text/javascript"></script>
    <script src="http://www.mapbuilder.net/js/api/google/v2.03/?UserName=joeylink&amp;Map=68322&amp;SideBar=Right" type="text/javascript"></script>
    <script type="text/javascript" src="http://www.mapbuilder.net/libs/pdmarker/pdmarker1.99e_custom.js"></script>
    
    <script type="text/javascript">
    //<![CDATA[

    // Global Variables
    // set map variable
    var map = null;
    //set up array of locations
    var aLocations = new Array;

    /*************************** Configuration Options ***************************/
    /*PDMarker is used to display tooltips when the user hovers over the markers.
    * PDMarker is a LGPL library provided by Peter Jones. 
    * For details see http://wwww.pixeldevelopment.com/pdmarker.asp
    */
    var usePDMarker = true;

    // Create a base "tiny" red  icon that specifies the shadow, icon dimensions, etc.
    var iconsm = new GIcon();
    iconsm.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
    iconsm.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
    iconsm.iconSize = new GSize(12, 20);
    iconsm.shadowSize = new GSize(20, 18);
    iconsm.iconAnchor = new GPoint(6, 20);
    iconsm.infoWindowAnchor = new GPoint(5, 1);

    // Create a base "large" red icon that specifies the shadow, icon dimensions, etc.
    var iconbig = new GIcon();
    iconbig.image = "http://www.google.com/mapfiles/marker.png";
    iconbig.shadow = "http://www.google.com/mapfiles/shadow50.png";
    iconbig.iconSize = new GSize(20, 34);
    iconbig.shadowSize = new GSize(37, 34);
    iconbig.iconAnchor = new GPoint(6, 34);
    iconbig.infoWindowAnchor = new GPoint(5, 1);

    // Custom Icon
    var iconcustom = new GIcon(iconbig);
    iconcustom.shadow = '';

    function onLoad() {
      if (!GBrowserIsCompatible()) 
      {
         document.getElementById("MapBuilderMap").innerHTML = "Unfortunately your browser doesn't support Google Maps.<br /> To check browser compatibility visit the following <a href=\"http://local.google.com/support/bin/answer.py?answer=16532&topic=1499\">link</a>.";
         return;
      }

      map = new GMap2(document.getElementById("MapBuilderMap"));
      var MB = new MapBuilder(map);
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      // Center the map to the default location and set map type
      map.setCenter(new GLatLng(45.506346901083425, -121.17919921875), 6, map.getMapTypes()[0]);
      	  
      // Initialize variables
      var point = null;
      var footerHtml = null;
      var InfoHTML = null;
      var marker = null;
      /* Options used for PDMarker initialization:
      * label: tooltip text
      * opasity: tooltip opasity
      */
      var options = {};

      // Add locations
	
      point = new GLatLng(45.421231, -122.633026);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(0)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Vancouver Trap Club'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Vancouver Trap Club</div><div class=\"IWContent\">11100 NE 76th St<br>Vancouver, WA 98662<br>(360) 892-5005<br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=22\"><br>Click here to review this range</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_red.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 183);
      map.addOverlay(marker);
      aLocations[183] = new Array(marker, "Vancouver Trap Club", InfoHTML, point);
	
      point = new GLatLng(47.623198, -122.159895);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(184)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Wade\'s Eastside Guns & Indoor Range'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Wade's Eastside Guns &amp; Indoor Range</div><div class=\"IWContent\"><div id=\"post_message_1060\"><b><u></u></b>13570 Bellevue-Redmond Rd.<br>Bellevue, WA 98005<br>(425) 649-8560<br><br><a href=\"http://www.wadesguns.com/\" target=\"_blank\">http://www.wadesguns.com</a></div><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=264\"><br>Click here to review this range</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_red.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 184);
      map.addOverlay(marker);
      aLocations[184] = new Array(marker, "Wade's Eastside Guns &amp; Indoor Range", InfoHTML, point);
	
      point = new GLatLng(47.199002, -122.434125);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(185)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Welcher\'s Gun Shop Inc‎'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Welcher's Gun Shop Inc‎</div><div class=\"IWContent\">6400 Pacific Ave<br>Tacoma, WA 98408<br>(253) 472-1113<br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=1676\">Click here to review this business</a></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_blue.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 185);
      map.addOverlay(marker);
      aLocations[185] = new Array(marker, "Welcher's Gun Shop Inc‎", InfoHTML, point);
	
      point = new GLatLng(46.132998, -122.939067);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(186)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'West Coast Loan & Gun Shop'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">West Coast Loan &amp; Gun Shop</div><div class=\"IWContent\">1023 15th Ave<br>Longview, WA 98632<br>(360) 636 -1230‎<br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=100\">Click here to review this business</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_blue.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 186);
      map.addOverlay(marker);
      aLocations[186] = new Array(marker, "West Coast Loan &amp; Gun Shop", InfoHTML, point);
	
      point = new GLatLng(47.88755, -124.344389);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(187)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'West End Sportsmen\'s Club'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">West End Sportsmen's Club</div><div class=\"IWContent\">P.O. Box 1036<br>Forks, WA 98331<br>(360) 374-5420<br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=287\">Click here to review this range</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_red.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 187);
      map.addOverlay(marker);
      aLocations[187] = new Array(marker, "West End Sportsmen's Club", InfoHTML, point);
	
      point = new GLatLng(45.75521769752324, -123.4192943572998);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(188)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Wheeler Road'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Wheeler Road</div><div class=\"IWContent\"><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=107\">Click here to discuss this location</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_green.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 188);
      map.addOverlay(marker);
      aLocations[188] = new Array(marker, "Wheeler Road", InfoHTML, point);
	
      point = new GLatLng(45.147382, -122.57709);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(189)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Wild Bill\'s Guns'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Wild Bill's Guns</div><div class=\"IWContent\"><div id=\"post_message_24\">105 S Molalla Ave<br>Molalla, OR 97038<br>(503) 829-5153<br><br><a href=\"http://www.wildbillsguns.com/\" target=\"_blank\">http://www.wildbillsguns.com</a><br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=23\">Click here to review this business</a><br></div></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_blue.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 189);
      map.addOverlay(marker);
      aLocations[189] = new Array(marker, "Wild Bill's Guns", InfoHTML, point);
	
      point = new GLatLng(45.989084, -122.350845);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(190)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Wolverton Mountain Gun Club - Ariel'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Wolverton Mountain Gun Club - Ariel</div><div class=\"IWContent\">243 Williams Road<br>Ariel, WA‎ 98603<br>(360) 887-0696‎<br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?p=1058#post1058\">Click here to review this range</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_red.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 190);
      map.addOverlay(marker);
      aLocations[190] = new Array(marker, "Wolverton Mountain Gun Club - Ariel", InfoHTML, point);
	
      point = new GLatLng(45.648101, -122.519212);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(191)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Wolverton Mountain Gun Club‎ - Vancouver'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Wolverton Mountain Gun Club‎ - Vancouver</div><div class=\"IWContent\">14904 NE Orion St<br>Vancouver, WA 98682<br>(360) 513-9081<br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?p=224#post224\">Click here to review this range</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_red.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 191);
      map.addOverlay(marker);
      aLocations[191] = new Array(marker, "Wolverton Mountain Gun Club‎ - Vancouver", InfoHTML, point);
	
      point = new GLatLng(45.20894, -123.199129);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(192)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Yamhill County Sportsmen\'s Association'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Yamhill County Sportsmen's Association</div><div class=\"IWContent\">PO Box 1265<br>McMinnville, OR 97128<br>(503) 434-9751<br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=239\">Click here to review this range</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_red.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 192);
      map.addOverlay(marker);
      aLocations[192] = new Array(marker, "Yamhill County Sportsmen's Association", InfoHTML, point);
      // And finnaly create sidebar
      createSideBar();
    }

    //]]>
    </script>
  </head>
  <body onload="onLoad()" onunload="GUnload();">
	<div id="MapBuilder" class="MapBuilder">
      <h1>NWFA Resource Map</h1>
      <p>NorthwestFirearms.com Firearm-Related Resource Map</p>
 
      <div id="MapHolder" class="MapHolder" style="float:left;">
        <div id="MapBuilderMap" style="width: 1024px; height: 768px;"></div>
        <!-- Please KEEP RESPECT to MapBuilder.net team and DO NOT DELETE line below if you want to keep MapBuilder service free. -->
        Created by <a href="http://www.MapBuilder.net">MapBuilder.net</a>.
      </div>
 
      <div id="MapBuilderSideBar" class="MapBuilderSideBar">
        <div id="SideBarAction">Map Locations [<a id="SideBarActionLink" href="javascript:void(0)" onclick="ProcessLocationList()">-</a>]</div>
        <div id="LocationList" style="height: 748px; overflow:auto;"></div>
      </div>
 
    </div>
  </body>
</html>


<center>
</td>
</tr>
</table>


$footer
</body>
</html>
Now, when I take out any of the variables but leave everything else, it saves just fine. If I ad a single variable, such as $header, it won't save properly. However, if the total number of characters is less than 170,000 or so, it saves just fine, variables and all. This is *really* odd to me
Reply With Quote
  #5  
Old 12-05-2008, 07:04 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your problem is you are putting a whole new page in the middle of the existing page. An html document consists of a <doctype><html><head></head><body></body></html>. You must integrate all the head stuff into one head area and all the body stuff into one body area and only have one doctype and one html. In other words, your html is totally invalid.
Reply With Quote
  #6  
Old 12-05-2008, 07:37 PM
Joey Link Joey Link is offline
 
Join Date: Aug 2008
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That was my theory I came up with last night, but even when I condensed the code it didn't save properly, as long as those variables were in there.

When I reduced the number of characters by removing some of the 'define marker' entries, it saved and displayed exactly as it should have.

--------------- Added [DATE]1228514361[/DATE] at [TIME]1228514361[/TIME] ---------------

Here's the integrated code, which doesn't work either. Maybe I'm missing something?

Code:
<!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" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
$stylevar[htmldoctype]

  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>$vboptions[bbtitle]</title>
    <meta name="title" content="MapBuilder - GoogleMap API Source Code Generator." />
    <meta name="description" content="MapBuilder.net lets you tag locations on a map and publish it on your own site. Mapping is now easier than ever. It's free." />
    <meta name="keywords" content="Google Maps API, PHP, AJAX, XML" />
    <meta name="author" content="Andrew Bidochko. http://www.mapbuilder.net" />
    <style type="text/css">
      
      /* Generic map, side bar holder styles */
      .MapBuilder {font: normal small verdana, arial, helvetica, sans-serif; font-size: 10pt; margin: 0px;}
      .MapBuilder a {text-decoration: none; color: #0066CC; background-color: transparent;}
      .MapBuilder a:hover {color: #F60; background-color: transparent;}
      .MapBuilder h1 {font-weight: bold; font-size: 16pt; color: #369; border-bottom: 2px solid #369;}
      
      /* Info Window styles */
      .IW { width: 350px;}
      .IWContent {height: 120px; overflow:auto;}
      .IWCaption {font-weight: bold; font-size: 12pt; color: #369; border-bottom: 2px solid #369;}
      .IWFooter {margin-top: 5px; font-size: 8pt; }
      .IWFooterZoom {}
      .IWDirections{background-color:#FFF;}

 
      .MapBuilderSideBar {float:left; margin-left: 10px; }
 

            /* PDMarker */
      div.markerTooltip {
        color: black;
        background-color: white;
        white-space: nowrap;
        margin: 0;
        padding: 2px 4px;
        border: 1px solid black;
      }
      
    </style>

    <!-- Please, request sign up for your own GMAP KEY at http://www.google.com/apis/maps/signup.html and replace 'GMAPKEY' entry with generated key in the line below. -->
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=YOURGMAPKEY" type="text/javascript"></script>
    <script src="http://www.mapbuilder.net/js/api/google/v2.03/?UserName=joeylink&amp;Map=68322&amp;SideBar=Right" type="text/javascript"></script>
    <script type="text/javascript" src="http://www.mapbuilder.net/libs/pdmarker/pdmarker1.99e_custom.js"></script>
    
    <script type="text/javascript">
    //<![CDATA[

    // Global Variables
    // set map variable
    var map = null;
    //set up array of locations
    var aLocations = new Array;

    /*************************** Configuration Options ***************************/
    /*PDMarker is used to display tooltips when the user hovers over the markers.
    * PDMarker is a LGPL library provided by Peter Jones. 
    * For details see http://wwww.pixeldevelopment.com/pdmarker.asp
    */
    var usePDMarker = true;

    // Create a base "tiny" red  icon that specifies the shadow, icon dimensions, etc.
    var iconsm = new GIcon();
    iconsm.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
    iconsm.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
    iconsm.iconSize = new GSize(12, 20);
    iconsm.shadowSize = new GSize(20, 18);
    iconsm.iconAnchor = new GPoint(6, 20);
    iconsm.infoWindowAnchor = new GPoint(5, 1);

    // Create a base "large" red icon that specifies the shadow, icon dimensions, etc.
    var iconbig = new GIcon();
    iconbig.image = "http://www.google.com/mapfiles/marker.png";
    iconbig.shadow = "http://www.google.com/mapfiles/shadow50.png";
    iconbig.iconSize = new GSize(20, 34);
    iconbig.shadowSize = new GSize(37, 34);
    iconbig.iconAnchor = new GPoint(6, 34);
    iconbig.infoWindowAnchor = new GPoint(5, 1);

    // Custom Icon
    var iconcustom = new GIcon(iconbig);
    iconcustom.shadow = '';

    function onLoad() {
      if (!GBrowserIsCompatible()) 
      {
         document.getElementById("MapBuilderMap").innerHTML = "Unfortunately your browser doesn't support Google Maps.<br /> To check browser compatibility visit the following <a href=\"http://local.google.com/support/bin/answer.py?answer=16532&topic=1499\">link</a>.";
         return;
      }

      map = new GMap2(document.getElementById("MapBuilderMap"));
      var MB = new MapBuilder(map);
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      // Center the map to the default location and set map type
      map.setCenter(new GLatLng(45.506346901083425, -121.17919921875), 6, map.getMapTypes()[0]);
      	  
      // Initialize variables
      var point = null;
      var footerHtml = null;
      var InfoHTML = null;
      var marker = null;
      /* Options used for PDMarker initialization:
      * label: tooltip text
      * opasity: tooltip opasity
      */
      var options = {};

      // Add locations
	
      point = new GLatLng(45.421231, -122.633026);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(0)\">Zoom To</a></div></div>";


      // Define Marker
      options = {opasity: 100, label:'Upper Nisqually Sportsman Club'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Upper Nisqually Sportsman Club</div><div class=\"IWContent\"><div id=\"post_message_1079\">39919 129th Ave E<br>Eatonville, WA 98328<br>(360) 832-8727<br><br><a href=\"http://www.uppernisquallysportsmanclub.com/\" target=\"_blank\">http://www.uppernisquallysportsmanclub.com</a><br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=281\">Click here to review this range</a><br></div></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_red.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 181);
      map.addOverlay(marker);
      aLocations[181] = new Array(marker, "Upper Nisqually Sportsman Club", InfoHTML, point);
	
      point = new GLatLng(45.677528, -122.547055);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(182)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Vancouver Rifle & Pistol Club'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Vancouver Rifle &amp; Pistol Club</div><div class=\"IWContent\">12211 NE 76th St<br>Vancouver, WA 98682<br>(360) 253-9651<br><br><a href=\"http://vrpc.us/\" target=\"_blank\">http://vrpc.us</a><br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=21\">Click here to review this range</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_red.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 182);
      map.addOverlay(marker);
      aLocations[182] = new Array(marker, "Vancouver Rifle &amp; Pistol Club", InfoHTML, point);
	
      point = new GLatLng(45.677914, -122.558066);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(183)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Vancouver Trap Club'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Vancouver Trap Club</div><div class=\"IWContent\">11100 NE 76th St<br>Vancouver, WA 98662<br>(360) 892-5005<br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=22\"><br>Click here to review this range</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_red.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 183);
      map.addOverlay(marker);
      aLocations[183] = new Array(marker, "Vancouver Trap Club", InfoHTML, point);
	
      point = new GLatLng(47.623198, -122.159895);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(184)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Wade\'s Eastside Guns & Indoor Range'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Wade's Eastside Guns &amp; Indoor Range</div><div class=\"IWContent\"><div id=\"post_message_1060\"><b><u></u></b>13570 Bellevue-Redmond Rd.<br>Bellevue, WA 98005<br>(425) 649-8560<br><br><a href=\"http://www.wadesguns.com/\" target=\"_blank\">http://www.wadesguns.com</a></div><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=264\"><br>Click here to review this range</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_red.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 184);
      map.addOverlay(marker);
      aLocations[184] = new Array(marker, "Wade's Eastside Guns &amp; Indoor Range", InfoHTML, point);
	
      point = new GLatLng(47.199002, -122.434125);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(185)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Welcher\'s Gun Shop Inc‎'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Welcher's Gun Shop Inc‎</div><div class=\"IWContent\">6400 Pacific Ave<br>Tacoma, WA 98408<br>(253) 472-1113<br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=1676\">Click here to review this business</a></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_blue.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 185);
      map.addOverlay(marker);
      aLocations[185] = new Array(marker, "Welcher's Gun Shop Inc‎", InfoHTML, point);
	
      point = new GLatLng(46.132998, -122.939067);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(186)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'West Coast Loan & Gun Shop'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">West Coast Loan &amp; Gun Shop</div><div class=\"IWContent\">1023 15th Ave<br>Longview, WA 98632<br>(360) 636 -1230‎<br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=100\">Click here to review this business</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_blue.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 186);
      map.addOverlay(marker);
      aLocations[186] = new Array(marker, "West Coast Loan &amp; Gun Shop", InfoHTML, point);
	
      point = new GLatLng(47.88755, -124.344389);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(187)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'West End Sportsmen\'s Club'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">West End Sportsmen's Club</div><div class=\"IWContent\">P.O. Box 1036<br>Forks, WA 98331<br>(360) 374-5420<br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=287\">Click here to review this range</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_red.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 187);
      map.addOverlay(marker);
      aLocations[187] = new Array(marker, "West End Sportsmen's Club", InfoHTML, point);
	
      point = new GLatLng(45.75521769752324, -123.4192943572998);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(188)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Wheeler Road'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Wheeler Road</div><div class=\"IWContent\"><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=107\">Click here to discuss this location</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_green.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 188);
      map.addOverlay(marker);
      aLocations[188] = new Array(marker, "Wheeler Road", InfoHTML, point);
	
      point = new GLatLng(45.147382, -122.57709);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(189)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Wild Bill\'s Guns'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Wild Bill's Guns</div><div class=\"IWContent\"><div id=\"post_message_24\">105 S Molalla Ave<br>Molalla, OR 97038<br>(503) 829-5153<br><br><a href=\"http://www.wildbillsguns.com/\" target=\"_blank\">http://www.wildbillsguns.com</a><br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=23\">Click here to review this business</a><br></div></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_blue.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 189);
      map.addOverlay(marker);
      aLocations[189] = new Array(marker, "Wild Bill's Guns", InfoHTML, point);
	
      point = new GLatLng(45.989084, -122.350845);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(190)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Wolverton Mountain Gun Club - Ariel'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Wolverton Mountain Gun Club - Ariel</div><div class=\"IWContent\">243 Williams Road<br>Ariel, WA‎ 98603<br>(360) 887-0696‎<br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?p=1058#post1058\">Click here to review this range</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_red.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 190);
      map.addOverlay(marker);
      aLocations[190] = new Array(marker, "Wolverton Mountain Gun Club - Ariel", InfoHTML, point);
	
      point = new GLatLng(45.648101, -122.519212);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(191)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Wolverton Mountain Gun Club‎ - Vancouver'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Wolverton Mountain Gun Club‎ - Vancouver</div><div class=\"IWContent\">14904 NE Orion St<br>Vancouver, WA 98682<br>(360) 513-9081<br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?p=224#post224\">Click here to review this range</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_red.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 191);
      map.addOverlay(marker);
      aLocations[191] = new Array(marker, "Wolverton Mountain Gun Club‎ - Vancouver", InfoHTML, point);
	
      point = new GLatLng(45.20894, -123.199129);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(192)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Yamhill County Sportsmen\'s Association'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Yamhill County Sportsmen's Association</div><div class=\"IWContent\">PO Box 1265<br>McMinnville, OR 97128<br>(503) 434-9751<br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=239\">Click here to review this range</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_red.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 192);
      map.addOverlay(marker);
      aLocations[192] = new Array(marker, "Yamhill County Sportsmen's Association", InfoHTML, point);
      // And finnaly create sidebar
      createSideBar();
    }

    //]]>
    </script>
$headinclude
  </head>
  <body onload="onLoad()" onunload="GUnload();">


<body>
$header

$navbar

	<div id="MapBuilder" class="MapBuilder">
      <h1>NWFA Resource Map</h1>
      <p>NorthwestFirearms.com Firearm-Related Resource Map</p>
 
      <div id="MapHolder" class="MapHolder" style="float:left;">
        <div id="MapBuilderMap" style="width: 1024px; height: 768px;"></div>
        <!-- Please KEEP RESPECT to MapBuilder.net team and DO NOT DELETE line below if you want to keep MapBuilder service free. -->
        Created by <a href="http://www.MapBuilder.net">MapBuilder.net</a>.
      </div>
 
      <div id="MapBuilderSideBar" class="MapBuilderSideBar">
        <div id="SideBarAction">Map Locations [<a id="SideBarActionLink" href="javascript:void(0)" onclick="ProcessLocationList()">-</a>]</div>
        <div id="LocationList" style="height: 748px; overflow:auto;"></div>
      </div>
 
    </div>

$footer

  </body>
</html>
Reply With Quote
  #7  
Old 12-05-2008, 10:40 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You still have two <body> tags. Other than that, I'm not sure why it won't work but I'm not javascript person and so I can't look over that part of your code at all.
Reply With Quote
  #8  
Old 12-06-2008, 07:01 AM
Joey Link Joey Link is offline
 
Join Date: Aug 2008
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah, good eye. Unfortunately, it still didn't fix it. It's really odd because if I save just the HTML without the variables it saves perfectly, but with the variables to integrate it I'm unable to save it if it's over say, 170k characters.

As a test, to see if it's something with the code I'm trying to input or something else, maybe I'll just copy and paste until I'm up to around 200k characters in the <custom html goes here> area, then try saving it. How many things can this possibly be? Could it be a vB bug?
Reply With Quote
  #9  
Old 12-06-2008, 04:20 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why not put it all in a file and then just include the file - that's what I do when I add javascript to a page. I have this in the body area for some javascript I need on my showthread page:

HTML Code:
<script type="text/javascript" src="clientscript/ls_showthread.js"></script>
Reply With Quote
  #10  
Old 12-06-2008, 06:08 PM
Joey Link Joey Link is offline
 
Join Date: Aug 2008
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great idea. Is there anything special I need to do or do I just edit that code you posted to reflect the path and name of my script, edit the template and place the script code in my template, put the code in the javascript file, then upload it? I tried it, but it didn't display anything at all. Here's what I did, and I know the paths are correct. My guess is the content in the map.js file has to be formatted differently? or can I just put it in there as it is?

My Template:

Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="tcat">NorthwestFirearms.com Firearm-Related Resource Map</td>
</tr>
<tr>
<td class="alt1">

<script type="text/javascript" src="scripts/map.js"></script>

</td>
</tr>
</table>


$footer
</body>
</html>
Here's what I put in the map.js, obviously with all the points which I edited out here to save space:

Code:
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>NWFA Resource Map</title>
    <meta name="title" content="MapBuilder - GoogleMap API Source Code Generator." />
    <meta name="description" content="MapBuilder.net lets you tag locations on a map and publish it on your own site. Mapping is now easier than ever. It's free." />
    <meta name="keywords" content="Google Maps API, PHP, AJAX, XML" />
    <meta name="author" content="Andrew Bidochko. http://www.mapbuilder.net" />
    <style type="text/css">
      
      /* Generic map, side bar holder styles */
      .MapBuilder {font: normal small verdana, arial, helvetica, sans-serif; font-size: 10pt; margin: 0px;}
      .MapBuilder a {text-decoration: none; color: #0066CC; background-color: transparent;}
      .MapBuilder a:hover {color: #F60; background-color: transparent;}
      .MapBuilder h1 {font-weight: bold; font-size: 16pt; color: #369; border-bottom: 2px solid #369;}
      
      /* Info Window styles */
      .IW { width: 350px;}
      .IWContent {height: 120px; overflow:auto;}
      .IWCaption {font-weight: bold; font-size: 12pt; color: #369; border-bottom: 2px solid #369;}
      .IWFooter {margin-top: 5px; font-size: 8pt; }
      .IWFooterZoom {}
      .IWDirections{background-color:#FFF;}

 
      .MapBuilderSideBar {float:left; margin-left: 10px; }
 

            /* PDMarker */
      div.markerTooltip {
        color: black;
        background-color: white;
        white-space: nowrap;
        margin: 0;
        padding: 2px 4px;
        border: 1px solid black;
      }
      
    </style>

    <!-- Please, request sign up for your own GMAP KEY at http://www.google.com/apis/maps/signup.html and replace 'GMAPKEY' entry with generated key in the line below. -->
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=YOURGMAPKEY" type="text/javascript"></script>
    <script src="http://www.mapbuilder.net/js/api/google/v2.03/?UserName=joeylink&amp;Map=68322&amp;SideBar=Right" type="text/javascript"></script>
    <script type="text/javascript" src="http://www.mapbuilder.net/libs/pdmarker/pdmarker1.99e_custom.js"></script>
    
    <script type="text/javascript">
    //<![CDATA[

    // Global Variables
    // set map variable
    var map = null;
    //set up array of locations
    var aLocations = new Array;

    /*************************** Configuration Options ***************************/
    /*PDMarker is used to display tooltips when the user hovers over the markers.
    * PDMarker is a LGPL library provided by Peter Jones. 
    * For details see http://wwww.pixeldevelopment.com/pdmarker.asp
    */
    var usePDMarker = true;

    // Create a base "tiny" red  icon that specifies the shadow, icon dimensions, etc.
    var iconsm = new GIcon();
    iconsm.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
    iconsm.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
    iconsm.iconSize = new GSize(12, 20);
    iconsm.shadowSize = new GSize(20, 18);
    iconsm.iconAnchor = new GPoint(6, 20);
    iconsm.infoWindowAnchor = new GPoint(5, 1);

    // Create a base "large" red icon that specifies the shadow, icon dimensions, etc.
    var iconbig = new GIcon();
    iconbig.image = "http://www.google.com/mapfiles/marker.png";
    iconbig.shadow = "http://www.google.com/mapfiles/shadow50.png";
    iconbig.iconSize = new GSize(20, 34);
    iconbig.shadowSize = new GSize(37, 34);
    iconbig.iconAnchor = new GPoint(6, 34);
    iconbig.infoWindowAnchor = new GPoint(5, 1);

    // Custom Icon
    var iconcustom = new GIcon(iconbig);
    iconcustom.shadow = '';

    function onLoad() {
      if (!GBrowserIsCompatible()) 
      {
         document.getElementById("MapBuilderMap").innerHTML = "Unfortunately your browser doesn't support Google Maps.<br /> To check browser compatibility visit the following <a href=\"http://local.google.com/support/bin/answer.py?answer=16532&topic=1499\">link</a>.";
         return;
      }

      map = new GMap2(document.getElementById("MapBuilderMap"));
      var MB = new MapBuilder(map);
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      // Center the map to the default location and set map type
      map.setCenter(new GLatLng(45.506346901083425, -121.17919921875), 6, map.getMapTypes()[0]);
      	  
      // Initialize variables
      var point = null;
      var footerHtml = null;
      var InfoHTML = null;
      var marker = null;
      /* Options used for PDMarker initialization:
      * label: tooltip text
      * opasity: tooltip opasity
      */
      var options = {};

      // Add locations
	
      point = new GLatLng(45.421231, -122.633026);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(0)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'99 Gun\'s & Loan'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">99 Gun's &amp; Loan</div><div class=\"IWContent\"><div id=\"post_message_178\">14110 SE Mcloughlin Blvd # 3<br>Milwaukie, OR 97267<br>(503) 353-0783<br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=61\"><br>Click here to review this business</a><br><a href=\"http://www.99guns.com/\" target=\"_blank\"><br></a></div></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_blue.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 0);
      map.addOverlay(marker);
      aLocations[0] = new Array(marker, "99 Gun's &amp; Loan", InfoHTML, point);
	
      point = new GLatLng(47.81831, -122.313195);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(1)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'AR Pawn'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">AR Pawn</div><div class=\"IWContent\"><div id=\"post_message_187\">8506 SE Foster Rd<br>Portland, OR 97266<br><br><a href=\"http://www.arpawn.com/\" target=\"_blank\">http://www.arpawn.com</a><br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=66\">Click here to review this business</a><br></div></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_blue.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 8);
      map.addOverlay(marker);
      aLocations[8] = new Array(marker, "AR Pawn", InfoHTML, point);
	
      point = new GLatLng(42.187966, -122.646299);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(9)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Ashland Gun Club'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Ashland Gun Club</div><div class=\"IWContent\">Emigrant Creek Rd.<br>Ashland, OR 97520<br>(541) 482-0641<br><br><a href=\"http://ashlandgunclub.net/\" target=\"_blank\">http://ashlandgunclub.net</a><br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=211\">Click here to review this range</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_red.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 9);
      map.addOverlay(marker);
      aLocations[9] = new Array(marker, "Ashland Gun Club", InfoHTML, point);
	
      point = new GLatLng(47.695596, -117.411402);
      footerHtml = "<div class=\"IWFooter\"><div class=\"IWFooterZoom\"><a href=\"javascript:void(0)\" onclick=\"ZoomMapTo(10)\">Zoom To</a></div></div>";

      // Define Marker
      options = {opasity: 100, label:'Yamhill County Sportsmen\'s Association'}; 
      InfoHTML = "<div class=\"IW\"><div class=\"IWCaption\">Yamhill County Sportsmen's Association</div><div class=\"IWContent\">PO Box 1265<br>McMinnville, OR 97128<br>(503) 434-9751<br><br><a target=\"_self\" href=\"http://www.northwestfirearms.com/forum/showthread.php?t=239\">Click here to review this range</a><br></div>" + footerHtml + "</div>";
      iconbig.image = "http://www.mapbuilder.net/img/icons/marker_34_red.png";
      marker = createMarker(point, InfoHTML, iconbig, options, 192);
      map.addOverlay(marker);
      aLocations[192] = new Array(marker, "Yamhill County Sportsmen's Association", InfoHTML, point);
      // And finnaly create sidebar
      createSideBar();
    }

    //]]>
    </script>
  </head>
  <body onload="onLoad()" onunload="GUnload();">
	<div id="MapBuilder" class="MapBuilder">
      <h1>NWFA Resource Map</h1>
      <p>NorthwestFirearms.com Firearm-Related Resource Map</p>
 
      <div id="MapHolder" class="MapHolder" style="float:left;">
        <div id="MapBuilderMap" style="width: 1024px; height: 768px;"></div>
        <!-- Please KEEP RESPECT to MapBuilder.net team and DO NOT DELETE line below if you want to keep MapBuilder service free. -->
        Created by <a href="http://www.MapBuilder.net">MapBuilder.net</a>.
      </div>
 
      <div id="MapBuilderSideBar" class="MapBuilderSideBar">
        <div id="SideBarAction">Map Locations [<a id="SideBarActionLink" href="javascript:void(0)" onclick="ProcessLocationList()">-</a>]</div>
        <div id="LocationList" style="height: 748px; overflow:auto;"></div>
      </div>
 
    </div>
  </body>
</html>
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 07:12 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04350 seconds
  • Memory Usage 2,374KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_code
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete