|
|
@@ -16,6 +16,8 @@ CREATE TABLE IF NOT EXISTS `bx_photos_entries` (
|
|
|
`votes` int(11) NOT NULL default '0',
|
|
|
`srate` float NOT NULL default '0',
|
|
|
`svotes` 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',
|
|
|
@@ -119,6 +121,26 @@ CREATE TABLE IF NOT EXISTS `bx_photos_svotes_track` (
|
|
|
KEY `vote` (`object_id`, `author_nip`)
|
|
|
);
|
|
|
|
|
|
+CREATE TABLE IF NOT EXISTS `bx_photos_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_photos_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_photos_views_track` (
|
|
|
`object_id` int(11) NOT NULL default '0',
|
|
|
@@ -298,7 +320,8 @@ 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_photos', 'bx_photos_votes', 'bx_photos_votes_track', '604800', '1', '1', '0', '1', 'bx_photos_entries', 'id', 'author', 'rate', 'votes', '', ''),
|
|
|
-('bx_photos_stars', 'bx_photos_svotes', 'bx_photos_svotes_track', '604800', '1', '5', '0', '1', 'bx_photos_entries', 'id', 'author', 'srate', 'svotes', 'BxPhotosVoteStars', 'modules/boonex/photos/classes/BxPhotosVoteStars.php');
|
|
|
+('bx_photos_stars', 'bx_photos_svotes', 'bx_photos_svotes_track', '604800', '1', '5', '0', '1', 'bx_photos_entries', 'id', 'author', 'srate', 'svotes', 'BxPhotosVoteStars', 'modules/boonex/photos/classes/BxPhotosVoteStars.php'),
|
|
|
+('bx_photos_reactions', 'bx_photos_reactions', 'bx_photos_reactions_track', '604800', '1', '1', '1', '1', 'bx_photos_entries', 'id', 'author', 'rrate', 'rvotes', 'BxTemplVoteReactions', '');
|
|
|
|
|
|
|
|
|
-- SCORES
|