Example #1
0
		//<![CDATA[
			var textAreaFocused = false;
		//]]>
	</script>

<?php 
if (WoW_Account::IsLoggedIn()) {
    if (!WoW_Account::IsHaveActiveCharacter()) {
        echo WoW_Locale::GetString('template_characters_not_found');
    } else {
        WoW_Template::LoadTemplate('block_post_blog_reply_logged');
    }
} else {
    WoW_Template::LoadTemplate('block_post_blog_reply_not_logged');
}
$comments = WoW::GetBlogComments();
if (is_array($comments)) {
    $i = 0;
    foreach ($comments as $comment) {
        // Load char
        $character = DB::WoW()->selectRow("SELECT `guid`, `name`, `class`, `race`, `gender`, `level`, `realmName`, `url` FROM `DBPREFIX_user_characters` WHERE `guid` = %d AND `account` = %d AND `realmId` = %d", $comment['character_guid'], $comment['account'], $comment['realm_id']);
        if (!$character) {
            continue;
        }
        if ($comment['answer_to'] > 0) {
            echo '<div class="nested">';
        }
        echo sprintf('<div style="z-index: %d;" class="comment" id="c-%d">', $i, $comment['comment_id']);
        // Portrait
        echo sprintf('<div class="avatar portrait-b">
            <a href="%s">