M-à-j
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -0,0 +1 @@
|
|||||||
|
.DS_Store
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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,13 +124,20 @@ 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>";
|
||||||
|
//preprint($zenphoto_url2);
|
||||||
|
//echo substr_count($zenphoto_url2, "https");
|
||||||
|
//echo $_SERVER['HTTPS'];
|
||||||
|
|
||||||
if (substr_count($zenphoto_url2, 'https') == 0) {
|
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;
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
11
header.php
11
header.php
@@ -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
|
||||||
} ?>
|
} ?>
|
||||||
|
|||||||
126
loop-single.php
126
loop-single.php
@@ -174,21 +174,11 @@
|
|||||||
|
|
||||||
<a name="carte"></a><p> </p>
|
<a name="carte"></a><p> </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);
|
||||||
@@ -200,7 +190,7 @@ 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;
|
var iconCounter = 0;
|
||||||
|
for (i = 0; i < locations.length; i++) {
|
||||||
|
marker = new google.maps.Marker({
|
||||||
|
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
|
||||||
|
map: map,
|
||||||
|
icon: icons[iconCounter]
|
||||||
|
});
|
||||||
|
|
||||||
// Add the markers and infowindows to the map
|
bounds.extend(marker.position);
|
||||||
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);
|
google.maps.event.addListener(marker, 'click', (function (marker, i) {
|
||||||
|
return function () {
|
||||||
infoBubble = new InfoBubble({
|
/*
|
||||||
map: map,
|
var contentString = '<div id="content">'+
|
||||||
content: '',
|
'<div id="siteNotice">'+
|
||||||
/*content: '<div class="mylabel">The label</div>',
|
'</div>'+
|
||||||
position: new google.maps.LatLng(-32.0, 149.0),*/
|
'<h1 id="firstHeading" class="firstHeading">' + locations[i][0] + '</h1>'+
|
||||||
shadowStyle: 0,
|
'<div id="bodyContent">'+
|
||||||
padding: 5,
|
'</div>'+
|
||||||
backgroundColor: 'rgb(230,230,230)',
|
'</div>';
|
||||||
borderRadius: 5,
|
infowindow.setContent(contentString);
|
||||||
arrowSize: 10,
|
*/
|
||||||
borderWidth: 1,
|
infowindow.setContent(locations[i][0]);
|
||||||
borderColor: '#2c2c2c',
|
infowindow.open(map, marker);
|
||||||
disableAutoPan: true,
|
}
|
||||||
hideCloseButton: true,
|
})(marker, i));
|
||||||
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;">'
|
|
||||||
contentString += '<strong><b>"You feild"</b></strong></div>'*/
|
|
||||||
|
|
||||||
google.maps.event.addListener(marker, 'click', (function(marker, i) {
|
|
||||||
return function() {
|
|
||||||
/*infowindow.setContent(locations[i][0]);
|
|
||||||
infowindow.setContent(contentString);
|
|
||||||
infowindow.open(map, marker);*/
|
|
||||||
infoBubble.setContent(locations[i][0]);
|
|
||||||
infoBubble.open(map, marker);
|
|
||||||
}
|
|
||||||
})(marker, i));
|
|
||||||
|
|
||||||
iconCounter++;
|
|
||||||
// We only have a limited number of possible icon colors, so we may have to restart the counter
|
|
||||||
if(iconCounter >= iconsLength) {
|
|
||||||
iconCounter = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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>' ) ); ?>
|
||||||
@@ -377,3 +328,4 @@ 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. ?>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user