All pastes #630858 Raw Edit

Show comments Popup to Pages (no

public php v1 · immutable
#630858 ·published 2007-07-23 15:14 UTC
rendered paste body
<?php /* Don't remove these lines. */add_filter('comment_text', 'popuplinks');if ( have_posts() ) : while ( have_posts() ) : the_post();?>	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">	<html xmlns="http://www.w3.org/1999/xhtml">	<head>		 <title><?php echo get_settings('blogname'); ?> - Comentarios de <?php the_title(); ?></title>			<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />		<style type="text/css" media="screen">			@import url( <?php bloginfo('stylesheet_url'); ?> );		body { margin: 3px; background-color: #006699; }	  a {font-weight:bold; text-decoration:none}	  .comment {font-family:verdana, arial, geneva, sans-serif; font-size:12px}	  .date {color:#666666; font-family:verdana, arial, geneva, sans-serif; font-size:12px; font-weight:bold}	  .form {color:#EEEEEE; font-family:verdana, arial, geneva, sans-serif; font-size:12px}	  .input {width:100%}		</style>	</head>	<body id="commentspopup">	<?php	// this line is WordPress' motor, do not delete it.	$commenter = wp_get_current_commenter();	extract($commenter);	$comments = get_approved_comments($id);	$post = get_post($id);	if (!empty($post->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie		echo(get_the_password_form());	} else { ?>		<?php if ($comments) { ?>	<table border="0" cellpadding="10" cellspacing="1" width="100%">	<?php foreach ($comments as $comment) { ?>	<?php	// cor sim, cor nao	if ($cor == '#CCCCCC') {		$cor = '#EEEEEE';	} else {		$cor = '#CCCCCC';	}	?>	<tr>	  <td bgcolor="<?php echo($cor); ?>" class="comment">		<?php comment_text() ?>		<div class="date"><?php comment_author() ?> <?php if (get_comment_author_url() != '') { ?>- <a href="<?php comment_author_url(); ?>" target="_blank">link</a><?php } ?> <?php if (get_comment_author_email() != '') { ?>- <?php comment_author_email_link(); ?> <?php } ?>&#0149; <?php comment_date("d-m-Y") ?> <?php comment_time() ?></div>	  </td>	</tr>	<?php } // end for each comment ?>	</table>	<?php } else { // this is displayed if there are no comments so far ?>	<table border="0" cellpadding="10" cellspacing="1" width="100%">	<tr>	  <td bgcolor="#EEEEEE" class="comment">		<p>Sem coment&aacute;rios. Seja o primeiro!</p>	  </td>	</tr>	</table>	  <?php } ?>		  	  <?php if ('open' == $post->comment_status) { ?>		<form action="<?php echo get_settings('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">		<table width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#666666">		  <tr>			<td align="left" class="form" colspan="2" valign="middle" width="100%"><b>Insira seu coment&aacute;rio:</b> (escreva quanto quiser!)</td>		  </tr>		  <tr>			<td align="left" class="form" valign="middle" width="1%">Nome:</td>			<td align="left" valign="middle" width="99%"><input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />			  <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />			  <input type="hidden" name="redirect_to" value="<?php echo wp_specialchars($_SERVER["REQUEST_URI"]); ?>" /></td>		  </tr>		  <tr>			<td align="left" class="form" valign="middle">E-mail:</td>			<td align="left" valign="middle"><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="28" tabindex="2" /></td>		  </tr>		  <tr>			<td align="left" class="form" valign="middle">Web&nbsp;Site:</td>			<td align="left" valign="middle"><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="28" tabindex="3" /></td>		  </tr>		  <tr>			<td align="left" class="form" valign="top">Coment&aacute;rio:</td>			<td align="left" valign="top"><textarea name="comment" id="comment" cols="30" rows="4" tabindex="4"></textarea></td>		  </tr>		  <tr>			<td><br /></td>			<td><input name="submit" type="submit" tabindex="5" value="Enviar" />			  &nbsp;			<input class="comment" name="Cancel" onclick="void(window.close())" type="button" value="Cancelar" /></td>		  </tr>		</table>		<p><label for="author"></label>		</p>		<?php do_action('comment_form', $post->ID); ?>	</form>	<?php } else { // comments are closed ?>	<p>Desculpe, os coment&aacute;rios est&atilde;o fechados no momento.</p>	<?php }	} // end password check	?><!-- // this is just the end of the motor - don't touch that line either :) --><?php endwhile; else: ?><p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?><script type="text/javascript"><!--document.onkeypress = function esc(e) {	if(typeof(e) == "undefined") { e=event; }	if (e.keyCode == 27) { self.close(); }}// --></script></body></html>