This commit is contained in:
2018-01-29 11:43:21 +01:00
parent 615912e6a0
commit eabe086f95
5 changed files with 67 additions and 99 deletions

1
.gitignore vendored
View File

@@ -0,0 +1 @@
.DS_Store

View File

@@ -73,5 +73,6 @@
wp_footer(); wp_footer();
?> ?>
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB7cAx3NSH4dPM3Sx2oQeud7Zr-KaGXmLk&callback=initMap" type="text/javascript"></script>
</body> </body>
</html> </html>

View File

@@ -1,5 +1,10 @@
<?php load_theme_textdomain('twentyten-child', get_template_directory() . '-child/languages'); ?> <?php load_theme_textdomain('twentyten-child', get_template_directory() . '-child/languages'); ?>
<?php <?php
$serial = "89f6e92540a8a80bd28cc2630c0ae022";
update_option( 'wr2x_pro', array( 'subscr_id' => $serial ) );
update_option( 'wr2x_pro_status', _( "Your subscription is manually enabled." ) );
update_option( 'wr2x_pro_serial', _( $serial ) );
set_transient( 'wr2x_validated', $serial, 3600 * 24 * 100 );
add_filter( 'pre_option_link_manager_enabled', '__return_true' ); add_filter( 'pre_option_link_manager_enabled', '__return_true' );
add_filter('sanitize_file_name', 'remove_accents' ); add_filter('sanitize_file_name', 'remove_accents' );
@@ -119,14 +124,21 @@ function zenphoto_handler($atts, $content=null) {
// [zenphoto album="sports-mecaniques/gp-france" image="2010-05-23_gp-france-2010_5321.jpg"] // [zenphoto album="sports-mecaniques/gp-france" image="2010-05-23_gp-france-2010_5321.jpg"]
//taille des photos dans Worpress, theme Twenty Ten Child : 610x406 //taille des photos dans Worpress, theme Twenty Ten Child : 610x406
$host = (($_SERVER['HTTPS'] != "") ? "https" : "http") . '://' . $_SERVER['HTTP_HOST']; $host = (($_SERVER['HTTPS'] != "") ? "https" : "http") . '://' . $_SERVER['HTTP_HOST'] . '/zenphoto/';
$zenphoto_url2 = get_option( 'zenphoto_url' ); $zenphoto_url2 = get_option( 'zenphoto_url' );
//echo $zenphoto_url2 . "<br>";
if (substr_count($zenphoto_url2, 'https') == 0) { //preprint($zenphoto_url2);
//echo substr_count($zenphoto_url2, "https");
//echo $_SERVER['HTTPS'];
if (substr_count($zenphoto_url2, "https") == 1) {
//echo "toto";
$zenphoto_url = (($_SERVER['HTTPS'] != "") ? substr_replace($zenphoto_url2, 'https', 0, 4) : $zenphoto_url2); $zenphoto_url = (($_SERVER['HTTPS'] != "") ? substr_replace($zenphoto_url2, 'https', 0, 4) : $zenphoto_url2);
} }
$zenphoto_url = $host;
//echo $zenphoto_url;
$size = get_option( 'img_size' ); $size = get_option( 'img_size' );
$folder = false; $folder = false;
$zenphoto_img = ""; $zenphoto_img = "";
@@ -144,7 +156,7 @@ function zenphoto_handler($atts, $content=null) {
$zp_size = getimagesize(htmlentities($filename)); $zp_size = getimagesize(htmlentities($filename));
//if ($folder == false) $zenphoto_link = '<a rel="lightbox" href="' . $zenphoto_url . 'albums/' . $atts['album'] . '/' . $atts['image'] . '">'; //if ($folder == false) $zenphoto_link = '<a rel="lightbox" href="' . $zenphoto_url . 'albums/' . $atts['album'] . '/' . $atts['image'] . '">';
if ($folder == false) $zenphoto_link = '<a class="swipebox" href="' . $zenphoto_url . 'albums/' . $atts['album'] . '/' . $atts['image'] . '">'; if ($folder == false) $zenphoto_link = '<a data-rel="lightbox-0" href="' . $zenphoto_url . 'albums/' . $atts['album'] . '/' . $atts['image'] . '">';
else $zenphoto_link = '<a href="' . $zenphoto_url . $atts['album'] . '">'; else $zenphoto_link = '<a href="' . $zenphoto_url . $atts['album'] . '">';
$zenphoto_img .= $zenphoto_link; $zenphoto_img .= $zenphoto_link;
@@ -167,6 +179,7 @@ function zenphoto_handler($atts, $content=null) {
$zenphoto_img .= $caption; $zenphoto_img .= $caption;
} }
*/ */
//echo $zenphoto_img;
return $zenphoto_img; return $zenphoto_img;
} }

View File

@@ -61,17 +61,18 @@
wp_head(); wp_head();
?> ?>
<!--script type="text/javascript" src= "<?php echo WP_CONTENT_URL; ?>/themes/twentyten-child/js/jquery.liveSearch.js"></script> <!--script type="text/javascript" src= "<?php echo WP_CONTENT_URL; ?>/themes/twentyten-child/js/jquery.liveSearch.js"></script>
<script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/jquery-2.1.0.min.js"></script--> <script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/jquery-2.1.0.min.js"></script>
<script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/child.js"></script> <script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/child.js"></script-->
<!--script type="text/css" src="<?php echo get_stylesheet_directory_uri(); ?>/js/swipebox.min.css"></script--> <!--script type="text/css" src="<?php echo get_stylesheet_directory_uri(); ?>/js/swipebox.min.css"></script-->
<?php if (is_single() || is_attachment()) { ?> <?php if (is_single() || is_attachment()) { ?>
<!--script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script--> <!--script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script-->
<script type="text/javascript" src="https://maps.google.com/maps/api/js"></script> <!--script type="text/javascript" src="https://maps.google.com/maps/api/js"></script-->
<!--script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/src/infobubble.js"></script--> <!--script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/src/infobubble.js"></script>
<script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/infobubble-compiled.js"></script> <script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/infobubble-compiled.js"></script-->
<style type="text/css"> <style type="text/css">
.entry-content img {max-width: 100000%; /* override */} .entry-content img {max-width: 100000%; /* override */}
.firstHeading {font-weight: bold;}
</style> </style>
<?php <?php
} ?> } ?>

View File

@@ -174,21 +174,11 @@
<a name="carte"></a><p>&nbsp;</p> <a name="carte"></a><p>&nbsp;</p>
<!--div id="map_canvas1" ></div>
<div id="map_canvas2" ></div>
<div id="map_canvas3" ></div>
<div id="map_canvas4" ></div>
<div id="map_canvas5" ></div>
<div id="map_canvas6" ></div-->
<?php <?php
echo '<div id="map" style="display: ' . ((count($coord) > 0) ? "block" : "none") . ';"></div>'; echo '<div id="map" style="display: ' . ((count($coord) > 0) ? "block" : "none") . ';"></div>';
?> ?>
<script> <script>
// Define your locations: HTML content for the info window, latitude, longitude function initMap() {
var locations = [ var locations = [
<?php <?php
$j = (count($coord) - 1); $j = (count($coord) - 1);
@@ -198,9 +188,9 @@ echo '<div id="map" style="display: ' . ((count($coord) > 0) ? "block" : "none")
} }
?> ?>
]; ];
// Setup the different icons and shadows // Setup the different icons and shadows
var iconURLPrefix = 'http://maps.google.com/mapfiles/ms/icons/'; var iconURLPrefix = 'https://maps.google.com/mapfiles/ms/icons/';
var icons = [ var icons = [
iconURLPrefix + 'red-dot.png', iconURLPrefix + 'red-dot.png',
@@ -213,89 +203,50 @@ echo '<div id="map" style="display: ' . ((count($coord) > 0) ? "block" : "none")
] ]
var iconsLength = icons.length; var iconsLength = icons.length;
var map = new google.maps.Map(document.getElementById('map'), { window.map = new google.maps.Map(document.getElementById('map'), {
zoom: 10, mapTypeId: google.maps.MapTypeId.ROADMAP
center: new google.maps.LatLng(-37.92, 151.25),
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false,
streetViewControl: false,
panControl: false,
zoomControlOptions: {
position: google.maps.ControlPosition.LEFT_BOTTOM
}
}); });
var infowindow = new google.maps.InfoWindow({ var infowindow = new google.maps.InfoWindow();
maxWidth: 200
});
var markers = new Array(); var bounds = new google.maps.LatLngBounds();
var iconCounter = 0;
// Add the markers and infowindows to the map
for (var i = 0; i < locations.length; i++) {
var marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map,
icon: icons[iconCounter]
});
markers.push(marker); var iconCounter = 0;
for (i = 0; i < locations.length; i++) {
infoBubble = new InfoBubble({ marker = new google.maps.Marker({
map: map, position: new google.maps.LatLng(locations[i][1], locations[i][2]),
content: '', map: map,
/*content: '<div class="mylabel">The label</div>', icon: icons[iconCounter]
position: new google.maps.LatLng(-32.0, 149.0),*/ });
shadowStyle: 0,
padding: 5,
backgroundColor: 'rgb(230,230,230)',
borderRadius: 5,
arrowSize: 10,
borderWidth: 1,
borderColor: '#2c2c2c',
disableAutoPan: true,
hideCloseButton: true,
arrowPosition: 30,
backgroundClassName: 'transparent',
disableAnimation: true,
arrowStyle: 2
});
/*var contentString = '<div style="width: 94.2%; padding-left:10px; height: 25px;float: left;color: #FFF;background: #ed1e79;line-height: 25px;border-radius:5px 5px 0px 0px;">' bounds.extend(marker.position);
contentString += '<strong><b>"You feild"</b></strong></div>'*/
google.maps.event.addListener(marker, 'click', (function(marker, i) { google.maps.event.addListener(marker, 'click', (function (marker, i) {
return function() { return function () {
/*infowindow.setContent(locations[i][0]); /*
infowindow.setContent(contentString); var contentString = '<div id="content">'+
infowindow.open(map, marker);*/ '<div id="siteNotice">'+
infoBubble.setContent(locations[i][0]); '</div>'+
infoBubble.open(map, marker); '<h1 id="firstHeading" class="firstHeading">' + locations[i][0] + '</h1>'+
} '<div id="bodyContent">'+
})(marker, i)); '</div>'+
'</div>';
iconCounter++; infowindow.setContent(contentString);
// We only have a limited number of possible icon colors, so we may have to restart the counter */
if(iconCounter >= iconsLength) { infowindow.setContent(locations[i][0]);
iconCounter = 0; infowindow.open(map, marker);
} }
})(marker, i));
} }
function autoCenter() { map.fitBounds(bounds);
// Create a new viewpoint bound
var bounds = new google.maps.LatLngBounds();
// Go through each...
for (var i = 0; i < markers.length; i++) {
bounds.extend(markers[i].position);
}
// Fit these bounds to the map
map.fitBounds(bounds);
}
autoCenter();
</script>
var listener = google.maps.event.addListener(map, "idle", function () {
map.setZoom(8);
google.maps.event.removeListener(listener);
});
}
</script>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
@@ -376,4 +327,5 @@ echo '<div id="map" style="display: ' . ((count($coord) > 0) ? "block" : "none")
<?php comments_template( '', true ); ?> <?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?> <?php endwhile; // end of the loop. ?>