Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/11/2010, 09:36
Avatar de chichote
chichote
Colaborador
 
Fecha de Ingreso: diciembre-2004
Ubicación: Santiago - Chile
Mensajes: 1.868
Antigüedad: 19 años, 11 meses
Puntos: 145
Solo puedo ver los comentarios logueado como Admin

Hola amigos, tengo un problemita, aver si me hechan una manito.

Estoy haciendo un template desde cero y tengo un problema, no logro q se vean los comentario, si muestro el form, pero los comentarios solo se ven cuando estoy logueado como administrador.

Código PHP:
<?php // Do not delete these lines
                            
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
                                die (
'Please do not load this page directly. Thanks!');
                        
                            if (!empty(
$post->post_password)) { // if there's a password
                                
if ($_COOKIE['wp-postpass_' COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
                                    
?>
                        
                                    <p>This post is password protected. Enter the password to view comments.</p>
                        
                                    <?php
                                    
return;
                                }
                            }
                        
                            
/* This variable is for alternating comment background */
                            
$oddcomment 'alt';
                        
?>
                        
                        <?php if ( $comments ) : ?>
                        <!-- You can start editing here. -->
                        
                        <?php $urlHome get_bloginfo('template_directory'); ?>
                            
                            
                            <ol class="commentlist">
                                <?php foreach ($comments as $comment) : ?>
                                <li class="comment" id="comment-<?php comment_ID() ?>">
                                    <div id="div-comment-<?php comment_ID() ?>" class="comment-body">
                                        <div class="comment-author vcard">
                                            <?php echo get_avatar$comment32$default $urlHome '/images/default_avatar_visitor.gif' ); ?>
                                            <cite class="fn"><?php comment_author_link() ?></cite>
                                            <span class="says">dice:</span>
                                        </div>
                    
                                        <div class="comment-meta commentmetadata">
                                            <span style="color:#712098"><?php the_time('d'); ?> <?php echo get_the_time('F'); ?> <?php the_time('Y'); ?></span>
                                        </div>
                            
                                        <p><?php comment_text() ?></p>
                        
                                        <div class="reply"></div>
                                    </div>
                                    <?php if ($comment->comment_approved == '0') : ?>
                                        <strong>(Su Comentario esta esperando por aprovaci&oacute;n)</strong>
                                    <?php endif; ?>
                    
                                </li>
                                <?php $oddcomment = ( empty( $oddcomment ) ) ? 'alt' ''?> 
                                <?php endforeach; // end for each comment ?>
                            </ol>
                        <?php endif; ?>
                        
                        
                        
                        
                        
                        
                        
                        
                        
                        
                        <?php
                        
if ( is_user_logged_in() ) 
                            {
                            
?>
                            <div id="respond">
                                <h3 id="comments">Deja aqu&iacute; tu comentario</h3>
                                <div id="form_com">
                                <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
                                    <fieldset>
                                    
                                        <div class="divline_com">
                                            <label class="imputlabel_com" for="author"><small>Nombre (requiredo)</small></label>
                                        
                                            <input class="textInput_com" type="text" name="author" id="author" value=""  tabindex="1" aria-required='true' />
                                        </div>
                                        
                                        <div class="divline_com">
                                            <label class="imputlabel_com"  for="email"><small>Mail (No sera publicado) (requerido)</small></label>
                                            <input class="textInput_com" type="text" name="email" id="email" value="" size="22" tabindex="2" aria-required='true' />
                                        </div>
                                        
                                        <div class="divline_com">
                                            <label class="imputlabel_com"  for="url"><small>Pagina Web</small></label>
                                            <input class="textInput_com" type="text" name="url" id="url" value="" size="22" tabindex="3" />
                                        </div>
                                        
                                        
                                        <div class="divline_com">
                                            <label class="imputlabel_com"  for="url"><small>Escribe tu comentario</small></label>                    
                                            <textarea name="comment" id="comment" class="textInput_com" cols="100%" rows="10" tabindex="4"></textarea></div>
                                        
                                        <div class="divline_com">
                                            <input name="submit" class="submitButton_com" type="submit" id="submit" tabindex="5" value=" " />
                                            <input type="hidden" name="comment_post_ID" value="<?php echo $id?>" />
                                            <?php do_action('comment_form'$post->ID); ?>
                                        </div>
                                    </fieldset>
                                </form>
                            </div>
                            </div>
                            <?
                            
}
                        else
                            {
                            
?>
                             <div id="respond">
                                <h3 id="comments">Para poder comentar debes estar registrado</h3>
                                <p><a href="#" id="boton-slider">Clic Aqui para Ingresar</a>,</p>
                                <p><a href="http://mujerespenalolen.cl/wp-login.php?action=register">Clic Aqui para Registrarse</a></p>
                             </div>
                            <?
                            
}
                        
?>
ese es el codigo que estoy utilizando en el archivo comments.php.


alguna idea?

saludos y gracias.
__________________
http://chicho.ninja yiaaaa