1er commit

1er version
This commit is contained in:
2016-10-20 18:12:00 +02:00
commit e7ffbd3a84
47 changed files with 8545 additions and 0 deletions

476
Akismet.class.php Executable file
View File

@@ -0,0 +1,476 @@
<?php
/**
* Akismet anti-comment spam service
*
* The class in this package allows use of the {@link http://akismet.com Akismet} anti-comment spam service in any PHP5 application.
*
* This service performs a number of checks on submitted data and returns whether or not the data is likely to be spam.
*
* Please note that in order to use this class, you must have a vaild {@link http://wordpress.com/api-keys/ WordPress API key}. They are free for non/small-profit types and getting one will only take a couple of minutes.
*
* For commercial use, please {@link http://akismet.com/commercial/ visit the Akismet commercial licensing page}.
*
* Please be aware that this class is PHP5 only. Attempts to run it under PHP4 will most likely fail.
*
* See the Akismet class documentation page linked to below for usage information.
*
* @package akismet
* @author Alex Potsides, {@link http://www.achingbrain.net http://www.achingbrain.net}
* @version 0.5
* @copyright Alex Potsides, {@link http://www.achingbrain.net http://www.achingbrain.net}
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
*/
/**
* The Akismet PHP5 Class
*
* This class takes the functionality from the Akismet WordPress plugin written by {@link http://photomatt.net/ Matt Mullenweg} and allows it to be integrated into any PHP5 application or website.
*
* The original plugin is {@link http://akismet.com/download/ available on the Akismet website}.
*
* <code>
* $akismet = new Akismet('http://www.example.com/blog/', 'aoeu1aoue');
* $akismet->setCommentAuthor($name);
* $akismet->setCommentAuthorEmail($email);
* $akismet->setCommentAuthorURL($url);
* $akismet->setCommentContent($comment);
* $akismet->setPermalink('http://www.example.com/blog/alex/someurl/');
*
* if($akismet->isCommentSpam())
* // store the comment but mark it as spam (in case of a mis-diagnosis)
* else
* // store the comment normally
* </code>
*
* Optionally you may wish to check if your WordPress API key is valid as in the example below.
*
* <code>
* $akismet = new Akismet('http://www.example.com/blog/', 'aoeu1aoue');
*
* if($akismet->isKeyValid()) {
* // api key is okay
* } else {
* // api key is invalid
* }
* </code>
*
* @package akismet
* @name Akismet
* @version 0.5
* @author Alex Potsides
* @link http://www.achingbrain.net/
*/
class Akismet {
private $version = '0.5';
private $wordPressAPIKey;
private $blogURL;
private $comment;
private $apiPort;
private $akismetServer;
private $akismetVersion;
private $requestFactory;
// This prevents some potentially sensitive information from being sent accross the wire.
private $ignore = array('HTTP_COOKIE',
'HTTP_X_FORWARDED_FOR',
'HTTP_X_FORWARDED_HOST',
'HTTP_MAX_FORWARDS',
'HTTP_X_FORWARDED_SERVER',
'REDIRECT_STATUS',
'SERVER_PORT',
'PATH',
'DOCUMENT_ROOT',
'SERVER_ADMIN',
'QUERY_STRING',
'PHP_SELF' );
/**
* @param string $blogURL The URL of your blog.
* @param string $wordPressAPIKey WordPress API key.
*/
public function __construct($blogURL, $wordPressAPIKey) {
$this->blogURL = $blogURL;
$this->wordPressAPIKey = $wordPressAPIKey;
// Set some default values
$this->apiPort = 80;
$this->akismetServer = 'rest.akismet.com';
$this->akismetVersion = '1.1';
$this->requestFactory = new SocketWriteReadFactory();
// Start to populate the comment data
$this->comment['blog'] = $blogURL;
if(isset($_SERVER['HTTP_USER_AGENT'])) {
$this->comment['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
}
if(isset($_SERVER['HTTP_REFERER'])) {
$this->comment['referrer'] = $_SERVER['HTTP_REFERER'];
}
/*
* This is necessary if the server PHP5 is running on has been set up to run PHP4 and
* PHP5 concurently and is actually running through a separate proxy al a these instructions:
* http://www.schlitt.info/applications/blog/archives/83_How_to_run_PHP4_and_PHP_5_parallel.html
* and http://wiki.coggeshall.org/37.html
* Otherwise the user_ip appears as the IP address of the PHP4 server passing the requests to the
* PHP5 one...
*/
if(isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] != getenv('SERVER_ADDR')) {
$this->comment['user_ip'] = $_SERVER['REMOTE_ADDR'];
} else {
$this->comment['user_ip'] = getenv('HTTP_X_FORWARDED_FOR');
}
}
/**
* Makes a request to the Akismet service to see if the API key passed to the constructor is valid.
*
* Use this method if you suspect your API key is invalid.
*
* @return bool True is if the key is valid, false if not.
*/
public function isKeyValid() {
// Check to see if the key is valid
$response = $this->sendRequest('key=' . $this->wordPressAPIKey . '&blog=' . $this->blogURL, $this->akismetServer, '/' . $this->akismetVersion . '/verify-key');
return $response[1] == 'valid';
}
// makes a request to the Akismet service
private function sendRequest($request, $host, $path) {
$http_request = "POST " . $path . " HTTP/1.0\r\n";
$http_request .= "Host: " . $host . "\r\n";
$http_request .= "Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n";
$http_request .= "Content-Length: " . strlen($request) . "\r\n";
$http_request .= "User-Agent: Akismet PHP5 Class " . $this->version . " | Akismet/1.11\r\n";
$http_request .= "\r\n";
$http_request .= $request;
$requestSender = $this->requestFactory->createRequestSender();
$response = $requestSender->send($host, $this->apiPort, $http_request);
return explode("\r\n\r\n", $response, 2);
}
// Formats the data for transmission
private function getQueryString() {
foreach($_SERVER as $key => $value) {
if(!in_array($key, $this->ignore)) {
if($key == 'REMOTE_ADDR') {
$this->comment[$key] = $this->comment['user_ip'];
} else {
$this->comment[$key] = $value;
}
}
}
$query_string = '';
foreach($this->comment as $key => $data) {
if(!is_array($data)) {
$query_string .= $key . '=' . urlencode(stripslashes($data)) . '&';
}
}
return $query_string;
}
/**
* Tests for spam.
*
* Uses the web service provided by {@link http://www.akismet.com Akismet} to see whether or not the submitted comment is spam. Returns a boolean value.
*
* @return bool True if the comment is spam, false if not
* @throws Will throw an exception if the API key passed to the constructor is invalid.
*/
public function isCommentSpam() {
$response = $this->sendRequest($this->getQueryString(), $this->wordPressAPIKey . '.rest.akismet.com', '/' . $this->akismetVersion . '/comment-check');
if($response[1] == 'invalid' && !$this->isKeyValid()) {
throw new exception('The Wordpress API key passed to the Akismet constructor is invalid. Please obtain a valid one from http://wordpress.com/api-keys/');
}
return ($response[1] == 'true');
}
/**
* Submit spam that is incorrectly tagged as ham.
*
* Using this function will make you a good citizen as it helps Akismet to learn from its mistakes. This will improve the service for everybody.
*/
public function submitSpam() {
$this->sendRequest($this->getQueryString(), $this->wordPressAPIKey . '.' . $this->akismetServer, '/' . $this->akismetVersion . '/submit-spam');
}
/**
* Submit ham that is incorrectly tagged as spam.
*
* Using this function will make you a good citizen as it helps Akismet to learn from its mistakes. This will improve the service for everybody.
*/
public function submitHam() {
$this->sendRequest($this->getQueryString(), $this->wordPressAPIKey . '.' . $this->akismetServer, '/' . $this->akismetVersion . '/submit-ham');
}
/**
* To override the user IP address when submitting spam/ham later on
*
* @param string $userip An IP address. Optional.
*/
public function setUserIP($userip) {
$this->comment['user_ip'] = $userip;
}
/**
* To override the referring page when submitting spam/ham later on
*
* @param string $referrer The referring page. Optional.
*/
public function setReferrer($referrer) {
$this->comment['referrer'] = $referrer;
}
/**
* A permanent URL referencing the blog post the comment was submitted to.
*
* @param string $permalink The URL. Optional.
*/
public function setPermalink($permalink) {
$this->comment['permalink'] = $permalink;
}
/**
* The type of comment being submitted.
*
* May be blank, comment, trackback, pingback, or a made up value like "registration" or "wiki".
*/
public function setCommentType($commentType) {
$this->comment['comment_type'] = $commentType;
}
/**
* The name that the author submitted with the comment.
*/
public function setCommentAuthor($commentAuthor) {
$this->comment['comment_author'] = $commentAuthor;
}
/**
* The email address that the author submitted with the comment.
*
* The address is assumed to be valid.
*/
public function setCommentAuthorEmail($authorEmail) {
$this->comment['comment_author_email'] = $authorEmail;
}
/**
* The URL that the author submitted with the comment.
*/
public function setCommentAuthorURL($authorURL) {
$this->comment['comment_author_url'] = $authorURL;
}
/**
* The comment's body text.
*/
public function setCommentContent($commentBody) {
$this->comment['comment_content'] = $commentBody;
}
/**
* Lets you override the user agent used to submit the comment.
* you may wish to do this when submitting ham/spam.
* Defaults to $_SERVER['HTTP_USER_AGENT']
*/
public function setCommentUserAgent($userAgent) {
$this->comment['user_agent'] = $userAgent;
}
/**
* Defaults to 80
*/
public function setAPIPort($apiPort) {
$this->apiPort = $apiPort;
}
/**
* Defaults to rest.akismet.com
*/
public function setAkismetServer($akismetServer) {
$this->akismetServer = $akismetServer;
}
/**
* Defaults to '1.1'
*
* @param string $akismetVersion
*/
public function setAkismetVersion($akismetVersion) {
$this->akismetVersion = $akismetVersion;
}
/**
* Used by unit tests to mock transport layer
*
* @param AkismetRequestFactory $requestFactory
*/
public function setRequestFactory($requestFactory) {
$this->requestFactory = $requestFactory;
}
}
/**
* Used internally by Akismet
*
* This class is used by Akismet to do the actual sending and receiving of data. It opens a connection to a remote host, sends some data and the reads the response and makes it available to the calling program.
*
* The code that makes up this class originates in the Akismet WordPress plugin, which is {@link http://akismet.com/download/ available on the Akismet website}.
*
* N.B. It is not necessary to call this class directly to use the Akismet class.
*
* @package akismet
* @name SocketWriteRead
* @version 0.5
* @author Alex Potsides
* @link http://www.achingbrain.net/
*/
class SocketWriteRead implements AkismetRequestSender {
private $response;
private $errorNumber;
private $errorString;
public function __construct() {
$this->errorNumber = 0;
$this->errorString = '';
}
/**
* Sends the data to the remote host.
*
* @param string $host The host to send/receive data.
* @param int $port The port on the remote host.
* @param string $request The data to send.
* @param int $responseLength The amount of data to read. Defaults to 1160 bytes.
* @throws An exception is thrown if a connection cannot be made to the remote host.
* @returns The server response
*/
public function send($host, $port, $request, $responseLength = 1160) {
$response = '';
$fs = fsockopen($host, $port, $this->errorNumber, $this->errorString, 3);
if($this->errorNumber != 0) {
throw new Exception('Error connecting to host: ' . $host . ' Error number: ' . $this->errorNumber . ' Error message: ' . $this->errorString);
}
if($fs !== false) {
@fwrite($fs, $request);
while(!feof($fs)) {
$response .= fgets($fs, $responseLength);
}
fclose($fs);
}
return $response;
}
/**
* Returns the server response text
*
* @return string
*/
public function getResponse() {
return $this->response;
}
/**
* Returns the error number
*
* If there was no error, 0 will be returned.
*
* @return int
*/
public function getErrorNumner() {
return $this->errorNumber;
}
/**
* Returns the error string
*
* If there was no error, an empty string will be returned.
*
* @return string
*/
public function getErrorString() {
return $this->errorString;
}
}
/**
* Used internally by the Akismet class and to mock the Akismet anti spam service in
* the unit tests.
*
* N.B. It is not necessary to call this class directly to use the Akismet class.
*
* @package akismet
* @name SocketWriteReadFactory
* @version 0.5
* @author Alex Potsides
* @link http://www.achingbrain.net/
*/
class SocketWriteReadFactory implements AkismetRequestFactory {
public function createRequestSender() {
return new SocketWriteRead();
}
}
/**
* Used internally by the Akismet class and to mock the Akismet anti spam service in
* the unit tests.
*
* N.B. It is not necessary to implement this class to use the Akismet class.
*
* @package akismet
* @name AkismetRequestSender
* @version 0.5
* @author Alex Potsides
* @link http://www.achingbrain.net/
*/
interface AkismetRequestSender {
/**
* Sends the data to the remote host.
*
* @param string $host The host to send/receive data.
* @param int $port The port on the remote host.
* @param string $request The data to send.
* @param int $responseLength The amount of data to read. Defaults to 1160 bytes.
* @throws An exception is thrown if a connection cannot be made to the remote host.
* @returns The server response
*/
public function send($host, $port, $request, $responseLength = 1160);
}
/**
* Used internally by the Akismet class and to mock the Akismet anti spam service in
* the unit tests.
*
* N.B. It is not necessary to implement this class to use the Akismet class.
*
* @package akismet
* @name AkismetRequestFactory
* @version 0.5
* @author Alex Potsides
* @link http://www.achingbrain.net/
*/
interface AkismetRequestFactory {
public function createRequestSender();
}
?>

BIN
exclus/Archive.zip Normal file

Binary file not shown.

254
exclus/_loop-attachment.php Normal file
View File

@@ -0,0 +1,254 @@
<?php
/**
* The loop that displays an attachment.
*
* The loop displays the posts and the post content. See
* http://codex.wordpress.org/The_Loop to understand it and
* http://codex.wordpress.org/Template_Tags to understand
* the tags used in it.
*
* This can be overridden in child themes with loop-attachment.php.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.2
*/
?>
<?php
// return geo exif in a nice form
/*
function geo_frac2dec($str) {
@list( $n, $d ) = explode( '/', $str );
if ( !empty($d) )
return $n / $d;
return $str;
}
function geo_pretty_fracs2dec($fracs) {
return geo_frac2dec($fracs[0]) . '&deg; ' .
geo_frac2dec($fracs[1]) . '&prime; ' .
geo_frac2dec($fracs[2]) . '&Prime; ';
}
function geo_single_fracs2dec($fracs) {
return geo_frac2dec($fracs[0]) +
geo_frac2dec($fracs[1]) / 60 +
geo_frac2dec($fracs[2]) / 3600;
}
*/
?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php if ( ! empty( $post->post_parent ) ) : ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
/* translators: %s - title of parent post */
printf( __( '<span class="meta-nav">&larr;</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
?></a></div>
</div><!-- #nav-above -->
<?php endif; ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php
printf( __( '%1$s', 'twentyten-child' ),
sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
get_permalink(),
esc_attr( get_the_time() ),
get_the_date()
)
);
if ( wp_attachment_is_image() ) {
echo ' <span class="meta-sep">|</span> ';
$metadata = wp_get_attachment_metadata();
printf( __( 'Full size is %s pixels', 'twentyten' ),
sprintf( '<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>',
wp_get_attachment_url(),
esc_attr( __( 'Link to full-size image', 'twentyten' ) ),
$metadata['width'],
$metadata['height']
)
);
}
?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<div class="entry-attachment">
<?php if ( wp_attachment_is_image() ) :
$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
foreach ( $attachments as $k => $attachment ) {
if ( $attachment->ID == $post->ID )
break;
}
$k++;
// If there is more than 1 image attachment in a gallery
if ( count( $attachments ) > 1 ) {
if ( isset( $attachments[ $k ] ) )
// get the URL of the next image attachment
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
else
// or get the URL of the first image attachment
$next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
} else {
// or, if there's only 1 image attachment, get the URL of the image
$next_attachment_url = wp_get_attachment_url();
}
?>
<p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
$attachment_width = apply_filters( 'twentyten_attachment_size', 900 );
$attachment_height = apply_filters( 'twentyten_attachment_height', 900 );
echo wp_get_attachment_image( $post->ID, array( $attachment_width, $attachment_height ) ); // filterable image width with, essentially, no limit for image height.
?></a></p>
<?php else : ?>
<a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
<?php endif; ?>
<!-- .entry-attachment -->
<div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?>
</div><!-- .entry-caption -->
<div class="droite" onclick="toggleExif(<?php echo $attachment->ID; ?>);">Voir les Exif</div>
<?php //print_r($metadata); ?>
<?php
/*
if ($metadata['image_meta']['latitude'])
$latitude = $metadata['image_meta']['latitude'];
if ($metadata['image_meta']['longitude'])
$longitude = $metadata['image_meta']['longitude'];
if ($metadata['image_meta']['latitude_ref'])
$lat_ref = $metadata['image_meta']['latitude_ref'];
if ($metadata['image_meta']['longitude_ref'])
$lng_ref = $metadata['image_meta']['longitude_ref'];
$lat = geo_single_fracs2dec($latitude);
$lng = geo_single_fracs2dec($longitude);
if ($lat_ref == 'S') { $neg_lat = '-'; } else { $neg_lat = ''; }
if ($lng_ref == 'W') { $neg_lng = '-'; } else { $neg_lng = ''; }
//$start_geo_link = '<a href="http://maps.google.com/maps?q=' . $neg_lat . number_format($lat,6) . '+' . $neg_lng . number_format($lng, 6) . '&amp;z=11">';
$start_geo_link = '<a href="http://maps.google.com/maps?q=' . $neg_lat . number_format($lat,6) . '+' . $neg_lng . number_format($lng, 6) . '&amp;z=11">';
$jquery_geo_link = 'http://maps.google.com/maps?q=' . $neg_lat . number_format($lat,6) . '+' . $neg_lng . number_format($lng, 6) . '&amp;z=11';
$end_geo_link = '</a>';
// Aperture
if (!empty($metadata['image_meta']['aperture']))
$exif_list .= $before_item . __('Aperture', 'twentyten-child') . $sep . "f/" . $metadata['image_meta']['aperture'] . $after_item;
// Shutter speed
if (!empty($metadata['image_meta']['shutter_speed'])) {
$exif_list .= $before_item . __('Shutter speed', 'twentyten-child') . $sep;
if ((1 / $metadata['image_meta']['shutter_speed']) > 1) {
$exif_list .= "1/";
if ((number_format((1 / $metadata['image_meta']['shutter_speed']), 1)) == 1.3
or number_format((1 / $metadata['image_meta']['shutter_speed']), 1) == 1.5
or number_format((1 / $metadata['image_meta']['shutter_speed']), 1) == 1.6
or number_format((1 / $metadata['image_meta']['shutter_speed']), 1) == 2.5) {
$exif_list .= number_format((1 / $metadata['image_meta']['shutter_speed']), 1, '.', '') . " s" . $after_item;
}
else {
$exif_list .= number_format((1 / $metadata['image_meta']['shutter_speed']), 0, '.', '') . " s" . $after_item;
}
}
else
$exif_list .= $metadata['image_meta']['shutter_speed']." s" . $after_item;
}
}
// Focal length
if (!empty($metadata['image_meta']['focal_length']))
$exif_list .= $before_item . __('Focal length', 'twentyten-child') . $sep . $metadata['image_meta']['focal_length'] . " mm" . $after_item;
// Camera
if (!empty($metadata['image_meta']['camera']))
$exif_list .= $before_item . __('Camera', 'twentyten-child') . $sep . $metadata['image_meta']['camera'] . $after_item;
// Creation time
if (!empty($metadata['image_meta']['created_timestamp']))
$exif_list .= $before_item . __('Taken', 'twentyten-child') . $sep . date('j F, Y',$metadata['image_meta']['created_timestamp']) . $after_item;
// Latitude and Longtitude
if ($latitude != 0 && $longitude != 0)
//affichage dans un cadre map caché
//$exif_list .= $before_item . '<div onclick="toggleExif(\'map\');" ><image src="' . get_stylesheet_directory_uri() . '/images/monde.png" width="16" height="16" /></div>' . $after_item;
$exif_list .= $before_item . '<image onclick="toggleExif(\'map\');" src="' . get_stylesheet_directory_uri() . '/images/monde.png" width="16" height="16" />' . $after_item;
// jquery
//$exif_list .= $before_item . '<a id="map_link" href="#"><image src="' . get_stylesheet_directory_uri() . '/images/monde.png" width="16" height="16" /></a>' . $after_item;
//affichage map dans nouvelle fenetre
//$exif_list .= $before_item . $start_geo_link . '<image src="' . get_stylesheet_directory_uri() . '/images/monde.png" width="16" height="16" />' . $end_geo_link . $after_item;
*/
$before_block = '<div class="bloc_exif" id="' . $attachment->ID . '"><ul>';
$after_block = '</ul></div><!-- .bloc_exif -->';
$liste_exif = $before_block;
$attach = $attachment->ID;
// ListeExif renvoie 3 paramètres dans un tableau:
// -les exifs sous forme de liste
// -latitude et longitude pour le javascript
// -le caption ou le nom du fichier pour l'infoWindow
list($exif_list, $gm_lat, $gm_lng, $title_marker) = ListeExif($metadata, $attach);
$liste_exif .= $exif_list;
$liste_exif .= $after_block;
echo $liste_exif;
?>
<div id="map<?php echo $attach; ?>" class="" style="display: block;"></div>
<script type="text/javascript">
var contentString = "<?php echo $title_marker; ?>";
var curr_infw;
var latlng = new google.maps.LatLng(<?php echo $gm_lat; ?>, <?php echo $gm_lng; ?>);
var myOptions = {
/* http://code.google.com/intl/fr/apis/maps/documentation/javascript/reference.html#MapOptions */
zoom: 11,
center: latlng,
scrollwheel: true,
scaleControl: false,
disableDefaultUI: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map<?php echo $attach; ?>"), myOptions);
</script>
</div><!-- .entry-attachment -->
<!--p>Description</p-->
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_image_link( false ); ?></div>
<div class="nav-next"><?php next_image_link( false ); ?></div>
</div><!-- #nav-below -->
</div><!-- .entry-content -->
<div class="entry-utility">
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), ' <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php comments_template(); ?>
<?php endwhile; // end of the loop. ?>

67
exclus/_loop-single.php Normal file
View File

@@ -0,0 +1,67 @@
<?php
/**
* The loop that displays a single post.
*
* The loop displays the posts and the post content. See
* http://codex.wordpress.org/The_Loop to understand it and
* http://codex.wordpress.org/Template_Tags to understand
* the tags used in it.
*
* This can be overridden in child themes with loop-single.php.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.2
*/
?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
</div><!-- #nav-above -->
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php twentyten_posted_on(); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
<div id="entry-author-info">
<div id="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
</div><!-- #author-avatar -->
<div id="author-description">
<h2><?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>
<?php the_author_meta( 'description' ); ?>
<div id="author-link">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" rel="author">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten' ), get_the_author() ); ?>
</a>
</div><!-- #author-link -->
</div><!-- #author-description -->
</div><!-- #entry-author-info -->
<?php endif; ?>
<div class="entry-utility">
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
</div><!-- #nav-below -->
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>

View File

@@ -0,0 +1,116 @@
/** Dave's WordPress Live Search CSS **/
ul.search_results
{
display: block;
background-color:#fff;
width:250px;
max-height: 500px;
position:absolute;
top:20px;
left:0px;
overflow:auto;
z-index: 9999;
list-style-type: none;
list-style-image: none;
list-style-position: inside;
padding: 0px;
margin: 0px;
-moz-box-shadow: 5px 5px 3px #222;
-webkit-box-shadow: 5px 5px 3px #222;
box-shadow: 5px 5px 3px #222;
}
ul.search_results li
{
display: block;
padding: 5px 10px 5px 10px;
margin: 0px 0px 0px 0px;
border-top: 1px solid #eee;
border-bottom: 1px solid #aaa;
text-align: left;
color: #000;
background-color: #ddd;
text-decoration: none;
}
ul.search_results li:hover
{
background-color: #fff;
}
ul.search_results li a, ul.search_results li a:visited
{
display: block;
color: #000;
margin-left: 0px;
padding-left: 0px;
text-decoration: none;
font-weight: bold;
}
ul.search_results p#daves-wordpress-live-search_author
{
margin: 0px;
font-size: 90%;
font-weight: bold;
}
ul.search_results p#daves-wordpress-live-search_date
{
margin: 0px;
font-size: 90%;
}
/* BEGIN post thumbnails */
ul.search_results li.post_with_thumb a {
width:150px;
float:left;
margin-bottom: 5px;
}
ul.search_results li.post_with_thumb img.post_thumb
{
float: left;
margin: 3px 10px 10px 0px;
height: 48px;
width: 48px;
border: 1px solid #888;
}
/* END post thumbnails */
/* BEGIN post excerpt */
ul.search_results .excerpt, ul.search_results .meta
{
font-size: 75%;
width: 100%;
}
/* END post excerpt */
ul.search_results .clearfix
{
float: none !important;
clear: both !important;
}
.search_footer {
background-color: #888;
width: 100%;
text-align: right;
padding: .5em 0;
font-size: .9em;
}
.search_footer a,
.search_footer a:visited {
color: #fff;
margin-right: 1em;
}
#search_results_activity_indicator{
z-index:999999;
}

62
exclus/gm.js Normal file
View File

@@ -0,0 +1,62 @@
<script type="text/javascript">
//var latlng = new google.maps.LatLng(47.087170, 6.713577);
/**/
var contentString = "<?php echo $title_marker; ?>";
var curr_infw;
var latlng = new google.maps.LatLng(<?php echo $gm_lat; ?>, <?php echo $gm_lng; ?>);
var myOptions = {
/* http://code.google.com/intl/fr/apis/maps/documentation/javascript/reference.html#MapOptions */
zoom: 11,
center: latlng,
scrollwheel: true,
scaleControl: false,
disableDefaultUI: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
/*
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL
}*/
};
var map = new google.maps.Map(document.getElementById("map"), myOptions);
marker = createMarker(latlng, '', contentString, map);
function createMarker(point, title, content, map) {
var myMarkerImage = new google.maps.MarkerImage('http://maps.google.com/mapfiles/arrow.png');
var myMarkerShadow = new google.maps.MarkerImage('http://maps.google.com/mapfiles/arrowshadow.png');
var marker = new google.maps.Marker({
position: point,
map: map,
icon: myMarkerImage,
shadow: myMarkerShadow,
title: title
});
var infowindow = new google.maps.InfoWindow({
//content: content
content: createInfo(content,content),
//width: 500,
//height: 400
});
google.maps.event.addListener(marker, 'click', function() { /* mouseover */
if(curr_infw) { curr_infw.close();} // We check to see if there is an info window stored in curr_infw, if there is, we use .close() to hide the window
curr_infw = infowindow; // Now we put our new info window in to the curr_infw variable
infowindow.open(map, marker); // Now we open the window
});
return marker;
};
// Create information window
function createInfo(title, content) {
var html = '<div class="infowindow">';
html += '<strong>'+ title +'</strong>';
html += '<p>'+content+'</p>';
html += '<ul><li>Lat: <?php echo $gm_lat; ?></li>';
html += '<li>Long: <?php echo $gm_lng; ?></li>';
html += '</div>';
return html;
}
</script>

View File

@@ -0,0 +1,284 @@
<?php
/**
* The loop that displays an attachment.
*
* The loop displays the posts and the post content. See
* http://codex.wordpress.org/The_Loop to understand it and
* http://codex.wordpress.org/Template_Tags to understand
* the tags used in it.
*
* This can be overridden in child themes with loop-attachment.php.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.2
*/
?>
<script type="text/javascript">
function toggleExif(id) {
var exifDiv = document.getElementById(id);
if (exifDiv.style.display == "inline") {
exifDiv.style.display = "none";
}
else {
exifDiv.style.display = "inline";
}
}
</script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<style type="text/css">
.entry-content img {max-width: 100000%; /* override */}
</style>
<?php
// return geo exif in a nice form
/*
function geo_frac2dec($str) {
@list( $n, $d ) = explode( '/', $str );
if ( !empty($d) )
return $n / $d;
return $str;
}
function geo_pretty_fracs2dec($fracs) {
return geo_frac2dec($fracs[0]) . '&deg; ' .
geo_frac2dec($fracs[1]) . '&prime; ' .
geo_frac2dec($fracs[2]) . '&Prime; ';
}
function geo_single_fracs2dec($fracs) {
return geo_frac2dec($fracs[0]) +
geo_frac2dec($fracs[1]) / 60 +
geo_frac2dec($fracs[2]) / 3600;
}
*/
?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php if ( ! empty( $post->post_parent ) ) : ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
/* translators: %s - title of parent post */
printf( __( '<span class="meta-nav">&larr;</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
?></a></div>
</div><!-- #nav-above -->
<?php endif; ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php
printf( __( '%1$s', 'twentyten-child' ),
sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
get_permalink(),
esc_attr( get_the_time() ),
get_the_date()
)
);
if ( wp_attachment_is_image() ) {
echo ' <span class="meta-sep">|</span> ';
$metadata = wp_get_attachment_metadata();
printf( __( 'Full size is %s pixels', 'twentyten' ),
sprintf( '<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>',
wp_get_attachment_url(),
esc_attr( __( 'Link to full-size image', 'twentyten' ) ),
$metadata['width'],
$metadata['height']
)
);
}
?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<div class="entry-attachment">
<?php if ( wp_attachment_is_image() ) :
$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
foreach ( $attachments as $k => $attachment ) {
if ( $attachment->ID == $post->ID )
break;
}
$k++;
// If there is more than 1 image attachment in a gallery
if ( count( $attachments ) > 1 ) {
if ( isset( $attachments[ $k ] ) )
// get the URL of the next image attachment
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
else
// or get the URL of the first image attachment
$next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
} else {
// or, if there's only 1 image attachment, get the URL of the image
$next_attachment_url = wp_get_attachment_url();
}
?>
<p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
$attachment_width = apply_filters( 'twentyten_attachment_size', 900 );
$attachment_height = apply_filters( 'twentyten_attachment_height', 900 );
echo wp_get_attachment_image( $post->ID, array( $attachment_width, $attachment_height ) ); // filterable image width with, essentially, no limit for image height.
?></a></p>
<?php else : ?>
<a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
<?php endif; ?>
<!-- .entry-attachment -->
<div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?>
</div><!-- .entry-caption -->
<div class="droite" onclick="toggleExif(<?php echo $attachment->ID; ?>);">Voir les Exif</div>
<?php //print_r($metadata); ?>
<?php
$geo_links = true;
//echo $attachment->ID;
$before_item = '<li>';
$after_item = '</li>';
$sep = ': ';
$before_block = '<div class="bloc_exif" id="' . $attachment->ID . '"><ul>';
$after_block = '</ul></div>';
$exif_list = $before_block;
if ($metadata['image_meta']['latitude'])
$latitude = $metadata['image_meta']['latitude'];
if ($metadata['image_meta']['longitude'])
$longitude = $metadata['image_meta']['longitude'];
if ($metadata['image_meta']['latitude_ref'])
$lat_ref = $metadata['image_meta']['latitude_ref'];
if ($metadata['image_meta']['longitude_ref'])
$lng_ref = $metadata['image_meta']['longitude_ref'];
$lat = geo_single_fracs2dec($latitude);
$lng = geo_single_fracs2dec($longitude);
if ($lat_ref == 'S') { $neg_lat = '-'; } else { $neg_lat = ''; }
if ($lng_ref == 'W') { $neg_lng = '-'; } else { $neg_lng = ''; }
//$start_geo_link = '<a href="http://maps.google.com/maps?q=' . $neg_lat . number_format($lat,6) . '+' . $neg_lng . number_format($lng, 6) . '&amp;z=11">';
$start_geo_link = '<a href="http://maps.google.com/maps?q=' . $neg_lat . number_format($lat,6) . '+' . $neg_lng . number_format($lng, 6) . '&amp;z=11">';
$jquery_geo_link = 'http://maps.google.com/maps?q=' . $neg_lat . number_format($lat,6) . '+' . $neg_lng . number_format($lng, 6) . '&amp;z=11';
$end_geo_link = '</a>';
//echo '<b>' . $latitude . '-' . $longitude . '-' . $lat_ref . '-' . $lng_ref . '-' . $lat . '-' . $lng . '-' . $start_geo_link . '</b>';
?>
<?php
// Aperture
if (!empty($metadata['image_meta']['aperture']))
$exif_list .= $before_item . __('Aperture', 'twentyten-child') . $sep . "f/" . $metadata['image_meta']['aperture'] . $after_item;
// Shutter speed
if (!empty($metadata['image_meta']['shutter_speed'])) {
$exif_list .= $before_item . __('Shutter speed', 'twentyten-child') . $sep;
if ((1 / $metadata['image_meta']['shutter_speed']) > 1) {
$exif_list .= "1/";
if ((number_format((1 / $metadata['image_meta']['shutter_speed']), 1)) == 1.3
or number_format((1 / $metadata['image_meta']['shutter_speed']), 1) == 1.5
or number_format((1 / $metadata['image_meta']['shutter_speed']), 1) == 1.6
or number_format((1 / $metadata['image_meta']['shutter_speed']), 1) == 2.5) {
$exif_list .= number_format((1 / $metadata['image_meta']['shutter_speed']), 1, '.', '') . " s" . $after_item;
}
else {
$exif_list .= number_format((1 / $metadata['image_meta']['shutter_speed']), 0, '.', '') . " s" . $after_item;
}
}
else {
$exif_list .= $metadata['image_meta']['shutter_speed']." s" . $after_item;
}
}
// Focal length
if (!empty($metadata['image_meta']['focal_length']))
$exif_list .= $before_item . __('Focal length', 'twentyten-child') . $sep . $metadata['image_meta']['focal_length'] . " mm" . $after_item;
// Camera
if (!empty($metadata['image_meta']['camera']))
$exif_list .= $before_item . __('Camera', 'twentyten-child') . $sep . $metadata['image_meta']['camera'] . $after_item;
// Creation time
if (!empty($metadata['image_meta']['created_timestamp']))
$exif_list .= $before_item . __('Taken', 'twentyten-child') . $sep . date('j F, Y',$metadata['image_meta']['created_timestamp']) . $after_item;
// Latitude and Longtitude
if ($latitude != 0 && $longitude != 0)
//affichage dans un cadre map caché
//$exif_list .= $before_item . '<div onclick="toggleExif(\'map\');" ><image src="' . get_stylesheet_directory_uri() . '/images/monde.png" width="16" height="16" /></div>' . $after_item;
//$exif_list .= $before_item . '<image onclick="toggleExif(\'map\');" src="' . get_stylesheet_directory_uri() . '/images/monde.png" width="16" height="16" />' . $after_item;
$exif_list .= $before_item . '<a id="map_link" href="#"><image src="' . get_stylesheet_directory_uri() . '/images/monde.png" width="16" height="16" /></a>' . $after_item;
//affichage map dans nouvelle fenetre
//$exif_list .= $before_item . $start_geo_link . '<image src="' . get_stylesheet_directory_uri() . '/images/monde.png" width="16" height="16" />' . $end_geo_link . $after_item;
$exif_list .= $after_block;
echo $exif_list;
?>
<!--div id="map"></div-->
<script type="text/javascript">
jQuery(function() {
jQuery("#map_link").click(function(event) {
event.preventDefault();
jQuery("#map").slideToggle();
jQuery("#map").html('<iframe width="500" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="<?php echo $jquery_geo_link; ?>&amp;ie=UTF8&amp;t=p&amp;vpsrc=0&amp;ll=47.08717,6.713577&amp;output=embed"></iframe><br /><small><a href="<?php echo $jquery_geo_link; ?>&amp;ie=UTF8&amp;t=h&amp;vpsrc=0&amp;ll=47.08717,6.713577&amp;source=embed" style="text-align:left">Agrandir le plan</a></small>').css('display','block');
/*jQuery("#map").css('display','block');*/
});
});
</script>
<div id="map"></div>
<script type="text/javascript">
//var latlng = new google.maps.LatLng(47.087170, 6.713577);
/*
var latlng = new google.maps.LatLng(<?php echo $neg_lat . number_format($lat,6); ?>, <?php echo $neg_lng . number_format($lng, 6); ?>);
var myOptions = {
zoom: 11,
center: latlng,
scrollwheel: true,
scaleControl: false,
disableDefaultUI: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map"),
myOptions);
var marker = new google.maps.Marker({
map: map,
position: map.getCenter()
});*/
</script>
</div>
</div><!-- .entry-attachment -->
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_image_link( false ); ?></div>
<div class="nav-next"><?php next_image_link( false ); ?></div>
</div><!-- #nav-below -->
</div><!-- .entry-content -->
<div class="entry-utility">
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), ' <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php comments_template(); ?>
<?php endwhile; // end of the loop. ?>

View File

@@ -0,0 +1,300 @@
<?php
/**
* The loop that displays an attachment.
*
* The loop displays the posts and the post content. See
* http://codex.wordpress.org/The_Loop to understand it and
* http://codex.wordpress.org/Template_Tags to understand
* the tags used in it.
*
* This can be overridden in child themes with loop-attachment.php.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.2
*/
?>
<?php
// return geo exif in a nice form
/*
function geo_frac2dec($str) {
@list( $n, $d ) = explode( '/', $str );
if ( !empty($d) )
return $n / $d;
return $str;
}
function geo_pretty_fracs2dec($fracs) {
return geo_frac2dec($fracs[0]) . '&deg; ' .
geo_frac2dec($fracs[1]) . '&prime; ' .
geo_frac2dec($fracs[2]) . '&Prime; ';
}
function geo_single_fracs2dec($fracs) {
return geo_frac2dec($fracs[0]) +
geo_frac2dec($fracs[1]) / 60 +
geo_frac2dec($fracs[2]) / 3600;
}
*/
?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php if ( ! empty( $post->post_parent ) ) : ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
/* translators: %s - title of parent post */
printf( __( '<span class="meta-nav">&larr;</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
?></a></div>
</div><!-- #nav-above -->
<?php endif; ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php
printf( __( '%1$s', 'twentyten-child' ),
sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
get_permalink(),
esc_attr( get_the_time() ),
get_the_date()
)
);
if ( wp_attachment_is_image() ) {
echo ' <span class="meta-sep">|</span> ';
$metadata = wp_get_attachment_metadata();
printf( __( 'Full size is %s pixels', 'twentyten' ),
sprintf( '<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>',
wp_get_attachment_url(),
esc_attr( __( 'Link to full-size image', 'twentyten' ) ),
$metadata['width'],
$metadata['height']
)
);
}
?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<div class="entry-attachment">
<?php if ( wp_attachment_is_image() ) :
$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
foreach ( $attachments as $k => $attachment ) {
if ( $attachment->ID == $post->ID )
break;
}
$k++;
// If there is more than 1 image attachment in a gallery
if ( count( $attachments ) > 1 ) {
if ( isset( $attachments[ $k ] ) )
// get the URL of the next image attachment
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
else
// or get the URL of the first image attachment
$next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
} else {
// or, if there's only 1 image attachment, get the URL of the image
$next_attachment_url = wp_get_attachment_url();
}
?>
<p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
$attachment_width = apply_filters( 'twentyten_attachment_size', 900 );
$attachment_height = apply_filters( 'twentyten_attachment_height', 900 );
echo wp_get_attachment_image( $post->ID, array( $attachment_width, $attachment_height ) ); // filterable image width with, essentially, no limit for image height.
?></a></p>
<?php else : ?>
<a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
<?php endif; ?>
<!-- .entry-attachment -->
<div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?>
</div><!-- .entry-caption -->
<div class="droite" onclick="toggleExif(<?php echo $attachment->ID; ?>);">Voir les Exif</div>
<?php //print_r($metadata); ?>
<?php
$geo_links = true;
//echo $attachment->ID;
$before_item = '<li>';
$after_item = '</li>';
$sep = ': ';
$before_block = '<div class="bloc_exif" id="' . $attachment->ID . '"><ul>';
$after_block = '</ul></div>';
$exif_list = $before_block;
if ($metadata['image_meta']['latitude'])
$latitude = $metadata['image_meta']['latitude'];
if ($metadata['image_meta']['longitude'])
$longitude = $metadata['image_meta']['longitude'];
if ($metadata['image_meta']['latitude_ref'])
$lat_ref = $metadata['image_meta']['latitude_ref'];
if ($metadata['image_meta']['longitude_ref'])
$lng_ref = $metadata['image_meta']['longitude_ref'];
$lat = geo_single_fracs2dec($latitude);
$lng = geo_single_fracs2dec($longitude);
if ($lat_ref == 'S') { $neg_lat = '-'; } else { $neg_lat = ''; }
if ($lng_ref == 'W') { $neg_lng = '-'; } else { $neg_lng = ''; }
//$start_geo_link = '<a href="http://maps.google.com/maps?q=' . $neg_lat . number_format($lat,6) . '+' . $neg_lng . number_format($lng, 6) . '&amp;z=11">';
$start_geo_link = '<a href="http://maps.google.com/maps?q=' . $neg_lat . number_format($lat,6) . '+' . $neg_lng . number_format($lng, 6) . '&amp;z=11">';
$jquery_geo_link = 'http://maps.google.com/maps?q=' . $neg_lat . number_format($lat,6) . '+' . $neg_lng . number_format($lng, 6) . '&amp;z=11';
$end_geo_link = '</a>';
// Aperture
if (!empty($metadata['image_meta']['aperture']))
$exif_list .= $before_item . __('Aperture', 'twentyten-child') . $sep . "f/" . $metadata['image_meta']['aperture'] . $after_item;
// Shutter speed
if (!empty($metadata['image_meta']['shutter_speed'])) {
$exif_list .= $before_item . __('Shutter speed', 'twentyten-child') . $sep;
if ((1 / $metadata['image_meta']['shutter_speed']) > 1) {
$exif_list .= "1/";
if ((number_format((1 / $metadata['image_meta']['shutter_speed']), 1)) == 1.3
or number_format((1 / $metadata['image_meta']['shutter_speed']), 1) == 1.5
or number_format((1 / $metadata['image_meta']['shutter_speed']), 1) == 1.6
or number_format((1 / $metadata['image_meta']['shutter_speed']), 1) == 2.5) {
$exif_list .= number_format((1 / $metadata['image_meta']['shutter_speed']), 1, '.', '') . " s" . $after_item;
}
else {
$exif_list .= number_format((1 / $metadata['image_meta']['shutter_speed']), 0, '.', '') . " s" . $after_item;
}
}
else {
$exif_list .= $metadata['image_meta']['shutter_speed']." s" . $after_item;
}
}
// Focal length
if (!empty($metadata['image_meta']['focal_length']))
$exif_list .= $before_item . __('Focal length', 'twentyten-child') . $sep . $metadata['image_meta']['focal_length'] . " mm" . $after_item;
// Camera
if (!empty($metadata['image_meta']['camera']))
$exif_list .= $before_item . __('Camera', 'twentyten-child') . $sep . $metadata['image_meta']['camera'] . $after_item;
// Creation time
if (!empty($metadata['image_meta']['created_timestamp']))
$exif_list .= $before_item . __('Taken', 'twentyten-child') . $sep . date('j F, Y',$metadata['image_meta']['created_timestamp']) . $after_item;
// Latitude and Longtitude
if ($latitude != 0 && $longitude != 0)
//affichage dans un cadre map caché
//$exif_list .= $before_item . '<div onclick="toggleExif(\'map\');" ><image src="' . get_stylesheet_directory_uri() . '/images/monde.png" width="16" height="16" /></div>' . $after_item;
$exif_list .= $before_item . '<image onclick="toggleExif(\'map\');" src="' . get_stylesheet_directory_uri() . '/images/monde.png" width="16" height="16" />' . $after_item;
// jquery
//$exif_list .= $before_item . '<a id="map_link" href="#"><image src="' . get_stylesheet_directory_uri() . '/images/monde.png" width="16" height="16" /></a>' . $after_item;
//affichage map dans nouvelle fenetre
//$exif_list .= $before_item . $start_geo_link . '<image src="' . get_stylesheet_directory_uri() . '/images/monde.png" width="16" height="16" />' . $end_geo_link . $after_item;
$exif_list .= $after_block;
echo $exif_list;
// Titre du marker
if ($metadata['image_meta']['caption']) $title_marker = $metadata['image_meta']['caption'];
elseif ($metadata['file']) $title_marker = $metadata['file'];
?>
<div id="map"></div>
<script type="text/javascript">
//var latlng = new google.maps.LatLng(47.087170, 6.713577);
/**/
var contentString = "<?php echo $title_marker; ?>";
var curr_infw;
var latlng = new google.maps.LatLng(<?php echo $neg_lat . number_format($lat,6); ?>, <?php echo $neg_lng . number_format($lng, 6); ?>);
var myOptions = {
/* http://code.google.com/intl/fr/apis/maps/documentation/javascript/reference.html#MapOptions */
zoom: 11,
center: latlng,
scrollwheel: true,
scaleControl: false,
disableDefaultUI: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
/*
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL
}*/
};
var map = new google.maps.Map(document.getElementById("map"), myOptions);
marker = createMarker(latlng, '', contentString, map);
function createMarker(point, title, content, map) {
var myMarkerImage = new google.maps.MarkerImage('http://maps.google.com/mapfiles/arrow.png');
var myMarkerShadow = new google.maps.MarkerImage('http://maps.google.com/mapfiles/arrowshadow.png');
var marker = new google.maps.Marker({
position: point,
map: map,
icon: myMarkerImage,
shadow: myMarkerShadow,
title: title
});
var infowindow = new google.maps.InfoWindow({
//content: content
content: createInfo(content,content),
//width: 500,
//height: 400
});
google.maps.event.addListener(marker, 'click', function() { /* mouseover */
if(curr_infw) { curr_infw.close();} // We check to see if there is an info window stored in curr_infw, if there is, we use .close() to hide the window
curr_infw = infowindow; // Now we put our new info window in to the curr_infw variable
infowindow.open(map, marker); // Now we open the window
});
return marker;
};
// Create information window
function createInfo(title, content) {
var html = '<div class="infowindow">';
html += '<strong>'+ title +'</strong>';
html += '<p>'+content+'</p>';
html += '<ul><li>Lat: <?php echo $neg_lat . number_format($lat,6); ?></li>';
html += '<li>Long: <?php echo $neg_lng . number_format($lng, 6); ?></li>';
html += '</div>';
return html;
}
</script>
</div>
</div><!-- .entry-attachment -->
<!--p>Description</p-->
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_image_link( false ); ?></div>
<div class="nav-next"><?php next_image_link( false ); ?></div>
</div><!-- #nav-below -->
</div><!-- .entry-content -->
<div class="entry-utility">
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), ' <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php comments_template(); ?>
<?php endwhile; // end of the loop. ?>

View File

@@ -0,0 +1,320 @@
<?php
/**
* The loop that displays an attachment.
*
* The loop displays the posts and the post content. See
* http://codex.wordpress.org/The_Loop to understand it and
* http://codex.wordpress.org/Template_Tags to understand
* the tags used in it.
*
* This can be overridden in child themes with loop-attachment.php.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.2
*/
?>
<?php
function ListeExif($meta, $attach){
$before_item = '<li>';
$after_item = '</li>';
$sep = ': ';
$zoom = '11';
if ($meta['image_meta']['latitude'])
$latitude = $meta['image_meta']['latitude'];
if ($meta['image_meta']['longitude'])
$longitude = $meta['image_meta']['longitude'];
if ($meta['image_meta']['latitude_ref'])
$lat_ref = $meta['image_meta']['latitude_ref'];
if ($meta['image_meta']['longitude_ref'])
$lng_ref = $meta['image_meta']['longitude_ref'];
$lat = geo_single_fracs2dec($latitude);
$lng = geo_single_fracs2dec($longitude);
if ($lat_ref == 'S') { $neg_lat = '-'; } else { $neg_lat = ''; }
if ($lng_ref == 'W') { $neg_lng = '-'; } else { $neg_lng = ''; }
$gm_lat = $neg_lat . number_format($lat,6);
$gm_lng = $neg_lng . number_format($lng, 6);
//$start_geo_link = '<a href="http://maps.google.com/maps?q=' . $neg_lat . number_format($lat,6) . '+' . $neg_lng . number_format($lng, 6) . '&amp;z=11">';
$start_geo_link = '<a href="http://maps.google.com/maps?q=' . $neg_lat . number_format($lat,6) . '+' . $neg_lng . number_format($lng, 6) . '&amp;z=11">';
//$jquery_geo_link = 'http://maps.google.com/maps?q=' . $neg_lat . number_format($lat,6) . '+' . $neg_lng . number_format($lng, 6) . '&amp;z=11';
$end_geo_link = '</a>';
// Aperture
if (!empty($meta['image_meta']['aperture']))
$exif_list .= $before_item . __('Aperture', 'twentyten-child') . $sep . "f/" . $meta['image_meta']['aperture'] . $after_item;
// Shutter speed
if (!empty($meta['image_meta']['shutter_speed'])) {
$exif_list .= $before_item . __('Shutter speed', 'twentyten-child') . $sep;
if ((1 / $meta['image_meta']['shutter_speed']) > 1) {
$exif_list .= "1/";
if ((number_format((1 / $meta['image_meta']['shutter_speed']), 1)) == 1.3
or number_format((1 / $meta['image_meta']['shutter_speed']), 1) == 1.5
or number_format((1 / $meta['image_meta']['shutter_speed']), 1) == 1.6
or number_format((1 / $meta['image_meta']['shutter_speed']), 1) == 2.5) {
$exif_list .= number_format((1 / $meta['image_meta']['shutter_speed']), 1, '.', '') . " s" . $after_item;
}
else {
$exif_list .= number_format((1 / $meta['image_meta']['shutter_speed']), 0, '.', '') . " s" . $after_item;
}
}
else {
$exif_list .= $meta['image_meta']['shutter_speed']." s" . $after_item;
}
}
// Focal length
if (!empty($meta['image_meta']['focal_length']))
$exif_list .= $before_item . __('Focal length', 'twentyten-child') . $sep . $meta['image_meta']['focal_length'] . " mm" . $after_item;
// Camera
if (!empty($meta['image_meta']['camera']))
$exif_list .= $before_item . __('Camera', 'twentyten-child') . $sep . $meta['image_meta']['camera'] . $after_item;
// Creation time
if (!empty($meta['image_meta']['created_timestamp']))
$exif_list .= $before_item . __('Taken', 'twentyten-child') . $sep . date('j F, Y',$meta['image_meta']['created_timestamp']) . $after_item;
// Latitude and Longtitude
if ($latitude != 0 && $longitude != 0)
//affichage dans un cadre map caché
//$exif_list .= $before_item . '<div onclick="toggleExif(\'map\');" ><image src="' . get_stylesheet_directory_uri() . '/images/monde.png" width="16" height="16" /></div>' . $after_item;
$exif_list .= $before_item . '<image onclick="toggleExif(\'map\');" src="' . get_stylesheet_directory_uri() . '/images/monde.png" width="16" height="16" />' . $after_item;
// jquery
//$exif_list .= $before_item . '<a id="map_link" href="#"><image src="' . get_stylesheet_directory_uri() . '/images/monde.png" width="16" height="16" /></a>' . $after_item;
//affichage map dans nouvelle fenetre
//$exif_list .= $before_item . $start_geo_link . '<image src="' . get_stylesheet_directory_uri() . '/images/monde.png" width="16" height="16" />' . $end_geo_link . $after_item;
// Titre du marker
if ($meta['image_meta']['caption']) $title_marker = $meta['image_meta']['caption'];
elseif ($meta['file']) $title_marker = $meta['file'];
return array($exif_list, $gm_lat, $gm_lng, $title_marker);
}
// return geo exif in a nice form
/*
function geo_frac2dec($str) {
@list( $n, $d ) = explode( '/', $str );
if ( !empty($d) )
return $n / $d;
return $str;
}
function geo_pretty_fracs2dec($fracs) {
return geo_frac2dec($fracs[0]) . '&deg; ' .
geo_frac2dec($fracs[1]) . '&prime; ' .
geo_frac2dec($fracs[2]) . '&Prime; ';
}
function geo_single_fracs2dec($fracs) {
return geo_frac2dec($fracs[0]) +
geo_frac2dec($fracs[1]) / 60 +
geo_frac2dec($fracs[2]) / 3600;
}
*/
?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php if ( ! empty( $post->post_parent ) ) : ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
/* translators: %s - title of parent post */
printf( __( '<span class="meta-nav">&larr;</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
?></a></div>
</div><!-- #nav-above -->
<?php endif; ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php
printf( __( '%1$s', 'twentyten-child' ),
sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
get_permalink(),
esc_attr( get_the_time() ),
get_the_date()
)
);
if ( wp_attachment_is_image() ) {
echo ' <span class="meta-sep">|</span> ';
$metadata = wp_get_attachment_metadata();
printf( __( 'Full size is %s pixels', 'twentyten' ),
sprintf( '<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>',
wp_get_attachment_url(),
esc_attr( __( 'Link to full-size image', 'twentyten' ) ),
$metadata['width'],
$metadata['height']
)
);
}
?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<div class="entry-attachment">
<?php if ( wp_attachment_is_image() ) :
$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
foreach ( $attachments as $k => $attachment ) {
if ( $attachment->ID == $post->ID )
break;
}
$k++;
// If there is more than 1 image attachment in a gallery
if ( count( $attachments ) > 1 ) {
if ( isset( $attachments[ $k ] ) )
// get the URL of the next image attachment
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
else
// or get the URL of the first image attachment
$next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
} else {
// or, if there's only 1 image attachment, get the URL of the image
$next_attachment_url = wp_get_attachment_url();
}
?>
<p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
$attachment_width = apply_filters( 'twentyten_attachment_size', 900 );
$attachment_height = apply_filters( 'twentyten_attachment_height', 900 );
echo wp_get_attachment_image( $post->ID, array( $attachment_width, $attachment_height ) ); // filterable image width with, essentially, no limit for image height.
?></a></p>
<?php else : ?>
<a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
<?php endif; ?>
<!-- .entry-attachment -->
<div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?>
</div><!-- .entry-caption -->
<div class="droite" onclick="toggleExif(<?php echo $attachment->ID; ?>);">Voir les Exif</div>
<?php //print_r($metadata); ?>
<?php
//$geo_links = true;
$attach = $attachment->ID;
//echo $attachment->ID;
$before_block = '<div class="bloc_exif" id="' . $attach . '"><ul>';
$after_block = '</ul></div><!-- .bloc_exif -->';
$liste_exif = $before_block;
list($exif_list, $gm_lat, $gm_lng, $title_marker) = ListeExif($metadata, $attach);
$liste_exif .= $exif_list;
$liste_exif .= $after_block;
echo $liste_exif;
?>
<div id="map"></div>
<script type="text/javascript">
//var latlng = new google.maps.LatLng(47.087170, 6.713577);
/**/
var contentString = "<?php echo $title_marker; ?>";
var curr_infw;
var latlng = new google.maps.LatLng(<?php echo $gm_lat; ?>, <?php echo $gm_lng; ?>);
var myOptions = {
/* http://code.google.com/intl/fr/apis/maps/documentation/javascript/reference.html#MapOptions */
zoom: 11,
center: latlng,
scrollwheel: true,
scaleControl: false,
disableDefaultUI: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
/*
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL
}*/
};
var map = new google.maps.Map(document.getElementById("map"), myOptions);
marker = createMarker(latlng, '', contentString, map);
function createMarker(point, title, content, map) {
var myMarkerImage = new google.maps.MarkerImage('http://maps.google.com/mapfiles/arrow.png');
var myMarkerShadow = new google.maps.MarkerImage('http://maps.google.com/mapfiles/arrowshadow.png');
var marker = new google.maps.Marker({
position: point,
map: map,
icon: myMarkerImage,
shadow: myMarkerShadow,
title: title
});
var infowindow = new google.maps.InfoWindow({
//content: content
content: createInfo(content,content),
//width: 500,
//height: 400
});
google.maps.event.addListener(marker, 'click', function() { /* mouseover */
if(curr_infw) { curr_infw.close();} // We check to see if there is an info window stored in curr_infw, if there is, we use .close() to hide the window
curr_infw = infowindow; // Now we put our new info window in to the curr_infw variable
infowindow.open(map, marker); // Now we open the window
});
return marker;
};
// Create information window
function createInfo(title, content) {
var html = '<div class="infowindow">';
html += '<strong>'+ title +'</strong>';
html += '<p>'+content+'</p>';
html += '<ul><li>Lat: <?php echo $gm_lat; ?></li>';
html += '<li>Long: <?php echo $gm_lng; ?></li>';
html += '</div>';
return html;
}
</script>
</div>
</div><!-- .entry-attachment -->
<!--p>Description</p-->
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_image_link( false ); ?></div>
<div class="nav-next"><?php next_image_link( false ); ?></div>
</div><!-- #nav-below -->
</div><!-- .entry-content -->
<div class="entry-utility">
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), ' <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php comments_template(); ?>
<?php endwhile; // end of the loop. ?>

View File

@@ -0,0 +1,180 @@
<?php
/**
* The loop that displays an attachment.
*
* The loop displays the posts and the post content. See
* http://codex.wordpress.org/The_Loop to understand it and
* http://codex.wordpress.org/Template_Tags to understand
* the tags used in it.
*
* This can be overridden in child themes with loop-attachment.php.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.2
*/
?>
<?php
// return geo exif in a nice form
/*
function geo_frac2dec($str) {
@list( $n, $d ) = explode( '/', $str );
if ( !empty($d) )
return $n / $d;
return $str;
}
function geo_pretty_fracs2dec($fracs) {
return geo_frac2dec($fracs[0]) . '&deg; ' .
geo_frac2dec($fracs[1]) . '&prime; ' .
geo_frac2dec($fracs[2]) . '&Prime; ';
}
function geo_single_fracs2dec($fracs) {
return geo_frac2dec($fracs[0]) +
geo_frac2dec($fracs[1]) / 60 +
geo_frac2dec($fracs[2]) / 3600;
}
*/
?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php if ( ! empty( $post->post_parent ) ) : ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
/* translators: %s - title of parent post */
printf( __( '<span class="meta-nav">&larr;</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
?></a></div>
</div><!-- #nav-above -->
<?php endif; ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php
printf( __( '%1$s', 'twentyten-child' ),
sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
get_permalink(),
esc_attr( get_the_time() ),
get_the_date()
)
);
if ( wp_attachment_is_image() ) {
echo ' <span class="meta-sep">|</span> ';
$metadata = wp_get_attachment_metadata();
printf( __( 'Full size is %s pixels', 'twentyten' ),
sprintf( '<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>',
wp_get_attachment_url(),
esc_attr( __( 'Link to full-size image', 'twentyten' ) ),
$metadata['width'],
$metadata['height']
)
);
}
?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<div class="entry-attachment">
<?php if ( wp_attachment_is_image() ) :
$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
foreach ( $attachments as $k => $attachment ) {
if ( $attachment->ID == $post->ID )
break;
}
$k++;
// If there is more than 1 image attachment in a gallery
if ( count( $attachments ) > 1 ) {
if ( isset( $attachments[ $k ] ) )
// get the URL of the next image attachment
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
else
// or get the URL of the first image attachment
$next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
} else {
// or, if there's only 1 image attachment, get the URL of the image
$next_attachment_url = wp_get_attachment_url();
}
?>
<p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
$attachment_width = apply_filters( 'twentyten_attachment_size', 900 );
$attachment_height = apply_filters( 'twentyten_attachment_height', 900 );
echo wp_get_attachment_image( $post->ID, array( $attachment_width, $attachment_height ) ); // filterable image width with, essentially, no limit for image height.
?></a></p>
<?php else : ?>
<a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
<?php endif; ?>
<!-- .entry-attachment -->
<div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?>
</div><!-- .entry-caption -->
<div class="droite" onclick="toggleExif(<?php echo $attachment->ID; ?>);">Voir les Exif</div>
<?php //print_r($metadata); ?>
<?php
//$geo_links = true;
$attach = $attachment->ID;
//echo $attachment->ID;
$before_block = '<div class="bloc_exif" id="' . $attach . '"><ul>';
$after_block = '</ul></div><!-- .bloc_exif -->';
$liste_exif = $before_block;
list($exif_list, $gm_lat, $gm_lng, $title_marker) = ListeExif($metadata, $attach);
$liste_exif .= $exif_list;
$liste_exif .= $after_block;
echo $liste_exif;
?>
<div id="map"></div>
<script type="text/javascript">
var curr_infw;
initialize(<?php echo $gm_lat; ?>, <?php echo $gm_lng; ?>, "<?php echo $title_marker; ?>")
</script>
</div>
</div><!-- .entry-attachment -->
<!--p>Description</p-->
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_image_link( false ); ?></div>
<div class="nav-next"><?php next_image_link( false ); ?></div>
</div><!-- #nav-below -->
</div><!-- .entry-content -->
<div class="entry-utility">
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), ' <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php comments_template(); ?>
<?php endwhile; // end of the loop. ?>

136
exclus/ls Normal file
View File

@@ -0,0 +1,136 @@
http://forrst.com/posts/jquery_livesearch_for_twentyten_theme-tV3
//livesearch.js
jQuery(document).ready(function ($) {
var contentCache, searched = false;
jQuery('#searchform').submit(function () {
var s = jQuery(this).find('#s').val();
if (s.length == 0) {
return;
}
var submit = $('#searchsubmit');
submit.attr('disabled', false);
var url = jQuery(this).attr('action') + '?s=' + encodeURIComponent(s) + '&action=search_ajax'
jQuery.ajax({
url: url,
type: 'get',
dataType: 'html',
beforeSend: function () {
submit.attr('disabled', true).fadeTo('slow', 0.5);
document.body.style.cursor = 'wait';
var load = '<div id="content" role="main"><h1 class="page-title">Searching...</h1></div>';
jQuery('#container').empty().html(load);
},
success: function (data) {
submit.attr('disabled', false).fadeTo('slow', 1);
document.body.style.cursor = 'auto';
jQuery('#container').empty().html(data);
jQuery('#ajaxback').click(function () {
jQuery('#container').empty().html(contentCache);
});
}
});
return false;
});
var timer, currentKey;
jQuery('#s').keyup(function () {
clearTimeout(timer);
timer = setTimeout(function () {
var sInput = jQuery('#s');
var s = sInput.val();
if (s.length == 0) {
if (searched) {
jQuery('#container').empty().html(contentCache);
sInput.focus();
//jQuery('#search-form span.processing').remove();
searched = false;
}
currentKey = s;
} else {
if (s != currentKey) {
if (!searched) {
contentCache = jQuery('#container')[0].innerHTML;
searched = true;
}
currentKey = s;
if (s != ' ') {
jQuery('#searchform').submit();
jQuery('#s').attr('value','');
}
}
}
}, 800);
});
});
//functions.php
add_action('init','ajax_live_search_js');
function ajax_live_search_js() {
wp_enqueue_script('jquery');
wp_register_script('ajax_live_search', get_bloginfo('stylesheet_directory') . '/js/2010.js', array('jquery'), '1.0');
wp_enqueue_script('ajax_live_search');
}
function ajax_live_search_template() {
if (is_search()) {
include(dirname(__FILE__) . '/livesearch.php');
exit;
}
}
add_action('template_redirect','ajax_live_search_template');
//livesearch.php
<?php
if(!$_GET['action']) {
get_header();
echo '<div id="container">';
}
else { $do_ajax =1;}
?>
<div id="content" role="main">
<?php if ( have_posts() ) : ?>
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyten' ), '<span>' . get_search_query() . '</span>'); ?></h1>
<?php get_template_part( 'loop', 'search' );?>
<?php else : ?>
<div id="post-0" class="post no-results not-found">
<h2 class="entry-title"><?php _e( 'Nothing Found', 'twentyten' ); ?></h2>
<div class="entry-content">
<p><?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'twentyten' ); ?><?php if($do_ajax ==1){ echo'<a id ="ajaxback" href="javascript:void(0);" title="Back to last page">Go back to last page?</a>';} ?></p>
</div><!-- .entry-content -->
</div><!-- #post-0 -->
<?php endif; ?>
</div><!-- #content -->
<?php
if(!$_GET['action']) {
echo '</div><!-- #container -->';
get_sidebar();
get_footer();
}
?>

269
exclus/single 2.php Normal file
View File

@@ -0,0 +1,269 @@
<?php
/**
* The Template for displaying all single posts.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
get_header(); ?>
<div id="container">
<div id="content" role="main">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten-child' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten-child' ) . '</span>' ); ?></div>
</div><!-- #nav-above -->
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php //twentyten_posted_on(); ?>
<?php RelativeTime(); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<?php //the_content(); ?>
<?php
/**/
$content = apply_filters('the_content', get_the_content());
$content = str_replace(']]>', ']]&gt;', $content);
//$pattern = '/<img[^>]*>/Ui';
//$pattern = '/<img[^>]* src=\"([^\"]*)\"[^>]*>/Ui';
$pattern = '/<img[^>]*src=\"?([^\"]*)\"?([^>]*alt=\"?([^\"]*)\"?)?[^>]*>/Ui';
preg_match_all($pattern, $content , $matches, PREG_SET_ORDER);
for ($i = 0; $i <= (count($matches) - 1); $i++) {
$ancien = $matches[$i][0];
//echo $ancien . '<br>';
if (substr_count($ancien, 'wordpress') != 0) {
echo "wordpress";
$new_img = $ancien . '</a>' . "\r\n" . '<div class="droite" onclick="toggleExif(' . $i . ');">Voir les Exifs</div>'."\r\n";
$new_img .= '<div class="bloc_exif" id="' . $i .'">'."\r\n";
$new_img .= '<ul class="exif" id="bloc_exif' . $i . '">'."\r\n";
$pattern2 = '#wp-image-[0-9]{1,3}#';
preg_match($pattern2, $ancien, $matches2);
$attachment = substr($matches2[0],9);
$metadata = wp_get_attachment_metadata( $attachment );
//echo $attachment;
//print_r($metadata);
//echo "erreur2: " . $ancien;
list($exif_list, $gm_lat, $gm_lng, $title_marker) = ListeExif($metadata, $attachment);
//echo $gm_lat;
$new_img .= $exif_list;
$new_img .= '</ul></div>'."\r\n";
//$new_img .= '<script type="text/javascript">initial(' . $attachment . ')</script>';
//$new_img .= '<div id="map' . $attachment .'" class="mappy"></div>'."\r\n";
//$new_img .= '<div id="map">test</div>'."\r\n";
}
elseif (substr_count($ancien, 'zenphoto') != 0) {
echo "zenphoto";
//echo $ancien;
$ancien_img = 'http://alubook.local/zenphoto/albums/becasseaux/2008-09-07_BecasseauVariable_0351.jpg';
$new_img = $ancien . '</a>' . "\r\n" . '<div class="droite" onclick="toggleExif(' . $i . ');">Voir les Exifs</div>'."\r\n";
$new_img .= '<div class="bloc_exif" id="' . $i .'">'."\r\n";
$new_img .= '<ul class="exif" id="bloc_exif' . $i . '">'."\r\n";
//$exif = exif_read_data('http://alubook.local/zenphoto/zp-core/i.php?a=becasseaux&amp;i=2008-09-07_BecasseauVariable_0351.jpg', 0, true);
$exif = exif_read_data($ancien_img, 0, true);
//print_r($exif);
//src = http://alubook.local/zenphoto/zp-core/i.php?a=becasseaux&amp;i=2008-09-07_BecasseauVariable_0351.jpg
//<img class="ZenphotoPress_thumb " title="2008-09-07_BecasseauVariable_0351" src="http://alubook.local/zenphoto/zp-core/i.php?a=becasseaux&amp;i=2008-09-07_BecasseauVariable_0351.jpg&amp;w=610&amp;h=403" alt="2008-09-07_BecasseauVariable_0351" />
$metadata =array();
if ($exif[GPS][GPSLatitude]) {
$metadata['image_meta']['latitude'] = $exif[GPS][GPSLatitude];
//print_r($metadata['image_meta']['latitude']);
}
if ($exif[GPS][GPSLongitude]) $metadata['image_meta']['longitude'] = $exif[GPS][GPSLongitude];
if ($exif[GPS][GPSLatitudeRef]) $metadata['image_meta']['latitude_ref'] = $exif[GPS][GPSLatitudeRef];
if ($exif[GPS][GPSLongitudeRef]) $metadata['image_meta']['longitude_ref'] = $exif[GPS][GPSLongitudeRef];
if ($exif[EXIF][FNumber]) {
$ouverture = explode("/", $exif[EXIF][FNumber]); // 63/10
$a = ($ouverture[0] / $ouverture[1]);
$metadata['image_meta']['aperture'] = ($ouverture[0] / $ouverture[1]);
}
if ($exif[EXIF][ExposureTime]) $metadata['image_meta']['shutter_speed'] = $exif[EXIF][ExposureTime];
if ($exif[EXIF][FocalLength]) {
$focale = explode("/", $exif[EXIF][FocalLength]);
$metadata['image_meta']['focal_length'] = $focale[0];
}
if ($exif[EXIF][Model]) $metadata['image_meta']['camera'] = $exif[EXIF][Model];
//if ($exif[EXIF][DateTimeOriginal]) $metadata['image_meta']['created_timestamp'] = $exif[EXIF][DateTimeOriginal];
if ($exif[EXIF][DateTimeOriginal]) {
$metadata['image_meta']['created_timestamp'] = strtotime($exif[EXIF][DateTimeOriginal]);
}
$metadata['image_meta']['caption'] = '';
//print_r($metadata);
//echo 'latitude_ref: ' . $metadata['image_meta']['latitude_ref'];
list($exif_list, $gm_lat, $gm_lng, $title_marker) = ListeExif($metadata, $attachment);
//echo $exif_list; //ok
$new_img .= $exif_list;
//$new_img .= '</ul></div>'."\r\n";
$new_img .= '</ul>' . $gm_lat . ' ; ' . $gm_lng . '</div>'."\r\n";
//echo $new_img;
//print_r($exif_list);
//$new_img = $ancien;
}
else {
echo "autres...";
//$new_img = $ancien;
}
$content = str_replace($ancien, $new_img, $content);
//echo $content;
}
echo $content;
?>
<a name="carte"></a><p>&nbsp;</p><div id="map" name="carte"></div>
<script type="text/javascript">
/**/
var map;
function initialize(lat, lng) {
var myLatlng = new google.maps.LatLng(lat, lng);
var myOptions = {
zoom: 14,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("map"), myOptions);
marker = new google.maps.Marker({
position: myLatlng,
map: map,
title:"If this is your exact location, press \"Add this location\""
});
google.maps.event.addListener(marker, 'click', function() {
map.setZoom(8);
});
}
initialize(<?php echo $gm_lat; ?>, <?php echo $gm_lng; ?>);
</script>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten-child' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
<div id="entry-author-info">
<div id="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
</div><!-- #author-avatar -->
<div id="author-description">
<h2><?php printf( esc_attr__( 'About %s', 'twentyten-child' ), get_the_author() ); ?></h2>
<?php the_author_meta( 'description' ); ?>
<div id="author-link">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten-child' ), get_the_author() ); ?>
</a>
</div><!-- #author-link -->
</div><!-- #author-description -->
</div><!-- #entry-author-info -->
<?php endif; ?>
<!-- rajout -->
<div id="related">
<?php //for use in the loop, list 5 post titles related to first tag on current post
$backup = $post; // backup the current object
$tags = wp_get_post_tags($post->ID);
$tagIDs = array();
if ($tags) {
$tagcount = count($tags);
for ($i = 0; $i < $tagcount; $i++) {
$tagIDs[$i] = $tags[$i]->term_id;
}
$args=array(
'tag__in' => $tagIDs,
'post__not_in' => array($post->ID),
'showposts'=>-1,
'caller_get_posts'=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
_e('Related articles:', 'twentyten-child' );
?>
<br/>
<ul class="related">
<?php
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a> (<?php the_date("F Y"); ?>)</li>
<?php endwhile;
?></ul><?php
}
else { ?>
<!--h3>No related posts found!</h3-->
<?php }
}
$post = $backup; // copy it back
wp_reset_query(); // to use the original query again
?>
<?php twentyten_post_updated(); ?>
</div><!-- #related -->
<!-- /rajout -->
<div class="entry-utility">
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'twentyten-child' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten-child' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten-child' ) . '</span>' ); ?></div>
</div><!-- #nav-below -->
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

149
exclus/single 5.php Normal file
View File

@@ -0,0 +1,149 @@
<?php
/**
* The Template for displaying all single posts.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
get_header(); ?>
<div id="container">
<div id="content" role="main">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten-child' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten-child' ) . '</span>' ); ?></div>
</div><!-- #nav-above -->
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php //twentyten_posted_on(); ?>
<?php RelativeTime(); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<?php //the_content(); ?>
<?php
$content = apply_filters('the_content', get_the_content());
$content = str_replace(']]>', ']]&gt;', $content);
$pattern = '/<img[^>]*>/Ui';
preg_match_all($pattern, $content , $matches, PREG_SET_ORDER);
for ($i = 0; $i <= (count($matches) - 1); $i++) {
$ancien = $matches[$i][0];
$new_img = $ancien . '</a>' . "\r\n" . '<div class="droite" onclick="toggleExif(' . $i . ');">Voir les Exif</div>'."\r\n";
$new_img .= '<div class="bloc_exif" id="' . $i .'">'."\r\n";
$new_img .= '<ul class="exif" id="bloc_exif' . $i . '">'."\r\n";
$pattern2 = '#wp-image-[0-9]{1,3}#';
preg_match($pattern2, $ancien, $matches2);
$metadata = wp_get_attachment_metadata( substr($matches2[0],9) );
list($exif_list, $gm_lat, $gm_lng, $title_marker) = ListeExif($metadata);
echo $gm_lat;
$new_img .= $exif_list;
$new_img .= '</ul></div>'."\r\n";
$content = str_replace($ancien, $new_img, $content);
}
echo $content;
?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten-child' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
<div id="entry-author-info">
<div id="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
</div><!-- #author-avatar -->
<div id="author-description">
<h2><?php printf( esc_attr__( 'About %s', 'twentyten-child' ), get_the_author() ); ?></h2>
<?php the_author_meta( 'description' ); ?>
<div id="author-link">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten-child' ), get_the_author() ); ?>
</a>
</div><!-- #author-link -->
</div><!-- #author-description -->
</div><!-- #entry-author-info -->
<?php endif; ?>
<!-- rajout -->
<div id="related">
<?php //for use in the loop, list 5 post titles related to first tag on current post
$backup = $post; // backup the current object
$tags = wp_get_post_tags($post->ID);
$tagIDs = array();
if ($tags) {
$tagcount = count($tags);
for ($i = 0; $i < $tagcount; $i++) {
$tagIDs[$i] = $tags[$i]->term_id;
}
$args=array(
'tag__in' => $tagIDs,
'post__not_in' => array($post->ID),
'showposts'=>-1,
'caller_get_posts'=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
_e('Related articles:', 'twentyten-child' );
?>
<br/>
<ul class="related">
<?php
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a> (<?php the_date("F Y"); ?>)</li>
<?php endwhile;
?></ul><?php
}
else { ?>
<!--h3>No related posts found!</h3-->
<?php }
}
$post = $backup; // copy it back
wp_reset_query(); // to use the original query again
?>
<?php twentyten_post_updated(); ?>
</div><!-- #related -->
<!-- /rajout -->
<div class="entry-utility">
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'twentyten-child' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten-child' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten-child' ) . '</span>' ); ?></div>
</div><!-- #nav-below -->
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

145
exclus/single bof.php Normal file
View File

@@ -0,0 +1,145 @@
<?php
/**
* The Template for displaying all single posts.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
get_header(); ?>
<div id="container">
<div id="content" role="main">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten-child' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten-child' ) . '</span>' ); ?></div>
</div><!-- #nav-above -->
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php //twentyten_posted_on(); ?>
<?php RelativeTime(); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<?php //the_content(); ?>
<?php
$content = apply_filters('the_content', get_the_content());
$content = str_replace(']]>', ']]&gt;', $content);
$pattern = '/<img[^>]*>/Ui';
preg_match_all($pattern, $content , $matches, PREG_SET_ORDER);
preg_match_all('{<a href.*?rel="(.*?)".*?>}',$content,$attachment, PREG_SET_ORDER);
/*
preg_match_all('%<a[^>]+rel=("([^"]+)"|\'([^\']+)\')[^>]*>%i', $content,$attachment);*/
//print_r($attachment[0][1]); //attachment wp-att-293
//print_r($attachment[1][1]); //attachment wp-att-294
for ($i = 0; $i <= (count($matches) - 1); $i++) {
$ancien = $matches[$i][0];
//$new_img = $ancien . $ajout;
$new_img = $ancien . mod_image($i);
$content = str_replace($ancien, $new_img, $content);
}
echo $content;
?>
<?php //echo display_exif('aperture,shutter,focus,location',457); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten-child' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
<div id="entry-author-info">
<div id="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
</div><!-- #author-avatar -->
<div id="author-description">
<h2><?php printf( esc_attr__( 'About %s', 'twentyten-child' ), get_the_author() ); ?></h2>
<?php the_author_meta( 'description' ); ?>
<div id="author-link">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten-child' ), get_the_author() ); ?>
</a>
</div><!-- #author-link -->
</div><!-- #author-description -->
</div><!-- #entry-author-info -->
<?php endif; ?>
<!-- rajout -->
<div id="related">
<?php //for use in the loop, list 5 post titles related to first tag on current post
$backup = $post; // backup the current object
$tags = wp_get_post_tags($post->ID);
$tagIDs = array();
if ($tags) {
$tagcount = count($tags);
for ($i = 0; $i < $tagcount; $i++) {
$tagIDs[$i] = $tags[$i]->term_id;
}
$args=array(
'tag__in' => $tagIDs,
'post__not_in' => array($post->ID),
'showposts'=>-1,
'caller_get_posts'=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
_e('Related articles:', 'twentyten-child' );
?>
<br/>
<ul class="related">
<?php
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a> (<?php the_date("F Y"); ?>)</li>
<?php endwhile;
?></ul><?php
}
else { ?>
<!--h3>No related posts found!</h3-->
<?php }
}
$post = $backup; // copy it back
wp_reset_query(); // to use the original query again
?>
<?php twentyten_post_updated(); ?>
</div><!-- #related -->
<!-- /rajout -->
<div class="entry-utility">
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'twentyten-child' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten-child' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten-child' ) . '</span>' ); ?></div>
</div><!-- #nav-below -->
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

198
exclus/single v2.php Normal file
View File

@@ -0,0 +1,198 @@
<?php
/**
* The Template for displaying all single posts.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
get_header(); ?>
<script type="text/javascript">
/**/
var map;
function initialize(lat, lng, id) {
var myLatlng = new google.maps.LatLng(lat, lng);
var myOptions = {
zoom: 14,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById(id), myOptions);
marker = new google.maps.Marker({
position: myLatlng,
map: map,
title:"If this is your exact location, press \"Add this location\""
});
google.maps.event.addListener(marker, 'click', function() {
map.setZoom(8);
});
}
</script>
<div id="container">
<div id="content" role="main">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten-child' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten-child' ) . '</span>' ); ?></div>
</div><!-- #nav-above -->
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php //twentyten_posted_on(); ?>
<?php RelativeTime(); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<?php //the_content(); ?>
<?php
$content = apply_filters('the_content', get_the_content());
$content = str_replace(']]>', ']]&gt;', $content);
$pattern = '/<img[^>]*>/Ui';
preg_match_all($pattern, $content , $matches, PREG_SET_ORDER);
for ($i = 0; $i <= (count($matches) - 1); $i++) {
$ancien = $matches[$i][0];
$new_img = $ancien . '</a>' . "\r\n" . '<div class="droite" onclick="toggleExif(' . $i . ');">Voir les Exif</div>'."\r\n";
$new_img .= '<div class="bloc_exif" id="' . $i .'">'."\r\n";
$new_img .= '<ul class="exif" id="bloc_exif' . $i . '">'."\r\n";
$pattern2 = '#wp-image-[0-9]{1,3}#';
preg_match($pattern2, $ancien, $matches2);
$attachment = substr($matches2[0],9);
$metadata = wp_get_attachment_metadata( $attachment );
list($exif_list, $gm_lat, $gm_lng, $title_marker) = ListeExif($metadata, $attachment);
//echo $gm_lat;
$new_img .= $exif_list;
$new_img .= '</ul></div>'."\r\n";
//$new_img .= '<script type="text/javascript">initial(' . $attachment . ')</script>';
//$new_img .= '<div id="map' . $attachment .'" class="mappy"></div>'."\r\n";
$map = "map" . $attachment;
$new_img .= '<div id="' . $map . '" class="mappy">test<br>test<br>test<br>test</div>'."\r\n";
$new_img .= '<script type="text/javascript">initialize(' . $gm_lat . ',' . $gm_lng . ', "' . $map .'");</script>';
$content = str_replace($ancien, $new_img, $content);
//echo $content;
}
echo $content;
?>
<!--div id="map" name="carte"></div-->
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten-child' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
<div id="entry-author-info">
<div id="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
</div><!-- #author-avatar -->
<div id="author-description">
<h2><?php printf( esc_attr__( 'About %s', 'twentyten-child' ), get_the_author() ); ?></h2>
<?php the_author_meta( 'description' ); ?>
<div id="author-link">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten-child' ), get_the_author() ); ?>
</a>
</div><!-- #author-link -->
</div><!-- #author-description -->
</div><!-- #entry-author-info -->
<?php endif; ?>
<!-- rajout -->
<div id="related">
<?php //for use in the loop, list 5 post titles related to first tag on current post
$backup = $post; // backup the current object
$tags = wp_get_post_tags($post->ID);
$tagIDs = array();
if ($tags) {
$tagcount = count($tags);
for ($i = 0; $i < $tagcount; $i++) {
$tagIDs[$i] = $tags[$i]->term_id;
}
$args=array(
'tag__in' => $tagIDs,
'post__not_in' => array($post->ID),
'showposts'=>-1,
'caller_get_posts'=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
_e('Related articles:', 'twentyten-child' );
?>
<br/>
<ul class="related">
<?php
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a> (<?php the_date("F Y"); ?>)</li>
<?php endwhile;
?></ul><?php
}
else { ?>
<!--h3>No related posts found!</h3-->
<?php }
}
$post = $backup; // copy it back
wp_reset_query(); // to use the original query again
?>
<?php twentyten_post_updated(); ?>
</div><!-- #related -->
<!-- /rajout -->
<div class="entry-utility">
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'twentyten-child' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten-child' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten-child' ) . '</span>' ); ?></div>
</div><!-- #nav-below -->
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

314
exclus/single.php Normal file
View File

@@ -0,0 +1,314 @@
<?php
/**
* The Template for displaying all single posts.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
get_header(); ?>
<div id="container">
<div id="content" role="main">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten-child' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten-child' ) . '</span>' ); ?></div>
</div><!-- #nav-above -->
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php //twentyten_posted_on(); ?>
<?php RelativeTime(); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<?php //the_content(); ?>
<?php
/**/
$content = apply_filters('the_content', get_the_content());
$content = str_replace(']]>', ']]&gt;', $content);
// retina 2x
if (function_exists( ' wr2x_init' ) ) $pattern = '/<img[^>]* src=\"([^\"]*)\"[^>]*>/Ui';
// sans retina
else $pattern = '/<img[^>]*src=\"?([^\"]*)\"?([^>]*alt=\"?([^\"]*)\"?)?[^>]*>/Ui';
preg_match_all($pattern, $content , $matches, PREG_SET_ORDER);
//preprint($matches);
for ($i = 0; $i <= (count($matches) - 1); $i++) {
$ancien = $matches[$i][0];
if (substr_count($ancien, 'wordpress') != 0) {
$new_img = $ancien . '</a>' . "\r\n" . '<div class="droite" onclick="toggleExif(' . $i . ');">Voir les Exifs</div>'."\r\n";
$new_img .= '<div class="bloc_exif" id="' . $i .'">'."\r\n";
$new_img .= '<ul class="exif" id="bloc_exif' . $i . '">'."\r\n";
$pattern2 = '#wp-image-[0-9]{1,4}#';
preg_match($pattern2, $ancien, $matches2);
$attachment = substr($matches2[0],9);
//echo $attachment . "<br>";
$metadata = wp_get_attachment_metadata($attachment);
//preprint($metadata);
//echo "erreur2: " . $ancien;
list($exif_list, $gm_lat, $gm_lng, $title_marker) = ListeExif($metadata, $attachment, $i);
//echo $gm_lat;
$new_img .= $exif_list;
$new_img .= '</ul></div>'."\r\n";
//$new_img .= '<script type="text/javascript">initial(' . $attachment . ')</script>';
//$new_img .= '<div id="map' . $attachment .'" class="mappy"></div>'."\r\n";
//$new_img .= '<div id="map">test</div>'."\r\n";
}
elseif (substr_count($ancien, 'zenphoto') != 0) {
//echo "zenphoto";
//echo $ancien;
$ancien_img = 'http://macbook-pro.local/zenphoto/albums/becasseaux/2008-09-07_BecasseauVariable_0351.jpg';
$new_img = $ancien . '</a>' . "\r\n" . '<div class="droite" onclick="toggleExif(' . $i . ');">Voir les Exifs</div>'."\r\n";
$new_img .= '<div class="bloc_exif" id="' . $i .'">'."\r\n";
$new_img .= '<ul class="exif" id="bloc_exif' . $i . '">'."\r\n";
//$exif = exif_read_data('http://alubook.local/zenphoto/zp-core/i.php?a=becasseaux&amp;i=2008-09-07_BecasseauVariable_0351.jpg', 0, true);
$exif = exif_read_data($ancien_img, 0, true);
//print_r($exif);
//src = http://alubook.local/zenphoto/zp-core/i.php?a=becasseaux&amp;i=2008-09-07_BecasseauVariable_0351.jpg
//<img class="ZenphotoPress_thumb " title="2008-09-07_BecasseauVariable_0351" src="http://alubook.local/zenphoto/zp-core/i.php?a=becasseaux&amp;i=2008-09-07_BecasseauVariable_0351.jpg&amp;w=610&amp;h=403" alt="2008-09-07_BecasseauVariable_0351" />
$metadata =array();
if ($exif[GPS][GPSLatitude]) {
$metadata['image_meta']['latitude'] = $exif[GPS][GPSLatitude];
//print_r($metadata['image_meta']['latitude']);
}
if ($exif[GPS][GPSLongitude]) $metadata['image_meta']['longitude'] = $exif[GPS][GPSLongitude];
if ($exif[GPS][GPSLatitudeRef]) $metadata['image_meta']['latitude_ref'] = $exif[GPS][GPSLatitudeRef];
if ($exif[GPS][GPSLongitudeRef]) $metadata['image_meta']['longitude_ref'] = $exif[GPS][GPSLongitudeRef];
if ($exif[EXIF][FNumber]) {
$ouverture = explode("/", $exif[EXIF][FNumber]); // 63/10
$a = ($ouverture[0] / $ouverture[1]);
$metadata['image_meta']['aperture'] = ($ouverture[0] / $ouverture[1]);
}
if ($exif[EXIF][ExposureTime]) $metadata['image_meta']['shutter_speed'] = $exif[EXIF][ExposureTime];
if ($exif[EXIF][FocalLength]) {
$focale = explode("/", $exif[EXIF][FocalLength]);
$metadata['image_meta']['focal_length'] = $focale[0];
}
if ($exif[EXIF][Model]) $metadata['image_meta']['camera'] = $exif[EXIF][Model];
//if ($exif[EXIF][DateTimeOriginal]) $metadata['image_meta']['created_timestamp'] = $exif[EXIF][DateTimeOriginal];
if ($exif[EXIF][DateTimeOriginal]) {
$metadata['image_meta']['created_timestamp'] = strtotime($exif[EXIF][DateTimeOriginal]);
}
$metadata['image_meta']['caption'] = '';
//print_r($metadata);
//echo 'latitude_ref: ' . $metadata['image_meta']['latitude_ref'];
list($exif_list, $gm_lat, $gm_lng, $title_marker) = ListeExif($metadata, $attachment, $i);
//echo $exif_list; //ok
$new_img .= $exif_list;
//$new_img .= '</ul></div>'."\r\n";
$new_img .= '</ul>' . $gm_lat . ' ; ' . $gm_lng . '</div>'."\r\n";
//echo $new_img;
//print_r($exif_list);
//$new_img = $ancien;
}
else {
//echo "autres...";
//$new_img = $ancien;
}
$content = str_replace($ancien, $new_img, $content);
//echo $content;
}
echo $content;
?>
<a name="carte"></a><p>&nbsp;</p>
<script type="text/javascript">
function getMap(box,latitude,longitude) {
var mylatlng = new google.maps.LatLng(latitude,longitude);
var myOptions = {
zoom: 14,
center: mylatlng,
mapTypeId: google.maps.MapTypeId.HYBRID
};
var mymap = new google.maps.Map(document.getElementById('map_canvas' + box), myOptions);
var marker = new google.maps.Marker({
position: mylatlng,
map: mymap
});
google.maps.event.addListener(marker, 'click', function() {
map.setZoom(8);
});
}
//getMap(1, <?php echo $gm_lat; ?>, <?php echo $gm_lng; ?>);
//getMap(2, 41.68, 2.317);
</script>
<script type="text/javascript">
//getMap(<?php echo $i; ?>, <?php echo $gm_lat; ?>, <?php echo $gm_lng; ?>);
getMap(2, 41.68, 2.317);
</script>
<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>
<script type="text/javascript">
/*
var map;
function initialize(lat, lng) {
var myLatlng = new google.maps.LatLng(lat, lng);
var myOptions = {
zoom: 14,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("map"), myOptions);
marker = new google.maps.Marker({
position: myLatlng,
map: map,
title:"If this is your exact location, press \"Add this location\""
});
google.maps.event.addListener(marker, 'click', function() {
map.setZoom(8);
});
}
initialize(<?php echo $gm_lat; ?>, <?php echo $gm_lng; ?>,);
*/
</script>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten-child' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
<div id="entry-author-info">
<div id="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
</div><!-- #author-avatar -->
<div id="author-description">
<h2><?php printf( esc_attr__( 'About %s', 'twentyten-child' ), get_the_author() ); ?></h2>
<?php the_author_meta( 'description' ); ?>
<div id="author-link">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten-child' ), get_the_author() ); ?>
</a>
</div><!-- #author-link -->
</div><!-- #author-description -->
</div><!-- #entry-author-info -->
<?php endif; ?>
<!-- rajout -->
<div id="related">
<?php //for use in the loop, list 5 post titles related to first tag on current post
$backup = $post; // backup the current object
$tags = wp_get_post_tags($post->ID);
$tagIDs = array();
if ($tags) {
$tagcount = count($tags);
for ($i = 0; $i < $tagcount; $i++) {
$tagIDs[$i] = $tags[$i]->term_id;
}
$args=array(
'tag__in' => $tagIDs,
'post__not_in' => array($post->ID),
'showposts'=>-1,
'caller_get_posts'=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
_e('Related articles:', 'twentyten-child' );
?>
<br/>
<ul class="related">
<?php
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a> (<?php the_date("F Y"); ?>)</li>
<?php endwhile;
?></ul><?php
}
else { ?>
<!--h3>No related posts found!</h3-->
<?php }
}
$post = $backup; // copy it back
wp_reset_query(); // to use the original query again
?>
<?php twentyten_post_updated(); ?>
</div><!-- #related -->
<!-- /rajout -->
<div class="entry-utility">
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'twentyten-child' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten-child' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten-child' ) . '</span>' ); ?></div>
</div><!-- #nav-below -->
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

318
exclus/single__.php Normal file
View File

@@ -0,0 +1,318 @@
<?php
/**
* The Template for displaying all single posts.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
get_header(); ?>
<div id="container">
<div id="content" role="main">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten-child' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten-child' ) . '</span>' ); ?></div>
</div><!-- #nav-above -->
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php //twentyten_posted_on(); ?>
<?php RelativeTime(); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<?php //the_content(); ?>
<?php
/**/
$content = apply_filters('the_content', get_the_content());
$content = str_replace(']]>', ']]&gt;', $content);
//$pattern = '/<img[^>]*>/Ui';
//$pattern = '/<img[^>]* src=\"([^\"]*)\"[^>]*>/Ui';
$pattern = '/<img[^>]*src=\"?([^\"]*)\"?([^>]*alt=\"?([^\"]*)\"?)?[^>]*>/Ui';
preg_match_all($pattern, $content , $matches, PREG_SET_ORDER);
print_r($matches);
echo "<br><br>";
for ($i = 0; $i <= (count($matches) - 1); $i++) {
$ancien = $matches[$i][0];
//echo $ancien . '<br>';
if (substr_count($ancien, 'wordpress') != 0) {
//echo "wordpress";
$new_img = $ancien . '</a>' . "\r\n" . '<div class="droite" onclick="toggleExif(' . $i . ');">Voir les Exifs</div>'."\r\n";
$new_img .= '<div class="bloc_exif" id="' . $i .'">'."\r\n";
$new_img .= '<ul class="exif" id="bloc_exif' . $i . '">'."\r\n";
$pattern2 = '#wp-image-[0-9]{1,3}#';
preg_match($pattern2, $ancien, $matches2);
$attachment = substr($matches2[0],9);
$metadata = wp_get_attachment_metadata( $attachment );
echo $attachment;
echo $metadata;
//print_r($metadata);
//echo "erreur2: " . $ancien;
list($exif_list, $gm_lat, $gm_lng, $title_marker) = ListeExif($metadata, $attachment, $i);
//echo $gm_lat;
$new_img .= $exif_list;
$new_img .= '</ul></div>'."\r\n";
//$new_img .= '<script type="text/javascript">initial(' . $attachment . ')</script>';
//$new_img .= '<div id="map' . $attachment .'" class="mappy"></div>'."\r\n";
//$new_img .= '<div id="map">test</div>'."\r\n";
}
elseif (substr_count($ancien, 'zenphoto') != 0) {
//echo "zenphoto";
//echo $ancien;
$ancien_img = 'http://macbook-pro.local/zenphoto/albums/becasseaux/2008-09-07_BecasseauVariable_0351.jpg';
$new_img = $ancien . '</a>' . "\r\n" . '<div class="droite" onclick="toggleExif(' . $i . ');">Voir les Exifs</div>'."\r\n";
$new_img .= '<div class="bloc_exif" id="' . $i .'">'."\r\n";
$new_img .= '<ul class="exif" id="bloc_exif' . $i . '">'."\r\n";
//$exif = exif_read_data('http://alubook.local/zenphoto/zp-core/i.php?a=becasseaux&amp;i=2008-09-07_BecasseauVariable_0351.jpg', 0, true);
$exif = exif_read_data($ancien_img, 0, true);
//print_r($exif);
//src = http://alubook.local/zenphoto/zp-core/i.php?a=becasseaux&amp;i=2008-09-07_BecasseauVariable_0351.jpg
//<img class="ZenphotoPress_thumb " title="2008-09-07_BecasseauVariable_0351" src="http://alubook.local/zenphoto/zp-core/i.php?a=becasseaux&amp;i=2008-09-07_BecasseauVariable_0351.jpg&amp;w=610&amp;h=403" alt="2008-09-07_BecasseauVariable_0351" />
$metadata =array();
if ($exif[GPS][GPSLatitude]) {
$metadata['image_meta']['latitude'] = $exif[GPS][GPSLatitude];
//print_r($metadata['image_meta']['latitude']);
}
if ($exif[GPS][GPSLongitude]) $metadata['image_meta']['longitude'] = $exif[GPS][GPSLongitude];
if ($exif[GPS][GPSLatitudeRef]) $metadata['image_meta']['latitude_ref'] = $exif[GPS][GPSLatitudeRef];
if ($exif[GPS][GPSLongitudeRef]) $metadata['image_meta']['longitude_ref'] = $exif[GPS][GPSLongitudeRef];
if ($exif[EXIF][FNumber]) {
$ouverture = explode("/", $exif[EXIF][FNumber]); // 63/10
$a = ($ouverture[0] / $ouverture[1]);
$metadata['image_meta']['aperture'] = ($ouverture[0] / $ouverture[1]);
}
if ($exif[EXIF][ExposureTime]) $metadata['image_meta']['shutter_speed'] = $exif[EXIF][ExposureTime];
if ($exif[EXIF][FocalLength]) {
$focale = explode("/", $exif[EXIF][FocalLength]);
$metadata['image_meta']['focal_length'] = $focale[0];
}
if ($exif[EXIF][Model]) $metadata['image_meta']['camera'] = $exif[EXIF][Model];
//if ($exif[EXIF][DateTimeOriginal]) $metadata['image_meta']['created_timestamp'] = $exif[EXIF][DateTimeOriginal];
if ($exif[EXIF][DateTimeOriginal]) {
$metadata['image_meta']['created_timestamp'] = strtotime($exif[EXIF][DateTimeOriginal]);
}
$metadata['image_meta']['caption'] = '';
//print_r($metadata);
//echo 'latitude_ref: ' . $metadata['image_meta']['latitude_ref'];
list($exif_list, $gm_lat, $gm_lng, $title_marker) = ListeExif($metadata, $attachment, $i);
//echo $exif_list; //ok
$new_img .= $exif_list;
//$new_img .= '</ul></div>'."\r\n";
$new_img .= '</ul>' . $gm_lat . ' ; ' . $gm_lng . '</div>'."\r\n";
//echo $new_img;
//print_r($exif_list);
//$new_img = $ancien;
}
else {
//echo "autres...";
//$new_img = $ancien;
}
$content = str_replace($ancien, $new_img, $content);
//echo $content;
}
echo $content;
?>
<a name="carte"></a><p>&nbsp;</p>
<script type="text/javascript">
function getMap(box,latitude,longitude) {
var mylatlng = new google.maps.LatLng(latitude,longitude);
var myOptions = {
zoom: 14,
center: mylatlng,
mapTypeId: google.maps.MapTypeId.HYBRID
};
var mymap = new google.maps.Map(document.getElementById('map_canvas' + box), myOptions);
var marker = new google.maps.Marker({
position: mylatlng,
map: mymap
});
google.maps.event.addListener(marker, 'click', function() {
map.setZoom(8);
});
}
//getMap(1, <?php echo $gm_lat; ?>, <?php echo $gm_lng; ?>);
//getMap(2, 41.68, 2.317);
</script>
<script type="text/javascript">
//getMap(<?php echo $i; ?>, <?php echo $gm_lat; ?>, <?php echo $gm_lng; ?>);
getMap(2, 41.68, 2.317);
</script>
<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>
<script type="text/javascript">
/*
var map;
function initialize(lat, lng) {
var myLatlng = new google.maps.LatLng(lat, lng);
var myOptions = {
zoom: 14,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("map"), myOptions);
marker = new google.maps.Marker({
position: myLatlng,
map: map,
title:"If this is your exact location, press \"Add this location\""
});
google.maps.event.addListener(marker, 'click', function() {
map.setZoom(8);
});
}
initialize(<?php echo $gm_lat; ?>, <?php echo $gm_lng; ?>,);
*/
</script>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten-child' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
<div id="entry-author-info">
<div id="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
</div><!-- #author-avatar -->
<div id="author-description">
<h2><?php printf( esc_attr__( 'About %s', 'twentyten-child' ), get_the_author() ); ?></h2>
<?php the_author_meta( 'description' ); ?>
<div id="author-link">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten-child' ), get_the_author() ); ?>
</a>
</div><!-- #author-link -->
</div><!-- #author-description -->
</div><!-- #entry-author-info -->
<?php endif; ?>
<!-- rajout -->
<div id="related">
<?php //for use in the loop, list 5 post titles related to first tag on current post
$backup = $post; // backup the current object
$tags = wp_get_post_tags($post->ID);
$tagIDs = array();
if ($tags) {
$tagcount = count($tags);
for ($i = 0; $i < $tagcount; $i++) {
$tagIDs[$i] = $tags[$i]->term_id;
}
$args=array(
'tag__in' => $tagIDs,
'post__not_in' => array($post->ID),
'showposts'=>-1,
'caller_get_posts'=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
_e('Related articles:', 'twentyten-child' );
?>
<br/>
<ul class="related">
<?php
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a> (<?php the_date("F Y"); ?>)</li>
<?php endwhile;
?></ul><?php
}
else { ?>
<!--h3>No related posts found!</h3-->
<?php }
}
$post = $backup; // copy it back
wp_reset_query(); // to use the original query again
?>
<?php twentyten_post_updated(); ?>
</div><!-- #related -->
<!-- /rajout -->
<div class="entry-utility">
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'twentyten-child' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten-child' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten-child' ) . '</span>' ); ?></div>
</div><!-- #nav-below -->
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

710
exclus/style.css Normal file
View File

@@ -0,0 +1,710 @@
/*
Theme Name: Twenty Ten Child
Description: Theme enfant pour Twenty Ten
Author: Le nom de l'auteur
Template: twentyten
*/
@import url("../twentyten/style.css");
body {
background-color: #e7e7e2;
/*background-color: #b7a691;*/
}
a:link, a:visited {
color: #858585;
}
a:hover {
color: #373737;
}
a img {
padding: 4px;
border: thin solid #736c4d;
}
.iiframe {
text-align: center;
}
#randomImg img {
padding: 10px;
background-color: #fff;
border: 1px solid #818181;
margin-right: auto;
margin-left: auto;
display: block;
}
/**/
#wrapper {
background-color: #e7e7e2;
/*background-color: #b7a691;*/
/*margin-top: 20px;
padding: 0 20px;*/
}
#main {
/*background-color: #bfb68a;*/
background-color: #fffefc;
-webkit-border-radius: 16px 16px 0 0;
-moz-border-radius: 16px 16px 0 0;
border-radius: 16px 16px 0 0;
border: thin solid #a0966c;
padding-top: 30px;
}
#main .widget-area ul {
padding: 0 20px;
}
/*
#container {
margin: 0 -260px 0 0;
}
#primary {
width: 240px;
}
*/
#container {
margin: 0 -230px 0 0;
}
#container2, container-fullwidth {
margin: 0 0 0 0;
}
#primary {
width: 230px;
}
#content {
width: 660px;
}
#content2 {
margin: 0 20px;
width: 890px;
}
/* Header */
#header {
margin-bottom:20px;
padding:0 10px;
/*width:940px;*/
/*display:block;*/
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
}
#header #logo {
float:left;
}
#header #pagenav {
float:right;
}
#pagenav ul {
margin: 16px 0 0;
padding-left: 2em;
}
#pagenav li {
display: inline;
list-style-type: none;
padding: 8px;
}
#pagenav li a {
text-decoration: none;
font-size: large;
padding-bottom: 20px;
text-shadow: 1px 1px 1px #aaa;
color: #fff;
}
#pagenav li a:hover {
border-bottom: 2px solid #fff;
}
#logo a {
color: #fff;
text-shadow: 1px 1px 1px #aaa;
text-decoration: none;
font-size: xx-large;
letter-spacing: 5px;
}
/*
#content {
color: #444;
}
*/
#content,
#content input,
#content textarea,
#content2,
#content2 input,
#content2 textarea {
color: #444;
font-size: 13px;
line-height: 24px;
}
#content h2, #content2 h2 {
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
}
#content h2 a, #content2 h2 a {
font-weight: normal;
font-style: normal;
letter-spacing: 0.5px;
font-size: x-large;
color: #736c4d;
text-shadow: 3px 3px 3px #d9d3c1;
}
#content a:hover, #content2 a:hover {
color: #373737;
}
.entry-content, .entry-summary p, .comment-body {
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
}
.entry-content p, .entry-summary p, .comment-body p {
font-size: 13px;
}
.entry-date {
}
.entry-meta a {
text-decoration: none;
margin-left: 5px;
}
.entry-utility {
text-align: right;
color: #444;
margin-top: 30px;
}
.navigation {
line-height: 34px;
}
.nav-previous a, .nav-next a {
font-size: larger;
}
/* */
.format-gallery .size-thumbnail img,
.category-gallery .size-thumbnail img {
border: 1px solid #f1f1f1;
margin-bottom: 0;
}
.gallery img {
border-style: none;
border-width: 0;
}
.gallery img {
border: 1px solid #f1f1f1;
}
/* liens */
#content ul {
list-style-type: none;
margin-left: 3em;
}
#content2 ol {
list-style-type: none;
margin: 0 8em;
}
#content h3 {
margin-bottom: 1em;
margin-top: 2em;
}
/* single */
#content h1.entry-title, #content2 h1.entry-title {
font-weight: normal;
font-style: normal;
letter-spacing: 0.5px;
font-size: x-large;
color: #736c4d;
text-shadow: 3px 3px 3px #d9d3c1;
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
}
#related {
margin-left: 3em;
margin-right: 2em;
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
margin-bottom: 1em;
}
.maj {
font-size: 10px;
font-style: italic;
}
/* related post*/
.related {
font-size: smaller;
line-height: 20px;
}
/* author info */
#entry-author-info {
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
/**/background: #e7e7e2;
border-top: 0px;
clear: both;
font-size: 14px;
line-height: 20px;
margin: 24px 0;
overflow: hidden;
padding: 18px 20px;
}
#author-link {
clear: both;
color: #777;
font-size: 12px;
line-height: 18px;
}
/* comments */
#comments h3 {
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
font-weight: normal;
font-style: normal;
color: #444;
}
.comment-notes {
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
font-size: 13px;
}
.comment-author cite {
color: #000;
font-style: italic;
font-family: Georgia, "Times New Roman", Times, serif;
font-weight: normal;
}
.commentmetadata-guestbook {
text-align: right;
margin-bottom: 0;
}
ol.commentlist{
border-bottom: 1px solid #e7e7e7;
}
#respond {
border-top: 0;
margin-left: 5em;
margin-right: 5em;
}
#respond input {
margin: 0 0 9px;
width: 60%;
display: block;
}
#respond textarea {
width: 98%;
}
#respond label {
font-size: small;
}
.form-submit {
text-align: right;
padding-right: 3em;
}
/* livre d'or */
#randomImg {
margin-right: auto;
margin-left: auto;
}
/* sidebar */
input[type="text"],
textarea {
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
}
#primary h3 {
}
.widget_search #s {/* This keeps the search inputs in line */
width: 55%;
}
.widget-container {
/*font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;*/
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
}
.widget-title {
color: #736c4d;
text-shadow: 0px 0px 3px #d9d3c1;
margin-bottom: 24px;
font: normal large "Lucida Grande", Lucida, Verdana, sans-serif;
padding-bottom: 10px;
border-bottom-style: solid;
border-bottom-width: thin;
}
.widget-area ul ul {
margin-left: 0px;
/*list-style-image: url(images/icon_bullet.png);*/
}
/**/
.widget-area ul ul li {
margin-left: 0px;
padding-bottom:0px;
padding-left:22px;
background: url(images/icon_bullet.png) 0 5px no-repeat;
list-style-type: none;
line-height: 24px;
}
/* Footer */
#colophon {
border-top: 1px solid #919191;
margin-top: -1px;
overflow: hidden;
padding: 18px 0;
}
#site-info ul {
font-family: "Lucida Grande", Lucida, Verdana, sans-serif; }
#site-info ul {
}
#site-info li {
display: inline;
list-style-type: none;
border-right: 1px solid #999;
padding-right: 3px
}
/**/
#site-info li:last-child {
border-right:0px;
}
#site-info li a {
color: #999;
text-decoration: none;
font-size: small;
font-weight: normal;
font-style: normal;
}
/* contact form 7 */
.wpcf7-form {
border: thin solid #b1b1b1;
padding: 1em 1em 1em 2em;
margin: 3em 4em;
}
/* caption */
.wp-caption, .entry-caption {
background: transparent;
line-height: 18px;
margin-bottom: 20px;
max-width: 632px !important; /* prevent too-wide images from breaking layout */
padding: 0;
margin-right: auto;
margin-left: auto;
}
.wp-caption img {
margin: 0;
}
.wp-caption p.wp-caption-text, .entry-caption p {
background: #f1f1f1;
padding-top: 2px;
padding-bottom: 1px;
text-align: center;
}
/* search */
#searchform input.inputfield {
width: 150px;
}
#searchform input.pushbutton {
width:20px; height: 20px;border:0;background: transparent url(images/search2.png) no-repeat 0 4px; text-indent: -9999px; cursor:pointer;
}
#searchform input.pushbutton:hover {cursor:pointer;}
/* --------------------------------------------
#jquery-live-search {
background: #fff;
padding: 5px 10px;
max-height: 400px;
overflow: auto;
position: absolute;
z-index: 99;
border: 1px solid #A9A9A9;
border-width: 0 1px 1px 1px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3);
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3);
}
*/
/* -------------------------------------------- */
/* ThreeWP_Ajax_Search */
/* -------------------------------------------- */
/*
The container contains the whole ajax search results box. The "content".
*/
div.threewp_ajax_search_container
{
position: absolute;
z-index: 100;
width: 300px;
height: 400px;
}
/**
Below are the default settings that look OK on TwentyTen.
**/
/**
Content box
**/
div.threewp_ajax_search_results_content
{
position: relative;
overflow: auto;
background-color: #e7e7e2;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
-moz-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
-webkit-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
border-radius: 4px;
font-size: smaller;
}
div.threewp_ajax_search_results_content ul
{
list-style-type: none;
margin: 0 !important;
}
div.threewp_ajax_search_results_content ul li
{
padding: 4px;
background-image: none;
}
div.threewp_ajax_search_results_content ul li a
{
display: block;
height: 100%; /** So that clicking anywhere on that line will work. */
width: 100%;
}
div.threewp_ajax_search_results_content ul li a:link,
div.threewp_ajax_search_results_content ul li a:visited
{
color: #858585;
text-decoration: none;
}
div.threewp_ajax_search_results_content ul li a:hover
{
color: #373737;
text-decoration: underline;
}
/**
The first item has .item_first, which enables us to, in this case, have nice, rounded borders on the top.
*/
div.threewp_ajax_search_results_content ul li.item_first
{
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 4px;
-webkit-border-radius-topleft: 4px;
-webkit-border-radius-topright: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
/**
The last item has .item_last, which enables us to, in this case, have nice, rounded borders on the bottom.
*/
div.threewp_ajax_search_results_content ul li.item_last
{
-moz-border-radius-bottomright: 4px;
-moz-border-radius-bottomleft: 4px;
-webkit-border-radius-bottomright: 4px;
-webkit-border-radius-bottomleft: 4px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
/**
Since we parse actual search page results and display those, remove whatever we don't want.
Another way of doing this would be to use a custom url, like http://testsite.com/?ajax_search&s=
Will be sent as http://testsite.com/?ajax_search&s=text
The theme could then detect $_GET['ajax_search'] and display simpler results. Either way, it's up to you.
**/
div.threewp_ajax_search_results_content .entry-utility,
div.threewp_ajax_search_results_content .meta-nav,
div.threewp_ajax_search_results_content .entry-summary,
div.threewp_ajax_search_results_content .entry-meta,
div.threewp_ajax_search_results_content .entry-content
{
display: none;
}
div.threewp_ajax_search_results_content ul li.item_selected,
div.threewp_ajax_search_results_content ul li:hover
{
background: #ccc;
}
/**
Search in progress!
The container gets the class threewp_ajax_search_in_progress when it's busy doing a search.
This allows us to have fancy loading graphics, which I've taken from the normal Wordpress graphics.
If you've blocked access to /wp-admin then it's your own fault your users aren't seeing moving graphics.
*/
.threewp_ajax_search_in_progress #s
{
color: #ccc;
}
.threewp_ajax_search_in_progress #s
{
background-image: url("../../../../wp-admin/images/loading.gif");
background-position: right;
background-repeat: no-repeat;
}
/* -------------------------------------------- */
/* / ThreeWP_Ajax_Search */
/* -------------------------------------------- */
/* JW Player Plugin for WordPress */
.Custom {
/* background-color: maroon;
text-align: center;
margin-right: auto;
margin-left: auto;*/
}
.JWPlayer {
max-width: 420px;
margin-right: auto;
margin-left: auto;
}
.droite {
text-align: right;
font-style: italic;
font-size: x-small;
color: #858585;
margin-bottom: 3em;
text-decoration: underline;
}
.droite:hover {
color: #373737;
cursor:pointer;
text-decoration: underline;
}
.bloc_exif {
display: none;
text-align: center;
}
#content .bloc_exif img {
border: none;
margin: 0;
display: inline;
vertical-align: bottom;
}
#content .bloc_exif img {
cursor:pointer;
}
#content .bloc_exif ul {
list-style:none;
background:#fff;
border:solid #ddd;
border-width:1px;
margin-right: auto;
margin-left: auto;
width: 620px;
padding: 1em 0.5em;
}
/*
.bloc_exif img {
border: none;
margin: 0;
display: inline;
}
.bloc_exif ul {list-style:none; padding:1em; background:#fff; border:solid #ddd; border-width:1px;
}
*/
#content .bloc_exif li {display:inline; padding-right:0.5em; font-size:0.857em;
}
#map, #map_canvas1, #map_canvas2, #map_canvas3, #map_canvas4, #map_canvas5 {
width: 500px;
height: 350px;
display: none;
margin-right: auto;
margin-left: auto;
margin-bottom: 5em;
}
.close {
}
.mappy {
display: none;
}
.infowindow ul {
list-style-image: none;
display: block;
}
.infowindow li {
font-size: x-small;
}
.infowindow {
width: 350px;

77
footer.php Normal file
View File

@@ -0,0 +1,77 @@
<?php
/**
* The template for displaying the footer.
*
* Contains the closing of the id=main div and all content
* after. Calls sidebar-footer.php for bottom widgets.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?>
</div><!-- #main -->
<div id="footer" role="contentinfo">
<div id="colophon">
<?php
/* A sidebar in the footer? Yep. You can can customize
* your footer with four columns of widgets.
*/
get_sidebar( 'footer' );
?>
<div id="site-info">
<!--a href="<?php echo home_url( '/' ) ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<?php //bloginfo( 'name' ); ?>
</a-->
<?php wp_nav_menu( array( 'container' => 'none' ) ); ?>
</div><!-- #site-info -->
<div id="site-generator">
<?php do_action( 'twentyten_credits' ); ?>
<a href="<?php echo esc_url( __('https://wordpress.org/', 'twentyten-child') ); ?>"
title="<?php esc_attr_e('Semantic Personal Publishing Platform', 'twentyten-child'); ?>" rel="generator">
<?php printf( __('Proudly powered by %s.', 'twentyten-child'), 'WordPress' ); ?>
</a>
</div><!-- #site-generator -->
</div><!-- #colophon -->
</div><!-- #footer -->
</div><!-- #wrapper -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//<?php echo $_SERVER[SERVER_NAME]; ?>/piwik/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 1]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//<?php echo $_SERVER[SERVER_NAME]; ?>/piwik/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
<!--script type="text/javascript" src="<?php echo get_stylesheet_directory_uri(); ?>/js/jquery.swipebox.min.js"></script>
<script type="text/javascript">
$( document ).ready(function() {
/* Basic Gallery */
$( '.swipebox' ).swipebox();
});
</script-->
<?php
/* Always have wp_footer() just before the closing </body>
* tag of your theme, or you will break many plugins, which
* generally use this hook to reference JavaScript files.
*/
wp_footer();
?>
</body>
</html>

1057
functions.php Normal file

File diff suppressed because it is too large Load Diff

101
header.php Normal file
View File

@@ -0,0 +1,101 @@
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<!--[if IE]>
<meta http-equiv="imagetoolbar" content="no" />
<![endif]-->
<title><?php
$host = (($_SERVER['HTTPS'] != "") ? "https" : "http") . '://' . $_SERVER['HTTP_HOST'];
/*
* Print the <title> tag based on what is being viewed.
*/
global $page, $paged;
wp_title( '|', true, 'right' );
// Add the blog name.
bloginfo( 'name' );
// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
echo " | $site_description";
// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );
?>
</title>
<link rel="Shortcut Icon" href="<?php echo $host; ?>/photoblog/images/favicon.ico" type="image/x-icon" />
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
/* We add some JavaScript to pages with the comment form
* to support sites with threaded comments (when in use).
*/
if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' );
?>
<?php
/* Always have wp_head() just before the closing </head>
* tag of your theme, or you will break many plugins, which
* generally use this hook to add elements to <head> such
* as styles, scripts, and meta tags.
wp_enqueue_script('liveSearch', WP_CONTENT_URL.'/themes/twentyten-child/js/jquery.liveSearch.js', array('jquery'));
*/
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/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>
<style type="text/css">
.entry-content img {max-width: 100000%; /* override */}
</style>
<?php
} ?>
</head>
<body <?php body_class(); ?>>
<div id="wrapper" class="hfeed">
<div id="header">
<div id="logo">
<div id="site-name">
<a href="<?php echo $host; ?>/photoblog/index.php" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</div>
<div id="site-description"><?php bloginfo( 'description' ); ?></div>
</div><!-- #logo -->
<div id="pagenav">
<!--ul class="sf-menu" id="nav">
<?php //wp_list_pages('title_li='); ?>
</ul-->
<?php wp_nav_menu( array( 'container' => 'none' ) ); ?>
</div><!-- #pagenav -->
<?php //wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
</div><!-- #header -->
<div id="main">

BIN
images/-favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
images/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

81
js/child.js Executable file
View File

@@ -0,0 +1,81 @@
function toggleExif(id) {
/*alert(id);*/
/**/id2 = id.toString();
var exifDiv = document.getElementById(id2);
if (exifDiv.style.display == "block") {
exifDiv.style.display = "none";
}
else {
exifDiv.style.display = "block";
google.maps.event.trigger(map, 'resize');
map.setZoom( map.getZoom() );
map.setCenter(marker.getPosition());
}
}
function initialize(lat, lng, mark, mapNum) {
var contentString = mark;
var latlng = new google.maps.LatLng(lat,lng);
/*alert(latlng);*/
var myOptions = {
/* http://code.google.com/intl/fr/apis/maps/documentation/javascript/reference.html#MapOptions */
zoom: 11,
center: latlng,
scrollwheel: true,
scaleControl: false,
disableDefaultUI: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
/*
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL
}*/
};
map = new google.maps.Map(document.getElementById("map"+mapNum), myOptions);
marker = createMarker(latlng, '', contentString, map);
}
function createMarker(point, title, content, map) {
var myMarkerImage = new google.maps.MarkerImage('http://maps.google.com/mapfiles/arrow.png');
var myMarkerShadow = new google.maps.MarkerImage('http://maps.google.com/mapfiles/arrowshadow.png');
var marker = new google.maps.Marker({
position: point,
map: map,
icon: myMarkerImage,
shadow: myMarkerShadow,
title: title
});
var infowindow = new google.maps.InfoWindow({
//content: content
content: createInfo(content,content, point),
//width: 500,
//height: 400
});
google.maps.event.addListener(marker, 'click', function() { /* mouseover */
if(curr_infw) { curr_infw.close();} // We check to see if there is an info window stored in curr_infw, if there is, we use .close() to hide the window
curr_infw = infowindow; // Now we put our new info window in to the curr_infw variable
infowindow.open(map, marker); // Now we open the window
});
return marker;
};
// Create information window
function createInfo(title, content, point) {
point = point.toString();
var coord = point.split(',');
latitude = coord[0].substring(1);
var t = coord[1].length;
longitude = coord[1].substring(0,(t-1));
var html = '<div class="infowindow">';
html += '<strong>'+ title +'</strong>';
html += '<p>'+content+'</p>';
html += '<ul><li>Lat: '+(Math.floor(latitude * 100000)/100000)+'</li>';
html += '<li>Long: '+(Math.floor(longitude * 100000)/100000)+'</li>';
html += '</div>';
return html;
}

37
js/infobubble-compiled.js Executable file
View File

@@ -0,0 +1,37 @@
(function(){var b;
function h(a){this.extend(h,google.maps.OverlayView);this.b=[];this.d=null;this.g=100;this.m=!1;a=a||{};void 0==a.backgroundColor&&(a.backgroundColor=this.A);void 0==a.borderColor&&(a.borderColor=this.B);void 0==a.borderRadius&&(a.borderRadius=this.C);void 0==a.borderWidth&&(a.borderWidth=this.D);void 0==a.padding&&(a.padding=this.H);void 0==a.arrowPosition&&(a.arrowPosition=this.u);void 0==a.disableAutoPan&&(a.disableAutoPan=!1);void 0==a.disableAnimation&&(a.disableAnimation=!1);void 0==a.minWidth&&(a.minWidth=
this.G);void 0==a.shadowStyle&&(a.shadowStyle=this.I);void 0==a.arrowSize&&(a.arrowSize=this.v);void 0==a.arrowStyle&&(a.arrowStyle=this.w);void 0==a.closeSrc&&(a.closeSrc=this.F);m(this);this.setValues(a)}window.InfoBubble=h;b=h.prototype;b.v=15;b.w=0;b.I=1;b.G=50;b.u=50;b.H=10;b.D=1;b.B="#ccc";b.C=10;b.A="#fff";b.F="https://maps.gstatic.com/intl/en_us/mapfiles/iw_close.gif";b.extend=function(a,c){return function(a){for(var c in a.prototype)this.prototype[c]=a.prototype[c];return this}.apply(a,[c])};
function m(a){var c=a.c=document.createElement("DIV");c.style.position="absolute";c.style.zIndex=a.g;(a.i=document.createElement("DIV")).style.position="relative";var d=a.j=document.createElement("IMG");d.style.position="absolute";d.style.border=0;d.style.zIndex=a.g+1;d.style.cursor="pointer";d.src=a.get("closeSrc");google.maps.event.addDomListener(d,"click",function(){a.close();google.maps.event.trigger(a,"closeclick")});var e=a.e=document.createElement("DIV");e.style.overflowX="auto";e.style.overflowY=
"auto";e.style.cursor="default";e.style.clear="both";e.style.position="relative";var f=a.k=document.createElement("DIV");e.appendChild(f);f=a.N=document.createElement("DIV");f.style.position="relative";var k=a.n=document.createElement("DIV"),g=a.l=document.createElement("DIV"),l=n(a);k.style.position=g.style.position="absolute";k.style.left=g.style.left="50%";k.style.height=g.style.height="0";k.style.width=g.style.width="0";k.style.marginLeft=t(-l);k.style.borderWidth=t(l);k.style.borderBottomWidth=
0;l=a.a=document.createElement("DIV");l.style.position="absolute";c.style.display=l.style.display="none";c.appendChild(a.i);c.appendChild(d);c.appendChild(e);f.appendChild(k);f.appendChild(g);c.appendChild(f);c=document.createElement("style");c.setAttribute("type","text/css");a.h="_ibani_"+Math.round(1E4*Math.random());c.textContent="."+a.h+"{-webkit-animation-name:"+a.h+";-webkit-animation-duration:0.5s;-webkit-animation-iteration-count:1;}@-webkit-keyframes "+a.h+" {from {-webkit-transform: scale(0)}50% {-webkit-transform: scale(1.2)}90% {-webkit-transform: scale(0.95)}to {-webkit-transform: scale(1)}}";
document.getElementsByTagName("head")[0].appendChild(c)}b.ea=function(a){this.set("backgroundClassName",a)};h.prototype.setBackgroundClassName=h.prototype.ea;h.prototype.O=function(){this.k.className=this.get("backgroundClassName")};h.prototype.backgroundClassName_changed=h.prototype.O;h.prototype.pa=function(a){this.set("tabClassName",a)};h.prototype.setTabClassName=h.prototype.pa;h.prototype.sa=function(){w(this)};h.prototype.tabClassName_changed=h.prototype.sa;
h.prototype.da=function(a){this.set("arrowStyle",a)};h.prototype.setArrowStyle=h.prototype.da;h.prototype.M=function(){this.p()};h.prototype.arrowStyle_changed=h.prototype.M;function n(a){return parseInt(a.get("arrowSize"),10)||0}h.prototype.ca=function(a){this.set("arrowSize",a)};h.prototype.setArrowSize=h.prototype.ca;h.prototype.p=function(){this.r()};h.prototype.arrowSize_changed=h.prototype.p;h.prototype.ba=function(a){this.set("arrowPosition",a)};h.prototype.setArrowPosition=h.prototype.ba;
h.prototype.L=function(){var a=parseInt(this.get("arrowPosition"),10)||0;this.n.style.left=this.l.style.left=a+"%";x(this)};h.prototype.arrowPosition_changed=h.prototype.L;h.prototype.setZIndex=function(a){this.set("zIndex",a)};h.prototype.setZIndex=h.prototype.setZIndex;h.prototype.getZIndex=function(){return parseInt(this.get("zIndex"),10)||this.g};h.prototype.ua=function(){var a=this.getZIndex();this.c.style.zIndex=this.g=a;this.j.style.zIndex=a+1};h.prototype.zIndex_changed=h.prototype.ua;
h.prototype.na=function(a){this.set("shadowStyle",a)};h.prototype.setShadowStyle=h.prototype.na;h.prototype.qa=function(){var a="",c="",d="";switch(parseInt(this.get("shadowStyle"),10)||0){case 0:a="none";break;case 1:c="40px 15px 10px rgba(33,33,33,0.3)";d="transparent";break;case 2:c="0 0 2px rgba(33,33,33,0.3)",d="rgba(33,33,33,0.35)"}this.a.style.boxShadow=this.a.style.webkitBoxShadow=this.a.style.MozBoxShadow=c;this.a.style.backgroundColor=d;this.m&&(this.a.style.display=a,this.draw())};
h.prototype.shadowStyle_changed=h.prototype.qa;h.prototype.ra=function(){this.set("hideCloseButton",!1)};h.prototype.showCloseButton=h.prototype.ra;h.prototype.R=function(){this.set("hideCloseButton",!0)};h.prototype.hideCloseButton=h.prototype.R;h.prototype.S=function(){this.j.style.display=this.get("hideCloseButton")?"none":""};h.prototype.hideCloseButton_changed=h.prototype.S;h.prototype.setBackgroundColor=function(a){a&&this.set("backgroundColor",a)};h.prototype.setBackgroundColor=h.prototype.setBackgroundColor;
h.prototype.P=function(){var a=this.get("backgroundColor");this.e.style.backgroundColor=a;this.l.style.borderColor=a+" transparent transparent";w(this)};h.prototype.backgroundColor_changed=h.prototype.P;h.prototype.setBorderColor=function(a){a&&this.set("borderColor",a)};h.prototype.setBorderColor=h.prototype.setBorderColor;
h.prototype.Q=function(){var a=this.get("borderColor"),c=this.e,d=this.n;c.style.borderColor=a;d.style.borderColor=a+" transparent transparent";c.style.borderStyle=d.style.borderStyle=this.l.style.borderStyle="solid";w(this)};h.prototype.borderColor_changed=h.prototype.Q;h.prototype.fa=function(a){this.set("borderRadius",a)};h.prototype.setBorderRadius=h.prototype.fa;function z(a){return parseInt(a.get("borderRadius"),10)||0}
h.prototype.q=function(){var a=z(this),c=A(this);this.e.style.borderRadius=this.e.style.MozBorderRadius=this.e.style.webkitBorderRadius=this.a.style.borderRadius=this.a.style.MozBorderRadius=this.a.style.webkitBorderRadius=t(a);this.i.style.paddingLeft=this.i.style.paddingRight=t(a+c);x(this)};h.prototype.borderRadius_changed=h.prototype.q;function A(a){return parseInt(a.get("borderWidth"),10)||0}h.prototype.ga=function(a){this.set("borderWidth",a)};h.prototype.setBorderWidth=h.prototype.ga;
h.prototype.r=function(){var a=A(this);this.e.style.borderWidth=t(a);this.i.style.top=t(a);var a=A(this),c=n(this),d=parseInt(this.get("arrowStyle"),10)||0,e=t(c),f=t(Math.max(0,c-a)),k=this.n,g=this.l;this.N.style.marginTop=t(-a);k.style.borderTopWidth=e;g.style.borderTopWidth=f;0==d||1==d?(k.style.borderLeftWidth=e,g.style.borderLeftWidth=f):k.style.borderLeftWidth=g.style.borderLeftWidth=0;0==d||2==d?(k.style.borderRightWidth=e,g.style.borderRightWidth=f):k.style.borderRightWidth=g.style.borderRightWidth=
0;2>d?(k.style.marginLeft=t(-c),g.style.marginLeft=t(-(c-a))):k.style.marginLeft=g.style.marginLeft=0;k.style.display=0==a?"none":"";w(this);this.q();x(this)};h.prototype.borderWidth_changed=h.prototype.r;h.prototype.ma=function(a){this.set("padding",a)};h.prototype.setPadding=h.prototype.ma;h.prototype.ha=function(a){a&&this.j&&(this.j.src=a)};h.prototype.setCloseSrc=h.prototype.ha;function B(a){return parseInt(a.get("padding"),10)||0}
h.prototype.Z=function(){var a=B(this);this.e.style.padding=t(a);w(this);x(this)};h.prototype.padding_changed=h.prototype.Z;function t(a){return a?a+"px":a}function C(a){var c="mousedown mousemove mouseover mouseout mouseup mousewheel DOMMouseScroll touchstart touchend touchmove dblclick contextmenu click".split(" "),d=a.c;a.s=[];for(var e=0,f;f=c[e];e++)a.s.push(google.maps.event.addDomListener(d,f,function(a){a.cancelBubble=!0;a.stopPropagation&&a.stopPropagation()}))}
h.prototype.onAdd=function(){this.c||m(this);C(this);var a=this.getPanes();a&&(a.floatPane.appendChild(this.c),a.floatShadow.appendChild(this.a))};h.prototype.onAdd=h.prototype.onAdd;
h.prototype.draw=function(){var a=this.getProjection();if(a){var c=this.get("position");if(c){var d=0;this.d&&(d=this.d.offsetHeight);var e=D(this),f=n(this),k=parseInt(this.get("arrowPosition"),10)||0,k=k/100,a=a.fromLatLngToDivPixel(c),c=this.e.offsetWidth,g=this.c.offsetHeight;if(c){g=a.y-(g+f);e&&(g-=e);var l=a.x-c*k;this.c.style.top=t(g);this.c.style.left=t(l);switch(parseInt(this.get("shadowStyle"),10)){case 1:this.a.style.top=t(g+d-1);this.a.style.left=t(l);this.a.style.width=t(c);this.a.style.height=
t(this.e.offsetHeight-f);break;case 2:c*=.8,this.a.style.top=e?t(a.y):t(a.y+f),this.a.style.left=t(a.x-c*k),this.a.style.width=t(c),this.a.style.height=t(2)}}}else this.close()}};h.prototype.draw=h.prototype.draw;h.prototype.onRemove=function(){this.c&&this.c.parentNode&&this.c.parentNode.removeChild(this.c);this.a&&this.a.parentNode&&this.a.parentNode.removeChild(this.a);for(var a=0,c;c=this.s[a];a++)google.maps.event.removeListener(c)};h.prototype.onRemove=h.prototype.onRemove;h.prototype.T=function(){return this.m};
h.prototype.isOpen=h.prototype.T;h.prototype.close=function(){this.c&&(this.c.style.display="none",this.c.className=this.c.className.replace(this.h,""));this.a&&(this.a.style.display="none",this.a.className=this.a.className.replace(this.h,""));this.m=!1};h.prototype.close=h.prototype.close;h.prototype.open=function(a,c){var d=this;window.setTimeout(function(){E(d,a,c)},0)};
function E(a,c,d){F(a);c&&a.setMap(c);d&&(a.set("anchor",d),a.bindTo("anchorPoint",d),a.bindTo("position",d));a.c.style.display=a.a.style.display="";a.get("disableAnimation")||(a.c.className+=" "+a.h,a.a.className+=" "+a.h);x(a);a.m=!0;a.get("disableAutoPan")||window.setTimeout(function(){a.o()},200)}h.prototype.open=h.prototype.open;h.prototype.setPosition=function(a){a&&this.set("position",a)};h.prototype.setPosition=h.prototype.setPosition;h.prototype.getPosition=function(){return this.get("position")};
h.prototype.getPosition=h.prototype.getPosition;h.prototype.$=function(){this.draw()};h.prototype.position_changed=h.prototype.$;h.prototype.o=function(){var a=this.getProjection();if(a&&this.c){var c=D(this),d=this.c.offsetHeight+c,c=this.get("map"),e=c.getDiv().offsetHeight,f=this.getPosition(),k=a.fromLatLngToContainerPixel(c.getCenter()),f=a.fromLatLngToContainerPixel(f),d=k.y-d,e=e-k.y,k=0;0>d&&(k=(-1*d+e)/2);f.y-=k;f=a.fromContainerPixelToLatLng(f);c.getCenter()!=f&&c.panTo(f)}};
h.prototype.panToView=h.prototype.o;function G(a){a=a.replace(/^\s*([\S\s]*)\b\s*$/,"$1");var c=document.createElement("DIV");c.innerHTML=a;if(1==c.childNodes.length)return c.removeChild(c.firstChild);for(a=document.createDocumentFragment();c.firstChild;)a.appendChild(c.firstChild);return a}function H(a){if(a)for(var c;c=a.firstChild;)a.removeChild(c)}h.prototype.setContent=function(a){this.set("content",a)};h.prototype.setContent=h.prototype.setContent;h.prototype.getContent=function(){return this.get("content")};
h.prototype.getContent=h.prototype.getContent;function F(a){if(a.k){H(a.k);var c=a.getContent();if(c){"string"==typeof c&&(c=G(c));a.k.appendChild(c);for(var c=a.k.getElementsByTagName("IMG"),d=0,e;e=c[d];d++)google.maps.event.addDomListener(e,"load",function(){var c=!a.get("disableAutoPan");x(a);!c||0!=a.b.length&&0!=a.d.index||a.o()});google.maps.event.trigger(a,"domready")}x(a)}}
function w(a){if(a.b&&a.b.length){for(var c=0,d;d=a.b[c];c++)I(a,d.f);a.d.style.zIndex=a.g;c=A(a);d=B(a)/2;a.d.style.borderBottomWidth=0;a.d.style.paddingBottom=t(d+c)}}
function I(a,c){var d=a.get("backgroundColor"),e=a.get("borderColor"),f=z(a),k=A(a),g=B(a),l=t(-Math.max(g,f)),f=t(f),r=a.g;c.index&&(r-=c.index);var d={cssFloat:"left",position:"relative",cursor:"pointer",backgroundColor:d,border:t(k)+" solid "+e,padding:t(g/2)+" "+t(g),marginRight:l,whiteSpace:"nowrap",borderRadiusTopLeft:f,MozBorderRadiusTopleft:f,webkitBorderTopLeftRadius:f,borderRadiusTopRight:f,MozBorderRadiusTopright:f,webkitBorderTopRightRadius:f,zIndex:r,display:"inline"},p;for(p in d)c.style[p]=
d[p];p=a.get("tabClassName");void 0!=p&&(c.className+=" "+p)}function J(a,c){c.U=google.maps.event.addDomListener(c,"click",function(){K(a,this)})}h.prototype.oa=function(a){(a=this.b[a-1])&&K(this,a.f)};h.prototype.setTabActive=h.prototype.oa;
function K(a,c){if(c){var d=B(a)/2,e=A(a);if(a.d){var f=a.d;f.style.zIndex=a.g-f.index;f.style.paddingBottom=t(d);f.style.borderBottomWidth=t(e)}c.style.zIndex=a.g;c.style.borderBottomWidth=0;c.style.marginBottomWidth="-10px";c.style.paddingBottom=t(d+e);a.setContent(a.b[c.index].content);F(a);a.d=c;x(a)}else a.setContent(""),F(a)}h.prototype.ja=function(a){this.set("maxWidth",a)};h.prototype.setMaxWidth=h.prototype.ja;h.prototype.W=function(){x(this)};h.prototype.maxWidth_changed=h.prototype.W;
h.prototype.ia=function(a){this.set("maxHeight",a)};h.prototype.setMaxHeight=h.prototype.ia;h.prototype.V=function(){x(this)};h.prototype.maxHeight_changed=h.prototype.V;h.prototype.la=function(a){this.set("minWidth",a)};h.prototype.setMinWidth=h.prototype.la;h.prototype.Y=function(){x(this)};h.prototype.minWidth_changed=h.prototype.Y;h.prototype.ka=function(a){this.set("minHeight",a)};h.prototype.setMinHeight=h.prototype.ka;h.prototype.X=function(){x(this)};h.prototype.minHeight_changed=h.prototype.X;
h.prototype.J=function(a,c){var d=document.createElement("DIV");d.innerHTML=a;I(this,d);J(this,d);this.i.appendChild(d);this.b.push({label:a,content:c,f:d});d.index=this.b.length-1;d.style.zIndex=this.g-d.index;this.d||K(this,d);d.className=d.className+" "+this.h;x(this)};h.prototype.addTab=h.prototype.J;
h.prototype.ta=function(a,c,d){!this.b.length||0>a||a>=this.b.length||(a=this.b[a],void 0!=c&&(a.f.innerHTML=a.label=c),void 0!=d&&(a.content=d),this.d==a.f&&(this.setContent(a.content),F(this)),x(this))};h.prototype.updateTab=h.prototype.ta;
h.prototype.aa=function(a){if(!(!this.b.length||0>a||a>=this.b.length)){var c=this.b[a];c.f.parentNode.removeChild(c.f);google.maps.event.removeListener(c.f.U);this.b.splice(a,1);delete c;for(var d=0,e;e=this.b[d];d++)e.f.index=d;c.f==this.d&&(this.d=this.b[a]?this.b[a].f:this.b[a-1]?this.b[a-1].f:void 0,K(this,this.d));x(this)}};h.prototype.removeTab=h.prototype.aa;
function L(a,c,d){var e=document.createElement("DIV");e.style.display="inline";e.style.position="absolute";e.style.visibility="hidden";"string"==typeof a?e.innerHTML=a:e.appendChild(a.cloneNode(!0));document.body.appendChild(e);a=new google.maps.Size(e.offsetWidth,e.offsetHeight);c&&a.width>c&&(e.style.width=t(c),a=new google.maps.Size(e.offsetWidth,e.offsetHeight));d&&a.height>d&&(e.style.height=t(d),a=new google.maps.Size(e.offsetWidth,e.offsetHeight));document.body.removeChild(e);delete e;return a}
function x(a){var c=a.get("map");if(c){var d=B(a);A(a);z(a);var e=n(a),f=c.getDiv(),k=2*e,c=f.offsetWidth-k,f=f.offsetHeight-k-D(a),k=0,g=a.get("minWidth")||0,l=a.get("minHeight")||0,r=a.get("maxWidth")||0,p=a.get("maxHeight")||0,r=Math.min(c,r),p=Math.min(f,p),y=0;if(a.b.length)for(var u=0,q;q=a.b[u];u++){var v=L(q.f,r,p);q=L(q.content,r,p);g<v.width&&(g=v.width);y+=v.width;l<v.height&&(l=v.height);v.height>k&&(k=v.height);g<q.width&&(g=q.width);l<q.height&&(l=q.height)}else u=a.get("content"),"string"==
typeof u&&(u=G(u)),u&&(q=L(u,r,p),g<q.width&&(g=q.width),l<q.height&&(l=q.height));r&&(g=Math.min(g,r));p&&(l=Math.min(l,p));g=Math.max(g,y);g==y&&(g+=2*d);g=Math.max(g,2*e);g>c&&(g=c);l>f&&(l=f-k);a.i&&(a.t=k,a.i.style.width=t(y));a.e.style.width=t(g);a.e.style.height=t(l)}z(a);d=A(a);c=2;a.b.length&&a.t&&(c+=a.t);e=2+d;(f=a.e)&&f.clientHeight<f.scrollHeight&&(e+=15);a.j.style.right=t(e);a.j.style.top=t(c+d);a.draw()}function D(a){return a.get("anchor")&&(a=a.get("anchorPoint"))?-1*a.y:0}
h.prototype.K=function(){this.draw()};h.prototype.anchorPoint_changed=h.prototype.K;})();

4
js/jquery-2.1.0.min.js vendored Executable file

File diff suppressed because one or more lines are too long

17
js/jquery.liveSearch.css Normal file
View File

@@ -0,0 +1,17 @@
#jquery-live-search {
background: #fff;
padding: 5px 10px;
max-height: 400px;
overflow: auto;
position: absolute;
z-index: 99;
border: 1px solid #A9A9A9;
border-width: 0 1px 1px 1px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3);
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3);
}

1
js/jquery.liveSearch.js Normal file
View File

@@ -0,0 +1 @@
jQuery.fn.liveSearch=function(conf){var config=jQuery.extend({url:'/search-results.php?q=',id:'jquery-live-search',duration:400,typeDelay:200,loadingClass:'loading',onSlideUp:function(){},uptadePosition:false},conf);var liveSearch=jQuery('#'+config.id);if(!liveSearch.length){liveSearch=jQuery('<div id="'+config.id+'"></div>').appendTo(document.body).hide().slideUp(0);jQuery(document.body).click(function(event){var clicked=jQuery(event.target);if(!(clicked.is('#'+config.id)||clicked.parents('#'+config.id).length||clicked.is('input'))){liveSearch.slideUp(config.duration,function(){config.onSlideUp()})}})}return this.each(function(){var input=jQuery(this).attr('autocomplete','off');var liveSearchPaddingBorderHoriz=parseInt(liveSearch.css('paddingLeft'),10)+parseInt(liveSearch.css('paddingRight'),10)+parseInt(liveSearch.css('borderLeftWidth'),10)+parseInt(liveSearch.css('borderRightWidth'),10);var repositionLiveSearch=function(){var tmpOffset=input.offset();var inputDim={left:tmpOffset.left,top:tmpOffset.top,width:input.outerWidth(),height:input.outerHeight()};inputDim.topPos=inputDim.top+inputDim.height;inputDim.totalWidth=inputDim.width-liveSearchPaddingBorderHoriz;liveSearch.css({position:'absolute',left:inputDim.left+'px',top:inputDim.topPos+'px',width:inputDim.totalWidth+'px'})};var showLiveSearch=function(){repositionLiveSearch();$(window).unbind('resize',repositionLiveSearch);$(window).bind('resize',repositionLiveSearch);liveSearch.slideDown(config.duration)};var hideLiveSearch=function(){liveSearch.slideUp(config.duration,function(){config.onSlideUp()})};input.focus(function(){if(this.value!==''){if(liveSearch.html()==''){this.lastValue='';input.keyup()}else{setTimeout(showLiveSearch,1)}}}).keyup(function(){if(this.value!=this.lastValue){input.addClass(config.loadingClass);var q=this.value;if(this.timer){clearTimeout(this.timer)}this.timer=setTimeout(function(){jQuery.get(config.url+q,function(data){input.removeClass(config.loadingClass);if(data.length&&q.length){liveSearch.html(data);showLiveSearch()}else{hideLiveSearch()}})},config.typeDelay);this.lastValue=this.value}})})};

2
js/jquery.swipebox.min.js vendored Executable file

File diff suppressed because one or more lines are too long

41
js/zenphoto.js Normal file
View File

@@ -0,0 +1,41 @@
// JavaScript Document
// [zenphoto album="sports-mecaniques/gp-france" image="2010-05-23_gp-france-2010_5321.jpg"]
// ed.selection.setContent('[mylink]' + ed.selection.getContent() + '[/mylink]');
//image : url+'/mylink.png',
tinymce.create('tinymce.plugins.zp', {
init : function(editor, url) {
editor.addButton('zp', {
title : 'Zenphoto',
image : url+'/zenphoto.gif',
onclick : function() {
editor.selection.setContent('[zenphoto album="" image=""]');
editor.undoManager.add();
}
});
},
createControl : function(n, cm) {
return null;
},
});
tinymce.PluginManager.add('zp', tinymce.plugins.zp);
/*
tinymce.create('tinymce.plugins.spoil',{
init : function(editor,url){
editor.addButton('spoiler',{
title : 'Ajouter un Spoiler',
image : url + '/zenphoto.gif',
onclick : function(){
editor.selection.setContent('[spoiler]'+editor.selection.getContent()+'[/spoiler]')
}
})
},
createControl : function(n,cm){
return null;
}
});
tinymce.PluginManager.add('spoiler',tinymce.plugins.spoil);
*/

BIN
languages/Archive 6.zip Normal file

Binary file not shown.

BIN
languages/Archive 7.zip Normal file

Binary file not shown.

BIN
languages/Archive 8.zip Normal file

Binary file not shown.

BIN
languages/fr_FR.mo Normal file

Binary file not shown.

517
languages/fr_FR.po Normal file
View File

@@ -0,0 +1,517 @@
msgid ""
msgstr ""
"Project-Id-Version: twentyten-child\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-13 13:49+0100\n"
"PO-Revision-Date: 2016-03-13 13:49+0100\n"
"Last-Translator: Bruno <bruno@clicclac.info>\n"
"Language-Team: bruno@clicclac.info\n"
"Language: fr_FR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-KeywordsList: __;_e;gettext;gettext_noop;__ngettext:1,2\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Generator: Poedit 1.8.7\n"
"X-Poedit-SearchPath-0: /Library/WebServer/Documents/wordpress/wp-content/"
"themes/twentyten-child\n"
"X-Poedit-SearchPathExcluded-0: /Library/WebServer/Documents/wordpress/wp-"
"content/themes/twentyten-child/exclus\n"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/-sidebar.php:19
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/sidebar.php:19
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/sidebar.php:39
msgid "Archives"
msgstr "Archives"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/-sidebar.php:28
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/sidebar.php:94
msgid "Recent Posts"
msgstr "Articles réçents"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/-sidebar.php:61
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/sidebar.php:84
msgid "Pages"
msgstr "Pages"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/-sidebar.php:78
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/-sidebar.php:109
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/sidebar.php:46
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/sidebar.php:135
msgid "Meta"
msgstr "Méta"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/-sidebar.php:114
msgid "RSS"
msgstr "RSS"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/-sidebar.php:115
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/sidebar.php:147
msgid "Trackback"
msgstr "Trackback"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/-sidebar.php:117
msgid "Print This Post"
msgstr "Imprimer cet article"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/-sidebar.php:117
msgid "Print This Page"
msgstr "Imprimer cet page"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/footer.php:34
msgid "http://wordpress.org/"
msgstr "http://fr.wordpress.org/"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/footer.php:36
#, php-format
msgid "Proudly powered by %s."
msgstr "Fièrement propulsé par %s."
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:314
#, php-format
msgid "<span class=\"maj\"> Article updated the %1$s at %2$s </span>"
msgstr "<span class=\"maj\"> Article mis à jour le %1$s à %2$s </span>"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:330
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:485
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop-attachment.php:34
#, php-format
msgid "%1$s"
msgstr "%1$s"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:350
#, php-format
msgid ""
"Posted in %1$s and tagged %2$s. <a href=\"%3$s\" title=\"Permalink to %4$s\" "
"rel=\"bookmark\">Permalink</a>."
msgstr ""
"Publié dans %1$s. Mots-clés %2$s. Mettre en favoris avec <a href=\"%3$s\" "
"title=\"Permalien pour %4$s\" rel=\"bookmark\">ce permalien</a>."
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:352
#, php-format
msgid ""
"This entry was posted in %1$s. Bookmark the <a href=\"%3$s\" title="
"\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
"Cette entrée a été publiée dans %1$s. Mettre en favoris avec ce <a href="
"\"%3$s\" title=\"Permalien pour %4$s\" rel=\"bookmark\">permalien</a>."
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:354
#, php-format
msgid ""
"Bookmark the <a href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark"
"\">permalink</a>."
msgstr ""
"Mettre en favoris avec ce <a href=\"%3$s\" title=\"Permalien pour %4$s\" rel="
"\"bookmark\">permalien</a>."
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:370
msgid "finish reading "
msgstr "Continuer la lecture"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:400
#, php-format
msgid "%1$s %2$s<span class=\"says\"> says:</span>"
msgstr "%1$s %2$s<span class=\"says\"> dit:</span>"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:403
msgid "Your comment is awaiting moderation."
msgstr "Votre commentaire est en attente de modération."
#. translators: 1: date, 2: time
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:411
#, php-format
msgid "%1$s at %2$s"
msgstr "%1$s à %2$s"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:411
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:436
msgid "(Edit)"
msgstr "(Modifier)"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:436
msgid "Pingback:"
msgstr "Pingback:"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:474
msgid "yesterday"
msgstr "hier"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:475
msgid "the day before yesterday"
msgstr "avant-hier"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:476
msgid "two days ago"
msgstr "avant-avant-hier"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:477
#, php-format
msgid "%1$s days ago"
msgstr "il y a %1$s jours"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:480
#, php-format
msgid "%1$s week ago"
msgstr "il y a %1$s semaine"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:481
#, php-format
msgid "%1$s weeks ago"
msgstr "il y a %1$s semaines"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:584
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:680
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:944
msgid "Aperture"
msgstr "Ouverture"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:588
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:684
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:948
msgid "Shutter speed"
msgstr "Vitesse"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:607
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:703
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:952
msgid "Focal length"
msgstr "Focale"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:610
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:706
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:955
msgid "Camera"
msgstr "Appareil"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:620
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:709
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:972
msgid "Taken"
msgstr "Date"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:620
msgid "j F, Y"
msgstr "d.m.Y à H:i"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/functions.php:983
msgid "See on Google Maps"
msgstr "Voir sur Google Maps"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/header.php:36
#, php-format
msgid "Page %s"
msgstr "Page %s"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:18
msgid ""
"This post is password protected. Enter the password to view any comments."
msgstr ""
"Cet article est protégé par un mot de passe. Saisissez le mot de passe pour "
"lire les commentaires."
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:41
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:60
msgid "<span class=\"meta-nav\">&larr;</span> Older Comments"
msgstr "<span class=\"meta-nav\">&larr;</span> Commentaires plus anciens"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:42
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:61
msgid "Newer Comments <span class=\"meta-nav\">&rarr;</span>"
msgstr "Commentaires plus récents <span class=\"meta-nav\">&rarr;</span>"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:72
msgid "Comments are closed."
msgstr "Les commentaires sont fermés."
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:80
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/page-contact.php:261
msgid "Name"
msgstr "Nom"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:82
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/page-contact.php:264
msgid "Email"
msgstr "Mail"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:82
msgid " (not be published)."
msgstr " (ne sera pas publié)."
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:84
msgid "Website"
msgstr "Site web"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:87
msgid "City"
msgstr "Ville"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:89
msgid "State"
msgstr "Pays"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:289
msgid "Your message"
msgstr "Votre message"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:290
#, php-format
msgid "You must be <a href=\"%s\">logged in</a> to post a comment."
msgstr ""
"Vous devez <a href=\"%s\">être connecté</a> pour rédiger un commentaire."
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:291
#, php-format
msgid ""
"Logged in as <a href=\"%1$s\">%2$s</a>. <a href=\"%3$s\" title=\"Log out of "
"this account\">Log out?</a>"
msgstr ""
"Connecté en tant que <a href=\"%1$s\">%2$s</a>. <a href=\"%3$s\" title=\"Se "
"déconnecter de ce compte\">Se déconnecter&nbsp;?</a></p>"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:299
msgid "Leave a Message"
msgstr "Laisser un message"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:300
#, php-format
msgid "Leave a Reply to %s"
msgstr "Répondre à %s"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:301
msgid "Cancel reply"
msgstr "Annuler la réponse."
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-comments.php:302
msgid "Sign Guestbook"
msgstr "Signer le livre"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/livre-d-or.php:28
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop-attachment.php:139
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop-page.php:29
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop-single.php:163
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:145
msgid "Pages:"
msgstr "Pages:"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop-attachment.php:22
#, php-format
msgid "Return to %s"
msgstr "Retourner à %s"
#. translators: %s - title of parent post
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop-attachment.php:24
#, php-format
msgid "<span class=\"meta-nav\">&larr;</span> %s"
msgstr "<span class=\"meta-nav\">&larr;</span> %s"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop-attachment.php:44
#, php-format
msgid "Full size is %s pixels"
msgstr "Pleine taille: %s pixels"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop-attachment.php:47
msgid "Link to full-size image"
msgstr "Liens vers l'image pleine taille"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop-attachment.php:54
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop-attachment.php:150
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop-page.php:30
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop-single.php:230
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:101
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:124
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:166
msgid "Edit"
msgstr "Modifier"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop-attachment.php:137
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:116
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:144
msgid "Continue reading <span class=\"meta-nav\">&rarr;</span>"
msgstr "Lire la suite <span class=\"meta-nav\">&rarr;</span>"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop-single.php:172
#, php-format
msgid "About %s"
msgstr "A propos de %s"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop-single.php:176
#, php-format
msgid "View all posts by %s <span class=\"meta-nav\">&rarr;</span>"
msgstr "Voir tous les articles de %s <span class=\"meta-nav\">&rarr;</span>"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop-single.php:204
msgid "Related articles:"
msgstr "Voir aussi:"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:25
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:179
msgid "<span class=\"meta-nav\">&larr;</span> Older posts"
msgstr "<span class=\"meta-nav\">&larr;</span> Messages récents"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:26
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:180
msgid "Newer posts <span class=\"meta-nav\">&rarr;</span>"
msgstr "Messages récents <span class=\"meta-nav\">&rarr;</span>"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:33
msgid "Not Found"
msgstr "Non trouvé"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:35
msgid ""
"Apologies, but no results were found for the requested archive. Perhaps "
"searching will help find a related post."
msgstr ""
"Toutes nos excuses, mais votre requête n&rsquo;a donné aucun résultat. Peut-"
"être qu&rsquo;une recherche peut vous indiquer un article lié."
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:94
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:97
msgid "More Galleries"
msgstr "Plus de galeries"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:100
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:123
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:165
msgid "Leave a comment"
msgstr "Laisser un commentaire"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:100
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:123
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:165
msgid "1 Comment"
msgstr "1 commentaire"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:100
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:123
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:165
msgid "% Comments"
msgstr "% commentaires"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:152
#, php-format
msgid "<span class=\"%1$s\">Posted in</span> %2$s"
msgstr "<span class=\"%1$s\">Posté dans</span> %2$s"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/loop.php:161
#, php-format
msgid "<span class=\"%1$s\">Tagged</span> %2$s"
msgstr "<span class=\"%1$s\">Tags</span> %2$s"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/page-contact.php:69
msgid "Human verification incorrect."
msgstr "Vérification humaine incorrecte."
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/page-contact.php:70
msgid "Please supply all information."
msgstr "Merci de remplir toutes les informations."
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/page-contact.php:71
msgid "Email Address Invalid."
msgstr "Adresse mail non-valide."
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/page-contact.php:72
msgid "Message was not sent. Try Again."
msgstr "Le message n'a pas été envoyé. Ré-essayer."
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/page-contact.php:73
msgid "Thanks! Your message has been sent."
msgstr "Merci! Votre message a été envoyé."
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/page-contact.php:74
msgid "SPAM !!!"
msgstr "SPAM !!!"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/page-contact.php:101
msgid "Someone sent a message from "
msgstr "Un lecteur vous a envoyé un message depuis "
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/page-contact.php:262
msgid "Your name"
msgstr "Votre nom"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/page-contact.php:265
msgid "Your email"
msgstr "Votre email"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/page-contact.php:267
msgid "Message"
msgstr "Message"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/page-contact.php:268
msgid "Your Message..."
msgstr "Votre message..."
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/page-contact.php:270
msgid "Human ?"
msgstr "Humain ?"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/page-contact.php:274
msgid "Send"
msgstr "Envoyer"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/searchform.php:2
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/searchform.php:11
msgid "Search for:"
msgstr "Rechercher:"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/searchform.php:4
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/searchform.php:13
msgid "Search"
msgstr "Recherche"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/sidebar.php:140
msgid "RSS Feed for Blog Entries"
msgstr "Flux RSS des articles"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/sidebar.php:140
msgid "Entries <abbr title=\"Really Simple Syndication\">RSS</abbr>"
msgstr "Flux <abbr title=\"Really Simple Syndication\">RSS</abbr> des articles"
#: /Library/WebServer/Documents/wordpress/wp-content/themes/twentyten-child/sidebar.php:144
msgid "Subscribe to comments on this post."
msgstr "Abonnez-vous aux commentaires sur ce post."
#~ msgid ""
#~ "<abbr title=\"Really Simple Syndication\">RSS</abbr> feed for comments on "
#~ "this post."
#~ msgstr ""
#~ "<abbr title=« Really Simple Syndication »>Flux RSS des</abbr> "
#~ "commentaires sur cet article."
#~ msgid "Display/hide on map"
#~ msgstr "Afficher/masquer la carte"
#~ msgid "Human Verification"
#~ msgstr "Vérification humaine"
#~ msgid "%1$s day ago"
#~ msgstr "il y a %1$s jour"
#, fuzzy
#~ msgid " jour"
#~ msgstr "heure"
#~ msgid "sec"
#~ msgstr "sec"
#~ msgid "min"
#~ msgstr "min"
#~ msgid "day"
#~ msgstr "jour"
#~ msgid "week"
#~ msgstr "semaine"
#~ msgid "month"
#~ msgstr "mois"
#~ msgid "year"
#~ msgstr "an"
#~ msgid "ago"
#~ msgstr "il y a"

307
livre-comments.php Normal file
View File

@@ -0,0 +1,307 @@
<?php
/**
* The template for displaying Comments.
*
* The area of the page that contains both current comments
* and the comment form. The actual display of comments is
* handled by a callback to twentyten_comment which is
* located in the functions.php file.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?>
<div id="comments">
<?php if ( post_password_required() ) : ?>
<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten-child' ); ?></p>
</div><!-- #comments -->
<?php
/* Stop the rest of comments.php from being processed,
* but don't kill the script entirely -- we still have
* to fully load the template.
*/
return;
endif;
?>
<?php
// You can start editing here -- including this comment!
?>
<?php if ( have_comments() ) : ?>
<h3 id="comments-title"><?php /*
printf( _n( 'One guestbook entries to %2$s', '%1$s guestbook entries to %2$s', get_comments_number(), 'twentyten' ),
number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' ); */
?></h3>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<div class="navigation">
<div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'twentyten-child' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'twentyten-child' ) ); ?></div>
</div> <!-- .navigation -->
<?php endif; // check for comment navigation ?>
<ol class="commentlist">
<?php
/* Loop through and list the comments. Tell wp_list_comments()
* to use twentyten_comment() to format the comments.
* If you want to overload this in a child theme then you can
* define twentyten_comment() and that will be used instead.
* See twentyten_comment() in twentyten/functions.php for more.
*/
wp_list_comments( array( 'callback' => 'twentyten_comment_guestbook' ) );
?>
</ol>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<div class="navigation">
<div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'twentyten-child' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'twentyten-child' ) ); ?></div>
</div><!-- .navigation -->
<?php endif; // check for comment navigation ?>
<?php else : // or, if we don't have comments:
/* If there are no comments and comments are closed,
* let's leave a little note, shall we?
*/
if ( ! comments_open() ) :
?>
<p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten-child' ); ?></p>
<?php endif; // end ! comments_open() ?>
<?php endif; // end have_comments() ?>
<?php
$fields = array(
'author' => '<p class="comment-form-author">' .
'<label for="author">' . __( 'Name','twentyten-child' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) . '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' />' .'</p>',
'email' => '<p class="comment-form-email">' .
'<label for="email">' . __( 'Email','twentyten-child' ) . __( ' (not be published).','twentyten-child' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) . '<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' />' . '</p>',
'url' => '<p class="comment-form-url">' .
'<label for="url">' . __( 'Website','twentyten-child' ) . '</label>' . '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',
'city' => '<p class="comment-form-city">' .
'<label for="city">' . __( 'City','twentyten-child' ) . '</label>' . '<input id="city" name="city" type="text" value="' . esc_attr( $commenter['comment_author_city'] ) . '" size="30" /></p>',
'pays' => '<p class="comment-form-pays">' .
'<label for="pays">' . __( 'State','twentyten-child' ) . '</label><br />' . '<select id="pays" name="pays">
<option value="Afghanistan">Afghanistan</option>
<option value="Afrique_du_Sud">Afrique du Sud</option>
<option value="Albanie">Albanie</option>
<option value="Algerie">Algérie</option>
<option value="Allemagne">Allemagne</option>
<option value="Andorre">Andorre</option>
<option value="Angola">Angola</option>
<option value="Antigua-et-Barbuda">Antigua-et-Barbuda</option>
<option value="Arabie_saoudite">Arabie saoudite</option>
<option value="Argentine">Argentine</option>
<option value="Armenie">Arménie</option>
<option value="Australie">Australie</option>
<option value="Autriche">Autriche</option>
<option value="Azerbaidjan">Azerbaïdjan</option>
<option value="Bahamas">Bahamas</option>
<option value="Bahrein">Bahreïn</option>
<option value="Bangladesh">Bangladesh</option>
<option value="Barbade">Barbade</option>
<option value="Belau">Belau</option>
<option value="Belgique">Belgique</option>
<option value="Belize">Belize</option>
<option value="Benin">Bénin</option>
<option value="Bhoutan">Bhoutan</option>
<option value="Bielorussie">Biélorussie</option>
<option value="Birmanie">Birmanie</option>
<option value="Bolivie">Bolivie</option>
<option value="Bosnie-Herzégovine">Bosnie-Herzégovine</option>
<option value="Botswana">Botswana</option>
<option value="Bresil">Brésil</option>
<option value="Brunei">Brunei</option>
<option value="Bulgarie">Bulgarie</option>
<option value="Burkina">Burkina</option>
<option value="Burundi">Burundi</option>
<option value="Cambodge">Cambodge</option>
<option value="Cameroun">Cameroun</option>
<option value="Canada">Canada</option>
<option value="Cap-Vert">Cap-Vert</option>
<option value="Chili">Chili</option>
<option value="Chine">Chine</option>
<option value="Chypre">Chypre</option>
<option value="Colombie">Colombie</option>
<option value="Comores">Comores</option>
<option value="Congo">Congo</option>
<option value="Cook">Cook</option>
<option value="Coree_du_Nord">Corée du Nord</option>
<option value="Coree_du_Sud">Corée du Sud</option>
<option value="Costa_Rica">Costa Rica</option>
<option value="Cote_Ivoire">Côte d\'Ivoire</option>
<option value="Croatie">Croatie</option>
<option value="Cuba">Cuba</option>
<option value="Danemark">Danemark</option>
<option value="Djibouti">Djibouti</option>
<option value="Dominique">Dominique</option>
<option value="Egypte">Égypte</option>
<option value="Emirats_arabes_unis">Émirats arabes unis</option>
<option value="Equateur">Équateur</option>
<option value="Erythree">Érythrée</option>
<option value="Espagne">Espagne</option>
<option value="Estonie">Estonie</option>
<option value="Etats-Unis">États-Unis</option>
<option value="Ethiopie">Éthiopie</option>
<option value="Fidji">Fidji</option>
<option value="Finlande">Finlande</option>
<option value="France" selected>France</option>
<option value="Gabon">Gabon</option>
<option value="Gambie">Gambie</option>
<option value="Georgie">Géorgie</option>
<option value="Ghana">Ghana</option>
<option value="Grèce">Grèce</option>
<option value="Grenade">Grenade</option>
<option value="Guatemala">Guatemala</option>
<option value="Guinee">Guinée</option>
<option value="Guinee-Bissao">Guinée-Bissao</option>
<option value="Guinee_equatoriale">Guinée équatoriale</option>
<option value="Guyana">Guyana</option>
<option value="Haiti">Haïti</option>
<option value="Honduras">Honduras</option>
<option value="Hongrie">Hongrie</option>
<option value="Inde">Inde</option>
<option value="Indonesie">Indonésie</option>
<option value="Iran">Iran</option>
<option value="Iraq">Iraq</option>
<option value="Irlande">Irlande</option>
<option value="Islande">Islande</option>
<option value="Israël">Israël</option>
<option value="Italie">Italie</option>
<option value="Jamaique">Jamaïque</option>
<option value="Japon">Japon</option>
<option value="Jordanie">Jordanie</option>
<option value="Kazakhstan">Kazakhstan</option>
<option value="Kenya">Kenya</option>
<option value="Kirghizistan">Kirghizistan</option>
<option value="Kiribati">Kiribati</option>
<option value="Koweit">Koweït</option>
<option value="Laos">Laos</option>
<option value="Lesotho">Lesotho</option>
<option value="Lettonie">Lettonie</option>
<option value="Liban">Liban</option>
<option value="Liberia">Liberia</option>
<option value="Libye">Libye</option>
<option value="Liechtenstein">Liechtenstein</option>
<option value="Lituanie">Lituanie</option>
<option value="Luxembourg">Luxembourg</option>
<option value="Macedoine">Macédoine</option>
<option value="Madagascar">Madagascar</option>
<option value="Malaisie">Malaisie</option>
<option value="Malawi">Malawi</option>
<option value="Maldives">Maldives</option>
<option value="Mali">Mali</option>
<option value="Malte">Malte</option>
<option value="Maroc">Maroc</option>
<option value="Marshall">Marshall</option>
<option value="Maurice">Maurice</option>
<option value="Mauritanie">Mauritanie</option>
<option value="Mexique">Mexique</option>
<option value="Micronesie">Micronésie</option>
<option value="Moldavie">Moldavie</option>
<option value="Monaco">Monaco</option>
<option value="Mongolie">Mongolie</option>
<option value="Mozambique">Mozambique</option>
<option value="Namibie">Namibie</option>
<option value="Nauru">Nauru</option>
<option value="Nepal">Népal</option>
<option value="Nicaragua">Nicaragua</option>
<option value="Niger">Niger</option>
<option value="Nigeria">Nigeria</option>
<option value="Niue">Niue</option>
<option value="Norvège">Norvège</option>
<option value="Nouvelle-Zelande">Nouvelle-Zélande</option>
<option value="Oman">Oman</option>
<option value="Ouganda">Ouganda</option>
<option value="Ouzbekistan">Ouzbékistan</option>
<option value="Pakistan">Pakistan</option>
<option value="Panama">Panama</option>
<option value="Papouasie-Nouvelle_Guinee">Papouasie - Nouvelle Guinée</option>
<option value="Paraguay">Paraguay</option>
<option value="Pays-Bas">Pays-Bas</option>
<option value="Perou">Pérou</option>
<option value="Philippines">Philippines</option>
<option value="Pologne">Pologne</option>
<option value="Portugal">Portugal</option>
<option value="Qatar">Qatar</option>
<option value="Republique_centrafricaine">République centrafricaine</option>
<option value="Republique_dominicaine">République dominicaine</option>
<option value="Republique_tcheque">République tchèque</option>
<option value="Roumanie">Roumanie</option>
<option value="Royaume-Uni">Royaume-Uni</option>
<option value="Russie">Russie</option>
<option value="Rwanda">Rwanda</option>
<option value="Saint-Christophe-et-Nieves">Saint-Christophe-et-Niévès</option>
<option value="Sainte-Lucie">Sainte-Lucie</option>
<option value="Saint-Marin">Saint-Marin </option>
<option value="Saint-Siège">Saint-Siège, ou leVatican</option>
<option value="Saint-Vincent-et-les_Grenadines">Saint-Vincent-et-les Grenadines</option>
<option value="Salomon">Salomon</option>
<option value="Salvador">Salvador</option>
<option value="Samoa_occidentales">Samoa occidentales</option>
<option value="Sao_Tome-et-Principe">Sao Tomé-et-Principe</option>
<option value="Senegal">Sénégal</option>
<option value="Seychelles">Seychelles</option>
<option value="Sierra_Leone">Sierra Leone</option>
<option value="Singapour">Singapour</option>
<option value="Slovaquie">Slovaquie</option>
<option value="Slovenie">Slovénie</option>
<option value="Somalie">Somalie</option>
<option value="Soudan">Soudan</option>
<option value="Sri_Lanka">Sri Lanka</option>
<option value="Sued">Suède</option>
<option value="Suisse">Suisse</option>
<option value="Suriname">Suriname</option>
<option value="Swaziland">Swaziland</option>
<option value="Syrie">Syrie</option>
<option value="Tadjikistan">Tadjikistan</option>
<option value="Tanzanie">Tanzanie</option>
<option value="Tchad">Tchad</option>
<option value="Thailande">Thaïlande</option>
<option value="Togo">Togo</option>
<option value="Tonga">Tonga</option>
<option value="Trinite-et-Tobago">Trinité-et-Tobago</option>
<option value="Tunisie">Tunisie</option>
<option value="Turkmenistan">Turkménistan</option>
<option value="Turquie">Turquie</option>
<option value="Tuvalu">Tuvalu</option>
<option value="Ukraine">Ukraine</option>
<option value="Uruguay">Uruguay</option>
<option value="Vanuatu">Vanuatu</option>
<option value="Venezuela">Venezuela</option>
<option value="Viet_Nam">Viêt Nam</option>
<option value="Yemen">Yémen</option>
<option value="Yougoslavie">Yougoslavie</option>
<option value="Zaire">Zaïre</option>
<option value="Zambie">Zambie</option>
<option value="Zimbabwe">Zimbabwe</option>
</select></p>',
);
$guestbook = array(
'fields' => apply_filters( 'comment_form_default_fields', $fields ),
//'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',
'comment_field' => '<br /><p class="comment-form-comment"><label for="comment">' . __( 'Your message','twentyten-child' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',
'must_log_in' => '<p class="must-log-in">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.','twentyten-child' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
'logged_in_as' => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>','twentyten-child' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
//'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email address will not be published.' ) . ( $req ? $required_text : '' ) . '</p>',
'comment_notes_before' => '',
//'comment_notes_after' => '<p class="form-allowed-tags">' . sprintf( __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s' ), ' <code>' . allowed_tags() . '</code>' ) . '</p>',
'comment_notes_after' => '',
'id_form' => 'commentform',
'id_submit' => 'submit',
//'title_reply' => __( 'Leave a Reply' ),
'title_reply' => __( 'Leave a Message','twentyten-child' ),
'title_reply_to' => __( 'Leave a Reply to %s','twentyten-child' ),
'cancel_reply_link' => __( 'Cancel reply','twentyten-child' ),
'label_submit' => __( 'Sign Guestbook','twentyten-child' )
);
comment_form($guestbook); ?>
</div><!-- #comments -->

55
livre-d-or.php Normal file
View File

@@ -0,0 +1,55 @@
<?php
/**
* Template Name: Guestbook
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
get_header(); ?>
<div id="container2">
<div id="content2" role="main">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php //twentyten_posted_on(); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten-child' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<div class="entry-utility">
<?php //twentyten_posted_in(); ?>
<?php //edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php
$imagesDir = '../zenphoto/albums/photos-du-mois';
$imageURL = getRandomFile($imagesDir);
$RandomImage = '../' . $imagesDir . '/' . $imageURL;
echo '<div id="randomImg"><img src="' . $RandomImage . '" alt="" title="" /></div>';
?>
<?php //comments_template( '', true );
comments_template('/livre-comments.php');
?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #container -->
<?php //get_sidebar(); ?>
<?php get_footer(); ?>

156
loop-attachment.php Normal file
View File

@@ -0,0 +1,156 @@
<?php
/**
* The loop that displays an attachment.
*
* The loop displays the posts and the post content. See
* http://codex.wordpress.org/The_Loop to understand it and
* http://codex.wordpress.org/Template_Tags to understand
* the tags used in it.
*
* This can be overridden in child themes with loop-attachment.php.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.2
*/
?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php if ( ! empty( $post->post_parent ) ) : ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
/* translators: %s - title of parent post */
printf( __( '<span class="meta-nav">&larr;</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
?></a></div>
</div><!-- #nav-above -->
<?php endif; ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php
printf( __( '%1$s', 'twentyten-child' ),
sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
get_permalink(),
esc_attr( get_the_time() ),
get_the_date()
)
);
if ( wp_attachment_is_image() ) {
echo ' <span class="meta-sep">|</span> ';
$metadata = wp_get_attachment_metadata();
printf( __( 'Full size is %s pixels', 'twentyten' ),
sprintf( '<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>',
wp_get_attachment_url(),
esc_attr( __( 'Link to full-size image', 'twentyten' ) ),
$metadata['width'],
$metadata['height']
)
);
}
?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<div class="entry-attachment">
<?php if ( wp_attachment_is_image() ) :
$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
foreach ( $attachments as $k => $attachment ) {
if ( $attachment->ID == $post->ID )
break;
}
$k++;
// If there is more than 1 image attachment in a gallery
if ( count( $attachments ) > 1 ) {
if ( isset( $attachments[ $k ] ) )
// get the URL of the next image attachment
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
else
// or get the URL of the first image attachment
$next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
} else {
// or, if there's only 1 image attachment, get the URL of the image
$next_attachment_url = wp_get_attachment_url();
}
?>
<p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
$attachment_width = apply_filters( 'twentyten_attachment_size', 900 );
$attachment_height = apply_filters( 'twentyten_attachment_height', 900 );
echo wp_get_attachment_image( $post->ID, array( $attachment_width, $attachment_height ) ); // filterable image width with, essentially, no limit for image height.
?></a></p>
<?php else : ?>
<a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
<?php endif; ?>
<!-- .entry-attachment -->
<div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?>
</div><!-- .entry-caption -->
<div class="droite" onclick="toggleExif(<?php echo $attachment->ID; ?>);">Voir les Exif</div>
<?php //print_r($metadata); ?>
<?php
//$geo_links = true;
$attach = $attachment->ID;
//echo $attachment->ID;
$before_block = '<div class="bloc_exif" id="' . $attach . '"><ul>';
$after_block = '</ul></div><!-- .bloc_exif -->';
$liste_exif = $before_block;
list($exif_list, $gm_lat, $gm_lng, $title_marker) = ListeExif($metadata, $attach);
$liste_exif .= $exif_list;
$liste_exif .= $after_block;
echo $liste_exif;
?>
<div id="map"></div>
<script type="text/javascript">
var curr_infw;
initialize(<?php echo $gm_lat; ?>, <?php echo $gm_lng; ?>, "<?php echo $title_marker; ?>", "")
</script>
</div>
</div><!-- .entry-attachment -->
<!--p>Description</p-->
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_image_link( false ); ?></div>
<div class="nav-next"><?php next_image_link( false ); ?></div>
</div><!-- #nav-below -->
</div><!-- .entry-content -->
<div class="entry-utility">
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), ' <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php comments_template(); ?>
<?php endwhile; // end of the loop. ?>

36
loop-page.php Normal file
View File

@@ -0,0 +1,36 @@
<?php
/**
* The loop that displays a page.
*
* The loop displays the posts and the post content. See
* http://codex.wordpress.org/The_Loop to understand it and
* http://codex.wordpress.org/Template_Tags to understand
* the tags used in it.
*
* This can be overridden in child themes with loop-page.php.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.2
*/
?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_front_page() ) { ?>
<h2 class="entry-title"><?php the_title(); ?></h2>
<?php } else { ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php } ?>
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten-child' ), 'after' => '</div>' ) ); ?>
<?php edit_post_link( __( 'Edit', 'twentyten-child' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-content -->
</div><!-- #post-## -->
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>

379
loop-single.php Normal file
View File

@@ -0,0 +1,379 @@
<?php
/**
* The loop that displays a single post.
*
* The loop displays the posts and the post content. See
* http://codex.wordpress.org/The_Loop to understand it and
* http://codex.wordpress.org/Template_Tags to understand
* the tags used in it.
*
* This can be overridden in child themes with loop-single.php.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.2
*/
?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
</div><!-- #nav-above -->
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php //twentyten_posted_on(); ?>
<?php RelativeTime(); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<?php //the_content(); ?>
<?php
$content = apply_filters('the_content', get_the_content());
$content = str_replace(']]>', ']]&gt;', $content);
// retina 2x
if (function_exists( ' wr2x_init' ) ) $pattern = '/<img[^>]* src=\"([^\"]*)\"[^>]*>/Ui';
// sans retina
else $pattern = '/<img[^>]*src=\"?([^\"]*)\"?([^>]*alt=\"?([^\"]*)\"?)?[^>]*>/Ui';
preg_match_all($pattern, $content , $matches, PREG_SET_ORDER);
//$x = count($matches);
//echo "matches wp: " . $x;
//$pattern2 = '/<img[^>]* srcset=\"([^\"]*)\"[^>]*>/Ui';
$pattern2 = '/<a\s[^>]*href=\"([^\"]*)\"[^>]*>(.*)<\/a>/siU';
//$pattern2 = '/<img[^>]* src=\"([^\"]*)\"[^>]*>/Ui';
preg_match_all($pattern2, $content , $matches, PREG_SET_ORDER);
//preprint($matches);
/*
echo "matches2 zp: " . (count($matches) - $x);
for ($i = 0; $i <= (count($matches) - 1); $i++) {
//echo "<b>" . $i . $matches[$i][0] . "</b><br />";
echo "<b>" . $i . $matches[$i][1] . "</b><br />-----------------------------------------------<br />";
}
echo "--------------------------------------------";*/
$coord = array();
$j = 0;
$portrait = false;
$new_img = "";
for ($i = 0; $i <= (count($matches) - 1); $i++) {
$ancien = $matches[$i][0];
//echo $ancien;
if (substr_count($ancien, 'wordpress') != 0) {
$patternWP = '#wp-image-[0-9]{1,4}#';
if (preg_match($patternWP, $ancien, $matches2) === 1) {
$attachment = substr($matches2[0],9);
//$new_img = $ancien . '</a>' . "\r\n" . '<div class="droite" onclick="toggleExif(' . $i . ');">Voir les Exifs</div>'."\r\n";
//echo "ancien wp: " . $ancien;
//echo $ancien;
//$ancien2 = str_replace("rel=\"", "rel=\"lightbox ", $ancien);
$ancien2 = str_replace("<a href=", "<a class=\"swipebox\" href=", $ancien);
//echo $ancien2;
$new_img = $ancien2 . "\r\n";
$new_img .= '<div class="droite" onclick="toggleExif(' . $i . ');">Voir les Exifs</div>'."\r\n";
$new_img .= '<div class="bloc_exif" id="' . $i .'">'."\r\n";
$new_img .= '<ul class="exif" id="bloc_exif' . $i . '">'."\r\n";
$metadata = wp_get_attachment_metadata($attachment);
list($exif_list, $gm_lat, $gm_lng, $title_marker) = ListeExif($metadata, $attachment, $i);
if ($gm_lat != "") {
$coord[$j]['lat'] = $gm_lat;
$coord[$j]['lng'] = $gm_lng;
$coord[$j]['mark'] = $title_marker;
$j++;
}
$new_img .= $exif_list;
$new_img .= '</ul></div>'."\r\n";
}
}
// elseif (substr_count($ancien, 'zenphoto') != 0) {
elseif ((substr_count($ancien, 'zenphoto') != 0) and (substr_count($ancien, '<img') != 0)){
//echo "ancien zp: " . $ancien;
//$patternZP = '/<img[^>]* srcset=\"([^\"]*)\"[^>]*>/Ui';
$patternZP = '/<a\s[^>]*href=\"([^\"]*)\"[^>]*>(.*)<\/a>/siU';
preg_match($patternZP, $ancien , $matches2);
$img = explode("/", $matches2[1]);
$zp_image = end($img);
$zp_album = prev($img);
//echo $zp_image;
$meta = zp_query($zp_image);
//preprint($meta);
list($exif_list, $gm_lat, $gm_lng, $title_marker) = ListeExifZP($meta);
if ($gm_lat != "") {
$coord[$j]['lat'] = $gm_lat;
$coord[$j]['lng'] = $gm_lng;
$coord[$j]['mark'] = str_replace("'", "\'", $title_marker);
$j++;
}
//$new_img = $ancien . '</a>' . "\r\n";
$new_img = $ancien . "\r\n";
// $caption .= '<p class="wp-caption-text aligncenter" style="width:' . $zp_size[0] . 'px">';
$new_img .= ($title_marker != "") ? ('<p class="wp-caption-text aligncenter">' . $title_marker . '</p>') : "" . "\r\n";
//$new_img .= '<p class="wp-caption-text">' . $title_marker . '</p>' . "\r\n";
$new_img .= '<div class="droite" onclick="toggleExif(' . $i . ');">Voir les Exifs</div>'."\r\n";
$new_img .= '<div class="bloc_exif" id="' . $i .'">'."\r\n";
$new_img .= '<ul class="exif" id="bloc_exif' . $i . '">'."\r\n";
$new_img .= $exif_list;
$new_img .= '</ul></div>'."\r\n";
}
else {
// Autres sources que WP et ZP
//<a href="https://flic.kr/p/DPRf6e"><img src="https://farm2.staticflickr.com/1544/24826683615_3967bc60d2_c.jpg" /></a>
//echo $ancien;
if (substr_count($ancien, " portrait") != 0) {
$ancien2 = str_replace(" portrait", " ", $ancien);
$portrait = true;
}
else {
$portrait = false;
}
//$anc = str_replace("/></a>", "class='aligncenter' style='width: " . (($portrait === false) ? "610" : "408") . "px;' /></a>", $ancien);
//$new_img = $anc . "\r\n";
}
$content = str_replace($ancien, $new_img, $content);
//echo $content;
}
echo $content;
//preprint($coord);
?>
<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
echo '<div id="map" style="display: ' . ((count($coord) > 0) ? "block" : "none") . ';"></div>';
?>
<script>
// Define your locations: HTML content for the info window, latitude, longitude
var locations = [
<?php
$j = (count($coord) - 1);
for ($i = 0; $i <= $j; $i++) {
//echo "['" . $coord[$i]['mark'] . "', " . $coord[$i]['lat'] . ", " . $coord[$i]['lng'] . ", " . (intval($i) + 1) . "]" . (($i<$j) ? "," : "")."\r\n";
echo "['<h4>" . $coord[$i]['mark'] . "</h4>', " . $coord[$i]['lat'] . ", " . $coord[$i]['lng'] . "]" . (($i<$j) ? "," : "")."\r\n";
}
?>
];
// Setup the different icons and shadows
var iconURLPrefix = 'http://maps.google.com/mapfiles/ms/icons/';
var icons = [
iconURLPrefix + 'red-dot.png',
iconURLPrefix + 'green-dot.png',
iconURLPrefix + 'blue-dot.png',
iconURLPrefix + 'orange-dot.png',
iconURLPrefix + 'purple-dot.png',
iconURLPrefix + 'pink-dot.png',
iconURLPrefix + 'yellow-dot.png'
]
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
}
});
var infowindow = new google.maps.InfoWindow({
maxWidth: 200
});
var markers = new Array();
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);
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>'*/
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() {
// 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>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
<div id="entry-author-info">
<div id="author-avatar">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
</div><!-- #author-avatar -->
<div id="author-description">
<h2><?php printf( __( 'About %s', 'twentyten-child' ), get_the_author() ); ?></h2>
<?php the_author_meta( 'description' ); ?>
<div id="author-link">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" rel="author">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten-child' ), get_the_author() ); ?>
</a>
</div><!-- #author-link -->
</div><!-- #author-description -->
</div><!-- #entry-author-info -->
<?php endif; ?>
<!-- rajout -->
<div id="related">
<?php //for use in the loop, list 5 post titles related to first tag on current post
$backup = $post; // backup the current object
$tags = wp_get_post_tags($post->ID);
$tagIDs = array();
if ($tags) {
$tagcount = count($tags);
for ($i = 0; $i < $tagcount; $i++) {
$tagIDs[$i] = $tags[$i]->term_id;
}
$args=array(
'tag__in' => $tagIDs,
'post__not_in' => array($post->ID),
'showposts'=>-1,
'ignore_sticky_posts'=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
_e('Related articles:', 'twentyten-child' );
?>
<br/>
<ul class="related">
<?php
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a> (<?php the_date("F Y"); ?>)</li>
<?php endwhile;
?></ul><?php
}
else { ?>
<!--h3>No related posts found!</h3-->
<?php }
}
$post = $backup; // copy it back
wp_reset_query(); // to use the original query again
?>
<?php twentyten_post_updated(); ?>
</div><!-- #related -->
<!-- /rajout -->
<div class="entry-utility">
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'twentyten-child' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
</div><!-- #nav-below -->
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>

182
loop.php Normal file
View File

@@ -0,0 +1,182 @@
<?php
/**
* The loop that displays posts.
*
* The loop displays the posts and the post content. See
* http://codex.wordpress.org/The_Loop to understand it and
* http://codex.wordpress.org/Template_Tags to understand
* the tags used in it.
*
* This can be overridden in child themes with loop.php or
* loop-template.php, where 'template' is the loop context
* requested by a template. For example, loop-index.php would
* be used if it exists and we ask for the loop with:
* <code>get_template_part( 'loop', 'index' );</code>
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?>
<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
</div><!-- #nav-above -->
<?php endif; ?>
<?php /* If there are no posts to display, such as an empty archive page */ ?>
<?php if ( ! have_posts() ) : ?>
<div id="post-0" class="post error404 not-found">
<h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1>
<div class="entry-content">
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</div><!-- #post-0 -->
<?php endif; ?>
<?php
/* Start the Loop.
*
* In Twenty Ten we use the same loop in multiple contexts.
* It is broken into three main parts:
* - when we're displaying posts that are in the gallery category,
* - when we're displaying posts in the asides category,
* - and finally all other posts.
*
* Additionally, we sometimes check for whether we are on an
* archive page, a search page, etc., allowing for small differences
* in the loop on each template without actually duplicating
* the rest of the loop that is shared.
*
* Without further ado, the loop:
*/ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php /* How to display posts of the Gallery format. The gallery category is the old way. */ ?>
<?php if ( ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) || in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <!--INDEX LOOP-->
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="entry-meta">
<?php twentyten_posted_on(); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<?php if ( post_password_required() ) : ?>
<?php the_content(); ?>
<?php else : ?>
<?php
$images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
if ( $images ) :
$total_images = count( $images );
$image = array_shift( $images );
$image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' );
?>
<div class="gallery-thumb">
<a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
</div><!-- .gallery-thumb -->
<p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyten' ),
'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
number_format_i18n( $total_images )
); ?></em></p>
<?php endif; ?>
<?php the_excerpt(); ?>
<?php endif; ?>
</div><!-- .entry-content -->
<div class="entry-utility">
<?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?>
<a href="<?php echo get_post_format_link( 'gallery' ); ?>" title="<?php esc_attr_e( 'View Galleries', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
<span class="meta-sep">|</span>
<?php elseif ( in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?>
<a href="<?php echo get_term_link( _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
<span class="meta-sep">|</span>
<?php endif; ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php /* How to display posts of the Aside format. The asides category is the old way. */ ?>
<?php elseif ( ( function_exists( 'get_post_format' ) && 'aside' == get_post_format( $post->ID ) ) || in_category( _x( 'asides', 'asides category slug', 'twentyten' ) ) ) : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <!--ASIDE-->
<?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<div class="entry-utility">
<?php twentyten_posted_on(); ?>
<span class="meta-sep">|</span>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php /* How to display all other posts. */ ?>
<?php else : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <!--OTHER POSTS-->
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="entry-meta">
<?php twentyten_posted_on(); ?>
</div><!-- .entry-meta -->
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<div class="entry-utility">
<?php if ( count( get_the_category() ) ) : ?>
<span class="cat-links">
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
</span>
<span class="meta-sep">|</span>
<?php endif; ?>
<?php
$tags_list = get_the_tag_list( '', ', ' );
if ( $tags_list ):
?>
<span class="tag-links">
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
</span>
<span class="meta-sep">|</span>
<?php endif; ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php comments_template( '', true ); ?>
<?php endif; // This was the if statement that broke the loop into three parts based on categories. ?>
<?php endwhile; // End the loop. Whew. ?>
<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
</div><!-- #nav-below -->
<?php endif; ?>

290
page-contact.php Normal file
View File

@@ -0,0 +1,290 @@
<?php
//response generation function
$response = "";
//function to generate response
function my_contact_form_generate_response($type, $message){
global $response;
if($type == "success") $response = "<div class='success'>{$message}</div>";
else $response = "<div class='error'>{$message}</div>";
}
//http://www.binarymoon.co.uk/2010/03/akismet-plugin-theme-stop-spam-dead/
function bm_checkSpam ($content) {
// innocent until proven guilty
$isSpam = FALSE;
$content = (array) $content;
if (function_exists('akismet_init')) {
$wpcom_api_key = get_option('wordpress_api_key');
if (!empty($wpcom_api_key)) {
global $akismet_api_host, $akismet_api_port;
// set remaining required values for akismet api
$content['user_ip'] = preg_replace( '/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR'] );
$content['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
$content['referrer'] = $_SERVER['HTTP_REFERER'];
$content['blog'] = get_option('home');
if (empty($content['referrer'])) {
$content['referrer'] = get_permalink();
}
$queryString = '';
foreach ($content as $key => $data) {
if (!empty($data)) {
$queryString .= $key . '=' . urlencode(stripslashes($data)) . '&';
}
}
//echo $queryString;
$response = akismet_http_post($queryString, $akismet_api_host, '/1.1/comment-check', $akismet_api_port);
if ($response[1] == 'true') {
update_option('akismet_spam_count', get_option('akismet_spam_count') + 1);
$isSpam = TRUE;
}
}
}
return $isSpam;
}
//response messages
$not_human = __( "Human verification incorrect.", 'twentyten-child' );
$missing_content = __( "Please supply all information.", 'twentyten-child' );
$email_invalid = __( "Email Address Invalid.", 'twentyten-child' );
$message_unsent = __( "Message was not sent. Try Again.", 'twentyten-child' );
$message_sent = __( "Thanks! Your message has been sent.", 'twentyten-child' );
$message_spam = __( "SPAM !!!", 'twentyten-child' );
//user posted variables
$name = $_POST['message_name'];
$email = $_POST['message_email'];
$message = $_POST['message_text'];
$human = $_POST['message_human'];
$website = "";
$content['comment_author'] = $name;
$content['comment_author_email'] = $email;
$content['comment_author_url'] = $website;
$content['comment_content'] = $message;
//print_r($content);
/*
if (bm_checkSpam ($content)) {
// stuff here
echo "spam !!";
}
else {
echo "No spam !!";
}
*/
//php mailer variables
$to = get_option('admin_email');
//$subject = "Someone sent a message from ".get_bloginfo('name');
$subject = __( "Someone sent a message from ", 'twentyten-child' ).get_bloginfo('name');
$headers = 'From: '. $email . "\r\n" .
'Reply-To: ' . $email . "\r\n";
if(!$human == 0){
if($human != 2) my_contact_form_generate_response("error", $not_human); //not human!
else { //human!
//validate email
if(!filter_var($email, FILTER_VALIDATE_EMAIL))
my_contact_form_generate_response("error", $email_invalid);
else //email is valid
{
//validate presence of name and message
if(empty($name) || empty($message)){
my_contact_form_generate_response("error", $missing_content);
}
else
{
// spam
if (bm_checkSpam ($content)) {
my_contact_form_generate_response("error", $message_spam);
}
else { //ready to go!
$sent = wp_mail($to, $subject, strip_tags($message), $headers);
if($sent) my_contact_form_generate_response("success", $message_sent); //message sent!
else my_contact_form_generate_response("error", $message_unsent); //message wasn't sent
}
}
}
}
}
else if ($_POST['submitted']) my_contact_form_generate_response("error", $missing_content);
?>
<?php get_header(); ?>
<div id="container2">
<div id="content2" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
</header>
<div class="entry-content">
<?php the_content(); ?>
<style type="text/css">
.error{
padding: 5px 9px;
border: 1px solid red;
color: red;
border-radius: 3px;
margin-bottom: 30px;
}
.success{
padding: 5px 9px;
border: 1px solid green;
color: green;
border-radius: 3px;
margin-bottom: 30px;
}
/*
form span{
color: red;
}*/
#first{
width:400px;
height:610px;
box-shadow:0 0 15px rgba(14,41,57,0.12),0 2px 5px rgba(14,41,57,0.44),inset 0 -1px 2px rgba(14,41,57,0.15);
float:left;
padding:50px 50px 0;
/*background-image:url(../images/1.jpg);*/
margin:2% 30%;
border-radius:5px
}
span{
float:left;
margin-top:8px;
/*margin-left:8px;*/
font-size:17px
}
.one{
display:block;
margin-left:22px;
margin-top:10px
}
.two{
display:block;
margin-left:27px;
margin-top:10px
}
.three{
display:block;
margin-left:-10px;
margin-top:10px
}
.four{
display:block;
margin-left:-10px;
margin-top:10px
}
input.email, input.name{
width:300px;
padding:6px;
border-radius:5px;
border:1px solid #cbcbcb;
box-shadow:inset 0 1px 2px rgba(0,0,0,0.18);
font-family:Cursive
}
input.verif{
width: 30px;
text-align:center;
padding:6px;
border-radius:5px;
border:1px solid #cbcbcb;
box-shadow:inset 0 1px 2px rgba(0,0,0,0.18);
}
textarea{
width:300px;
padding:7px;
height:100px;
border-radius:5px;
border:1px solid #cbcbcb;
box-shadow:inset 0 1px 2px rgba(0,0,0,0.18)
}
input.submit{
width:100px;
margin-left:283px;
padding:10px;
margin-top:20px;
background:linear-gradient(#A4A4A4,#424242);
color:#fff !important;
font-weight:700
border-radius:5px !important;
border:1px solid #cbcbcb;
}
.submit:hover{
background:linear-gradient(#424242,#A4A4A4)
}
.star{
font-style: italic;
color: #9a9a9a;
}
</style>
<div id="first">
<?php echo $response; ?>
<form action="<?php the_permalink(); ?>" method="post">
<label for="name" class="one"><span><?php _e('Name', 'twentyten-child' ); ?>: </span>*&nbsp;
<input type="text" name="message_name" placeholder="<?php _e('Your name', 'twentyten-child' ); ?>" class="name" value="<?php echo esc_attr($_POST['message_name']); ?>"></label>
<label for="message_email" class="two"><span><?php _e('Email', 'twentyten-child' ); ?>: </span>*&nbsp;
<input type="text" name="message_email" placeholder="<?php _e('Your email', 'twentyten-child' ); ?>" class="email" value="<?php echo esc_attr($_POST['message_email']); ?>"></label>
<label for="message_text" class="three"><span><?php _e('Message', 'twentyten-child' ); ?>: </span>*&nbsp;
<textarea type="text" name="message_text" placeholder="<?php _e('Your Message...', 'twentyten-child' ); ?>" class="text"><?php echo esc_textarea($_POST['message_text']); ?></textarea></label>
<label for="message_human" class="four"><span><?php _e('Human ?', 'twentyten-child' ); ?>: </span>*&nbsp;
<input type="text" class="verif" name="message_human"> + 3 = 5</label>
<input type="hidden" name="submitted" value="1">
<input type="submit" class="submit" value="<?php _e('Send', 'twentyten-child' ); ?>">
</form>
<p class="star">( * ) Veuillez remplir tous les champs</p>
</div>
</div><!-- .entry-content -->
</article><!-- #post -->
<?php endwhile; // end of the loop. ?>
</div><!-- #content2 -->
</div><!-- #container2 -->
<?php get_footer(); ?>

34
scripts/contact-form.js Normal file
View File

@@ -0,0 +1,34 @@
$(document).ready(function() {
$('form#contactForm').submit(function() {
$('form#contactForm .error').remove();
var hasError = false;
$('.requiredField').each(function() {
if(jQuery.trim($(this).val()) == '') {
var labelText = $(this).prev('label').text();
$(this).parent().append('<span class="error">You forgot to enter your '+labelText+'.</span>');
hasError = true;
} else if($(this).hasClass('email')) {
var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
if(!emailReg.test(jQuery.trim($(this).val()))) {
var labelText = $(this).prev('label').text();
$(this).parent().append('<span class="error">You entered an invalid '+labelText+'.</span>');
hasError = true;
}
}
});
if(!hasError) {
$('form#contactForm li.buttons button').fadeOut('normal', function() {
$(this).parent().append('<img src="/wp-content/themes/td-v3/images/template/loading.gif" alt="Loading&hellip;" height="31" width="31" />');
});
var formInput = $(this).serialize();
$.post($(this).attr('action'),formInput, function(data){
$('form#contactForm').slideUp("fast", function() {
$(this).before('<p class="thanks"><strong>Thanks!</strong> Your email was successfully sent. I check my email all the time, so I should be in touch soon.</p>');
});
});
}
return false;
});
});

19
scripts/jquery.js vendored Normal file

File diff suppressed because one or more lines are too long

16
searchform.php Executable file
View File

@@ -0,0 +1,16 @@
<!--form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>" >
<div><label class="screen-reader-text" for="s"><?php _e('Search for:'); ?></label>
<input type="text" value="<?php get_search_query(); ?>" name="s" id="s" class="inputfield" />
<input type="submit" id="searchsubmit" class="pushbutton" value="<?php _e('Search'); ?>" />
</div>
</form-->
<!-- Dave's WordPress Live Search -->
<div id="jquery-live-search-example">
<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>" >
<div><label class="screen-reader-text" for="s"><?php _e('Search for:', 'twentyten-child'); ?></label>
<input type="text" value="<?php get_search_query(); ?>" name="s" id="s" class="inputfield" />
<input type="submit" id="searchsubmit" class="pushbutton" value="<?php _e('Search'); ?>" />
</div>
</form>
</div>

127
sidebar.php Normal file
View File

@@ -0,0 +1,127 @@
<?php
/**
* The Sidebar containing the primary and secondary widget areas.
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?>
<div id="primary" class="widget-area" role="complementary">
<ul class="xoxo">
<li id="search" class="widget-container widget_search">
<?php get_search_form(); ?>
</li>
<li id="archives" class="widget-container">
<h3 class="widget-title"><?php _e( 'Archives', 'twentyten-child' ); ?></h3>
<ul>
<?php wp_get_archives( 'type=monthly&limit=25' ); ?>
</ul>
</li>
<!-- ajout -->
<?php if( is_single() ) { ?>
<li id="archives" class="widget-container">
<h3 class="widget-title"><?php _e( 'Recent Posts', 'twentyten-child' ); ?></h3>
<ul>
<?php
$args = array( 'numberposts' => '5' );
$recent_posts = wp_get_recent_posts( $args );
foreach( $recent_posts as $recent ){
echo '<li><a href="' . get_permalink($recent["ID"]) . '" title="Look '.esc_attr($recent["post_title"]).'" >' . $recent["post_title"].'</a> </li> ';
}
?>
</ul>
</li>
<?php } ?>
<!-- /ajout -->
<?php
//git
$args = array(
'depth' => 0,
'show_date' => '',
'date_format' => get_option('date_format'),
'child_of' => 0,
'exclude' => '2,13,32,103',
'include' => '',
'title_li' => '',
'echo' => 1,
'authors' => '',
'sort_column' => 'menu_order, post_title',
'link_before' => '',
'link_after' => '',
'walker' => '' );
if( is_page() ) {
?>
<li id="pages" class="widget-container">
<h3 class="widget-title"><?php _e( 'Pages', 'twentyten-child' ); ?></h3>
<ul>
<?php wp_list_pages($args); ?>
</ul>
</li>
<?php } ?>
<!-- Pages à exclure: 103, 32, 2, 13 -->
<?php if( is_home() && is_front_page() ) :?>
<?php
if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
<?php endif; // end primary widget area ?>
<!--li id="meta" class="widget-container">
<h3 class="widget-title"><?php _e( 'Meta', 'twentyten' ); ?></h3>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
</li-->
<?php endif;?>
</ul>
</div><!-- #primary .widget-area -->
<div id="secondary" class="widget-area" role="complementary">
<ul class="xoxo">
<?php if( !is_home() && !is_front_page() ) { ?>
<?php
// A second sidebar for widgets, just because.
if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?>
<?php dynamic_sidebar( 'secondary-widget-area' ); ?>
<?php endif;
} ?>
<?php //
if (is_single()) { ?>
<li id="meta" class="widget-container">
<h3 class="widget-title"><?php _e( 'Meta', 'twentyten-child' ); ?></h3>
<ul>
<?php wp_register(); ?>
<!--li><?php wp_loginout(); ?></li-->
<?php wp_meta(); ?>
<li><?php comments_rss_link(__('RSS','twentyten-child')) ?></li>
<li><a href="<?php trackback_url(true); ?>" rel="trackback"><?php _e('Trackback','twentyten-child')?></a></li>
<?php if(function_exists('wp_print')) { ?>
<li><?php print_link(__('Print This Post','twentyten-child'), __('Print This Page','twentyten-child')); ?></li>
<?php } ?>
</ul>
</li>
<?php } ?>
</ul>
</div><!-- #secondary .widget-area -->

711
style.css Normal file
View File

@@ -0,0 +1,711 @@
/*
Theme Name: Twenty Ten Child
Description: Theme enfant pour Twenty Ten
Author: Le nom de l'auteur
Template: twentyten
*/
@import url("../twentyten/style.css");
body {
background-color: #e7e7e2;
/*background-color: #b7a691;*/
}
a:link, a:visited {
color: #858585;
}
a:hover {
color: #373737;
}
a img {
padding: 4px;
border: thin solid #736c4d;
}
.iiframe {
text-align: center;
}
#randomImg img {
padding: 10px;
background-color: #fff;
border: 1px solid #818181;
margin-right: auto;
margin-left: auto;
display: block;
}
/**/
#wrapper {
background-color: #e7e7e2;
/*background-color: #b7a691;*/
/*margin-top: 20px;
padding: 0 20px;*/
}
#main {
/*background-color: #bfb68a;*/
background-color: #fffefc;
-webkit-border-radius: 16px 16px 0 0;
-moz-border-radius: 16px 16px 0 0;
border-radius: 16px 16px 0 0;
border: thin solid #a0966c;
padding-top: 30px;
}
#main .widget-area ul {
padding: 0 20px;
}
/*
#container {
margin: 0 -260px 0 0;
}
#primary {
width: 240px;
}
*/
#container {
margin: 0 -230px 0 0;
}
#container2, container-fullwidth {
margin: 0 0 0 0;
}
#primary {
width: 230px;
}
#content {
width: 660px;
}
#content2 {
margin: 0 20px;
width: 890px;
}
/* Header */
#header {
margin-bottom:20px;
padding:0 10px;
/*width:940px;*/
/*display:block;*/
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
}
#header #logo {
float:left;
}
#header #pagenav {
float:right;
}
#pagenav ul {
margin: 16px 0 0;
padding-left: 2em;
}
#pagenav li {
display: inline;
list-style-type: none;
padding: 8px;
}
#pagenav li a {
text-decoration: none;
font-size: large;
padding-bottom: 20px;
text-shadow: 1px 1px 1px #aaa;
color: #fff;
}
#pagenav li a:hover {
border-bottom: 2px solid #fff;
}
#logo a {
color: #fff;
text-shadow: 1px 1px 1px #aaa;
text-decoration: none;
font-size: xx-large;
letter-spacing: 5px;
}
/*
#content {
color: #444;
}
*/
#content,
#content input,
#content textarea,
#content2,
#content2 input,
#content2 textarea {
color: #444;
font-size: 13px;
line-height: 24px;
}
#content h2, #content2 h2 {
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
}
#content h2 a, #content2 h2 a {
font-weight: normal;
font-style: normal;
letter-spacing: 0.5px;
font-size: x-large;
color: #736c4d;
text-shadow: 3px 3px 3px #d9d3c1;
}
#content a:hover, #content2 a:hover {
color: #373737;
}
.entry-content, .entry-summary p, .comment-body {
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
}
.entry-content p, .entry-summary p, .comment-body p {
font-size: 13px;
}
.entry-date {
}
.entry-meta a {
text-decoration: none;
margin-left: 5px;
}
.entry-utility {
text-align: right;
color: #444;
margin-top: 30px;
}
.navigation {
line-height: 34px;
}
.nav-previous a, .nav-next a {
font-size: larger;
}
/* */
.format-gallery .size-thumbnail img,
.category-gallery .size-thumbnail img {
border: 1px solid #f1f1f1;
margin-bottom: 0;
}
.gallery img {
border-style: none;
border-width: 0;
}
.gallery img {
border: 1px solid #f1f1f1;
}
/* liens */
#content ul {
list-style-type: none;
margin-left: 3em;
}
#content2 ol {
list-style-type: none;
margin: 0 8em;
}
#content h3 {
margin-bottom: 1em;
margin-top: 2em;
}
/* single */
#content h1.entry-title, #content2 h1.entry-title {
font-weight: normal;
font-style: normal;
letter-spacing: 0.5px;
font-size: x-large;
color: #736c4d;
text-shadow: 3px 3px 3px #d9d3c1;
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
}
#related {
margin-left: 3em;
margin-right: 2em;
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
margin-bottom: 1em;
}
.maj {
font-size: 10px;
font-style: italic;
}
/* related post*/
.related {
font-size: smaller;
line-height: 20px;
}
/* author info */
#entry-author-info {
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
/**/background: #e7e7e2;
border-top: 0px;
clear: both;
font-size: 14px;
line-height: 20px;
margin: 24px 0;
overflow: hidden;
padding: 18px 20px;
}
#author-link {
clear: both;
color: #777;
font-size: 12px;
line-height: 18px;
}
/* comments */
#comments h3 {
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
font-weight: normal;
font-style: normal;
color: #444;
}
.comment-notes {
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
font-size: 13px;
}
.comment-author cite {
color: #000;
font-style: italic;
font-family: Georgia, "Times New Roman", Times, serif;
font-weight: normal;
}
.commentmetadata-guestbook {
text-align: right;
margin-bottom: 0;
}
ol.commentlist{
border-bottom: 1px solid #e7e7e7;
}
#respond {
border-top: 0;
margin-left: 5em;
margin-right: 5em;
}
#respond input {
margin: 0 0 9px;
width: 60%;
display: block;
}
#respond textarea {
width: 98%;
}
#respond label {
font-size: small;
}
.form-submit {
text-align: right;
padding-right: 3em;
}
/* livre d'or */
#randomImg {
margin-right: auto;
margin-left: auto;
}
/* sidebar */
input[type="text"],
textarea {
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
}
#primary h3 {
}
.widget_search #s {/* This keeps the search inputs in line */
width: 55%;
}
.widget-container {
/*font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;*/
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
}
.widget-title {
color: #736c4d;
text-shadow: 0px 0px 3px #d9d3c1;
margin-bottom: 24px;
font: normal large "Lucida Grande", Lucida, Verdana, sans-serif;
padding-bottom: 10px;
border-bottom-style: solid;
border-bottom-width: thin;
}
.widget-area ul ul {
margin-left: 0px;
/*list-style-image: url(images/icon_bullet.png);*/
}
/**/
.widget-area ul ul li {
margin-left: 0px;
padding-bottom:0px;
padding-left:22px;
background: url(images/icon_bullet.png) 0 5px no-repeat;
list-style-type: none;
line-height: 24px;
}
/* Footer */
#colophon {
border-top: 1px solid #919191;
margin-top: -1px;
overflow: hidden;
padding: 18px 0;
}
#site-info ul {
font-family: "Lucida Grande", Lucida, Verdana, sans-serif; }
#site-info ul {
}
#site-info li {
display: inline;
list-style-type: none;
border-right: 1px solid #999;
padding-right: 3px
}
/**/
#site-info li:last-child {
border-right:0px;
}
#site-info li a {
color: #999;
text-decoration: none;
font-size: small;
font-weight: normal;
font-style: normal;
}
/* contact form 7 */
.wpcf7-form {
border: thin solid #b1b1b1;
padding: 1em 1em 1em 2em;
margin: 3em 4em;
}
/* caption */
.wp-caption, .entry-caption {
background: transparent;
line-height: 18px;
margin-bottom: 20px;
max-width: 632px !important; /* prevent too-wide images from breaking layout */
padding: 0;
margin-right: auto;
margin-left: auto;
}
.wp-caption img {
margin: 0;
}
.wp-caption p.wp-caption-text, .entry-caption p, .wp-caption-text {
background: #f1f1f1;
padding-top: 2px;
padding-bottom: 1px;
text-align: center;
}
/* search */
#searchform input.inputfield {
width: 150px;
}
#searchform input.pushbutton {
width:20px; height: 20px;border:0;background: transparent url(images/search2.png) no-repeat 0 4px; text-indent: -9999px; cursor:pointer;
}
#searchform input.pushbutton:hover {cursor:pointer;}
/* --------------------------------------------
#jquery-live-search {
background: #fff;
padding: 5px 10px;
max-height: 400px;
overflow: auto;
position: absolute;
z-index: 99;
border: 1px solid #A9A9A9;
border-width: 0 1px 1px 1px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3);
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3);
}
*/
/* -------------------------------------------- */
/* ThreeWP_Ajax_Search */
/* -------------------------------------------- */
/*
The container contains the whole ajax search results box. The "content".
*/
div.threewp_ajax_search_container
{
position: absolute;
z-index: 100;
width: 300px;
height: 400px;
}
/**
Below are the default settings that look OK on TwentyTen.
**/
/**
Content box
**/
div.threewp_ajax_search_results_content
{
position: relative;
overflow: auto;
background-color: #e7e7e2;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
-moz-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
-webkit-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
border-radius: 4px;
font-size: smaller;
}
div.threewp_ajax_search_results_content ul
{
list-style-type: none;
margin: 0 !important;
}
div.threewp_ajax_search_results_content ul li
{
padding: 4px;
background-image: none;
}
div.threewp_ajax_search_results_content ul li a
{
display: block;
height: 100%; /** So that clicking anywhere on that line will work. */
width: 100%;
}
div.threewp_ajax_search_results_content ul li a:link,
div.threewp_ajax_search_results_content ul li a:visited
{
color: #858585;
text-decoration: none;
}
div.threewp_ajax_search_results_content ul li a:hover
{
color: #373737;
text-decoration: underline;
}
/**
The first item has .item_first, which enables us to, in this case, have nice, rounded borders on the top.
*/
div.threewp_ajax_search_results_content ul li.item_first
{
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 4px;
-webkit-border-radius-topleft: 4px;
-webkit-border-radius-topright: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
/**
The last item has .item_last, which enables us to, in this case, have nice, rounded borders on the bottom.
*/
div.threewp_ajax_search_results_content ul li.item_last
{
-moz-border-radius-bottomright: 4px;
-moz-border-radius-bottomleft: 4px;
-webkit-border-radius-bottomright: 4px;
-webkit-border-radius-bottomleft: 4px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
/**
Since we parse actual search page results and display those, remove whatever we don't want.
Another way of doing this would be to use a custom url, like http://testsite.com/?ajax_search&s=
Will be sent as http://testsite.com/?ajax_search&s=text
The theme could then detect $_GET['ajax_search'] and display simpler results. Either way, it's up to you.
**/
div.threewp_ajax_search_results_content .entry-utility,
div.threewp_ajax_search_results_content .meta-nav,
div.threewp_ajax_search_results_content .entry-summary,
div.threewp_ajax_search_results_content .entry-meta,
div.threewp_ajax_search_results_content .entry-content
{
display: none;
}
div.threewp_ajax_search_results_content ul li.item_selected,
div.threewp_ajax_search_results_content ul li:hover
{
background: #ccc;
}
/**
Search in progress!
The container gets the class threewp_ajax_search_in_progress when it's busy doing a search.
This allows us to have fancy loading graphics, which I've taken from the normal Wordpress graphics.
If you've blocked access to /wp-admin then it's your own fault your users aren't seeing moving graphics.
*/
.threewp_ajax_search_in_progress #s
{
color: #ccc;
}
.threewp_ajax_search_in_progress #s
{
background-image: url("../../../../wp-admin/images/loading.gif");
background-position: right;
background-repeat: no-repeat;
}
/* -------------------------------------------- */
/* / ThreeWP_Ajax_Search */
/* -------------------------------------------- */
/* JW Player Plugin for WordPress */
.Custom {
/* background-color: maroon;
text-align: center;
margin-right: auto;
margin-left: auto;*/
}
.JWPlayer {
max-width: 420px;
margin-right: auto;
margin-left: auto;
}
.droite {
text-align: right;
font-style: italic;
font-size: x-small;
color: #858585;
margin-bottom: 3em;
text-decoration: underline;
}
.droite:hover {
color: #373737;
cursor:pointer;
text-decoration: underline;
}
.bloc_exif {
display: none;
text-align: center;
}
#content .bloc_exif img {
border: none;
margin: 0;
display: inline;
vertical-align: bottom;
}
#content .bloc_exif img {
cursor:pointer;
}
#content .bloc_exif ul {
list-style:none;
background:#fff;
border:solid #ddd;
border-width:1px;
margin-right: auto;
margin-left: auto;
width: 620px;
padding: 1em 0.5em;
}
/*
.bloc_exif img {
border: none;
margin: 0;
display: inline;
}
.bloc_exif ul {list-style:none; padding:1em; background:#fff; border:solid #ddd; border-width:1px;
}
*/
#content .bloc_exif li {display:inline; padding-right:0.5em; font-size:0.857em;
}
#map, #map_canvas1, #map_canvas2, #map_canvas3, #map_canvas4, #map_canvas5 {
width: 500px;
height: 400px;
display: none;
margin-right: auto;
margin-left: auto;
margin-bottom: 5em;
}
.close {
}
.mappy {
display: none;
}
.infowindow ul {
list-style-image: none;
display: block;
}
.infowindow li {
font-size: x-small;
}
.infowindow {
width: 350px;
}