web/wp-content/themes/default/comments-popup.php
changeset 136 bde1974c263b
equal deleted inserted replaced
135:53cff4b4a802 136:bde1974c263b
       
     1 <?php 
       
     2 /** 
       
     3  * @package WordPress 
       
     4  * @subpackage Default_Theme 
       
     5  */ 
       
     6 
       
     7 /* Don't remove these lines. */
       
     8 add_filter('comment_text', 'popuplinks');
       
     9 while ( have_posts()) : the_post();
       
    10 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
    11 <html xmlns="http://www.w3.org/1999/xhtml">
       
    12 <head>
       
    13      <title><?php echo get_settings('blogname'); ?> - Commentaires de <?php the_title(); ?></title>
       
    14 
       
    15 	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
       
    16 	<style type="text/css" media="screen">
       
    17 		@import url( <?php bloginfo('stylesheet_url'); ?> );
       
    18 		body { margin: 3px; }
       
    19 	</style>
       
    20 
       
    21 </head>
       
    22 <body id="commentspopup">
       
    23 
       
    24 <h1 id="header"><a href="" title="<?php echo get_settings('blogname'); ?>"><?php echo get_settings('blogname'); ?></a></h1>
       
    25 
       
    26 <?php 
       
    27 /* Don't remove these lines. */ 
       
    28 add_filter('comment_text', 'popuplinks'); 
       
    29 if ( have_posts() ) : 
       
    30 while ( have_posts() ) : the_post(); 
       
    31 ?>
       
    32 <h2 id="comments">Commentaires</h2>
       
    33 
       
    34 <p><a href="<?php echo get_post_comments_feed_link($post->ID); ?>">Flux <abbr title="Really Simple Syndication">RSS</abbr> pour les commentaires de cet article.</a></p>
       
    35 
       
    36 <?php if ( pings_open() ) { ?>
       
    37 <p>L'URL à utiliser pour le rétrolien est : <em><?php trackback_url() ?></em></p>
       
    38 <?php } ?>
       
    39 
       
    40 <?php
       
    41 // this line is WordPress' motor, do not delete it.
       
    42 $commenter = wp_get_current_commenter();
       
    43 extract($commenter);
       
    44 $comments = get_approved_comments($id);
       
    45 $post = get_post($id);
       
    46 if ( post_password_required($post) ) {  // and it doesn't match the cookie
       
    47 	echo(get_the_password_form());
       
    48 } else { ?>
       
    49 
       
    50 <?php if ($comments) { ?>
       
    51 
       
    52 	<ol id="commentlist">
       
    53 	<?php foreach ($comments as $comment) { ?>
       
    54 		<li id="comment-<?php comment_ID() ?>">
       
    55 		<?php comment_text() ?>
       
    56 		<p><cite><?php comment_type('Commentaire', 'Rétrolien', 'Ping'); ?> par <?php comment_author_link() ?> &#8212; <?php comment_date() ?> à <a href="#comment-<?php comment_ID() ?>"><?php comment_time() ?></a></cite></p>
       
    57 		</li>
       
    58 	<?php } // end for each comment ?>
       
    59 	</ol>
       
    60 	
       
    61 <?php } else { // this is displayed if there are no comments so far ?>
       
    62 
       
    63 	<p>Pas encore de commentaire.</p>
       
    64 	
       
    65 <?php } ?>
       
    66 
       
    67 <?php if ( comments_open() ) { ?>
       
    68 
       
    69 	<h2>Laisser un commentaire</h2>
       
    70 	<p>Les retours à la ligne et les paragraphes seront mis automatiquement, l'adresse e-mail n'est jamais affichée, les balises HTML acceptées sont : <code><?php echo allowed_tags(); ?></code></p>
       
    71 
       
    72 	<form action="<?php echo get_settings('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
       
    73 		<?php if ( $user_ID ) : ?>
       
    74 		<p>Connecté en tant que <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Se déconnecter du site.">Se déconnecter &raquo;</a></p>
       
    75 		<?php else : ?>  
       
    76 		<p>
       
    77 			<input type="text" name="author" id="author" class="textarea" value="<?php echo esc_attr($comment_author); ?>" size="28" tabindex="1" />
       
    78 			<label for="author">Nom</label>
       
    79 		</p>
       
    80 
       
    81 		<p>
       
    82 		  <input type="text" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="28" tabindex="2" />
       
    83 		   <label for="email">Adresse e-mail</label>
       
    84 		</p>
       
    85 
       
    86 		<p>
       
    87 		  <input type="text" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" size="28" tabindex="3" />
       
    88 		   <label for="url">Site internet</label>
       
    89 		</p>
       
    90 		<?php endif; ?> 
       
    91 		<p>
       
    92 		  <label for="comment">Votre commentaire </label>
       
    93 		<br />
       
    94 		  <textarea name="comment" id="comment" cols="70" rows="4" tabindex="4"></textarea>
       
    95 		</p>
       
    96 
       
    97 		<p>
       
    98 			<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
       
    99 			<input type="hidden" name="redirect_to" value="<?php echo esc_attr($_SERVER["REQUEST_URI"]); ?>" />
       
   100 		  <input name="submit" type="submit" tabindex="5" value="Dites-le !" />
       
   101 		</p>
       
   102 		<?php do_action('comment_form', $post->ID); ?>
       
   103 	</form>
       
   104 
       
   105 <?php } else { // comments are closed ?>
       
   106 
       
   107 	<p>Désolé, les commentaires sont fermés pour l'instant.</p>
       
   108 	
       
   109 <?php }
       
   110 } // end password check
       
   111 ?>
       
   112 
       
   113 <div><strong><a href="javascript:window.close()">Fermer cette fenêtre.</a></strong></div>
       
   114 
       
   115 <?php // if you delete this the sky will fall on your head
       
   116 endwhile; //endwhile have_posts() 
       
   117 else: //have_posts() 
       
   118 ?>
       
   119 
       
   120 <p>Désolé, aucun article ne correspond à vos critères.</p> 
       
   121 <?php endif; ?> 
       
   122 <!-- // this is just the end of the motor - don't touch that line either :) -->
       
   123 <?php //} ?> 
       
   124 <p class="credit"><?php timer_stop(1); ?> <cite>Propulsé par <a href="http://wordpress.org/" title="Propulsé par WordPress, une plate-forme de publication personnelle à la pointe de la sémantique"><strong>WordPress</strong></a></cite></p>
       
   125 <?php // Seen at http://www.mijnkopthee.nl/log2/archive/2003/05/28/esc(18) ?>
       
   126 <script type="text/javascript">
       
   127 	<!--
       
   128 	document.onkeypress = function esc(e) {
       
   129 		if(typeof(e) == "undefined") { e=event; }
       
   130 		if (e.keyCode == 27) { self.close(); }
       
   131 	}
       
   132 	// -->
       
   133 </script>
       
   134 </body>
       
   135 </html>