Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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, 07: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 8, 2010, 12:12 AM
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



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


All times are GMT -6. The time now is 02:21 PM.


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