The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
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> Can you guys see why this could be happening? It's something with the code above that seems to be causing the problem... |
#2
|
||||
|
||||
![]()
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? |
#3
|
|||
|
|||
![]()
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? |
#4
|
|||
|
|||
![]()
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&v=2&key=YOURGMAPKEY" type="text/javascript"></script> <script src="http://www.mapbuilder.net/js/api/google/v2.03/?UserName=joeylink&Map=68322&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 & 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 & 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 & 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 & 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> ![]() |
#5
|
||||
|
||||
![]()
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.
|
#6
|
|||
|
|||
![]()
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&v=2&key=YOURGMAPKEY" type="text/javascript"></script> <script src="http://www.mapbuilder.net/js/api/google/v2.03/?UserName=joeylink&Map=68322&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 & 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 & 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 & 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 & 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 & 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 & 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> |
#7
|
||||
|
||||
![]()
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.
|
#8
|
|||
|
|||
![]()
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? |
#9
|
||||
|
||||
![]()
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> |
#10
|
|||
|
|||
![]()
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> 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&v=2&key=YOURGMAPKEY" type="text/javascript"></script> <script src="http://www.mapbuilder.net/js/api/google/v2.03/?UserName=joeylink&Map=68322&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 & 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 & 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> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|