Example #1
0
    function form()
    {
        global $thesis_site;
        if (comments_open()) {
            #wp
            global $user_ID, $user_identity;
            if (get_option('comment_registration') && !$user_ID) {
                // If registration is required and the user is NOT logged in... #wp
                echo "\t\t\t\t<div class=\"login_alert\">\n";
                echo "\t\t\t\t\t<p>" . sprintf(__('You must <a href="%s" rel="nofollow">log in</a> to post a comment.', 'thesis'), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())) . "</p>\n";
                #wp
                echo "\t\t\t\t</div>\n";
            } else {
                // Otherwise, show the user the stinkin' comment form already!
                echo "\t\t\t\t<div id=\"respond\">\n";
                echo "\t\t\t\t\t<div id=\"respond_intro\">\n";
                if (get_option('thread_comments')) {
                    cancel_comment_reply_link(__('Cancel reply', 'thesis'));
                }
                #wp
                echo "\t\t\t\t\t\t<p>" . apply_filters('thesis_comment_form_title', __('Leave a Comment', 'thesis')) . "</p>\n";
                #filter
                echo "\t\t\t\t\t</div>\n";
                echo "\t\t\t\t\t<form action=\"" . get_option('siteurl') . "/wp-comments-post.php\" method=\"post\" id=\"commentform\">\n";
                #wp
                thesis_hook_comment_form_top();
                if ($user_ID) {
                    // If the user is logged in... #wp
                    echo "\t\t\t\t\t\t<p>" . sprintf(__('Logged in as <a href="%1$s" rel="nofollow">%2$s</a>.', 'thesis'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity) . ' ' . sprintf(__('<a href="%s" title="Log out of this account" rel="nofollow">Logout &rarr;</a>', 'thesis'), thesis_logout_url()) . "</p>\n";
                } else {
                    // Otherwise, give your name to the doorman
                    $req = (bool) get_option('require_name_email');
                    ?>
						<p><input class="text_input" type="text" name="author" id="author" value="<?php 
                    echo $comment_author;
                    ?>
" tabindex="1"<?php 
                    if ($req) {
                        echo ' aria-required="true"';
                    }
                    ?>
 /><label for="author"><?php 
                    _e('Name', 'thesis');
                    if ($req) {
                        _e(' <span class="required" title="Required">*</span>', 'thesis');
                    }
                    ?>
</label></p>
						<p><input class="text_input" type="text" name="email" id="email" value="<?php 
                    echo $comment_author_email;
                    ?>
" tabindex="2"<?php 
                    if ($req) {
                        echo ' aria-required="true"';
                    }
                    ?>
 /><label for="email"><?php 
                    _e('E-mail', 'thesis');
                    if ($req) {
                        _e(' <span class="required" title="Required">*</span>', 'thesis');
                    }
                    ?>
</label></p>
						<p><input class="text_input" type="text" name="url" id="url" value="<?php 
                    echo $comment_author_url;
                    ?>
" tabindex="3" /><label for="url"><?php 
                    _e('Website', 'thesis');
                    ?>
</label></p>
<?php 
                }
                thesis_hook_comment_field();
                echo "\t\t\t\t\t\t<p class=\"comment_box\">\n";
                echo "\t\t\t\t\t\t\t<textarea name=\"comment\" id=\"comment\" tabindex=\"4\" cols=\"40\" rows=\"8\"></textarea>\n";
                echo "\t\t\t\t\t\t</p>\n";
                thesis_hook_after_comment_box();
                echo "\t\t\t\t\t\t<p class=\"remove_bottom_margin\">\n";
                echo "\t\t\t\t\t\t\t<input name=\"submit\" class=\"form_submit\" type=\"submit\" id=\"submit\" tabindex=\"5\" value=\"" . __('Submit', 'thesis') . "\" />\n";
                comment_id_fields();
                #wp
                echo "\t\t\t\t\t\t</p>\n";
                thesis_hook_comment_form_bottom();
                do_action('comment_form', $post->ID);
                #wp
                echo "\t\t\t\t\t</form>\n";
                echo "\t\t\t\t</div>\n";
            }
        } elseif ($thesis_site->comments['show_closed']) {
            echo "\t\t\t\t<div class=\"comments_closed\">\n";
            echo "\t\t\t\t\t<p>" . apply_filters('thesis_comments_closed', __('Comments on this entry are closed.', 'thesis')) . "</p>\n";
            echo "\t\t\t\t</div>\n";
        }
    }
Example #2
0
        ?>

						<p><?php 
        comment_form_title(__('Leave a Comment', 'thesis'), __('Reply to %s:', 'thesis'));
        ?>
</p>
					</div>

					<form action="<?php 
        echo get_option('siteurl');
        ?>
/wp-comments-post.php" method="post" id="commentform">
<?php 
        if ($user_ID) {
            // If the user is logged in...
            echo '						<p>' . sprintf(__('Logged in as <a href="%1$s/wp-admin/profile.php" rel="nofollow">%2$s</a>.', 'thesis'), get_option('siteurl'), $user_identity) . ' ' . sprintf(__('<a href="%s" title="Log out of this account" rel="nofollow">Logout &rarr;</a>', 'thesis'), thesis_logout_url()) . '</p>' . "\n";
        } else {
            // Otherwise, give your name to the doorman
            ?>
						<p><input class="text_input" type="text" name="author" id="author" value="<?php 
            echo $comment_author;
            ?>
" tabindex="1"<?php 
            if ($req) {
                echo ' aria-required="true"';
            }
            ?>
 /><label for="author"><?php 
            _e('Name', 'thesis');
            if ($req) {
                _e(' <span class="required" title="Required">*</span>', 'thesis');