Example #1
0
            echo $comments["{$array}"]['deletion_notice'] . PHP_EOL;
            echo '</div>' . PHP_EOL;
        }
    }
}
// Display most popular comments
if (!empty($top_likes)) {
    echo "\t" . '<br><b class="cmtfont">' . $text['popular_cmts'] . ' Comment' . (count($top_likes) != '1' ? 's' : '') . ':</b>' . PHP_EOL;
    $variable = '';
    foreach ($top_likes as $file) {
        $likes_array = parse_comments($file, array(), 'no');
    }
    parse_template(array_values($likes_array), $top_cmts);
}
// Display comment count
echo "\t" . '<br><b class="cmtfont">' . $text['showing_cmts'] . ' ' . ($script = $cmt_count == "1" ? '0 Comments:</b>' . PHP_EOL : display_count() . ':</b>' . PHP_EOL);
// Display comments, if there are no comments display a note
if (!empty($show_cmt)) {
    parse_template($show_cmt, $total_count);
} else {
    echo "\t" . '<div style="margin: 16px 0px 12px 0px;" class="cmtdiv">' . PHP_EOL;
    echo "\t\t" . '<span class="cmtnumber"><img width="' . $icon_size . '" height="' . $icon_size . '" src="/img/first-comment.png"></span>' . PHP_EOL;
    echo "\t\t" . '<div style="height: ' . $icon_size . 'px;" class="cmtbubble">' . PHP_EOL;
    echo "\t\t\t" . '<b class="cmtnote cmtfont" style="color: #000000;">Be the first to comment!</b>' . PHP_EOL;
    echo "\t\t" . '</div>' . PHP_EOL;
    echo "\t" . '</div>' . PHP_EOL;
}
?>

	<br><center>
		HashOver Comments &middot;
        if (!empty($top_likes)) {
            echo parse_comments(array_shift($top_likes), '', 'no');
        }
    }
    echo '];' . PHP_EOL . PHP_EOL;
    echo 'for (var comment in popComments) {' . PHP_EOL;
    echo "\t" . 'parse_template(popComments[comment], false);' . PHP_EOL;
    echo '}' . PHP_EOL . PHP_EOL;
}
if (!empty($show_cmt)) {
    echo 'var comments = [' . PHP_EOL;
    echo $show_cmt;
    echo '];' . PHP_EOL . PHP_EOL;
}
// Display comment count
echo jsAddSlashes('<br><b class="cmtfont">' . $text['showing_cmts'] . ' ' . ($script = $cmt_count == "1" ? '0 Comments:</b>\\n' : display_count() . ':</b>\\n')) . PHP_EOL;
// Display comments, if there are no comments display a note
if (!empty($show_cmt)) {
    echo jsAddSlashes('<span style="float: right;">\\n' . $text['sort'] . ': <select name="sort" size="1" onChange="sort_comments(this.value); return false;">\\n');
    echo jsAddSlashes('<option value="ascending">' . $text['sort_ascend'] . '</option>\\n');
    echo jsAddSlashes('<option value="descending">' . $text['sort_descend'] . '</option>\\n');
    echo jsAddSlashes('<option value="byname">' . $text['sort_byname'] . '</option>\\n');
    echo jsAddSlashes('<option value="bydate">' . $text['sort_bydate'] . '</option>\\n');
    echo jsAddSlashes('<option value="bylikes">' . $text['sort_bylikes'] . '</option>\\n');
    echo jsAddSlashes('</select>\\n</span>\\n') . PHP_EOL;
    echo jsAddSlashes('<div id="sort_div">\\n') . PHP_EOL;
    echo 'for (var comment in comments) {' . PHP_EOL;
    echo "\t" . 'parse_template(comments[comment], false);' . PHP_EOL;
    echo '}' . PHP_EOL . PHP_EOL;
    echo jsAddSlashes('</div>\\n') . PHP_EOL;
} else {
Example #3
0
        $show_count = $cmt_count . ' Comment';
        if ($cmt_count != '1') {
            $show_count .= 's';
        }
        $show_count .= ' (' . $total_count . ' counting repl';
        $show_count .= $total_count != '2' ? 'ies)' : 'y)';
    }
    return $show_count;
}
// If the "count_link" query is set, echo comment count as link
if (isset($script_query)) {
    if (isset($_GET['count_link']) and !empty($_GET['count_link'])) {
        read_comments($dir, 'no');
        // Run read_comments function
        if ($total_count > 1) {
            exit(jsAddSlashes('<a href="' . $_GET['count_link'] . '#comments">' . display_count() . '</a>', 'single'));
        } else {
            exit(jsAddSlashes('<a href="' . $_GET['count_link'] . '#comments">Post Comment</a>', 'single'));
        }
    }
}
// Clear message cookie
if (isset($_COOKIE['message']) and !empty($_COOKIE['message'])) {
    setcookie('message', '', 1, '/', str_replace('www.', '', $domain));
}
// Check if either a comment or reply failed to post
if (isset($_COOKIE['success']) and $_COOKIE['success'] == 'no') {
    setcookie('success', '', 1, '/', str_replace('www.', '', $domain));
    if (isset($_COOKIE['replied']) and !empty($_COOKIE['replied'])) {
        $text['comment_form'] = $text['reply_form'];
        $text['post_button'] = $text['post_reply'];
Example #4
0
	document.getElementById('sort_div').innerHTML = 'Loading...' + '\n';
	methods[method]();
	document.getElementById('sort_div').innerHTML = show_cmt + '\n';
}
<?php 
if ($page_title == 'yes') {
    $js_title = "'+pagetitle+'";
    $js_title = isset($_GET['pagetitle']) ? ' on "' . $_GET['pagetitle'] . '"' : $js_title;
}
echo '// Place "hashover" DIV' . PHP_EOL;
echo 'if (document.getElementById("hashover") == null) {' . PHP_EOL;
echo "\t" . 'document.write("<div id=\\"hashover\\"></div>\\n");' . PHP_EOL;
echo '}' . PHP_EOL . PHP_EOL;
//	echo jsAddSlashes('<a name="comments"></a><br><b class="cmtfont">' . $text['post_cmt'] . ':</b>');
// Display comment count
echo jsAddSlashes('<span class="cmtfont">' . ($script = $cmt_count == "1" ? 'Pas de commentaires</span>\\n' : display_count() . '</span>\\n')) . PHP_EOL;
echo jsAddSlashes('<form id="comment_form" name="comment_form" action="/hashover.php" method="post">\\n');
/*	echo jsAddSlashes('<span class="cmtnumber">');

	if (isset($_COOKIE['name']) and preg_match('/^@([a-zA-Z0-9_@]{1,29}$)/', $_COOKIE['name'])) {
		echo "\t" . jsAddSlashes('<img align="left" width="' . $icon_size . '" height="' . $icon_size . '" src="' . $script = $root_dir . 'scripts/avatars.php?username='******'name'] . '&email=' . md5(strtolower(trim($_COOKIE['email']))) . '">');
	} else {
		echo "\t" . jsAddSlashes('<img align="left" width="' . $icon_size . '" height="' . $icon_size . '" src="' . $script = (isset($_COOKIE['email'])) ? 'http://gravatar.com/avatar/' . md5(strtolower(trim($_COOKIE['email']))) . '?d=http://' . $domain . $root_dir . 'images/avatar.png&s=' . $icon_size . '&r=pg">\n' : $root_dir . 'images/avatar.png">');
	}

	echo jsAddSlashes('</span>\n');*/
echo jsAddSlashes('<div class="cmtbox" align="center">\\n');
// Display name input tag if told to
echo "if (name_on == 'yes') {\n";
echo "\t" . jsAddSlashes('<input type="text" name="name" title="' . $text['nickname_tip'] . '" maxlength="30" class="opt-name" onFocus="this.value=(this.value == \'' . $text['nickname'] . '\') ? \'\' : this.value;" onBlur="this.value=(this.value == \'\') ? \'' . $text['nickname'] . '\' : this.value;" value="' . ($script = $text['nickname'] . '">\\n'));
echo "}\n\n";