Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

[SOLVED] Google Maps still loading even if disabled through CSS and PHP code...


  #1  
Old May 7, 2010, 06:10 PM
Kirpega
 
2 posts · Apr 2010
Hi!

With XMLGoogleMaps plugin I wanted to show different KML maps depending of the loaded page.
I then created some Divs (containings IFrames to GMaps) which are switched on and off via the CSS (CSS Inserts section), as shown here below.

Code:
body div#intestazione_mappa_siti {display:none;}
body.page-id-352 div#imagecontainer {display:none;}
body.page-id-352 div#intestazione_mappa_siti {display:inline;}

body div#intestazione_mappa_musei {display:none;}
body.page-id-353 div#imagecontainer {display:none;}
body.page-id-353 div#intestazione_mappa_musei {display:inline;}
I noticed, though, that this procedure was functioning, but the Iframe was still being "processed" and loaded, even if not visualized, so slowing the loading of the page.

I then add some PHP code (below) in the "Style and Edit Header Area" thinking that this would have completely hided the unwanted code, but it didn't happen.
When loading the page, it still makes some kind of reference to Google Maps, as I see in the status bar.

Code:
%logo %image 

<?php
$url = sprintf(“%s%s%s”,”http://”,$HTTP_HOST,$REQUEST_URI );
if $url == "http://www.archeoveneto.lettere.unipd.it/portale/?page_id=352"
{
?>
<div id="intestazione_mappa_siti">
<iframe id="xmlgm_6" src="http://www.archeoveneto.lettere.unipd.it/portale/wp-content/plugins/xml-google-maps/xmlgooglemaps_show.php?kmlid=6" style="border: 0px; width: 960px; height: 430px;" name="Google_KML_Maps" frameborder="0"></iframe> </div>
<?php
elseif $url == "http://www.archeoveneto.lettere.unipd.it/portale/?page_id=353"
{
?>
<div id="intestazione_mappa_musei">
<iframe id="xmlgm_7" src="http://www.archeoveneto.lettere.unipd.it/portale/wp-content/plugins/xml-google-maps/xmlgooglemaps_show.php?kmlid=7" style="border: 0px; width: 960px; height: 430px;" name="Google_KML_Maps" frameborder="0"></iframe>
</div>
<?php
}
else {
?>
<div id="intestazione_mappa_siti">&nbsp</div>
<div id="intestazione_mappa_musei">&nbsp</div>
<?php
}
?>

%pages %bar1
The loading time now is, actually, very faster and acceptable, but I'd like to understand the reason of this behaviour and how to avoid it.

Thank you in advance for any hints!

PHK
  #2  
Old May 7, 2010, 11:12 PM
Kirpega
 
2 posts · Apr 2010
SOLVED!

IFrame "in" the Header: this is it...

CSS Insert
Code:
body.page-id-352 div#imagecontainer {display:none;}
body.page-id-353 div#imagecontainer {display:none;}
HEADER Area
Code:
<?php $url = get_permalink(); ?>

<?php
$paginasiti = 'http://www.archeoveneto.lettere.unipd.it/portale/?page_id=352';
$paginamusei = 'http://www.archeoveneto.lettere.unipd.it/portale/?page_id=353';

if ($paginasiti == $url) {
$mappa = '<iframe id="xmlgm_6" src="http://www.archeoveneto.lettere.unipd.it/portale/wp-content/plugins/xml-google-maps/xmlgooglemaps_show.php?kmlid=6" style="border: 0px; width: 960px; height: 430px;" name="Google_KML_Maps" frameborder="0"></iframe>';

} elseif ($paginamusei == $url) {
$mappa = '<iframe id="xmlgm_7" src="http://www.archeoveneto.lettere.unipd.it/portale/wp-content/plugins/xml-google-maps/xmlgooglemaps_show.php?kmlid=7" style="border: 0px; width: 960px; height: 430px;" name="Google_KML_Maps" frameborder="0"></iframe>';

}  else {
$mappa = ' ' ;
} 

echo $mappa;

?>

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inline Google Maps compatibility redwagon Plugins & Atahualpa 13 Oct 11, 2011 05:01 AM
Google Maps and IE8 johndh Plugins & Atahualpa 13 Mar 2, 2010 01:04 AM
[SOLVED] Plug-in, CSS or PHP Code for Expanding Definition List in Atahualpa ? RAMilewski Atahualpa 3 Wordpress theme 1 Aug 16, 2009 02:44 AM
How Do I Get Google Maps working in Wordpress jwalsh@walshs.ie Plugins & Atahualpa 2 Jul 8, 2009 08:41 AM
google maps not working tomhypno Plugins & Atahualpa 2 Jun 6, 2009 07:24 AM


All times are GMT -6. The time now is 12:03 AM.


Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.