Index: .hgtags
===================================================================
--- .hgtags	(revision 827)
+++ .hgtags	(revision 800)
@@ -6,3 +6,2 @@
 0000000000000000000000000000000000000000 2.4.2
 6b3942c0cf7eee71ebd906ec0827c5962823dedf 2.4.2
-36578fa779919f730e714e10041b1f896e56a8f4 2.4.3
Index: admin/blog_pref.php
===================================================================
--- admin/blog_pref.php	(revision 557)
+++ admin/blog_pref.php	(revision 848)
@@ -135,7 +135,4 @@
 	if ($nb_post_per_feed <= 1) { $nb_post_per_feed = 1; }
 	
-	$nb_comment_per_feed = abs((integer) $_POST['nb_comment_per_feed']);
-	if ($nb_comment_per_feed <= 1) { $nb_comment_per_feed = 1; }
-	
 	try
 	{
@@ -182,12 +179,4 @@
 		$blog_settings->system->put('date_format',$_POST['date_format']);
 		$blog_settings->system->put('time_format',$_POST['time_format']);
-		$blog_settings->system->put('comments_ttl',abs((integer) $_POST['comments_ttl']));
-		$blog_settings->system->put('trackbacks_ttl',abs((integer) $_POST['trackbacks_ttl']));
-		$blog_settings->system->put('allow_comments',!empty($_POST['allow_comments']));
-		$blog_settings->system->put('allow_trackbacks',!empty($_POST['allow_trackbacks']));
-		$blog_settings->system->put('comments_pub',empty($_POST['comments_pub']));
-		$blog_settings->system->put('trackbacks_pub',empty($_POST['trackbacks_pub']));
-		$blog_settings->system->put('comments_nofollow',!empty($_POST['comments_nofollow']));
-		$blog_settings->system->put('wiki_comments',!empty($_POST['wiki_comments']));
 		$blog_settings->system->put('enable_xmlrpc',!empty($_POST['enable_xmlrpc']));
 		
@@ -199,5 +188,4 @@
 		$blog_settings->system->put('media_img_title_pattern',$_POST['media_img_title_pattern']);
 		$blog_settings->system->put('nb_post_per_feed',$nb_post_per_feed);
-		$blog_settings->system->put('nb_comment_per_feed',$nb_comment_per_feed);
 		$blog_settings->system->put('short_feed_items',!empty($_POST['short_feed_items']));
 		
@@ -331,47 +319,4 @@
 	
 	echo
-	'<fieldset><legend>'.__('Comments and trackbacks').'</legend>'.
-	'<div class="two-cols">'.
-	'<div class="col">'.
-	'<p><label for="allow_comments" class="classic">'.
-	form::checkbox('allow_comments','1',$blog_settings->system->allow_comments).
-	__('Accept comments').'</label></p>'.
-	
-	'<p><label for="comments_pub" class="classic">'.
-	form::checkbox('comments_pub','1',!$blog_settings->system->comments_pub).
-	__('Moderate comments').'</label></p>'.
-	
-	'<p><label for="comments_ttl" class="classic">'.sprintf(__('Leave comments open for %s days'),
-	form::field('comments_ttl',2,3,$blog_settings->system->comments_ttl)).
-	'</label></p>'.
-	'<p class="form-note">'.__('Leave blank to disable this feature.').'</p>'.
-	
-	'<p><label for="wiki_comments" class="classic">'.
-	form::checkbox('wiki_comments','1',$blog_settings->system->wiki_comments).
-	__('Wiki syntax for comments').'</label></p>'.
-	'</div>'.
-	
-	'<div class="col">'.
-	'<p><label for="allow_trackbacks" class="classic">'.
-	form::checkbox('allow_trackbacks','1',$blog_settings->system->allow_trackbacks).
-	__('Accept trackbacks').'</label></p>'.
-	
-	'<p><label for="trackbacks_pub" class="classic">'.
-	form::checkbox('trackbacks_pub','1',!$blog_settings->system->trackbacks_pub).
-	__('Moderate trackbacks').'</label></p>'.
-	
-	'<p><label for="trackbacks_ttl" class="classic">'.sprintf(__('Leave trackbacks open for %s days'),
-	form::field('trackbacks_ttl',2,3,$blog_settings->system->trackbacks_ttl)).'</label></p>'.
-	'<p class="form-note">'.__('Leave blank to disable this feature.').'</p>'.
-	
-	'<p><label for="comments_nofollow" class="classic">'.
-	form::checkbox('comments_nofollow','1',$blog_settings->system->comments_nofollow).
-	__('Add "nofollow" relation on comments and trackbacks links').'</label></p>'.
-	'</div>'.
-	'</div>'.
-	'<br class="clear" />'. //Opera sucks
-	'</fieldset>';
-	
-	echo
 	'<fieldset><legend>'.__('Blog presentation').'</legend>'.
 	'<div class="two-cols">'.
@@ -397,8 +342,4 @@
 	'<p><label for="nb_post_per_feed" class="classic">'.sprintf(__('Display %s entries per feed'),
 	form::field('nb_post_per_feed',2,3,$blog_settings->system->nb_post_per_feed)).
-	'</label></p>'.
-	
-	'<p><label for="nb_comment_per_feed" class="classic">'.sprintf(__('Display %s comments per feed'),
-	form::field('nb_comment_per_feed',2,3,$blog_settings->system->nb_comment_per_feed)).
 	'</label></p>'.
 	
Index: dmin/comment.php
===================================================================
--- admin/comment.php	(revision 500)
+++ 	(revision )
@@ -1,236 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# This file is part of Dotclear 2.
-#
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-
-require dirname(__FILE__).'/../inc/admin/prepend.php';
-
-dcPage::check('usage,contentadmin');
-
-$comment_id = null;
-$comment_dt = '';
-$comment_author = '';
-$comment_email = '';
-$comment_site = '';
-$comment_content = '';
-$comment_ip = '';
-$comment_status = '';
-$comment_trackback = 0;
-$comment_spam_status = '';
-
-# Status combo
-foreach ($core->blog->getAllCommentStatus() as $k => $v) {
-	$status_combo[$v] = (string) $k;
-}
-
-# Adding comment
-if (!empty($_POST['add']) && !empty($_POST['post_id']))
-{
-	try
-	{
-		$rs = $core->blog->getPosts(array('post_id' => $_POST['post_id'], 'post_type' => ''));
-		
-		if ($rs->isEmpty()) {
-			throw new Exception(__('Entry does not exist.'));
-		}
-		
-		$cur = $core->con->openCursor($core->prefix.'comment');
-		
-		$cur->comment_author = $_POST['comment_author'];
-		$cur->comment_email = html::clean($_POST['comment_email']);
-		$cur->comment_site = html::clean($_POST['comment_site']);
-		$cur->comment_content = $core->HTMLfilter($_POST['comment_content']);
-		$cur->post_id = (integer) $_POST['post_id'];
-		
-		# --BEHAVIOR-- adminBeforeCommentCreate
-		$core->callBehavior('adminBeforeCommentCreate',$cur);
-		
-		$comment_id = $core->blog->addComment($cur);
-		
-		# --BEHAVIOR-- adminAfterCommentCreate
-		$core->callBehavior('adminAfterCommentCreate',$cur,$comment_id);
-		
-		http::redirect($core->getPostAdminURL($rs->post_type,$rs->post_id,false).'&co=1&creaco=1');
-	} catch (Exception $e) {
-		$core->error->add($e->getMessage());
-	}
-}
-
-if (!empty($_REQUEST['id']))
-{
-	$params['comment_id'] = $_REQUEST['id'];
-	
-	try {
-		$rs = $core->blog->getComments($params);
-		if (!$rs->isEmpty()) {
-			$comment_id = $rs->comment_id;
-			$post_id = $rs->post_id;
-			$post_type = $rs->post_type;
-			$post_title = $rs->post_title;
-			$comment_dt = $rs->comment_dt;
-			$comment_author = $rs->comment_author;
-			$comment_email = $rs->comment_email;
-			$comment_site = $rs->comment_site;
-			$comment_content = $rs->comment_content;
-			$comment_ip = $rs->comment_ip;
-			$comment_status = $rs->comment_status;
-			$comment_trackback = (boolean) $rs->comment_trackback;
-			$comment_spam_status = $rs->comment_spam_status;
-		}
-	} catch (Exception $e) {
-		$core->error->add($e->getMessage());
-	}
-}
-
-if (!$comment_id && !$core->error->flag()) {
-	$core->error->add(__('No comment'));
-}
-
-if (!$core->error->flag() && isset($rs))
-{
-	$can_edit = $can_delete = $can_publish = $core->auth->check('contentadmin',$core->blog->id);
-	
-	if (!$core->auth->check('contentadmin',$core->blog->id) && $core->auth->userID() == $rs->user_id) {
-		$can_edit = true;
-		if ($core->auth->check('delete',$core->blog->id)) {
-			$can_delete = true;
-		}
-		if ($core->auth->check('publish',$core->blog->id)) {
-			$can_publish = true;
-		}
-	}
-	
-	# update comment
-	if (!empty($_POST['update']) && $can_edit)
-	{
-		$cur = $core->con->openCursor($core->prefix.'comment');
-		
-		$cur->comment_author = $_POST['comment_author'];
-		$cur->comment_email = html::clean($_POST['comment_email']);
-		$cur->comment_site = html::clean($_POST['comment_site']);
-		$cur->comment_content = $core->HTMLfilter($_POST['comment_content']);
-		
-		if (isset($_POST['comment_status'])) {
-			$cur->comment_status = (integer) $_POST['comment_status'];
-		}
-		
-		try
-		{
-			# --BEHAVIOR-- adminBeforeCommentUpdate
-			$core->callBehavior('adminBeforeCommentUpdate',$cur,$comment_id);
-			
-			$core->blog->updComment($comment_id,$cur);
-			
-			# --BEHAVIOR-- adminAfterCommentUpdate
-			$core->callBehavior('adminAfterCommentUpdate',$cur,$comment_id);
-			
-			http::redirect('comment.php?id='.$comment_id.'&upd=1');
-		}
-		catch (Exception $e)
-		{
-			$core->error->add($e->getMessage());
-		}
-	}
-	
-	if (!empty($_POST['delete']) && $can_delete)
-	{
-		try {
-			# --BEHAVIOR-- adminBeforeCommentDelete
-			$core->callBehavior('adminBeforeCommentDelete',$comment_id);
-			
-			$core->blog->delComment($comment_id);
-			http::redirect($core->getPostAdminURL($rs->post_type,$rs->post_id).'&co=1#c'.$comment_id,false);
-		} catch (Exception $e) {
-			$core->error->add($e->getMessage());
-		}
-	}
-	
-	if (!$can_edit) {
-		$core->error->add(__("You can't edit this comment."));
-	}
-}
-
-/* DISPLAY
--------------------------------------------------------- */
-dcPage::open(__('Edit comment'),
-	dcPage::jsConfirmClose('comment-form').
-	dcPage::jsToolBar().
-	dcPage::jsLoad('js/_comment.js').
-	# --BEHAVIOR-- adminCommentHeaders
-	$core->callBehavior('adminCommentHeaders')
-);
-
-if ($comment_id)
-{
-	if (!empty($_GET['upd'])) {
-		echo '<p class="message">'.__('Comment has been successfully updated.').'</p>';
-	}
-	
-	$comment_mailto = '';
-	if ($comment_email)
-	{
-		$comment_mailto = '<a href="mailto:'.html::escapeHTML($comment_email)
-		.'?subject='.rawurlencode(sprintf(__('Your comment on my blog %s'),$core->blog->name))
-		.'&body='
-		.rawurlencode(sprintf(__("Hi!\n\nYou wrote a comment on:\n%s\n\n\n"),$rs->getPostURL()))
-		.'">'.__('Send an e-mail').'</a>';
-	}
-	
-	echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <a href="'.
-		$core->getPostAdminURL($post_type,$post_id).'&amp;co=1#c'.$comment_id.'"> '.
-		$post_title.'</a> &rsaquo; <span class="page-title">'.__('Edit comment').'</span></h2>';
-		
-	echo
-	'<form action="comment.php" method="post" id="comment-form">'.
-	'<p>'.__('IP address:').'<br /> '.
-	'<a href="comments.php?ip='.$comment_ip.'">'.$comment_ip.'</a></p>'.
-	
-	'<p>'.__('Date:').'<br /> '.
-	dt::dt2str(__('%Y-%m-%d %H:%M'),$comment_dt).'</p>'.
-	
-	'<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr>'.__('Author:').
-	form::field('comment_author',30,255,html::escapeHTML($comment_author)).
-	'</label></p>'.
-	
-	'<p><label for="comment_email">'.__('Email:').
-	form::field('comment_email',30,255,html::escapeHTML($comment_email)).
-	$comment_mailto.
-	'</label></p>'.
-	
-	'<p><label for="comment_site">'.__('Web site:').
-	form::field('comment_site',30,255,html::escapeHTML($comment_site)).
-	'</label></p>'.
-	
-	'<p><label for="comment_status">'.__('Status:').
-	form::combo('comment_status',$status_combo,$comment_status,'','',!$can_publish).
-	'</label></p>'.
-	
-	# --BEHAVIOR-- adminAfterCommentDesc
-	$core->callBehavior('adminAfterCommentDesc', $rs).
-	
-	'<p class="area"><label for="comment_content">'.__('Comment:').'</label> '.
-	form::textarea('comment_content',50,10,html::escapeHTML($comment_content)).
-	'</p>'.
-	
-	'<p>'.form::hidden('id',$comment_id).
-	$core->formNonce().
-	'<input type="submit" accesskey="s" name="update" value="'.__('Save').'" /> ';
-	
-	if ($can_delete) {
-		echo '<input type="submit" class="delete" name="delete" value="'.__('Delete').'" />';
-	}
-	echo
-	'</p>'.
-	'</form>';
-}
-
-dcPage::helpBlock('core_comments');
-dcPage::close();
-?>
Index: dmin/comments.php
===================================================================
--- admin/comments.php	(revision 796)
+++ 	(revision )
@@ -1,251 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# This file is part of Dotclear 2.
-#
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-
-require dirname(__FILE__).'/../inc/admin/prepend.php';
-
-dcPage::check('usage,contentadmin');
-
-# Creating filter combo boxes
-# Filter form we'll put in html_block
-$status_combo = array(
-'-' => ''
-);
-foreach ($core->blog->getAllCommentStatus() as $k => $v) {
-	$status_combo[$v] = (string) $k;
-}
-
-$type_combo = array(
-'-' => '',
-__('comment') => 'co',
-__('trackback') => 'tb'
-);
-
-$sortby_combo = array(
-__('Date') => 'comment_dt',
-__('Entry title') => 'post_title',
-__('Author') => 'comment_author',
-__('Status') => 'comment_status'
-);
-
-$order_combo = array(
-__('Descending') => 'desc',
-__('Ascending') => 'asc'
-);
-
-
-/* Get comments
--------------------------------------------------------- */
-$author = isset($_GET['author']) ?	$_GET['author'] : '';
-$status = isset($_GET['status']) ?		$_GET['status'] : '';
-$type = !empty($_GET['type']) ?		$_GET['type'] : '';
-$sortby = !empty($_GET['sortby']) ?	$_GET['sortby'] : 'comment_dt';
-$order = !empty($_GET['order']) ?		$_GET['order'] : 'desc';
-$ip = !empty($_GET['ip']) ?			$_GET['ip'] : '';
-
-$with_spam = $author || $status || $type || $sortby != 'comment_dt' || $order != 'desc' || $ip;
-
-$show_filters = false;
-
-$page = !empty($_GET['page']) ? (integer) $_GET['page'] : 1;
-$nb_per_page =  30;
-
-if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) {
-	if ($nb_per_page != $_GET['nb']) {
-		$show_filters = true;
-	}
-	$nb_per_page = (integer) $_GET['nb'];
-}
-
-$params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
-$params['no_content'] = true;
-
-# Author filter
-if ($author !== '') {
-	$params['q_author'] = $author;
-	$show_filters = true;
-} else {
-	$author='';
-}
-
-# - Type filter
-if ($type == 'tb' || $type == 'co') {
-	$params['comment_trackback'] = ($type == 'tb');
-	$show_filters = true;
-} else {
-	$type='';
-}
-
-# - Status filter
-if ($status !== '' && in_array($status,$status_combo)) {
-	$params['comment_status'] = $status;
-	$show_filters = true;
-} elseif (!$with_spam) {
-	$params['comment_status_not'] = -2;
-	$status='';
-} else {
-	$status='';
-}
-
-# - IP filter
-if ($ip) {
-	$params['comment_ip'] = $ip;
-	$show_filters = true;
-}
-
-# Sortby and order filter
-if ($sortby !== '' && in_array($sortby,$sortby_combo)) {
-	if ($order !== '' && in_array($order,$order_combo)) {
-		$params['order'] = $sortby.' '.$order;
-	} else {
-		$order = 'desc';
-	}
-	
-	if ($sortby != 'comment_dt' || $order != 'desc') {
-		$show_filters = true;
-	}
-} else {
-	$sortby = 'comment_dt';
-	$order = 'desc';
-}
-
-# Actions combo box
-$combo_action = array();
-$default = '';
-if ($core->auth->check('publish,contentadmin',$core->blog->id))
-{
-	$combo_action[__('publish')] = 'publish';
-	$combo_action[__('unpublish')] = 'unpublish';
-	$combo_action[__('mark as pending')] = 'pending';
-	$combo_action[__('mark as junk')] = 'junk';
-}
-if ($core->auth->check('delete,contentadmin',$core->blog->id))
-{
-	$combo_action[__('Delete')] = 'delete';
-	if ($status == -2) {
-		$default = 'delete';
-	}
-}
-
-# --BEHAVIOR-- adminCommentsActionsCombo
-$core->callBehavior('adminCommentsActionsCombo',array(&$combo_action));
-
-/* Get comments
--------------------------------------------------------- */
-try {
-	$comments = $core->blog->getComments($params);
-	$counter = $core->blog->getComments($params,true);
-	$comment_list = new adminCommentList($core,$comments,$counter->f(0));
-} catch (Exception $e) {
-	$core->error->add($e->getMessage());
-}
-
-/* DISPLAY
--------------------------------------------------------- */
-$starting_script = dcPage::jsLoad('js/_comments.js');
-if (!$show_filters) {
-	$starting_script .= dcPage::jsLoad('js/filter-controls.js');
-}
-# --BEHAVIOR-- adminCommentsHeaders
-$starting_script .= $core->callBehavior('adminCommentsHeaders');
-
-dcPage::open(__('Comments and trackbacks'),$starting_script);
-
-echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; <span class="page-title">'.__('Comments and trackbacks').'</span></h2>';
-
-if (!$core->error->flag())
-{
-	# Filters
-	if (!$show_filters) {
-		echo '<p><a id="filter-control" class="form-control" href="#">'.
-		__('Filters').'</a></p>';
-	}
-	
-	echo
-	'<form action="comments.php" method="get" id="filters-form">'.
-	'<fieldset><legend>'.__('Filters').'</legend>'.
-	'<div class="three-cols">'.
-	'<div class="col">'.
-	'<label for="type">'.__('Type:').' '.
-	form::combo('type',$type_combo,$type).
-	'</label> '.
-	'<label for="status">'.__('Status:').' '.
-	form::combo('status',$status_combo,$status).
-	'</label>'.
-	'</div>'.
-	
-	'<div class="col">'.
-	'<p><label for="sortby">'.__('Order by:').' '.
-	form::combo('sortby',$sortby_combo,$sortby).
-	'</label> '.
-	'<label for="order">'.__('Sort:').' '.
-	form::combo('order',$order_combo,$order).
-	'</label></p>'.
-	'<p><label for="nb" class="classic">'.	form::field('nb',3,3,$nb_per_page).' '.
-	__('Comments per page').'</label></p>'.
-	'</div>'.
-	
-	'<div class="col">'.
-	'<p><label for="author">'.__('Comment author:').' '.
-	form::field('author',20,255,html::escapeHTML($author)).
-	'</label>'.
-	'<label for="ip">'.__('IP address:').' '.
-	form::field('ip',20,39,html::escapeHTML($ip)).
-	'</label></p>'.
-	'<p><input type="submit" value="'.__('Apply filters').'" /></p>'.
-	'</div>'.
-	
-	'</div>'.
-	'<br class="clear" />'. //Opera sucks
-	'</fieldset>'.
-	'</form>';
-	
-	if (!$with_spam) {
-		$spam_count = $core->blog->getComments(array('comment_status'=>-2),true)->f(0);
-		if ($spam_count == 1) {
-			echo '<p>'.sprintf(__('You have one spam comments.'),'<strong>'.$spam_count.'</strong>').' '.
-			'<a href="comments.php?status=-2">'.__('Show it.').'</a></p>';
-		} elseif ($spam_count > 1) {
-			echo '<p>'.sprintf(__('You have %s spam comments.'),'<strong>'.$spam_count.'</strong>').' '.
-			'<a href="comments.php?status=-2">'.__('Show them.').'</a></p>';
-		}
-	}
-	
-	# Show comments
-	$comment_list->display($page,$nb_per_page,
-	'<form action="comments_actions.php" method="post" id="form-comments">'.
-	
-	'%s'.
-	
-	'<div class="two-cols">'.
-	'<p class="col checkboxes-helpers"></p>'.
-	
-	'<p class="col right"><label for="action" class="classic">'.__('Selected comments action:').'</label> '.
-	form::combo('action',$combo_action,$default,'','','','title="'.__('action: ').'"').
-	$core->formNonce().
-	'<input type="submit" value="'.__('ok').'" /></p>'.
-	form::hidden(array('type'),$type).
-	form::hidden(array('sortby'),$sortby).
-	form::hidden(array('order'),$order).
-	form::hidden(array('author'),preg_replace('/%/','%%',$author)).
-	form::hidden(array('status'),$status).
-	form::hidden(array('ip'),preg_replace('/%/','%%',$ip)).
-	form::hidden(array('page'),$page).
-	form::hidden(array('nb'),$nb_per_page).
-	'</div>'.
-	
-	'</form>'
-	);
-}
-
-dcPage::helpBlock('core_comments');
-dcPage::close();
-?>
Index: dmin/comments_actions.php
===================================================================
--- admin/comments_actions.php	(revision 270)
+++ 	(revision )
@@ -1,136 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# This file is part of Dotclear 2.
-#
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-
-require dirname(__FILE__).'/../inc/admin/prepend.php';
-
-dcPage::check('usage,contentadmin');
-
-$params = array();
-$redir = 'comments.php';
-
-if (!empty($_POST['action']) && !empty($_POST['comments']))
-{
-	$comments = $_POST['comments'];
-	$action = $_POST['action'];
-	
-	if (isset($_POST['redir']) && strpos($_POST['redir'],'://') === false)
-	{
-		$redir = $_POST['redir'];
-	}
-	else
-	{
-		$redir =
-		'comments.php?type='.$_POST['type'].
-		'&author='.$_POST['author'].
-		'&status='.$_POST['status'].
-		'&sortby='.$_POST['sortby'].
-		'&ip='.$_POST['ip'].
-		'&order='.$_POST['order'].
-		'&page='.$_POST['page'].
-		'&nb='.(integer) $_POST['nb'];
-	}
-	
-	foreach ($comments as $k => $v) {
-		$comments[$k] = (integer) $v;
-	}
-	
-	$params['sql'] = 'AND C.comment_id IN('.implode(',',$comments).') ';
-	
-	if (!isset($_POST['full_content']) || empty($_POST['full_content'])) {
-		$params['no_content'] = true;
-	}
-	
-	$co = $core->blog->getComments($params);
-	
-	# --BEHAVIOR-- adminCommentsActions
-	$core->callBehavior('adminCommentsActions',$core,$co,$action,$redir);
-	
-	if (preg_match('/^(publish|unpublish|pending|junk)$/',$action))
-	{
-		switch ($action) {
-			case 'unpublish' : $status = 0; break;
-			case 'pending' : $status = -1; break;
-			case 'junk' : $status = -2; break;
-			default : $status = 1; break;
-		}
-		
-		while ($co->fetch())
-		{
-			try {
-				$core->blog->updCommentStatus($co->comment_id,$status);
-			} catch (Exception $e) {
-				$core->error->add($e->getMessage());
-			}
-		}
-		
-		if (!$core->error->flag()) {
-			http::redirect($redir);
-		}
-	}
-	elseif ($action == 'delete')
-	{
-		while ($co->fetch())
-		{
-			try {
-				# --BEHAVIOR-- adminBeforeCommentDelete
-				$core->callBehavior('adminBeforeCommentDelete',$co->comment_id);				
-				
-				$core->blog->delComment($co->comment_id);
-			} catch (Exception $e) {
-				$core->error->add($e->getMessage());
-			}
-		}
-		
-		if (!$core->error->flag()) {
-			http::redirect($redir);
-		}
-	}
-}
-
-/* DISPLAY
--------------------------------------------------------- */
-dcPage::open(__('Comments'));
-
-if (!isset($action)) {
-	dcPage::close();
-	exit;
-}
-
-$hidden_fields = '';
-while ($co->fetch()) {
-	$hidden_fields .= form::hidden(array('comments[]'),$co->comment_id);
-} 
-
-if (isset($_POST['redir']) && strpos($_POST['redir'],'://') === false)
-{
-	$hidden_fields .= form::hidden(array('redir'),html::escapeURL($_POST['redir']));
-}
-else
-{
-	$hidden_fields .=
-	form::hidden(array('type'),$_POST['type']).
-	form::hidden(array('author'),$_POST['author']).
-	form::hidden(array('status'),$_POST['status']).
-	form::hidden(array('sortby'),$_POST['sortby']).
-	form::hidden(array('ip'),$_POST['ip']).
-	form::hidden(array('order'),$_POST['order']).
-	form::hidden(array('page'),$_POST['page']).
-	form::hidden(array('nb'),$_POST['nb']);
-}
-
-# --BEHAVIOR-- adminCommentsActionsContent
-$core->callBehavior('adminCommentsActionsContent',$core,$action,$hidden_fields);
-
-echo '<p><a class="back" href="'.str_replace('&','&amp;',$redir).'">'.__('back').'</a></p>';
-
-dcPage::close();
-?>
Index: admin/index.php
===================================================================
--- admin/index.php	(revision 691)
+++ admin/index.php	(revision 848)
@@ -71,7 +71,4 @@
 $str_entries = ($post_count > 1) ? __('%d entries') : __('%d entry');
 
-$comment_count = $core->blog->getComments(array(),true)->f(0);
-$str_comments = ($comment_count > 1) ? __('%d comments') : __('%d comment');
-
 $ws = $core->auth->user_prefs->addWorkspace('favorites');
 $count = 0;
@@ -83,5 +80,5 @@
 			$count++;
 			$title = ($fav['name'] == 'posts' ? sprintf($str_entries,$post_count) : 
-				($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title']));
+				$fav['title']);
 			$__dashboard_icons[$fav['name']] = new ArrayObject(array(__($title),$fav['url'],$fav['large-icon']));
 
@@ -98,5 +95,5 @@
 			$count++;
 			$title = ($fav['name'] == 'posts' ? sprintf($str_entries,$post_count) : 
-				($fav['name'] == 'comments' ? sprintf($str_comments,$comment_count) : $fav['title']));
+				$fav['title']);
 			$__dashboard_icons[$fav['name']] = new ArrayObject(array(__($title),$fav['url'],$fav['large-icon']));
 
Index: admin/install/index.php
===================================================================
--- admin/install/index.php	(revision 557)
+++ admin/install/index.php	(revision 848)
@@ -166,18 +166,5 @@
 		$cur->post_content_xhtml = $cur->post_content;
 		$cur->post_status = 1;
-		$cur->post_open_comment = 1;
-		$cur->post_open_tb = 0;
 		$post_id = $core->blog->addPost($cur);
-		
-		# Add a comment to it
-		$cur = $core->con->openCursor($core->prefix.'comment');
-		$cur->post_id = $post_id;
-		$cur->comment_tz = $default_tz;
-		$cur->comment_author = __('Dotclear Team');
-		$cur->comment_email = 'contact@dotclear.net';
-		$cur->comment_site = 'http://www.dotclear.org/';
-		$cur->comment_content = __("<p>This is a comment.</p>\n<p>To delete it, log in and ".
-			"view your blog's comments. Then you might remove or edit it.</p>");
-		$core->blog->addComment($cur);
 		
 		#  Plugins initialization
@@ -210,7 +197,4 @@
 		$init_fav['posts'] = array('posts','Entries','posts.php',
 			'images/menu/entries.png','images/menu/entries-b.png',
-			'usage,contentadmin',null,null);
-		$init_fav['comments'] = array('comments','Comments','comments.php',
-			'images/menu/comments.png','images/menu/comments-b.png',
 			'usage,contentadmin',null,null);
 		$init_fav['prefs'] = array('prefs','My preferences','preferences.php',
Index: admin/post.php
===================================================================
--- admin/post.php	(revision 776)
+++ admin/post.php	(revision 848)
@@ -30,6 +30,4 @@
 $post_status = $core->auth->getInfo('user_post_status');
 $post_selected = false;
-$post_open_comment = $core->blog->settings->system->allow_comments;
-$post_open_tb = $core->blog->settings->system->allow_trackbacks;
 
 $page_title = __('New entry');
@@ -117,6 +115,4 @@
 		$post_status = $post->post_status;
 		$post_selected = (boolean) $post->post_selected;
-		$post_open_comment = (boolean) $post->post_open_comment;
-		$post_open_tb = (boolean) $post->post_open_tb;
 		
 		$page_title = __('Edit entry');
@@ -170,6 +166,4 @@
 	}
 	
-	$post_open_comment = !empty($_POST['post_open_comment']);
-	$post_open_tb = !empty($_POST['post_open_tb']);
 	$post_selected = !empty($_POST['post_selected']);
 	$post_lang = $_POST['post_lang'];
@@ -207,6 +201,4 @@
 	$cur->post_status = $post_status;
 	$cur->post_selected = (integer) $post_selected;
-	$cur->post_open_comment = (integer) $post_open_comment;
-	$cur->post_open_tb = (integer) $post_open_tb;
 	
 	if (isset($_POST['post_url'])) {
@@ -275,7 +267,4 @@
 	$default_tab = '';
 }
-if (!empty($_GET['co'])) {
-	$default_tab = 'comments';
-}
 
 dcPage::open($page_title.' - '.__('Entries'),
@@ -285,5 +274,5 @@
 	dcPage::jsMetaEditor().
 	dcPage::jsLoad('js/_post.js').
-	dcPage::jsConfirmClose('entry-form','comment-form').
+	dcPage::jsConfirmClose('entry-form').
 	# --BEHAVIOR-- adminPostHeaders
 	$core->callBehavior('adminPostHeaders').
@@ -305,7 +294,4 @@
 }
 
-if (!empty($_GET['creaco'])) {
-		echo '<p class="message">'.__('Comment has been successfully created.').'</p>';
-	}
 
 # XHTML conversion
@@ -421,8 +407,4 @@
 	'<p>'.($post_id && $post_format != 'xhtml' ? '<a id="convert-xhtml" class="button" href="post.php?id='.$post_id.'&amp;xconv=1">'.__('Convert to XHTML').'</a>' : '').'</p>'.
 	
-	'<p><label for="post_open_comment" class="classic">'.form::checkbox('post_open_comment',1,$post_open_comment).' '.
-	__('Accept comments').'</label></p>'.
-	'<p><label for="post_open_tb" class="classic">'.form::checkbox('post_open_tb',1,$post_open_tb).' '.
-	__('Accept trackbacks').'</label></p>'.
 	'<p><label for="post_selected" class="classic">'.form::checkbox('post_selected',1,$post_selected).' '.
 	__('Selected entry').'</label></p>'.
@@ -457,165 +439,4 @@
 	echo '</div>';
 	
-	if ($post_id && $post->post_status == 1) {
-		echo '<p><a href="trackbacks.php?id='.$post_id.'" class="multi-part">'.
-		__('Ping blogs').'</a></p>';
-	}
-	
-}
-
-
-/* Comments and trackbacks
--------------------------------------------------------- */
-if ($post_id)
-{
-	$params = array('post_id' => $post_id, 'order' => 'comment_dt ASC');
-	
-	$comments = $core->blog->getComments(array_merge($params,array('comment_trackback'=>0)));
-	$trackbacks = $core->blog->getComments(array_merge($params,array('comment_trackback'=>1)));
-	
-	# Actions combo box
-	$combo_action = array();
-	if ($can_edit_post && $core->auth->check('publish,contentadmin',$core->blog->id))
-	{
-		$combo_action[__('publish')] = 'publish';
-		$combo_action[__('unpublish')] = 'unpublish';
-		$combo_action[__('mark as pending')] = 'pending';
-		$combo_action[__('mark as junk')] = 'junk';
-	}
-	
-	if ($can_edit_post && $core->auth->check('delete,contentadmin',$core->blog->id))
-	{
-		$combo_action[__('Delete')] = 'delete';
-	}
-	
-	# --BEHAVIOR-- adminCommentsActionsCombo
-	$core->callBehavior('adminCommentsActionsCombo',array(&$combo_action));
-	
-	$has_action = !empty($combo_action) && (!$trackbacks->isEmpty() || !$comments->isEmpty());
-	
-	echo
-	'<div id="comments" class="multi-part" title="'.__('Comments').'">';
-	
-	if ($has_action) {
-		echo '<form action="comments_actions.php" id="form-comments" method="post">';
-	}
-	
-	echo '<h3>'.__('Trackbacks').'</h3>';
-	
-	if (!$trackbacks->isEmpty()) {
-		showComments($trackbacks,$has_action,true);
-	} else {
-		echo '<p>'.__('No trackback').'</p>';
-	}
-	
-	echo '<h3>'.__('Comments').'</h3>';
-	if (!$comments->isEmpty()) {
-		showComments($comments,$has_action);
-	} else {
-		echo '<p>'.__('No comment').'</p>';
-	}
-	
-	if ($has_action) {
-		echo
-		'<div class="two-cols">'.
-		'<p class="col checkboxes-helpers"></p>'.
-		
-		'<p class="col right"><label for="action" class="classic">'.__('Selected comments action:').'</label> '.
-		form::combo('action',$combo_action).
-		form::hidden('redir','post.php?id='.$post_id.'&amp;co=1').
-		$core->formNonce().
-		'<input type="submit" value="'.__('ok').'" /></p>'.
-		'</div>'.
-		'</form>';
-	}
-	
-	echo '</div>';
-}
-
-/* Add a comment
--------------------------------------------------------- */
-if ($post_id)
-{
-	echo
-	'<div class="multi-part" id="add-comment" title="'.__('Add a comment').'">'.
-	'<h3>'.__('Add a comment').'</h3>'.
-	
-	'<form action="comment.php" method="post" id="comment-form">'.
-	'<div class="constrained">'.
-	'<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Name:').
-	form::field('comment_author',30,255,html::escapeHTML($core->auth->getInfo('user_cn'))).
-	'</label></p>'.
-	
-	'<p><label for="comment_email">'.__('Email:').
-	form::field('comment_email',30,255,html::escapeHTML($core->auth->getInfo('user_email'))).
-	'</label></p>'.
-	
-	'<p><label for="comment_site">'.__('Web site:').
-	form::field('comment_site',30,255,html::escapeHTML($core->auth->getInfo('user_url'))).
-	'</label></p>'.
-	
-	'<p class="area"><label for="comment_content" class="required"><abbr title="'.__('Required field').'">*</abbr> '.
-	__('Comment:').'</label> '.
-	form::textarea('comment_content',50,8,html::escapeHTML('')).
-	'</p>'.
-	
-	'<p>'.form::hidden('post_id',$post_id).
-	$core->formNonce().
-	'<input type="submit" name="add" value="'.__('Save').'" /></p>'.
-	'</div>'.
-	'</form>'.
-	'</div>';
-}
-
-
-# Show comments or trackbacks
-function showComments($rs,$has_action,$tb=false)
-{
-	echo
-	'<table class="comments-list"><tr>'.
-	'<th colspan="2">'.__('Author').'</th>'.
-	'<th>'.__('Date').'</th>'.
-	'<th class="nowrap">'.__('IP address').'</th>'.
-	'<th>'.__('Status').'</th>'.
-	'<th>&nbsp;</th>'.
-	'</tr>';
-	
-	while($rs->fetch())
-	{
-		$comment_url = 'comment.php?id='.$rs->comment_id;
-		
-		$img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
-		switch ($rs->comment_status) {
-			case 1:
-				$img_status = sprintf($img,__('published'),'check-on.png');
-				break;
-			case 0:
-				$img_status = sprintf($img,__('unpublished'),'check-off.png');
-				break;
-			case -1:
-				$img_status = sprintf($img,__('pending'),'check-wrn.png');
-				break;
-			case -2:
-				$img_status = sprintf($img,__('junk'),'junk.png');
-				break;
-		}
-		
-		echo
-		'<tr class="line'.($rs->comment_status != 1 ? ' offline' : '').'"'.
-		' id="c'.$rs->comment_id.'">'.
-		
-		'<td class="nowrap">'.
-		($has_action ? form::checkbox(array('comments[]'),$rs->comment_id,'','','',0,'title="'.($tb ? __('select this trackback') : __('select this comment')).'"') : '').'</td>'.
-		'<td class="maximal">'.html::escapeHTML($rs->comment_author).'</td>'.
-		'<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$rs->comment_dt).'</td>'.
-		'<td class="nowrap"><a href="comments.php?ip='.$rs->comment_ip.'">'.$rs->comment_ip.'</a></td>'.
-		'<td class="nowrap status">'.$img_status.'</td>'.
-		'<td class="nowrap status"><a href="'.$comment_url.'">'.
-		'<img src="images/edit-mini.png" alt="" title="'.__('Edit this comment').'" /></a></td>'.
-		
-		'</tr>';
-	}
-	
-	echo '</table>';
 }
 
Index: admin/search.php
===================================================================
--- admin/search.php	(revision 747)
+++ admin/search.php	(revision 848)
@@ -49,22 +49,4 @@
 		}
 	}
-	# Get comments
-	elseif ($qtype == 'c')
-	{
-		$starting_scripts .= dcPage::jsLoad('js/_comments.js');
-		
-		$params['search'] = $q;
-		$params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
-		$params['no_content'] = true;
-		$params['order'] = 'comment_dt DESC';
-		
-		try {
-			$comments = $core->blog->getComments($params);
-			$counter = $core->blog->getComments($params,true);
-			$comment_list = new adminCommentList($core,$comments,$counter->f(0));
-		} catch (Exception $e) {
-			$core->error->add($e->getMessage());
-		}
-	}
 }
 
@@ -78,5 +60,5 @@
 '<p><label for="q">'.__('Query:').' </label>'.form::field('q',30,255,html::escapeHTML($q)).'</p>'.
 '<p><label for="qtype1" class="classic">'.form::radio(array('qtype','qtype1'),'p',$qtype == 'p').' '.__('Search entries').'</label> '.
-'<label for="qtype2" class="classic">'.form::radio(array('qtype','qtype2'),'c',$qtype == 'c').' '.__('Search comments').'</label></p>'.
+'</p>'.
 '</p><input type="submit" value="'.__('Search').'" /></p>'.
 '</div>'.
@@ -134,44 +116,4 @@
 		);
 	}
-	# Show posts
-	elseif ($qtype == 'c')
-	{
-		# Actions combo box
-		$combo_action = array();
-		if ($core->auth->check('publish,contentadmin',$core->blog->id))
-		{
-			$combo_action[__('publish')] = 'publish';
-			$combo_action[__('unpublish')] = 'unpublish';
-			$combo_action[__('mark as pending')] = 'pending';
-			$combo_action[__('mark as junk')] = 'junk';
-		}
-		if ($core->auth->check('delete,contentadmin',$core->blog->id))
-		{
-			$combo_action[__('Delete')] = 'delete';
-		}
-		
-		if ($counter->f(0) > 0) {
-			printf('<h3>'.
-			($counter->f(0) == 1 ? __('%d comment found') : __('%d comments found')).
-			'</h3>',$counter->f(0));
-		}
-		
-		$comment_list->display($page,$nb_per_page,
-		'<form action="comments_actions.php" method="post" id="form-comments">'.
-		
-		'%s'.
-		
-		'<div class="two-cols">'.
-		'<p class="col checkboxes-helpers"></p>'.
-		
-		'<p class="col right"><label for="action2" class="classic">'.__('Selected comments action:').'</label> '.
-		form::combo(array('action','action2'),$combo_action).
-		'<input type="submit" value="'.__('ok').'" /></p>'.
-		form::hidden('redir',preg_replace('/%/','%%',$redir)).
-		$core->formNonce().
-		'</div>'.
-		'</form>'
-		);
-	}
 }
 
Index: admin/services.php
===================================================================
--- admin/services.php	(revision 323)
+++ admin/services.php	(revision 848)
@@ -18,5 +18,4 @@
 
 $core->rest->addFunction('getPostById',array('dcRestMethods','getPostById'));
-$core->rest->addFunction('getCommentById',array('dcRestMethods','getCommentById'));
 $core->rest->addFunction('quickPost',array('dcRestMethods','quickPost'));
 $core->rest->addFunction('validatePostMarkup',array('dcRestMethods','validatePostMarkup'));
@@ -70,8 +69,4 @@
 		$rsp->post_status($rs->post_status);
 		$rsp->post_selected($rs->post_selected);
-		$rsp->post_open_comment($rs->post_open_comment);
-		$rsp->post_open_tb($rs->post_open_tb);
-		$rsp->nb_comment($rs->nb_comment);
-		$rsp->nb_trackback($rs->nb_trackback);
 		$rsp->user_name($rs->user_name);
 		$rsp->user_firstname($rs->user_firstname);
@@ -100,42 +95,4 @@
 	}
 	
-	public static function getCommentById($core,$get)
-	{
-		if (empty($get['id'])) {
-			throw new Exception('No comment ID');
-		}
-		
-		$rs = $core->blog->getComments(array('comment_id' => (integer) $get['id']));
-		
-		if ($rs->isEmpty()) {
-			throw new Exception('No comment for this ID');
-		}
-		
-		$rsp = new xmlTag('post');
-		$rsp->id = $rs->comment_id;
-		
-		$rsp->comment_dt($rs->comment_dt);
-		$rsp->comment_upddt($rs->comment_upddt);
-		$rsp->comment_author($rs->comment_author);
-		$rsp->comment_site($rs->comment_site);
-		$rsp->comment_content($rs->comment_content);
-		$rsp->comment_trackback($rs->comment_trackback);
-		$rsp->comment_status($rs->comment_status);
-		$rsp->post_title($rs->post_title);
-		$rsp->post_url($rs->post_url);
-		$rsp->post_id($rs->post_id);
-		$rsp->post_dt($rs->post_dt);
-		$rsp->user_id($rs->user_id);
-		
-		$rsp->comment_display_content($rs->getContent(true));
-		
-		if ($core->auth->userID()) {
-			$rsp->comment_ip($rs->comment_ip);
-			$rsp->comment_email($rs->comment_email);
-			$rsp->comment_spam_disp(dcAntispam::statusMessage($rs));
-		}
-		
-		return $rsp;
-	}
 	
 	public static function quickPost($core,$get,$post)
@@ -150,6 +107,4 @@
 		$cur->post_lang = !empty($post['post_lang']) ? $post['post_lang'] : '';
 		$cur->post_status = !empty($post['post_status']) ? (integer) $post['post_status'] : 0;
-		$cur->post_open_comment = (integer) $core->blog->settings->system->allow_comments;
-		$cur->post_open_tb = (integer) $core->blog->settings->system->allow_trackbacks;
 		
 		# --BEHAVIOR-- adminBeforePostCreate
Index: inc/admin/lib.dc.page.php
===================================================================
--- inc/admin/lib.dc.page.php	(revision 812)
+++ inc/admin/lib.dc.page.php	(revision 848)
@@ -410,8 +410,4 @@
 		self::jsVar('dotclear.msg.confirm_delete_post',
 			__("Are you sure you want to delete this entry?")).
-		self::jsVar('dotclear.msg.confirm_delete_comments',
-			__('Are you sure you want to delete selected comments (%s)?')).
-		self::jsVar('dotclear.msg.confirm_delete_comment',
-			__('Are you sure you want to delete this comment?')).
 		self::jsVar('dotclear.msg.cannot_delete_users',
 			__('Users with posts cannot be deleted.')).
Index: inc/admin/lib.pager.php
===================================================================
--- inc/admin/lib.pager.php	(revision 270)
+++ inc/admin/lib.pager.php	(revision 848)
@@ -49,6 +49,4 @@
 			'<th>'.__('Category').'</th>'.
 			'<th>'.__('Author').'</th>'.
-			'<th>'.__('Comments').'</th>'.
-			'<th>'.__('Trackbacks').'</th>'.
 			'<th>'.__('Status').'</th>'.
 			'</tr>%s</table>';
@@ -134,6 +132,4 @@
 		'<td class="nowrap">'.$cat_title.'</td>'.
 		'<td class="nowrap">'.$this->rs->user_id.'</td>'.
-		'<td class="nowrap">'.$this->rs->nb_comment.'</td>'.
-		'<td class="nowrap">'.$this->rs->nb_trackback.'</td>'.
 		'<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'.
 		'</tr>';
@@ -233,112 +229,4 @@
 		'<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'.
 		'</tr>';
-		
-		return $res;
-	}
-}
-
-class adminCommentList extends adminGenericList
-{
-	public function display($page,$nb_per_page,$enclose_block='')
-	{
-		if ($this->rs->isEmpty())
-		{
-			echo '<p><strong>'.__('No comment').'</strong></p>';
-		}
-		else
-		{
-			$pager = new pager($page,$this->rs_count,$nb_per_page,10);
-			$pager->html_prev = $this->html_prev;
-			$pager->html_next = $this->html_next;
-			$pager->var_page = 'page';
-			
-			$html_block =
-			'<table><tr>'.
-			'<th colspan="2">'.__('Title').'</th>'.
-			'<th>'.__('Date').'</th>'.
-			'<th>'.__('Author').'</th>'.
-			'<th>'.__('Type').'</th>'.
-			'<th>'.__('Status').'</th>'.
-			'<th>&nbsp;</th>'.
-			'</tr>%s</table>';
-			
-			if ($enclose_block) {
-				$html_block = sprintf($enclose_block,$html_block);
-			}
-			
-			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
-			
-			$blocks = explode('%s',$html_block);
-			
-			echo $blocks[0];
-			
-			while ($this->rs->fetch())
-			{
-				echo $this->commentLine();
-			}
-			
-			echo $blocks[1];
-			
-			echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
-		}
-	}
-	
-	private function commentLine()
-	{
-		global $author, $status, $sortby, $order, $nb_per_page;
-		
-		$author_url =
-		'comments.php?n='.$nb_per_page.
-		'&amp;status='.$status.
-		'&amp;sortby='.$sortby.
-		'&amp;order='.$order.
-		'&amp;author='.rawurlencode($this->rs->comment_author);
-		
-		$post_url = $this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id);
-		
-		$comment_url = 'comment.php?id='.$this->rs->comment_id;
-		
-		$comment_dt =
-		dt::dt2str($this->core->blog->settings->system->date_format.' - '.
-		$this->core->blog->settings->system->time_format,$this->rs->comment_dt);
-		
-		$img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />';
-		switch ($this->rs->comment_status) {
-			case 1:
-				$img_status = sprintf($img,__('published'),'check-on.png');
-				break;
-			case 0:
-				$img_status = sprintf($img,__('unpublished'),'check-off.png');
-				break;
-			case -1:
-				$img_status = sprintf($img,__('pending'),'check-wrn.png');
-				break;
-			case -2:
-				$img_status = sprintf($img,__('junk'),'junk.png');
-				break;
-		}
-		
-		$comment_author = html::escapeHTML($this->rs->comment_author);
-		if (mb_strlen($comment_author) > 20) {
-			$comment_author = mb_strcut($comment_author,0,17).'...';
-		}
-		
-		$res = '<tr class="line'.($this->rs->comment_status != 1 ? ' offline' : '').'"'.
-		' id="c'.$this->rs->comment_id.'">';
-		
-		$res .=
-		'<td class="nowrap">'.
-		form::checkbox(array('comments[]'),$this->rs->comment_id,'','','',0).'</td>'.
-		'<td class="maximal"><a href="'.$post_url.'">'.
-		html::escapeHTML($this->rs->post_title).'</a>'.
-		($this->rs->post_type != 'post' ? ' ('.html::escapeHTML($this->rs->post_type).')' : '').'</td>'.
-		'<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->comment_dt).'</td>'.
-		'<td class="nowrap"><a href="'.$author_url.'">'.$comment_author.'</a></td>'.
-		'<td class="nowrap">'.($this->rs->comment_trackback ? __('trackback') : __('comment')).'</td>'.
-		'<td class="nowrap status">'.$img_status.'</td>'.
-		'<td class="nowrap status"><a href="'.$comment_url.'">'.
-		'<img src="images/edit-mini.png" alt="" title="'.__('Edit this comment').'" /></a></td>';
-		
-		$res .= '</tr>';
 		
 		return $res;
Index: inc/admin/prepend.php
===================================================================
--- inc/admin/prepend.php	(revision 821)
+++ inc/admin/prepend.php	(revision 848)
@@ -234,7 +234,4 @@
 	$_fav['posts'] = new ArrayObject(array('posts','Entries','posts.php',
 		'images/menu/entries.png','images/menu/entries-b.png',
-		'usage,contentadmin',null,null));
-	$_fav['comments'] = new ArrayObject(array('comments','Comments','comments.php',
-		'images/menu/comments.png','images/menu/comments-b.png',
 		'usage,contentadmin',null,null));
 	$_fav['search'] = new ArrayObject(array('search','Search','search.php',
@@ -311,7 +308,4 @@
 		preg_match('/search.php(\?.*)?$/',$_SERVER['REQUEST_URI']),
 		$core->auth->check('usage,contentadmin',$core->blog->id));
-	$_menu['Blog']->prependItem(__('Comments'),'comments.php','images/menu/comments.png',
-		preg_match('/comments.php(\?.*)?$/',$_SERVER['REQUEST_URI']),
-		$core->auth->check('usage,contentadmin',$core->blog->id));
 	$_menu['Blog']->prependItem(__('Entries'),'posts.php','images/menu/entries.png',
 		preg_match('/posts.php(\?.*)?$/',$_SERVER['REQUEST_URI']),
Index: inc/core/class.dc.blog.php
===================================================================
--- inc/core/class.dc.blog.php	(revision 836)
+++ inc/core/class.dc.blog.php	(revision 848)
@@ -55,5 +55,4 @@
 	
 	private $post_status = array();
-	private $comment_status = array();
 	
 	private $categories;
@@ -95,10 +94,5 @@
 			$this->post_status['0'] = __('unpublished');
 			$this->post_status['1'] = __('published');
-			
-			$this->comment_status['-2'] = __('junk');
-			$this->comment_status['-1'] = __('pending');
-			$this->comment_status['0'] = __('unpublished');
-			$this->comment_status['1'] = __('published');
-			
+						
 			# --BEHAVIOR-- coreBlogConstruct
 			$this->core->callBehavior('coreBlogConstruct',$this);
@@ -145,13 +139,4 @@
 	}
 	
-	/**
-	Returns an array of available comment status codes and names.
-	
-	@return	<b>array</b> Simple array with codes in keys and names in value
-	*/
-	public function getAllCommentStatus()
-	{
-		return $this->comment_status;
-	}
 	
 	/**
@@ -184,53 +169,5 @@
 		$this->core->callBehavior('coreBlogAfterTriggerBlog',$cur);
 	}
-	
-	/**
-	Updates comment and trackback counters in post table. Should be called
-	every time a comment or trackback is added, removed or changed its status.
-	
-	@param	id		<b>integer</b>		Comment ID
-	@param	del		<b>boolean</b>		If comment is delete, set this to true
-	*/
-	public function triggerComment($id,$del=false)
-	{
-		$id = (integer) $id;
-		
-		$strReq = 'SELECT post_id, comment_trackback '.
-				'FROM '.$this->prefix.'comment '.
-				'WHERE comment_id = '.$id.' ';
-		
-		$rs = $this->con->select($strReq);
-		
-		$post_id = $rs->post_id;
-		$tb = (boolean) $rs->comment_trackback;
-		
-		$strReq = 'SELECT COUNT(post_id) '.
-				'FROM '.$this->prefix.'comment '.
-				'WHERE post_id = '.(integer) $post_id.' '.
-				'AND comment_trackback = '.(integer) $tb.' '.
-				'AND comment_status = 1 ';
-		
-		if ($del) {
-			$strReq .= 'AND comment_id <> '.$id.' ';
-		}
-		
-		$rs = $this->con->select($strReq);
-		
-		$cur = $this->con->openCursor($this->prefix.'post');
-		
-		if ($rs->isEmpty()) {
-			return;
-		}
-		
-		if ($tb) {
-			$cur->nb_trackback = (integer) $rs->f(0);
-		} else {
-			$cur->nb_comment = (integer) $rs->f(0);
-		}
-		
-		$cur->update('WHERE post_id = '.(integer) $post_id);
-	}
-	//@}
-	
+		
 	/// @name Categories management methods
 	//@{
@@ -701,5 +638,4 @@
 			'post_url, post_lang, post_title, '.$content_req.
 			'post_type, post_meta, post_status, post_selected, post_position, '.
-			'post_open_comment, post_open_tb, nb_comment, nb_trackback, '.
 			'U.user_name, U.user_firstname, U.user_displayname, U.user_email, '.
 			'U.user_url, '.
@@ -1714,376 +1650,4 @@
 	}
 	//@}
-	
-	/// @name Comments management methods
-	//@{
-	/**
-	Retrieves comments. <b>$params</b> is an array taking the following
-	optionnal parameters:
-	
-	- no_content: Don't retrieve comment content
-	- post_type: Get only entries with given type (default no type, array for many types) 
-	- post_id: (integer) Get comments belonging to given post_id
-	- cat_id: (integer or array) Get comments belonging to entries of given category ID
-	- comment_id: (integer) Get comment with given ID
-	- comment_status: (integer) Get comments with given comment_status
-	- comment_trackback: (integer) Get only comments (0) or trackbacks (1)
-	- comment_ip: (string) Get comments with given IP address
-	- post_url: Get entry with given post_url field
-	- user_id: (integer) Get entries belonging to given user ID
-	- q_author: Search comments by author
-	- sql: Append SQL string at the end of the query
-	- from: Append SQL string after "FROM" statement in query
-	- order: Order of results (default "ORDER BY comment_dt DES")
-	- limit: Limit parameter
-	- sql_only : return the sql request instead of results. Only ids are selected
-	
-	@param	params		<b>array</b>		Parameters
-	@param	count_only	<b>boolean</b>		Only counts results
-	@return	<b>record</b>	A record with some more capabilities
-	*/
-	public function getComments($params=array(),$count_only=false)
-	{
-		if ($count_only)
-		{
-			$strReq = 'SELECT count(comment_id) ';
-		}
-		elseif (!empty($params['sql_only'])) 
-		{
-			$strReq = 'SELECT P.post_id ';
-		}
-		else
-		{
-			if (!empty($params['no_content'])) {
-				$content_req = '';
-			} else {
-				$content_req = 'comment_content, ';
-			}
-			
-			if (!empty($params['columns']) && is_array($params['columns'])) {
-				$content_req .= implode(', ',$params['columns']).', ';
-			}
-			
-			$strReq =
-			'SELECT C.comment_id, comment_dt, comment_tz, comment_upddt, '.
-			'comment_author, comment_email, comment_site, '.
-			$content_req.' comment_trackback, comment_status, '.
-			'comment_spam_status, comment_spam_filter, comment_ip, '.
-			'P.post_title, P.post_url, P.post_id, P.post_password, P.post_type, '.
-			'P.post_dt, P.user_id, U.user_email, U.user_url ';
-		}
-		
-		$strReq .=
-		'FROM '.$this->prefix.'comment C '.
-		'INNER JOIN '.$this->prefix.'post P ON C.post_id = P.post_id '.
-		'INNER JOIN '.$this->prefix.'user U ON P.user_id = U.user_id ';
-		
-		if (!empty($params['from'])) {
-			$strReq .= $params['from'].' ';
-		}
-		
-		$strReq .=
-		"WHERE P.blog_id = '".$this->con->escape($this->id)."' ";
-		
-		if (!$this->core->auth->check('contentadmin',$this->id)) {
-			$strReq .= 'AND ((comment_status = 1 AND P.post_status = 1 ';
-			
-			if ($this->without_password) {
-				$strReq .= 'AND post_password IS NULL ';
-			}
-			$strReq .= ') ';
-			
-			if ($this->core->auth->userID()) {
-				$strReq .= "OR P.user_id = '".$this->con->escape($this->core->auth->userID())."')";
-			} else {
-				$strReq .= ') ';
-			}
-		}
-		
-		if (!empty($params['post_type']))
-		{
-			$strReq .= 'AND post_type '.$this->con->in($params['post_type']);
-		}
-		
-		if (isset($params['post_id']) && $params['post_id'] !== '') {
-			$strReq .= 'AND P.post_id = '.(integer) $params['post_id'].' ';
-		}
-		
-		if (isset($params['cat_id']) && $params['cat_id'] !== '') {
-			$strReq .= 'AND P.cat_id = '.(integer) $params['cat_id'].' ';
-		}
-		
-		if (isset($params['comment_id']) && $params['comment_id'] !== '') {
-			$strReq .= 'AND comment_id = '.(integer) $params['comment_id'].' ';
-		}
-		
-		if (isset($params['comment_status'])) {
-			$strReq .= 'AND comment_status = '.(integer) $params['comment_status'].' ';
-		}
-		
-		if (!empty($params['comment_status_not']))
-		{
-			$strReq .= 'AND comment_status <> '.(integer) $params['comment_status_not'].' ';
-		}
-		
-		if (isset($params['comment_trackback'])) {
-			$strReq .= 'AND comment_trackback = '.(integer) (boolean) $params['comment_trackback'].' ';
-		}
-		
-		if (isset($params['comment_ip'])) {
-			$strReq .= "AND comment_ip = '".$this->con->escape($params['comment_ip'])."' ";
-		}
-		
-		if (isset($params['q_author'])) {
-			$q_author = $this->con->escape(str_replace('*','%',strtolower($params['q_author'])));
-			$strReq .= "AND LOWER(comment_author) LIKE '".$q_author."' ";
-		}
-		
-		if (!empty($params['search']))
-		{
-			$words = text::splitWords($params['search']);
-			
-			if (!empty($words))
-			{
-				# --BEHAVIOR coreCommentSearch
-				if ($this->core->hasBehavior('coreCommentSearch')) {
-					$this->core->callBehavior('coreCommentSearch',$this->core,array(&$words,&$strReq,&$params));
-				}
-				
-				if ($words)
-				{
-					foreach ($words as $i => $w) {
-						$words[$i] = "comment_words LIKE '%".$this->con->escape($w)."%'";
-					}
-					$strReq .= 'AND '.implode(' AND ',$words).' ';
-				}
-			}
-		}
-		
-		if (!empty($params['sql'])) {
-			$strReq .= $params['sql'].' ';
-		}
-		
-		if (!$count_only)
-		{
-			if (!empty($params['order'])) {
-				$strReq .= 'ORDER BY '.$this->con->escape($params['order']).' ';
-			} else {
-				$strReq .= 'ORDER BY comment_dt DESC ';
-			}
-		}
-		
-		if (!$count_only && !empty($params['limit'])) {
-			$strReq .= $this->con->limit($params['limit']);
-		}
-
-		if (!empty($params['sql_only'])) {
-			return $strReq;
-		}
-		
-		$rs = $this->con->select($strReq);
-		$rs->core = $this->core;
-		$rs->extend('rsExtComment');
-		
-		# --BEHAVIOR-- coreBlogGetComments
-		$this->core->callBehavior('coreBlogGetComments',$rs);
-		
-		return $rs;
-	}
-	
-	/**
-	Creates a new comment. Takes a cursor as input and returns the new comment
-	ID.
-	
-	@param	cur		<b>cursor</b>		Comment cursor
-	@return	<b>integer</b>		New comment ID
-	*/
-	public function addComment($cur)
-	{
-		$this->con->writeLock($this->prefix.'comment');
-		try
-		{
-			# Get ID
-			$rs = $this->con->select(
-				'SELECT MAX(comment_id) '.
-				'FROM '.$this->prefix.'comment ' 
-			);
-			
-			$cur->comment_id = (integer) $rs->f(0) + 1;
-			$cur->comment_upddt = date('Y-m-d H:i:s');
-			
-			$offset = dt::getTimeOffset($this->settings->system->blog_timezone);
-			$cur->comment_dt = date('Y-m-d H:i:s',time() + $offset);
-			$cur->comment_tz = $this->settings->system->blog_timezone;
-			
-			$this->getCommentCursor($cur);
-			
-			if ($cur->comment_ip === null) {
-				$cur->comment_ip = http::realIP();
-			}
-			
-			# --BEHAVIOR-- coreBeforeCommentCreate
-			$this->core->callBehavior('coreBeforeCommentCreate',$this,$cur);
-			
-			$cur->insert();
-			$this->con->unlock();
-		}
-		catch (Exception $e)
-		{
-			$this->con->unlock();
-			throw $e;
-		}
-		
-		# --BEHAVIOR-- coreAfterCommentCreate
-		$this->core->callBehavior('coreAfterCommentCreate',$this,$cur);
-		
-		$this->triggerComment($cur->comment_id);
-		if ($cur->comment_status != -2) {
-			$this->triggerBlog();
-		}	
-		return $cur->comment_id;
-	}
-	
-	/**
-	Updates an existing comment.
-	
-	@param	id		<b>integer</b>		Comment ID
-	@param	cur		<b>cursor</b>		Comment cursor
-	*/
-	public function updComment($id,$cur)
-	{
-		if (!$this->core->auth->check('usage,contentadmin',$this->id)) {
-			throw new Exception(__('You are not allowed to update comments'));
-		}
-		
-		$id = (integer) $id;
-		
-		if (empty($id)) {
-			throw new Exception(__('No such comment ID'));
-		}
-		
-		$rs = $this->getComments(array('comment_id' => $id));
-		
-		if ($rs->isEmpty()) {
-			throw new Exception(__('No such comment ID'));
-		}
-		
-		#If user is only usage, we need to check the post's owner
-		if (!$this->core->auth->check('contentadmin',$this->id))
-		{
-			if ($rs->user_id != $this->core->auth->userID()) {
-				throw new Exception(__('You are not allowed to update this comment'));
-			}
-		}
-		
-		$this->getCommentCursor($cur);
-		
-		$cur->comment_upddt = date('Y-m-d H:i:s');
-		
-		if (!$this->core->auth->check('publish,contentadmin',$this->id)) {
-			$cur->unsetField('comment_status');
-		}
-		
-		# --BEHAVIOR-- coreBeforeCommentUpdate
-		$this->core->callBehavior('coreBeforeCommentUpdate',$this,$cur,$rs);
-		
-		$cur->update('WHERE comment_id = '.$id.' ');
-		
-		# --BEHAVIOR-- coreAfterCommentUpdate
-		$this->core->callBehavior('coreAfterCommentUpdate',$this,$cur,$rs);
-		
-		$this->triggerComment($id);
-		$this->triggerBlog();
-	}
-	
-	/**
-	Updates comment status.
-	
-	@param	id		<b>integer</b>		Comment ID
-	@param	status	<b>integer</b>		Comment status
-	*/
-	public function updCommentStatus($id,$status)
-	{
-		if (!$this->core->auth->check('publish,contentadmin',$this->id)) {
-			throw new Exception(__("You are not allowed to change this comment's status"));
-		}
-		
-		$cur = $this->con->openCursor($this->prefix.'comment');
-		$cur->comment_status = (integer) $status;
-		$this->updComment($id,$cur);
-	}
-	
-	/**
-	Delete a comment
-	
-	@param	id		<b>integer</b>		Comment ID
-	*/
-	public function delComment($id)
-	{
-		if (!$this->core->auth->check('delete,contentadmin',$this->id)) {
-			throw new Exception(__('You are not allowed to delete comments'));
-		}
-		
-		$id = (integer) $id;
-		
-		if (empty($id)) {
-			throw new Exception(__('No such comment ID'));
-		}
-		
-		#If user can only delete, we need to check the post's owner
-		if (!$this->core->auth->check('contentadmin',$this->id))
-		{
-			$strReq = 'SELECT P.post_id '.
-					'FROM '.$this->prefix.'post P, '.$this->prefix.'comment C '.
-					'WHERE P.post_id = C.post_id '.
-					"AND P.blog_id = '".$this->con->escape($this->id)."' ".
-					'AND comment_id = '.$id.' '.
-					"AND user_id = '".$this->con->escape($this->core->auth->userID())."' ";
-			
-			$rs = $this->con->select($strReq);
-			
-			if ($rs->isEmpty()) {
-				throw new Exception(__('You are not allowed to delete this comment'));
-			}
-		}
-		
-		$strReq = 'DELETE FROM '.$this->prefix.'comment '.
-				'WHERE comment_id = '.$id.' ';
-		
-		$this->triggerComment($id,true);
-		$this->con->execute($strReq);
-		$this->triggerBlog();
-	}
-	
-	private function getCommentCursor($cur)
-	{
-		if ($cur->comment_content !== null && $cur->comment_content == '') {
-			throw new Exception(__('You must provide a comment'));
-		}
-		
-		if ($cur->comment_author !== null && $cur->comment_author == '') {
-			throw new Exception(__('You must provide an author name'));
-		}
-		
-		if ($cur->comment_email != '' && !text::isEmail($cur->comment_email)) {
-			throw new Exception(__('Email address is not valid.'));
-		}
-		
-		if ($cur->comment_site !== null && $cur->comment_site != '') {
-			if (!preg_match('|^http(s?)://|',$cur->comment_site)) {
-				$cur->comment_site = 'http://'.$cur->comment_site;
-			}
-		}
-		
-		if ($cur->comment_status === null) {
-			$cur->comment_status = (integer) $this->settings->system->comments_pub;
-		}
-		
-		# Words list
-		if ($cur->comment_content !== null)
-		{
-			$cur->comment_words = implode(' ',text::splitWords($cur->comment_content));
-		}
-	}
-	//@}
 }
 ?>
Index: inc/core/class.dc.core.php
===================================================================
--- inc/core/class.dc.core.php	(revision 706)
+++ inc/core/class.dc.core.php	(revision 848)
@@ -1141,84 +1141,4 @@
 	}
 	
-	/**
-	Inits <var>wiki2xhtml</var> property for simple blog comment (basic syntax).
-	*/
-	public function initWikiSimpleComment()
-	{
-		$this->initWiki();
-		
-		$this->wiki2xhtml->setOpts(array(
-			'active_title' => 0,
-			'active_setext_title' => 0,
-			'active_hr' => 0,
-			'active_lists' => 0,
-			'active_quote' => 0,
-			'active_pre' => 0,
-			'active_empty' => 0,
-			'active_auto_br' => 1,
-			'active_auto_urls' => 1,
-			'active_urls' => 0,
-			'active_auto_img' => 0,
-			'active_img' => 0,
-			'active_anchor' => 0,
-			'active_em' => 0,
-			'active_strong' => 0,
-			'active_br' => 0,
-			'active_q' => 0,
-			'active_code' => 0,
-			'active_acronym' => 0,
-			'active_ins' => 0,
-			'active_del' => 0,
-			'active_footnotes' => 0,
-			'active_wikiwords' => 0,
-			'active_macros' => 0,
-			'parse_pre' => 0,
-			'active_fr_syntax' => 0
-		));
-		
-		# --BEHAVIOR-- coreInitWikiSimpleComment
-		$this->callBehavior('coreInitWikiSimpleComment',$this->wiki2xhtml);
-	}
-	
-	/**
-	Inits <var>wiki2xhtml</var> property for blog comment.
-	*/
-	public function initWikiComment()
-	{
-		$this->initWiki();
-		
-		$this->wiki2xhtml->setOpts(array(
-			'active_title' => 0,
-			'active_setext_title' => 0,
-			'active_hr' => 0,
-			'active_lists' => 1,
-			'active_quote' => 0,
-			'active_pre' => 1,
-			'active_empty' => 0,
-			'active_auto_br' => 1,
-			'active_auto_urls' => 1,
-			'active_urls' => 1,
-			'active_auto_img' => 0,
-			'active_img' => 0,
-			'active_anchor' => 0,
-			'active_em' => 1,
-			'active_strong' => 1,
-			'active_br' => 1,
-			'active_q' => 1,
-			'active_code' => 1,
-			'active_acronym' => 1,
-			'active_ins' => 1,
-			'active_del' => 1,
-			'active_footnotes' => 0,
-			'active_wikiwords' => 0,
-			'active_macros' => 0,
-			'parse_pre' => 0,
-			'active_fr_syntax' => 0
-		));
-		
-		# --BEHAVIOR-- coreInitWikiComment
-		$this->callBehavior('coreInitWikiComment',$this->wiki2xhtml);
-	}
-	
 	public function wikiPostLink($url,$content)
 	{
@@ -1269,16 +1189,6 @@
 		{
 			$defaults = array(
-				array('allow_comments','boolean',true,
-				'Allow comments on blog'),
-				array('allow_trackbacks','boolean',true,
-				'Allow trackbacks on blog'),
 				array('blog_timezone','string','Europe/London',
 				'Blog timezone'),
-				array('comments_nofollow','boolean',true,
-				'Add rel="nofollow" to comments URLs'),
-				array('comments_pub','boolean',true,
-				'Publish comments immediately'),
-				array('comments_ttl','integer',0,
-				'Number of days to keep comments open (0 means no ttl)'),
 				array('copyright_notice','string','','Copyright notice (simple text)'),
 				array('date_format','string','%A, %B %e %Y',
@@ -1306,6 +1216,4 @@
 				array('nb_post_per_feed','integer',20,
 				'Number of entries on feeds'),
-				array('nb_comment_per_feed','integer',20,
-				'Number of comments on feeds'),
 				array('post_url_format','string','{y}/{m}/{d}/{t}',
 				'Post URL format. {y}: year, {m}: month, {d}: day, {id}: post id, {t}: entry title'),
@@ -1330,14 +1238,8 @@
 				array('tpl_use_cache','boolean',true,
 				'Use template caching'),
-				array('trackbacks_pub','boolean',true,
-				'Publish trackbacks immediately'),
-				array('trackbacks_ttl','integer',0,
-				'Number of days to keep trackbacks open (0 means no ttl)'),
 				array('url_scan','string','query_string',
 				'URL handle mode (path_info or query_string)'),
 				array('use_smilies','boolean',false,
 				'Show smilies on entries and comments'),
-				array('wiki_comments','boolean',false,
-				'Allow commenters to use a subset of wiki syntax')
 			);
 		}
@@ -1394,65 +1296,4 @@
 	
 	/**
-	Recreates comments search engine index.
-	
-	@param	start	<b>integer</b>		Start comment index
-	@param	limit	<b>integer</b>		Number of comments to index
-	
-	@return	<b>integer</b>		<var>$start</var> and <var>$limit</var> sum
-	*/
-	public function indexAllComments($start=null,$limit=null)
-	{
-		$strReq = 'SELECT COUNT(comment_id) '.
-				'FROM '.$this->prefix.'comment';
-		$rs = $this->con->select($strReq);
-		$count = $rs->f(0);
-		
-		$strReq = 'SELECT comment_id, comment_content '.
-				'FROM '.$this->prefix.'comment ';
-		
-		if ($start !== null && $limit !== null) {
-			$strReq .= $this->con->limit($start,$limit);
-		}
-		
-		$rs = $this->con->select($strReq);
-		
-		$cur = $this->con->openCursor($this->prefix.'comment');
-		
-		while ($rs->fetch())
-		{
-			$cur->comment_words = implode(' ',text::splitWords($rs->comment_content));
-			$cur->update('WHERE comment_id = '.(integer) $rs->comment_id);
-			$cur->clean();
-		}
-		
-		if ($start+$limit > $count) {
-			return null;
-		}
-		return $start+$limit;
-	}
-	
-	/**
-	Reinits nb_comment and nb_trackback in post table.
-	*/
-	public function countAllComments()
-	{
-	
-		$updCommentReq = 'UPDATE '.$this->prefix.'post P '.
-			'SET nb_comment = ('.
-				'SELECT COUNT(C.comment_id) from '.$this->prefix.'comment C '.
-				'WHERE C.post_id = P.post_id AND C.comment_trackback <> 1 '.
-				'AND C.comment_status = 1 '.
-			')';
-		$updTrackbackReq = 'UPDATE '.$this->prefix.'post P '.
-			'SET nb_trackback = ('.
-				'SELECT COUNT(C.comment_id) from '.$this->prefix.'comment C '.
-				'WHERE C.post_id = P.post_id AND C.comment_trackback = 1 '.
-				'AND C.comment_status = 1 '.
-			')';
-		$this->con->execute($updCommentReq);
-		$this->con->execute($updTrackbackReq);
-	}
-	
-	/**
 	Empty templates cache directory
 	*/
Index: inc/core/class.dc.meta.php
===================================================================
--- inc/core/class.dc.meta.php	(revision 270)
+++ inc/core/class.dc.meta.php	(revision 848)
@@ -247,33 +247,4 @@
 	
 	/**
-	Retrieves comments to posts corresponding to given meta criteria.
-	<b>$params</b> is an array taking the following optional parameters:
-	- meta_id : get comments to posts having meta id 
-	- meta_type : get comments to posts having meta type
-	
-	@param	params	<b>array</b>	Parameters
-	@param	count_only	<b>boolean</b>		Only counts results
-	
-	@return	<b>record</b>	the resulting comments record
-	*/
-	public function getCommentsByMeta($params=array(),$count_only=false)
-	{
-		if (!isset($params['meta_id'])) {
-			return null;
-		}
-		
-		$params['from'] = ', '.$this->table.' META ';
-		$params['sql'] = 'AND META.post_id = P.post_id ';
-		$params['sql'] .= "AND META.meta_id = '".$this->con->escape($params['meta_id'])."' ";
-		
-		if (!empty($params['meta_type'])) {
-			$params['sql'] .= "AND META.meta_type = '".$this->con->escape($params['meta_type'])."' ";
-			unset($params['meta_type']);
-		}
-		
-		return $this->core->blog->getComments($params,$count_only);
-	}
-	
-	/**
 	@deprecated since 2.2. Use getMetadata and computeMetaStats instead.
 	Generic-purpose metadata retrieval : gets metadatas according to given
Index: inc/core/class.dc.rs.extensions.php
===================================================================
--- inc/core/class.dc.rs.extensions.php	(revision 776)
+++ inc/core/class.dc.rs.extensions.php	(revision 848)
@@ -117,55 +117,4 @@
 	
 	/**
-	Returns whether comments are enabled on post.
-	
-	@param	rs	Invisible parameter
-	@return	<b>boolean</b>
-	*/
-	public static function commentsActive($rs)
-	{
-		return
-		$rs->core->blog->settings->system->allow_comments
-		&& $rs->post_open_comment
-		&& ($rs->core->blog->settings->system->comments_ttl == 0 ||
-		time()-($rs->core->blog->settings->system->comments_ttl*86400) < $rs->getTS());
-	}
-	
-	/**
-	Returns whether trackbacks are enabled on post.
-	
-	@param	rs	Invisible parameter
-	@return	<b>boolean</b>
-	*/
-	public static function trackbacksActive($rs)
-	{
-		return
-		$rs->core->blog->settings->system->allow_trackbacks
-		&& $rs->post_open_tb
-		&& ($rs->core->blog->settings->system->trackbacks_ttl == 0 ||
-		time()-($rs->core->blog->settings->system->trackbacks_ttl*86400) < $rs->getTS());
-	}
-	
-	/**
-	Returns whether post has at least one comment.
-	
-	@param	rs	Invisible parameter
-	@return	<b>boolean</b>
-	*/
-	public static function hasComments($rs)
-	{
-		return $rs->nb_comment > 0;
-	}
-	
-	/**
-	Returns whether post has at least one trackbacks.
-	
-	@return	<b>boolean</b>
-	*/
-	public static function hasTrackbacks($rs)
-	{
-		return $rs->nb_trackback > 0;
-	}
-	
-	/**
 	Returns full post URL.
 	
@@ -361,38 +310,4 @@
 		
 		return 'tag:'.$url['host'].','.$date_part.':'.$rs->post_id;
-	}
-	
-	/**
-	Returns trackback RDF information block in HTML comment.
-	
-	@param	rs	Invisible parameter
-	@return	<b>string</b>
-	*/
-	public static function getTrackbackData($rs)
-	{
-		return
-		"<![CDATA[>\n".
-		"<!--[\n".
-		'<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"'."\n".
-		'  xmlns:dc="http://purl.org/dc/elements/1.1/"'."\n".
-		'  xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">'."\n".
-		"<rdf:Description\n".
-		'  rdf:about="'.$rs->getURL().'"'."\n".
-		'  dc:identifier="'.$rs->getURL().'"'."\n".
-		'  dc:title="'.htmlspecialchars($rs->post_title,ENT_COMPAT,'UTF-8').'"'."\n".
-		'  trackback:ping="'.$rs->getTrackbackLink().'" />'."\n".
-		"</rdf:RDF>\n".
-		"<!]]><!---->\n";
-	}
-	
-	/**
-	Returns post trackback full URL.
-	
-	@param	rs	Invisible parameter
-	@return	<b>string</b>
-	*/
-	public static function getTrackbackLink($rs)
-	{
-		return $rs->core->blog->url.$rs->core->url->getURLFor('trackback',$rs->post_id);
 	}
 	
@@ -459,265 +374,4 @@
 /**
 @ingroup DC_CORE
-@brief Dotclear comment record helpers.
-
-This class adds new methods to database comment results.
-You can call them on every record comming from dcBlog::getComments and similar
-methods.
-
-@warning You should not give the first argument (usualy $rs) of every described
-function.
-*/
-class rsExtComment
-{
-	/**
-	Returns comment date with <var>$format</var> as formatting pattern. If
-	format is empty, uses <var>date_format</var> blog setting.
-	
-	@param	rs	Invisible parameter
-	@param	format	<b>string</b>		Date format pattern
-	@param	type	<b>string</b>		(dt|upddt) defaults to comment_dt
-	@return	<b>string</b>
-	*/
-	public static function getDate($rs,$format,$type='')
-	{
-		if (!$format) {
-			$format = $rs->core->blog->settings->system->date_format;
-		}
-		
-		if ($type == 'upddt') {
-			return dt::dt2str($format,$rs->comment_upddt,$rs->comment_tz);
-		} else {
-			return dt::dt2str($format,$rs->comment_dt);
-		}
-	}
-	
-	/**
-	Returns comment time with <var>$format</var> as formatting pattern. If
-	format is empty, uses <var>time_format</var> blog setting.
-	
-	@param	rs	Invisible parameter
-	@param	format	<b>string</b>		Date format pattern
-	@param	type	<b>string</b>		(dt|upddt) defaults to comment_dt
-	@return	<b>string</b>
-	*/
-	public static function getTime($rs,$format,$type='')
-	{
-		if (!$format) {
-			$format = $rs->core->blog->settings->system->time_format;
-		}
-		
-		if ($type == 'upddt') {
-			return dt::dt2str($format,$rs->comment_updt,$rs->comment_tz);
-		} else {
-			return dt::dt2str($format,$rs->comment_dt);
-		}
-	}
-	
-	/**
-	Returns comment timestamp.
-	
-	@param	rs	Invisible parameter
-	@param	type	<b>string</b>		(dt|upddt) defaults to comment_dt
-	@return	<b>integer</b>
-	*/
-	public static function getTS($rs,$type='')
-	{
-		if ($type == 'upddt') {
-			return strtotime($rs->comment_upddt);
-		} else {
-			return strtotime($rs->comment_dt);
-		}
-	}
-	
-	/**
-	Returns comment date formating according to the ISO 8601 standard.
-	
-	@param	rs	Invisible parameter
-	@param	type	<b>string</b>		(dt|upddt) defaults to comment_dt
-	@return	<b>string</b>
-	*/
-	public static function getISO8601Date($rs,$type='')
-	{
-		if ($type == 'upddt') {
-			return dt::iso8601($rs->getTS($type)+dt::getTimeOffset($rs->comment_tz),$rs->comment_tz);
-		} else {
-			return dt::iso8601($rs->getTS(),$rs->comment_tz);
-		}
-	}
-	
-	/**
-	Returns comment date formating according to RFC 822.
-	
-	@param	rs	Invisible parameter
-	@param	type	<b>string</b>		(dt|upddt) defaults to comment_dt
-	@return	<b>string</b>
-	*/
-	public static function getRFC822Date($rs,$type='')
-	{
-		if ($type == 'upddt') {
-			return dt::rfc822($rs->getTS($type)+dt::getTimeOffset($rs->comment_tz),$rs->comment_tz);
-		} else {
-			return dt::rfc822($rs->getTS(),$rs->comment_tz);
-		}
-	}
-	
-	/**
-	Returns comment content. If <var>$absolute_urls</var> is true, appends full
-	blog URL to each relative post URLs.
-	
-	@param	rs	Invisible parameter
-	@param	absolute_urls	<b>boolean</b>		With absolute URLs
-	@return	<b>string</b>
-	*/
-	public static function getContent($rs,$absolute_urls=false)
-	{
-		$res = $rs->comment_content;
-		
-		if ($rs->core->blog->settings->system->comments_nofollow) {
-			$res = preg_replace_callback('#<a(.*?href=".*?".*?)>#ms',array('self','noFollowURL'),$res);
-		}
-		
-		if ($absolute_urls) {
-			$res = html::absoluteURLs($res,$rs->getPostURL());
-		}
-		
-		return $res;
-	}
-	
-	private static function noFollowURL($m)
-	{
-		if (preg_match('/rel="nofollow"/',$m[1])) {
-			return $m[0];
-		}
-		
-		return '<a'.$m[1].' rel="nofollow">';
-	}
-	
-	/**
-	Returns comment author link to his website if he specified one.
-	
-	@param	rs	Invisible parameter
-	@return	<b>string</b>
-	*/
-	public static function getAuthorURL($rs)
-	{
-		if (trim($rs->comment_site)) {
-			return trim($rs->comment_site);
-		}
-	}
-	
-	/**
-	Returns comment post full URL.
-	
-	@param	rs	Invisible parameter
-	@return	<b>string</b>
-	*/
-	public static function getPostURL($rs)
-	{
-		return $rs->core->blog->url.$rs->core->getPostPublicURL(
-				$rs->post_type,html::sanitizeURL($rs->post_url)
-			);
-	}
-	
-	/**
-	Returns comment author name in a link to his website if he specified one.
-	
-	@param	rs	Invisible parameter
-	@return	<b>string</b>
-	*/
-	public static function getAuthorLink($rs)
-	{
-		$res = '%1$s';
-		$url = $rs->getAuthorURL();
-		if ($url) {
-			$res = '<a href="%2$s"%3$s>%1$s</a>';
-		}
-		
-		$nofollow = '';
-		if ($rs->core->blog->settings->system->comments_nofollow) {
-			$nofollow = ' rel="nofollow"';
-		}
-		
-		return sprintf($res,html::escapeHTML($rs->comment_author),html::escapeHTML($url),$nofollow);
-	}
-	
-	/**
-	Returns comment author e-mail address. If <var>$encoded</var> is true,
-	"@" sign is replaced by "%40" and "." by "%2e".
-	
-	@param	rs	Invisible parameter
-	@param	encoded	<b>boolean</b>		Encode address.
-	@return	<b>string</b>
-	*/
-	public static function getEmail($rs,$encoded=true)
-	{
-		if ($encoded) {
-			return strtr($rs->comment_email,array('@'=>'%40','.'=>'%2e'));
-		}
-		return $rs->comment_email;
-	}
-	
-	/**
-	Returns trackback site title if comment is a trackback.
-	
-	@param	rs	Invisible parameter
-	@return	<b>string</b>
-	*/
-	public static function getTrackbackTitle($rs)
-	{
-		if ($rs->comment_trackback == 1 &&
-		preg_match('|<p><strong>(.*?)</strong></p>|msU',$rs->comment_content,
-		$match)) {
-			return html::decodeEntities($match[1]);
-		}
-	}
-	
-	/**
-	Returns trackback content if comment is a trackback.
-	
-	@param	rs	Invisible parameter
-	@return	<b>string</b>
-	*/
-	public static function getTrackbackContent($rs)
-	{
-		if ($rs->comment_trackback == 1) {
-			return preg_replace('|<p><strong>.*?</strong></p>|msU','',
-			$rs->comment_content);
-		}
-	}
-	
-	/**
-	Returns comment feed unique ID.
-	
-	@param	rs	Invisible parameter
-	@return	<b>string</b>
-	*/
-	public static function getFeedID($rs)
-	{
-		return 'urn:md5:'.md5($rs->core->blog->uid.$rs->comment_id);
-		
-		$url = parse_url($rs->core->blog->url);
-		$date_part = date('Y-m-d',strtotime($rs->comment_dt));
-		
-		return 'tag:'.$url['host'].','.$date_part.':'.$rs->comment_id;
-	}
-	
-	/**
-	Returns whether comment is from the post author.
-	
-	@param	rs	Invisible parameter
-	@return	<b>boolean</b>
-	*/
-	public static function isMe($rs)
-	{
-		return
-		$rs->comment_email && $rs->comment_site &&
-		$rs->comment_email == $rs->user_email &&
-		$rs->comment_site == $rs->user_url;
-	}
-}
-
-/**
-@ingroup DC_CORE
 @brief Dotclear dates record helpers.
 
Index: nc/core/class.dc.trackback.php
===================================================================
--- inc/core/class.dc.trackback.php	(revision 270)
+++ 	(revision )
@@ -1,404 +1,0 @@
-<?php
-# -- BEGIN LICENSE BLOCK ---------------------------------------
-#
-# This file is part of Dotclear 2.
-#
-# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
-# Licensed under the GPL version 2.0 license.
-# See LICENSE file or
-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-#
-# -- END LICENSE BLOCK -----------------------------------------
-if (!defined('DC_RC_PATH')) { return; }
-
-/**
-@ingroup DC_CORE
-@brief Trackbacks sender and server
-
-Sends and receives trackbacks. Also handles trackbacks auto discovery.
-*/
-class dcTrackback
-{
-	public $core;		///< <b>dcCore</b> dcCore instance
-	public $table;		///< <b>string</b> done pings table name
-	
-	/**
-	Object constructor
-	
-	@param	core		<b>dcCore</b>		dcCore instance
-	*/
-	public function __construct($core)
-	{
-		$this->core =& $core;
-		$this->con =& $this->core->con;
-		$this->table = $this->core->prefix.'ping';
-	}
-	
-	/// @name Send trackbacks
-	//@{
-	/**
-	Get all pings sent for a given post.
-	
-	@param	post_id	<b>integer</b>		Post ID
-	@return	<b>record</b>
-	*/
-	public function getPostPings($post_id)
-	{
-		$strReq = 'SELECT ping_url, ping_dt '.
-				'FROM '.$this->table.' '.
-				'WHERE post_id = '.(integer) $post_id;
-		
-		return $this->con->select($strReq);
-	}
-	
-	/**
-	Sends a ping to given <var>$url</var>.
-	
-	@param	url			<b>string</b>		URL to ping
-	@param	post_id		<b>integer</b>		Post ID
-	@param	post_title	<b>string</b>		Post title
-	@param	post_excerpt	<b>string</b>		Post excerpt
-	@param	post_url		<b>string</b>		Post URL
-	*/
-	public function ping($url,$post_id,$post_title,$post_excerpt,$post_url)
-	{
-		if ($this->core->blog === null) {
-			return false;
-		}
-		
-		$post_id = (integer) $post_id;
-		
-		# Check for previously done trackback
-		$strReq = 'SELECT post_id, ping_url FROM '.$this->table.' '.
-				'WHERE post_id = '.$post_id.' '.
-				"AND ping_url = '".$this->con->escape($url)."' ";
-		
-		$rs = $this->con->select($strReq);
-		
-		if (!$rs->isEmpty()) {
-			throw new Exception(sprintf(__('%s has still been pinged'),$url));
-		}
-		
-		$data = array(
-			'title' => $post_title,
-			'excerpt' => $post_excerpt,
-			'url' => $post_url,
-			'blog_name' => trim(html::escapeHTML(html::clean($this->core->blog->name)))
-			//,'__debug' => false
-		);
-		
-		# Ping
-		try
-		{
-			$http = self::initHttp($url,$path);
-			$http->post($path,$data,'UTF-8');
-			$res = $http->getContent();
-		}
-		catch (Exception $e)
-		{
-			throw new Exception(__('Unable to ping URL'));
-		}
-		
-		$pattern =
-		'|<response>.*<error>(.*)</error>(.*)'.
-		'(<message>(.*)</message>(.*))?'.
-		'</response>|msU';
-		
-		if (!preg_match($pattern,$res,$match))
-		{
-			throw new Exception(sprintf(__('%s is not a ping URL'),$url));
-		}
-		
-		$ping_error = trim($match[1]);
-		$ping_msg = (!empty($match[4])) ? $match[4] : '';
-		
-		if ($ping_error != '0') {
-			throw new Exception(sprintf(__('%s, ping error:'),$url).' '.$ping_msg);
-		} else {
-			# Notify ping result in database
-			$cur = $this->con->openCursor($this->table);
-			$cur->post_id = $post_id;
-			$cur->ping_url = $url;
-			$cur->ping_dt = date('Y-m-d H:i:s');
-			
-			$cur->insert();
-		}
-	}
-	//@}
-	
-	/// @name Receive trackbacks
-	//@{
-	/**
-	Receives a trackback and insert it as a comment of given post.
-	
-	@param	post_id		<b>integer</b>		Post ID
-	*/
-	public function receive($post_id)
-	{
-		header('Content-Type: text/xml; charset=UTF-8');
-		if (empty($_POST)) {
-			http::head(405,'Method Not Allowed');
-			echo
-			'<?xml version="1.0" encoding="utf-8"?>'."\n".
-			"<response>\n".
-			"  <error>1</error>\n".
-			"  <message>POST request needed</message>\n".
-			"</response>";
-			return;
-		}
-		
-		$post_id = (integer) $post_id;
-		
-		$title = !empty($_POST['title']) ? $_POST['title'] : '';
-		$excerpt = !empty($_POST['excerpt']) ? $_POST['excerpt'] : '';
-		$url = !empty($_POST['url']) ? $_POST['url'] : '';
-		$blog_name = !empty($_POST['blog_name']) ? $_POST['blog_name'] : '';
-		$charset = '';
-		$comment = '';
-		
-		$err = false;
-		$msg = '';
-		
-		if ($this->core->blog === null)
-		{
-			$err = true;
-			$msg = 'No blog.';
-		}
-		elseif ($url == '')
-		{
-			$err = true;
-			$msg = 'URL parameter is required.';
-		}
-		elseif ($blog_name == '') {
-			$err = true;
-			$msg = 'Blog name is required.';
-		}
-		
-		if (!$err)
-		{
-			$post = $this->core->blog->getPosts(array('post_id'=>$post_id,'post_type'=>''));
-			
-			if ($post->isEmpty())
-			{
-				$err = true;
-				$msg = 'No such post.';
-			}
-			elseif (!$post->trackbacksActive())
-			{
-				$err = true;
-				$msg = 'Trackbacks are not allowed for this post or weblog.';
-			}
-		}
-		
-		if (!$err)
-		{
-			$charset = self::getCharsetFromRequest();
-			
-			if (!$charset) {
-				$charset = mb_detect_encoding($title.' '.$excerpt.' '.$blog_name,
-				'UTF-8,ISO-8859-1,ISO-8859-2,ISO-8859-3,'.
-				'ISO-8859-4,ISO-8859-5,ISO-8859-6,ISO-8859-7,ISO-8859-8,'.
-				'ISO-8859-9,ISO-8859-10,ISO-8859-13,ISO-8859-14,ISO-8859-15');
-			}
-			
-			if (strtolower($charset) != 'utf-8') {
-				$title = iconv($charset,'UTF-8',$title);
-				$excerpt = iconv($charset,'UTF-8',$excerpt);
-				$blog_name = iconv($charset,'UTF-8',$blog_name);
-			}
-			
-			$title = trim(html::clean($title));
-			$title = html::decodeEntities($title);
-			$title = html::escapeHTML($title);
-			$title = text::cutString($title,60);
-			
-			$excerpt = trim(html::clean($excerpt));
-			$excerpt = html::decodeEntities($excerpt);
-			$excerpt = preg_replace('/\s+/ms',' ',$excerpt);
-			$excerpt = text::cutString($excerpt,252); 
-			$excerpt = html::escapeHTML($excerpt).'...';
-			
-			$blog_name = trim(html::clean($blog_name));
-			$blog_name = html::decodeEntities($blog_name);
-			$blog_name = html::escapeHTML($blog_name);
-			$blog_name = text::cutString($blog_name,60);
-			
-			$url = trim(html::clean($url));
-			
-			if (!$blog_name) {
-				$blog_name = 'Anonymous blog';
-			}
-			
-			$comment =
-			"<!-- TB -->\n".
-			'<p><strong>'.($title ? $title : $blog_name)."</strong></p>\n".
-			'<p>'.$excerpt.'</p>';
-			
-			$cur = $this->core->con->openCursor($this->core->prefix.'comment');
-			$cur->comment_author = (string) $blog_name;
-			$cur->comment_site = (string) $url;
-			$cur->comment_content = (string) $comment;
-			$cur->post_id = $post_id;
-			$cur->comment_trackback = 1;
-			$cur->comment_status = $this->core->blog->settings->system->trackbacks_pub ? 1 : -1;
-			$cur->comment_ip = http::realIP();
-			
-			try
-			{
-				# --BEHAVIOR-- publicBeforeTrackbackCreate
-				$this->core->callBehavior('publicBeforeTrackbackCreate',$cur);
-				if ($cur->post_id) {
-					$comment_id = $this->core->blog->addComment($cur);
-					
-					# --BEHAVIOR-- publicAfterTrackbackCreate
-					$this->core->callBehavior('publicAfterTrackbackCreate',$cur,$comment_id);
-				}
-			}
-			catch (Exception $e)
-			{
-				$err = 1;
-				$msg = 'Something went wrong : '.$e->getMessage();
-			}
-		}
-		
-		
-		$debug_trace =
-		"  <debug>\n".
-		'    <title>'.$title."</title>\n".
-		'    <excerpt>'.$excerpt."</excerpt>\n".
-		'    <url>'.$url."</url>\n".
-		'    <blog_name>'.$blog_name."</blog_name>\n".
-		'    <charset>'.$charset."</charset>\n".
-		'    <comment>'.$comment."</comment>\n".
-		"  </debug>\n";
-		
-		$resp =
-		'<?xml version="1.0" encoding="utf-8"?>'."\n".
-		"<response>\n".
-		'  <error>'.(integer) $err."</error>\n";
-		
-		if ($msg) {
-			$resp .= '  <message>'.$msg."</message>\n";
-		}
-		
-		if (!empty($_POST['__debug'])) {
-			$resp .= $debug_trace;
-		}
-		
-		echo	$resp."</response>";
-	}
-	//@}
-	
-	private static function initHttp($url,&$path)
-	{
-		$client = netHttp::initClient($url,$path);
-		$client->setTimeout(5);
-		$client->setUserAgent('Dotclear - http://www.dotclear.org/');
-		$client->useGzip(false);
-		$client->setPersistReferers(false);
-		
-		return $client;
-	}
-	
-	private static function getCharsetFromRequest()
-	{
-		if (isset($_SERVER['CONTENT_TYPE']))
-		{
-			if (preg_match('|charset=([a-zA-Z0-9-]+)|',$_SERVER['CONTENT_TYPE'],$m)) {
-				return $m[1];
-			}
-		}
-		
-		return null;
-	}
-	
-	/// @name Trackbacks auto discovery
-	//@{
-	/**
-	Returns an array containing all discovered trackbacks URLs in
-	<var>$text</var>.
-	
-	@param	text		<b>string</b>		Input text
-	@return	<b>array</b>
-	*/
-	public function discover($text)
-	{
-		$res = array();
-		
-		foreach ($this->getTextLinks($text) as $link)
-		{
-			if (($url = $this->getPingURL($link)) !== null) {
-				$res[] = $url;
-			}
-		}
-		
-		return $res;
-	}
-	//@}
-	
-	private function getTextLinks($text)
-	{
-		$res = array();
-		
-		# href attribute on "a" tags
-		if (preg_match_all('/<a ([^>]+)>/ms', $text, $match, PREG_SET_ORDER))
-		{
-			for ($i = 0; $i<count($match); $i++)
-			{
-				if (preg_match('/href="(http:\/\/[^"]+)"/ms', $match[$i][1], $matches)) {
-					$res[$matches[1]] = 1;
-				}
-			}
-		}
-		unset($match);
-		
-		# cite attributes on "blockquote" and "q" tags
-		if (preg_match_all('/<(blockquote|q) ([^>]+)>/ms', $text, $match, PREG_SET_ORDER))
-		{
-			for ($i = 0; $i<count($match); $i++)
-			{
-				if (preg_match('/cite="(http:\/\/[^"]+)"/ms', $match[$i][2], $matches)) {
-					$res[$matches[1]] = 1;
-				}
-			}
-		}
-		
-		return array_keys($res);
-	}
-	
-	private function getPingURL($url)
-	{
-		try
-		{
-			$http = self::initHttp($url,$path);
-			$http->get($path);
-			$page_content = $http->getContent();
-		}
-		catch (Exception $e)
-		{
-			return false;
-		}
-		
-		$pattern_rdf =
-		'/<rdf:RDF.*?>.*?'.
-		'<rdf:Description\s+(.*?)\/>'.
-		'.*?<\/rdf:RDF>'.
-		'/msi';
-		
-		preg_match_all($pattern_rdf,$page_content,$rdf_all,PREG_SET_ORDER);
-		
-		for ($i=0; $i<count($rdf_all); $i++)
-		{
-			$rdf = $rdf_all[$i][1];
-			
-			if (preg_match('/dc:identifier="'.preg_quote($url,'/').'"/msi',$rdf)) {
-				if (preg_match('/trackback:ping="(.*?)"/msi',$rdf,$tb_link)) {
-					return $tb_link[1];
-				}
-			}
-		}
-		
-		return null;
-	}
-}
-?>
Index: inc/core/class.dc.xmlrpc.php
===================================================================
--- inc/core/class.dc.xmlrpc.php	(revision 776)
+++ inc/core/class.dc.xmlrpc.php	(revision 848)
@@ -187,31 +187,4 @@
 			'Update blog options');
 		
-		$this->addCallback('wp.getComment',array($this,'wp_getComment'),
-			array('struct','integer','string','string','integer'),
-			"Gets a comment, given it's comment ID.");
-		
-		$this->addCallback('wp.getCommentCount',array($this,'wp_getCommentCount'),
-			array('array','integer','string','string','integer'),
-			'Retrieve comment count.');
-		
-		$this->addCallback('wp.getComments',array($this,'wp_getComments'),
-			array('array','integer','string','string','struct'),
-			'Gets a set of comments for a given post.');
-		
-		$this->addCallback('wp.deleteComment',array($this,'wp_deleteComment'),
-			array('boolean','integer','string','string','integer'),
-			'Delete a comment with given ID.');
-		
-		$this->addCallback('wp.editComment',array($this,'wp_editComment'),
-			array('boolean','integer','string','string','integer','struct'),
-			'Edit a comment with given ID.');
-		
-		$this->addCallback('wp.newComment',array($this,'wp_newComment'),
-			array('integer','integer','string','string','integer','struct'),
-			'Create a new comment for a given post ID.');
-		
-		$this->addCallback('wp.getCommentStatusList',array($this,'wp_getCommentStatusList'),
-			array('array','integer','string','string'),
-			'Retrieve all of the comment statuses.');
 	}
 	
@@ -335,6 +308,4 @@
 		$description = !empty($struct['description']) ? $struct['description'] : null;
 		$dateCreated = !empty($struct['dateCreated']) ? $struct['dateCreated'] : null;
-		$open_comment = isset($struct['mt_allow_comments']) ? $struct['mt_allow_comments'] : 1;
-		$open_tb = isset($struct['mt_allow_pings']) ? $struct['mt_allow_pings'] : 1;
 		
 		if ($description !== null) {
@@ -362,6 +333,4 @@
 		$cur->post_content_xhtml = $content_xhtml;
 		$cur->post_excerpt_xhtml = $excerpt_xhtml;
-		$cur->post_open_comment = (integer) ($open_comment == 1);
-		$cur->post_open_tb = (integer) ($open_tb == 1);
 		$cur->post_status = (integer) $publish;
 		$cur->post_format = 'xhtml';
@@ -440,6 +409,4 @@
 		$description = (!empty($struct['description'])) ? $struct['description'] : null;
 		$dateCreated = !empty($struct['dateCreated']) ? $struct['dateCreated'] : null;
-		$open_comment = (isset($struct['mt_allow_comments'])) ? $struct['mt_allow_comments'] : 1;
-		$open_tb = (isset($struct['mt_allow_pings'])) ? $struct['mt_allow_pings'] : 1;
 		
 		if ($description !== null) {
@@ -466,6 +433,4 @@
 		$cur->post_content_xhtml = $content_xhtml;
 		$cur->post_excerpt_xhtml = $excerpt_xhtml;
-		$cur->post_open_comment = (integer) ($open_comment == 1);
-		$cur->post_open_tb = (integer) ($open_tb == 1);
 		$cur->post_status = (integer) $publish;
 		$cur->post_format = 'xhtml';
@@ -557,6 +522,4 @@
 			$res['mt_excerpt'] = $post->post_excerpt_xhtml;
 			$res['mt_text_more'] = '';
-			$res['mt_allow_comments'] = (integer) $post->post_open_comment;
-			$res['mt_allow_pings'] = (integer) $post->post_open_tb;
 			$res['mt_convert_breaks'] = '';
 			$res['mt_keywords'] = '';
@@ -621,6 +584,4 @@
 				$tres['mt_excerpt'] = $posts->post_excerpt_xhtml;
 				$tres['mt_text_more'] = '';
-				$tres['mt_allow_comments'] = (integer) $posts->post_open_comment;
-				$tres['mt_allow_pings'] = (integer) $posts->post_open_tb;
 				$tres['mt_convert_breaks'] = '';
 				$tres['mt_keywords'] = '';
@@ -832,19 +793,4 @@
 	}
 	
-	private function translateWpCommentstatus($s)
-	{
-		$status = array(
-			'hold' => -1,
-			'approve' => 0,
-			'spam' => -2
-		);
-		
-		if (is_int($s)) {
-			$status = array_flip($status);
-			return isset($status[$s]) ? $status[$s] : $status[0];
-		} else {
-			return isset($status[$s]) ? $status[$s] : $status['approve'];
-		}
-	}
 	
 	private function translateWpOptions($options=array())
@@ -986,6 +932,4 @@
 				"excerpt"				=> $posts->post_excerpt_xhtml,
 				"text_more"			=> '',
-				"mt_allow_comments"		=> (integer) $posts->post_open_comment,
-				"mt_allow_pings"		=> (integer) $posts->post_open_tb,
 				"wp_slug"				=> $posts->post_url,
 				"wp_password"			=> $posts->post_password,
@@ -1159,157 +1103,4 @@
 		}
 		return $res;
-	}
-	
-	private function countComments($user,$pwd,$post_id)
-	{
-		$this->setUser($user,$pwd);
-		$this->setBlog();
-		
-		$res = array(
-			'approved' => 0,
-			'awaiting_moderation' => 0,
-			'spam' => 0,
-			'total' => 0
-		);
-		$rs = $this->core->blog->getComments(array('post_id' => $post_id));
-		
-		while ($rs->fetch()) {
-			$res['total']++;
-			if ($rs->comment_status == 1) {
-				$res['approved']++;
-			} elseif ($rs->comment_status == -2) {
-				$res['spam']++;
-			} else {
-				$res['awaiting_moderation']++;
-			}
-		}
-		return $res;
-	}
-	
-	private function getComments($user,$pwd,$struct,$id=null)
-	{
-		$this->setUser($user,$pwd);
-		$this->setBlog();
-		
-		$params = array();
-		
-		if (!empty($struct['status'])) {
-			$params['comment_status'] = $this->translateWpCommentstatus($struct['status']);
-		}
-		
-		if (!empty($struct['post_id'])) {
-			$params['post_id'] = (integer) $struct['post_id'];
-		}
-		
-		if (isset($id)) {
-			$params['comment_id'] = $id;
-		}
-		
-		$offset = !empty($struct['offset']) ? (integer) $struct['offset'] : 0;
-		$limit = !empty($struct['number']) ? (integer) $struct['number'] : 10;
-		$params['limit'] = array($offset,$limit);
-		
-		$rs = $this->core->blog->getComments($params);
-		$res = array();
-		while ($rs->fetch())
-		{
-			$res[] = array(
-				'date_created_gmt'		=> new xmlrpcDate($rs->getTS()),
-				'user_id'				=> $rs->user_id,
-				'comment_id'			=> $rs->comment_id,
-				'parent'				=> 0,
-				'status'				=> $this->translateWpCommentstatus((integer) $rs->comment_status),
-				'content'				=> $rs->comment_content,
-				'link'				=> $rs->getPostURL().'#c'.$rs->comment_id,
-				'post_id'				=> $rs->post_id,
-				'post_title'			=> $rs->post_title,
-				'author'				=> $rs->comment_author,
-				'author_url'			=> $rs->comment_site,
-				'author_email'			=> $rs->comment_email,
-				'author_ip'			=> $rs->comment_ip
-			);
-		}
-		return $res;
-	}
-	
-	private function addComment($user,$pwd,$post_id,$struct)
-	{
-		$this->setUser($user,$pwd);
-		$this->setBlog();
-		
-		if (empty($struct['content'])) {
-			throw new Exception('Sorry, you cannot post an empty comment',401);
-		}
-		
-		if (is_numeric($post_id)) {
-			$p['post_id'] = $post_id;
-		} else {
-			$p['post_url'] = $post_id;
-		}
-		$rs = $this->core->blog->getPosts($p);
-		if ($rs->isEmpty()) {
-			throw new Exception('Sorry, no such post.',404);
-		}
-		
-		$cur = $this->core->con->openCursor($this->core->prefix.'comment');
-		
-		$cur->comment_author = $this->core->auth->getInfo('user_cn');
-		$cur->comment_email = $this->core->auth->getInfo('user_email');
-		$cur->comment_site = $this->core->auth->getInfo('user_url');
-		
-		$cur->comment_content = $struct['content'];
-		$cur->post_id = (integer) $post_id;
-		
-		$id = $this->core->blog->addComment($cur);
-		return $id;
-	}
-	
-	private function updComment($user,$pwd,$comment_id,$struct)
-	{
-		$this->setUser($user,$pwd);
-		$this->setBlog();
-		
-		$cur = $this->core->con->openCursor($this->core->prefix.'comment');
-		
-		if (isset($struct['status'])) {
-			$cur->comment_status = $this->translateWpCommentstatus($struct['status']);
-		}
-		
-		if (isset($struct['date_created_gmt'])) {
-			if ($struct['date_created_gmt'] instanceof xmlrpcDate) {
-				$cur->comment_dt = date('Y-m-d H:i:00',$struct['date_created_gmt']->getTimestamp());
-			} elseif (is_string($struct['date_created_gmt']) && @strtotime($struct['date_created_gmt'])) {
-				$cur->comment_dt = date('Y-m-d H:i:00',strtotime($struct['date_created_gmt']));
-			}
-			$cur->comment_dt = $struct['date_created_gmt'];
-		}
-		
-		if (isset($struct['content'])) {
-			$cur->comment_content = $struct['content'];
-		}
-		
-		if (isset($struct['author'])) {
-			$cur->comment_author = $struct['author'];
-		}
-		
-		if (isset($struct['author_url'])) {
-			$cur->comment_site = $struct['author_url'];
-		}
-		
-		if (isset($struct['author_email'])) {
-			$cur->comment_email = $struct['author_email'];
-		}
-		
-		$this->core->blog->updComment($comment_id,$cur);
-		return true;
-	}
-	
-	private function delComment($user,$pwd,$comment_id)
-	{
-		$this->setUser($user,$pwd);
-		$this->setBlog();
-		
-		$this->core->blog->delComment($comment_id);
-		return true;
 	}
 	
@@ -1582,51 +1373,4 @@
 	}
 	
-	public function wp_getComment($blogid,$username,$password,$commentid)
-	{
-		$res = $this->getComments($username,$password,array(),$commentid);
-		
-		if (empty($res)) {
-			throw new Exception('Sorry, no such comment',404);
-		}
-		
-		return $res[0];
-	}
-	
-	public function wp_getCommentCount($blogid,$username,$password,$postid)
-	{
-		return $this->countComments($username,$password,$postid);
-	}
-	
-	public function wp_getComments($blogid,$username,$password,$struct)
-	{
-		return $this->getComments($username,$password,$struct);
-	}
-	
-	public function wp_deleteComment($blogid,$username,$password,$commentid)
-	{
-		return $this->delComment($username,$password,$commentid);
-	}
-	
-	public function wp_editComment($blogid,$username,$password,$commentid,$content)
-	{
-		return $this->updComment($username,$password,$commentid,$content);
-	}
-	
-	public function wp_newComment($blogid,$username,$password,$postid,$content)
-	{
-		return $this->addComment($username,$password,$postid,$content);
-	}
-	
-	public function wp_getCommentStatusList($blogid,$username,$password)
-	{
-		$this->setUser($username,$password);
-		$this->setBlog();
-		
-		return array(
-			'hold' => 'Unapproved',
-			'approve' => 'Approved',
-			'spam' => 'Spam'
-		);
-	}
 }
 ?>
Index: inc/dbschema/db-schema.php
===================================================================
--- inc/dbschema/db-schema.php	(revision 407)
+++ inc/dbschema/db-schema.php	(revision 848)
@@ -123,9 +123,4 @@
 	->post_selected		('smallint',	0,	false,	0)
 	->post_position		('integer',	0,	false,	0)
-	->post_open_comment		('smallint',	0,	false,	0)
-	->post_open_tb			('smallint',	0,	false,	0)
-	->nb_comment			('integer',	0,	false,	0)
-	->nb_trackback			('integer',	0,	false,	0)
-	
 	->primary('pk_post','post_id')
 	
@@ -174,32 +169,4 @@
 	
 	->primary('pk_version','module')
-	;
-
-$_s->ping
-	->post_id		('bigint',	0,	false)
-	->ping_url	('varchar',	255,	false)
-	->ping_dt		('timestamp',	0,	false,	'now()')
-	
-	->primary('pk_ping','post_id','ping_url')
-	;
-
-$_s->comment
-	->comment_id			('bigint',	0,	false)
-	->post_id				('bigint',	0,	false)
-	->comment_dt			('timestamp',	0,	false,	'now()')
-	->comment_tz			('varchar',	128,	false,	"'UTC'")
-	->comment_upddt		('timestamp',	0,	false,	'now()')
-	->comment_author		('varchar',	255,	true,	null)
-	->comment_email		('varchar',	255,	true,	null)
-	->comment_site			('varchar',	255,	true,	null)
-	->comment_content		('text',		0,	true)
-	->comment_words		('text',		0,	true,	null)
-	->comment_ip			('varchar',	39,	true,	null)
-	->comment_status		('smallint',	0,	true,	0)
-	->comment_spam_status	('varchar',	128,	true,	0)
-	->comment_spam_filter	('varchar',	32,	true,	null)
-	->comment_trackback		('smallint',	0,	false,	0)
-	
-	->primary('pk_comment','comment_id')
 	;
 
@@ -238,5 +205,4 @@
 $_s->post_media->index	('idx_post_media_media_id',		'btree',	'media_id');
 $_s->log->index		('idx_log_user_id',				'btree',	'user_id');
-$_s->comment->index		('idx_comment_post_id',			'btree',	'post_id');
 $_s->meta->index		('idx_meta_post_id',	'btree','post_id');
 $_s->meta->index		('idx_meta_meta_type',	'btree','meta_type');
@@ -245,5 +211,4 @@
 /* Performance indexes
 -------------------------------------------------------- */
-$_s->comment->index		('idx_comment_post_id_dt_status',	'btree',	'post_id', 'comment_dt', 'comment_status');
 $_s->post->index		('idx_post_post_dt',			'btree',	'post_dt');
 $_s->post->index		('idx_post_post_dt_post_id',		'btree',	'post_dt','post_id');
@@ -266,6 +231,4 @@
 $_s->post_media->reference('fk_media','media_id','media','media_id','cascade','cascade');
 $_s->post_media->reference('fk_media_post','post_id','post','post_id','cascade','cascade');
-$_s->ping->reference('fk_ping_post','post_id','post','post_id','cascade','cascade');
-$_s->comment->reference('fk_comment_post','post_id','post','post_id','cascade','cascade');
 $_s->log->reference('fk_log_blog','blog_id','blog','blog_id','cascade','set null');
 $_s->meta->reference('fk_meta_post','post_id','post','post_id','cascade','cascade');
Index: inc/dbschema/upgrade.php
===================================================================
--- inc/dbschema/upgrade.php	(revision 706)
+++ inc/dbschema/upgrade.php	(revision 848)
@@ -154,7 +154,4 @@
 				$init_fav['posts'] = array('posts','Entries','posts.php',
 					'images/menu/entries.png','images/menu/entries-b.png',
-					'usage,contentadmin',null,null);
-				$init_fav['comments'] = array('comments','Comments','comments.php',
-					'images/menu/comments.png','images/menu/comments-b.png',
 					'usage,contentadmin',null,null);
 				$init_fav['prefs'] = array('prefs','My preferences','preferences.php',
Index: inc/prepend.php
===================================================================
--- inc/prepend.php	(revision 826)
+++ inc/prepend.php	(revision 848)
@@ -39,5 +39,4 @@
 $__autoload['dcNamespace']			= dirname(__FILE__).'/core/class.dc.namespace.php';
 $__autoload['dcSettings']			= dirname(__FILE__).'/core/class.dc.settings.php';
-$__autoload['dcTrackback']			= dirname(__FILE__).'/core/class.dc.trackback.php';
 $__autoload['dcUpdate']				= dirname(__FILE__).'/core/class.dc.update.php';
 $__autoload['dcUtils']				= dirname(__FILE__).'/core/class.dc.utils.php';
@@ -48,5 +47,4 @@
 
 $__autoload['rsExtPost']				= dirname(__FILE__).'/core/class.dc.rs.extensions.php';
-$__autoload['rsExtComment']			= dirname(__FILE__).'/core/class.dc.rs.extensions.php';
 $__autoload['rsExtDates']			= dirname(__FILE__).'/core/class.dc.rs.extensions.php';
 $__autoload['rsExtUser']				= dirname(__FILE__).'/core/class.dc.rs.extensions.php';
@@ -57,5 +55,4 @@
 $__autoload['adminPostList']			= dirname(__FILE__).'/admin/lib.pager.php';
 $__autoload['adminPostMiniList']		= dirname(__FILE__).'/admin/lib.pager.php';
-$__autoload['adminCommentList']		= dirname(__FILE__).'/admin/lib.pager.php';
 $__autoload['adminUserList']			= dirname(__FILE__).'/admin/lib.pager.php';
 
@@ -123,5 +120,5 @@
 # Constants
 define('DC_ROOT',path::real(dirname(__FILE__).'/..'));
-define('DC_VERSION','2.4.3');
+define('DC_VERSION','2.5-dev');
 define('DC_DIGESTS',dirname(__FILE__).'/digests');
 define('DC_L10N_ROOT',dirname(__FILE__).'/../locales');
@@ -209,5 +206,4 @@
 
 $core->url->register('feed','feed','^feed/(.+)$',array('dcUrlHandlers','feed'));
-$core->url->register('trackback','trackback','^trackback/(.+)$',array('dcUrlHandlers','trackback'));
 $core->url->register('rsd','rsd','^rsd$',array('dcUrlHandlers','rsd'));
 $core->url->register('xmlrpc','xmlrpc','^xmlrpc/(.+)$',array('dcUrlHandlers','xmlrpc'));
Index: inc/public/class.dc.template.php
===================================================================
--- inc/public/class.dc.template.php	(revision 833)
+++ inc/public/class.dc.template.php	(revision 848)
@@ -32,9 +32,4 @@
 		$this->core =& $core;
 		
-		# Transitional tags
-		$this->addValue('EntryTrackbackCount',array($this,'EntryPingCount'));
-		$this->addValue('EntryTrackbackData',array($this,'EntryPingData'));
-		$this->addValue('EntryTrackbackLink',array($this,'EntryPingLink'));
-		
 		# l10n
 		$this->addValue('lang',array($this,'l10n'));
@@ -85,38 +80,4 @@
 		$this->addValue('CategoryDescription',array($this,'CategoryDescription'));
 		$this->addValue('CategoryTitle',array($this,'CategoryTitle'));
-		
-		# Comments
-		$this->addBlock('Comments',array($this,'Comments'));
-		$this->addValue('CommentAuthor',array($this,'CommentAuthor'));
-		$this->addValue('CommentAuthorDomain',array($this,'CommentAuthorDomain'));
-		$this->addValue('CommentAuthorLink',array($this,'CommentAuthorLink'));
-		$this->addValue('CommentAuthorMailMD5',array($this,'CommentAuthorMailMD5'));
-		$this->addValue('CommentAuthorURL',array($this,'CommentAuthorURL'));
-		$this->addValue('CommentContent',array($this,'CommentContent'));
-		$this->addValue('CommentDate',array($this,'CommentDate'));
-		$this->addValue('CommentTime',array($this,'CommentTime'));
-		$this->addValue('CommentEmail',array($this,'CommentEmail'));
-		$this->addValue('CommentEntryTitle',array($this,'CommentEntryTitle'));
-		$this->addValue('CommentFeedID',array($this,'CommentFeedID'));
-		$this->addValue('CommentID',array($this,'CommentID'));
-		$this->addBlock('CommentIf',array($this,'CommentIf'));
-		$this->addValue('CommentIfFirst',array($this,'CommentIfFirst'));
-		$this->addValue('CommentIfMe',array($this,'CommentIfMe'));
-		$this->addValue('CommentIfOdd',array($this,'CommentIfOdd'));
-		$this->addValue('CommentIP',array($this,'CommentIP'));
-		$this->addValue('CommentOrderNumber',array($this,'CommentOrderNumber'));
-		$this->addBlock('CommentsFooter',array($this,'CommentsFooter'));
-		$this->addBlock('CommentsHeader',array($this,'CommentsHeader'));
-		$this->addValue('CommentPostURL',array($this,'CommentPostURL'));
-		$this->addBlock('IfCommentAuthorEmail',array($this,'IfCommentAuthorEmail'));
-		$this->addValue('CommentHelp',array($this,'CommentHelp'));
-		
-		# Comment preview
-		$this->addBlock('IfCommentPreview',array($this,'IfCommentPreview'));
-		$this->addValue('CommentPreviewName',array($this,'CommentPreviewName'));
-		$this->addValue('CommentPreviewEmail',array($this,'CommentPreviewEmail'));
-		$this->addValue('CommentPreviewSite',array($this,'CommentPreviewSite'));
-		$this->addValue('CommentPreviewContent',array($this,'CommentPreviewContent'));
-		$this->addValue('CommentPreviewCheckRemember',array($this,'CommentPreviewCheckRemember'));
 		
 		# Entries
@@ -139,5 +100,4 @@
 		$this->addValue('EntryCategoryURL',array($this,'EntryCategoryURL'));
 		$this->addValue('EntryCategoryShortURL',array($this,'EntryCategoryShortURL'));
-		$this->addValue('EntryCommentCount',array($this,'EntryCommentCount'));
 		$this->addValue('EntryContent',array($this,'EntryContent'));
 		$this->addValue('EntryDate',array($this,'EntryDate'));
@@ -151,7 +111,4 @@
 		$this->addValue('EntryLang',array($this,'EntryLang'));
 		$this->addBlock('EntryNext',array($this,'EntryNext'));
-		$this->addValue('EntryPingCount',array($this,'EntryPingCount'));
-		$this->addValue('EntryPingData',array($this,'EntryPingData'));
-		$this->addValue('EntryPingLink',array($this,'EntryPingLink'));
 		$this->addBlock('EntryPrevious',array($this,'EntryPrevious'));
 		$this->addValue('EntryTitle',array($this,'EntryTitle'));
@@ -174,29 +131,7 @@
 		$this->addValue('PaginationURL',array($this,'PaginationURL'));
 		
-		# Trackbacks
-		$this->addValue('PingBlogName',array($this,'PingBlogName'));
-		$this->addValue('PingContent',array($this,'PingContent'));
-		$this->addValue('PingDate',array($this,'PingDate'));
-		$this->addValue('PingEntryTitle',array($this,'PingEntryTitle'));
-		$this->addValue('PingFeedID',array($this,'PingFeedID'));
-		$this->addValue('PingID',array($this,'PingID'));
-		$this->addValue('PingIfFirst',array($this,'PingIfFirst'));
-		$this->addValue('PingIfOdd',array($this,'PingIfOdd'));
-		$this->addValue('PingIP',array($this,'PingIP'));
-		$this->addValue('PingNoFollow',array($this,'PingNoFollow'));
-		$this->addValue('PingOrderNumber',array($this,'PingOrderNumber'));
-		$this->addValue('PingPostURL',array($this,'PingPostURL'));
-		$this->addBlock('Pings',array($this,'Pings'));
-		$this->addBlock('PingsFooter',array($this,'PingsFooter'));
-		$this->addBlock('PingsHeader',array($this,'PingsHeader'));
-		$this->addValue('PingTime',array($this,'PingTime'));
-		$this->addValue('PingTitle',array($this,'PingTitle'));
-		$this->addValue('PingAuthorURL',array($this,'PingAuthorURL'));
-		
 		# System
 		$this->addValue('SysBehavior',array($this,'SysBehavior'));
 		$this->addBlock('SysIf',array($this,'SysIf'));
-		$this->addBlock('SysIfCommentPublished',array($this,'SysIfCommentPublished'));
-		$this->addBlock('SysIfCommentPending',array($this,'SysIfCommentPending'));
 		$this->addBlock('SysIfFormError',array($this,'SysIfFormError'));
 		$this->addValue('SysFeedSubtitle',array($this,'SysFeedSubtitle'));
@@ -430,11 +365,4 @@
 				'date' => 'post_dt',
 				'id' => 'post_id',
-				'comment' => 'nb_comment',
-				'trackback' => 'nb_trackback'
-			),
-			'comment' => array(
-				'author' => 'comment_author',
-				'date' => 'comment_dt',
-				'id' => 'comment_id'
 			)
 		);
@@ -1265,8 +1193,4 @@
 	has_category	(0|1)	#IMPLIED	-- post has a category (value : 1) or not (value : 0)
 	has_attachment	(0|1)	#IMPLIED	-- post has attachments (value : 1) or not (value : 0) (see Attachment plugin for code)
-	comments_active	(0|1)	#IMPLIED	-- comments are active for this post (value : 1) or not (value : 0)
-	pings_active	(0|1)	#IMPLIED	-- trackbacks are active for this post (value : 1) or not (value : 0)
-	show_comments	(0|1)	#IMPLIED	-- there are comments for this post (value : 1) or not (value : 0)
-	show_pings	(0|1)	#IMPLIED	-- there are trackbacks for this post (value : 1) or not (value : 0)
 	operator	(and|or)	#IMPLIED	-- combination of conditions, if more than 1 specifiec (default: and)
 	url		CDATA	#IMPLIED	-- post has given url
@@ -1332,47 +1256,14 @@
 		}
 		
-		if (isset($attr['comments_active'])) {
-			$sign = (boolean) $attr['comments_active'] ? '' : '!';
-			$if[] = $sign.'$_ctx->posts->commentsActive()';
-		}
-		
-		if (isset($attr['pings_active'])) {
-			$sign = (boolean) $attr['pings_active'] ? '' : '!';
-			$if[] = $sign.'$_ctx->posts->trackbacksActive()';
-		}
-		
-		if (isset($attr['has_comment'])) {
-			$sign = (boolean) $attr['has_comment'] ? '' : '!';
-			$if[] = $sign.'$_ctx->posts->hasComments()';
-		}
-		
-		if (isset($attr['has_ping'])) {
-			$sign = (boolean) $attr['has_ping'] ? '' : '!';
-			$if[] = $sign.'$_ctx->posts->hasTrackbacks()';
-		}
-		
-		if (isset($attr['show_comments'])) {
-			if ((boolean) $attr['show_comments']) {
-				$if[] = '($_ctx->posts->hasComments() || $_ctx->posts->commentsActive())';
-			} else {
-				$if[] = '(!$_ctx->posts->hasComments() && !$_ctx->posts->commentsActive())';
-			}
-		}
-		
-		if (isset($attr['show_pings'])) {
-			if ((boolean) $attr['show_pings']) {
-				$if[] = '($_ctx->posts->hasTrackbacks() || $_ctx->posts->trackbacksActive())';
-			} else {
-				$if[] = '(!$_ctx->posts->hasTrackbacks() && !$_ctx->posts->trackbacksActive())';
-			}
-		}
-		
 		$this->core->callBehavior('tplIfConditions','EntryIf',$attr,$content,$if);
 		
 		if (count($if) != 0) {
 			return '<?php if('.implode(' '.$operator.' ', (array) $if).') : ?>'.$content.'<?php endif; ?>';
-		} else {
+		} /*
+		else {
+			// Nothing in if statement => do not display content...
 			return $content;
 		}
+		*/
 	}
 	
@@ -1776,95 +1667,4 @@
 	}
 	
-	/*dtd
-	<!ELEMENT tpl:EntryCommentCount - O -- Number of comments for entry -->
-	<!ATTLIST tpl:EntryCommentCount
-	none		CDATA	#IMPLIED	-- text to display for "no comment" (default: no comment)
-	one		CDATA	#IMPLIED	-- text to display for "one comment" (default: one comment)
-	more		CDATA	#IMPLIED	-- text to display for "more comments" (default: %s comments, %s is replaced by the number of comment)
-	count_all	CDATA	#IMPLIED	-- count comments and trackbacks
-	>
-	*/
-	public function EntryCommentCount($attr)
-	{
-		$none = 'no comment';
-		$one = 'one comment';
-		$more = '%d comments';
-		
-		if (isset($attr['none'])) {
-			$none = addslashes($attr['none']);
-		}
-		if (isset($attr['one'])) {
-			$one = addslashes($attr['one']);
-		}
-		if (isset($attr['more'])) {
-			$more = addslashes($attr['more']);
-		}
-		
-		if (empty($attr['count_all'])) {
-			$operation = '$_ctx->posts->nb_comment';
-		} else {
-			$operation = '($_ctx->posts->nb_comment + $_ctx->posts->nb_trackback)';
-		}
-		
-		return
-		"<?php if (".$operation." == 0) {\n".
-		"  printf(__('".$none."'),".$operation.");\n".
-		"} elseif (".$operation." == 1) {\n".
-		"  printf(__('".$one."'),".$operation.");\n".
-		"} else {\n".
-		"  printf(__('".$more."'),".$operation.");\n".
-		"} ?>";
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:EntryPingCount - O -- Number of trackbacks for entry -->
-	<!ATTLIST tpl:EntryPingCount
-	none	CDATA	#IMPLIED	-- text to display for "no ping" (default: no ping)
-	one	CDATA	#IMPLIED	-- text to display for "one ping" (default: one ping)
-	more	CDATA	#IMPLIED	-- text to display for "more pings" (default: %s trackbacks, %s is replaced by the number of pings)
-	>
-	*/
-	public function EntryPingCount($attr)
-	{
-		$none = 'no trackback';
-		$one = 'one trackback';
-		$more = '%d trackbacks';
-		
-		if (isset($attr['none'])) {
-			$none = addslashes($attr['none']);
-		}
-		if (isset($attr['one'])) {
-			$one = addslashes($attr['one']);
-		}
-		if (isset($attr['more'])) {
-			$more = addslashes($attr['more']);
-		}
-		
-		return
-		"<?php if (\$_ctx->posts->nb_trackback == 0) {\n".
-		"  printf(__('".$none."'),(integer) \$_ctx->posts->nb_trackback);\n".
-		"} elseif (\$_ctx->posts->nb_trackback == 1) {\n".
-		"  printf(__('".$one."'),(integer) \$_ctx->posts->nb_trackback);\n".
-		"} else {\n".
-		"  printf(__('".$more."'),(integer) \$_ctx->posts->nb_trackback);\n".
-		"} ?>";
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:EntryPingData - O -- Display trackback RDF information -->
-	*/
-	public function EntryPingData($attr)
-	{
-		return "<?php if (\$_ctx->posts->trackbacksActive()) { echo \$_ctx->posts->getTrackbackData(); } ?>\n";
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:EntryPingLink - O -- Entry trackback link -->
-	*/
-	public function EntryPingLink($attr)
-	{
-		return "<?php if (\$_ctx->posts->trackbacksActive()) { echo \$_ctx->posts->getTrackbackLink(); } ?>\n";
-	}
-	
 	/* Languages -------------------------------------- */
 	/*dtd
@@ -2052,723 +1852,4 @@
 		$f = $this->getFilters($attr);
 		return '<?php echo '.sprintf($f,"context::PaginationURL(".$offset.")").'; ?>';
-	}
-	
-	/* Comments --------------------------------------- */
-	/*dtd
-	<!ELEMENT tpl:Comments - - -- Comments container -->
-	<!ATTLIST tpl:Comments
-	with_pings	(0|1)	#IMPLIED	-- include trackbacks in request
-	lastn	CDATA	#IMPLIED	-- restrict the number of entries 
-	no_context (1|0)		#IMPLIED  -- Override context information
-	sortby	(title|selected|author|date|id)	#IMPLIED	-- specify comments sort criteria (default : date) (multiple comma-separated sortby can be specified. Use "?asc" or "?desc" as suffix to provide an order for each sorby)
-	order	(desc|asc)	#IMPLIED	-- result ordering (default: asc)
-	age		CDATA	#IMPLIED	-- retrieve comments by maximum age (ex: -2 days, last month, last week)
-	>
-	*/
-	public function Comments($attr,$content)
-	{
-		$p = "";
-		if (empty($attr['with_pings'])) {
-			$p .= "\$params['comment_trackback'] = false;\n";
-		}
-		
-		$lastn = 0;
-		if (isset($attr['lastn'])) {
-			$lastn = abs((integer) $attr['lastn'])+0;
-		}
-		
-		if ($lastn > 0) {
-			$p .= "\$params['limit'] = ".$lastn.";\n";
-		} else {
-			$p .= "if (\$_ctx->nb_comment_per_page !== null) { \$params['limit'] = \$_ctx->nb_comment_per_page; }\n";
-		}
-		
-		if (empty($attr['no_context']))
-		{
-			$p .=
-			"if (\$_ctx->posts !== null) { ".
-				"\$params['post_id'] = \$_ctx->posts->post_id; ".
-				"\$core->blog->withoutPassword(false);\n".
-			"}\n";
-			$p .=
-			'if ($_ctx->exists("categories")) { '.
-				"\$params['cat_id'] = \$_ctx->categories->cat_id; ".
-			"}\n";
-			
-			$p .=
-			'if ($_ctx->exists("langs")) { '.
-				"\$params['sql'] = \"AND P.post_lang = '\".\$core->blog->con->escape(\$_ctx->langs->post_lang).\"' \"; ".
-			"}\n";
-		}
-		
-		if (!isset($attr['order'])) {
-			$attr['order'] = 'asc';
-		}
-		
-		$p .= "\$params['order'] = '".$this->getSortByStr($attr,'comment')."';\n";
-		
-		if (isset($attr['no_content']) && $attr['no_content']) {
-			$p .= "\$params['no_content'] = true;\n";
-		}
-		
-		if (isset($attr['age'])) {
-			$age = $this->getAge($attr);
-			$p .= !empty($age) ? "@\$params['sql'] .= ' AND P.post_dt > \'".$age."\'';\n" : '';
-		}
-		
-		$res = "<?php\n";
-		$res .= $this->core->callBehavior("templatePrepareParams", 
-			array("tag" => "Comments","method" => "blog::getComments"), 
-			$attr,$content);
-		$res .= $p;
-		$res .= '$_ctx->comments = $core->blog->getComments($params); unset($params);'."\n";
-		$res .= "if (\$_ctx->posts !== null) { \$core->blog->withoutPassword(true);}\n";
-		
-		if (!empty($attr['with_pings'])) {
-			$res .= '$_ctx->pings = $_ctx->comments;'."\n";
-		}
-		
-		$res .= "?>\n";
-		
-		$res .=
-		'<?php while ($_ctx->comments->fetch()) : ?>'.$content.'<?php endwhile; $_ctx->comments = null; ?>';
-		
-		return $res;
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentAuthor - O -- Comment author -->
-	*/
-	public function CommentAuthor($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,"\$_ctx->comments->comment_author").'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentAuthorDomain - O -- Comment author website domain -->
-	*/
-	public function CommentAuthorDomain($attr)
-	{
-		return '<?php echo preg_replace("#^http(?:s?)://(.+?)/.*$#msu",\'$1\',$_ctx->comments->comment_site); ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentAuthorLink - O -- Comment author link -->
-	*/
-	public function CommentAuthorLink($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->comments->getAuthorLink()').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentAuthorMailMD5 - O -- Comment author email MD5 sum -->
-	*/
-	public function CommentAuthorMailMD5($attr)
-	{
-		return '<?php echo md5($_ctx->comments->comment_email) ; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentAuthorURL - O -- Comment author URL -->
-	*/
-	public function CommentAuthorURL($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->comments->getAuthorURL()').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentContent - O --  Comment content -->
-	<!ATTLIST tpl:CommentContent
-	absolute_urls	(0|1)	#IMPLIED	-- convert URLS to absolute urls
-	>
-	*/
-	public function CommentContent($attr)
-	{
-		$urls = '0';
-		if (!empty($attr['absolute_urls'])) {
-			$urls = '1';
-		}
-		
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->comments->getContent('.$urls.')').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentDate - O -- Comment date -->
-	<!ATTLIST tpl:CommentDate
-	format	CDATA	#IMPLIED	-- date format (encoded in dc:str by default if iso8601 or rfc822 not specified)
-	iso8601	CDATA	#IMPLIED	-- if set, tells that date format is ISO 8601
-	rfc822	CDATA	#IMPLIED	-- if set, tells that date format is RFC 822
-	upddt	CDATA	#IMPLIED	-- if set, uses the comment update time
-	>
-	*/
-	public function CommentDate($attr)
-	{
-		$format = '';
-		if (!empty($attr['format'])) {
-			$format = addslashes($attr['format']);
-		}
-		
-		$iso8601 = !empty($attr['iso8601']);
-		$rfc822 = !empty($attr['rfc822']);
-		$type = (!empty($attr['upddt']) ? 'upddt' : '');
-		
-		$f = $this->getFilters($attr);
-		
-		if ($rfc822) {
-			return '<?php echo '.sprintf($f,"\$_ctx->comments->getRFC822Date('".$type."')").'; ?>';
-		} elseif ($iso8601) {
-			return '<?php echo '.sprintf($f,"\$_ctx->comments->getISO8601Date('".$type."')").'; ?>';
-		} else {
-			return '<?php echo '.sprintf($f,"\$_ctx->comments->getDate('".$format."','".$type."')").'; ?>';
-		}
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentTime - O -- Comment date -->
-	<!ATTLIST tpl:CommentTime
-	format	CDATA	#IMPLIED	-- time format 
-	upddt	CDATA	#IMPLIED	-- if set, uses the comment update time
-	>
-	*/
-	public function CommentTime($attr)
-	{
-		$format = '';
-		if (!empty($attr['format'])) {
-			$format = addslashes($attr['format']);
-		}
-		$type = (!empty($attr['upddt']) ? 'upddt' : '');
-        
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,"\$_ctx->comments->getTime('".$format."','".$type."')").'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentEmail - O -- Comment author email -->
-	<!ATTLIST tpl:CommentEmail
-	spam_protected	(0|1)	#IMPLIED	-- protect email from spam (default: 1)
-	>
-	*/
-	public function CommentEmail($attr)
-	{
-		$p = 'true';
-		if (isset($attr['spam_protected']) && !$attr['spam_protected']) {
-			$p = 'false';
-		}
-		
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,"\$_ctx->comments->getEmail(".$p.")").'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentEntryTitle - O -- Title of the comment entry -->
-	*/
-	public function CommentEntryTitle($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->comments->post_title').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentFeedID - O -- Comment feed ID -->
-	*/
-	public function CommentFeedID($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->comments->getFeedID()').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentID - O -- Comment ID -->
-	*/
-	public function CommentID($attr)
-	{
-		return '<?php echo $_ctx->comments->comment_id; ?>';
-	}
-    
-	/*dtd
-	<!ELEMENT tpl:CommentIf - - -- test container for comments -->
-	<!ATTLIST tpl:CommentIf
-	is_ping	(0|1)	#IMPLIED	-- test if comment is a trackback (value : 1) or not (value : 0)
-	>
-	*/
-	public function CommentIf($attr,$content)
-	{
-		$if = array();
-		$is_ping = null;
-		
-		if (isset($attr['is_ping'])) {
-			$sign = (boolean) $attr['is_ping'] ? '' : '!';
-			$if[] = $sign.'$_ctx->comments->comment_trackback';
-		}
-		
-		$this->core->callBehavior('tplIfConditions','CommentIf',$attr,$content,$if);
-		
-		if (count($if) != 0) {
-			return '<?php if('.implode(' && ', (array) $if).') : ?>'.$content.'<?php endif; ?>';
-		} else {
-			return $content;
-		}
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentIfFirst - O -- displays value if comment is the first one -->
-	<!ATTLIST tpl:CommentIfFirst
-	return	CDATA	#IMPLIED	-- value to display in case of success (default: first)
-	>
-	*/
-	public function CommentIfFirst($attr)
-	{
-		$ret = isset($attr['return']) ? $attr['return'] : 'first';
-		$ret = html::escapeHTML($ret);
-		
-		return
-		'<?php if ($_ctx->comments->index() == 0) { '.
-		"echo '".addslashes($ret)."'; } ?>";
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentIfMe - O -- displays value if comment is the from the entry author -->
-	<!ATTLIST tpl:CommentIfMe
-	return	CDATA	#IMPLIED	-- value to display in case of success (default: me)
-	>
-	*/
-	public function CommentIfMe($attr)
-	{
-		$ret = isset($attr['return']) ? $attr['return'] : 'me';
-		$ret = html::escapeHTML($ret);
-		
-		return
-		'<?php if ($_ctx->comments->isMe()) { '.
-		"echo '".addslashes($ret)."'; } ?>";
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentIfOdd - O -- displays value if comment is  at an odd position -->
-	<!ATTLIST tpl:CommentIfOdd
-	return	CDATA	#IMPLIED	-- value to display in case of success (default: odd)
-	>
-	*/
-	public function CommentIfOdd($attr)
-	{
-		$ret = isset($attr['return']) ? $attr['return'] : 'odd';
-		$ret = html::escapeHTML($ret);
-		
-		return
-		'<?php if (($_ctx->comments->index()+1)%2) { '.
-		"echo '".addslashes($ret)."'; } ?>";
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentIP - O -- Comment author IP -->
-	*/
-	public function CommentIP($attr)
-	{
-		return '<?php echo $_ctx->comments->comment_ip; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentOrderNumber - O -- Comment order in page -->
-	*/
-	public function CommentOrderNumber($attr)
-	{
-		return '<?php echo $_ctx->comments->index()+1; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentsFooter - - -- Last comments result container -->
-	*/
-	public function CommentsFooter($attr,$content)
-	{
-		return
-		"<?php if (\$_ctx->comments->isEnd()) : ?>".
-		$content.
-		"<?php endif; ?>";
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentsHeader - - -- First comments result container -->
-	*/
-	public function CommentsHeader($attr,$content)
-	{
-		return
-		"<?php if (\$_ctx->comments->isStart()) : ?>".
-		$content.
-		"<?php endif; ?>";
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentPostURL - O -- Comment Entry URL -->
-	*/
-	public function CommentPostURL($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->comments->getPostURL()').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:IfCommentAuthorEmail - - -- Container displayed if comment author email is set -->
-	*/
-	public function IfCommentAuthorEmail($attr,$content)
-	{
-		return
-		"<?php if (\$_ctx->comments->comment_email) : ?>".
-		$content.
-		"<?php endif; ?>";
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentHelp - 0 -- Comment syntax mini help -->
-	*/
-	public function CommentHelp($attr,$content)
-	{
-		return
-		"<?php if (\$core->blog->settings->system->wiki_comments) {\n".
-		"  echo __('Comments can be formatted using a simple wiki syntax.');\n".
-		"} else {\n".
-		"  echo __('HTML code is displayed as text and web addresses are automatically converted.');\n".
-		"} ?>";
-	}
-	
-	/* Comment preview -------------------------------- */
-	/*dtd
-	<!ELEMENT tpl:IfCommentPreview - - -- Container displayed if comment is being previewed -->
-	*/
-	public function IfCommentPreview($attr,$content)
-	{
-		return
-		'<?php if ($_ctx->comment_preview !== null && $_ctx->comment_preview["preview"]) : ?>'.
-		$content.
-		'<?php endif; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentPreviewName - O -- Author name for the previewed comment -->
-	*/
-	public function CommentPreviewName($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->comment_preview["name"]').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentPreviewEmail - O -- Author email for the previewed comment -->
-	*/
-	public function CommentPreviewEmail($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->comment_preview["mail"]').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentPreviewSite - O -- Author site for the previewed comment -->
-	*/
-	public function CommentPreviewSite($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->comment_preview["site"]').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentPreviewContent - O -- Content of the previewed comment -->
-	<!ATTLIST tpl:CommentPreviewContent
-	raw	(0|1)	#IMPLIED	-- display comment in raw content
-	>
-	*/
-	public function CommentPreviewContent($attr)
-	{
-		$f = $this->getFilters($attr);
-		
-		if (!empty($attr['raw'])) {
-			$co = '$_ctx->comment_preview["rawcontent"]';
-		} else {
-			$co = '$_ctx->comment_preview["content"]';
-		}
-		
-		return '<?php echo '.sprintf($f,$co).'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:CommentPreviewCheckRemember - O -- checkbox attribute for "remember me" (same value as before preview) -->
-	*/
-	public function CommentPreviewCheckRemember($attr)
-	{
-		return
-		"<?php if (\$_ctx->comment_preview['remember']) { echo ' checked=\"checked\"'; } ?>";
-	}
-	
-	/* Trackbacks ------------------------------------- */
-	/*dtd
-	<!ELEMENT tpl:PingBlogName - O -- Trackback blog name -->
-	*/
-	public function PingBlogName($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->pings->comment_author').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:PingContent - O -- Trackback content -->
-	*/
-	public function PingContent($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->pings->getTrackbackContent()').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:PingDate - O -- Trackback date -->
-	<!ATTLIST tpl:PingDate
-	format	CDATA	#IMPLIED	-- date format (encoded in dc:str by default if iso8601 or rfc822 not specified)
-	iso8601	CDATA	#IMPLIED	-- if set, tells that date format is ISO 8601
-	rfc822	CDATA	#IMPLIED	-- if set, tells that date format is RFC 822
-	upddt	CDATA	#IMPLIED	-- if set, uses the comment update time
-	>
-	*/
-	public function PingDate($attr,$type='')
-	{
-		$format = '';
-		if (!empty($attr['format'])) {
-			$format = addslashes($attr['format']);
-		}
-		
-		$iso8601 = !empty($attr['iso8601']);
-		$rfc822 = !empty($attr['rfc822']);
-		$type = (!empty($attr['upddt']) ? 'upddt' : '');
-		
-		$f = $this->getFilters($attr);
-		
-		if ($rfc822) {
-			return '<?php echo '.sprintf($f,"\$_ctx->pings->getRFC822Date('".$type."')").'; ?>';
-		} elseif ($iso8601) {
-			return '<?php echo '.sprintf($f,"\$_ctx->pings->getISO8601Date('".$type."')").'; ?>';
-		} else {
-			return '<?php echo '.sprintf($f,"\$_ctx->pings->getDate('".$format."','".$type."')").'; ?>';
-		}
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:PingTime - O -- Trackback date -->
-	<!ATTLIST tpl:PingTime
-	format	CDATA	#IMPLIED	-- time format 
-	upddt	CDATA	#IMPLIED	-- if set, uses the comment update time
-	>
-	*/
-	public function PingTime($attr)
-	{
-		$format = '';
-		if (!empty($attr['format'])) {
-			$format = addslashes($attr['format']);
-		}
-		$type = (!empty($attr['upddt']) ? 'upddt' : '');
-		
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,"\$_ctx->pings->getTime('".$format."','".$type."')").'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:PingEntryTitle - O -- Trackback entry title -->
-	*/
-	public function PingEntryTitle($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->pings->post_title').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:PingFeedID - O -- Trackback feed ID -->
-	*/
-	public function PingFeedID($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->pings->getFeedID()').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:PingID - O -- Trackback ID -->
-	*/
-	public function PingID($attr)
-	{
-		return '<?php echo $_ctx->pings->comment_id; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:PingIfFirst - O -- displays value if trackback is the first one -->
-	<!ATTLIST tpl:PingIfFirst
-	return	CDATA	#IMPLIED	-- value to display in case of success (default: first)
-	>
-	*/
-	public function PingIfFirst($attr)
-	{
-		$ret = isset($attr['return']) ? $attr['return'] : 'first';
-		$ret = html::escapeHTML($ret);
-		
-		return
-		'<?php if ($_ctx->pings->index() == 0) { '.
-		"echo '".addslashes($ret)."'; } ?>";
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:PingIfOdd - O -- displays value if trackback is  at an odd position -->
-	<!ATTLIST tpl:PingIfOdd
-	return	CDATA	#IMPLIED	-- value to display in case of success (default: odd)
-	>
-	*/
-	public function PingIfOdd($attr)
-	{
-		$ret = isset($attr['return']) ? $attr['return'] : 'odd';
-		$ret = html::escapeHTML($ret);
-		
-		return
-		'<?php if (($_ctx->pings->index()+1)%2) { '.
-		"echo '".addslashes($ret)."'; } ?>";
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:PingIP - O -- Trackback author IP -->
-	*/
-	public function PingIP($attr)
-	{
-		return '<?php echo $_ctx->pings->comment_ip; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:PingNoFollow - O -- displays 'rel="nofollow"' if set in blog -->
-	*/
-	public function PingNoFollow($attr)
-	{
-		return
-		'<?php if($core->blog->settings->system->comments_nofollow) { '.
-		'echo \' rel="nofollow"\';'.
-		'} ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:PingOrderNumber - O -- Trackback order in page -->
-	*/
-	public function PingOrderNumber($attr)
-	{
-		return '<?php echo $_ctx->pings->index()+1; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:PingPostURL - O -- Trackback Entry URL -->
-	*/
-	public function PingPostURL($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->pings->getPostURL()').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:Pings - - -- Trackbacks container -->
-	<!ATTLIST tpl:Pings
-	with_pings	(0|1)	#IMPLIED	-- include trackbacks in request
-	lastn	CDATA		#IMPLIED	-- restrict the number of entries 
-	no_context (1|0)		#IMPLIED  -- Override context information
-	order	(desc|asc)	#IMPLIED	-- result ordering (default: asc)
-	>
-	*/
-	public function Pings($attr,$content)
-	{
-		$p =
-		"if (\$_ctx->posts !== null) { ".
-			"\$params['post_id'] = \$_ctx->posts->post_id; ".
-			"\$core->blog->withoutPassword(false);\n".
-		"}\n";
-		
-		$p .= "\$params['comment_trackback'] = true;\n";
-		
-		$lastn = 0;
-		if (isset($attr['lastn'])) {
-			$lastn = abs((integer) $attr['lastn'])+0;
-		}
-		
-		if ($lastn > 0) {
-			$p .= "\$params['limit'] = ".$lastn.";\n";
-		} else {
-			$p .= "if (\$_ctx->nb_comment_per_page !== null) { \$params['limit'] = \$_ctx->nb_comment_per_page; }\n";
-		}
-		
-		if (empty($attr['no_context']))
-		{
-			$p .=
-			'if ($_ctx->exists("categories")) { '.
-				"\$params['cat_id'] = \$_ctx->categories->cat_id; ".
-			"}\n";
-			
-			$p .=
-			'if ($_ctx->exists("langs")) { '.
-				"\$params['sql'] = \"AND P.post_lang = '\".\$core->blog->con->escape(\$_ctx->langs->post_lang).\"' \"; ".
-			"}\n";
-		}
-		
-		$order = 'asc';
-		if (isset($attr['order']) && preg_match('/^(desc|asc)$/i',$attr['order'])) {
-			$order = $attr['order'];
-		}
-		
-		$p .= "\$params['order'] = 'comment_dt ".$order."';\n";
-		
-		if (isset($attr['no_content']) && $attr['no_content']) {
-			$p .= "\$params['no_content'] = true;\n";
-		}
-		
-		$res = "<?php\n";
-		$res .= $p;
-		$res .= $this->core->callBehavior("templatePrepareParams", 
-			array("tag" => "Pings","method" => "blog::getComments"), 
-			$attr,$content);
-		$res .= '$_ctx->pings = $core->blog->getComments($params); unset($params);'."\n";
-		$res .= "if (\$_ctx->posts !== null) { \$core->blog->withoutPassword(true);}\n";
-		$res .= "?>\n";
-		
-		$res .=
-		'<?php while ($_ctx->pings->fetch()) : ?>'.$content.'<?php endwhile; $_ctx->pings = null; ?>';
-		
-		return $res;
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:PingsFooter - - -- Last trackbacks result container -->
-	*/
-	public function PingsFooter($attr,$content)
-	{
-		return
-		"<?php if (\$_ctx->pings->isEnd()) : ?>".
-		$content.
-		"<?php endif; ?>";
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:PingsHeader - - -- First trackbacks result container -->
-	*/
-	public function PingsHeader($attr,$content)
-	{
-		return
-		"<?php if (\$_ctx->pings->isStart()) : ?>".
-		$content.
-		"<?php endif; ?>";
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:PingTitle - O -- Trackback title -->
-	*/
-	public function PingTitle($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->pings->getTrackbackTitle()').'; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:PingAuthorURL - O -- Trackback author URL -->
-	*/
-	public function PingAuthorURL($attr)
-	{
-		$f = $this->getFilters($attr);
-		return '<?php echo '.sprintf($f,'$_ctx->pings->getAuthorURL()').'; ?>';
 	}
 	
@@ -2804,7 +1885,4 @@
 	has_tag			CDATA     #IMPLIED  -- tests if a named template tag exists (see Tag plugin for code)
 	blog_id			CDATA     #IMPLIED  -- tests if current blog ID is the one given in parameter
-	comments_active	(0|1)	#IMPLIED	-- test if comments are enabled blog-wide 
-	pings_active		(0|1)	#IMPLIED	-- test if trackbacks are enabled blog-wide 
-	wiki_comments		(0|1)	#IMPLIED	-- test if wiki syntax is enabled for comments
 	operator			(and|or)	#IMPLIED	-- combination of conditions, if more than 1 specifiec (default: and)
 	>
@@ -2867,19 +1945,4 @@
 		}
 		
-		if (isset($attr['comments_active'])) {
-			$sign = (boolean) $attr['comments_active'] ? '' : '!';
-			$if[] = $sign.'$core->blog->settings->system->allow_comments';
-		}
-		
-		if (isset($attr['pings_active'])) {
-			$sign = (boolean) $attr['pings_active'] ? '' : '!';
-			$if[] = $sign.'$core->blog->settings->system->allow_trackbacks';
-		}
-        
-		if (isset($attr['wiki_comments'])) {
-			$sign = (boolean) $attr['wiki_comments'] ? '' : '!';
-			$if[] = $sign.'$core->blog->settings->system->wiki_comments';
-		}
-		
 		if (isset($attr['search_count']) &&
 			preg_match('/^((=|!|&gt;|&lt;)=|(&gt;|&lt;))\s*[0-9]+$/',trim($attr['search_count']))) {
@@ -2894,26 +1957,4 @@
 			return $content;
 		}
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:SysIfCommentPublished - - -- Container displayed if comment has been published -->
-	*/
-	public function SysIfCommentPublished($attr,$content)
-	{
-		return
-		'<?php if (!empty($_GET[\'pub\'])) : ?>'.
-		$content.
-		'<?php endif; ?>';
-	}
-	
-	/*dtd
-	<!ELEMENT tpl:SysIfCommentPending - - -- Container displayed if comment is pending after submission -->
-	*/
-	public function SysIfCommentPending($attr,$content)
-	{
-		return
-		'<?php if (isset($_GET[\'pub\']) && $_GET[\'pub\'] == 0) : ?>'.
-		$content.
-		'<?php endif; ?>';
 	}
 	
Index: inc/public/lib.urlhandlers.php
===================================================================
--- inc/public/lib.urlhandlers.php	(revision 779)
+++ inc/public/lib.urlhandlers.php	(revision 848)
@@ -339,13 +339,4 @@
 
 			$_ctx->posts = $core->blog->getPosts($params);
-			
-			$_ctx->comment_preview = new ArrayObject();
-			$_ctx->comment_preview['content'] = '';
-			$_ctx->comment_preview['rawcontent'] = '';
-			$_ctx->comment_preview['name'] = '';
-			$_ctx->comment_preview['mail'] = '';
-			$_ctx->comment_preview['site'] = '';
-			$_ctx->comment_preview['preview'] = false;
-			$_ctx->comment_preview['remember'] = false;
 			
 			$core->blog->withoutPassword(true);
@@ -385,97 +376,4 @@
 				}
 				
-				$post_comment =
-					isset($_POST['c_name']) && isset($_POST['c_mail']) &&
-					isset($_POST['c_site']) && isset($_POST['c_content']) &&
-					$_ctx->posts->commentsActive();
-				
-				# Posting a comment
-				if ($post_comment)
-				{
-					# Spam trap
-					if (!empty($_POST['f_mail'])) {
-						http::head(412,'Precondition Failed');
-						header('Content-Type: text/plain');
-						echo "So Long, and Thanks For All the Fish";
-						# Exits immediately the application to preserve the server.
-						exit;
-					}
-					
-					$name = $_POST['c_name'];
-					$mail = $_POST['c_mail'];
-					$site = $_POST['c_site'];
-					$content = $_POST['c_content'];
-					$preview = !empty($_POST['preview']);
-					
-					if ($content != '')
-					{
-						if ($core->blog->settings->system->wiki_comments) {
-							$core->initWikiComment();
-						} else {
-							$core->initWikiSimpleComment();
-						}
-						$content = $core->wikiTransform($content);
-						$content = $core->HTMLfilter($content);
-					}
-					
-					$_ctx->comment_preview['content'] = $content;
-					$_ctx->comment_preview['rawcontent'] = $_POST['c_content'];
-					$_ctx->comment_preview['name'] = $name;
-					$_ctx->comment_preview['mail'] = $mail;
-					$_ctx->comment_preview['site'] = $site;
-					
-					if ($preview)
-					{
-						# --BEHAVIOR-- publicBeforeCommentPreview
-						$core->callBehavior('publicBeforeCommentPreview',$_ctx->comment_preview);
-						
-						$_ctx->comment_preview['preview'] = true;
-					}
-					else
-					{
-						# Post the comment
-						$cur = $core->con->openCursor($core->prefix.'comment');
-						$cur->comment_author = $name;
-						$cur->comment_site = html::clean($site);
-						$cur->comment_email = html::clean($mail);
-						$cur->comment_content = $content;
-						$cur->post_id = $_ctx->posts->post_id;
-						$cur->comment_status = $core->blog->settings->system->comments_pub ? 1 : -1;
-						$cur->comment_ip = http::realIP();
-						
-						$redir = $_ctx->posts->getURL();
-						$redir .= $core->blog->settings->system->url_scan == 'query_string' ? '&' : '?';
-						
-						try
-						{
-							if (!text::isEmail($cur->comment_email)) {
-								throw new Exception(__('You must provide a valid email address.'));
-							}
-							
-							# --BEHAVIOR-- publicBeforeCommentCreate
-							$core->callBehavior('publicBeforeCommentCreate',$cur);
-							if ($cur->post_id) {					
-								$comment_id = $core->blog->addComment($cur);
-								
-								# --BEHAVIOR-- publicAfterCommentCreate
-								$core->callBehavior('publicAfterCommentCreate',$cur,$comment_id);
-							}
-							
-							if ($cur->comment_status == 1) {
-								$redir_arg = 'pub=1';
-							} else {
-								$redir_arg = 'pub=0';
-							}
-							
-							header('Location: '.$redir.$redir_arg);
-						}
-						catch (Exception $e)
-						{
-							$_ctx->form_error = $e->getMessage();
-							$_ctx->form_error;
-						}
-					}
-				}
-				
 				# The entry
 				self::serveDocument('post.html');
@@ -513,5 +411,4 @@
 	{
 		$type = null;
-		$comments = false;
 		$cat_url = false;
 		$post_id = null;
@@ -547,16 +444,8 @@
 			return;
 		}
-		elseif (preg_match('#^(atom|rss2)/comments/([0-9]+)$#',$args,$m))
-		{
-			# Post comments feed
-			$type = $m[1];
-			$comments = true;
-			$post_id = (integer) $m[2];
-		}
 		elseif (preg_match('#^(?:category/(.+)/)?(atom|rss2)(/comments)?$#',$args,$m))
 		{
 			# All posts or comments feed
 			$type = $m[2];
-			$comments = !empty($m[3]);
 			if (!empty($m[1])) {
 				$cat_url = $m[1];
@@ -608,11 +497,6 @@
 		
 		$tpl = $type;
-		if ($comments) {
-			$tpl .= '-comments';
-			$_ctx->nb_comment_per_page = $core->blog->settings->system->nb_comment_per_feed;
-		} else {
-			$_ctx->nb_entry_per_page = $core->blog->settings->system->nb_post_per_feed;
-			$_ctx->short_feed_items = $core->blog->settings->system->short_feed_items;
-		}
+		$_ctx->nb_entry_per_page = $core->blog->settings->system->nb_post_per_feed;
+		$_ctx->short_feed_items = $core->blog->settings->system->short_feed_items;
 		$tpl .= '.xml';
 		
@@ -627,15 +511,4 @@
 		if (!$comments && !$cat_url) {
 			$core->blog->publishScheduledEntries();
-		}
-	}
-	
-	public static function trackback($args)
-	{
-		if (!preg_match('/^[0-9]+$/',$args)) {
-			# The specified trackback URL is not an number
-			self::p404();
-		} else {
-			$tb = new dcTrackback($GLOBALS['core']);
-			$tb->receive($args);
 		}
 	}
Index: inc/public/rs.extension.php
===================================================================
--- inc/public/rs.extension.php	(revision 270)
+++ inc/public/rs.extension.php	(revision 848)
@@ -13,5 +13,4 @@
 
 $core->addBehavior('coreBlogGetPosts',array('rsExtendPublic','coreBlogGetPosts'));
-$core->addBehavior('coreBlogGetComments',array('rsExtendPublic','coreBlogGetComments'));
 
 class rsExtendPublic
@@ -22,8 +21,4 @@
 	}
 	
-	public static function coreBlogGetComments($rs)
-	{
-		$rs->extend('rsExtCommentPublic');
-	}
 }
 
@@ -74,20 +69,3 @@
 }
 
-class rsExtCommentPublic extends rsExtComment
-{
-	public static function getContent($rs,$absolute_urls=false)
-	{
-		if ($rs->core->blog->settings->system->use_smilies)
-		{
-			$c = parent::getContent($rs,$absolute_urls);
-			
-			if (!isset($GLOBALS['__smilies'])) {
-				$GLOBALS['__smilies'] = context::getSmilies($rs->core->blog);
-			}
-			return context::addSmilies($c);
-		}
-		
-		return parent::getContent($rs,$absolute_urls);
-	}
-}
 ?>
Index: locales/en/resources.php
===================================================================
--- locales/en/resources.php	(revision 270)
+++ locales/en/resources.php	(revision 848)
@@ -25,5 +25,4 @@
 	'core_blog_pref' => dirname(__FILE__).'/help/blog_pref.html',
 	'core_categories' => dirname(__FILE__).'/help/categories.html',
-	'core_comments' => dirname(__FILE__).'/help/comments.html',
 	'core_media' => dirname(__FILE__).'/help/media.html',
 	'core_post' => dirname(__FILE__).'/help/post.html',
Index: hemes/ductile/locales/es/main.po
===================================================================
--- themes/ductile/locales/es/main.po	(revision 846)
+++ 	(revision )
@@ -1,41 +1,0 @@
-﻿msgid "Additionnal style directives"
-msgstr "Instrucciones CSS adicionales"
-
-msgid "reactions"
-msgstr "reacciones"
-
-msgid "Add ping"
-msgstr "Agregar un retroenlace"
-
-msgid "Suggestions:"
-msgstr "Sugerencias:"
-
-msgid "Go to homepage"
-msgstr "Regresar al inicio"
-
-msgid "Use search form"
-msgstr "Buscar"
-
-msgid "Explore archives"
-msgstr "Explorar los archivos"
-
-msgid "toDay"
-msgstr "al"
-
-msgid "FromDay"
-msgstr "Del"
-
-msgid "From"
-msgstr "Del"
-
-msgid "By category"
-msgstr "Por categoría"
-
-msgid "By date"
-msgstr "Por fecha"
-
-msgid "By tag"
-msgstr "Por tag"
-
-msgid "URL you've tried has typos, or the page has been deleted or moved."
-msgstr "Su URL está equivocada o la página fue borrada o desplazada."
