Problema con el campo Comentarios.

Estado
No está abierto para más respuestas.
Mensajes
82
Puntuación de reacción
0
He probado con la 1, 1.7, 2.1, 2.3 y 2.4. Con todas tengo el mismo problema.

PHP:
<?php
// Do not delete these lines
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
	die ('Sorry, you can\'t load this page directly.');

if ( post_password_required() ) { 
	echo '<p class="nocomments">';
	_e('This post is password protected. Enter your password to view comments.',THEMENAME );
	echo '</p>';
	return;
}

function mytheme_comment($comment, $args, $depth) {
	global $themePath;
	$GLOBALS['comment'] = $comment; ?>

	<li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
		<div id="comment-<?php comment_ID(); ?>">
			<?php echo get_avatar($comment,$size='60',$default=$themePath.'images/icons/gravatar1.png' ); ?>
			<div class="comment-text">
				<cite><?php comment_author_link() ?></cite><span class="date"><?php comment_date('m-d-y'); ?></span>
				<?php if ($comment->comment_approved == '0') : ?>
					<span class="awaiting_moderation"><?php _e('Your comment is awaiting moderation.') ?></span><br />
				<?php endif; ?>
				<?php comment_text() ?>
				<div class="comment-meta commentmetadata">
					<?php comment_reply_link(array_merge( $args, array('reply_text' => __('Reply',THEMENAME), 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>  <?php edit_comment_link(__('Edit',THEMENAME),' ','') ?> 
				</div>
			</div>
		</div>
	<?php 
}

function list_pings($comment, $args, $depth) {
	$GLOBALS['comment'] = $comment; ?>

	<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
		<cite><?php comment_author_link(); ?></cite><span class="date"><?php comment_date('m-d-y'); ?></span><br />

	<?php 
} 

if  ( have_comments() ) : ?>

	<!-- start commenting area -->
	<?php 
	if ( ! empty($comments_by_type['comment']) ) : ?>
		<ol class="commentlist">
			<?php wp_list_comments('callback=mytheme_comment&type=comment'); ?>
		</ol>
			
		<div class="comms-navigation">
			<div style="float:left"><?php previous_comments_link() ?></div>
			<div style="float:right"><?php next_comments_link() ?></div>
		</div>
		<?php 
	endif;
	
endif;


// Comment Form
if ('open' == $post->comment_status) : ?>
	
	<div id="Respond">
		<a name="respond"></a>
		<h3><?php comment_form_title( __('Deja tu comentario',THEMENAME), __('Leave a Reply to %s',THEMENAME) ); ?></h3>
		<div class="cancel-comment-reply">
			<?php cancel_comment_reply_link(); ?>
		</div>
		<?php 
		if ( get_option('comment_registration') && !$user_ID ) : ?>
			<p><?php printf( __('Debes %s logearte en %s para dejar tu comentario.',THEMENAME), '<a href="'. get_option('siteurl') . '/wp-login.php?redirect_to='. urlencode(get_permalink()) .'">', '</a>'); ?></p>
			<?php else : ?>
			<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="CommentForm">
				<?php 
				if ( $user_ID ) : ?>
					<p class="logged"><?php _e('Logeado como',THEMENAME); ?> <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="<?php _e('Desconecta',THEMENAME); ?>"><?php _e('Desconecta',THEMENAME); ?> »</a></p>
					<?php 
				else : 
					?>
					<p>
						<label  class="overlabel" for="author"><?php _e('Name',THEMENAME); ?> *</label>
						<input type="text" class="textInput" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" style="width: 350px;" />
					</p>
					<p>
						<label class="overlabel" for="email"><?php _e('Email',THEMENAME); ?> *</label>
						<input type="text" class="textInput" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" style="width: 350px;" />
					</p>
					<p>
						<label  class="overlabel" for="url"><?php _e('Website',THEMENAME); ?></label>
						<input type="text" class="textInput" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" style="width: 350px;" />
					</p>
					<?php 
				endif; ?>
				<p>
					<label  class="overlabel" for="comment"><?php _e('Comentario',THEMENAME); ?></label>
					<textarea class="textInput" name="comment" id="comment" cols="50" rows="12" tabindex="4" style="width: 450px;"></textarea>
				</p>
				<p><button type="submit" class="btn"><span><?php _e('Añadir Comentario',THEMENAME); ?></span></button><?php comment_id_fields(); ?></p>
				<p><?php do_action('comment_form', $post->ID); ?></p>
			</form>	
			<?php 
		endif; // If registration required and not logged in ?>
	</div><!-- End id=Respond -->
	<?php 
	
endif;	// if ('open' == $post->comment_status) : ?>



<?php //trackbacks
if ( have_comments() ) :
	if ( ! empty($comments_by_type['pings']) ) : ?>
		<ol class="commentlist">
			<?php wp_list_comments('callback=list_pings&type=pings'); ?>
		</ol>
	
		<div class="comms-navigation">
			<div style="float:left"><?php previous_comments_link() ?></div>
			<div style="float:right"><?php next_comments_link() ?></div>
		</div>
<?php endif; ?>

<!-- end comments area -->

<?php
endif; ?>

Si por ejemplo pego este codigo, si funciona. Es del theme unite, pero no muestra el cuadro como debe ni el autor.
 
Mensajes
87
Puntuación de reacción
0
Pues ya no sé que decirte.

Si no lo has hecho, instala Wordpress desde 0 e instala solo el theme.
 
Mensajes
82
Puntuación de reacción
0
Eso tambien he probado, asi que no tengo ni idea de a que se debe.

Muchas gracias de todas formas. Si doy con la solucion la compartire.

De todas formas, estoy buscando una alternativa en forma de plugin, pero no veo nada que de esa funcion.
 
Estado
No está abierto para más respuestas.
Arriba