Suport » Probleme și soluții » comentarii in pagini

Vizualizare 10 răspunsuri - 1 la 10 (din 10 în total)
  • Cauti in folderul temei fisierul page.php si trebuie sa adaugi, dupa contentul paginii, codul:

    <?php comments_template(); ?>

    Acesta iti va afisa formul de introducere petrnu comentarii si listarea lor. Sper sa mearga, incearca.

    Inițiator fir de discuții parfumio

    (@parfumio)

    Multumesc mult, Alin
    Se intampla ceva numai ca nu stiu unde anume sa adaug codul de mai sus.
    Am incercat sa-l adaug chiar la sfarsitul codului page.php si afiseaza comentarii dar, foarte ciudat, undeva in back-ground-ul site-ului deci nu e buna pozitia.

    Am mai incercat si in alte 2 locuri unde mi s-a parut mie ca s-ar potrivi dar se pare ca nu inteleg inca prea bine logica codului php si cand am pus in cele 2 locuri pur si simplu n-a mai mers site-ul deloc.

    Se poate sa-ti dau tot codul din page.php si sa-mi spui unde anume s-ar potrivi, te rog?

    L-as fi adaugat intr-un fisier separat dar vad ca n-am optiunea asta asa ca-l pun aici:

    <?php get_header(); ?>
    <?php
    $lcmp_page_head = <<<TXT
    <div class="contentLayout">
    <div class="sidebar1">
    <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
    </div>
    <div class="content">
    
    TXT;
    $lcmp_is_left = strpos($lcmp_page_head,"sidebar");
    if($lcmp_is_left===FALSE){
        $lcmp_rightdefault = 'default';
        $lcmp_leftdefault = 'notdefault';
    }else{
        $lcmp_leftdefault = 'default';
        $lcmp_rightdefault = 'notdefault';
    }
    ?>
    <div class="contentLayout">
    <?php
    global $lcmp_sidebarloc;
    if($lcmp_sidebarloc == $lcmp_leftdefault || $lcmp_sidebarloc == 'left'){ ?>
    <div class="sidebar1">
    <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
    </div>
    <?php } ?>
    <div class="content">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="Post">
        <div class="Post-tl"></div>
        <div class="Post-tr"><div></div></div>
        <div class="Post-bl"><div></div></div>
        <div class="Post-br"><div></div></div>
        <div class="Post-tc"><div></div></div>
        <div class="Post-bc"><div></div></div>
        <div class="Post-cl"><div></div></div>
        <div class="Post-cr"><div></div></div>
        <div class="Post-cc"></div>
        <div class="Post-body">
    <div class="Post-inner article">
    <h2 class="PostHeaderIcon-wrapper">
    <span class="PostHeader"><a>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
    <?php the_title(); ?>
    </a></span>
    </h2>
    <?php $icons = array(); ?>
    <?php if (!is_page()) : ?>
    <?php ob_start(); ?>
    <img src="<?php bloginfo('template_url'); ?>/images/PostDateIcon.png" width="18" height="18" alt="PostDateIcon" />
    <?php the_time(__('F jS, Y', 'kubrick')) ?>
    <?php $icons[] = ob_get_clean(); ?>
    <?php endif; ?>
    <?php if (!is_page()) : ?>
    <?php ob_start(); ?>
    <img src="<?php bloginfo('template_url'); ?>/images/PostAuthorIcon.png" width="14" height="14" alt="PostAuthorIcon" />
    <?php _e('Author', 'kubrick'); ?>: <a href="#">"><?php the_author() ?></a>
    <?php $icons[] = ob_get_clean(); ?>
    <?php endif; ?>
    <?php if (current_user_can( 'edit_post', $post->ID )) : ?><?php ob_start(); ?>
    <img src="<?php bloginfo('template_url'); ?>/images/PostEditIcon.png" width="15" height="18" alt="PostEditIcon" />
    <?php edit_post_link(__('Edit', 'kubrick'), ''); ?>
    <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
    <?php if (0 != count($icons)): ?>
    <div class="PostHeaderIcons metadata-icons">
    <?php echo implode(' | ', $icons); ?>
    
    </div>
    <?php endif; ?>
    <div class="PostContent">
    <?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry »', 'kubrick')); ?>
    
    </div>
    <div class="cleared"></div>
    <?php ob_start(); ?>
    <?php $icons = array(); ?>
    <?php if (!is_page()) : ?>
    <?php ob_start(); ?>
    <img src="<?php bloginfo('template_url'); ?>/images/PostCategoryIcon.png" width="18" height="18" alt="PostCategoryIcon" />
    <?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?>
    <?php $icons[] = ob_get_clean(); ?>
    <?php endif; ?>
    <?php if (!is_page() && get_the_tags()) : ?><?php ob_start(); ?>
    <img src="<?php bloginfo('template_url'); ?>/images/PostTagIcon.png" width="7" height="13" alt="PostTagIcon" />
    <?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ' '); ?>
    <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
    <?php if (!is_page() && !is_single()) : ?><?php ob_start(); ?>
    <img src="<?php bloginfo('template_url'); ?>/images/PostCommentsIcon.png" width="18" height="18" alt="PostCommentsIcon" />
    <?php comments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?>
    <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
    <?php if (0 != count($icons)): ?>
    <div class="PostFooterIcons metadata-icons">
    <?php echo implode(' | ', $icons); ?>
    
    </div>
    <?php endif; ?>
    <?php $metadataContent = ob_get_clean(); ?>
    <?php if (trim($metadataContent) != ''): ?>
    <div class="PostMetadataFooter">
    <?php echo $metadataContent; ?>
    
    </div>
    <?php endif; ?>
    
    </div>
    
        </div>
    </div>
    
    <?php endwhile; endif; ?>
    </div>
    <?php
    global $lcmp_sidebarloc;
    if($lcmp_sidebarloc == $lcmp_rightdefault || $lcmp_sidebarloc == 'right'){ ?>
    <div class="sidebar1">
    <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
    </div>
    <?php } ?>
    <?php if(file_exists(TEMPLATEPATH . '/sidebar2.php')){ ?>
    <div class="sidebar2">
    <?php include (TEMPLATEPATH . '/sidebar2.php'); ?>
    </div>
    <?php } ?>
    </div>
    <div class="cleared"></div>
    <?php get_footer(); ?>

    Scuze, probabil ca nu e tocmai ok sa pun un intreg cod aici..
    Merci anticipat…

    [ Laur ]

    Inițiator fir de discuții parfumio

    (@parfumio)

    Gata, scuze, a mers.
    Am identificat locul magic unde trebuia adaugat codul dat de tine. 🙂

    Multumesc mult de tot! Gasisem pe mai multe site-uri mai multe variante de cod, care mai de care mai stufoase, care n-au rezolvat nimic. Tu mi-ai dat doar o linie de cod si a mers ca o vraja! 🙂

    Thanks, raman recunoscator!

    PS: Totusi mai am o intrebare: exista vreo modalitate de a afisa in cadrul unui comment IP-ul celui care l-a postat sau ceva care sa-l identifice. Asta ar contribui la credibilitate, altfel unii ar putea crede ca eu insumi am adaugat comentariile alea.

    Ai idee, se practica asa ceva sau e cam „atentat” la confidentialitate? Desi nu cred ca e, cam toata lumea stie ca IP-ul e public si nu poti sa eviti asta..
    Oricum, ma intereseaza daca exista vreo comanda pt asa ceva si unde se poate adauga.

    Cauti in folderul temei fisierul comments.php. Si acolo trebuie sa adaugi codul <?php comment_author_IP() ?> dupa autorul comentariului. deci cauti <?php comment_author_link() ?> dupa care pui: <?php comment_author_IP() ?>

    De exemplu:
    By <?php comment_author_link() ?>, (<?php comment_author_IP() ?>) <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('M j, Y') ?></a>
    iti va afisa:

    By Ionel (188.233.xx.xx) on Aug 10, 2010
    este alegerea ta daca afisezi ip sau nu

    Cauti in folderul temei fisierul comments.php. Si acolo trebuie sa adaugi codul <?php comment_author_IP() ?> dupa autorul comentariului. deci cauti <?php comment_author_link() ?> dupa care pui: <?php comment_author_IP() ?>

    De exemplu:
    By <?php comment_author_link() ?>, (<?php comment_author_IP() ?>) <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('M j, Y') ?></a>
    iti va afisa:

    By Ionel (188.233.xx.xx) on Aug 10, 2010
    este alegerea ta daca afisezi ip sau nu

    Inițiator fir de discuții parfumio

    (@parfumio)

    Din pacate in ‘comments.php’ nu gasesc ‘<?php comment_author_link() ?>’ si nici ceva asemanator. Probabil tema mea e construita altfel decat ar trebui, nu stiu ce sa zic, de nu gasesc asta..
    Am cautat in ‘comments.php’ ca sa-mi dau seama in ce mod este afisat numele autorului unui comentariu si care e codul pt asta si as fi adaugat tot acolo ce mi-ai dat tu dar nu gasesc deloc.
    Probabil ca afisarea autorului e controlata din alta parte, nu din ‘comments.php’, habar n-am…

    posteaza aici ‘comments.php’

    Inițiator fir de discuții parfumio

    (@parfumio)

    Iata:

    '<?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    
    // 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 ( post_password_required() ) { ?>
    <div class="Post">
        <div class="Post-tl"></div>
        <div class="Post-tr"><div></div></div>
        <div class="Post-bl"><div></div></div>
        <div class="Post-br"><div></div></div>
        <div class="Post-tc"><div></div></div>
        <div class="Post-bc"><div></div></div>
        <div class="Post-cl"><div></div></div>
        <div class="Post-cr"><div></div></div>
        <div class="Post-cc"></div>
        <div class="Post-body">
    <div class="Post-inner article">
    
    <div class="PostContent">
    
    <p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.', 'kubrick'); ?></p>
    
    </div>
    <div class="cleared"></div>
    
    </div>
    
        </div>
    </div>
    
    <?php
    		return;
    	}
    ?>
    
    <!-- You can start editing here. -->
    
    <?php if ( have_comments() ) : ?>
    
    <div class="Post">
        <div class="Post-tl"></div>
        <div class="Post-tr"><div></div></div>
        <div class="Post-bl"><div></div></div>
        <div class="Post-br"><div></div></div>
        <div class="Post-tc"><div></div></div>
        <div class="Post-bc"><div></div></div>
        <div class="Post-cl"><div></div></div>
        <div class="Post-cr"><div></div></div>
        <div class="Post-cc"></div>
        <div class="Post-body">
    <div class="Post-inner article">
    
    <div class="PostContent">
    
    <h3 id="comments"><?php comments_number(__('No Responses', 'kubrick'), __('One Response', 'kubrick'), __('% Responses', 'kubrick'));?> <?php printf(__('to “%s”', 'kubrick'), the_title('', '', false)); ?></h3>
    
    <?php
    ob_start();
    	previous_comments_link(__('Newer Entries &raquo;', 'kubrick'));
    $prev_comment_link = ob_get_clean();
    
    ob_start();
    	next_comments_link(__('&laquo; Older Entries', 'kubrick'));
    $next_comment_link = ob_get_clean();
    ?>
    
    <?php if ($prev_comment_link || $next_comment_link): ?>
    <div class="navigation">
      <div class="alignleft">
        <?php echo $next_comment_link; ?>
      </div>
      <div class="alignright">
        <?php echo $prev_comment_link; ?>
      </div>
    </div>
    <?php endif; ?>
    
    </div>
    <div class="cleared"></div>
    
    </div>
    
        </div>
    </div>
    
    	<ul class="commentlist">
        <?php wp_list_comments('type=comment&callback=art_comment'); ?>
    
    <?php if ($prev_comment_link || $next_comment_link): ?>
    <div class="Post">
        <div class="Post-tl"></div>
        <div class="Post-tr"><div></div></div>
        <div class="Post-bl"><div></div></div>
        <div class="Post-br"><div></div></div>
        <div class="Post-tc"><div></div></div>
        <div class="Post-bc"><div></div></div>
        <div class="Post-cl"><div></div></div>
        <div class="Post-cr"><div></div></div>
        <div class="Post-cc"></div>
        <div class="Post-body">
    <div class="Post-inner article">
    
    <div class="PostContent">
    
    <div class="navigation">
      <div class="alignleft">
        <?php echo $next_comment_link; ?>
      </div>
      <div class="alignright">
        <?php echo $prev_comment_link; ?>
      </div>
    </div>
    
    </div>
    <div class="cleared"></div>
    
    </div>
    
        </div>
    </div>
    
    <?php endif; ?>
    
     <?php else : // this is displayed if there are no comments so far ?>
    
    	<?php if ('open' == $post->comment_status) : ?>
    		<!-- If comments are open, but there are no comments. -->
    
    	 <?php else : // comments are closed ?>
    		<!-- If comments are closed. -->
    <div class="Post">
        <div class="Post-tl"></div>
        <div class="Post-tr"><div></div></div>
        <div class="Post-bl"><div></div></div>
        <div class="Post-br"><div></div></div>
        <div class="Post-tc"><div></div></div>
        <div class="Post-bc"><div></div></div>
        <div class="Post-cl"><div></div></div>
        <div class="Post-cr"><div></div></div>
        <div class="Post-cc"></div>
        <div class="Post-body">
    <div class="Post-inner article">
    
    <div class="PostContent">
    
    <p class="nocomments"><?php _e('Comments are closed.', 'kubrick'); ?></p>
    
    </div>
    <div class="cleared"></div>
    
    </div>
    
        </div>
    </div>
    
    <?php endif; ?>
    <?php endif; ?>
    
    <?php if ('open' == $post->comment_status) : ?>
    <div class="Post">
        <div class="Post-tl"></div>
        <div class="Post-tr"><div></div></div>
        <div class="Post-bl"><div></div></div>
        <div class="Post-br"><div></div></div>
        <div class="Post-tc"><div></div></div>
        <div class="Post-bc"><div></div></div>
        <div class="Post-cl"><div></div></div>
        <div class="Post-cr"><div></div></div>
        <div class="Post-cc"></div>
        <div class="Post-body">
    <div class="Post-inner article">
    
    <div class="PostContent">
    
    <div id="respond">
    
      <h3><?php comment_form_title( __('Leave a Reply', 'kubrick'), __('Leave a Reply for %s', 'kubrick') ); ?></h3>
    
    <div class="cancel-comment-reply">
    	<small><?php cancel_comment_reply_link(); ?></small>
    </div>
    
    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    <p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'kubrick'), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())); ?></p>
    <?php else : ?>
    
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    
    <?php if ( $user_ID ) : ?>
    
    <p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'kubrick'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a>" title="<?php _e('Log out of this account', 'kubrick'); ?>"><?php _e('Log out &raquo;', 'kubrick'); ?></a></p>
    
    <?php else : ?>
    
    <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
    <label for="author"><small><?php _e('Name', 'kubrick'); ?> <?php if ($req) _e("(required)", "kubrick"); ?></small></label></p>
    
    <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
    <label for="email"><small><?php _e('Mail (will not be published)', 'kubrick'); ?> <?php if ($req) _e("(required)", "kubrick"); ?></small></label></p>
    
    <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
    <label for="url"><small><?php _e('Website', 'kubrick'); ?></small></label></p>
    
    <?php endif; ?>
    
    <!--<p><small><?php printf(__('<strong>XHTML:</strong> You can use these tags: <code>%s</code>', 'kubrick'), allowed_tags()); ?></small></p>-->
    
    <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
    
    <p>
    
        <button class="Button" type="submit" name="submit" tabindex="5">
          <span class="btn">
            <span class="t">
              <?php _e('Submit Comment', 'kubrick'); ?>
            </span>
            <span class="r">
              <span></span>
            </span>
            <span class="l"></span>
          </span>
        </button>
    
    <?php comment_id_fields(); ?>
    </p>
    <?php do_action('comment_form', $post->ID); ?>
    
    </form>
    
    <?php endif; // If registration required and not logged in ?>
    </div>
    
    </div>
    <div class="cleared"></div>
    
    </div>
    
        </div>
    </div>
    
    <?php endif; // if you delete this the sky will fall on your head ?>
    
    <div id="disqus_thread"></div>
    <script type="text/javascript">
      /**
        * var disqus_identifier; [Optional but recommended: Define a unique identifier (e.g. post id or slug) for this thread]
        */
      (function() {
       var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
       dsq.src = 'http://parfumio.disqus.com/embed.js';
       (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
      })();
    </script>
    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=parfumio">comments powered by Disqus.</a></noscript>
    <a href="http://disqus.com">blog comments powered by <span class="logo-disqus">Disqus</span></a>'
    Inițiator fir de discuții parfumio

    (@parfumio)

    iata comments.php

    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    
    // 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 ( post_password_required() ) { ?>
    <div class="Post">
        <div class="Post-tl"></div>
        <div class="Post-tr"><div></div></div>
        <div class="Post-bl"><div></div></div>
        <div class="Post-br"><div></div></div>
        <div class="Post-tc"><div></div></div>
        <div class="Post-bc"><div></div></div>
        <div class="Post-cl"><div></div></div>
        <div class="Post-cr"><div></div></div>
        <div class="Post-cc"></div>
        <div class="Post-body">
    <div class="Post-inner article">
    
    <div class="PostContent">
    
    <p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.', 'kubrick'); ?></p>
    
    </div>
    <div class="cleared"></div>
    
    </div>
    
        </div>
    </div>
    
    <?php
    		return;
    	}
    ?>
    
    <!-- You can start editing here. -->
    
    <?php if ( have_comments() ) : ?>
    
    <div class="Post">
        <div class="Post-tl"></div>
        <div class="Post-tr"><div></div></div>
        <div class="Post-bl"><div></div></div>
        <div class="Post-br"><div></div></div>
        <div class="Post-tc"><div></div></div>
        <div class="Post-bc"><div></div></div>
        <div class="Post-cl"><div></div></div>
        <div class="Post-cr"><div></div></div>
        <div class="Post-cc"></div>
        <div class="Post-body">
    <div class="Post-inner article">
    
    <div class="PostContent">
    
    <h3 id="comments"><?php comments_number(__('No Responses', 'kubrick'), __('One Response', 'kubrick'), __('% Responses', 'kubrick'));?> <?php printf(__('to “%s”', 'kubrick'), the_title('', '', false)); ?></h3>
    
    <?php
    ob_start();
    	previous_comments_link(__('Newer Entries »', 'kubrick'));
    $prev_comment_link = ob_get_clean();
    
    ob_start();
    	next_comments_link(__('« Older Entries', 'kubrick'));
    $next_comment_link = ob_get_clean();
    ?>
    
    <?php if ($prev_comment_link || $next_comment_link): ?>
    <div class="navigation">
      <div class="alignleft">
        <?php echo $next_comment_link; ?>
      </div>
      <div class="alignright">
        <?php echo $prev_comment_link; ?>
      </div>
    </div>
    <?php endif; ?>
    
    </div>
    <div class="cleared"></div>
    
    </div>
    
        </div>
    </div>
    
    	<ul class="commentlist">
        <?php wp_list_comments('type=comment&callback=art_comment'); ?>
    
    <?php if ($prev_comment_link || $next_comment_link): ?>
    <div class="Post">
        <div class="Post-tl"></div>
        <div class="Post-tr"><div></div></div>
        <div class="Post-bl"><div></div></div>
        <div class="Post-br"><div></div></div>
        <div class="Post-tc"><div></div></div>
        <div class="Post-bc"><div></div></div>
        <div class="Post-cl"><div></div></div>
        <div class="Post-cr"><div></div></div>
        <div class="Post-cc"></div>
        <div class="Post-body">
    <div class="Post-inner article">
    
    <div class="PostContent">
    
    <div class="navigation">
      <div class="alignleft">
        <?php echo $next_comment_link; ?>
      </div>
      <div class="alignright">
        <?php echo $prev_comment_link; ?>
      </div>
    </div>
    
    </div>
    <div class="cleared"></div>
    
    </div>
    
        </div>
    </div>
    
    <?php endif; ?>
    
     <?php else : // this is displayed if there are no comments so far ?>
    
    	<?php if ('open' == $post->comment_status) : ?>
    		<!-- If comments are open, but there are no comments. -->
    
    	 <?php else : // comments are closed ?>
    		<!-- If comments are closed. -->
    <div class="Post">
        <div class="Post-tl"></div>
        <div class="Post-tr"><div></div></div>
        <div class="Post-bl"><div></div></div>
        <div class="Post-br"><div></div></div>
        <div class="Post-tc"><div></div></div>
        <div class="Post-bc"><div></div></div>
        <div class="Post-cl"><div></div></div>
        <div class="Post-cr"><div></div></div>
        <div class="Post-cc"></div>
        <div class="Post-body">
    <div class="Post-inner article">
    
    <div class="PostContent">
    
    <p class="nocomments"><?php _e('Comments are closed.', 'kubrick'); ?></p>
    
    </div>
    <div class="cleared"></div>
    
    </div>
    
        </div>
    </div>
    
    <?php endif; ?>
    <?php endif; ?>
    
    <?php if ('open' == $post->comment_status) : ?>
    <div class="Post">
        <div class="Post-tl"></div>
        <div class="Post-tr"><div></div></div>
        <div class="Post-bl"><div></div></div>
        <div class="Post-br"><div></div></div>
        <div class="Post-tc"><div></div></div>
        <div class="Post-bc"><div></div></div>
        <div class="Post-cl"><div></div></div>
        <div class="Post-cr"><div></div></div>
        <div class="Post-cc"></div>
        <div class="Post-body">
    <div class="Post-inner article">
    
    <div class="PostContent">
    
    <div id="respond">
    
      <h3><?php comment_form_title( __('Leave a Reply', 'kubrick'), __('Leave a Reply for %s', 'kubrick') ); ?></h3>
    
    <div class="cancel-comment-reply">
    	<small><?php cancel_comment_reply_link(); ?></small>
    </div>
    
    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    <p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'kubrick'), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())); ?></p>
    <?php else : ?>
    
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    
    <?php if ( $user_ID ) : ?>
    
    <p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'kubrick'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a>" title="<?php _e('Log out of this account', 'kubrick'); ?>"><?php _e('Log out »', 'kubrick'); ?></a></p>
    
    <?php else : ?>
    
    <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
    <label for="author"><small><?php _e('Name', 'kubrick'); ?> <?php if ($req) _e("(required)", "kubrick"); ?></small></label></p>
    
    <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
    <label for="email"><small><?php _e('Mail (will not be published)', 'kubrick'); ?> <?php if ($req) _e("(required)", "kubrick"); ?></small></label></p>
    
    <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
    <label for="url"><small><?php _e('Website', 'kubrick'); ?></small></label></p>
    
    <?php endif; ?>
    
    <!--<p><small><?php printf(__('<strong>XHTML:</strong> You can use these tags: <code>%s</code>', 'kubrick'), allowed_tags()); ?></small></p>-->
    
    <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
    
    <p>
    
        <button class="Button" type="submit" name="submit" tabindex="5">
          <span class="btn">
            <span class="t">
              <?php _e('Submit Comment', 'kubrick'); ?>
            </span>
            <span class="r">
              <span></span>
            </span>
            <span class="l"></span>
          </span>
        </button>
    
    <?php comment_id_fields(); ?>
    </p>
    <?php do_action('comment_form', $post->ID); ?>
    
    </form>
    
    <?php endif; // If registration required and not logged in ?>
    </div>
    
    </div>
    <div class="cleared"></div>
    
    </div>
    
        </div>
    </div>
    
    <?php endif; // if you delete this the sky will fall on your head ?>

    Inițiator fir de discuții parfumio

    (@parfumio)

    Salut

    1. mi-ai zis sa adaug aici ‘comments.php’ urmand sa-mi spui tu unde anume sa adaug codul pt afisarea IP-ului

    2. pe baza raspunsului de la tine am facut sa se afiseze comenturile in pagini. Insa acum vreau totusi ca in unele pagini sa dezactivez commenturile. Daca merg in administrarea paginii si debifez acolo „Allow comments” m-as astepta sa mi le scoata dar nu se intampla asa.
    Ai vreo sugestie si pentru treaba asta? Probabil ca mai trebuie adaugat ceva in comanda aceea <?php comments_template(); ?>

    Merci mult

Vizualizare 10 răspunsuri - 1 la 10 (din 10 în total)
  • Subiectul „comentarii in pagini” este închis pentru răspunsuri noi.