|
|
@@ -13,6 +13,8 @@ CREATE TABLE IF NOT EXISTS `bx_albums_albums` (
|
|
|
`views` int(11) NOT NULL default '0',
|
|
|
`rate` float NOT NULL default '0',
|
|
|
`votes` int(11) NOT NULL default '0',
|
|
|
+ `rrate` float NOT NULL default '0',
|
|
|
+ `rvotes` int(11) NOT NULL default '0',
|
|
|
`score` int(11) NOT NULL default '0',
|
|
|
`sc_up` int(11) NOT NULL default '0',
|
|
|
`sc_down` int(11) NOT NULL default '0',
|
|
|
@@ -159,6 +161,26 @@ CREATE TABLE IF NOT EXISTS `bx_albums_votes_media_track` (
|
|
|
KEY `vote` (`object_id`, `author_nip`)
|
|
|
);
|
|
|
|
|
|
+CREATE TABLE IF NOT EXISTS `bx_albums_reactions` (
|
|
|
+ `object_id` int(11) NOT NULL default '0',
|
|
|
+ `reaction` varchar(32) NOT NULL default '',
|
|
|
+ `count` int(11) NOT NULL default '0',
|
|
|
+ `sum` int(11) NOT NULL default '0',
|
|
|
+ UNIQUE KEY `reaction` (`object_id`, `reaction`)
|
|
|
+);
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS `bx_albums_reactions_track` (
|
|
|
+ `id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
+ `object_id` int(11) NOT NULL default '0',
|
|
|
+ `author_id` int(11) NOT NULL default '0',
|
|
|
+ `author_nip` int(11) unsigned NOT NULL default '0',
|
|
|
+ `reaction` varchar(32) NOT NULL default '',
|
|
|
+ `value` tinyint(4) NOT NULL default '0',
|
|
|
+ `date` int(11) NOT NULL default '0',
|
|
|
+ PRIMARY KEY (`id`),
|
|
|
+ KEY `vote` (`object_id`, `author_nip`)
|
|
|
+);
|
|
|
+
|
|
|
-- TABLE: views
|
|
|
CREATE TABLE `bx_albums_views_track` (
|
|
|
`object_id` int(11) NOT NULL default '0',
|
|
|
@@ -413,7 +435,9 @@ INSERT INTO `sys_objects_cmts` (`Name`, `Module`, `Table`, `CharsPostMin`, `Char
|
|
|
-- VOTES
|
|
|
INSERT INTO `sys_objects_vote` (`Name`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES
|
|
|
('bx_albums', 'bx_albums_votes', 'bx_albums_votes_track', '604800', '1', '1', '0', '1', 'bx_albums_albums', 'id', 'author', 'rate', 'votes', '', ''),
|
|
|
-('bx_albums_media', 'bx_albums_votes_media', 'bx_albums_votes_media_track', '604800', '1', '1', '0', '1', 'bx_albums_files2albums', 'id', 'author', 'rate', 'votes', '', '');
|
|
|
+('bx_albums_media', 'bx_albums_votes_media', 'bx_albums_votes_media_track', '604800', '1', '1', '0', '1', 'bx_albums_files2albums', 'id', 'author', 'rate', 'votes', '', ''),
|
|
|
+
|
|
|
+('bx_albums_reactions', 'bx_albums_reactions', 'bx_albums_reactions_track', '604800', '1', '1', '1', '1', 'bx_albums_albums', 'id', 'author', 'rrate', 'rvotes', 'BxTemplVoteReactions', '');
|
|
|
|
|
|
|
|
|
-- SCORES
|