<p align="right"><img localsrc="68" alt="by " /><font color="#ff8c00"><?php 
        the_author();
        ?>
</font> <img localsrc="46" alt=" @ " /><font color="<?php 
        echo $ks_settings['date_color'];
        ?>
"><?php 
        ks_time('Y-m-d H:i');
        ?>
</font></p>
		<div><?php 
        ks_tags('<img localsrc="106" alt="" /><font size="-1">' . __('Tags') . ':', '</font><br />');
        if (ks_option('ks_separate_comments')) {
            ks_comments_link($ks_settings['comments_icon'] + array('zero' => __('No Comments/Pings', 'ktai_style'), 'one' => __('One Comment/Ping', 'ktai_style'), 'more' => __('% Comments and Pings', 'ktai_style')));
        } else {
            ks_comments_link($ks_settings['comments_icon'] + array('zero' => __('No comments', 'ktai_style')));
        }
        ks_comments_post_link(NULL, '<br />');
        edit_post_link('<font color="' . $ks_settings['edit_color'] . '">' . __('Edit post') . '</font>', '<br /><img localsrc="104" alt="" />');
        ?>
</div><hr color="<?php 
        echo $ks_settings['hr_color'];
        ?>
" /><?php 
        ks_previous_post_link('<div align="left"><img localsrc="7" alt="&laquo; ">*.%link</div>');
        ks_next_post_link('<div align="right">#.%link<img localsrc="8" alt=" &raquo;"></div>');
    } else {
        // ks_is_comment()
        echo '<h2>' . sprintf(__('Comments for <a href="%1$s"><span style="%2$s">%3$s</span></a>', 'ktai_style'), get_permalink(), $ks_settings['title_style'], get_the_title()) . '</h2>';
        comments_template();
    }
        ?>
</font></div>
		<?php 
        ks_content(__('(more...)'));
        ks_link_pages();
        ?>
		<div><img localsrc="354" alt="" /><font size="-1"><?php 
        echo __('Categories') . ':';
        ks_category();
        ?>
</font><br /><?php 
        ks_tags('<img localsrc="77" alt="" /><font size="-1">' . __('Tags') . ':', '</font><br />');
        if (ks_option('ks_separate_comments')) {
            ks_comments_link(NULL, __('No Comments/Pings', 'ktai_style'), __('One Comment/Ping', 'ktai_style'), __('% Comments and Pings', 'ktai_style'));
        } else {
            ks_comments_link();
        }
        ks_comments_post_link(NULL, '<br />');
        edit_post_link('<font color="' . $ks_settings['edit_color'] . '">' . __('Edit post') . '</font>', '<div><img localsrc="104" alt="" />', '</div>');
        ?>
</div>
		<hr color="<?php 
        echo $ks_settings['hr_color'];
        ?>
" />
		<?php 
        ks_previous_post_link('<div align="left"><img localsrc="7" alt="&laquo; ">*.%link</div>');
        ks_next_post_link('<div align="right">#.%link<img localsrc="8" alt=" &raquo;"></div>');
    } else {
        // ks_is_comment()
        echo '<div ' . $ks_settings['h2_style'] . '><h2>' . sprintf(__('Comments for <a href="%1$s"><span style="%2$s">%3$s</span></a>', 'ktai_style'), get_permalink(), $ks_settings['h2_a_color'], get_the_title()) . '</h2></div>';
            }
            ?>
			</ul>
		<?php 
        } else {
            // If there are no comments yet
            ?>
			<p><?php 
            echo $type != 'pings' ? __('No comments yet.') : __('No pings yet.', 'ktai_style');
            ?>
</p>
		<?php 
        }
    }
} elseif (ks_is_comment_post()) {
    ks_comments_link('', __('No Comments/Pings', 'ktai_style'), __('One Comment/Ping', 'ktai_style'), __('% Comments and Pings', 'ktai_style'));
    $login_url = ks_get_login_url(KTAI_NOT_ECHO, ks_comments_post_url());
    ?>
	<hr />
	<?php 
    if (!comments_open()) {
        ?>
		<p><?php 
        _e('Sorry, the comment form is closed at this time.');
        ?>
</p>
	<?php 
    } elseif (get_option('comment_registration') && !is_user_logged_in()) {
        if ($login_url) {
            ?>
			<p><?php 
        ?>
</font></div>
		<?php 
        ks_content(__('(more...)'));
        ks_link_pages();
        ?>
		<div><img localsrc="44" alt="" /><font size="-1"><?php 
        echo __('Categories') . ':';
        ks_category();
        ?>
</font><br /><?php 
        ks_tags('<img localsrc="119" alt="" /><font size="-1">' . __('Tags') . ':', '</font><br />');
        if (ks_option('ks_separate_comments')) {
            ks_comments_link('<img localsrc="811" alt="" />', __('No Comments/Pings', 'ktai_style'), __('One Comment/Ping', 'ktai_style'), __('% Comments and Pings', 'ktai_style'));
        } else {
            ks_comments_link('<img localsrc="811" alt="" />');
        }
        ks_comments_post_link(NULL, '<br />');
        edit_post_link('<font color="' . $ks_settings['edit_color'] . '">' . __('Edit post') . '</font>', '<br /><img localsrc="104" alt="" />');
        ?>
</div>
		<hr color="<?php 
        echo $ks_settings['hr_color'];
        ?>
" />
		<?php 
        ks_previous_post_link('<div align="left"><img localsrc="7" alt="&laquo; ">*.%link</div>');
        ks_next_post_link('<div align="right">#.%link<img localsrc="8" alt=" &raquo;"></div>');
    } else {
        // ks_is_comment()
        echo '<div style="' . $ks_settings['title_style'] . '"><h2>' . sprintf(__('Comments for <a href="%1$s"><span style="%2$s">%3$s</span></a>', 'ktai_style'), get_permalink(), 'color:#eeeeee', get_the_title()) . '</h2></div>';
    if (is_archive()) {
        $post = $posts[0];
        // Hack. Set $post so that the_date() works.
        ?>
<h2><?php 
        ks_pagenum();
        ?>
</h2><?php 
    }
    for (; have_posts(); $count++) {
        the_post();
        the_date('', '<u>', '</u><br/>');
        ks_ordered_link($count, $max, get_permalink(), get_the_title());
        edit_post_link('<font color="' . $ks_settings['edit_color'] . '">' . __('Edit') . '</font>', '(', ')');
        echo ' ';
        ks_comments_link('', '[0]', '[1]', '[%]', '[X]', '[?]');
        ?>
 <font color="<?php 
        echo $ks_settings['date_color'];
        ?>
"><?php 
        the_time('H:i');
        ?>
</font><br />
	<?php 
    }
    ?>
	<div align="center"><?php 
    ks_posts_nav_link();
    ?>
</div>
        ?>
		<hr />
		<h2><a name="cont"><?php 
        _e('Following posts', 'ktai_style');
        ?>
</a></h2>
		<dl>
		<?php 
        for ($count = $ks_settings['ol_count']; have_posts(); $count++) {
            the_post();
            ?>
			<dt><?php 
            ks_ordered_link($count, $next_accesskey - 1, get_permalink(), get_the_title());
            edit_post_link('<font color="' . $ks_settings['edit_color'] . '">' . __('Edit') . '</font>', '<img localsrc="104" alt="" />');
            echo ' ';
            ks_comments_link('<img localsrc="86" alt="[' . __('Comments') . '] " />', '0', '1', '%', '<img localsrc="61" alt="' . __('Comments off', 'ktai_style') . '" />', '<img localsrc="120" alt="?" />');
            ?>
 <img localsrc="46" alt="@ " /><font color="<?php 
            echo $ks_settings['date_color'];
            ?>
"><?php 
            ks_time();
            ?>
</font></dt>
		<?php 
        }
        ?>
		</dl>
	<?php 
    }
    // inner have_posts()
        ?>
</div>
		<hr color="<?php 
        echo $ks_settings['hr_color'];
        ?>
" />
		<?php 
        ks_content(__('(more...)'));
        ks_link_pages();
        ?>
		<hr color="<?php 
        echo $ks_settings['hr_color'];
        ?>
" />
		<?php 
        ks_comments_link(ks_pict_number(1), __('View Comments(0)', 'redportal'), __('View Comment(1)', 'redportal'), sprintf(__('View Comments(%d)', 'redportal'), get_comments_number($id)), '' . __('<img localsrc="61" alt="X " />Comments Stopped', 'redportal'), NULL, '1');
        ks_comments_post_link(__('Write a comment', 'redportal'), '<br />', '', ks_pict_number(2), '2');
        edit_post_link(__('Edit post'), '<br /><img localsrc="104" alt="" />');
        ?>
<hr color="<?php 
        echo $ks_settings['hr_color'];
        ?>
" /><?php 
        ks_previous_post_link('<div align="left"><img localsrc="7" alt="&laquo;">*.%link</div>');
        ks_next_post_link('<div align="right">#.%link<img localsrc="8" alt="&raquo;"></div>');
        ks_tags('<hr color="' . $ks_settings['hr_color'] . '" />' . __('<img localsrc="77" alt="" />Related Words', 'redportal') . '<br />');
    } else {
        // ks_is_comment()
        comments_template();
    }
} else {
    while (have_posts()) {
        the_post();
        ?>
<dt><br /><?php 
        _e('/-', 'ktai_style');
        ?>
<font color="<?php 
        echo $ks_settings['date_color'];
        ?>
"><?php 
        ks_time();
        ?>
</font>
		<?php 
        $icon = '<img localsrc="86" alt="[' . __('Comments') . '] " />';
        ks_comments_link(array('icon' => $icon, 'zero' => '0', 'one' => '1', 'more' => '%', 'none' => '<img localsrc="61" alt="' . __('Off', 'ktai_style') . '" />', 'sec' => '<img localsrc="120" alt="?" />', 'icon_none' => $icon, 'icon_sec' => $icon));
        edit_post_link('<font color="' . $ks_settings['edit_color'] . '">' . __('Edit') . '</font>', ' <img localsrc="104" alt="" />');
        ?>
<br /><a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a><?php 
        if (is_home()) {
            ?>
<br /><font color="#223333" size="-1"><?php 
            echo ks_excerpt(80, KTAI_NOT_ECHO);
            ?>
</font><?php 
"><span style="<?php 
        echo $ks_settings['title_style'];
        ?>
"><?php 
        the_title();
        ?>
</span></a><br />
		<img localsrc="46" alt="@ " /><font color="<?php 
        echo $ks_settings['date_color'];
        ?>
"><?php 
        ks_time();
        ?>
</font><br />
		<?php 
        ks_comments_link(array('zero' => __('No comments', 'ktai_style'), 'one' => __('One comment', 'ktai_style'), 'more' => __('% comments', 'ktai_style')) + $ks_settings['comments_icon']);
        edit_post_link('<font color="' . $ks_settings['edit_color'] . '">' . __('Edit') . '</font>', '<img localsrc="104" alt="" />');
        if (is_home()) {
            ?>
<br /><font color="#ff8c00" size="-1"><?php 
            echo ks_excerpt(80, KTAI_NOT_ECHO);
            ?>
</font><?php 
        }
        ?>
</dt><?php 
    }
    ?>
</dl>
	<div align="center"><?php 
    ks_posts_nav_link();