"):
$comment_settings['wordwrap'] = " - ";
// Language settings:
$comment_lang['language'] = "en";
$comment_lang['title'] = "Comments";
$comment_lang['email_title'] = "E-mail to [name]";
$comment_lang['hp_title'] = "Homepage: [homepage]";
$comment_lang['no_comments_yet'] = "No comments yet.";
$comment_lang['comments_shown'] = "[comments] of [comments_total] comments (part [part])";
$comment_lang['previous'] = "Previous part";
$comment_lang['next'] = "Next part";
$comment_lang['show_all'] = "Show all comments";
$comment_lang['add_comment'] = "Your comment:";
$comment_lang['name'] = "Name:";
$comment_lang['email_hp'] = "E-mail or homepage:";
$comment_lang['ok'] = "OK";
$comment_lang['no_comments'] = "No comments";
$comment_lang['one_comment'] = "1 comment";
$comment_lang['several_comments'] = "[comments] comments";
$comment_lang['comment_link_title'] = "Read or write comments";
$comment_lang['email_subject'] = "Comment to [comment_to]";
$comment_lang['email_text'] = "Comment to [comment_to] by [name]:\n\n[comment]\n\n\nLink to the comment:\n[link]";
$comment_lang['error'] = "Error:";
$comment_lang['err_text_too_long'] = "the text is too long ([characters] characters - maximum is [characters_max] characters)";
$comment_lang['err_word_too_long'] = "the word [word] is too long";
// End of settings
function comment_make_link($string)
{
$string = ' ' . $string;
$string = preg_replace("#(^|[\n ])([\w]+?://.*?[^ \"\n\r\t<]*)#is", "\\1\\2", $string);
$string = preg_replace("#(^|[\n ])((www|ftp)\.[\w\-]+\.[\w\-.\~]+(?:/[^ \"\t\n\r<]*)?)#is", "\\1\\2", $string);
$string = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1\\2@\\3", $string);
$string = substr($string, 1);
return $string;
}
function count_comments($comment_id, $text=0)
{
global $comment_settings, $comment_lang;
$data = file($comment_settings['comment_file']);
$comment_total_entries = count($data);
// count entries:
$comment_count = 0;
for ($i = 0; $i < $comment_total_entries; $i++)
{
$parts = explode("|", $data[$i]);
if ($parts[3] == $comment_id) $comment_count++;
}
if ($text == 0) return $comment_count;
else
{
if ($comment_count == 0) $count_text = $comment_lang['no_comments'];
elseif ($comment_count == 1) $count_text = $comment_lang['one_comment'];
else $count_text = str_replace("[comments]", $comment_count, $comment_lang['several_comments']);
return $count_text;
}
}
if (isset($_GET['comment_id'])) $comment_id = $_GET['comment_id'];
if (isset($_POST['comment_id'])) $comment_id = $_POST['comment_id'];
if (isset($_GET['comment_popup'])) $comment_popup = $_GET['comment_popup'];
if (isset($_POST['comment_popup'])) $comment_popup = $_POST['comment_popup'];
if (empty($comment_popup) && empty($comment_id) && empty($_GET['comment_popup_link'])) $comment_id = basename($_SERVER["PHP_SELF"]);
if (isset($comment_id))
{
if (isset($_GET['comment_page'])) $comment_page = $_GET['comment_page']; else $comment_page = 1;
// if comment entered::
if (isset($_POST['comment_text']) && trim($_POST['comment_text']) != "")
{
// check posted data:
unset($errors);
if (strlen($_POST['comment_text']) > $comment_settings['text_maxlength']) { $err_txt_too_lng = str_replace("[characters]", strlen($_POST['comment_text']), $comment_lang['err_text_too_long']); $err_txt_too_lng = str_replace("[characters_max]", $comment_settings['text_maxlength'], $err_txt_too_lng); $errors[] = $err_txt_too_lng; }
$text_arr = str_replace("\n", " ", $_POST['comment_text']);
$text_arr = explode(" ",$text_arr); for ($i=0;$i : :
()
()
1) { ?>[ ?comment_id=&comment_page=" title="">« ] [ ?comment_id=&comment_page=" title="">» ] [ ?comment_id=&comment_page=show_all" title="">* ]
Script by >Alex
function comment(id) { var page = "?comment_id=" + id + "&comment_popup=true"; popwin = window.open(page,"","width=460,height=500,scrollbars,resizable") popwin.focus(); } document.open(); document.write("[ ')\" title=\"\"> ]"); document.close();