|
|
@@ -461,6 +461,49 @@ CREATE TABLE IF NOT EXISTS `bx_timeline_scores_track` (
|
|
|
KEY `vote` (`object_id`, `author_nip`)
|
|
|
);
|
|
|
|
|
|
+-- TABLE: polls
|
|
|
+CREATE TABLE IF NOT EXISTS `bx_timeline_polls` (
|
|
|
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
+ `author_id` int(11) NOT NULL default '0',
|
|
|
+ `content_id` int(11) NOT NULL default '0',
|
|
|
+ `text` text NOT NULL,
|
|
|
+ PRIMARY KEY (`id`),
|
|
|
+ KEY `content_id` (`content_id`),
|
|
|
+ FULLTEXT KEY `search_fields` (`text`)
|
|
|
+);
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS `bx_timeline_polls_answers` (
|
|
|
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
|
+ `poll_id` int(11) unsigned NOT NULL default '0',
|
|
|
+ `title` varchar(255) NOT NULL,
|
|
|
+ `rate` float NOT NULL default '0',
|
|
|
+ `votes` int(11) NOT NULL default '0',
|
|
|
+ `order` int(11) NOT NULL default '0',
|
|
|
+ PRIMARY KEY (`id`),
|
|
|
+ KEY `poll_id` (`poll_id`),
|
|
|
+ FULLTEXT KEY `title` (`title`)
|
|
|
+);
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS `bx_timeline_polls_answers_votes` (
|
|
|
+ `id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
+ `object_id` int(11) NOT NULL default '0',
|
|
|
+ `count` int(11) NOT NULL default '0',
|
|
|
+ `sum` int(11) NOT NULL default '0',
|
|
|
+ PRIMARY KEY (`id`),
|
|
|
+ UNIQUE KEY `object_id` (`object_id`)
|
|
|
+);
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS `bx_timeline_polls_answers_votes_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',
|
|
|
+ `value` tinyint(4) NOT NULL default '0',
|
|
|
+ `date` int(11) NOT NULL default '0',
|
|
|
+ PRIMARY KEY (`id`),
|
|
|
+ KEY `vote` (`object_id`, `author_nip`)
|
|
|
+);
|
|
|
+
|
|
|
|
|
|
-- STORAGES, TRANSCODERS, UPLOADERS
|
|
|
SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
|
|
|
@@ -545,6 +588,7 @@ INSERT INTO `sys_form_inputs` (`object`, `module`, `name`, `value`, `values`, `c
|
|
|
('bx_timeline_post', @sName, 'photo', 'a:1:{i:0;s:23:"bx_timeline_html5_photo";}', 'a:1:{s:23:"bx_timeline_html5_photo";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_timeline_form_post_input_sys_photo', '_bx_timeline_form_post_input_photo', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
|
|
|
('bx_timeline_post', @sName, 'video', 'a:2:{i:0;s:23:"bx_timeline_html5_video";i:1;s:24:"bx_timeline_record_video";}', 'a:2:{s:23:"bx_timeline_html5_video";s:25:"_sys_uploader_html5_title";s:24:"bx_timeline_record_video";s:32:"_sys_uploader_record_video_title";}', 0, 'files', '_bx_timeline_form_post_input_sys_video', '_bx_timeline_form_post_input_video', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
|
|
|
('bx_timeline_post', @sName, 'file', 'a:1:{i:0;s:22:"bx_timeline_html5_file";}', 'a:1:{s:22:"bx_timeline_html5_file";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_timeline_form_post_input_sys_files', '_bx_timeline_form_post_input_files', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
|
|
|
+('bx_timeline_post', @sName, 'polls', '', '', 0, 'custom', '_bx_timeline_form_post_input_sys_polls', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
|
|
|
('bx_timeline_post', @sName, 'attachments', '', '', 0, 'custom', '_bx_timeline_form_post_input_sys_attachments', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
|
|
|
('bx_timeline_post', @sName, 'controls', '', 'tlb_do_submit,tlb_do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
|
|
|
('bx_timeline_post', @sName, 'tlb_do_submit', '_bx_timeline_form_post_input_do_submit', '', 0, 'submit', '_bx_timeline_form_post_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
|
|
|
@@ -560,11 +604,12 @@ INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_fo
|
|
|
('bx_timeline_post_add', 'photo', 2147483647, 1, 7),
|
|
|
('bx_timeline_post_add', 'video', 2147483647, 1, 8),
|
|
|
('bx_timeline_post_add', 'file', 2147483647, 1, 9),
|
|
|
-('bx_timeline_post_add', 'object_privacy_view', 2147483647, 1, 10),
|
|
|
-('bx_timeline_post_add', 'object_cf', 2147483647, 1, 11),
|
|
|
-('bx_timeline_post_add', 'published', 192, 0, 12),
|
|
|
-('bx_timeline_post_add', 'location', 2147483647, 1, 13),
|
|
|
-('bx_timeline_post_add', 'tlb_do_submit', 2147483647, 1, 14),
|
|
|
+('bx_timeline_post_add', 'polls', 2147483647, 1, 10),
|
|
|
+('bx_timeline_post_add', 'object_privacy_view', 2147483647, 1, 11),
|
|
|
+('bx_timeline_post_add', 'object_cf', 2147483647, 1, 12),
|
|
|
+('bx_timeline_post_add', 'published', 192, 0, 13),
|
|
|
+('bx_timeline_post_add', 'location', 2147483647, 1, 14),
|
|
|
+('bx_timeline_post_add', 'tlb_do_submit', 2147483647, 1, 15),
|
|
|
|
|
|
('bx_timeline_post_add_public', 'type', 2147483647, 1, 1),
|
|
|
('bx_timeline_post_add_public', 'action', 2147483647, 1, 2),
|
|
|
@@ -575,11 +620,12 @@ INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_fo
|
|
|
('bx_timeline_post_add_public', 'photo', 2147483647, 1, 7),
|
|
|
('bx_timeline_post_add_public', 'video', 2147483647, 1, 8),
|
|
|
('bx_timeline_post_add_public', 'file', 2147483647, 1, 9),
|
|
|
-('bx_timeline_post_add_public', 'object_privacy_view', 2147483647, 1, 10),
|
|
|
-('bx_timeline_post_add_public', 'object_cf', 2147483647, 1, 11),
|
|
|
-('bx_timeline_post_add_public', 'published', 192, 0, 12),
|
|
|
-('bx_timeline_post_add_public', 'location', 2147483647, 1, 13),
|
|
|
-('bx_timeline_post_add_public', 'tlb_do_submit', 2147483647, 1, 14),
|
|
|
+('bx_timeline_post_add_public', 'polls', 2147483647, 1, 10),
|
|
|
+('bx_timeline_post_add_public', 'object_privacy_view', 2147483647, 1, 11),
|
|
|
+('bx_timeline_post_add_public', 'object_cf', 2147483647, 1, 12),
|
|
|
+('bx_timeline_post_add_public', 'published', 192, 0, 13),
|
|
|
+('bx_timeline_post_add_public', 'location', 2147483647, 1, 14),
|
|
|
+('bx_timeline_post_add_public', 'tlb_do_submit', 2147483647, 1, 15),
|
|
|
|
|
|
('bx_timeline_post_add_profile', 'type', 2147483647, 1, 1),
|
|
|
('bx_timeline_post_add_profile', 'action', 2147483647, 1, 2),
|
|
|
@@ -590,11 +636,12 @@ INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_fo
|
|
|
('bx_timeline_post_add_profile', 'photo', 2147483647, 1, 7),
|
|
|
('bx_timeline_post_add_profile', 'video', 2147483647, 1, 8),
|
|
|
('bx_timeline_post_add_profile', 'file', 2147483647, 1, 9),
|
|
|
-('bx_timeline_post_add_profile', 'object_privacy_view', 2147483647, 1, 10),
|
|
|
-('bx_timeline_post_add_profile', 'object_cf', 2147483647, 1, 11),
|
|
|
-('bx_timeline_post_add_profile', 'published', 192, 0, 12),
|
|
|
-('bx_timeline_post_add_profile', 'location', 2147483647, 1, 13),
|
|
|
-('bx_timeline_post_add_profile', 'tlb_do_submit', 2147483647, 1, 14),
|
|
|
+('bx_timeline_post_add_profile', 'polls', 2147483647, 1, 10),
|
|
|
+('bx_timeline_post_add_profile', 'object_privacy_view', 2147483647, 1, 11),
|
|
|
+('bx_timeline_post_add_profile', 'object_cf', 2147483647, 1, 12),
|
|
|
+('bx_timeline_post_add_profile', 'published', 192, 0, 13),
|
|
|
+('bx_timeline_post_add_profile', 'location', 2147483647, 1, 14),
|
|
|
+('bx_timeline_post_add_profile', 'tlb_do_submit', 2147483647, 1, 15),
|
|
|
|
|
|
('bx_timeline_post_edit', 'type', 2147483647, 1, 1),
|
|
|
('bx_timeline_post_edit', 'action', 2147483647, 1, 2),
|
|
|
@@ -605,13 +652,14 @@ INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_fo
|
|
|
('bx_timeline_post_edit', 'photo', 2147483647, 1, 7),
|
|
|
('bx_timeline_post_edit', 'video', 2147483647, 1, 8),
|
|
|
('bx_timeline_post_edit', 'file', 2147483647, 1, 9),
|
|
|
-('bx_timeline_post_edit', 'object_privacy_view', 2147483647, 1, 10),
|
|
|
-('bx_timeline_post_edit', 'object_cf', 2147483647, 1, 11),
|
|
|
-('bx_timeline_post_edit', 'published', 192, 0, 12),
|
|
|
-('bx_timeline_post_edit', 'location', 2147483647, 1, 13),
|
|
|
-('bx_timeline_post_edit', 'controls', 2147483647, 1, 14),
|
|
|
-('bx_timeline_post_edit', 'tlb_do_submit', 2147483647, 1, 15),
|
|
|
-('bx_timeline_post_edit', 'tlb_do_cancel', 2147483647, 1, 16);
|
|
|
+('bx_timeline_post_edit', 'polls', 2147483647, 1, 10),
|
|
|
+('bx_timeline_post_edit', 'object_privacy_view', 2147483647, 1, 11),
|
|
|
+('bx_timeline_post_edit', 'object_cf', 2147483647, 1, 12),
|
|
|
+('bx_timeline_post_edit', 'published', 192, 0, 13),
|
|
|
+('bx_timeline_post_edit', 'location', 2147483647, 1, 14),
|
|
|
+('bx_timeline_post_edit', 'controls', 2147483647, 1, 15),
|
|
|
+('bx_timeline_post_edit', 'tlb_do_submit', 2147483647, 1, 16),
|
|
|
+('bx_timeline_post_edit', 'tlb_do_cancel', 2147483647, 1, 17);
|
|
|
|
|
|
-- Forms -> Attach link
|
|
|
INSERT INTO `sys_objects_form` (`object`, `module`, `title`, `action`, `form_attrs`, `submit_name`, `table`, `key`, `uri`, `uri_title`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
|
|
|
@@ -634,6 +682,27 @@ INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_fo
|
|
|
('bx_timeline_attach_link_add', 'do_submit', 2147483647, 1, 4),
|
|
|
('bx_timeline_attach_link_add', 'do_cancel', 2147483647, 1, 5);
|
|
|
|
|
|
+-- FORMS -> Attach poll
|
|
|
+INSERT INTO `sys_objects_form` (`object`, `module`, `title`, `action`, `form_attrs`, `submit_name`, `table`, `key`, `uri`, `uri_title`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
|
|
|
+('bx_timeline_poll', 'bx_timeline', '_bx_timeline_form_poll', '', '', 'do_submit', 'bx_timeline_polls', 'id', '', '', 'a:1:{s:14:"checker_helper";s:31:"BxTimelineFormPollCheckerHelper";}', 0, 1, 'BxTimelineFormPoll', 'modules/boonex/timeline/classes/BxTimelineFormPoll.php');
|
|
|
+
|
|
|
+INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
|
|
|
+('bx_timeline_poll_add', 'bx_timeline', 'bx_timeline_poll', '_bx_timeline_form_poll_display_add', 0);
|
|
|
+
|
|
|
+INSERT INTO `sys_form_inputs` (`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES
|
|
|
+('bx_timeline_poll', 'bx_timeline', 'text', '', '', 0, 'text', '_bx_timeline_form_poll_input_sys_text', '_bx_timeline_form_poll_input_text', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_timeline_form_poll_input_text_err', 'Xss', '', 1, 0),
|
|
|
+('bx_timeline_poll', 'bx_timeline', 'answers', '', '', 0, 'custom', '_bx_timeline_form_poll_input_sys_answers', '_bx_timeline_form_poll_input_answers', '', 1, 0, 0, '', '', '', 'AvailAnswers', '', '_bx_timeline_form_poll_input_answers_err', '', '', 1, 0),
|
|
|
+('bx_timeline_poll', 'bx_timeline', 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
|
|
|
+('bx_timeline_poll', 'bx_timeline', 'do_submit', '_bx_timeline_form_poll_input_do_submit', '', 0, 'submit', '_bx_timeline_form_poll_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
|
|
|
+('bx_timeline_poll', 'bx_timeline', 'do_cancel', '_bx_timeline_form_poll_input_do_cancel', '', 0, 'button', '_bx_timeline_form_poll_input_do_cancel', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:45:"$(''.bx-popup-applied:visible'').dolPopupHide()";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 0, 0);
|
|
|
+
|
|
|
+INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
|
|
|
+('bx_timeline_poll_add', 'text', 2147483647, 1, 1),
|
|
|
+('bx_timeline_poll_add', 'answers', 2147483647, 1, 2),
|
|
|
+('bx_timeline_poll_add', 'controls', 2147483647, 1, 3),
|
|
|
+('bx_timeline_poll_add', 'do_submit', 2147483647, 1, 4),
|
|
|
+('bx_timeline_poll_add', 'do_cancel', 2147483647, 1, 5);
|
|
|
+
|
|
|
-- Forms -> Repost To
|
|
|
INSERT INTO `sys_objects_form` (`object`, `module`, `title`, `action`, `form_attrs`, `submit_name`, `table`, `key`, `uri`, `uri_title`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
|
|
|
('bx_timeline_repost', @sName, '_bx_timeline_form_repost', '', '', 'do_submit', '', '', '', '', '', 0, 1, 'BxTimelineFormRepost', 'modules/boonex/timeline/classes/BxTimelineFormRepost.php');
|
|
|
@@ -693,7 +762,8 @@ INSERT INTO `sys_objects_view` (`name`, `module`, `table_track`, `period`, `is_o
|
|
|
-- VOTES
|
|
|
INSERT INTO `sys_objects_vote`(`Name`, `Module`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES
|
|
|
('bx_timeline', 'bx_timeline', 'bx_timeline_votes', 'bx_timeline_votes_track', '604800', '1', '1', '0', '1', 'bx_timeline_events', 'id', 'object_owner_id', 'rate', 'votes', 'BxTimelineVoteLikes', 'modules/boonex/timeline/classes/BxTimelineVoteLikes.php'),
|
|
|
-('bx_timeline_reactions', 'bx_timeline', 'bx_timeline_reactions', 'bx_timeline_reactions_track', '604800', '1', '1', '1', '1', 'bx_timeline_events', 'id', 'object_owner_id', 'rrate', 'rvotes', 'BxTemplVoteReactions', '');
|
|
|
+('bx_timeline_reactions', 'bx_timeline', 'bx_timeline_reactions', 'bx_timeline_reactions_track', '604800', '1', '1', '1', '1', 'bx_timeline_events', 'id', 'object_owner_id', 'rrate', 'rvotes', 'BxTemplVoteReactions', ''),
|
|
|
+('bx_timeline_poll_answers', 'bx_timeline', 'bx_timeline_polls_answers_votes', 'bx_timeline_polls_answers_votes_track', '604800', '1', '1', '0', '1', 'bx_timeline_polls_answers', 'id', 'author_id', 'rate', 'votes', 'BxTimelineVotePollAnswers', 'modules/boonex/timeline/classes/BxTimelineVotePollAnswers.php');
|
|
|
|
|
|
|
|
|
-- SCORES
|