M-à-j
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -0,0 +1 @@
|
||||
.DS_Store
|
||||
|
||||
@@ -73,5 +73,6 @@
|
||||
|
||||
wp_footer();
|
||||
?>
|
||||
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB7cAx3NSH4dPM3Sx2oQeud7Zr-KaGXmLk&callback=initMap" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<?php load_theme_textdomain('twentyten-child', get_template_directory() . '-child/languages'); ?>
|
||||
<?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('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"]
|
||||
//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' );
|
||||
//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 = $host;
|
||||
//echo $zenphoto_url;
|
||||
|
||||
$size = get_option( 'img_size' );
|
||||
$folder = false;
|
||||
@@ -144,7 +156,7 @@ function zenphoto_handler($atts, $content=null) {
|
||||
$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 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'] . '">';
|
||||
|
||||
$zenphoto_img .= $zenphoto_link;
|
||||
@@ -167,6 +179,7 @@ function zenphoto_handler($atts, $content=null) {
|
||||
$zenphoto_img .= $caption;
|
||||
}
|
||||
*/
|
||||
//echo $zenphoto_img;
|
||||
return $zenphoto_img;
|
||||
}
|
||||
|
||||
|
||||
11
header.php
11
header.php
@@ -61,17 +61,18 @@
|
||||
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 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/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/css" src="<?php echo get_stylesheet_directory_uri(); ?>/js/swipebox.min.css"></script-->
|
||||
|
||||
<?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="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="<?php echo get_stylesheet_directory_uri(); ?>/js/infobubble-compiled.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="<?php echo get_stylesheet_directory_uri(); ?>/js/infobubble-compiled.js"></script-->
|
||||
<style type="text/css">
|
||||
.entry-content img {max-width: 100000%; /* override */}
|
||||
.firstHeading {font-weight: bold;}
|
||||
</style>
|
||||
<?php
|
||||
} ?>
|
||||
|
||||
102
loop-single.php
102
loop-single.php
@@ -174,21 +174,11 @@
|
||||
|
||||
<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
|
||||
echo '<div id="map" style="display: ' . ((count($coord) > 0) ? "block" : "none") . ';"></div>';
|
||||
?>
|
||||
<script>
|
||||
// Define your locations: HTML content for the info window, latitude, longitude
|
||||
function initMap() {
|
||||
var locations = [
|
||||
<?php
|
||||
$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
|
||||
var iconURLPrefix = 'http://maps.google.com/mapfiles/ms/icons/';
|
||||
var iconURLPrefix = 'https://maps.google.com/mapfiles/ms/icons/';
|
||||
|
||||
var icons = [
|
||||
iconURLPrefix + 'red-dot.png',
|
||||
@@ -213,89 +203,50 @@ echo '<div id="map" style="display: ' . ((count($coord) > 0) ? "block" : "none")
|
||||
]
|
||||
var iconsLength = icons.length;
|
||||
|
||||
var map = new google.maps.Map(document.getElementById('map'), {
|
||||
zoom: 10,
|
||||
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
|
||||
}
|
||||
window.map = new google.maps.Map(document.getElementById('map'), {
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
});
|
||||
|
||||
var infowindow = new google.maps.InfoWindow({
|
||||
maxWidth: 200
|
||||
});
|
||||
var infowindow = new google.maps.InfoWindow();
|
||||
|
||||
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({
|
||||
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]
|
||||
});
|
||||
|
||||
markers.push(marker);
|
||||
|
||||
infoBubble = new InfoBubble({
|
||||
map: map,
|
||||
content: '',
|
||||
/*content: '<div class="mylabel">The label</div>',
|
||||
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;">'
|
||||
contentString += '<strong><b>"You feild"</b></strong></div>'*/
|
||||
bounds.extend(marker.position);
|
||||
|
||||
google.maps.event.addListener(marker, 'click', (function (marker, i) {
|
||||
return function () {
|
||||
/*infowindow.setContent(locations[i][0]);
|
||||
/*
|
||||
var contentString = '<div id="content">'+
|
||||
'<div id="siteNotice">'+
|
||||
'</div>'+
|
||||
'<h1 id="firstHeading" class="firstHeading">' + locations[i][0] + '</h1>'+
|
||||
'<div id="bodyContent">'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
infowindow.setContent(contentString);
|
||||
infowindow.open(map, marker);*/
|
||||
infoBubble.setContent(locations[i][0]);
|
||||
infoBubble.open(map, marker);
|
||||
*/
|
||||
infowindow.setContent(locations[i][0]);
|
||||
infowindow.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() {
|
||||
// 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>' ) ); ?>
|
||||
@@ -377,3 +328,4 @@ echo '<div id="map" style="display: ' . ((count($coord) > 0) ? "block" : "none")
|
||||
<?php comments_template( '', true ); ?>
|
||||
|
||||
<?php endwhile; // end of the loop. ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user