Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2012
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.34 KB | None | 0 0
  1. <!-- Check Authorize -->
  2.  
  3.  
  4.  
  5. <?php
  6.  
  7.  
  8.  
  9.     if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  10.  
  11.  
  12.  
  13.         die ('Please do not load this page directly. Thanks!');
  14.  
  15.  
  16.  
  17.     if (post_password_required()){
  18.  
  19.  
  20.  
  21.         ?> <p class="nopassword">This post is password protected. Enter the password to view comments.</p> <?php
  22.  
  23.  
  24.  
  25.         return;
  26.  
  27.  
  28.  
  29.     }
  30.  
  31.  
  32.  
  33. ?>
  34.  
  35.  
  36.  
  37. <!-- Comment List -->
  38.  
  39.  
  40.  
  41. <?php if ( have_comments() ) : ?>
  42.  
  43.  
  44.  
  45.     <div id="comments" class="comment-title gdl-link-title gdl-title"><?php pl_comments_number('Brak komentarzy', 'Jeden komentarz', '% Komentarze' );?></div>
  46.  
  47.  
  48.  
  49.     <ol class="comment-list">
  50.  
  51.  
  52.  
  53.         <?php wp_list_comments(array('callback' => 'get_comment_list')); ?>
  54.  
  55.  
  56.  
  57.     </ol>
  58.  
  59.  
  60.  
  61.     <!-- Comment Navigation -->
  62.  
  63.  
  64.  
  65.     <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
  66.  
  67.  
  68.  
  69.         <br>
  70.  
  71.  
  72.  
  73.         <div class="comments-navigation">
  74.  
  75.  
  76.  
  77.             <div class="previous"> <?php previous_comments_link('Wcześniejsze komenatrze'); ?> </div>
  78.  
  79.  
  80.  
  81.             <div class="next"> <?php next_comments_link('Następne komentarze'); ?> </div>
  82.  
  83.  
  84.  
  85.         </div>
  86.  
  87.  
  88.  
  89.     <?php endif; ?>
  90.  
  91.  
  92.  
  93. <?php endif; ?>
  94.  
  95.  
  96.  
  97. <!-- Comment Form -->
  98.  
  99.  
  100.  
  101. <?php
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.     // Translator words
  110.  
  111.  
  112.  
  113.     global $gdl_admin_translator;
  114.  
  115.  
  116.  
  117.     if( $gdl_admin_translator == 'enable' ){
  118.  
  119.  
  120.  
  121.         $translator_leave_reply = get_option(THEME_SHORT_NAME.'_translator_leave_reply', 'Leave a Reply');
  122.  
  123.  
  124.  
  125.     }else{
  126.  
  127.  
  128.  
  129.         $translator_leave_reply = __('Skomentuj','gdl_front_end');
  130.  
  131.  
  132.  
  133.     }  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.     $comment_form = array(
  142.  
  143.  
  144.  
  145.         'fields' => apply_filters( 'comment_form_default_fields', array(
  146.  
  147.  
  148.  
  149.             'author' => '<div class="comment-form-author">' .
  150.  
  151.  
  152.  
  153.                         '<input id="author" name="author" type="text" value="' .
  154.  
  155.  
  156.  
  157.                         esc_attr( $commenter['comment_author'] ) . '" size="30" tabindex="1" />' .
  158.  
  159.  
  160.  
  161.                         '<label for="author">' . __( 'Imię', 'gdl_front_end' ) . '</label> ' .
  162.  
  163.  
  164.  
  165.                         ( $req ? '<span class="required">*</span>' : '' ) .
  166.  
  167.  
  168.  
  169.                         '<div class="clear"></div>' .
  170.  
  171.  
  172.  
  173.                         '</div><!-- #form-section-author .form-section -->',
  174.  
  175.  
  176.  
  177.             'email'  => '<div class="comment-form-email">' .
  178.  
  179.  
  180.  
  181.                         '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30" tabindex="2" />' .
  182.  
  183.  
  184.  
  185.                         '<label for="email">' . __( 'Email', 'gdl_front_end' ) . '</label> ' .
  186.  
  187.  
  188.  
  189.                         ( $req ? '<span class="required">*</span>' : '' ) .
  190.  
  191.  
  192.  
  193.                         '<div class="clear"></div>' .
  194.  
  195.  
  196.  
  197.                         '</div><!-- #form-section-email .form-section -->',
  198.  
  199.  
  200.  
  201.             'url'    => '<div class="comment-form-url">' .
  202.  
  203.  
  204.  
  205.                         '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" tabindex="3" />' .
  206.  
  207.  
  208.  
  209.                         '<label for="url">' . __( 'Website', 'gdl_front_end' ) . '</label>' .
  210.  
  211.  
  212.  
  213.                         '<div class="clear"></div>' .
  214.  
  215.  
  216.  
  217.                         '</div><!-- #form-section-url .form-section -->' ) ),
  218.  
  219.  
  220.  
  221.         'comment_field' => '<div class="comment-form-comment">' .
  222.  
  223.  
  224.  
  225.                     '<textarea id="comment" name="comment" aria-required="true"></textarea>' .
  226.  
  227.  
  228.  
  229.                     '</div><!-- #form-section-comment .form-section -->',
  230.  
  231.  
  232.  
  233.         'comment_notes_before' => '',
  234.  
  235.  
  236.  
  237.         'comment_notes_after' => '',
  238.  
  239.  
  240.  
  241.         'title_reply' => $translator_leave_reply,
  242.  
  243.  
  244.  
  245.     );
  246.  
  247.  
  248.  
  249.     comment_form($comment_form, $post->ID);
  250.  
  251.  
  252.  
  253.    
  254.  
  255.  
  256.  
  257. /*
  258.  
  259.  
  260.  
  261. $defaults = array( 'fields' => apply_filters( 'comment_form_default_fields', array(
  262.  
  263.  
  264.  
  265.     'author' => '<p class="comment-form-author">' .
  266.  
  267.  
  268.  
  269.                 '<label for="author">' . __( 'Name' ) . '</label> ' .
  270.  
  271.  
  272.  
  273.                 ( $req ? '<span class="required">*</span>' : '' ) .
  274.  
  275.  
  276.  
  277.                 '<input id="author" name="author" type="text" value="' .
  278.  
  279.  
  280.  
  281.                 esc_attr( $commenter['comment_author'] ) . '" size="30" tabindex="1"' . $aria_req . ' />' .
  282.  
  283.  
  284.  
  285.                 '</p><!-- #form-section-author .form-section -->',
  286.  
  287.  
  288.  
  289.     'email'  => '<p class="comment-form-email">' .
  290.  
  291.  
  292.  
  293.                 '<label for="email">' . __( 'Email' ) . '</label> ' .
  294.  
  295.  
  296.  
  297.                 ( $req ? '<span class="required">*</span>' : '' ) .
  298.  
  299.  
  300.  
  301.                 '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30" tabindex="2"' . $aria_req . ' />' .
  302.  
  303.  
  304.  
  305.                 '</p><!-- #form-section-email .form-section -->',
  306.  
  307.  
  308.  
  309.     'url'    => '<p class="comment-form-url">' .
  310.  
  311.  
  312.  
  313.                 '<label for="url">' . __( 'Website' ) . '</label>' .
  314.  
  315.  
  316.  
  317.                 '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" tabindex="3" />' .
  318.  
  319.  
  320.  
  321.                 '</p><!-- #form-section-url .form-section -->' ) ),
  322.  
  323.  
  324.  
  325.     'comment_field' => '<p class="comment-form-comment">' .
  326.  
  327.  
  328.  
  329.                 '<label for="comment">' . __( 'Comment' ) . '</label>' .
  330.  
  331.  
  332.  
  333.                 '<textarea id="comment" name="comment" cols="45" rows="8" tabindex="4" aria-required="true"></textarea>' .
  334.  
  335.  
  336.  
  337.                 '</p><!-- #form-section-comment .form-section -->',
  338.  
  339.  
  340.  
  341.     'must_log_in' => '<p class="must-log-in">' .  sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
  342.  
  343.  
  344.  
  345.     'logged_in_as' => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%s">%s</a>. <a href="%s" title="Log out of this account">Log out?</a></p>' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ),
  346.  
  347.  
  348.  
  349.     'comment_notes_before' => '<p class="comment-notes">' . __( 'Your email is <em>never</em> published nor shared.' ) . ( $req ? __( ' Required fields are marked <span class="required">*</span>' ) : '' ) . '</p>',
  350.  
  351.  
  352.  
  353.     'comment_notes_after' => '<dl class="form-allowed-tags"><dt>' . __( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:' ) . '</dt> <dd><code>' . allowed_tags() . '</code></dd></dl>',
  354.  
  355.  
  356.  
  357.     'id_form' => 'commentform',
  358.  
  359.  
  360.  
  361.     'id_submit' => 'submit',
  362.  
  363.  
  364.  
  365.     'title_reply' => __( 'Leave a Reply' ),
  366.  
  367.  
  368.  
  369.     'title_reply_to' => __( 'Leave a Reply to %s' ),
  370.  
  371.  
  372.  
  373.     'cancel_reply_link' => __( 'Cancel reply' ),
  374.  
  375.  
  376.  
  377.     'label_submit' => __( 'Post Comment' ),
  378.  
  379.  
  380.  
  381. );
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389. */
  390.  
  391.  
  392.  
  393. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement