http://torrentpier.com/threads/Кнопка-Мне-нравится-аля-ВК.1463/page-3#post-26856Проблема была пофиксена. Какую версию использовали? Я просто несколько раз архив обновлял, где все эти проблемы были решены. Попробуйте обновиться, а именно замените файл like.php на тот что в архиве
CREATE TABLE IF NOT EXISTS `bb_attachments_liked` (
`attach_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`user_id` mediumint(9) NOT NULL DEFAULT '0',
`liked` tinyint(1) NOT NULL DEFAULT '0',
`unliked` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`attach_id`,`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
Да, такая проблема есть.Мод ставил из последнего архива.пользователь мог ставить лайки до бесконечного колличества
CREATE TABLE IF NOT EXISTS `bb_like` (
`user_id` mediumint(10) NOT NULL DEFAULT '0',
`post_id` mediumint(11) NOT NULL DEFAULT '0',
`liked` tinyint(1) NOT NULL DEFAULT '0',
`unliked` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`user_id`,`post_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
case 'like':
$row = DB()->fetch_row("SELECT * FROM bb_like WHERE post_id = $post_id");
if($userdata['user_id'] != $row['user_id'])
{
DB()->query("INSERT INTO bb_like(user_id, post_id) VALUES('".$userdata['user_id']."', '".$post_id."')");
$count = DB()->fetch_row("SELECT COUNT(user_id) as likes FROM bb_like WHERE post_id = $post_id");
$this->response['post_id'] = $post_id;
$this->response['count'] = $count['likes'];
}
if($userdata['user_id'] == $row['user_id'])
{
DB()->query("DELETE FROM bb_like WHERE post_id = $post_id AND user_id = {$userdata['user_id']}");
$count = DB()->fetch_row("SELECT COUNT(user_id) as likes FROM bb_like WHERE post_id = $post_id");
$this->response['post_id'] = $post_id;
$this->response['count'] = $count['likes'];
}
break;
case 'like':
if(!DB()->fetch_row("SELECT * FROM bb_like WHERE post_id = $post_id AND user_id = {$userdata['user_id']}"))
{
DB()->query("INSERT INTO bb_like(user_id, post_id) VALUES('".$userdata['user_id']."', '".$post_id."')");
$count = DB()->fetch_row("SELECT COUNT(user_id) as likes FROM bb_like WHERE post_id = $post_id");
$this->response['post_id'] = $post_id;
$this->response['count'] = $count['likes'];
}
else
{
DB()->query("DELETE FROM bb_like WHERE post_id = $post_id AND user_id = {$userdata['user_id']}");
$count = DB()->fetch_row("SELECT COUNT(user_id) as likes FROM bb_like WHERE post_id = $post_id");
$this->response['post_id'] = $post_id;
$this->response['count'] = $count['likes'];
}
break;