AntonLV 8 лет назад
Родитель
Сommit
dbc3aaa642
66 измененных файлов с 11002 добавлено и 202 удалено
  1. 8 18
      modules/boonex/albums/updates/9.0.6_9.0.7/install/sql/install.sql
  2. 1 1
      modules/boonex/contact/updates/9.0.5_9.0.6/install/sql/install.sql
  3. 8 9
      modules/boonex/events/updates/9.0.5_9.0.6/install/sql/install.sql
  4. 8 9
      modules/boonex/files/updates/9.0.3_9.0.4/install/sql/install.sql
  5. 8 19
      modules/boonex/forum/updates/9.0.5_9.0.6/install/sql/install.sql
  6. 8 9
      modules/boonex/groups/updates/9.0.6_9.0.7/install/sql/install.sql
  7. 10 19
      modules/boonex/market/updates/9.0.7_9.0.8/install/sql/install.sql
  8. 5 6
      modules/boonex/notifications/updates/9.0.6_9.0.7/install/sql/install.sql
  9. 8 18
      modules/boonex/organizations/updates/9.0.6_9.0.7/install/sql/install.sql
  10. 1 1
      modules/boonex/payment/updates/9.0.6_9.0.7/install/sql/install.sql
  11. 8 19
      modules/boonex/persons/updates/9.0.6_9.0.7/install/sql/install.sql
  12. 8 9
      modules/boonex/polls/updates/9.0.3_9.0.4/install/sql/install.sql
  13. 10 20
      modules/boonex/posts/updates/9.0.6_9.0.7/install/sql/install.sql
  14. 8 9
      modules/boonex/shopify/updates/9.0.2_9.0.3/install/sql/install.sql
  15. 244 0
      modules/boonex/shopify/updates/9.0.2_9.0.3/source/classes/BxShopifyModule.php
  16. 115 0
      modules/boonex/shopify/updates/9.0.2_9.0.3/source/classes/BxShopifyTemplate.php
  17. 115 0
      modules/boonex/shopify/updates/9.0.2_9.0.3/source/install/config.php
  18. 230 0
      modules/boonex/shopify/updates/9.0.2_9.0.3/source/install/langs/en.xml
  19. 391 0
      modules/boonex/shopify/updates/9.0.2_9.0.3/source/install/sql/enable.sql
  20. 279 0
      modules/boonex/shopify/updates/9.0.2_9.0.3/source/install/sql/install.sql
  21. 55 0
      modules/boonex/shopify/updates/9.0.2_9.0.3/source/install/sql/uninstall.sql
  22. 1 0
      modules/boonex/shopify/updates/9.0.2_9.0.3/source/template/unit_showcase.html
  23. 42 0
      modules/boonex/smtpmailer/updates/9.0.2_9.0.3/source/classes/BxSMTPStudioPage.php
  24. 68 0
      modules/boonex/smtpmailer/updates/9.0.2_9.0.3/source/install/config.php
  25. 55 0
      modules/boonex/smtpmailer/updates/9.0.2_9.0.3/source/install/langs/en.xml
  26. 8 9
      modules/boonex/snipcart/updates/9.0.2_9.0.3/install/sql/install.sql
  27. 197 0
      modules/boonex/snipcart/updates/9.0.2_9.0.3/source/classes/BxSnipcartModule.php
  28. 135 0
      modules/boonex/snipcart/updates/9.0.2_9.0.3/source/install/config.php
  29. 248 0
      modules/boonex/snipcart/updates/9.0.2_9.0.3/source/install/langs/en.xml
  30. 391 0
      modules/boonex/snipcart/updates/9.0.2_9.0.3/source/install/sql/enable.sql
  31. 356 0
      modules/boonex/snipcart/updates/9.0.2_9.0.3/source/install/sql/install.sql
  32. 64 0
      modules/boonex/snipcart/updates/9.0.2_9.0.3/source/install/sql/uninstall.sql
  33. 1 0
      modules/boonex/snipcart/updates/9.0.2_9.0.3/source/template/unit_showcase.html
  34. 68 0
      modules/boonex/stripe_connect/updates/9.0.1_9.0.2/source/install/config.php
  35. 10 18
      modules/boonex/timeline/updates/9.0.6_9.0.7/install/sql/install.sql
  36. 315 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/classes/BxTimelineConfig.php
  37. 2117 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/classes/BxTimelineModule.php
  38. 1330 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/classes/BxTimelineTemplate.php
  39. 135 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/install/config.php
  40. 186 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/install/langs/en.xml
  41. 64 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/install/sql/disable.sql
  42. 260 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/install/sql/enable.sql
  43. 360 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/install/sql/install.sql
  44. 53 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/install/sql/uninstall.sql
  45. 249 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/js/main.js
  46. 285 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/js/post.js
  47. 414 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/js/view.js
  48. 9 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/template/block_item_content.html
  49. 5 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/template/block_item_info.html
  50. 13 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/template/block_view.html
  51. 330 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/template/css/view.css
  52. 1 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/template/show_more.html
  53. 45 0
      modules/boonex/timeline/updates/9.0.6_9.0.7/source/template/type_post.html
  54. 31 0
      modules/boonex/twitter_connect/updates/9.0.3_9.0.4/source/classes/BxTwitterStudioPage.php
  55. 68 0
      modules/boonex/twitter_connect/updates/9.0.3_9.0.4/source/install/config.php
  56. 30 0
      modules/boonex/una_connect/updates/9.0.1_9.0.2/source/classes/BxUnaConStudioPage.php
  57. 68 0
      modules/boonex/una_connect/updates/9.0.1_9.0.2/source/install/config.php
  58. 8 9
      modules/boonex/videos/updates/9.0.0_9.0.1/install/sql/install.sql
  59. 121 0
      modules/boonex/videos/updates/9.0.0_9.0.1/source/classes/BxVideosModule.php
  60. 165 0
      modules/boonex/videos/updates/9.0.0_9.0.1/source/classes/BxVideosTemplate.php
  61. 135 0
      modules/boonex/videos/updates/9.0.0_9.0.1/source/install/config.php
  62. 212 0
      modules/boonex/videos/updates/9.0.0_9.0.1/source/install/langs/en.xml
  63. 394 0
      modules/boonex/videos/updates/9.0.0_9.0.1/source/install/sql/enable.sql
  64. 360 0
      modules/boonex/videos/updates/9.0.0_9.0.1/source/install/sql/install.sql
  65. 66 0
      modules/boonex/videos/updates/9.0.0_9.0.1/source/install/sql/uninstall.sql
  66. 1 0
      modules/boonex/videos/updates/9.0.0_9.0.1/source/template/unit_showcase.html

+ 8 - 18
modules/boonex/albums/updates/9.0.6_9.0.7/install/sql/install.sql

@@ -1,3 +1,11 @@
+-- TABLES
+CREATE TABLE IF NOT EXISTS `bx_albums_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
 -- TABLE: bx_albums_albums
 
 ALTER TABLE `bx_albums_albums` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -118,15 +126,6 @@ REPAIR TABLE `bx_albums_meta_locations`;
 OPTIMIZE TABLE `bx_albums_meta_locations`;
 
 
--- TABLE: bx_albums_meta_mentions
-
-ALTER TABLE `bx_albums_meta_mentions` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
-
-REPAIR TABLE `bx_albums_meta_mentions`;
-OPTIMIZE TABLE `bx_albums_meta_mentions`;
-
-
 -- TABLE: bx_albums_photos_resized
 
 ALTER TABLE `bx_albums_photos_resized` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -215,14 +214,5 @@ REPAIR TABLE `bx_albums_votes_track`;
 OPTIMIZE TABLE `bx_albums_votes_track`;
 
 
--- TABLES
-CREATE TABLE IF NOT EXISTS `bx_albums_meta_mentions` (
-  `object_id` int(10) unsigned NOT NULL,
-  `profile_id` int(10) unsigned NOT NULL,
-  KEY `object_id` (`object_id`),
-  KEY `profile_id` (`profile_id`)
-);
-
-
 -- COMMENTS
 UPDATE `sys_objects_cmts` SET `Nl2br`='0' WHERE `Name` IN ('bx_albums', 'bx_albums_media');

+ 1 - 1
modules/boonex/contact/updates/9.0.5_9.0.6/install/sql/install.sql

@@ -9,4 +9,4 @@ ALTER TABLE `bx_contact_entries` CHANGE `body` `body` text CHARACTER SET utf8mb4
 ALTER TABLE `bx_contact_entries` CHANGE `uri` `uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 
 REPAIR TABLE `bx_contact_entries`;
-OPTIMIZE TABLE `bx_contact_entries`;
+OPTIMIZE TABLE `bx_contact_entries`;

+ 8 - 9
modules/boonex/events/updates/9.0.5_9.0.6/install/sql/install.sql

@@ -1,3 +1,11 @@
+-- TABLES
+CREATE TABLE IF NOT EXISTS `bx_events_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
 -- TABLE: bx_events_admins
 
 ALTER TABLE `bx_events_admins` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -155,12 +163,3 @@ ALTER TABLE `bx_events_votes_track` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf
 
 REPAIR TABLE `bx_events_votes_track`;
 OPTIMIZE TABLE `bx_events_votes_track`;
-
-
--- TABLES
-CREATE TABLE IF NOT EXISTS `bx_events_meta_mentions` (
-  `object_id` int(10) unsigned NOT NULL,
-  `profile_id` int(10) unsigned NOT NULL,
-  KEY `object_id` (`object_id`),
-  KEY `profile_id` (`profile_id`)
-);

+ 8 - 9
modules/boonex/files/updates/9.0.3_9.0.4/install/sql/install.sql

@@ -1,3 +1,11 @@
+-- TABLES
+CREATE TABLE IF NOT EXISTS `bx_files_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
 -- TABLE: bx_files_cmts
 
 ALTER TABLE `bx_files_cmts` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -115,15 +123,6 @@ REPAIR TABLE `bx_files_votes_track`;
 OPTIMIZE TABLE `bx_files_votes_track`;
 
 
--- TABLES
-CREATE TABLE IF NOT EXISTS `bx_files_meta_mentions` (
-  `object_id` int(10) unsigned NOT NULL,
-  `profile_id` int(10) unsigned NOT NULL,
-  KEY `object_id` (`object_id`),
-  KEY `profile_id` (`profile_id`)
-);
-
-
 -- FORMS
 UPDATE `sys_objects_form` SET `submit_name`='a:2:{i:0;s:9:"do_submit";i:1;s:10:"do_publish";}' WHERE `object`='bx_files';
 

+ 8 - 19
modules/boonex/forum/updates/9.0.5_9.0.6/install/sql/install.sql

@@ -1,6 +1,14 @@
 SET @sName = 'bx_forum';
 
 
+--TABLES
+CREATE TABLE IF NOT EXISTS `bx_forum_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
 -- TABLE: bx_forum_categories
 
 ALTER TABLE `bx_forum_categories` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -108,16 +116,6 @@ REPAIR TABLE `bx_forum_subscribers`;
 OPTIMIZE TABLE `bx_forum_subscribers`;
 
 
--- TABLE: bx_forum_topics
-
-ALTER TABLE `bx_forum_topics` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
-ALTER TABLE `bx_forum_topics` CHANGE `text` `text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
-REPAIR TABLE `bx_forum_topics`;
-OPTIMIZE TABLE `bx_forum_topics`;
-
-
 -- TABLE: bx_forum_views_track
 
 ALTER TABLE `bx_forum_views_track` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -143,12 +141,3 @@ ALTER TABLE `bx_forum_votes_track` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8
 
 REPAIR TABLE `bx_forum_votes_track`;
 OPTIMIZE TABLE `bx_forum_votes_track`;
-
-
---TABLES
-CREATE TABLE IF NOT EXISTS `bx_forum_meta_mentions` (
-  `object_id` int(10) unsigned NOT NULL,
-  `profile_id` int(10) unsigned NOT NULL,
-  KEY `object_id` (`object_id`),
-  KEY `profile_id` (`profile_id`)
-);

+ 8 - 9
modules/boonex/groups/updates/9.0.6_9.0.7/install/sql/install.sql

@@ -1,3 +1,11 @@
+-- TABLES
+CREATE TABLE IF NOT EXISTS `bx_groups_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
 -- TABLE: bx_groups_admins
 
 ALTER TABLE `bx_groups_admins` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -130,12 +138,3 @@ ALTER TABLE `bx_groups_votes_track` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf
 
 REPAIR TABLE `bx_groups_votes_track`;
 OPTIMIZE TABLE `bx_groups_votes_track`;
-
-
--- TABLES
-CREATE TABLE IF NOT EXISTS `bx_groups_meta_mentions` (
-  `object_id` int(10) unsigned NOT NULL,
-  `profile_id` int(10) unsigned NOT NULL,
-  KEY `object_id` (`object_id`),
-  KEY `profile_id` (`profile_id`)
-);

+ 10 - 19
modules/boonex/market/updates/9.0.7_9.0.8/install/sql/install.sql

@@ -1,3 +1,11 @@
+-- TABLES
+CREATE TABLE IF NOT EXISTS `bx_market_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
 -- TABLE: bx_market_cmts
 
 ALTER TABLE `bx_market_cmts` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -96,20 +104,13 @@ ALTER TABLE `bx_market_meta_locations` CHANGE `country` `country` varchar(2) CHA
 ALTER TABLE `bx_market_meta_locations` CHANGE `state` `state` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 ALTER TABLE `bx_market_meta_locations` CHANGE `city` `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 ALTER TABLE `bx_market_meta_locations` CHANGE `zip` `zip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `bx_market_meta_locations` CHANGE `street` `street` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `bx_market_meta_locations` CHANGE `street_number` `street_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 
 REPAIR TABLE `bx_market_meta_locations`;
 OPTIMIZE TABLE `bx_market_meta_locations`;
 
 
--- TABLE: bx_market_meta_mentions
-
-ALTER TABLE `bx_market_meta_mentions` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
-
-REPAIR TABLE `bx_market_meta_mentions`;
-OPTIMIZE TABLE `bx_market_meta_mentions`;
-
-
 -- TABLE: bx_market_photos
 
 ALTER TABLE `bx_market_photos` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -161,7 +162,6 @@ ALTER TABLE `bx_market_products` CHANGE `allow_view_to` `allow_view_to` varchar(
 ALTER TABLE `bx_market_products` CHANGE `allow_purchase_to` `allow_purchase_to` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 ALTER TABLE `bx_market_products` CHANGE `allow_comment_to` `allow_comment_to` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 ALTER TABLE `bx_market_products` CHANGE `allow_vote_to` `allow_vote_to` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-ALTER TABLE `bx_market_products` CHANGE `sex` `sex` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 
 REPAIR TABLE `bx_market_products`;
 OPTIMIZE TABLE `bx_market_products`;
@@ -223,14 +223,5 @@ REPAIR TABLE `bx_market_votes_track`;
 OPTIMIZE TABLE `bx_market_votes_track`;
 
 
--- TABLES
-CREATE TABLE IF NOT EXISTS `bx_market_meta_mentions` (
-  `object_id` int(10) unsigned NOT NULL,
-  `profile_id` int(10) unsigned NOT NULL,
-  KEY `object_id` (`object_id`),
-  KEY `profile_id` (`profile_id`)
-);
-
-
 -- COMMENTS
 UPDATE `sys_objects_cmts` SET `Nl2br`='0' WHERE `Name`='bx_market';

+ 5 - 6
modules/boonex/notifications/updates/9.0.6_9.0.7/install/sql/install.sql

@@ -1,3 +1,8 @@
+-- TABLES
+DELETE FROM `bx_notifications_handlers` WHERE `group`='mention';
+INSERT INTO `bx_notifications_handlers`(`group`, `type`, `alert_unit`, `alert_action`, `content`) VALUES
+('mention', 'insert', 'meta_mention', 'added', 'a:3:{s:11:"module_name";s:6:"system";s:13:"module_method";s:30:"get_notifications_post_mention";s:12:"module_class";s:20:"TemplServiceMetatags";}');
+
 -- TABLE: bx_notifications_events
 
 ALTER TABLE `bx_notifications_events` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -34,9 +39,3 @@ ALTER TABLE `bx_notifications_handlers` CHANGE `privacy` `privacy` varchar(64) C
 
 REPAIR TABLE `bx_notifications_handlers`;
 OPTIMIZE TABLE `bx_notifications_handlers`;
-
-
--- TABLES
-DELETE FROM `bx_notifications_handlers` WHERE `group`='mention';
-INSERT INTO `bx_notifications_handlers`(`group`, `type`, `alert_unit`, `alert_action`, `content`) VALUES
-('mention', 'insert', 'meta_mention', 'added', 'a:3:{s:11:"module_name";s:6:"system";s:13:"module_method";s:30:"get_notifications_post_mention";s:12:"module_class";s:20:"TemplServiceMetatags";}');

+ 8 - 18
modules/boonex/organizations/updates/9.0.6_9.0.7/install/sql/install.sql

@@ -1,3 +1,11 @@
+-- TABLES
+CREATE TABLE IF NOT EXISTS `bx_organizations_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
 -- TABLE: bx_organizations_admins
 
 ALTER TABLE `bx_organizations_admins` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -72,15 +80,6 @@ REPAIR TABLE `bx_organizations_meta_locations`;
 OPTIMIZE TABLE `bx_organizations_meta_locations`;
 
 
--- TABLE: bx_organizations_meta_mentions
-
-ALTER TABLE `bx_organizations_meta_mentions` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
-
-REPAIR TABLE `bx_organizations_meta_mentions`;
-OPTIMIZE TABLE `bx_organizations_meta_mentions`;
-
-
 -- TABLE: bx_organizations_pics
 
 ALTER TABLE `bx_organizations_pics` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -138,14 +137,5 @@ REPAIR TABLE `bx_organizations_views_track`;
 OPTIMIZE TABLE `bx_organizations_views_track`;
 
 
--- TABLES
-CREATE TABLE IF NOT EXISTS `bx_organizations_meta_mentions` (
-  `object_id` int(10) unsigned NOT NULL,
-  `profile_id` int(10) unsigned NOT NULL,
-  KEY `object_id` (`object_id`),
-  KEY `profile_id` (`profile_id`)
-);
-
-
 -- FORMS
 UPDATE `sys_form_inputs` SET `html`='1', `db_pass`='XssHtml' WHERE `object`='bx_organization' AND `name`='org_desc';

+ 1 - 1
modules/boonex/payment/updates/9.0.6_9.0.7/install/sql/install.sql

@@ -93,12 +93,12 @@ OPTIMIZE TABLE `bx_payment_transactions`;
 ALTER TABLE `bx_payment_transactions_pending` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 
 ALTER TABLE `bx_payment_transactions_pending` CHANGE `type` `type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `bx_payment_transactions_pending` CHANGE `provider` `provider` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 ALTER TABLE `bx_payment_transactions_pending` CHANGE `items` `items` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 ALTER TABLE `bx_payment_transactions_pending` CHANGE `customs` `customs` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 ALTER TABLE `bx_payment_transactions_pending` CHANGE `order` `order` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 ALTER TABLE `bx_payment_transactions_pending` CHANGE `error_code` `error_code` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 ALTER TABLE `bx_payment_transactions_pending` CHANGE `error_msg` `error_msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-ALTER TABLE `bx_payment_transactions_pending` CHANGE `provider` `provider` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 
 REPAIR TABLE `bx_payment_transactions_pending`;
 OPTIMIZE TABLE `bx_payment_transactions_pending`;

+ 8 - 19
modules/boonex/persons/updates/9.0.6_9.0.7/install/sql/install.sql

@@ -1,3 +1,11 @@
+--TABLES
+CREATE TABLE IF NOT EXISTS `bx_persons_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
 -- TABLE: bx_persons_cmts
 
 ALTER TABLE `bx_persons_cmts` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -15,7 +23,6 @@ ALTER TABLE `bx_persons_data` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_u
 ALTER TABLE `bx_persons_data` CHANGE `fullname` `fullname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 ALTER TABLE `bx_persons_data` CHANGE `description` `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 ALTER TABLE `bx_persons_data` CHANGE `gender` `gender` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-ALTER TABLE `bx_persons_data` CHANGE `long_text` `long_text` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 
 REPAIR TABLE `bx_persons_data`;
 OPTIMIZE TABLE `bx_persons_data`;
@@ -55,15 +62,6 @@ REPAIR TABLE `bx_persons_meta_locations`;
 OPTIMIZE TABLE `bx_persons_meta_locations`;
 
 
--- TABLE: bx_persons_meta_mentions
-
-ALTER TABLE `bx_persons_meta_mentions` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
-
-REPAIR TABLE `bx_persons_meta_mentions`;
-OPTIMIZE TABLE `bx_persons_meta_mentions`;
-
-
 -- TABLE: bx_persons_pictures
 
 ALTER TABLE `bx_persons_pictures` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -121,14 +119,5 @@ REPAIR TABLE `bx_persons_views_track`;
 OPTIMIZE TABLE `bx_persons_views_track`;
 
 
---TABLES
-CREATE TABLE IF NOT EXISTS `bx_persons_meta_mentions` (
-  `object_id` int(10) unsigned NOT NULL,
-  `profile_id` int(10) unsigned NOT NULL,
-  KEY `object_id` (`object_id`),
-  KEY `profile_id` (`profile_id`)
-);
-
-
 -- FORMS
 UPDATE `sys_form_inputs` SET `html`='1', `db_pass`='XssHtml' WHERE `object`='bx_person' AND `name`='description';

+ 8 - 9
modules/boonex/polls/updates/9.0.3_9.0.4/install/sql/install.sql

@@ -1,3 +1,11 @@
+-- TABLES
+CREATE TABLE IF NOT EXISTS `bx_polls_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
 -- TABLE: bx_polls_cmts
 
 ALTER TABLE `bx_polls_cmts` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -155,15 +163,6 @@ REPAIR TABLE `bx_polls_votes_track`;
 OPTIMIZE TABLE `bx_polls_votes_track`;
 
 
--- TABLES
-CREATE TABLE IF NOT EXISTS `bx_polls_meta_mentions` (
-  `object_id` int(10) unsigned NOT NULL,
-  `profile_id` int(10) unsigned NOT NULL,
-  KEY `object_id` (`object_id`),
-  KEY `profile_id` (`profile_id`)
-);
-
-
 -- FORMS
 UPDATE `sys_objects_form` SET `submit_name`='a:2:{i:0;s:9:"do_submit";i:1;s:10:"do_publish";}' WHERE `object`='bx_polls';
 

+ 10 - 20
modules/boonex/posts/updates/9.0.6_9.0.7/install/sql/install.sql

@@ -1,3 +1,11 @@
+-- TABLES
+CREATE TABLE IF NOT EXISTS `bx_posts_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
 -- TABLE: bx_posts_cmts
 
 ALTER TABLE `bx_posts_cmts` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -49,20 +57,13 @@ ALTER TABLE `bx_posts_meta_locations` CHANGE `country` `country` varchar(2) CHAR
 ALTER TABLE `bx_posts_meta_locations` CHANGE `state` `state` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 ALTER TABLE `bx_posts_meta_locations` CHANGE `city` `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 ALTER TABLE `bx_posts_meta_locations` CHANGE `zip` `zip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `bx_posts_meta_locations` CHANGE `street` `street` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `bx_posts_meta_locations` CHANGE `street_number` `street_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 
 REPAIR TABLE `bx_posts_meta_locations`;
 OPTIMIZE TABLE `bx_posts_meta_locations`;
 
 
--- TABLE: bx_posts_meta_mentions
-
-ALTER TABLE `bx_posts_meta_mentions` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
-
-REPAIR TABLE `bx_posts_meta_mentions`;
-OPTIMIZE TABLE `bx_posts_meta_mentions`;
-
-
 -- TABLE: bx_posts_photos_resized
 
 ALTER TABLE `bx_posts_photos_resized` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -83,7 +84,6 @@ ALTER TABLE `bx_posts_posts` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_un
 
 ALTER TABLE `bx_posts_posts` CHANGE `title` `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 ALTER TABLE `bx_posts_posts` CHANGE `text` `text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-ALTER TABLE `bx_posts_posts` CHANGE `dslider` `dslider` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 
 REPAIR TABLE `bx_posts_posts`;
 OPTIMIZE TABLE `bx_posts_posts`;
@@ -136,16 +136,6 @@ REPAIR TABLE `bx_posts_votes_track`;
 OPTIMIZE TABLE `bx_posts_votes_track`;
 
 
-
--- TABLES
-CREATE TABLE IF NOT EXISTS `bx_posts_meta_mentions` (
-  `object_id` int(10) unsigned NOT NULL,
-  `profile_id` int(10) unsigned NOT NULL,
-  KEY `object_id` (`object_id`),
-  KEY `profile_id` (`profile_id`)
-);
-
-
 -- FORMS
 UPDATE `sys_objects_form` SET `submit_name`='a:2:{i:0;s:9:"do_submit";i:1;s:10:"do_publish";}' WHERE `object`='bx_posts';
 

+ 8 - 9
modules/boonex/shopify/updates/9.0.2_9.0.3/install/sql/install.sql

@@ -1,3 +1,11 @@
+-- TABLES
+CREATE TABLE IF NOT EXISTS `bx_shopify_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
 -- TABLE: bx_shopify_cmts
 
 ALTER TABLE `bx_shopify_cmts` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -111,15 +119,6 @@ REPAIR TABLE `bx_shopify_votes_track`;
 OPTIMIZE TABLE `bx_shopify_votes_track`;
 
 
--- TABLES
-CREATE TABLE IF NOT EXISTS `bx_shopify_meta_mentions` (
-  `object_id` int(10) unsigned NOT NULL,
-  `profile_id` int(10) unsigned NOT NULL,
-  KEY `object_id` (`object_id`),
-  KEY `profile_id` (`profile_id`)
-);
-
-
 -- FORMS
 UPDATE `sys_objects_form` SET `submit_name`='a:2:{i:0;s:9:"do_submit";i:1;s:10:"do_publish";}' WHERE `object`='bx_shopify';
 

+ 244 - 0
modules/boonex/shopify/updates/9.0.2_9.0.3/source/classes/BxShopifyModule.php

@@ -0,0 +1,244 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Shopify Shopify
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+define('BX_SHOPIFY_MODE_TEST', 'test');
+define('BX_SHOPIFY_MODE_LIVE', 'live');
+
+/**
+ * Shopify module
+ */
+class BxShopifyModule extends BxBaseModTextModule
+{
+    function __construct(&$aModule)
+    {
+        parent::__construct($aModule);
+
+        $this->_aSearchableNamesExcept[] = $this->_oConfig->CNF['FIELD_CODE'];
+    }
+
+    public function getSettings($iProfileId = 0)
+    {
+        if(empty($iProfileId))
+            $iProfileId = bx_get_logged_profile_id();
+
+        $aSettings = $this->_oDb->getSettings(array('type' => 'author', 'author' => $iProfileId));
+        if(empty($aSettings) || !is_array($aSettings))
+            return array();
+
+        return $aSettings;
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_shopify Shopify
+     * @subsection bx_shopify-integration Integration
+     * @subsubsection bx_shopify-include include
+     * 
+     * @code bx_srv('bx_shopify', 'include', [...]); @endcode
+     * 
+     * Get integration code with all necessary CSS and JS includes. 
+     *
+     * @return HTML sting with integration code to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxShopifyModule::serviceInclude
+     */
+    /** 
+     * @ref bx_shopify-include "include"
+     */
+    public function serviceInclude($iProfileId = 0)
+    {
+        $this->serviceIncludeCssJs();
+        return $this->serviceIncludeCode($iProfileId);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_shopify Shopify
+     * @subsection bx_shopify-integration Integration
+     * @subsubsection bx_shopify-include_css_js include_css_js
+     * 
+     * @code bx_srv('bx_shopify', 'include_css_js', [...]); @endcode
+     * 
+     * Include all necessary CSS and JS files.
+     * 
+     * @see BxShopifyModule::serviceIncludeCssJs
+     */
+    /** 
+     * @ref bx_shopify-include_css_js "include_css_js"
+     */
+    public function serviceIncludeCssJs()
+    {
+        $this->_oTemplate->getIncludeCssJs();
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_shopify Shopify
+     * @subsection bx_shopify-integration Integration
+     * @subsubsection bx_shopify-include_code include_code
+     * 
+     * @code bx_srv('bx_shopify', 'include_code', [...]); @endcode
+     * 
+     * Get integration code. 
+     *
+     * @return HTML sting with integration code to display on the site. Empty string is returned if there is no enough input data.
+     * 
+     * @see BxShopifyModule::serviceIncludeCode
+     */
+    /** 
+     * @ref bx_shopify-include_code "include_code"
+     */
+    public function serviceIncludeCode($iProfileId = 0)
+    {
+        $iProfileId = !empty($iProfileId) ? $iProfileId : $this->_iProfileId;
+        if(empty($iProfileId))
+            return '';
+
+        $aSettings = $this->getSettings($iProfileId);
+        if(empty($aSettings))
+            return '';
+
+        return $this->_oTemplate->getIncludeCode($iProfileId, $aSettings);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_shopify Shopify
+     * @subsection bx_shopify-page_blocks Page Blocks
+     * @subsubsection bx_shopify-get_results_search_extended get_results_search_extended
+     * 
+     * @code bx_srv('bx_shopify', 'get_results_search_extended', [...]); @endcode
+     * 
+     * Get page block with the results of Extended Search.
+     *
+     * @param $aParams an array with search params.
+     * @return HTML string with block content to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxShopifyModule::serviceGetResultsSearchExtended
+     */
+    /** 
+     * @ref bx_shopify-get_results_search_extended "get_results_search_extended"
+     */
+    public function serviceGetResultsSearchExtended($aParams)
+    {
+        $this->serviceIncludeCssJs();
+        return BxDolService::call('system', 'get_results', array($aParams), 'TemplSearchExtendedServices');
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_shopify Shopify
+     * @subsection bx_shopify-page_blocks Page Blocks
+     * @subsubsection bx_shopify-entity_create entity_create
+     * 
+     * @code bx_srv('bx_shopify', 'entity_create', [...]); @endcode
+     * 
+     * Get page block with product creation form or an error message if something wasn't configured correctly.
+     *
+     * @param $sDisplay form display name to use
+     * @return HTML string with block content to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxShopifyModule::serviceEntityCreate
+     */
+    /** 
+     * @ref bx_shopify-entity_create "entity_create"
+     */
+    public function serviceEntityCreate ($sDisplay = false)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+    	$aSettings = $this->_oDb->getSettings(array('type' => 'author', 'author' => $this->_iProfileId));
+        if(empty($aSettings) || !is_array($aSettings))
+    		return MsgBox(_t('_bx_shopify_err_not_configured', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_SETTINGS'])));
+
+    	return parent::serviceEntityCreate($sDisplay);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_shopify Shopify
+     * @subsection bx_shopify-page_blocks Page Blocks
+     * @subsubsection bx_shopify-settings settings
+     * 
+     * @code bx_srv('bx_shopify', 'settings', [...]); @endcode
+     * 
+     * Get page block with configuration settings form.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxShopifyModule::serviceSettings
+     */
+    /** 
+     * @ref bx_shopify-settings "settings"
+     */
+    public function serviceSettings()
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        if(!$this->_iProfileId)
+            return array(
+        		'content' => MsgBox(_t('_Access denied'))
+            );
+
+        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_SETTINGS'], $CNF['OBJECT_FORM_SETTINGS_DISPLAY_EDIT'], $this->_oTemplate);
+        if(!$oForm)
+            return array(
+        		'content' => MsgBox(_t('_sys_txt_error_occured'))
+            );       
+
+        $aSettings = $this->_oDb->getSettings(array('type' => 'author', 'author' => $this->_iProfileId));
+        $bSettings = !empty($aSettings) && is_array($aSettings);
+
+        $sResultTimer = 0;
+        $sResultMessage = '';
+
+        $oForm->initChecker($aSettings);
+        if($oForm->isSubmittedAndValid()) {
+            if(!$bSettings) {
+                if((int)$oForm->insert(array('author' => $this->_iProfileId)) > 0) {
+                    $sResultTimer = 3;
+                    $sResultMessage = '_bx_shopify_msg_save_settings';
+                }
+                else 
+                    $sResultMessage = '_bx_shopify_err_save_settings';
+            }
+            else {
+                if($oForm->update($aSettings['id']) !== false) {
+                    $sResultTimer = 3;
+                    $sResultMessage = '_bx_shopify_msg_save_settings';
+                }
+                else 
+                    $sResultMessage = '_bx_shopify_err_save_settings';
+            }
+        }
+
+        return array(
+        	'content' => (!empty($sResultMessage) ? MsgBox(_t($sResultMessage), $sResultTimer) : '') . $oForm->getCode()
+        );
+    }
+
+    // ====== PERMISSION METHODS
+    public function isAllowedViewDashboard()
+    {
+        $aSettings = $this->getSettings();
+        if(empty($aSettings))
+            return false;
+
+        return true;
+    }
+
+    public function checkAllowedSetThumb($iContentId = 0)
+    {
+        return _t('_sys_txt_access_denied');
+    }
+}
+
+/** @} */

+ 115 - 0
modules/boonex/shopify/updates/9.0.2_9.0.3/source/classes/BxShopifyTemplate.php

@@ -0,0 +1,115 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Shopify Shopify
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/*
+ * Module representation.
+ */
+class BxShopifyTemplate extends BxBaseModTextTemplate
+{
+    /**
+     * Constructor
+     */
+    function __construct(&$oConfig, &$oDb)
+    {
+        $this->MODULE = 'bx_shopify';
+        parent::__construct($oConfig, $oDb);
+    }
+
+    public function getIncludeCssJs()
+    {
+        $this->addCss(array(
+            'unit.css'
+        ));
+
+        $sProto = bx_proto();
+        $this->addJs(array(
+            $sProto . '://sdks.shopifycdn.com/js-buy-sdk/v0/latest/shopify-buy.umd.polyfilled.min.js',
+            'shop.js'
+        ));
+    }
+
+    public function getIncludeCode($iProfileId, $aSettings)
+    {
+        if(empty($aSettings))
+            return '';
+
+        $sCode = $this->getJsCode('shop', array(
+            'sAPIKey' => $aSettings['api_key'],
+            'sDomain' => $aSettings['domain'],
+            'sAppId' => $aSettings['app_id'],
+        ));
+
+        $this->addJsTranslation(array(
+            '_bx_shopify_err_load_product',
+            '_bx_shopify_err_load_collection'
+        ));
+
+        return bx_replace_markers($sCode, array(
+            'profile_id' => $iProfileId
+        ));
+    }
+
+    public function entryBuy($aData)
+    {
+        return $this->parseHtmlByName('entry-buy.html', array(
+        	'html_id' => $this->_oConfig->getHtmlIds('entry_buy')
+        ));
+    }
+
+    public function entryText ($aData, $sTemplateName = 'entry-text.html')
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        return $this->parseHtmlByName($sTemplateName, array(
+            'js_object' => $this->_oConfig->getJsObjectShop($aData[$CNF['FIELD_AUTHOR']]),
+            'html_id' => $this->_oConfig->getHtmlIds('entry_content'),
+            'entry_title' => $this->getTitle($aData),
+            'entry_code' => $aData[$CNF['FIELD_CODE']]
+        ));
+    }
+
+    public function entryAttachments ($aData, $aParams = array())
+    {
+        $sPopupId = 'bx-messages-atachment-popup-{id}';
+        return $this->parseHtmlByName('attachments.html', array(
+            'html_id' => $this->_oConfig->getHtmlIds('entry_attachments'),
+            'html_id_sample' => $this->_oConfig->getHtmlIds('entry_attachment_sample'),
+        	'popup_id' => $sPopupId,
+            'popup' => BxTemplFunctions::getInstance()->transBox($sPopupId, '<img class="bx-spf-attachment-popup-img" src="" />', true, true),
+        ));
+    }
+
+    public function getJsCode($sType, $aParams = array(), $bWrap = true)
+    {
+        $aParams = array_merge(array(
+            'aHtmlIds' => $this->_oConfig->getHtmlIds()
+        ), $aParams);
+
+        return parent::getJsCode($sType, $aParams, $bWrap);
+    }
+
+    protected function getUnit($aData, $aParams = array())
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $iProfileId = $aData[$CNF['FIELD_AUTHOR']];
+        $sCode = $aData[$CNF['FIELD_CODE']];
+		$sClass = $this->_getUnitClass($aData,(isset($aParams['template_name']) ? $aParams['template_name'] : ''));
+        return array_merge(parent::getUnit($aData, $aParams), array(
+            'js_object' => $this->_oConfig->getJsObjectShop($iProfileId),
+            'js_content' => $this->_oModule->serviceIncludeCode($iProfileId),
+        	'class' => $this->_oConfig->getHtmlIds('unit') . $sClass,
+            'entry_code' => $sCode,
+        ));
+    }
+}
+
+/** @} */

+ 115 - 0
modules/boonex/shopify/updates/9.0.2_9.0.3/source/install/config.php

@@ -0,0 +1,115 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Shopify Shopify
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_shopify',
+    'title' => 'Shopify',
+    'note' => 'Shopify shopping module.',
+    'version' => '9.0.3',
+    'vendor' => 'BoonEx',
+	'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC5'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/shopify/',
+    'home_uri' => 'shopify',
+
+    'db_prefix' => 'bx_shopify_',
+    'class_prefix' => 'BxShopify',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Shopify',
+
+    /**
+     * List of page triggers.
+     */
+    'page_triggers' => array (
+    	'trigger_page_profile_view_entry',
+    ),
+    
+    /**
+     * Menu triggers.
+     */
+    'menu_triggers' => array(
+    	'trigger_profile_view_submenu'
+    ),
+
+	/**
+     * Extended Search Forms.
+     */
+    'esearches' => array(
+        'bx_shopify',
+    	'bx_shopify_cmts',
+    ),
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'uninstall' => array (
+    	'process_esearches' => 1,
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable_success' => array(
+        'process_menu_triggers' => 1,
+        'process_page_triggers' => 1,
+    	'process_esearches' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable_failed' => array (
+    	'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+
+    /**
+     * Relations Section
+     */
+    'relations' => array(
+    	'bx_timeline',
+    	'bx_notifications'
+    ),
+
+);
+
+/** @} */

+ 230 - 0
modules/boonex/shopify/updates/9.0.2_9.0.3/source/install/langs/en.xml

@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+
+	<string name="_bx_shopify"><![CDATA[Shopify]]></string>
+	<string name="_bx_shopify_cmts"><![CDATA[Shopify's Reviews]]></string>
+
+	<string name="_bx_shopify_option_per_page_browse"><![CDATA[Number of items per page]]></string>
+	<string name="_bx_shopify_option_per_page_profile"><![CDATA[Number of items on profile page]]></string>
+	<string name="_bx_shopify_option_rss_num"><![CDATA[Number of items in RSS feed]]></string>
+	<string name="_bx_shopify_option_searchable_fields"><![CDATA[Searchable fields for keyword search]]></string>
+
+	<string name="_bx_shopify_form_entry"><![CDATA[Goods]]></string>
+	<string name="_bx_shopify_form_entry_display_add"><![CDATA[Add Goods]]></string>
+	<string name="_bx_shopify_form_entry_display_edit"><![CDATA[Edit Goods]]></string>
+	<string name="_bx_shopify_form_entry_display_delete"><![CDATA[Delete Goods]]></string>
+	<string name="_bx_shopify_form_entry_display_view"><![CDATA[View Goods]]></string>
+	<string name="_bx_shopify_form_entry_input_author"><![CDATA[Author]]></string>
+	<string name="_bx_shopify_form_entry_input_sys_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_shopify_form_entry_input_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_shopify_form_entry_input_sys_do_publish"><![CDATA[Publish]]></string>
+	<string name="_bx_shopify_form_entry_input_do_publish"><![CDATA[Publish]]></string>
+	<string name="_bx_shopify_form_entry_input_sys_code"><![CDATA[Product ID]]></string>
+    <string name="_bx_shopify_form_entry_input_code"><![CDATA[Product ID]]></string>
+    <string name="_bx_shopify_form_entry_input_code_inf"><![CDATA[The Product ID can be taken from product's URL when you are viewing the product in Products section of your Shopify dashboard.]]></string>
+    <string name="_bx_shopify_form_entry_input_code_err"><![CDATA[Product ID is essential. Please, fill in this field.]]></string>
+	<string name="_bx_shopify_form_entry_input_sys_title"><![CDATA[Title]]></string>
+	<string name="_bx_shopify_form_entry_input_title"><![CDATA[Title]]></string>
+	<string name="_bx_shopify_form_entry_input_title_err"><![CDATA[Title is essential. Please, fill in this field]]></string>
+	<string name="_bx_shopify_form_entry_input_sys_cat"><![CDATA[Category]]></string>
+	<string name="_bx_shopify_form_entry_input_cat"><![CDATA[Category]]></string>
+    <string name="_bx_shopify_form_entry_input_cat_err"><![CDATA[Please select category]]></string>
+	<string name="_bx_shopify_form_entry_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
+	<string name="_bx_shopify_form_entry_input_delete_confirm"><![CDATA[I am sure I want to delete this product]]></string>
+	<string name="_bx_shopify_form_entry_input_delete_confirm_info"><![CDATA[This action can not be undone]]></string>
+	<string name="_bx_shopify_form_entry_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete the product]]></string>
+    <string name="_bx_shopify_form_entry_input_sys_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_shopify_form_entry_input_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_shopify_form_entry_input_picture_use_as_thumb"><![CDATA[Cover Image]]></string>
+    <string name="_bx_shopify_form_entry_input_sys_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_shopify_form_entry_input_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_shopify_form_entry_input_sys_date_changed"><![CDATA[Updated]]></string>
+    <string name="_bx_shopify_form_entry_input_date_changed"><![CDATA[Updated]]></string>
+
+    <string name="_bx_shopify_form_settings"><![CDATA[Settings]]></string>
+    <string name="_bx_shopify_form_settings_display_edit"><![CDATA[Edit Settings]]></string>
+    <string name="_bx_shopify_form_settings_input_sys_api_key"><![CDATA[API Key]]></string>
+    <string name="_bx_shopify_form_settings_input_api_key"><![CDATA[API Key (Access Token)]]></string>
+    <string name="_bx_shopify_form_settings_input_api_key_err"><![CDATA[API Key field can't be empty]]></string>
+    <string name="_bx_shopify_form_settings_input_sys_domain"><![CDATA[Domain]]></string>
+    <string name="_bx_shopify_form_settings_input_domain"><![CDATA[Domain]]></string>
+    <string name="_bx_shopify_form_settings_input_domain_err"><![CDATA[Domain field can't be empty]]></string>
+    <string name="_bx_shopify_form_settings_input_sys_app_id"><![CDATA[App ID]]></string>
+    <string name="_bx_shopify_form_settings_input_app_id"><![CDATA[App ID]]></string>
+    <string name="_bx_shopify_form_settings_input_app_id_err"><![CDATA[App ID field can't be empty]]></string>
+    <string name="_bx_shopify_form_settings_input_sys_do_submit"><![CDATA[Submit]]></string>
+    <string name="_bx_shopify_form_settings_input_do_submit"><![CDATA[Submit]]></string>
+
+	<string name="_bx_shopify_acl_action_create_entry"><![CDATA[Create Goods]]></string>
+	<string name="_bx_shopify_acl_action_delete_entry"><![CDATA[Delete Goods]]></string>
+	<string name="_bx_shopify_acl_action_view_entry"><![CDATA[View Goods]]></string>
+	<string name="_bx_shopify_acl_action_set_thumb"><![CDATA[Set Goods Thumbnail]]></string>
+	<string name="_bx_shopify_acl_action_edit_any_entry"><![CDATA[Edit Any Goods]]></string>
+
+	<string name="_bx_shopify_page_title_sys_create_entry"><![CDATA[New Goods]]></string>
+	<string name="_bx_shopify_page_title_create_entry"><![CDATA[New Item]]></string>
+	<string name="_bx_shopify_page_block_title_create_entry"><![CDATA[New Item]]></string>
+	<string name="_bx_shopify_page_title_sys_edit_entry"><![CDATA[Edit]]></string>
+	<string name="_bx_shopify_page_title_edit_entry"><![CDATA[Edit]]></string>
+	<string name="_bx_shopify_page_block_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_shopify_page_title_sys_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_shopify_page_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_shopify_page_block_title_delete_entry"><![CDATA[Delete]]></string>
+	<string name="_bx_shopify_page_title_sys_view_entry"><![CDATA[View Goods]]></string>
+	<string name="_bx_shopify_page_title_view_entry"><![CDATA[{title}]]></string>
+	<string name="_bx_shopify_page_block_title_entry_text"><![CDATA[Item Text]]></string>
+	<string name="_bx_shopify_page_title_browse"><![CDATA[Goods]]></string>
+	<string name="_bx_shopify_page_title_search_results"><![CDATA[Goods matching "{0}"]]></string>
+	<string name="_bx_shopify_page_title_browse_by_author"><![CDATA[Goods of {display_name}]]></string>
+	<string name="_bx_shopify_page_title_browse_featured"><![CDATA[Featured Goods]]></string>
+    <string name="_bx_shopify_page_title_browse_recent"><![CDATA[Latest Goods]]></string>
+    <string name="_bx_shopify_page_title_browse_popular"><![CDATA[Popular Goods]]></string>
+    <string name="_bx_shopify_page_title_browse_updated"><![CDATA[Updated Goods]]></string>
+    <string name="_bx_shopify_page_title_sys_home"><![CDATA[Goods Home]]></string>
+    <string name="_bx_shopify_page_title_home"><![CDATA[Goods]]></string>
+    <string name="_bx_shopify_page_block_title_featured_entries_view_extended"><![CDATA[Featured Goods]]></string>
+    <string name="_bx_shopify_page_block_title_recent_entries"><![CDATA[Latest Goods (Gallery View)]]></string>
+    <string name="_bx_shopify_page_block_title_recent_entries_view_extended"><![CDATA[Latest Goods]]></string>
+    <string name="_bx_shopify_page_block_title_recent_entries_view_full"><![CDATA[Latest Goods (Full View)]]></string>
+    <string name="_bx_shopify_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
+    <string name="_bx_shopify_page_block_title_entry_author"><![CDATA[Author]]></string>
+    <string name="_bx_shopify_page_block_title_entry_actions"><![CDATA[Actions]]></string>
+    <string name="_bx_shopify_page_block_title_entry_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_shopify_page_block_title_entry_comments_link"><![CDATA[Comments to <a href="{entry_link}">{title}</a>]]></string>
+    <string name="_bx_shopify_page_block_title_entry_location"><![CDATA[Location]]></string>
+    <string name="_bx_shopify_page_block_title_entry_attachments"><![CDATA[Attachments]]></string>
+    <string name="_bx_shopify_page_block_title_entry_all_actions"><![CDATA[All Actions]]></string>
+    <string name="_bx_shopify_page_title_sys_entries_popular"><![CDATA[Popular Goods]]></string>
+    <string name="_bx_shopify_page_title_entries_popular"><![CDATA[Popular Goods]]></string>
+    <string name="_bx_shopify_page_title_sys_entries_updated"><![CDATA[Updated Goods]]></string>
+    <string name="_bx_shopify_page_title_entries_updated"><![CDATA[Updated Goods]]></string>
+    <string name="_bx_shopify_page_block_title_popular_entries"><![CDATA[Popular Goods]]></string>
+    <string name="_bx_shopify_page_block_title_popular_entries_view_extended"><![CDATA[Popular Goods (Extended View)]]></string>
+    <string name="_bx_shopify_page_block_title_popular_entries_view_full"><![CDATA[Popular Goods (Full View)]]></string>
+    <string name="_bx_shopify_page_block_title_updated_entries"><![CDATA[Updated Goods]]></string>
+    <string name="_bx_shopify_page_title_sys_view_entry_comments"><![CDATA[Goods Comments]]></string>
+    <string name="_bx_shopify_page_title_view_entry_comments"><![CDATA[Comments to {title}]]></string>
+    <string name="_bx_shopify_page_title_sys_entries_of_author"><![CDATA[Goods of author]]></string>
+    <string name="_bx_shopify_page_title_entries_of_author"><![CDATA[Goods by {display_name}]]></string>
+    <string name="_bx_shopify_page_block_title_favorites_of_author"><![CDATA[Favorites by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_shopify_page_block_title_sys_favorites_of_author"><![CDATA[Favorites of author]]></string>
+    <string name="_bx_shopify_page_block_title_entries_of_author"><![CDATA[Goods by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_shopify_page_block_title_sys_entries_of_author"><![CDATA[Goods of author]]></string>   
+    <string name="_bx_shopify_page_block_title_entries_actions"><![CDATA[Goods actions]]></string>
+    <string name="_bx_shopify_page_block_title_browse_cmts"><![CDATA[Goods' Comments]]></string>
+	<string name="_bx_shopify_page_title_sys_manage"><![CDATA[Manage Own]]></string>
+	<string name="_bx_shopify_page_title_sys_manage_administration"><![CDATA[Manage All]]></string>
+	<string name="_bx_shopify_page_title_manage"><![CDATA[Manage]]></string>
+	<string name="_bx_shopify_page_block_title_system_manage"><![CDATA[Manage Own]]></string>
+	<string name="_bx_shopify_page_block_title_system_manage_administration"><![CDATA[Manage All]]></string>
+	<string name="_bx_shopify_page_block_title_manage"><![CDATA[Manage]]></string>    
+	<string name="_bx_shopify_page_block_title_popular_keywords"><![CDATA[Popular Hashtags]]></string>
+	<string name="_bx_shopify_page_block_title_cats"><![CDATA[Goods Categories]]></string>
+	<string name="_bx_shopify_page_block_title_entry_info"><![CDATA[Info]]></string>
+	<string name="_bx_shopify_page_block_title_my_entries"><![CDATA[My Goods]]></string>
+    <string name="_bx_shopify_page_title_sys_settings"><![CDATA[Settings]]></string>
+    <string name="_bx_shopify_page_title_settings"><![CDATA[Settings]]></string>
+    <string name="_bx_shopify_page_block_title_system_settings"><![CDATA[Settings]]></string>
+    <string name="_bx_shopify_page_block_title_settings"><![CDATA[Settings]]></string>
+    <string name="_bx_shopify_page_title_sys_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_shopify_page_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_shopify_page_block_title_search_form"><![CDATA[Search Form]]></string>
+    <string name="_bx_shopify_page_block_title_search_results"><![CDATA[Search Results]]></string>
+    <string name="_bx_shopify_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>
+    <string name="_bx_shopify_page_block_title_search_results_cmts"><![CDATA[Comments Search Results]]></string>
+    <string name="_bx_shopify_page_block_title_sys_recent_entries_view_showcase"><![CDATA[Latest Goods (Showcase View)]]></string>
+    <string name="_bx_shopify_page_block_title_recent_entries_view_showcase"><![CDATA[Latest Goods]]></string>
+    <string name="_bx_shopify_page_block_title_sys_popular_entries_view_showcase"><![CDATA[Popular Goods (Showcase View)]]></string>
+    <string name="_bx_shopify_page_block_title_popular_entries_view_showcase"><![CDATA[Popular Goods]]></string>
+    <string name="_bx_shopify_page_block_title_sys_featured_entries_view_showcase"><![CDATA[Featured Goods (Showcase View)]]></string>
+    <string name="_bx_shopify_page_block_title_featured_entries_view_showcase"><![CDATA[Featured Goods]]></string>
+
+    <string name="_bx_shopify_menu_set_title_view_entry"><![CDATA[Goods Actions]]></string>
+    <string name="_bx_shopify_menu_title_view_entry"><![CDATA[Goods Actions]]></string>
+    <string name="_bx_shopify_menu_title_submenu"><![CDATA[Goods Submenu]]></string>
+    <string name="_bx_shopify_menu_set_title_submenu"><![CDATA[Goods Submenu]]></string>
+    <string name="_bx_shopify_menu_item_title_system_create_entry"><![CDATA[New Goods]]></string>
+    <string name="_bx_shopify_menu_item_title_create_entry"><![CDATA[New Goods]]></string>
+    <string name="_bx_shopify_menu_item_title_system_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_shopify_menu_item_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_shopify_menu_item_title_system_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_shopify_menu_item_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_shopify_menu_item_title_system_view_entry"><![CDATA[View Goods]]></string>
+    <string name="_bx_shopify_menu_item_title_system_entries_home"><![CDATA[Shop]]></string>
+    <string name="_bx_shopify_menu_item_title_entries_home"><![CDATA[Shop]]></string>
+    <string name="_bx_shopify_menu_item_title_system_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_shopify_menu_item_title_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_shopify_menu_item_title_system_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_shopify_menu_item_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_shopify_menu_item_title_system_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_shopify_menu_item_title_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_shopify_menu_item_title_system_settings"><![CDATA[Settings]]></string>
+    <string name="_bx_shopify_menu_item_title_settings"><![CDATA[Settings]]></string>
+    <string name="_bx_shopify_menu_item_title_system_dashboard"><![CDATA[Dashboard]]></string>
+    <string name="_bx_shopify_menu_item_title_dashboard"><![CDATA[Dashboard]]></string>
+    <string name="_bx_shopify_menu_item_title_system_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_shopify_menu_item_title_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_shopify_menu_title_view_entry_submenu"><![CDATA[View Goods Submenu]]></string>
+    <string name="_bx_shopify_menu_set_title_view_entry_submenu"><![CDATA[View Goods Submenu]]></string>
+    <string name="_bx_shopify_menu_item_title_view_entry_submenu_entry"><![CDATA[Item]]></string>
+    <string name="_bx_shopify_menu_item_title_view_entry_submenu_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_shopify_menu_item_title_system_view_entry_comments"><![CDATA[Goods Comments]]></string>
+    <string name="_bx_shopify_menu_item_title_system_view_entries_author"><![CDATA[Goods]]></string>
+    <string name="_bx_shopify_menu_item_title_view_entries_author"><![CDATA[Goods]]></string>
+    <string name="_bx_shopify_menu_title_entries_my"><![CDATA[My Goods Action Menu]]></string>
+    <string name="_bx_shopify_menu_set_title_entries_my"><![CDATA[My Goods Menu]]></string>
+	<string name="_bx_shopify_menu_item_title_system_manage_my_entries"><![CDATA[My goods]]></string>
+    <string name="_bx_shopify_menu_item_title_manage_my_entries"><![CDATA[{addon} goods]]></string>
+    <string name="_bx_shopify_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_shopify_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_shopify_menu_item_title_system_manage_account"><![CDATA[Manage account]]></string>
+    <string name="_bx_shopify_menu_item_title_manage_account"><![CDATA[Manage account]]></string>
+	<string name="_bx_shopify_menu_item_title_system_admt_entries"><![CDATA[Goods]]></string>
+	<string name="_bx_shopify_menu_item_title_admt_entries"><![CDATA[Goods - {addon} hidden]]></string>
+	<string name="_bx_shopify_menu_item_title_manage_my"><![CDATA[My Goods]]></string>
+	<string name="_bx_shopify_menu_item_title_manage_all"><![CDATA[All Goods]]></string>
+	<string name="_bx_shopify_menu_item_title_buy_for"><![CDATA[Buy for {price}]]></string>
+
+	<string name="_bx_shopify_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+	<string name="_bx_shopify_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
+	<string name="_bx_shopify_grid_filter_item_title_adm_hidden"><![CDATA[Hidden]]></string>
+	<string name="_bx_shopify_grid_column_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_shopify_grid_column_title_adm_title"><![CDATA[Title]]></string>
+    <string name="_bx_shopify_grid_column_title_adm_added"><![CDATA[Added]]></string>
+    <string name="_bx_shopify_grid_column_title_adm_author"><![CDATA[Author]]></string>
+    <string name="_bx_shopify_grid_action_title_adm_edit"><![CDATA[Edit]]></string>
+    <string name="_bx_shopify_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_shopify_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
+    <string name="_bx_shopify_grid_action_err_delete"><![CDATA[Cannot delete the selected product(s).]]></string>
+    <string name="_bx_shopify_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
+
+    <string name="_bx_shopify_chart_growth"><![CDATA[Shopify: Growth]]></string>
+    <string name="_bx_shopify_chart_growth_speed"><![CDATA[Shopify: Growth Speed]]></string>
+
+    <string name="_bx_shopify_search_extended"><![CDATA[Shopify Search]]></string>
+    <string name="_bx_shopify_search_extended_cmts"><![CDATA[Shopify Comments Search]]></string>
+
+    <string name="_bx_shopify_pre_lists_cats"><![CDATA[Goods categories]]></string>
+    <string name="_bx_shopify_cat_automotive_and_industrial"><![CDATA[Automotive & Industrial]]></string>
+    <string name="_bx_shopify_cat_beauty_health_food"><![CDATA[Beauty, Health & Food]]></string>
+    <string name="_bx_shopify_cat_books"><![CDATA[Books]]></string>
+    <string name="_bx_shopify_cat_clothing_shoes_jewelry"><![CDATA[Clothing, Shoes & Jewelry]]></string>
+    <string name="_bx_shopify_cat_electronics_and_computers"><![CDATA[Electronics & Computers]]></string>
+    <string name="_bx_shopify_cat_handmade"><![CDATA[Handmade]]></string>
+    <string name="_bx_shopify_cat_home_garden_tools"><![CDATA[Home, Garden & Tools]]></string>
+    <string name="_bx_shopify_cat_movies_music_games"><![CDATA[Movies, Music & Games]]></string>
+    <string name="_bx_shopify_cat_sports_and_outdoors"><![CDATA[Sports & Outdoors]]></string>
+    <string name="_bx_shopify_cat_toys_kids_baby"><![CDATA[Toys, Kids & Baby]]></string>
+
+    <string name="_bx_shopify_msg_save_settings"><![CDATA[Settings were successfully saved.]]></string>
+    <string name="_bx_shopify_err_save_settings"><![CDATA[Cannot save settings.]]></string>
+    <string name="_bx_shopify_err_not_configured"><![CDATA[You need to configure shop settings first. <a href="{0}">Click here</a>.]]></string>
+    <string name="_bx_shopify_err_load_product"><![CDATA[Cannot load product. Please check your shop settings and product ID.]]></string>
+    <string name="_bx_shopify_err_load_collection"><![CDATA[Cannot load collection. Please check your shop settings.]]></string>
+
+    <string name="_bx_shopify_txt_all_entries_by"><![CDATA[<a href="{0}">All Goods by {1} ({2})</a>]]></string>
+    <string name="_bx_shopify_txt_sample_single"><![CDATA[shop item]]></string>
+    <string name="_bx_shopify_txt_sample_single_with_article"><![CDATA[a shop item]]></string>
+    <string name="_bx_shopify_txt_sample_comment_single"><![CDATA[comment to shop item]]></string>
+    <string name="_bx_shopify_txt_sample_vote_single"><![CDATA[vote to shop item]]></string>
+</resources>

+ 391 - 0
modules/boonex/shopify/updates/9.0.2_9.0.3/source/install/sql/enable.sql

@@ -0,0 +1,391 @@
+
+-- SETTINGS
+SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
+INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES 
+('modules', 'bx_shopify', '_bx_shopify', 'bx_shopify@modules/boonex/shopify/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
+SET @iTypeId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_shopify', '_bx_shopify', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
+('bx_shopify_per_page_browse', '12', @iCategId, '_bx_shopify_option_per_page_browse', 'digit', '', '', '', 10),
+('bx_shopify_per_page_profile', '6', @iCategId, '_bx_shopify_option_per_page_profile', 'digit', '', '', '', 12),
+('bx_shopify_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
+('bx_shopify_rss_num', '10', @iCategId, '_bx_shopify_option_rss_num', 'digit', '', '', '', 20),
+('bx_shopify_searchable_fields', 'title', @iCategId, '_bx_shopify_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:21:"get_searchable_fields";}', 30);
+
+-- PAGE: create entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_create_entry', '_bx_shopify_page_title_sys_create_entry', '_bx_shopify_page_title_create_entry', 'bx_shopify', 5, 2147483647, 1, 'create-shopify-entry', 'page.php?i=create-shopify-entry', '', '', '', 0, 1, 0, 'BxShopifyPageBrowse', 'modules/boonex/shopify/classes/BxShopifyPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_shopify_create_entry', 1, 'bx_shopify', '_bx_shopify_page_block_title_create_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:13:"entity_create";}', 0, 1, 1);
+
+-- PAGE: edit entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_edit_entry', '_bx_shopify_page_title_sys_edit_entry', '_bx_shopify_page_title_edit_entry', 'bx_shopify', 5, 2147483647, 1, 'edit-shopify-entry', '', '', '', '', 0, 1, 0, 'BxShopifyPageEntry', 'modules/boonex/shopify/classes/BxShopifyPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_shopify_edit_entry', 1, 'bx_shopify', '_bx_shopify_page_block_title_edit_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:11:"entity_edit";}', 0, 0, 0);
+
+-- PAGE: delete entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_delete_entry', '_bx_shopify_page_title_sys_delete_entry', '_bx_shopify_page_title_delete_entry', 'bx_shopify', 5, 2147483647, 1, 'delete-shopify-entry', '', '', '', '', 0, 1, 0, 'BxShopifyPageEntry', 'modules/boonex/shopify/classes/BxShopifyPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_shopify_delete_entry', 1, 'bx_shopify', '_bx_shopify_page_block_title_delete_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:13:"entity_delete";}', 0, 0, 0);
+
+-- PAGE: view entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_view_entry', '_bx_shopify_page_title_sys_view_entry', '_bx_shopify_page_title_view_entry', 'bx_shopify', 10, 2147483647, 1, 'view-shopify-entry', '', '', '', '', 0, 1, 0, 'BxShopifyPageEntry', 'modules/boonex/shopify/classes/BxShopifyPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_shopify_view_entry', 1, 'bx_shopify', '', '_bx_shopify_page_block_title_entry_text', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:17:"entity_text_block";}', 0, 0, 1, 0),
+('bx_shopify_view_entry', 1, 'bx_shopify', '', '_bx_shopify_page_block_title_entry_attachments', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:18:"entity_attachments";}', 0, 0, 1, 1),
+('bx_shopify_view_entry', 2, 'bx_shopify', '', '_bx_shopify_page_block_title_entry_author', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:13:"entity_author";}', 0, 0, 1, 0),
+('bx_shopify_view_entry', 3, 'bx_shopify', '', '_bx_shopify_page_block_title_entry_info', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:11:"entity_info";}', 0, 0, 1, 1),
+('bx_shopify_view_entry', 3, 'bx_shopify', '', '_bx_shopify_page_block_title_entry_location', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:15:"entity_location";}', 0, 0, 0, 2),
+('bx_shopify_view_entry', 4, 'bx_shopify', '', '_bx_shopify_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:18:"entity_all_actions";}', 0, 0, 1, 0),
+('bx_shopify_view_entry', 4, 'bx_shopify', '', '_bx_shopify_page_block_title_entry_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:14:"entity_actions";}', 0, 0, 0, 1),
+('bx_shopify_view_entry', 4, 'bx_shopify', '', '_bx_shopify_page_block_title_entry_social_sharing', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:21:"entity_social_sharing";}', 0, 0, 0, 2),
+('bx_shopify_view_entry', 4, 'bx_shopify', '', '_bx_shopify_page_block_title_entry_comments', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:15:"entity_comments";}', 0, 0, 1, 3),
+('bx_shopify_view_entry', 4, 'bx_shopify', '', '_bx_shopify_page_block_title_entry_location', 3, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:13:"locations_map";s:6:"params";a:2:{i:0;s:10:"bx_shopify";i:1;s:4:"{id}";}s:5:"class";s:20:"TemplServiceMetatags";}', 0, 0, 1, 4);
+
+-- PAGE: view entry comments
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_view_entry_comments', '_bx_shopify_page_title_sys_view_entry_comments', '_bx_shopify_page_title_view_entry_comments', 'bx_shopify', 5, 2147483647, 1, 'view-shopify-entry-comments', '', '', '', '', 0, 1, 0, 'BxShopifyPageEntry', 'modules/boonex/shopify/classes/BxShopifyPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_shopify_view_entry_comments', 1, 'bx_shopify', '_bx_shopify_page_block_title_entry_comments', '_bx_shopify_page_block_title_entry_comments_link', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:15:"entity_comments";}', 0, 0, 1);
+
+-- PAGE: popular entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_popular', '_bx_shopify_page_title_sys_entries_popular', '_bx_shopify_page_title_entries_popular', 'bx_shopify', 5, 2147483647, 1, 'shopify-popular', 'page.php?i=shopify-popular', '', '', '', 0, 1, 0, 'BxShopifyPageBrowse', 'modules/boonex/shopify/classes/BxShopifyPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_shopify_popular', 1, 'bx_shopify', '_bx_shopify_page_block_title_popular_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:14:"browse_popular";s:6:"params";a:3:{s:9:"unit_view";s:7:"gallery";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, 1);
+
+-- PAGE: recently updated entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_updated', '_bx_shopify_page_title_sys_entries_updated', '_bx_shopify_page_title_entries_updated', 'bx_shopify', 5, 2147483647, 1, 'shopify-updated', 'page.php?i=shopify-updated', '', '', '', 0, 1, 0, 'BxShopifyPageBrowse', 'modules/boonex/shopify/classes/BxShopifyPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_shopify_updated', 1, 'bx_shopify', '_bx_shopify_page_block_title_updated_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:14:"browse_updated";s:6:"params";a:3:{s:9:"unit_view";s:7:"gallery";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, 1);
+
+-- PAGE: entries of author
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_author', 'shopify-author', '_bx_shopify_page_title_sys_entries_of_author', '_bx_shopify_page_title_entries_of_author', 'bx_shopify', 5, 2147483647, 1, '', '', '', '', 0, 1, 0, 'BxShopifyPageAuthor', 'modules/boonex/shopify/classes/BxShopifyPageAuthor.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_shopify_author', 1, 'bx_shopify', '', '_bx_shopify_page_block_title_entries_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:18:"my_entries_actions";}', 0, 0, 1, 1),
+('bx_shopify_author', 1, 'bx_shopify', '_bx_shopify_page_block_title_sys_favorites_of_author', '_bx_shopify_page_block_title_favorites_of_author', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:15:"browse_favorite";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 0, 1, 1, 2),
+('bx_shopify_author', 1, 'bx_shopify', '_bx_shopify_page_block_title_sys_entries_of_author', '_bx_shopify_page_block_title_entries_of_author', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:13:"browse_author";}', 0, 0, 1, 3);
+
+-- PAGE: module home
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_home', 'shopify-home', '_bx_shopify_page_title_sys_home', '_bx_shopify_page_title_home', 'bx_shopify', 2, 2147483647, 1, 'page.php?i=shopify-home', '', '', '', 0, 1, 0, 'BxShopifyPageBrowse', 'modules/boonex/shopify/classes/BxShopifyPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_shopify_home', 1, 'bx_shopify', '', '_bx_shopify_page_block_title_featured_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, 1, 0),
+('bx_shopify_home', 1, 'bx_shopify', '', '_bx_shopify_page_block_title_recent_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, 1, 1),
+('bx_shopify_home', 2, 'bx_shopify', '', '_bx_shopify_page_block_title_popular_keywords', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:14:"keywords_cloud";s:6:"params";a:2:{i:0;s:10:"bx_shopify";i:1;s:10:"bx_shopify";}s:5:"class";s:20:"TemplServiceMetatags";}', 0, 1, 1, 0),
+('bx_shopify_home', 2, 'bx_shopify', '', '_bx_shopify_page_block_title_cats', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:15:"categories_list";s:6:"params";a:2:{i:0;s:15:"bx_shopify_cats";i:1;a:1:{s:10:"show_empty";b:1;}}s:5:"class";s:20:"TemplServiceCategory";}', 0, 1, 1, 1);
+
+-- PAGE: search for entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_search', '_bx_shopify_page_title_sys_entries_search', '_bx_shopify_page_title_entries_search', 'bx_shopify', 5, 2147483647, 1, 'shopify-search', 'page.php?i=shopify-search', '', '', '', 0, 1, 0, 'BxShopifyPageBrowse', 'modules/boonex/shopify/classes/BxShopifyPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_shopify_search', 1, 'bx_shopify', '_bx_shopify_page_block_title_search_form', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:10:"bx_shopify";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 1),
+('bx_shopify_search', 1, 'bx_shopify', '_bx_shopify_page_block_title_search_results', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:27:"get_results_search_extended";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:10:"bx_shopify";s:10:"show_empty";b:1;}}}', 0, 1, 1, 2),
+('bx_shopify_search', 1, 'bx_shopify', '_bx_shopify_page_block_title_search_form_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:15:"bx_shopify_cmts";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 3),
+('bx_shopify_search', 1, 'bx_shopify', '_bx_shopify_page_block_title_search_results_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:15:"bx_shopify_cmts";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 4);
+
+-- PAGE: module manage own
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_manage', '_bx_shopify_page_title_sys_manage', '_bx_shopify_page_title_manage', 'bx_shopify', 5, 2147483647, 1, 'shopify-manage', 'page.php?i=shopify-manage', '', '', '', 0, 1, 0, 'BxShopifyPageBrowse', 'modules/boonex/shopify/classes/BxShopifyPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_shopify_manage', 1, 'bx_shopify', '_bx_shopify_page_block_title_system_manage', '_bx_shopify_page_block_title_manage', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:12:"manage_tools";}}', 0, 1, 0);
+
+-- PAGE: module manage all
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_administration', '_bx_shopify_page_title_sys_manage_administration', '_bx_shopify_page_title_manage', 'bx_shopify', 5, 192, 1, 'shopify-administration', 'page.php?i=shopify-administration', '', '', '', 0, 1, 0, 'BxShopifyPageBrowse', 'modules/boonex/shopify/classes/BxShopifyPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_shopify_administration', 1, 'bx_shopify', '_bx_shopify_page_block_title_system_manage_administration', '_bx_shopify_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:12:"manage_tools";s:6:"params";a:1:{i:0;s:14:"administration";}}', 0, 1, 0);
+
+-- PAGE: module settings
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_settings', '_bx_shopify_page_title_sys_settings', '_bx_shopify_page_title_settings', 'bx_shopify', 5, 2147483647, 1, 'shopify-settings', 'page.php?i=shopify-settings', '', '', '', 0, 1, 0, 'BxShopifyPageBrowse', 'modules/boonex/shopify/classes/BxShopifyPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_shopify_settings', 1, 'bx_shopify', '_bx_shopify_page_block_title_system_settings', '_bx_shopify_page_block_title_settings', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:8:"settings";}}', 0, 1, 0);
+
+-- PAGE: add block to homepage
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = 'sys_home' AND `cell_id` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('sys_home', 1, 'bx_shopify', '_bx_shopify_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:13:"browse_public";s:6:"params";a:2:{i:0;b:0;i:1;b:0;}}', 1, 0, 0, IFNULL(@iBlockOrder, 0) + 1);
+
+-- PAGES: add page block to profiles modules (trigger* page objects are processed separately upon modules enable/disable)
+SET @iPBCellProfile = 3;
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_shopify', '_bx_shopify_page_block_title_my_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:13:"browse_author";s:6:"params";a:2:{i:0;s:12:"{profile_id}";i:1;a:2:{s:8:"per_page";s:27:"bx_shopify_per_page_profile";s:13:"empty_message";b:0;}}}', 0, 0, 0);
+
+-- PAGE: service blocks
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = '' AND `cell_id` = 0 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('', 0, 'bx_shopify', '', '_bx_shopify_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:13:"browse_public";s:6:"params";a:3:{s:9:"unit_view";s:7:"gallery";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 1),
+
+('', 0, 'bx_shopify', '', '_bx_shopify_page_block_title_recent_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 2),
+('', 0, 'bx_shopify', '', '_bx_shopify_page_block_title_popular_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 3),
+('', 0, 'bx_shopify', '', '_bx_shopify_page_block_title_popular_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 4),
+('', 0, 'bx_shopify', '_bx_shopify_page_block_title_sys_recent_entries_view_showcase', '_bx_shopify_page_block_title_recent_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_shopify\";s:6:\"method\";s:13:\"browse_public\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 5),
+('', 0, 'bx_shopify', '_bx_shopify_page_block_title_sys_popular_entries_view_showcase', '_bx_shopify_page_block_title_popular_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_shopify\";s:6:\"method\";s:13:\"browse_popular\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 6),
+('', 0, 'bx_shopify', '_bx_shopify_page_block_title_sys_featured_entries_view_showcase', '_bx_shopify_page_block_title_featured_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:\"bx_shopify\";s:6:\"method\";s:15:\"browse_featured\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 7);
+
+
+-- MENU: add to site menu
+SET @iSiteMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_site' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_site', 'bx_shopify', 'shopify-home', '_bx_shopify_menu_item_title_system_entries_home', '_bx_shopify_menu_item_title_entries_home', 'page.php?i=shopify-home', '', '', 'shopping-cart col-green1', 'bx_shopify_submenu', 2147483647, 1, 1, IFNULL(@iSiteMenuOrder, 0) + 1);
+
+-- MENU: add to homepage menu
+SET @iHomepageMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_homepage' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_homepage', 'bx_shopify', 'shopify-home', '_bx_shopify_menu_item_title_system_entries_home', '_bx_shopify_menu_item_title_entries_home', 'page.php?i=shopify-home', '', '', 'shopping-cart col-green1', 'bx_shopify_submenu', 2147483647, 1, 1, IFNULL(@iHomepageMenuOrder, 0) + 1);
+
+-- MENU: add to "add content" menu
+SET @iAddMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_add_content_links' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_add_content_links', 'bx_shopify', 'create-shopify-entry', '_bx_shopify_menu_item_title_system_create_entry', '_bx_shopify_menu_item_title_create_entry', 'page.php?i=create-shopify-entry', '', '', 'shopping-cart col-green1', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
+
+-- MENU: actions menu for view entry 
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_view', '_bx_shopify_menu_title_view_entry', 'bx_shopify_view', 'bx_shopify', 9, 0, 1, 'BxShopifyMenuView', 'modules/boonex/shopify/classes/BxShopifyMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_shopify_view', 'bx_shopify', '_bx_shopify_menu_set_title_view_entry', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_shopify_view', 'bx_shopify', 'edit-shopify-entry', '_bx_shopify_menu_item_title_system_edit_entry', '_bx_shopify_menu_item_title_edit_entry', 'page.php?i=edit-shopify-entry&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 1),
+('bx_shopify_view', 'bx_shopify', 'delete-shopify-entry', '_bx_shopify_menu_item_title_system_delete_entry', '_bx_shopify_menu_item_title_delete_entry', 'page.php?i=delete-shopify-entry&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 2);
+
+-- MENU: actions menu for my entries
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_my', '_bx_shopify_menu_title_entries_my', 'bx_shopify_my', 'bx_shopify', 9, 0, 1, 'BxShopifyMenu', 'modules/boonex/shopify/classes/BxShopifyMenu.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_shopify_my', 'bx_shopify', '_bx_shopify_menu_set_title_entries_my', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_shopify_my', 'bx_shopify', 'create-shopify-entry', '_bx_shopify_menu_item_title_system_create_entry', '_bx_shopify_menu_item_title_create_entry', 'page.php?i=create-shopify-entry', '', '', 'plus', '', 2147483647, 1, 0, 0);
+
+-- MENU: module sub-menu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_submenu', '_bx_shopify_menu_title_submenu', 'bx_shopify_submenu', 'bx_shopify', 8, 0, 1, 'BxShopifyMenuSubmenu', 'modules/boonex/shopify/classes/BxShopifyMenuSubmenu.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_shopify_submenu', 'bx_shopify', '_bx_shopify_menu_set_title_submenu', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_shopify_submenu', 'bx_shopify', 'shopify-home', '_bx_shopify_menu_item_title_system_entries_public', '_bx_shopify_menu_item_title_entries_public', 'page.php?i=shopify-home', '', '', '', '', 2147483647, 1, 1, 1),
+('bx_shopify_submenu', 'bx_shopify', 'shopify-popular', '_bx_shopify_menu_item_title_system_entries_popular', '_bx_shopify_menu_item_title_entries_popular', 'page.php?i=shopify-popular', '', '', '', '', 2147483647, 1, 1, 2),
+('bx_shopify_submenu', 'bx_shopify', 'shopify-search', '_bx_shopify_menu_item_title_system_entries_search', '_bx_shopify_menu_item_title_entries_search', 'page.php?i=shopify-search', '', '', '', '', 2147483647, 1, 1, 3),
+('bx_shopify_submenu', 'bx_shopify', 'shopify-manage', '_bx_shopify_menu_item_title_system_entries_manage', '_bx_shopify_menu_item_title_entries_manage', 'page.php?i=shopify-manage', '', '', '', '', 2147483646, 1, 1, 4),
+('bx_shopify_submenu', 'bx_shopify', 'shopify-settings', '_bx_shopify_menu_item_title_system_settings', '_bx_shopify_menu_item_title_settings', 'page.php?i=shopify-settings', '', '', '', '', 2147483646, 1, 1, 5),
+('bx_shopify_submenu', 'bx_shopify', 'shopify-dashboard', '_bx_shopify_menu_item_title_system_dashboard', '_bx_shopify_menu_item_title_dashboard', 'https://{domain}/admin', '', '_blank', '', '', 2147483646, 1, 1, 6);
+
+-- MENU: sub-menu for view entry
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_view_submenu', '_bx_shopify_menu_title_view_entry_submenu', 'bx_shopify_view_submenu', 'bx_shopify', 8, 0, 0, 'BxShopifyMenuView', 'modules/boonex/shopify/classes/BxShopifyMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_shopify_view_submenu', 'bx_shopify', '_bx_shopify_menu_set_title_view_entry_submenu', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_shopify_view_submenu', 'bx_shopify', 'view-shopify-entry', '_bx_shopify_menu_item_title_system_view_entry', '_bx_shopify_menu_item_title_view_entry_submenu_entry', 'page.php?i=view-shopify-entry&id={content_id}', '', '', '', '', 2147483647, 1, 0, 1),
+('bx_shopify_view_submenu', 'bx_shopify', 'view-shopify-entry-comments', '_bx_shopify_menu_item_title_system_view_entry_comments', '_bx_shopify_menu_item_title_view_entry_submenu_comments', 'page.php?i=view-shopify-entry-comments&id={content_id}', '', '', '', '', 2147483647, 1, 0, 2);
+
+-- MENU: custom menu for snippet meta info
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_snippet_meta', '_sys_menu_title_snippet_meta', 'bx_shopify_snippet_meta', 'bx_shopify', 15, 0, 1, 'BxShopifyMenuSnippetMeta', 'modules/boonex/shopify/classes/BxShopifyMenuSnippetMeta.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_shopify_snippet_meta', 'bx_shopify', '_sys_menu_set_title_snippet_meta', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES 
+('bx_shopify_snippet_meta', 'bx_shopify', 'date', '_sys_menu_item_title_system_sm_date', '_sys_menu_item_title_sm_date', '', '', '', '', '', 2147483647, 1, 0, 1, 1),
+('bx_shopify_snippet_meta', 'bx_shopify', 'author', '_sys_menu_item_title_system_sm_author', '_sys_menu_item_title_sm_author', '', '', '', '', '', 2147483647, 1, 0, 1, 2),
+('bx_shopify_snippet_meta', 'bx_shopify', 'category', '_sys_menu_item_title_system_sm_category', '_sys_menu_item_title_sm_category', '', '', '', '', '', 2147483647, 0, 0, 1, 3),
+('bx_shopify_snippet_meta', 'bx_shopify', 'tags', '_sys_menu_item_title_system_sm_tags', '_sys_menu_item_title_sm_tags', '', '', '', '', '', 2147483647, 0, 0, 1, 4),
+('bx_shopify_snippet_meta', 'bx_shopify', 'views', '_sys_menu_item_title_system_sm_views', '_sys_menu_item_title_sm_views', '', '', '', '', '', 2147483647, 0, 0, 1, 5),
+('bx_shopify_snippet_meta', 'bx_shopify', 'comments', '_sys_menu_item_title_system_sm_comments', '_sys_menu_item_title_sm_comments', '', '', '', '', '', 2147483647, 0, 0, 1, 6);
+
+-- MENU: profile stats
+SET @iNotifMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name` = 'sys_profile_stats' AND `active` = 1 LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+('sys_profile_stats', 'bx_shopify', 'profile-stats-manage-shopify', '_bx_shopify_menu_item_title_system_manage_my_entries', '_bx_shopify_menu_item_title_manage_my_entries', 'page.php?i=shopify-manage', '', '_self', 'shopping-cart col-green1', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:41:"get_menu_addon_manage_tools_profile_stats";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 1);
+
+-- MENU: manage tools submenu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify_menu_manage_tools', '_bx_shopify_menu_title_manage_tools', 'bx_shopify_menu_manage_tools', 'bx_shopify', 6, 0, 1, 'BxShopifyMenuManageTools', 'modules/boonex/shopify/classes/BxShopifyMenuManageTools.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_shopify_menu_manage_tools', 'bx_shopify', '_bx_shopify_menu_set_title_manage_tools', 0);
+
+--INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+--('bx_shopify_menu_manage_tools', 'bx_shopify', 'delete-with-content', '_bx_shopify_menu_item_title_system_delete_with_content', '_bx_shopify_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id});', '_self', 'trash-o', '', 128, 1, 0, 0);
+
+-- MENU: dashboard manage tools
+SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_account_dashboard_manage_tools', 'bx_shopify', 'shopify-administration', '_bx_shopify_menu_item_title_system_admt_entries', '_bx_shopify_menu_item_title_admt_entries', 'page.php?i=shopify-administration', '', '_self', '', 'a:2:{s:6:"module";s:10:"bx_shopify";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
+
+-- MENU: add menu item to profiles modules (trigger* menu sets are processed separately upon modules enable/disable)
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('trigger_profile_view_submenu', 'bx_shopify', 'shopify-author', '_bx_shopify_menu_item_title_system_view_entries_author', '_bx_shopify_menu_item_title_view_entries_author', 'page.php?i=shopify-author&profile_id={profile_id}', '', '', 'shopping-cart col-green1', '', 2147483647, 1, 0, 0);
+
+
+-- PRIVACY 
+INSERT INTO `sys_objects_privacy` (`object`, `module`, `action`, `title`, `default_group`, `table`, `table_field_id`, `table_field_author`, `override_class_name`, `override_class_file`) VALUES
+('bx_shopify_allow_view_to', 'bx_shopify', 'view', '_bx_shopify_form_entry_input_allow_view_to', '3', 'bx_shopify_entries', 'id', 'author', '', '');
+
+
+-- ACL
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_shopify', 'create entry', NULL, '_bx_shopify_acl_action_create_entry', '', 1, 3);
+SET @iIdActionEntryCreate = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_shopify', 'delete entry', NULL, '_bx_shopify_acl_action_delete_entry', '', 1, 3);
+SET @iIdActionEntryDelete = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_shopify', 'view entry', NULL, '_bx_shopify_acl_action_view_entry', '', 1, 0);
+SET @iIdActionEntryView = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_shopify', 'set thumb', NULL, '_bx_shopify_acl_action_set_thumb', '', 1, 3);
+SET @iIdActionSetThumb = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_shopify', 'edit any entry', NULL, '_bx_shopify_acl_action_edit_any_entry', '', 1, 3);
+SET @iIdActionEntryEditAny = LAST_INSERT_ID();
+
+SET @iUnauthenticated = 1;
+SET @iAccount = 2;
+SET @iStandard = 3;
+SET @iUnconfirmed = 4;
+SET @iPending = 5;
+SET @iSuspended = 6;
+SET @iModerator = 7;
+SET @iAdministrator = 8;
+SET @iPremium = 9;
+
+INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
+
+-- entry create
+(@iStandard, @iIdActionEntryCreate),
+(@iModerator, @iIdActionEntryCreate),
+(@iAdministrator, @iIdActionEntryCreate),
+(@iPremium, @iIdActionEntryCreate),
+
+-- entry delete
+(@iStandard, @iIdActionEntryDelete),
+(@iModerator, @iIdActionEntryDelete),
+(@iAdministrator, @iIdActionEntryDelete),
+(@iPremium, @iIdActionEntryDelete),
+
+-- entry view
+(@iUnauthenticated, @iIdActionEntryView),
+(@iAccount, @iIdActionEntryView),
+(@iStandard, @iIdActionEntryView),
+(@iUnconfirmed, @iIdActionEntryView),
+(@iPending, @iIdActionEntryView),
+(@iModerator, @iIdActionEntryView),
+(@iAdministrator, @iIdActionEntryView),
+(@iPremium, @iIdActionEntryView),
+
+-- set entry thumb
+(@iStandard, @iIdActionSetThumb),
+(@iModerator, @iIdActionSetThumb),
+(@iAdministrator, @iIdActionSetThumb),
+(@iPremium, @iIdActionSetThumb),
+
+-- edit any entry
+(@iModerator, @iIdActionEntryEditAny),
+(@iAdministrator, @iIdActionEntryEditAny);
+
+
+-- SEARCH
+SET @iSearchOrder = (SELECT IFNULL(MAX(`Order`), 0) FROM `sys_objects_search`);
+INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `ClassPath`) VALUES
+('bx_shopify', '_bx_shopify', @iSearchOrder + 1, 'BxShopifySearchResult', 'modules/boonex/shopify/classes/BxShopifySearchResult.php'),
+('bx_shopify_cmts', '_bx_shopify_cmts', @iSearchOrder + 2, 'BxShopifyCmtsSearchResult', 'modules/boonex/shopify/classes/BxShopifyCmtsSearchResult.php');
+
+
+-- METATAGS
+INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
+('bx_shopify', 'bx_shopify_meta_keywords', 'bx_shopify_meta_locations', 'bx_shopify_meta_mentions', '', '');
+
+
+-- CATEGORY
+INSERT INTO `sys_objects_category` (`object`, `search_object`, `form_object`, `list_name`, `table`, `field`, `join`, `where`, `override_class_name`, `override_class_file`) VALUES
+('bx_shopify_cats', 'bx_shopify', 'bx_shopify', 'bx_shopify_cats', 'bx_shopify_entries', 'cat', 'INNER JOIN `sys_profiles` ON (`sys_profiles`.`id` = `bx_shopify_entries`.`author`)', 'AND `sys_profiles`.`status` = ''active''', '', '');
+
+
+-- STATS
+SET @iMaxOrderStats = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_statistics`);
+INSERT INTO `sys_statistics` (`module`, `name`, `title`, `link`, `icon`, `query`, `order`) VALUES 
+('bx_shopify', 'bx_shopify', '_bx_shopify', 'page.php?i=shopify-home', 'shopping-cart col-green1', 'SELECT COUNT(*) FROM `bx_shopify_entries` WHERE 1 AND `status` = ''active'' AND `status_admin` = ''active''', @iMaxOrderStats + 1);
+
+
+-- CHARTS
+SET @iMaxOrderCharts = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_objects_chart`);
+INSERT INTO `sys_objects_chart` (`object`, `title`, `table`, `field_date_ts`, `field_date_dt`, `field_status`, `query`, `active`, `order`, `class_name`, `class_file`) VALUES
+('bx_shopify_growth', '_bx_shopify_chart_growth', 'bx_shopify_entries', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 1, 'BxDolChartGrowth', ''),
+('bx_shopify_growth_speed', '_bx_shopify_chart_growth_speed', 'bx_shopify_entries', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 2, 'BxDolChartGrowthSpeed', '');
+
+
+-- GRIDS: moderation tools
+INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
+('bx_shopify_administration', 'Sql', 'SELECT * FROM `bx_shopify_entries` WHERE 1 ', 'bx_shopify_entries', 'id', 'added', 'status_admin', '', 20, NULL, 'start', '', 'title,text', '', 'like', '', '', 192, 'BxShopifyGridAdministration', 'modules/boonex/shopify/classes/BxShopifyGridAdministration.php'),
+('bx_shopify_common', 'Sql', 'SELECT * FROM `bx_shopify_entries` WHERE 1 ', 'bx_shopify_entries', 'id', 'added', 'status', '', 20, NULL, 'start', '', 'title,text', '', 'like', '', '', 2147483647, 'BxShopifyGridCommon', 'modules/boonex/shopify/classes/BxShopifyGridCommon.php');
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
+('bx_shopify_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_shopify_administration', 'switcher', '_bx_shopify_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_shopify_administration', 'title', '_bx_shopify_grid_column_title_adm_title', '25%', 0, '25', '', 3),
+('bx_shopify_administration', 'added', '_bx_shopify_grid_column_title_adm_added', '20%', 1, '25', '', 4),
+('bx_shopify_administration', 'author', '_bx_shopify_grid_column_title_adm_author', '25%', 0, '25', '', 5),
+('bx_shopify_administration', 'actions', '', '20%', 0, '', '', 6),
+
+('bx_shopify_common', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_shopify_common', 'switcher', '_bx_shopify_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_shopify_common', 'title', '_bx_shopify_grid_column_title_adm_title', '40%', 0, '35', '', 3),
+('bx_shopify_common', 'added', '_bx_shopify_grid_column_title_adm_added', '30%', 1, '25', '', 4),
+('bx_shopify_common', 'actions', '', '20%', 0, '', '', 5);
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
+('bx_shopify_administration', 'bulk', 'delete', '_bx_shopify_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_shopify_administration', 'single', 'edit', '_bx_shopify_grid_action_title_adm_edit', 'pencil', 1, 0, 1),
+('bx_shopify_administration', 'single', 'delete', '_bx_shopify_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_shopify_administration', 'single', 'settings', '_bx_shopify_grid_action_title_adm_more_actions', 'cog', 1, 0, 3),
+
+('bx_shopify_common', 'bulk', 'delete', '_bx_shopify_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_shopify_common', 'single', 'edit', '_bx_shopify_grid_action_title_adm_edit', 'pencil', 1, 0, 1),
+('bx_shopify_common', 'single', 'delete', '_bx_shopify_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_shopify_common', 'single', 'settings', '_bx_shopify_grid_action_title_adm_more_actions', 'cog', 1, 0, 3);
+
+
+-- ALERTS
+INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES 
+('bx_shopify', 'BxShopifyAlertsResponse', 'modules/boonex/shopify/classes/BxShopifyAlertsResponse.php', '');
+SET @iHandler := LAST_INSERT_ID();
+
+INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
+('system', 'save_setting', @iHandler),
+('profile', 'delete', @iHandler);

+ 279 - 0
modules/boonex/shopify/updates/9.0.2_9.0.3/source/install/sql/install.sql

@@ -0,0 +1,279 @@
+SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
+
+
+-- TABLE: entries
+CREATE TABLE IF NOT EXISTS `bx_shopify_entries` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `author` int(10) unsigned NOT NULL,
+  `added` int(11) NOT NULL,
+  `changed` int(11) NOT NULL,
+  `title` varchar(255) NOT NULL,
+  `code` varchar(16) NOT NULL default '',
+  `cat` int(11) NOT NULL,
+  `views` int(11) NOT NULL default '0',
+  `rate` float NOT NULL default '0',
+  `votes` int(11) NOT NULL default '0',
+  `favorites` int(11) NOT NULL default '0',
+  `comments` int(11) NOT NULL default '0',
+  `reports` int(11) NOT NULL default '0',
+  `featured` int(11) NOT NULL default '0',
+  `allow_view_to` int(11) NOT NULL DEFAULT '3',
+  `status` enum('active','hidden') NOT NULL DEFAULT 'active',
+  `status_admin` enum('active','hidden') NOT NULL DEFAULT 'active',
+  PRIMARY KEY (`id`),
+  FULLTEXT KEY `title_text` (`title`)
+);
+
+-- TABLE: settings
+CREATE TABLE IF NOT EXISTS `bx_shopify_settings` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `author` int(10) unsigned NOT NULL,
+  `api_key` varchar(255) NOT NULL,
+  `domain` varchar(255) NOT NULL,
+  `app_id` tinyint(4) unsigned NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `author` (`author`)
+);
+
+-- TABLE: comments
+CREATE TABLE IF NOT EXISTS `bx_shopify_cmts` (
+  `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
+  `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_object_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_level` int(11) NOT NULL DEFAULT '0',
+  `cmt_text` text NOT NULL,
+  `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
+  `cmt_rate` int(11) NOT NULL DEFAULT '0',
+  `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
+  `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
+  `cmt_replies` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`cmt_id`),
+  KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
+  FULLTEXT KEY `search_fields` (`cmt_text`)
+);
+
+-- TABLE: votes
+CREATE TABLE IF NOT EXISTS `bx_shopify_votes` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  `sum` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_shopify_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`)
+);
+
+-- TABLE: views
+CREATE TABLE IF NOT EXISTS `bx_shopify_views_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `viewer_id` int(11) NOT NULL default '0',
+  `viewer_nip` int(11) unsigned NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
+);
+
+-- TABLE: metas
+CREATE TABLE IF NOT EXISTS `bx_shopify_meta_keywords` (
+  `object_id` int(10) unsigned NOT NULL,
+  `keyword` varchar(255) NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `keyword` (`keyword`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_shopify_meta_locations` (
+  `object_id` int(10) unsigned NOT NULL,
+  `lat` double NOT NULL,
+  `lng` double NOT NULL,
+  `country` varchar(2) NOT NULL,
+  `state` varchar(255) NOT NULL,
+  `city` varchar(255) NOT NULL,
+  `zip` varchar(255) NOT NULL,
+  `street` varchar(255) NOT NULL,
+  `street_number` varchar(255) NOT NULL,
+  PRIMARY KEY (`object_id`),
+  KEY `country_state_city` (`country`,`state`(8),`city`(8))
+);
+
+CREATE TABLE IF NOT EXISTS `bx_shopify_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
+-- TABLE: reports
+CREATE TABLE IF NOT EXISTS `bx_shopify_reports` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_shopify_reports_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',
+  `type` varchar(32) NOT NULL default '',
+  `text` text NOT NULL default '',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `report` (`object_id`, `author_nip`)
+);
+
+-- TABLE: favorites
+CREATE TABLE IF NOT EXISTS `bx_shopify_favorites_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`author_id`)
+);
+
+
+-- FORMS
+INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_shopify', 'bx_shopify', '_bx_shopify_form_entry', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_shopify_entries', 'id', '', '', 'a:2:{i:0;s:9:"do_submit";i:1;s:10:"do_publish";}', '', 0, 1, 'BxShopifyFormEntry', 'modules/boonex/shopify/classes/BxShopifyFormEntry.php'),
+('bx_shopify_settings', 'bx_shopify', '_bx_shopify_form_settings', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_shopify_settings', 'id', '', '', 'do_submit', '', 0, 1, 'BxShopifyFormSettings', 'modules/boonex/shopify/classes/BxShopifyFormSettings.php');
+
+INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES 
+('bx_shopify', 'bx_shopify_entry_add', 'bx_shopify', 0, '_bx_shopify_form_entry_display_add'),
+('bx_shopify', 'bx_shopify_entry_delete', 'bx_shopify', 0, '_bx_shopify_form_entry_display_delete'),
+('bx_shopify', 'bx_shopify_entry_edit', 'bx_shopify', 0, '_bx_shopify_form_entry_display_edit'),
+('bx_shopify', 'bx_shopify_entry_view', 'bx_shopify', 1, '_bx_shopify_form_entry_display_view'),
+
+('bx_shopify_settings', 'bx_shopify_settings_edit', 'bx_shopify', 0, '_bx_shopify_form_settings_display_edit');
+
+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_shopify', 'bx_shopify', 'allow_view_to', '', '', 0, 'custom', '_bx_shopify_form_entry_input_sys_allow_view_to', '_bx_shopify_form_entry_input_allow_view_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_shopify', 'bx_shopify', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_shopify_form_entry_input_sys_delete_confirm', '_bx_shopify_form_entry_input_delete_confirm', '_bx_shopify_form_entry_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_shopify_form_entry_input_delete_confirm_error', '', '', 1, 0),
+('bx_shopify', 'bx_shopify', 'do_publish', '_bx_shopify_form_entry_input_do_publish', '', 0, 'submit', '_bx_shopify_form_entry_input_sys_do_publish', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_shopify', 'bx_shopify', 'do_submit', '_bx_shopify_form_entry_input_do_submit', '', 0, 'submit', '_bx_shopify_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_shopify', 'bx_shopify', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_shopify', 'bx_shopify', 'title', '', '', 0, 'text', '_bx_shopify_form_entry_input_sys_title', '_bx_shopify_form_entry_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_shopify_form_entry_input_title_err', 'Xss', '', 1, 0),
+('bx_shopify', 'bx_shopify', 'code', '', '', 0, 'text', '_bx_shopify_form_entry_input_sys_code', '_bx_shopify_form_entry_input_code', '_bx_shopify_form_entry_input_code_inf', 1, 0, 0, '', '', '', 'Avail', '', '_bx_shopify_form_entry_input_code_err', 'Xss', '', 1, 0),
+('bx_shopify', 'bx_shopify', 'cat', '', '#!bx_shopify_cats', 0, 'select', '_bx_shopify_form_entry_input_sys_cat', '_bx_shopify_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_shopify_form_entry_input_cat_err', 'Xss', '', 1, 0),
+('bx_shopify', 'bx_shopify', 'added', '', '', 0, 'datetime', '_bx_shopify_form_entry_input_sys_date_added', '_bx_shopify_form_entry_input_date_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_shopify', 'bx_shopify', 'changed', '', '', 0, 'datetime', '_bx_shopify_form_entry_input_sys_date_changed', '_bx_shopify_form_entry_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+
+('bx_shopify_settings', 'bx_shopify', 'api_key', '', '', 0, 'text', '_bx_shopify_form_settings_input_sys_api_key', '_bx_shopify_form_settings_input_api_key', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_shopify_form_settings_input_api_key_err', 'Xss', '', 1, 0),
+('bx_shopify_settings', 'bx_shopify', 'domain', '', '', 0, 'text', '_bx_shopify_form_settings_input_sys_domain', '_bx_shopify_form_settings_input_domain', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_shopify_form_settings_input_domain_err', 'Xss', '', 1, 0),
+('bx_shopify_settings', 'bx_shopify', 'app_id', '', '', 0, 'text', '_bx_shopify_form_settings_input_sys_app_id', '_bx_shopify_form_settings_input_app_id', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_shopify_form_settings_input_app_id_err', 'Int', '', 1, 0),
+('bx_shopify_settings', 'bx_shopify', 'do_submit', '_bx_shopify_form_settings_input_do_submit', '', 0, 'submit', '_bx_shopify_form_settings_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
+
+INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
+('bx_shopify_entry_add', 'code', 2147483647, 1, 1),
+('bx_shopify_entry_add', 'title', 2147483647, 1, 2),
+('bx_shopify_entry_add', 'cat', 2147483647, 1, 3),
+('bx_shopify_entry_add', 'allow_view_to', 2147483647, 1, 4),
+('bx_shopify_entry_add', 'location', 2147483647, 1, 5),
+('bx_shopify_entry_add', 'do_publish', 2147483647, 1, 6),
+
+('bx_shopify_entry_delete', 'delete_confirm', 2147483647, 1, 1),
+('bx_shopify_entry_delete', 'do_submit', 2147483647, 1, 2),
+
+('bx_shopify_entry_edit', 'code', 2147483647, 1, 1),
+('bx_shopify_entry_edit', 'title', 2147483647, 1, 2),
+('bx_shopify_entry_edit', 'cat', 2147483647, 1, 3),
+('bx_shopify_entry_edit', 'allow_view_to', 2147483647, 1, 4),
+('bx_shopify_entry_edit', 'location', 2147483647, 1, 5),
+('bx_shopify_entry_edit', 'do_submit', 2147483647, 1, 6),
+
+('bx_shopify_entry_view', 'cat', 2147483647, 1, 1),
+('bx_shopify_entry_view', 'added', 2147483647, 1, 2),
+('bx_shopify_entry_view', 'changed', 2147483647, 1, 3),
+
+('bx_shopify_entry_view_full', 'cat', 2147483647, 1, 1),
+('bx_shopify_entry_view_full', 'added', 2147483647, 1, 2),
+('bx_shopify_entry_view_full', 'changed', 2147483647, 1, 3),
+
+('bx_shopify_settings_edit', 'mode', 2147483647, 1, 1),
+('bx_shopify_settings_edit', 'api_key', 2147483647, 1, 2),
+('bx_shopify_settings_edit', 'domain', 2147483647, 1, 3),
+('bx_shopify_settings_edit', 'app_id', 2147483647, 1, 4),
+('bx_shopify_settings_edit', 'do_submit', 2147483647, 1, 5);
+
+
+-- PRE-VALUES
+INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`, `extendable`) VALUES
+('bx_shopify_cats', '_bx_shopify_pre_lists_cats', 'bx_shopify', '0', '1');
+
+INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
+('bx_shopify_cats', '', 0, '_sys_please_select', ''),
+('bx_shopify_cats', '1', 1, '_bx_shopify_cat_automotive_and_industrial', ''),
+('bx_shopify_cats', '2', 2, '_bx_shopify_cat_beauty_health_food', ''),
+('bx_shopify_cats', '3', 3, '_bx_shopify_cat_books', ''),
+('bx_shopify_cats', '4', 4, '_bx_shopify_cat_clothing_shoes_jewelry', ''),
+('bx_shopify_cats', '5', 5, '_bx_shopify_cat_electronics_and_computers', ''),
+('bx_shopify_cats', '6', 6, '_bx_shopify_cat_handmade', ''),
+('bx_shopify_cats', '7', 7, '_bx_shopify_cat_home_garden_tools', ''),
+('bx_shopify_cats', '8', 8, '_bx_shopify_cat_movies_music_games', ''),
+('bx_shopify_cats', '9', 9, '_bx_shopify_cat_sports_and_outdoors', ''),
+('bx_shopify_cats', '10', 10, '_bx_shopify_cat_toys_kids_baby', '');
+
+
+-- COMMENTS
+INSERT INTO `sys_objects_cmts` (`Name`, `Module`, `Table`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Nl2br`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `ObjectVote`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
+('bx_shopify', 'bx_shopify', 'bx_shopify_cmts', 1, 5000, 1000, 0, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-shopify-entry&id={object_id}', '', 'bx_shopify_entries', 'id', 'author', 'title', 'comments', '', '');
+
+
+-- VOTES
+INSERT INTO `sys_objects_vote` (`Name`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES 
+('bx_shopify', 'bx_shopify_votes', 'bx_shopify_votes_track', '604800', '1', '1', '0', '1', 'bx_shopify_entries', 'id', 'author', 'rate', 'votes', '', '');
+
+
+-- REPORTS
+INSERT INTO `sys_objects_report` (`name`, `table_main`, `table_track`, `is_on`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_shopify', 'bx_shopify_reports', 'bx_shopify_reports_track', '1', 'page.php?i=view-shopify-entry&id={object_id}', 'bx_shopify_entries', 'id', 'author', 'reports', '', '');
+
+
+-- VIEWS
+INSERT INTO `sys_objects_view` (`name`, `table_track`, `period`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_shopify', 'bx_shopify_views_track', '86400', '1', 'bx_shopify_entries', 'id', 'author', 'views', '', '');
+
+
+-- FAFORITES
+INSERT INTO `sys_objects_favorite` (`name`, `table_track`, `is_on`, `is_undo`, `is_public`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_shopify', 'bx_shopify_favorites_track', '1', '1', '1', 'page.php?i=view-shopify-entry&id={object_id}', 'bx_shopify_entries', 'id', 'author', 'favorites', '', '');
+
+
+-- FEATURED
+INSERT INTO `sys_objects_feature` (`name`, `is_on`, `is_undo`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_flag`, `class_name`, `class_file`) VALUES 
+('bx_shopify', '1', '1', 'page.php?i=view-shopify-entry&id={object_id}', 'bx_shopify_entries', 'id', 'author', 'featured', '', '');
+
+
+-- CONTENT INFO
+INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
+('bx_shopify', '_bx_shopify', 'bx_shopify', 'added', 'edited', 'deleted', '', ''),
+('bx_shopify_cmts', '_bx_shopify_cmts', 'bx_shopify', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
+
+INSERT INTO `sys_content_info_grids` (`object`, `grid_object`, `grid_field_id`, `condition`, `selection`) VALUES
+('bx_shopify', 'bx_shopify_administration', 'id', '', ''),
+('bx_shopify', 'bx_shopify_common', 'id', '', '');
+
+
+-- SEARCH EXTENDED
+INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
+('bx_shopify', 'bx_shopify', 'bx_shopify', '_bx_shopify_search_extended', 1, '', ''),
+('bx_shopify_cmts', 'bx_shopify_cmts', 'bx_shopify', '_bx_shopify_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
+
+
+-- STUDIO: page & widget
+INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
+(3, 'bx_shopify', '_bx_shopify', '_bx_shopify', 'bx_shopify@modules/boonex/shopify/|std-icon.svg');
+SET @iPageId = LAST_INSERT_ID();
+
+SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
+SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
+INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
+(@iPageId, 'bx_shopify', '{url_studio}module.php?name=bx_shopify', '', 'bx_shopify@modules/boonex/shopify/|std-icon.svg', '_bx_shopify', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
+INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
+(@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));

+ 55 - 0
modules/boonex/shopify/updates/9.0.2_9.0.3/source/install/sql/uninstall.sql

@@ -0,0 +1,55 @@
+
+-- TABLES
+DROP TABLE IF EXISTS `bx_shopify_entries`, `bx_shopify_settings`, `bx_shopify_cmts`, `bx_shopify_votes`, `bx_shopify_votes_track`, `bx_shopify_views_track`, `bx_shopify_meta_keywords`, `bx_shopify_meta_locations`, `bx_shopify_meta_mentions`, `bx_shopify_reports`, `bx_shopify_reports_track`, `bx_shopify_favorites_track`;
+
+
+-- FORMS
+DELETE FROM `sys_objects_form` WHERE `module` = 'bx_shopify';
+DELETE FROM `sys_form_displays` WHERE `module` = 'bx_shopify';
+DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_shopify';
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN ('bx_shopify_entry_add', 'bx_shopify_entry_edit', 'bx_shopify_entry_view', 'bx_shopify_entry_view_full', 'bx_shopify_entry_delete', 'bx_shopify_settings_edit');
+
+
+-- PRE-VALUES
+DELETE FROM `sys_form_pre_lists` WHERE `module` = 'bx_shopify';
+DELETE FROM `sys_form_pre_values` WHERE `Key` IN('bx_shopify_cats');
+
+
+-- COMMENTS
+DELETE FROM `sys_objects_cmts` WHERE `Name` = 'bx_shopify';
+
+
+-- VOTES
+DELETE FROM `sys_objects_vote` WHERE `Name` = 'bx_shopify';
+
+
+-- REPORTS
+DELETE FROM `sys_objects_report` WHERE `name` = 'bx_shopify';
+
+
+-- VIEWS
+DELETE FROM `sys_objects_view` WHERE `name` = 'bx_shopify';
+
+
+-- FAFORITES
+DELETE FROM `sys_objects_favorite` WHERE `name` = 'bx_shopify';
+
+
+-- FEATURED
+DELETE FROM `sys_objects_feature` WHERE `name` = 'bx_shopify';
+
+
+-- CONTENT INFO
+DELETE FROM `sys_objects_content_info` WHERE `name` IN ('bx_shopify', 'bx_shopify_cmts');
+
+DELETE FROM `sys_content_info_grids` WHERE `object` IN ('bx_shopify');
+
+
+-- SEARCH EXTENDED
+DELETE FROM `sys_objects_search_extended` WHERE `module` = 'bx_shopify';
+
+
+-- STUDIO: page & widget
+DELETE FROM `tp`, `tw`, `tpw`
+USING `sys_std_pages` AS `tp`, `sys_std_widgets` AS `tw`, `sys_std_pages_widgets` AS `tpw`
+WHERE `tp`.`id` = `tw`.`page_id` AND `tw`.`id` = `tpw`.`widget_id` AND `tp`.`name` = 'bx_shopify';

+ 1 - 0
modules/boonex/shopify/updates/9.0.2_9.0.3/source/template/unit_showcase.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/unit_showcase.html />

+ 42 - 0
modules/boonex/smtpmailer/updates/9.0.2_9.0.3/source/classes/BxSMTPStudioPage.php

@@ -0,0 +1,42 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    SMTPMailer SMTP Mailer
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxSMTPStudioPage extends BxTemplStudioModule
+{
+    protected $oModule;
+
+    function __construct($sModule = "", $sPage = "")
+    {
+        parent::__construct($sModule, $sPage);
+
+        $this->oModule = BxDolModule::getInstance('bx_smtp');
+
+        $this->aMenuItems = array(
+            array('name' => 'settings', 'icon' => 'cogs', 'title' => '_adm_lmi_cpt_settings'),
+            array('name' => 'tester', 'icon' => 'envelope', 'title' => '_bx_smtp_tester'),
+            array('name' => 'help', 'icon' => 'question', 'title' => '_bx_smtp_help'),
+        );
+    }
+
+    function getTester ()
+    {
+        return $this->oModule->formTester();
+    }
+
+    function getHelp ()
+    {
+        return _t('_bx_smtp_help_text');
+    }
+
+
+}
+
+/** @} */

+ 68 - 0
modules/boonex/smtpmailer/updates/9.0.2_9.0.3/source/install/config.php

@@ -0,0 +1,68 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    SMTPMailer SMTP Mailer
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_smtp',
+    'title' => 'SMTP Mailer',
+    'note' => 'Use remote SMTP server for sending mails.',
+    'version' => '9.0.3',
+    'vendor' => 'BoonEx',
+	'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC5'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/smtpmailer/',
+    'home_uri' => 'smtpmailer',
+
+    'db_prefix' => 'bx_smtp_',
+    'class_prefix' => 'BxSMTP',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'SMTP Mailer',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array(
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+);
+
+/** @} */

+ 55 - 0
modules/boonex/smtpmailer/updates/9.0.2_9.0.3/source/install/langs/en.xml

@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+	<string name="_bx_smtp"><![CDATA[SMTP Mailer]]></string>
+	<string name="_bx_smtp_tester"><![CDATA[Test]]></string>
+	<string name="_bx_smtp_recipient"><![CDATA[Recipient]]></string>
+	<string name="_bx_smtp_subject"><![CDATA[Subject]]></string>
+	<string name="_bx_smtp_body"><![CDATA[Body]]></string>
+	<string name="_bx_smtp_is_html"><![CDATA[Is HTML?]]></string>
+	<string name="_bx_smtp_send_ok"><![CDATA[Mail has been successfully sent]]></string>
+	<string name="_bx_smtp_send_fail"><![CDATA[Mail send failed]]></string>
+	<string name="_bx_smtp_help"><![CDATA[Help]]></string>
+	<string name="_bx_smtp_help_text"><![CDATA[
+        <b>SMTP authentication </b> - most SMTP servers requires SMTP authentication, most probably you need to enable it.
+        <br />
+        <b>SMTP server name</b> - is it better to send mail from your site SMTP server, so it is probably the name of your site or localhost.
+        <br />
+        <b>SMTP username/SMTP password</b> - registered email account username and password, it is better to create different account for this purpose, like no-reply@mysite.com.
+        <br />
+        <b>From name of the message</b> - recipients will see this name as email sender, so it is probably your site name.
+        <br />
+        <b>Is your SMTP server requires secure connection</b> - you can disable it if your hostname is localhost, secure connection is not needed if you send mails from localhost.
+        <br />
+        <b>Enable SMTP mailer</b> - it is possible to disable SMTP mailer at all, for example if you have temporary problems with your SMTP server. 
+        <br />
+        <b>Override default sender email address</b> - set this the same as <b>SMTP username</b> email address, to avoid problems with mail marked as spam.
+        <br />
+        <br />
+        Alternatively, you can get above options from your desktop mail client, if you are going to use the same email address for sending mail from your site.
+        
+        <hr class="bx-def-hr" />
+
+        If emails still go to spam folder, check the following:
+        <ul>
+            <li>Try to set "Override default sender email address" field the same as "SMTP username" email address</li>
+            <li>Make sure that "Override default sender email address" is valid and exists</li>
+            <li>Try to change default email templates, it maybe that standard ones can be in spam filters, since they are used on a lot of sites by default</li>
+            <li>Ask your members to add your site email to their contacts - when email is in user's contact list it always goes to inbox</li>
+            <li><a href="http://www.boonex.com/trac/dolphin/wiki/TutorialTweakingSpamFilters" target="_blank">This is great tutorial</a> on how to whitelist your server in many popular webmail services, including yahoo</li>
+        </ul>
+]]></string>
+    <string name="_bx_smtp_adm_stg_cpt_type"><![CDATA[SMTP Mailer]]></string>
+    <string name="_bx_smtp_adm_stg_cpt_category_general"><![CDATA[General]]></string>
+    
+    <string name="_bx_smtp_option_on"><![CDATA[Enable SMTP mailer]]></string>
+    <string name="_bx_smtp_option_auth"><![CDATA[SMTP authentication (Is your SMTP server requires username and password?)]]></string>
+    <string name="_bx_smtp_option_username"><![CDATA[SMTP username (only if SMTP authentication is enabled)]]></string>
+    <string name="_bx_smtp_option_password"><![CDATA[SMTP password (only if SMTP authentication is enabled)]]></string>
+    <string name="_bx_smtp_option_host"><![CDATA[SMTP server name or IP address]]></string>
+    <string name="_bx_smtp_option_port"><![CDATA[SMTP server port number (25 - default, 465 - for secure ssl connection, 587 - for secure tls connection)]]></string>
+    <string name="_bx_smtp_option_secure"><![CDATA[Is your SMTP server requires secure connection]]></string>
+    <string name="_bx_smtp_option_allow_selfsigned"><![CDATA[Allow self-signed certificates]]></string>
+    <string name="_bx_smtp_option_from_name"><![CDATA['From' name of the message]]></string>
+    <string name="_bx_smtp_option_from_email"><![CDATA[Override default sender email address]]></string>
+</resources>
+

+ 8 - 9
modules/boonex/snipcart/updates/9.0.2_9.0.3/install/sql/install.sql

@@ -1,3 +1,11 @@
+-- TABLES
+CREATE TABLE IF NOT EXISTS `bx_snipcart_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
 -- TABLE: bx_snipcart_cmts
 
 ALTER TABLE `bx_snipcart_cmts` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -141,15 +149,6 @@ REPAIR TABLE `bx_snipcart_votes_track`;
 OPTIMIZE TABLE `bx_snipcart_votes_track`;
 
 
--- TABLES
-CREATE TABLE IF NOT EXISTS `bx_snipcart_meta_mentions` (
-  `object_id` int(10) unsigned NOT NULL,
-  `profile_id` int(10) unsigned NOT NULL,
-  KEY `object_id` (`object_id`),
-  KEY `profile_id` (`profile_id`)
-);
-
-
 -- FORMS
 UPDATE `sys_objects_form` SET `submit_name`='a:2:{i:0;s:9:"do_submit";i:1;s:10:"do_publish";}' WHERE `object`='bx_snipcart';
 

+ 197 - 0
modules/boonex/snipcart/updates/9.0.2_9.0.3/source/classes/BxSnipcartModule.php

@@ -0,0 +1,197 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Snipcart Snipcart
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+define('BX_SNIPCART_MODE_TEST', 'test');
+define('BX_SNIPCART_MODE_LIVE', 'live');
+
+/**
+ * Snipcart module
+ */
+class BxSnipcartModule extends BxBaseModTextModule
+{
+    function __construct(&$aModule)
+    {
+        parent::__construct($aModule);
+
+        $CNF = &$this->_oConfig->CNF;
+        $this->_aSearchableNamesExcept = array_merge($this->_aSearchableNamesExcept, array(
+             $CNF['FIELD_PRICE'],
+             $CNF['FIELD_WEIGHT']
+        ));
+    }
+
+    public function getSettings($iProfileId = 0)
+    {
+        if(empty($iProfileId))
+            $iProfileId = bx_get_logged_profile_id();
+
+        $aSettings = $this->_oDb->getSettings(array('type' => 'author', 'author' => $iProfileId));
+        if(empty($aSettings) || !is_array($aSettings))
+            return array();
+
+        return $aSettings;
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_snipcart Snipcart
+     * @subsection bx_snipcart-other Other
+     * @subsubsection bx_snipcart-get_searchable_fields get_searchable_fields
+     * 
+     * @code bx_srv('bx_snipcart', 'get_searchable_fields', [...]); @endcode
+     * 
+     * Get a list of searchable fields. Is used in common search engine. 
+     *
+     * @return an array with a list of searchable fields.
+     * 
+     * @see BxSnipcartModule::serviceGetSearchableFields
+     */
+    /** 
+     * @ref bx_snipcart-get_searchable_fields "get_searchable_fields"
+     */
+    public function serviceGetSearchableFields ()
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aResult = parent::serviceGetSearchableFields();
+        unset($aResult[$CNF['FIELD_PRICE']], $aResult[$CNF['FIELD_WEIGHT']]);
+
+        return $aResult;
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_snipcart Snipcart
+     * @subsection bx_snipcart-integration Integration
+     * @subsubsection bx_snipcart-include_css_js include_css_js
+     * 
+     * @code bx_srv('bx_snipcart', 'include_css_js', [...]); @endcode
+     * 
+     * Get integration code with all necessary CSS and JS includes. 
+     *
+     * @return HTML sting with integration code to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML. Empty string is returned if there is no enough input data.
+     * 
+     * @see BxSnipcartModule::serviceIncludeCssJs
+     */
+    /** 
+     * @ref bx_snipcart-include_css_js "include_css_js"
+     */
+    public function serviceIncludeCssJs($iProfileId = 0)
+    {
+        $iProfileId = !empty($iProfileId) ? $iProfileId : $this->_iProfileId;
+        if(empty($iProfileId))
+            return '';
+
+        return $this->_oTemplate->getSctInclude($iProfileId);
+    }
+
+	/**
+     * @page service Service Calls
+     * @section bx_snipcart Snipcart
+     * @subsection bx_snipcart-page_blocks Page Blocks
+     * @subsubsection bx_snipcart-entity_create entity_create
+     * 
+     * @code bx_srv('bx_snipcart', 'entity_create', [...]); @endcode
+     * 
+     * Get page block with product creation form or an error message if something wasn't configured correctly.
+     *
+     * @param $sDisplay form display name to use
+     * @return HTML string with block content to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxSnipcartModule::serviceEntityCreate
+     */
+    /** 
+     * @ref bx_snipcart-entity_create "entity_create"
+     */
+    public function serviceEntityCreate ($sDisplay = false)
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+    	$aSettings = $this->_oDb->getSettings(array('type' => 'author', 'author' => $this->_iProfileId));
+        if(empty($aSettings) || !is_array($aSettings))
+    		return MsgBox(_t('_bx_snipcart_err_not_configured', BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($CNF['URL_SETTINGS'])));
+
+    	return parent::serviceEntityCreate($sDisplay);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_snipcart Snipcart
+     * @subsection bx_snipcart-page_blocks Page Blocks
+     * @subsubsection bx_snipcart-settings settings
+     * 
+     * @code bx_srv('bx_snipcart', 'settings', [...]); @endcode
+     * 
+     * Get page block with configuration settings form.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxSnipcartModule::serviceSettings
+     */
+    /** 
+     * @ref bx_snipcart-settings "settings"
+     */
+    public function serviceSettings()
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        if(!$this->_iProfileId)
+            return MsgBox(_t('_Access denied'));
+
+        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_SETTINGS'], $CNF['OBJECT_FORM_SETTINGS_DISPLAY_EDIT'], $this->_oTemplate);
+        if(!$oForm)
+            return MsgBox(_t('_sys_txt_error_occured'));       
+
+        $aSettings = $this->_oDb->getSettings(array('type' => 'author', 'author' => $this->_iProfileId));
+        $bSettings = !empty($aSettings) && is_array($aSettings);
+
+        $sResultTimer = 0;
+        $sResultMessage = '';
+
+        $oForm->initChecker($aSettings);
+        if($oForm->isSubmittedAndValid()) {         
+            if(!$bSettings) {
+                if((int)$oForm->insert(array('author' => $this->_iProfileId)) > 0) {
+                    $sResultTimer = 3;
+                    $sResultMessage = '_bx_snipcart_msg_save_settings';
+                }
+                else 
+                    $sResultMessage = '_bx_snipcart_err_save_settings';
+                
+            }
+            else {
+                if($oForm->update($aSettings['id']) !== false) {
+                    $sResultTimer = 3;
+                    $sResultMessage = '_bx_snipcart_msg_save_settings';
+                }
+                else 
+                    $sResultMessage = '_bx_snipcart_err_save_settings';
+            }
+        }
+
+        return array(
+        	'content' => (!empty($sResultMessage) ? MsgBox(_t($sResultMessage), $sResultTimer) : '') . $oForm->getCode()
+        );
+    }
+
+    protected function _getContentForTimelinePost($aEvent, $aContentInfo, $aBrowseParams = array())
+    {
+        $aResult = parent::_getContentForTimelinePost($aEvent, $aContentInfo, $aBrowseParams);
+
+        $aResult['raw'] = $this->_oTemplate->getBuyButton($aContentInfo);
+        if(isset($aBrowseParams['dynamic_mode']) && (bool)$aBrowseParams['dynamic_mode'] === true)
+            $aResult['raw'] .= $this->_oTemplate->addCss(array('timeline.css'), true);
+
+        return $aResult;
+    }
+}
+
+/** @} */

+ 135 - 0
modules/boonex/snipcart/updates/9.0.2_9.0.3/source/install/config.php

@@ -0,0 +1,135 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Snipcart Snipcart
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_snipcart',
+    'title' => 'Snipcart',
+    'note' => 'Snipcart shopping module.',
+    'version' => '9.0.3',
+    'vendor' => 'BoonEx',
+	'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC5'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/snipcart/',
+    'home_uri' => 'snipcart',
+
+    'db_prefix' => 'bx_snipcart_',
+    'class_prefix' => 'BxSnipcart',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Snipcart',
+
+    /**
+     * List of page triggers.
+     */
+    'page_triggers' => array (
+    	'trigger_page_profile_view_entry',
+    ),
+    
+    /**
+     * Menu triggers.
+     */
+    'menu_triggers' => array(
+    	'trigger_profile_view_submenu'
+    ),
+
+	/**
+     * Storage objects to automatically delete files from upon module uninstallation.
+     * Note. Don't add storage objects used in transcoder objects.
+     */
+    'storages' => array(
+    	'bx_snipcart_files'
+    ),
+
+    /**
+     * Transcoders.
+     */
+    'transcoders' => array(
+		'bx_snipcart_preview',
+        'bx_snipcart_gallery',
+        'bx_snipcart_cover'
+    ),
+
+    /**
+     * Extended Search Forms.
+     */
+    'esearches' => array(
+        'bx_snipcart',
+    	'bx_snipcart_cmts',
+    ),
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'uninstall' => array (
+    	'process_esearches' => 1,
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable_success' => array(
+        'process_menu_triggers' => 1,
+        'process_page_triggers' => 1,
+    	'process_esearches' => 1,
+    	'register_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+    	'update_relations' => 1,
+    	'unregister_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable_failed' => array (
+    	'register_transcoders' => 1,
+    	'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+
+    /**
+     * Relations Section
+     */
+    'relations' => array(
+    	'bx_timeline',
+    	'bx_notifications'
+    ),
+
+);
+
+/** @} */

+ 248 - 0
modules/boonex/snipcart/updates/9.0.2_9.0.3/source/install/langs/en.xml

@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+
+	<string name="_bx_snipcart"><![CDATA[Snipcart]]></string>
+	<string name="_bx_snipcart_cmts"><![CDATA[Snipcart's Reviews]]></string>
+
+	<string name="_bx_snipcart_option_summary_chars"><![CDATA[Number of characters in auto-cropped item summary]]></string>
+	<string name="_bx_snipcart_option_plain_summary_chars"><![CDATA[Number of characters in plain item description when item hasn't thumb]]></string>
+	<string name="_bx_snipcart_option_per_page_browse"><![CDATA[Number of items per page]]></string>
+	<string name="_bx_snipcart_option_per_page_profile"><![CDATA[Number of items on profile page]]></string>
+	<string name="_bx_snipcart_option_rss_num"><![CDATA[Number of items in RSS feed]]></string>
+	<string name="_bx_snipcart_option_searchable_fields"><![CDATA[Searchable fields for keyword search]]></string>
+
+	<string name="_bx_snipcart_form_entry"><![CDATA[Goods]]></string>
+	<string name="_bx_snipcart_form_entry_display_add"><![CDATA[Add Goods]]></string>
+	<string name="_bx_snipcart_form_entry_display_edit"><![CDATA[Edit Goods]]></string>
+	<string name="_bx_snipcart_form_entry_display_delete"><![CDATA[Delete Goods]]></string>
+	<string name="_bx_snipcart_form_entry_display_view"><![CDATA[View Goods]]></string>
+	<string name="_bx_snipcart_form_entry_input_author"><![CDATA[Author]]></string>
+	<string name="_bx_snipcart_form_entry_input_sys_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_snipcart_form_entry_input_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_snipcart_form_entry_input_sys_do_publish"><![CDATA[Publish]]></string>
+	<string name="_bx_snipcart_form_entry_input_do_publish"><![CDATA[Publish]]></string>
+	<string name="_bx_snipcart_form_entry_input_sys_title"><![CDATA[Title]]></string>
+	<string name="_bx_snipcart_form_entry_input_title"><![CDATA[Title]]></string>
+	<string name="_bx_snipcart_form_entry_input_title_err"><![CDATA[Title is essential. Please, fill in this field]]></string>
+	<string name="_bx_snipcart_form_entry_input_sys_cat"><![CDATA[Category]]></string>
+	<string name="_bx_snipcart_form_entry_input_cat"><![CDATA[Category]]></string>
+    <string name="_bx_snipcart_form_entry_input_cat_err"><![CDATA[Please select category]]></string>
+	<string name="_bx_snipcart_form_entry_input_sys_text"><![CDATA[Text]]></string>
+	<string name="_bx_snipcart_form_entry_input_text"><![CDATA[Text]]></string>
+	<string name="_bx_snipcart_form_entry_input_text_err"><![CDATA[Text field can't be empty]]></string>
+	<string name="_bx_snipcart_form_entry_input_sys_price"><![CDATA[Price]]></string>
+    <string name="_bx_snipcart_form_entry_input_price"><![CDATA[Price]]></string>
+    <string name="_bx_snipcart_form_entry_input_price_inf"><![CDATA[The value is indicated in %s.]]></string>
+    <string name="_bx_snipcart_form_entry_input_price_err"><![CDATA[Price field can't be empty]]></string>
+    <string name="_bx_snipcart_form_entry_input_sys_weight"><![CDATA[Weight]]></string>
+    <string name="_bx_snipcart_form_entry_input_weight"><![CDATA[Weight]]></string>
+    <string name="_bx_snipcart_form_entry_input_weight_inf"><![CDATA[The value is indicated in Kg.]]></string>
+    <string name="_bx_snipcart_form_entry_input_weight_err"><![CDATA[Weight field can't be empty]]></string>
+    <string name="_bx_snipcart_form_entry_input_weight_value"><![CDATA[{0} Kg]]></string>
+	<string name="_bx_snipcart_form_entry_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
+	<string name="_bx_snipcart_form_entry_input_delete_confirm"><![CDATA[I am sure I want to delete this product]]></string>
+	<string name="_bx_snipcart_form_entry_input_delete_confirm_info"><![CDATA[This action can not be undone]]></string>
+	<string name="_bx_snipcart_form_entry_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete the product]]></string>
+	<string name="_bx_snipcart_form_entry_input_sys_pictures"><![CDATA[Pictures]]></string>
+	<string name="_bx_snipcart_form_entry_input_pictures"><![CDATA[Pictures]]></string>
+    <string name="_bx_snipcart_form_entry_input_sys_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_snipcart_form_entry_input_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_snipcart_form_entry_input_picture_use_as_thumb"><![CDATA[Cover Image]]></string>
+    <string name="_bx_snipcart_form_entry_input_sys_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_snipcart_form_entry_input_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_snipcart_form_entry_input_sys_date_changed"><![CDATA[Updated]]></string>
+    <string name="_bx_snipcart_form_entry_input_date_changed"><![CDATA[Updated]]></string>
+
+    <string name="_bx_snipcart_form_settings"><![CDATA[Settings]]></string>
+    <string name="_bx_snipcart_form_settings_display_edit"><![CDATA[Edit Settings]]></string>
+    <string name="_bx_snipcart_form_settings_input_sys_mode"><![CDATA[Mode]]></string>
+    <string name="_bx_snipcart_form_settings_input_mode"><![CDATA[Mode]]></string>
+    <string name="_bx_snipcart_form_settings_input_mode_err"><![CDATA[Mode is essential. Please, fill in this field.]]></string>
+    <string name="_bx_snipcart_form_settings_input_sys_api_key_test"><![CDATA[API Key (test)]]></string>
+    <string name="_bx_snipcart_form_settings_input_api_key_test"><![CDATA[API Key (test)]]></string>
+    <string name="_bx_snipcart_form_settings_input_sys_api_key_live"><![CDATA[API Key (live)]]></string>
+    <string name="_bx_snipcart_form_settings_input_api_key_live"><![CDATA[API Key (live)]]></string>
+    <string name="_bx_snipcart_form_settings_input_sys_currency"><![CDATA[Currency]]></string>
+    <string name="_bx_snipcart_form_settings_input_currency"><![CDATA[Currency]]></string>
+    <string name="_bx_snipcart_form_settings_input_currency_inf"><![CDATA[Select the default Currency from your Snipcart account.]]></string>
+    <string name="_bx_snipcart_form_settings_input_currency_err"><![CDATA[Currency is essential. Please, fill in this field.]]></string>    
+    <string name="_bx_snipcart_form_settings_input_sys_do_submit"><![CDATA[Submit]]></string>
+    <string name="_bx_snipcart_form_settings_input_do_submit"><![CDATA[Submit]]></string>
+
+	<string name="_bx_snipcart_acl_action_create_entry"><![CDATA[Create Goods]]></string>
+	<string name="_bx_snipcart_acl_action_delete_entry"><![CDATA[Delete Goods]]></string>
+	<string name="_bx_snipcart_acl_action_view_entry"><![CDATA[View Goods]]></string>
+	<string name="_bx_snipcart_acl_action_set_thumb"><![CDATA[Set Goods Thumbnail]]></string>
+	<string name="_bx_snipcart_acl_action_edit_any_entry"><![CDATA[Edit Any Goods]]></string>
+
+	<string name="_bx_snipcart_page_title_sys_create_entry"><![CDATA[New Goods]]></string>
+	<string name="_bx_snipcart_page_title_create_entry"><![CDATA[New Item]]></string>
+	<string name="_bx_snipcart_page_block_title_create_entry"><![CDATA[New Item]]></string>
+	<string name="_bx_snipcart_page_title_sys_edit_entry"><![CDATA[Edit]]></string>
+	<string name="_bx_snipcart_page_title_edit_entry"><![CDATA[Edit]]></string>
+	<string name="_bx_snipcart_page_block_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_snipcart_page_title_sys_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_snipcart_page_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_snipcart_page_block_title_delete_entry"><![CDATA[Delete]]></string>
+	<string name="_bx_snipcart_page_title_sys_view_entry"><![CDATA[View Goods]]></string>
+	<string name="_bx_snipcart_page_title_view_entry"><![CDATA[{title}]]></string>
+	<string name="_bx_snipcart_page_block_title_entry_text"><![CDATA[Item Text]]></string>
+	<string name="_bx_snipcart_page_title_browse"><![CDATA[Goods]]></string>
+	<string name="_bx_snipcart_page_title_search_results"><![CDATA[Goods matching "{0}"]]></string>
+	<string name="_bx_snipcart_page_title_browse_by_author"><![CDATA[Goods of {display_name}]]></string>
+	<string name="_bx_snipcart_page_title_browse_featured"><![CDATA[Featured Goods]]></string>
+    <string name="_bx_snipcart_page_title_browse_recent"><![CDATA[Latest Goods]]></string>
+    <string name="_bx_snipcart_page_title_browse_popular"><![CDATA[Popular Goods]]></string>
+    <string name="_bx_snipcart_page_title_browse_updated"><![CDATA[Updated Goods]]></string>
+    <string name="_bx_snipcart_page_title_sys_home"><![CDATA[Goods Home]]></string>
+    <string name="_bx_snipcart_page_title_home"><![CDATA[Goods]]></string>
+    <string name="_bx_snipcart_page_block_title_featured_entries_view_extended"><![CDATA[Featured Goods]]></string>
+    <string name="_bx_snipcart_page_block_title_recent_entries"><![CDATA[Latest Goods (Gallery View)]]></string>
+    <string name="_bx_snipcart_page_block_title_recent_entries_view_extended"><![CDATA[Latest Goods]]></string>
+    <string name="_bx_snipcart_page_block_title_recent_entries_view_full"><![CDATA[Latest Goods (Full View)]]></string>
+    <string name="_bx_snipcart_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
+    <string name="_bx_snipcart_page_block_title_entry_author"><![CDATA[Author]]></string>
+    <string name="_bx_snipcart_page_block_title_entry_actions"><![CDATA[Actions]]></string>
+    <string name="_bx_snipcart_page_block_title_entry_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_snipcart_page_block_title_entry_comments_link"><![CDATA[Comments to <a href="{entry_link}">{title}</a>]]></string>
+    <string name="_bx_snipcart_page_block_title_entry_location"><![CDATA[Location]]></string>
+    <string name="_bx_snipcart_page_block_title_entry_attachments"><![CDATA[Attachments]]></string>
+    <string name="_bx_snipcart_page_block_title_entry_all_actions"><![CDATA[All Actions]]></string>
+    <string name="_bx_snipcart_page_title_sys_entries_popular"><![CDATA[Popular Goods]]></string>
+    <string name="_bx_snipcart_page_title_entries_popular"><![CDATA[Popular Goods]]></string>
+    <string name="_bx_snipcart_page_title_sys_entries_updated"><![CDATA[Updated Goods]]></string>
+    <string name="_bx_snipcart_page_title_entries_updated"><![CDATA[Updated Goods]]></string>
+    <string name="_bx_snipcart_page_block_title_popular_entries"><![CDATA[Popular Goods]]></string>
+    <string name="_bx_snipcart_page_block_title_popular_entries_view_extended"><![CDATA[Popular Goods (Extended View)]]></string>
+    <string name="_bx_snipcart_page_block_title_popular_entries_view_full"><![CDATA[Popular Goods (Full View)]]></string>
+    <string name="_bx_snipcart_page_block_title_updated_entries"><![CDATA[Updated Goods]]></string>
+    <string name="_bx_snipcart_page_title_sys_view_entry_comments"><![CDATA[Goods Comments]]></string>
+    <string name="_bx_snipcart_page_title_view_entry_comments"><![CDATA[Comments to {title}]]></string>
+    <string name="_bx_snipcart_page_title_sys_entries_of_author"><![CDATA[Goods of author]]></string>
+    <string name="_bx_snipcart_page_title_entries_of_author"><![CDATA[Goods by {display_name}]]></string>
+    <string name="_bx_snipcart_page_block_title_favorites_of_author"><![CDATA[Favorites by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_snipcart_page_block_title_sys_favorites_of_author"><![CDATA[Favorites of author]]></string>
+    <string name="_bx_snipcart_page_block_title_entries_of_author"><![CDATA[Goods by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_snipcart_page_block_title_sys_entries_of_author"><![CDATA[Goods of author]]></string>   
+    <string name="_bx_snipcart_page_block_title_entries_actions"><![CDATA[Goods actions]]></string>
+    <string name="_bx_snipcart_page_block_title_browse_cmts"><![CDATA[Goods' Comments]]></string>
+	<string name="_bx_snipcart_page_title_sys_manage"><![CDATA[Manage Own]]></string>
+	<string name="_bx_snipcart_page_title_sys_manage_administration"><![CDATA[Manage All]]></string>
+	<string name="_bx_snipcart_page_title_manage"><![CDATA[Manage]]></string>
+	<string name="_bx_snipcart_page_block_title_system_manage"><![CDATA[Manage Own]]></string>
+	<string name="_bx_snipcart_page_block_title_system_manage_administration"><![CDATA[Manage All]]></string>
+	<string name="_bx_snipcart_page_block_title_manage"><![CDATA[Manage]]></string>    
+	<string name="_bx_snipcart_page_block_title_popular_keywords"><![CDATA[Popular Hashtags]]></string>
+	<string name="_bx_snipcart_page_block_title_cats"><![CDATA[Goods Categories]]></string>
+	<string name="_bx_snipcart_page_block_title_entry_info"><![CDATA[Info]]></string>
+	<string name="_bx_snipcart_page_block_title_my_entries"><![CDATA[My Goods]]></string>
+    <string name="_bx_snipcart_page_title_sys_settings"><![CDATA[Settings]]></string>
+    <string name="_bx_snipcart_page_title_settings"><![CDATA[Settings]]></string>
+    <string name="_bx_snipcart_page_block_title_system_settings"><![CDATA[Settings]]></string>
+    <string name="_bx_snipcart_page_block_title_settings"><![CDATA[Settings]]></string>
+    <string name="_bx_snipcart_page_title_sys_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_snipcart_page_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_snipcart_page_block_title_search_form"><![CDATA[Search Form]]></string>
+    <string name="_bx_snipcart_page_block_title_search_results"><![CDATA[Search Results]]></string>
+    <string name="_bx_snipcart_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>
+    <string name="_bx_snipcart_page_block_title_search_results_cmts"><![CDATA[Comments Search Results]]></string>
+    <string name="_bx_snipcart_page_block_title_sys_recent_entries_view_showcase"><![CDATA[Latest Goods (Showcase View)]]></string>
+    <string name="_bx_snipcart_page_block_title_recent_entries_view_showcase"><![CDATA[Latest Goods]]></string>
+    <string name="_bx_snipcart_page_block_title_sys_popular_entries_view_showcase"><![CDATA[Popular Goods (Showcase View)]]></string>
+    <string name="_bx_snipcart_page_block_title_popular_entries_view_showcase"><![CDATA[Popular Goods]]></string>
+    <string name="_bx_snipcart_page_block_title_sys_featured_entries_view_showcase"><![CDATA[Featured Goods (Showcase View)]]></string>
+    <string name="_bx_snipcart_page_block_title_featured_entries_view_showcase"><![CDATA[Featured Goods]]></string>
+
+    <string name="_bx_snipcart_menu_set_title_view_entry"><![CDATA[Goods Actions]]></string>
+    <string name="_bx_snipcart_menu_title_view_entry"><![CDATA[Goods Actions]]></string>
+    <string name="_bx_snipcart_menu_title_submenu"><![CDATA[Goods Submenu]]></string>
+    <string name="_bx_snipcart_menu_set_title_submenu"><![CDATA[Goods Submenu]]></string>
+    <string name="_bx_snipcart_menu_item_title_system_create_entry"><![CDATA[New Goods]]></string>
+    <string name="_bx_snipcart_menu_item_title_create_entry"><![CDATA[New Goods]]></string>
+    <string name="_bx_snipcart_menu_item_title_system_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_snipcart_menu_item_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_snipcart_menu_item_title_system_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_snipcart_menu_item_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_snipcart_menu_item_title_system_view_entry"><![CDATA[View Goods]]></string>
+    <string name="_bx_snipcart_menu_item_title_system_entries_home"><![CDATA[Shop]]></string>
+    <string name="_bx_snipcart_menu_item_title_entries_home"><![CDATA[Shop]]></string>
+    <string name="_bx_snipcart_menu_item_title_system_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_snipcart_menu_item_title_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_snipcart_menu_item_title_system_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_snipcart_menu_item_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_snipcart_menu_item_title_system_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_snipcart_menu_item_title_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_snipcart_menu_item_title_system_settings"><![CDATA[Settings]]></string>
+    <string name="_bx_snipcart_menu_item_title_settings"><![CDATA[Settings]]></string>
+    <string name="_bx_snipcart_menu_item_title_system_dashboard"><![CDATA[Dashboard]]></string>
+    <string name="_bx_snipcart_menu_item_title_dashboard"><![CDATA[Dashboard]]></string>
+    <string name="_bx_snipcart_menu_item_title_system_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_snipcart_menu_item_title_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_snipcart_menu_title_view_entry_submenu"><![CDATA[View Goods Submenu]]></string>
+    <string name="_bx_snipcart_menu_set_title_view_entry_submenu"><![CDATA[View Goods Submenu]]></string>
+    <string name="_bx_snipcart_menu_item_title_view_entry_submenu_entry"><![CDATA[Item]]></string>
+    <string name="_bx_snipcart_menu_item_title_view_entry_submenu_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_snipcart_menu_item_title_system_view_entry_comments"><![CDATA[Goods Comments]]></string>
+    <string name="_bx_snipcart_menu_item_title_system_view_entries_author"><![CDATA[Goods]]></string>
+    <string name="_bx_snipcart_menu_item_title_view_entries_author"><![CDATA[Goods]]></string>
+    <string name="_bx_snipcart_menu_title_entries_my"><![CDATA[My Goods Action Menu]]></string>
+    <string name="_bx_snipcart_menu_set_title_entries_my"><![CDATA[My Goods Menu]]></string>
+	<string name="_bx_snipcart_menu_item_title_system_manage_my_entries"><![CDATA[My goods]]></string>
+    <string name="_bx_snipcart_menu_item_title_manage_my_entries"><![CDATA[{addon} goods]]></string>
+    <string name="_bx_snipcart_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_snipcart_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_snipcart_menu_item_title_system_manage_account"><![CDATA[Manage account]]></string>
+    <string name="_bx_snipcart_menu_item_title_manage_account"><![CDATA[Manage account]]></string>
+	<string name="_bx_snipcart_menu_item_title_system_admt_entries"><![CDATA[Goods]]></string>
+	<string name="_bx_snipcart_menu_item_title_admt_entries"><![CDATA[Goods - {addon} hidden]]></string>
+	<string name="_bx_snipcart_menu_item_title_manage_my"><![CDATA[My Goods]]></string>
+	<string name="_bx_snipcart_menu_item_title_manage_all"><![CDATA[All Goods]]></string>
+	<string name="_bx_snipcart_menu_item_title_buy_for"><![CDATA[Buy for {1}{0}]]></string>
+
+	<string name="_bx_snipcart_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+	<string name="_bx_snipcart_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
+	<string name="_bx_snipcart_grid_filter_item_title_adm_hidden"><![CDATA[Hidden]]></string>
+	<string name="_bx_snipcart_grid_column_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_snipcart_grid_column_title_adm_title"><![CDATA[Title]]></string>
+    <string name="_bx_snipcart_grid_column_title_adm_added"><![CDATA[Added]]></string>
+    <string name="_bx_snipcart_grid_column_title_adm_author"><![CDATA[Author]]></string>
+    <string name="_bx_snipcart_grid_action_title_adm_edit"><![CDATA[Edit]]></string>
+    <string name="_bx_snipcart_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_snipcart_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
+    <string name="_bx_snipcart_grid_action_err_delete"><![CDATA[Cannot delete the selected product(s).]]></string>
+    <string name="_bx_snipcart_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
+
+    <string name="_bx_snipcart_chart_growth"><![CDATA[Snipcart: Growth]]></string>
+    <string name="_bx_snipcart_chart_growth_speed"><![CDATA[Snipcart: Growth Speed]]></string>
+
+    <string name="_bx_snipcart_search_extended"><![CDATA[Snipcart Search]]></string>
+    <string name="_bx_snipcart_search_extended_cmts"><![CDATA[Snipcart Comments Search]]></string>
+
+    <string name="_bx_snipcart_pre_lists_cats"><![CDATA[Goods categories]]></string>
+    <string name="_bx_snipcart_cat_automotive_and_industrial"><![CDATA[Automotive & Industrial]]></string>
+    <string name="_bx_snipcart_cat_beauty_health_food"><![CDATA[Beauty, Health & Food]]></string>
+    <string name="_bx_snipcart_cat_books"><![CDATA[Books]]></string>
+    <string name="_bx_snipcart_cat_clothing_shoes_jewelry"><![CDATA[Clothing, Shoes & Jewelry]]></string>
+    <string name="_bx_snipcart_cat_electronics_and_computers"><![CDATA[Electronics & Computers]]></string>
+    <string name="_bx_snipcart_cat_handmade"><![CDATA[Handmade]]></string>
+    <string name="_bx_snipcart_cat_home_garden_tools"><![CDATA[Home, Garden & Tools]]></string>
+    <string name="_bx_snipcart_cat_movies_music_games"><![CDATA[Movies, Music & Games]]></string>
+    <string name="_bx_snipcart_cat_sports_and_outdoors"><![CDATA[Sports & Outdoors]]></string>
+    <string name="_bx_snipcart_cat_toys_kids_baby"><![CDATA[Toys, Kids & Baby]]></string>
+
+    <string name="_bx_snipcart_pre_lists_modes"><![CDATA[Modes]]></string>
+    <string name="_bx_snipcart_mode_test"><![CDATA[test]]></string>
+    <string name="_bx_snipcart_mode_live"><![CDATA[live]]></string>
+
+    <string name="_bx_snipcart_pre_lists_currencies"><![CDATA[Currencies]]></string>
+
+    <string name="_bx_snipcart_msg_save_settings"><![CDATA[Settings were successfully saved.]]></string>
+    <string name="_bx_snipcart_err_save_settings"><![CDATA[Cannot save settings.]]></string>
+    <string name="_bx_snipcart_err_not_configured"><![CDATA[You need to configure shop settings first. <a href="{0}">Click here</a>.]]></string>
+
+    <string name="_bx_snipcart_txt_all_entries_by"><![CDATA[<a href="{0}">All Goods by {1} ({2})</a>]]></string>
+    <string name="_bx_snipcart_txt_sample_single"><![CDATA[shop item]]></string>
+    <string name="_bx_snipcart_txt_sample_single_with_article"><![CDATA[a shop item]]></string>
+    <string name="_bx_snipcart_txt_sample_comment_single"><![CDATA[comment to shop item]]></string>
+    <string name="_bx_snipcart_txt_sample_vote_single"><![CDATA[vote to shop item]]></string>
+</resources>

+ 391 - 0
modules/boonex/snipcart/updates/9.0.2_9.0.3/source/install/sql/enable.sql

@@ -0,0 +1,391 @@
+
+-- SETTINGS
+SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
+INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES 
+('modules', 'bx_snipcart', '_bx_snipcart', 'bx_snipcart@modules/boonex/snipcart/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
+SET @iTypeId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_snipcart', '_bx_snipcart', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
+('bx_snipcart_summary_chars', '700', @iCategId, '_bx_snipcart_option_summary_chars', 'digit', '', '', '', 1),
+('bx_snipcart_plain_summary_chars', '240', @iCategId, '_bx_snipcart_option_plain_summary_chars', 'digit', '', '', '', 2),
+('bx_snipcart_per_page_browse', '12', @iCategId, '_bx_snipcart_option_per_page_browse', 'digit', '', '', '', 10),
+('bx_snipcart_per_page_profile', '6', @iCategId, '_bx_snipcart_option_per_page_profile', 'digit', '', '', '', 12),
+('bx_snipcart_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
+('bx_snipcart_rss_num', '10', @iCategId, '_bx_snipcart_option_rss_num', 'digit', '', '', '', 20),
+('bx_snipcart_searchable_fields', 'title,text', @iCategId, '_bx_snipcart_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:21:"get_searchable_fields";}', 30);
+
+-- PAGE: create entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_create_entry', '_bx_snipcart_page_title_sys_create_entry', '_bx_snipcart_page_title_create_entry', 'bx_snipcart', 5, 2147483647, 1, 'create-snipcart-entry', 'page.php?i=create-snipcart-entry', '', '', '', 0, 1, 0, 'BxSnipcartPageBrowse', 'modules/boonex/snipcart/classes/BxSnipcartPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_snipcart_create_entry', 1, 'bx_snipcart', '_bx_snipcart_page_block_title_create_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:13:"entity_create";}', 0, 1, 1);
+
+-- PAGE: edit entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_edit_entry', '_bx_snipcart_page_title_sys_edit_entry', '_bx_snipcart_page_title_edit_entry', 'bx_snipcart', 5, 2147483647, 1, 'edit-snipcart-entry', '', '', '', '', 0, 1, 0, 'BxSnipcartPageEntry', 'modules/boonex/snipcart/classes/BxSnipcartPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_snipcart_edit_entry', 1, 'bx_snipcart', '_bx_snipcart_page_block_title_edit_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:11:"entity_edit";}', 0, 0, 0);
+
+-- PAGE: delete entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_delete_entry', '_bx_snipcart_page_title_sys_delete_entry', '_bx_snipcart_page_title_delete_entry', 'bx_snipcart', 5, 2147483647, 1, 'delete-snipcart-entry', '', '', '', '', 0, 1, 0, 'BxSnipcartPageEntry', 'modules/boonex/snipcart/classes/BxSnipcartPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_snipcart_delete_entry', 1, 'bx_snipcart', '_bx_snipcart_page_block_title_delete_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:13:"entity_delete";}', 0, 0, 0);
+
+-- PAGE: view entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_view_entry', '_bx_snipcart_page_title_sys_view_entry', '_bx_snipcart_page_title_view_entry', 'bx_snipcart', 10, 2147483647, 1, 'view-snipcart-entry', '', '', '', '', 0, 1, 0, 'BxSnipcartPageEntry', 'modules/boonex/snipcart/classes/BxSnipcartPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_snipcart_view_entry', 1, 'bx_snipcart', '', '_bx_snipcart_page_block_title_entry_text', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:17:"entity_text_block";}', 0, 0, 1, 0),
+('bx_snipcart_view_entry', 1, 'bx_snipcart', '', '_bx_snipcart_page_block_title_entry_attachments', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:18:"entity_attachments";}', 0, 0, 1, 1),
+('bx_snipcart_view_entry', 2, 'bx_snipcart', '', '_bx_snipcart_page_block_title_entry_author', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:13:"entity_author";}', 0, 0, 1, 0),
+('bx_snipcart_view_entry', 3, 'bx_snipcart', '', '_bx_snipcart_page_block_title_entry_info', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:11:"entity_info";}', 0, 0, 1, 1),
+('bx_snipcart_view_entry', 3, 'bx_snipcart', '', '_bx_snipcart_page_block_title_entry_location', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:15:"entity_location";}', 0, 0, 0, 2),
+('bx_snipcart_view_entry', 4, 'bx_snipcart', '', '_bx_snipcart_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:18:"entity_all_actions";}', 0, 0, 1, 0),
+('bx_snipcart_view_entry', 4, 'bx_snipcart', '', '_bx_snipcart_page_block_title_entry_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:14:"entity_actions";}', 0, 0, 0, 1),
+('bx_snipcart_view_entry', 4, 'bx_snipcart', '', '_bx_snipcart_page_block_title_entry_social_sharing', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:21:"entity_social_sharing";}', 0, 0, 0, 2),
+('bx_snipcart_view_entry', 4, 'bx_snipcart', '', '_bx_snipcart_page_block_title_entry_comments', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:15:"entity_comments";}', 0, 0, 1, 3),
+('bx_snipcart_view_entry', 4, 'bx_snipcart', '', '_bx_snipcart_page_block_title_entry_location', 3, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:13:"locations_map";s:6:"params";a:2:{i:0;s:11:"bx_snipcart";i:1;s:4:"{id}";}s:5:"class";s:20:"TemplServiceMetatags";}', 0, 0, 1, 4);
+
+-- PAGE: view entry comments
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_view_entry_comments', '_bx_snipcart_page_title_sys_view_entry_comments', '_bx_snipcart_page_title_view_entry_comments', 'bx_snipcart', 5, 2147483647, 1, 'view-snipcart-entry-comments', '', '', '', '', 0, 1, 0, 'BxSnipcartPageEntry', 'modules/boonex/snipcart/classes/BxSnipcartPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_snipcart_view_entry_comments', 1, 'bx_snipcart', '_bx_snipcart_page_block_title_entry_comments', '_bx_snipcart_page_block_title_entry_comments_link', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:15:"entity_comments";}', 0, 0, 1);
+
+-- PAGE: popular entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_popular', '_bx_snipcart_page_title_sys_entries_popular', '_bx_snipcart_page_title_entries_popular', 'bx_snipcart', 5, 2147483647, 1, 'snipcart-popular', 'page.php?i=snipcart-popular', '', '', '', 0, 1, 0, 'BxSnipcartPageBrowse', 'modules/boonex/snipcart/classes/BxSnipcartPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_snipcart_popular', 1, 'bx_snipcart', '_bx_snipcart_page_block_title_popular_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:14:"browse_popular";s:6:"params";a:3:{s:9:"unit_view";s:7:"gallery";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, 1);
+
+-- PAGE: recently updated entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_updated', '_bx_snipcart_page_title_sys_entries_updated', '_bx_snipcart_page_title_entries_updated', 'bx_snipcart', 5, 2147483647, 1, 'snipcart-updated', 'page.php?i=snipcart-updated', '', '', '', 0, 1, 0, 'BxSnipcartPageBrowse', 'modules/boonex/snipcart/classes/BxSnipcartPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_snipcart_updated', 1, 'bx_snipcart', '_bx_snipcart_page_block_title_updated_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:14:"browse_updated";s:6:"params";a:3:{s:9:"unit_view";s:7:"gallery";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, 1);
+
+-- PAGE: entries of author
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_author', 'snipcart-author', '_bx_snipcart_page_title_sys_entries_of_author', '_bx_snipcart_page_title_entries_of_author', 'bx_snipcart', 5, 2147483647, 1, '', '', '', '', 0, 1, 0, 'BxSnipcartPageAuthor', 'modules/boonex/snipcart/classes/BxSnipcartPageAuthor.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_snipcart_author', 1, 'bx_snipcart', '', '_bx_snipcart_page_block_title_entries_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:18:"my_entries_actions";}', 0, 0, 1, 1),
+('bx_snipcart_author', 1, 'bx_snipcart', '_bx_snipcart_page_block_title_sys_favorites_of_author', '_bx_snipcart_page_block_title_favorites_of_author', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:15:"browse_favorite";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 0, 1, 1, 2),
+('bx_snipcart_author', 1, 'bx_snipcart', '_bx_snipcart_page_block_title_sys_entries_of_author', '_bx_snipcart_page_block_title_entries_of_author', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:13:"browse_author";}', 0, 0, 1, 3);
+
+-- PAGE: module home
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_home', 'snipcart-home', '_bx_snipcart_page_title_sys_home', '_bx_snipcart_page_title_home', 'bx_snipcart', 2, 2147483647, 1, 'page.php?i=snipcart-home', '', '', '', 0, 1, 0, 'BxSnipcartPageBrowse', 'modules/boonex/snipcart/classes/BxSnipcartPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_snipcart_home', 1, 'bx_snipcart', '', '_bx_snipcart_page_block_title_featured_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, 1, 0),
+('bx_snipcart_home', 1, 'bx_snipcart', '', '_bx_snipcart_page_block_title_recent_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, 1, 1),
+('bx_snipcart_home', 2, 'bx_snipcart', '', '_bx_snipcart_page_block_title_popular_keywords', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:14:"keywords_cloud";s:6:"params";a:2:{i:0;s:11:"bx_snipcart";i:1;s:11:"bx_snipcart";}s:5:"class";s:20:"TemplServiceMetatags";}', 0, 1, 1, 0),
+('bx_snipcart_home', 2, 'bx_snipcart', '', '_bx_snipcart_page_block_title_cats', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:15:"categories_list";s:6:"params";a:2:{i:0;s:16:"bx_snipcart_cats";i:1;a:1:{s:10:"show_empty";b:1;}}s:5:"class";s:20:"TemplServiceCategory";}', 0, 1, 1, 1);
+
+-- PAGE: search for entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_search', '_bx_snipcart_page_title_sys_entries_search', '_bx_snipcart_page_title_entries_search', 'bx_snipcart', 5, 2147483647, 1, 'snipcart-search', 'page.php?i=snipcart-search', '', '', '', 0, 1, 0, 'BxSnipcartPageBrowse', 'modules/boonex/snipcart/classes/BxSnipcartPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_snipcart_search', 1, 'bx_snipcart', '_bx_snipcart_page_block_title_search_form', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:11:"bx_snipcart";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 1),
+('bx_snipcart_search', 1, 'bx_snipcart', '_bx_snipcart_page_block_title_search_results', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:11:"bx_snipcart";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 2),
+('bx_snipcart_search', 1, 'bx_snipcart', '_bx_snipcart_page_block_title_search_form_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:16:"bx_snipcart_cmts";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 3),
+('bx_snipcart_search', 1, 'bx_snipcart', '_bx_snipcart_page_block_title_search_results_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:16:"bx_snipcart_cmts";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 4);
+
+-- PAGE: module manage own
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_manage', '_bx_snipcart_page_title_sys_manage', '_bx_snipcart_page_title_manage', 'bx_snipcart', 5, 2147483647, 1, 'snipcart-manage', 'page.php?i=snipcart-manage', '', '', '', 0, 1, 0, 'BxSnipcartPageBrowse', 'modules/boonex/snipcart/classes/BxSnipcartPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_snipcart_manage', 1, 'bx_snipcart', '_bx_snipcart_page_block_title_system_manage', '_bx_snipcart_page_block_title_manage', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:12:"manage_tools";}}', 0, 1, 0);
+
+-- PAGE: module manage all
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_administration', '_bx_snipcart_page_title_sys_manage_administration', '_bx_snipcart_page_title_manage', 'bx_snipcart', 5, 192, 1, 'snipcart-administration', 'page.php?i=snipcart-administration', '', '', '', 0, 1, 0, 'BxSnipcartPageBrowse', 'modules/boonex/snipcart/classes/BxSnipcartPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_snipcart_administration', 1, 'bx_snipcart', '_bx_snipcart_page_block_title_system_manage_administration', '_bx_snipcart_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:12:"manage_tools";s:6:"params";a:1:{i:0;s:14:"administration";}}', 0, 1, 0);
+
+-- PAGE: module settings
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_settings', '_bx_snipcart_page_title_sys_settings', '_bx_snipcart_page_title_settings', 'bx_snipcart', 5, 2147483647, 1, 'snipcart-settings', 'page.php?i=snipcart-settings', '', '', '', 0, 1, 0, 'BxSnipcartPageBrowse', 'modules/boonex/snipcart/classes/BxSnipcartPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_snipcart_settings', 1, 'bx_snipcart', '_bx_snipcart_page_block_title_system_settings', '_bx_snipcart_page_block_title_settings', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:8:"settings";}}', 0, 1, 0);
+
+-- PAGE: add block to homepage
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = 'sys_home' AND `cell_id` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('sys_home', 1, 'bx_snipcart', '_bx_snipcart_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:13:"browse_public";s:6:"params";a:2:{i:0;b:0;i:1;b:0;}}', 1, 0, 0, IFNULL(@iBlockOrder, 0) + 1);
+
+-- PAGES: add page block to profiles modules (trigger* page objects are processed separately upon modules enable/disable)
+SET @iPBCellProfile = 3;
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_snipcart', '_bx_snipcart_page_block_title_my_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:13:"browse_author";s:6:"params";a:2:{i:0;s:12:"{profile_id}";i:1;a:2:{s:8:"per_page";s:28:"bx_snipcart_per_page_profile";s:13:"empty_message";b:0;}}}', 0, 0, 0);
+
+-- PAGE: service blocks
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = '' AND `cell_id` = 0 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system` , `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('', 0, 'bx_snipcart', '', '_bx_snipcart_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:13:"browse_public";s:6:"params";a:3:{s:9:"unit_view";s:7:"gallery";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 1),
+
+('', 0, 'bx_snipcart', '', '_bx_snipcart_page_block_title_recent_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 2),
+('', 0, 'bx_snipcart', '', '_bx_snipcart_page_block_title_popular_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 3),
+('', 0, 'bx_snipcart', '', '_bx_snipcart_page_block_title_popular_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 4),
+('', 0, 'bx_snipcart', '_bx_snipcart_page_block_title_sys_recent_entries_view_showcase', '_bx_snipcart_page_block_title_recent_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:11:\"bx_snipcart\";s:6:\"method\";s:13:\"browse_public\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 5),
+('', 0, 'bx_snipcart', '_bx_snipcart_page_block_title_sys_popular_entries_view_showcase',  '_bx_snipcart_page_block_title_popular_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:11:\"bx_snipcart\";s:6:\"method\";s:13:\"browse_popular\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 6),
+('', 0, 'bx_snipcart', '_bx_snipcart_page_block_title_sys_featured_entries_view_showcase', '_bx_snipcart_page_block_title_featured_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:11:\"bx_snipcart\";s:6:\"method\";s:15:\"browse_featured\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 7);
+
+
+-- MENU: add to site menu
+SET @iSiteMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_site' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_site', 'bx_snipcart', 'snipcart-home', '_bx_snipcart_menu_item_title_system_entries_home', '_bx_snipcart_menu_item_title_entries_home', 'page.php?i=snipcart-home', '', '', 'shopping-cart col-green2', 'bx_snipcart_submenu', 2147483647, 1, 1, IFNULL(@iSiteMenuOrder, 0) + 1);
+
+-- MENU: add to homepage menu
+SET @iHomepageMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_homepage' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_homepage', 'bx_snipcart', 'snipcart-home', '_bx_snipcart_menu_item_title_system_entries_home', '_bx_snipcart_menu_item_title_entries_home', 'page.php?i=snipcart-home', '', '', 'shopping-cart col-green2', 'bx_snipcart_submenu', 2147483647, 1, 1, IFNULL(@iHomepageMenuOrder, 0) + 1);
+
+-- MENU: add to "add content" menu
+SET @iAddMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_add_content_links' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_add_content_links', 'bx_snipcart', 'create-snipcart-entry', '_bx_snipcart_menu_item_title_system_create_entry', '_bx_snipcart_menu_item_title_create_entry', 'page.php?i=create-snipcart-entry', '', '', 'shopping-cart col-green2', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
+
+-- MENU: actions menu for view entry 
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_view', '_bx_snipcart_menu_title_view_entry', 'bx_snipcart_view', 'bx_snipcart', 9, 0, 1, 'BxSnipcartMenuView', 'modules/boonex/snipcart/classes/BxSnipcartMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_snipcart_view', 'bx_snipcart', '_bx_snipcart_menu_set_title_view_entry', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_snipcart_view', 'bx_snipcart', 'edit-snipcart-entry', '_bx_snipcart_menu_item_title_system_edit_entry', '_bx_snipcart_menu_item_title_edit_entry', 'page.php?i=edit-snipcart-entry&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 1),
+('bx_snipcart_view', 'bx_snipcart', 'delete-snipcart-entry', '_bx_snipcart_menu_item_title_system_delete_entry', '_bx_snipcart_menu_item_title_delete_entry', 'page.php?i=delete-snipcart-entry&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 2);
+
+-- MENU: actions menu for my entries
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_my', '_bx_snipcart_menu_title_entries_my', 'bx_snipcart_my', 'bx_snipcart', 9, 0, 1, 'BxSnipcartMenu', 'modules/boonex/snipcart/classes/BxSnipcartMenu.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_snipcart_my', 'bx_snipcart', '_bx_snipcart_menu_set_title_entries_my', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_snipcart_my', 'bx_snipcart', 'create-snipcart-entry', '_bx_snipcart_menu_item_title_system_create_entry', '_bx_snipcart_menu_item_title_create_entry', 'page.php?i=create-snipcart-entry', '', '', 'plus', '', 2147483647, 1, 0, 0);
+
+-- MENU: module sub-menu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_submenu', '_bx_snipcart_menu_title_submenu', 'bx_snipcart_submenu', 'bx_snipcart', 8, 0, 1, '', '');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_snipcart_submenu', 'bx_snipcart', '_bx_snipcart_menu_set_title_submenu', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_snipcart_submenu', 'bx_snipcart', 'snipcart-home', '_bx_snipcart_menu_item_title_system_entries_public', '_bx_snipcart_menu_item_title_entries_public', 'page.php?i=snipcart-home', '', '', '', '', 2147483647, 1, 1, 1),
+('bx_snipcart_submenu', 'bx_snipcart', 'snipcart-popular', '_bx_snipcart_menu_item_title_system_entries_popular', '_bx_snipcart_menu_item_title_entries_popular', 'page.php?i=snipcart-popular', '', '', '', '', 2147483647, 1, 1, 2),
+('bx_snipcart_submenu', 'bx_snipcart', 'snipcart-search', '_bx_snipcart_menu_item_title_system_entries_search', '_bx_snipcart_menu_item_title_entries_search', 'page.php?i=snipcart-search', '', '', '', '', 2147483647, 1, 1, 3),
+('bx_snipcart_submenu', 'bx_snipcart', 'snipcart-manage', '_bx_snipcart_menu_item_title_system_entries_manage', '_bx_snipcart_menu_item_title_entries_manage', 'page.php?i=snipcart-manage', '', '', '', '', 2147483646, 1, 1, 4),
+('bx_snipcart_submenu', 'bx_snipcart', 'snipcart-settings', '_bx_snipcart_menu_item_title_system_settings', '_bx_snipcart_menu_item_title_settings', 'page.php?i=snipcart-settings', '', '', '', '', 2147483646, 1, 1, 5),
+('bx_snipcart_submenu', 'bx_snipcart', 'snipcart-dashboard', '_bx_snipcart_menu_item_title_system_dashboard', '_bx_snipcart_menu_item_title_dashboard', 'https://app.snipcart.com', '', '_blank', '', '', 2147483646, 1, 1, 6);
+
+-- MENU: sub-menu for view entry
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_view_submenu', '_bx_snipcart_menu_title_view_entry_submenu', 'bx_snipcart_view_submenu', 'bx_snipcart', 8, 0, 0, 'BxSnipcartMenuView', 'modules/boonex/snipcart/classes/BxSnipcartMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_snipcart_view_submenu', 'bx_snipcart', '_bx_snipcart_menu_set_title_view_entry_submenu', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_snipcart_view_submenu', 'bx_snipcart', 'view-snipcart-entry', '_bx_snipcart_menu_item_title_system_view_entry', '_bx_snipcart_menu_item_title_view_entry_submenu_entry', 'page.php?i=view-snipcart-entry&id={content_id}', '', '', '', '', 2147483647, 1, 0, 1),
+('bx_snipcart_view_submenu', 'bx_snipcart', 'view-snipcart-entry-comments', '_bx_snipcart_menu_item_title_system_view_entry_comments', '_bx_snipcart_menu_item_title_view_entry_submenu_comments', 'page.php?i=view-snipcart-entry-comments&id={content_id}', '', '', '', '', 2147483647, 0, 0, 2);
+
+-- MENU: custom menu for snippet meta info
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_snippet_meta', '_sys_menu_title_snippet_meta', 'bx_snipcart_snippet_meta', 'bx_snipcart', 15, 0, 1, 'BxSnipcartMenuSnippetMeta', 'modules/boonex/snipcart/classes/BxSnipcartMenuSnippetMeta.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_snipcart_snippet_meta', 'bx_snipcart', '_sys_menu_set_title_snippet_meta', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES 
+('bx_snipcart_snippet_meta', 'bx_snipcart', 'date', '_sys_menu_item_title_system_sm_date', '_sys_menu_item_title_sm_date', '', '', '', '', '', 2147483647, 1, 0, 1, 1),
+('bx_snipcart_snippet_meta', 'bx_snipcart', 'author', '_sys_menu_item_title_system_sm_author', '_sys_menu_item_title_sm_author', '', '', '', '', '', 2147483647, 1, 0, 1, 2),
+('bx_snipcart_snippet_meta', 'bx_snipcart', 'category', '_sys_menu_item_title_system_sm_category', '_sys_menu_item_title_sm_category', '', '', '', '', '', 2147483647, 0, 0, 1, 3),
+('bx_snipcart_snippet_meta', 'bx_snipcart', 'tags', '_sys_menu_item_title_system_sm_tags', '_sys_menu_item_title_sm_tags', '', '', '', '', '', 2147483647, 0, 0, 1, 4),
+('bx_snipcart_snippet_meta', 'bx_snipcart', 'views', '_sys_menu_item_title_system_sm_views', '_sys_menu_item_title_sm_views', '', '', '', '', '', 2147483647, 0, 0, 1, 5),
+('bx_snipcart_snippet_meta', 'bx_snipcart', 'comments', '_sys_menu_item_title_system_sm_comments', '_sys_menu_item_title_sm_comments', '', '', '', '', '', 2147483647, 0, 0, 1, 6);
+
+-- MENU: profile stats
+SET @iNotifMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name` = 'sys_profile_stats' AND `active` = 1 LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+('sys_profile_stats', 'bx_snipcart', 'profile-stats-manage-snipcart', '_bx_snipcart_menu_item_title_system_manage_my_entries', '_bx_snipcart_menu_item_title_manage_my_entries', 'page.php?i=snipcart-manage', '', '_self', 'shopping-cart col-green2', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:41:"get_menu_addon_manage_tools_profile_stats";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 1);
+
+-- MENU: manage tools submenu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart_menu_manage_tools', '_bx_snipcart_menu_title_manage_tools', 'bx_snipcart_menu_manage_tools', 'bx_snipcart', 6, 0, 1, 'BxSnipcartMenuManageTools', 'modules/boonex/snipcart/classes/BxSnipcartMenuManageTools.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_snipcart_menu_manage_tools', 'bx_snipcart', '_bx_snipcart_menu_set_title_manage_tools', 0);
+
+--INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+--('bx_snipcart_menu_manage_tools', 'bx_snipcart', 'delete-with-content', '_bx_snipcart_menu_item_title_system_delete_with_content', '_bx_snipcart_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id});', '_self', 'trash-o', '', 128, 1, 0, 0);
+
+-- MENU: dashboard manage tools
+SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_account_dashboard_manage_tools', 'bx_snipcart', 'snipcart-administration', '_bx_snipcart_menu_item_title_system_admt_entries', '_bx_snipcart_menu_item_title_admt_entries', 'page.php?i=snipcart-administration', '', '_self', '', 'a:2:{s:6:"module";s:11:"bx_snipcart";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
+
+-- MENU: add menu item to profiles modules (trigger* menu sets are processed separately upon modules enable/disable)
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('trigger_profile_view_submenu', 'bx_snipcart', 'snipcart-author', '_bx_snipcart_menu_item_title_system_view_entries_author', '_bx_snipcart_menu_item_title_view_entries_author', 'page.php?i=snipcart-author&profile_id={profile_id}', '', '', 'shopping-cart col-green2', '', 2147483647, 1, 0, 0);
+
+
+-- PRIVACY 
+INSERT INTO `sys_objects_privacy` (`object`, `module`, `action`, `title`, `default_group`, `table`, `table_field_id`, `table_field_author`, `override_class_name`, `override_class_file`) VALUES
+('bx_snipcart_allow_view_to', 'bx_snipcart', 'view', '_bx_snipcart_form_entry_input_allow_view_to', '3', 'bx_snipcart_entries', 'id', 'author', '', '');
+
+
+-- ACL
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_snipcart', 'create entry', NULL, '_bx_snipcart_acl_action_create_entry', '', 1, 3);
+SET @iIdActionEntryCreate = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_snipcart', 'delete entry', NULL, '_bx_snipcart_acl_action_delete_entry', '', 1, 3);
+SET @iIdActionEntryDelete = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_snipcart', 'view entry', NULL, '_bx_snipcart_acl_action_view_entry', '', 1, 0);
+SET @iIdActionEntryView = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_snipcart', 'set thumb', NULL, '_bx_snipcart_acl_action_set_thumb', '', 1, 3);
+SET @iIdActionSetThumb = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_snipcart', 'edit any entry', NULL, '_bx_snipcart_acl_action_edit_any_entry', '', 1, 3);
+SET @iIdActionEntryEditAny = LAST_INSERT_ID();
+
+SET @iUnauthenticated = 1;
+SET @iAccount = 2;
+SET @iStandard = 3;
+SET @iUnconfirmed = 4;
+SET @iPending = 5;
+SET @iSuspended = 6;
+SET @iModerator = 7;
+SET @iAdministrator = 8;
+SET @iPremium = 9;
+
+INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
+
+-- entry create
+(@iStandard, @iIdActionEntryCreate),
+(@iModerator, @iIdActionEntryCreate),
+(@iAdministrator, @iIdActionEntryCreate),
+(@iPremium, @iIdActionEntryCreate),
+
+-- entry delete
+(@iStandard, @iIdActionEntryDelete),
+(@iModerator, @iIdActionEntryDelete),
+(@iAdministrator, @iIdActionEntryDelete),
+(@iPremium, @iIdActionEntryDelete),
+
+-- entry view
+(@iUnauthenticated, @iIdActionEntryView),
+(@iAccount, @iIdActionEntryView),
+(@iStandard, @iIdActionEntryView),
+(@iUnconfirmed, @iIdActionEntryView),
+(@iPending, @iIdActionEntryView),
+(@iModerator, @iIdActionEntryView),
+(@iAdministrator, @iIdActionEntryView),
+(@iPremium, @iIdActionEntryView),
+
+-- set entry thumb
+(@iStandard, @iIdActionSetThumb),
+(@iModerator, @iIdActionSetThumb),
+(@iAdministrator, @iIdActionSetThumb),
+(@iPremium, @iIdActionSetThumb),
+
+-- edit any entry
+(@iModerator, @iIdActionEntryEditAny),
+(@iAdministrator, @iIdActionEntryEditAny);
+
+
+-- SEARCH
+SET @iSearchOrder = (SELECT IFNULL(MAX(`Order`), 0) FROM `sys_objects_search`);
+INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `ClassPath`) VALUES
+('bx_snipcart', '_bx_snipcart', @iSearchOrder + 1, 'BxSnipcartSearchResult', 'modules/boonex/snipcart/classes/BxSnipcartSearchResult.php'),
+('bx_snipcart_cmts', '_bx_snipcart_cmts', @iSearchOrder + 2, 'BxSnipcartCmtsSearchResult', 'modules/boonex/snipcart/classes/BxSnipcartCmtsSearchResult.php');
+
+
+-- METATAGS
+INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
+('bx_snipcart', 'bx_snipcart_meta_keywords', 'bx_snipcart_meta_locations', 'bx_snipcart_meta_mentions', '', '');
+
+
+-- CATEGORY
+INSERT INTO `sys_objects_category` (`object`, `search_object`, `form_object`, `list_name`, `table`, `field`, `join`, `where`, `override_class_name`, `override_class_file`) VALUES
+('bx_snipcart_cats', 'bx_snipcart', 'bx_snipcart', 'bx_snipcart_cats', 'bx_snipcart_entries', 'cat', 'INNER JOIN `sys_profiles` ON (`sys_profiles`.`id` = `bx_snipcart_entries`.`author`)', 'AND `sys_profiles`.`status` = ''active''', '', '');
+
+
+-- STATS
+SET @iMaxOrderStats = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_statistics`);
+INSERT INTO `sys_statistics` (`module`, `name`, `title`, `link`, `icon`, `query`, `order`) VALUES 
+('bx_snipcart', 'bx_snipcart', '_bx_snipcart', 'page.php?i=snipcart-home', 'shopping-cart col-green2', 'SELECT COUNT(*) FROM `bx_snipcart_entries` WHERE 1 AND `status` = ''active'' AND `status_admin` = ''active''', @iMaxOrderStats + 1);
+
+-- CHARTS
+SET @iMaxOrderCharts = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_objects_chart`);
+INSERT INTO `sys_objects_chart` (`object`, `title`, `table`, `field_date_ts`, `field_date_dt`, `field_status`, `query`, `active`, `order`, `class_name`, `class_file`) VALUES
+('bx_snipcart_growth', '_bx_snipcart_chart_growth', 'bx_snipcart_entries', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 1, 'BxDolChartGrowth', ''),
+('bx_snipcart_growth_speed', '_bx_snipcart_chart_growth_speed', 'bx_snipcart_entries', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 2, 'BxDolChartGrowthSpeed', '');
+
+-- GRIDS: moderation tools
+INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
+('bx_snipcart_administration', 'Sql', 'SELECT * FROM `bx_snipcart_entries` WHERE 1 ', 'bx_snipcart_entries', 'id', 'added', 'status_admin', '', 20, NULL, 'start', '', 'title,text', '', 'like', '', '', 192, 'BxSnipcartGridAdministration', 'modules/boonex/snipcart/classes/BxSnipcartGridAdministration.php'),
+('bx_snipcart_common', 'Sql', 'SELECT * FROM `bx_snipcart_entries` WHERE 1 ', 'bx_snipcart_entries', 'id', 'added', 'status', '', 20, NULL, 'start', '', 'title,text', '', 'like', '', '', 2147483647, 'BxSnipcartGridCommon', 'modules/boonex/snipcart/classes/BxSnipcartGridCommon.php');
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
+('bx_snipcart_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_snipcart_administration', 'switcher', '_bx_snipcart_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_snipcart_administration', 'title', '_bx_snipcart_grid_column_title_adm_title', '25%', 0, '25', '', 3),
+('bx_snipcart_administration', 'added', '_bx_snipcart_grid_column_title_adm_added', '20%', 1, '25', '', 4),
+('bx_snipcart_administration', 'author', '_bx_snipcart_grid_column_title_adm_author', '25%', 0, '25', '', 5),
+('bx_snipcart_administration', 'actions', '', '20%', 0, '', '', 6),
+
+('bx_snipcart_common', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_snipcart_common', 'switcher', '_bx_snipcart_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_snipcart_common', 'title', '_bx_snipcart_grid_column_title_adm_title', '40%', 0, '35', '', 3),
+('bx_snipcart_common', 'added', '_bx_snipcart_grid_column_title_adm_added', '30%', 1, '25', '', 4),
+('bx_snipcart_common', 'actions', '', '20%', 0, '', '', 5);
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
+('bx_snipcart_administration', 'bulk', 'delete', '_bx_snipcart_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_snipcart_administration', 'single', 'edit', '_bx_snipcart_grid_action_title_adm_edit', 'pencil', 1, 0, 1),
+('bx_snipcart_administration', 'single', 'delete', '_bx_snipcart_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_snipcart_administration', 'single', 'settings', '_bx_snipcart_grid_action_title_adm_more_actions', 'cog', 1, 0, 3),
+
+('bx_snipcart_common', 'bulk', 'delete', '_bx_snipcart_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_snipcart_common', 'single', 'edit', '_bx_snipcart_grid_action_title_adm_edit', 'pencil', 1, 0, 1),
+('bx_snipcart_common', 'single', 'delete', '_bx_snipcart_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_snipcart_common', 'single', 'settings', '_bx_snipcart_grid_action_title_adm_more_actions', 'cog', 1, 0, 3);
+
+
+-- ALERTS
+INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES 
+('bx_snipcart', 'BxSnipcartAlertsResponse', 'modules/boonex/snipcart/classes/BxSnipcartAlertsResponse.php', '');
+SET @iHandler := LAST_INSERT_ID();
+
+INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
+('system', 'save_setting', @iHandler),
+('profile', 'delete', @iHandler);

+ 356 - 0
modules/boonex/snipcart/updates/9.0.2_9.0.3/source/install/sql/install.sql

@@ -0,0 +1,356 @@
+SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
+
+
+-- TABLE: entries
+CREATE TABLE IF NOT EXISTS `bx_snipcart_entries` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `author` int(10) unsigned NOT NULL,
+  `added` int(11) NOT NULL,
+  `changed` int(11) NOT NULL,
+  `thumb` int(11) NOT NULL,
+  `title` varchar(255) NOT NULL,
+  `cat` int(11) NOT NULL,
+  `text` text NOT NULL,
+  `price` float NOT NULL default '0',
+  `weight` float NOT NULL default '0',
+  `views` int(11) NOT NULL default '0',
+  `rate` float NOT NULL default '0',
+  `votes` int(11) NOT NULL default '0',
+  `favorites` int(11) NOT NULL default '0',
+  `comments` int(11) NOT NULL default '0',
+  `reports` int(11) NOT NULL default '0',
+  `featured` int(11) NOT NULL default '0',
+  `allow_view_to` int(11) NOT NULL DEFAULT '3',
+  `status` enum('active','hidden') NOT NULL DEFAULT 'active',
+  `status_admin` enum('active','hidden') NOT NULL DEFAULT 'active',
+  PRIMARY KEY (`id`),
+  FULLTEXT KEY `title_text` (`title`,`text`)
+);
+
+-- TABLE: settings
+CREATE TABLE IF NOT EXISTS `bx_snipcart_settings` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `author` int(10) unsigned NOT NULL,
+  `mode` varchar(8) NOT NULL DEFAULT '',
+  `api_key_test` varchar(255) NOT NULL DEFAULT '',
+  `api_key_live` varchar(255) NOT NULL DEFAULT '',
+  `currency` varchar(4) NOT NULL DEFAULT '',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `author` (`author`)
+);
+
+-- TABLE: storages & transcoders
+CREATE TABLE IF NOT EXISTS `bx_snipcart_files` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_snipcart_photos_resized` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+-- TABLE: comments
+CREATE TABLE IF NOT EXISTS `bx_snipcart_cmts` (
+  `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
+  `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_object_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_level` int(11) NOT NULL DEFAULT '0',
+  `cmt_text` text NOT NULL,
+  `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
+  `cmt_rate` int(11) NOT NULL DEFAULT '0',
+  `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
+  `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
+  `cmt_replies` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`cmt_id`),
+  KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
+  FULLTEXT KEY `search_fields` (`cmt_text`)
+);
+
+-- TABLE: votes
+CREATE TABLE IF NOT EXISTS `bx_snipcart_votes` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  `sum` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_snipcart_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`)
+);
+
+-- TABLE: views
+CREATE TABLE IF NOT EXISTS `bx_snipcart_views_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `viewer_id` int(11) NOT NULL default '0',
+  `viewer_nip` int(11) unsigned NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
+);
+
+-- TABLE: metas
+CREATE TABLE IF NOT EXISTS `bx_snipcart_meta_keywords` (
+  `object_id` int(10) unsigned NOT NULL,
+  `keyword` varchar(255) NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `keyword` (`keyword`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_snipcart_meta_locations` (
+  `object_id` int(10) unsigned NOT NULL,
+  `lat` double NOT NULL,
+  `lng` double NOT NULL,
+  `country` varchar(2) NOT NULL,
+  `state` varchar(255) NOT NULL,
+  `city` varchar(255) NOT NULL,
+  `zip` varchar(255) NOT NULL,
+  `street` varchar(255) NOT NULL,
+  `street_number` varchar(255) NOT NULL,
+  PRIMARY KEY (`object_id`),
+  KEY `country_state_city` (`country`,`state`(8),`city`(8))
+);
+
+CREATE TABLE IF NOT EXISTS `bx_snipcart_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
+-- TABLE: reports
+CREATE TABLE IF NOT EXISTS `bx_snipcart_reports` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_snipcart_reports_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',
+  `type` varchar(32) NOT NULL default '',
+  `text` text NOT NULL default '',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `report` (`object_id`, `author_nip`)
+);
+
+-- TABLE: favorites
+CREATE TABLE IF NOT EXISTS `bx_snipcart_favorites_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`author_id`)
+);
+
+
+-- STORAGES & TRANSCODERS
+INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `cache_control`, `levels`, `table_files`, `ext_mode`, `ext_allow`, `ext_deny`, `quota_size`, `current_size`, `quota_number`, `current_number`, `max_file_size`, `ts`) VALUES
+('bx_snipcart_files', @sStorageEngine, '', 360, 2592000, 3, 'bx_snipcart_files', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
+('bx_snipcart_photos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_snipcart_photos_resized', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0);
+
+INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`) VALUES 
+('bx_snipcart_preview', 'bx_snipcart_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_snipcart_files";}', 'no', '1', '2592000', '0'),
+('bx_snipcart_gallery', 'bx_snipcart_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_snipcart_files";}', 'no', '1', '2592000', '0'), 
+('bx_snipcart_cover', 'bx_snipcart_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_snipcart_files";}', 'no', '1', '2592000', '0');
+
+INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
+('bx_snipcart_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
+('bx_snipcart_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
+('bx_snipcart_cover', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0');
+
+
+-- FORMS
+INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_snipcart', 'bx_snipcart', '_bx_snipcart_form_entry', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_snipcart_entries', 'id', '', '', 'a:2:{i:0;s:9:"do_submit";i:1;s:10:"do_publish";}', '', 0, 1, 'BxSnipcartFormEntry', 'modules/boonex/snipcart/classes/BxSnipcartFormEntry.php'),
+('bx_snipcart_settings', 'bx_snipcart', '_bx_snipcart_form_settings', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_snipcart_settings', 'id', '', '', 'do_submit', '', 0, 1, 'BxSnipcartFormSettings', 'modules/boonex/snipcart/classes/BxSnipcartFormSettings.php');
+
+INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES 
+('bx_snipcart', 'bx_snipcart_entry_add', 'bx_snipcart', 0, '_bx_snipcart_form_entry_display_add'),
+('bx_snipcart', 'bx_snipcart_entry_delete', 'bx_snipcart', 0, '_bx_snipcart_form_entry_display_delete'),
+('bx_snipcart', 'bx_snipcart_entry_edit', 'bx_snipcart', 0, '_bx_snipcart_form_entry_display_edit'),
+('bx_snipcart', 'bx_snipcart_entry_view', 'bx_snipcart', 1, '_bx_snipcart_form_entry_display_view'),
+
+('bx_snipcart_settings', 'bx_snipcart_settings_edit', 'bx_snipcart', 0, '_bx_snipcart_form_settings_display_edit');
+
+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_snipcart', 'bx_snipcart', 'allow_view_to', '', '', 0, 'custom', '_bx_snipcart_form_entry_input_sys_allow_view_to', '_bx_snipcart_form_entry_input_allow_view_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_snipcart', 'bx_snipcart', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_snipcart_form_entry_input_sys_delete_confirm', '_bx_snipcart_form_entry_input_delete_confirm', '_bx_snipcart_form_entry_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_snipcart_form_entry_input_delete_confirm_error', '', '', 1, 0),
+('bx_snipcart', 'bx_snipcart', 'do_publish', '_bx_snipcart_form_entry_input_do_publish', '', 0, 'submit', '_bx_snipcart_form_entry_input_sys_do_publish', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_snipcart', 'bx_snipcart', 'do_submit', '_bx_snipcart_form_entry_input_do_submit', '', 0, 'submit', '_bx_snipcart_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_snipcart', 'bx_snipcart', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_snipcart', 'bx_snipcart', 'pictures', 'a:1:{i:0;s:9:"sys_html5";}', 'a:2:{s:10:"sys_simple";s:26:"_sys_uploader_simple_title";s:9:"sys_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_snipcart_form_entry_input_sys_pictures', '_bx_snipcart_form_entry_input_pictures', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_snipcart', 'bx_snipcart', 'text', '', '', 0, 'textarea', '_bx_snipcart_form_entry_input_sys_text', '_bx_snipcart_form_entry_input_text', '', 1, 0, 2, '', '', '', 'Avail', '', '_bx_snipcart_form_entry_input_text_err', 'XssHtml', '', 1, 0),
+('bx_snipcart', 'bx_snipcart', 'title', '', '', 0, 'text', '_bx_snipcart_form_entry_input_sys_title', '_bx_snipcart_form_entry_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_snipcart_form_entry_input_title_err', 'Xss', '', 1, 0),
+('bx_snipcart', 'bx_snipcart', 'cat', '', '#!bx_snipcart_cats', 0, 'select', '_bx_snipcart_form_entry_input_sys_cat', '_bx_snipcart_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_snipcart_form_entry_input_cat_err', 'Xss', '', 1, 0),
+('bx_snipcart', 'bx_snipcart', 'price', '', '', 0, 'text', '_bx_snipcart_form_entry_input_sys_price', '_bx_snipcart_form_entry_input_price', '_bx_snipcart_form_entry_input_price_inf', 1, 0, 0, '', '', '', 'Avail', '', '_bx_snipcart_form_entry_input_price_err', 'Float', '', 1, 0),
+('bx_snipcart', 'bx_snipcart', 'weight', '', '', 0, 'text', '_bx_snipcart_form_entry_input_sys_weight', '_bx_snipcart_form_entry_input_weight', '_bx_snipcart_form_entry_input_weight_inf', 1, 0, 0, '', '', '', 'Avail', '', '_bx_snipcart_form_entry_input_weight_err', 'Float', '', 1, 0),
+('bx_snipcart', 'bx_snipcart', 'added', '', '', 0, 'datetime', '_bx_snipcart_form_entry_input_sys_date_added', '_bx_snipcart_form_entry_input_date_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_snipcart', 'bx_snipcart', 'changed', '', '', 0, 'datetime', '_bx_snipcart_form_entry_input_sys_date_changed', '_bx_snipcart_form_entry_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+
+('bx_snipcart_settings', 'bx_snipcart', 'mode', '', '#!bx_snipcart_modes', 0, 'select', '_bx_snipcart_form_settings_input_sys_mode', '_bx_snipcart_form_settings_input_mode', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_snipcart_form_settings_input_mode_err', 'Xss', '', 0, 0),
+('bx_snipcart_settings', 'bx_snipcart', 'api_key_test', '', '', 0, 'text', '_bx_snipcart_form_settings_input_sys_api_key_test', '_bx_snipcart_form_settings_input_api_key_test', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
+('bx_snipcart_settings', 'bx_snipcart', 'api_key_live', '', '', 0, 'text', '_bx_snipcart_form_settings_input_sys_api_key_live', '_bx_snipcart_form_settings_input_api_key_live', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 1, 0),
+('bx_snipcart_settings', 'bx_snipcart', 'currency', '', '#!bx_snipcart_currencies', 0, 'select', '_bx_snipcart_form_settings_input_sys_currency', '_bx_snipcart_form_settings_input_currency', '_bx_snipcart_form_settings_input_currency_inf', 1, 0, 0, '', '', '', 'Avail', '', '_bx_snipcart_form_settings_input_currency_err', 'Xss', '', 1, 0),
+('bx_snipcart_settings', 'bx_snipcart', 'do_submit', '_bx_snipcart_form_settings_input_do_submit', '', 0, 'submit', '_bx_snipcart_form_settings_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
+
+INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
+('bx_snipcart_entry_add', 'title', 2147483647, 1, 1),
+('bx_snipcart_entry_add', 'cat', 2147483647, 1, 2),
+('bx_snipcart_entry_add', 'text', 2147483647, 1, 3),
+('bx_snipcart_entry_add', 'price', 2147483647, 1, 4),
+('bx_snipcart_entry_add', 'weight', 2147483647, 1, 5),
+('bx_snipcart_entry_add', 'pictures', 2147483647, 1, 6),
+('bx_snipcart_entry_add', 'allow_view_to', 2147483647, 1, 7),
+('bx_snipcart_entry_add', 'location', 2147483647, 1, 8),
+('bx_snipcart_entry_add', 'do_publish', 2147483647, 1, 9),
+
+('bx_snipcart_entry_delete', 'delete_confirm', 2147483647, 1, 1),
+('bx_snipcart_entry_delete', 'do_submit', 2147483647, 1, 2),
+
+('bx_snipcart_entry_edit', 'title', 2147483647, 1, 1),
+('bx_snipcart_entry_edit', 'cat', 2147483647, 1, 2),
+('bx_snipcart_entry_edit', 'text', 2147483647, 1, 3),
+('bx_snipcart_entry_edit', 'price', 2147483647, 1, 4),
+('bx_snipcart_entry_edit', 'weight', 2147483647, 1, 5),
+('bx_snipcart_entry_edit', 'pictures', 2147483647, 1, 6),
+('bx_snipcart_entry_edit', 'allow_view_to', 2147483647, 1, 7),
+('bx_snipcart_entry_edit', 'location', 2147483647, 1, 8),
+('bx_snipcart_entry_edit', 'do_submit', 2147483647, 1, 9),
+
+('bx_snipcart_entry_view', 'cat', 2147483647, 1, 1),
+('bx_snipcart_entry_view', 'weight', 2147483647, 1, 2),
+('bx_snipcart_entry_view', 'added', 2147483647, 1, 3),
+('bx_snipcart_entry_view', 'changed', 2147483647, 1, 4),
+
+('bx_snipcart_entry_view_full', 'cat', 2147483647, 1, 1),
+('bx_snipcart_entry_view_full', 'text', 2147483647, 1, 2),
+('bx_snipcart_entry_view_full', 'weight', 2147483647, 1, 3),
+('bx_snipcart_entry_view_full', 'added', 2147483647, 1, 4),
+('bx_snipcart_entry_view_full', 'changed', 2147483647, 1, 5),
+
+('bx_snipcart_settings_edit', 'mode', 2147483647, 1, 1),
+('bx_snipcart_settings_edit', 'api_key_test', 2147483647, 1, 2),
+('bx_snipcart_settings_edit', 'api_key_live', 2147483647, 1, 3),
+('bx_snipcart_settings_edit', 'currency', 2147483647, 1, 4),
+('bx_snipcart_settings_edit', 'do_submit', 2147483647, 1, 5);
+
+
+-- PRE-VALUES
+INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`, `extendable`) VALUES
+('bx_snipcart_cats', '_bx_snipcart_pre_lists_cats', 'bx_snipcart', '0', '1'),
+('bx_snipcart_modes', '_bx_snipcart_pre_lists_modes', 'bx_snipcart', '0', '0'),
+('bx_snipcart_currencies', '_bx_snipcart_pre_lists_currencies', 'bx_snipcart', '0', '0');
+
+INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
+('bx_snipcart_cats', '', 0, '_sys_please_select', ''),
+('bx_snipcart_cats', '1', 1, '_bx_snipcart_cat_automotive_and_industrial', ''),
+('bx_snipcart_cats', '2', 2, '_bx_snipcart_cat_beauty_health_food', ''),
+('bx_snipcart_cats', '3', 3, '_bx_snipcart_cat_books', ''),
+('bx_snipcart_cats', '4', 4, '_bx_snipcart_cat_clothing_shoes_jewelry', ''),
+('bx_snipcart_cats', '5', 5, '_bx_snipcart_cat_electronics_and_computers', ''),
+('bx_snipcart_cats', '6', 6, '_bx_snipcart_cat_handmade', ''),
+('bx_snipcart_cats', '7', 7, '_bx_snipcart_cat_home_garden_tools', ''),
+('bx_snipcart_cats', '8', 8, '_bx_snipcart_cat_movies_music_games', ''),
+('bx_snipcart_cats', '9', 9, '_bx_snipcart_cat_sports_and_outdoors', ''),
+('bx_snipcart_cats', '10', 10, '_bx_snipcart_cat_toys_kids_baby', ''),
+
+('bx_snipcart_modes', '', 0, '_sys_please_select', ''),
+('bx_snipcart_modes', 'test', 1, '_bx_snipcart_mode_test', ''),
+('bx_snipcart_modes', 'live', 2, '_bx_snipcart_mode_live', ''),
+
+('bx_snipcart_currencies', '', 0, '_sys_please_select', ''),
+('bx_snipcart_currencies', 'CAD', 1, 'CAD', 'C&#36;'),
+('bx_snipcart_currencies', 'EUR', 2, 'EUR', '&#128;'),
+('bx_snipcart_currencies', 'USD', 3, 'USD', '&#36;');
+
+
+-- COMMENTS
+INSERT INTO `sys_objects_cmts` (`Name`, `Module`, `Table`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Nl2br`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `ObjectVote`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
+('bx_snipcart', 'bx_snipcart', 'bx_snipcart_cmts', 1, 5000, 1000, 0, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-snipcart-entry&id={object_id}', '', 'bx_snipcart_entries', 'id', 'author', 'title', 'comments', '', '');
+
+
+-- VOTES
+INSERT INTO `sys_objects_vote` (`Name`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES 
+('bx_snipcart', 'bx_snipcart_votes', 'bx_snipcart_votes_track', '604800', '1', '1', '0', '1', 'bx_snipcart_entries', 'id', 'author', 'rate', 'votes', '', '');
+
+
+-- REPORTS
+INSERT INTO `sys_objects_report` (`name`, `table_main`, `table_track`, `is_on`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_snipcart', 'bx_snipcart_reports', 'bx_snipcart_reports_track', '1', 'page.php?i=view-snipcart-entry&id={object_id}', 'bx_snipcart_entries', 'id', 'author', 'reports', '', '');
+
+
+-- VIEWS
+INSERT INTO `sys_objects_view` (`name`, `table_track`, `period`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_snipcart', 'bx_snipcart_views_track', '86400', '1', 'bx_snipcart_entries', 'id', 'author', 'views', '', '');
+
+
+-- FAFORITES
+INSERT INTO `sys_objects_favorite` (`name`, `table_track`, `is_on`, `is_undo`, `is_public`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_snipcart', 'bx_snipcart_favorites_track', '1', '1', '1', 'page.php?i=view-snipcart-entry&id={object_id}', 'bx_snipcart_entries', 'id', 'author', 'favorites', '', '');
+
+
+-- FEATURED
+INSERT INTO `sys_objects_feature` (`name`, `is_on`, `is_undo`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_flag`, `class_name`, `class_file`) VALUES 
+('bx_snipcart', '1', '1', 'page.php?i=view-snipcart-entry&id={object_id}', 'bx_snipcart_entries', 'id', 'author', 'featured', '', '');
+
+
+-- CONTENT INFO
+INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
+('bx_snipcart', '_bx_snipcart', 'bx_snipcart', 'added', 'edited', 'deleted', '', ''),
+('bx_snipcart_cmts', '_bx_snipcart_cmts', 'bx_snipcart', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
+
+INSERT INTO `sys_content_info_grids` (`object`, `grid_object`, `grid_field_id`, `condition`, `selection`) VALUES
+('bx_snipcart', 'bx_snipcart_administration', 'id', '', ''),
+('bx_snipcart', 'bx_snipcart_common', 'id', '', '');
+
+
+-- SEARCH EXTENDED
+INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
+('bx_snipcart', 'bx_snipcart', 'bx_snipcart', '_bx_snipcart_search_extended', 1, '', ''),
+('bx_snipcart_cmts', 'bx_snipcart_cmts', 'bx_snipcart', '_bx_snipcart_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
+
+
+-- STUDIO: page & widget
+INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
+(3, 'bx_snipcart', '_bx_snipcart', '_bx_snipcart', 'bx_snipcart@modules/boonex/snipcart/|std-icon.svg');
+SET @iPageId = LAST_INSERT_ID();
+
+SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
+SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
+INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
+(@iPageId, 'bx_snipcart', '{url_studio}module.php?name=bx_snipcart', '', 'bx_snipcart@modules/boonex/snipcart/|std-icon.svg', '_bx_snipcart', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
+INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
+(@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));

+ 64 - 0
modules/boonex/snipcart/updates/9.0.2_9.0.3/source/install/sql/uninstall.sql

@@ -0,0 +1,64 @@
+
+-- TABLES
+DROP TABLE IF EXISTS `bx_snipcart_entries`, `bx_snipcart_settings`, `bx_snipcart_files`, `bx_snipcart_photos_resized`, `bx_snipcart_cmts`, `bx_snipcart_votes`, `bx_snipcart_votes_track`, `bx_snipcart_views_track`, `bx_snipcart_meta_keywords`, `bx_snipcart_meta_locations`, `bx_snipcart_meta_mentions`, `bx_snipcart_reports`, `bx_snipcart_reports_track`, `bx_snipcart_favorites_track`;
+
+
+-- STORAGES & TRANSCODERS
+DELETE FROM `sys_objects_storage` WHERE `object` = 'bx_snipcart_files' OR `object` = 'bx_snipcart_photos_resized';
+DELETE FROM `sys_storage_tokens` WHERE `object` = 'bx_snipcart_files' OR `object` = 'bx_snipcart_photos_resized';
+
+DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_snipcart_preview', 'bx_snipcart_gallery', 'bx_snipcart_cover');
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_snipcart_preview', 'bx_snipcart_gallery', 'bx_snipcart_cover');
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_snipcart_preview', 'bx_snipcart_gallery', 'bx_snipcart_cover');
+
+
+-- FORMS
+DELETE FROM `sys_objects_form` WHERE `module` = 'bx_snipcart';
+DELETE FROM `sys_form_displays` WHERE `module` = 'bx_snipcart';
+DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_snipcart';
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN ('bx_snipcart_entry_add', 'bx_snipcart_entry_edit', 'bx_snipcart_entry_view', 'bx_snipcart_entry_view_full', 'bx_snipcart_entry_delete', 'bx_snipcart_settings_edit');
+
+
+-- PRE-VALUES
+DELETE FROM `sys_form_pre_lists` WHERE `module` = 'bx_snipcart';
+DELETE FROM `sys_form_pre_values` WHERE `Key` IN('bx_snipcart_cats', 'bx_snipcart_modes', 'bx_snipcart_currencies');
+
+
+-- COMMENTS
+DELETE FROM `sys_objects_cmts` WHERE `Name` = 'bx_snipcart';
+
+
+-- VOTES
+DELETE FROM `sys_objects_vote` WHERE `Name` = 'bx_snipcart';
+
+
+-- REPORTS
+DELETE FROM `sys_objects_report` WHERE `name` = 'bx_snipcart';
+
+
+-- VIEWS
+DELETE FROM `sys_objects_view` WHERE `name` = 'bx_snipcart';
+
+
+-- FAFORITES
+DELETE FROM `sys_objects_favorite` WHERE `name` = 'bx_snipcart';
+
+
+-- FEATURED
+DELETE FROM `sys_objects_feature` WHERE `name` = 'bx_snipcart';
+
+
+-- CONTENT INFO
+DELETE FROM `sys_objects_content_info` WHERE `name` IN ('bx_snipcart', 'bx_snipcart_cmts');
+
+DELETE FROM `sys_content_info_grids` WHERE `object` IN ('bx_snipcart');
+
+
+-- SEARCH EXTENDED
+DELETE FROM `sys_objects_search_extended` WHERE `module` = 'bx_snipcart';
+
+
+-- STUDIO: page & widget
+DELETE FROM `tp`, `tw`, `tpw`
+USING `sys_std_pages` AS `tp`, `sys_std_widgets` AS `tw`, `sys_std_pages_widgets` AS `tpw`
+WHERE `tp`.`id` = `tw`.`page_id` AND `tw`.`id` = `tpw`.`widget_id` AND `tp`.`name` = 'bx_snipcart';

+ 1 - 0
modules/boonex/snipcart/updates/9.0.2_9.0.3/source/template/unit_showcase.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/unit_showcase.html />

+ 68 - 0
modules/boonex/stripe_connect/updates/9.0.1_9.0.2/source/install/config.php

@@ -0,0 +1,68 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    StripeConnect Stripe Connect
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_stripe_connect',
+    'title' => 'Stripe Connect',
+    'note' => 'Organize eCommerce platform using Stripe Connect.',
+    'version' => '9.0.2',
+    'vendor' => 'BoonEx',
+    'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC5'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/stripe_connect/',
+    'home_uri' => 'stripe_connect',
+
+    'db_prefix' => 'bx_stripe_connect_',
+    'class_prefix' => 'BxStripeConnect',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Stripe Connect',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+);
+
+/** @} */

+ 10 - 18
modules/boonex/timeline/updates/9.0.6_9.0.7/install/sql/install.sql

@@ -1,6 +1,14 @@
 SET @sName = 'bx_timeline';
 
 
+-- TABLES
+CREATE TABLE IF NOT EXISTS `bx_timeline_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
 -- TABLE: bx_timeline_comments
 
 ALTER TABLE `bx_timeline_comments` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -79,20 +87,13 @@ ALTER TABLE `bx_timeline_meta_locations` CHANGE `country` `country` varchar(2) C
 ALTER TABLE `bx_timeline_meta_locations` CHANGE `state` `state` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 ALTER TABLE `bx_timeline_meta_locations` CHANGE `city` `city` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 ALTER TABLE `bx_timeline_meta_locations` CHANGE `zip` `zip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `bx_timeline_meta_locations` CHANGE `street` `street` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `bx_timeline_meta_locations` CHANGE `street_number` `street_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
 
 REPAIR TABLE `bx_timeline_meta_locations`;
 OPTIMIZE TABLE `bx_timeline_meta_locations`;
 
 
--- TABLE: bx_timeline_meta_mentions
-
-ALTER TABLE `bx_timeline_meta_mentions` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
-
-REPAIR TABLE `bx_timeline_meta_mentions`;
-OPTIMIZE TABLE `bx_timeline_meta_mentions`;
-
-
 -- TABLE: bx_timeline_photos
 
 ALTER TABLE `bx_timeline_photos` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -223,14 +224,5 @@ REPAIR TABLE `bx_timeline_votes_track`;
 OPTIMIZE TABLE `bx_timeline_votes_track`;
 
 
--- TABLES
-CREATE TABLE IF NOT EXISTS `bx_timeline_meta_mentions` (
-  `object_id` int(10) unsigned NOT NULL,
-  `profile_id` int(10) unsigned NOT NULL,
-  KEY `object_id` (`object_id`),
-  KEY `profile_id` (`profile_id`)
-);
-
-
 -- FORMS
 UPDATE `sys_form_inputs` SET `html`='3', `db_pass`='XssHtml' WHERE `object`='bx_timeline_post' AND `name`='text';

+ 315 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/classes/BxTimelineConfig.php

@@ -0,0 +1,315 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+bx_import('BxDolPrivacy');
+
+class BxTimelineConfig extends BxBaseModNotificationsConfig
+{
+    protected $_bAllowDelete;
+
+    protected $_iRssLength;
+    protected $_iCharsDisplayMax;
+    protected $_iCharsDisplayMaxTitle;
+
+    protected $_sStorageObject;
+    protected $_sTranscoderObjectPreview;
+    protected $_sTranscoderObjectView;
+    protected $_aPhotoUploaders;
+    protected $_aVideoUploaders;
+
+    protected $_sMenuItemManage;
+    protected $_sMenuItemActions;
+
+    protected $_aRepostDefaults;
+
+    protected $_iTimelineVisibilityThreshold;
+    protected $_aPregPatterns;
+
+    /**
+     * Constructor
+     */
+    public function __construct($aModule)
+    {
+        parent::__construct($aModule);
+
+        $this->CNF = array (
+            'ICON' => 'clock-o col-green1',
+
+            // database tables
+            'TABLE_ENTRIES' => $aModule['db_prefix'] . 'events',
+
+	        // database fields
+        	'FIELD_ID' => 'id',
+            'FIELD_OWNER_ID' => 'owner_id',
+        	'FIELD_ADDED' => 'date',
+        	'FIELD_TITLE' => 'title',
+        	'FIELD_TEXT' => 'description',
+        	'FIELD_LOCATION_PREFIX' => 'location',
+
+            // page URIs
+        	'URL_HOME' => 'page.php?i=timeline-view-home',
+
+        	// objects
+        	'OBJECT_METATAGS' => $this->_sName,
+            'OBJECT_COMMENTS' => $this->_sName,
+        	'OBJECT_VIEWS' => $this->_sName,
+        	'OBJECT_VOTES' => $this->_sName,
+        	'OBJECT_REPORTS' => $this->_sName,
+
+        	// some language keys
+            'T' => array (
+                'txt_sample_single' => '_bx_timeline_txt_sample',
+        		'txt_sample_single_ext' => '_bx_timeline_txt_sample_ext',
+            	'txt_sample_comment_single' => '_bx_timeline_txt_sample_comment_single',
+        		'txt_sample_vote_single' => '_bx_timeline_txt_sample_vote_single',
+            ),
+        );
+
+        $this->_aPrefixes = array(
+        	'style' => 'bx-tl',
+        	'language' => '_bx_timeline',
+        	'option' => 'bx_timeline_',
+        	'common_post' => 'timeline_common_'
+        );
+
+        $this->_aObjects = array_merge($this->_aObjects, array(
+        	'comment' => $this->CNF['OBJECT_COMMENTS'],
+        	'view' => $this->CNF['OBJECT_VIEWS'],
+        	'vote' => $this->CNF['OBJECT_VOTES'],
+        	'report' => $this->CNF['OBJECT_REPORTS'],
+        	'metatags' => $this->_sName,
+
+        	'storage_photos' => $this->_sName . '_photos',
+        	'storage_videos' => $this->_sName . '_videos',
+        	'transcoder_photos_preview' => $this->_sName . '_photos_preview',
+        	'transcoder_photos_view' => $this->_sName . '_photos_view',
+        	'transcoder_photos_big' => $this->_sName . '_photos_big',
+        	'transcoder_videos_poster' => $this->_sName . '_videos_poster',
+        	'transcoder_videos_mp4' => $this->_sName . '_videos_mp4',
+        	'transcoder_videos_webm' => $this->_sName . '_videos_webm',
+
+        	'page_item_brief' => $this->_sName . '_item_brief',
+
+        	'menu_item_manage' => $this->_sName . '_menu_item_manage',
+        	'menu_item_actions' => $this->_sName . '_menu_item_actions',
+        	'menu_post_attachments' => $this->_sName . '_menu_post_attachments',
+
+        	'form_post' => $this->_sName . '_post',
+        	'form_attach_link' => $this->_sName . '_attach_link',
+        	'form_display_post_add' => $this->_sName . '_post_add',
+        	'form_display_post_add_public' => $this->_sName . '_post_add_public',
+        	'form_display_attach_link_add' => $this->_sName . '_attach_link_add'
+        ));
+
+        $this->_aHandlerDescriptor = array('module_name' => '', 'module_method' => '', 'module_class' => '', 'groupable' => '', 'group_by' => '');
+        $this->_sHandlersMethod = 'get_timeline_data';
+
+        $this->_aPhotoUploaders = array($this->_sName . '_simple_photo');
+        $this->_aVideoUploaders = array($this->_sName . '_simple_video');
+
+        $this->_bJsMode = false;
+        $this->_aJsClasses = array(
+            'main' => 'BxTimelineMain',
+            'view' => 'BxTimelineView',
+            'post' => 'BxTimelinePost',
+            'repost' => 'BxTimelineRepost'
+        );
+        $this->_aJsObjects = array(
+            'view' => 'oTimelineView',
+            'post' => 'oTimelinePost',
+            'repost' => 'oTimelineRepost'
+        );
+
+        $sHp = str_replace('_', '-', $this->_sName);
+        $sHpI = BX_TIMELINE_VIEW_ITEM;
+        $sHpT = BX_TIMELINE_VIEW_TIMELINE;
+        $sHpO = BX_TIMELINE_VIEW_OUTLINE;
+        $sHpS = BX_TIMELINE_VIEW_SEARCH;
+        $this->_aHtmlIds = array(
+        	'view' => array(
+        		'main_' . $sHpI => $sHp . '-' . $sHpI,
+        		'item_' . $sHpI => $sHp . '-item-' . $sHpI . '-',
+                'item_popup_' . $sHpI => $sHp . '-item-popup-' . $sHpI,
+                'photo_popup_' . $sHpI => $sHp . '-photo-popup-' . $sHpI,
+
+                'main_' . $sHpT => $sHp . '-' . $sHpT,
+        		'item_' . $sHpT => $sHp . '-item-' . $sHpT . '-',
+        		'item_popup_' . $sHpT => $sHp . '-item-popup-' . $sHpT,
+                'photo_popup_' . $sHpT => $sHp . '-photo-popup-' . $sHpT,
+
+        		'main_' . $sHpO => $sHp . '-' . $sHpO,
+        		'item_' . $sHpO => $sHp . '-item-' . $sHpO . '-',
+        		'item_popup_' . $sHpO => $sHp . '-item-popup-' . $sHpO,
+                'photo_popup_' . $sHpO => $sHp . '-photo-popup-' . $sHpO,
+
+        		'main_' . $sHpS => $sHp . '-' . $sHpS,
+        		'photo_popup_' . $sHpS => $sHp . '-photo-popup-' . $sHpS,
+
+        		'main_item' => $sHp . '-item',
+				'menu_popup' => $sHp . '-menu-popup-',
+            ),
+            'post' => array(
+                'attach_link_popup' =>  $sHp . '-attach-link-popup',
+                'attach_link_form_field' => $sHp . '-attach-link-form_field',
+                'attach_link_item' => $sHp . '-attach-link-item-',
+
+            	'main_' . $sHpT => $sHp . '-' . $sHpT,
+            	'main_' . $sHpO => $sHp . '-' . $sHpO,
+            ),
+            'repost' => array(
+                'main' => $sHp . '-repost-',
+                'counter' => $sHp . '-repost-counter-',
+                'by_popup' => $sHp . '-repost-by-',
+            )
+        );
+
+        $this->_aRepostDefaults = array(
+            'show_do_repost_as_button' => false,
+            'show_do_repost_as_button_small' => false,
+            'show_do_repost_icon' => true,
+            'show_do_repost_label' => false,
+            'show_counter' => true
+        );
+
+        $this->_iTimelineVisibilityThreshold = 0;
+
+        $this->_aPregPatterns = array(
+            "meta_title" => "/<title>(.*)<\/title>/",
+            "meta_description" => "/<meta[\s]+[^>]*?name[\s]?=[\s\"\']+description[\s\"\']+content[\s]?=[\s\"\']+(.*?)[\"\']+.*?>/",
+        	"url" => "/(([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?/"
+        );
+    }
+
+    public function init(&$oDb)
+    {
+    	parent::init($oDb);
+
+    	$sOptionPrefix = $this->getPrefix('option');
+        $this->_bAllowDelete = getParam($sOptionPrefix . 'enable_delete') == 'on';
+
+        $this->_aPerPage = array(
+    		'default' => (int)getParam($sOptionPrefix . 'events_per_page'),
+        	'profile' => (int)getParam($sOptionPrefix . 'events_per_page_profile'),
+        	'account' => (int)getParam($sOptionPrefix . 'events_per_page_account'),
+        	'home' => (int)getParam($sOptionPrefix . 'events_per_page_home')
+    	);
+
+        $this->_iRssLength = (int)getParam($sOptionPrefix . 'rss_length');
+        $this->_iCharsDisplayMax = (int)getParam($sOptionPrefix . 'chars_display_max');
+        $this->_iCharsDisplayMaxTitle = 20;
+    }
+
+    public function isAllowDelete()
+    {
+        return $this->_bAllowDelete;
+    }
+
+    public function getUploaders($sType)
+    {
+        $aResult = array();
+
+        switch($sType) {
+            case 'photo':
+                $aResult = $this->_aPhotoUploaders;
+                break;
+			case 'video':
+                $aResult = $this->_aVideoUploaders;
+                break;
+        }
+
+        return $aResult;
+    }
+
+    public function getRssLength()
+    {
+        return $this->_iRssLength;
+    }
+
+    public function getCharsDisplayMax()
+    {
+        return $this->_iCharsDisplayMax;
+    }
+
+    public function getCharsDisplayMaxTitle()
+    {
+        return $this->_iCharsDisplayMaxTitle;
+    }
+
+    public function getRepostDefaults()
+    {
+        return $this->_aRepostDefaults;
+    }
+
+    public function getPregPattern($sType)
+    {
+        return $this->_aPregPatterns[$sType];
+    }
+
+    /**
+     * Ancillary functions
+     */
+    public function getTitle($s)
+    {
+        return strmaxtextlen($s, $this->getCharsDisplayMaxTitle(), '...');
+    }
+
+    public function getViewUrl($iOwnerId)
+    {
+        return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=timeline-view&id=' . $iOwnerId);
+    }
+
+    public function getHomeViewUrl()
+    {
+        return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=timeline-view-home');
+    }
+
+    public function getItemViewUrl(&$aEvent)
+    {
+        return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=timeline-item&id=' . $aEvent['id']);
+    }
+
+    public function isSystem($sType, $sAction)
+    {
+        $sPrefix = $this->getPrefix('common_post');
+        return strpos($sType, $sPrefix) === false && !empty($sAction);
+    }
+    public function getSystemData(&$aEvent, $aBrowseParams = array())
+    {
+		$sHandler = $aEvent['type'] . '_' . $aEvent['action'];
+        if(!$this->isHandler($sHandler))
+            return false;
+
+        $aHandler = $this->getHandlers($sHandler);
+        if(empty($aHandler['module_name']) || empty($aHandler['module_class']) || empty($aHandler['module_method']))
+        	return false; 
+
+		return BxDolService::call($aHandler['module_name'], $aHandler['module_method'], array($aEvent, $aBrowseParams), $aHandler['module_class']);
+    }
+    public function getSystemDataByDescriptor($sType, $sAction, $iObjectId)
+    {
+    	$aDescriptor = array(
+    		'type' => $sType, 
+    		'action' => $sAction,
+    		'object_id' => $iObjectId
+    	);
+    	return $this->getSystemData($aDescriptor);
+    }
+
+    public function isEqualUrls($sUrl1, $sUrl2)
+    {
+        $sUrl1 = trim($sUrl1, "/");
+        $sUrl2 = trim($sUrl2, "/");
+
+        return strncmp($sUrl1, $sUrl2, strlen($sUrl1)) === 0;
+    }
+}
+
+/** @} */

+ 2117 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/classes/BxTimelineModule.php

@@ -0,0 +1,2117 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+bx_import('BxDolAcl');
+bx_import('BxBaseModNotificationsModule');
+
+define('BX_TIMELINE_TYPE_ITEM', 'view_item');
+define('BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS', 'owner_and_connections');
+define('BX_TIMELINE_TYPE_DEFAULT', BX_BASE_MOD_NTFS_TYPE_OWNER);
+
+define('BX_TIMELINE_VIEW_ITEM', 'item');
+define('BX_TIMELINE_VIEW_TIMELINE', 'timeline');
+define('BX_TIMELINE_VIEW_OUTLINE', 'outline');
+define('BX_TIMELINE_VIEW_SEARCH', 'search');
+define('BX_TIMELINE_VIEW_DEFAULT', BX_TIMELINE_VIEW_OUTLINE);
+
+define('BX_TIMELINE_FILTER_ALL', 'all');
+define('BX_TIMELINE_FILTER_OWNER', 'owner');
+define('BX_TIMELINE_FILTER_OTHER', 'other');
+
+define('BX_TIMELINE_PARSE_TYPE_POST', 'post');
+define('BX_TIMELINE_PARSE_TYPE_REPOST', 'repost');
+define('BX_TIMELINE_PARSE_TYPE_DEFAULT', BX_TIMELINE_PARSE_TYPE_POST);
+
+define('BX_TIMELINE_MEDIA_PHOTO', 'photo');
+define('BX_TIMELINE_MEDIA_VIDEO', 'video');
+
+class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolContentInfoService
+{
+    protected $_sJsPostObject;
+    protected $_sJsViewObject;
+    protected $_aPostElements;
+    protected $_sJsOutlineObject;
+
+    protected $_sDividerTemplate;
+    protected $_sBalloonTemplate;
+    protected $_sCmtPostTemplate;
+    protected $_sCmtViewTemplate;
+    protected $_sCmtTemplate;
+
+    /**
+     * Constructor
+     */
+    function __construct($aModule)
+    {
+        parent::__construct($aModule);
+    }
+
+    /**
+     * ACTION METHODS
+     */
+    public function actionPost()
+    {
+        $sType = bx_process_input($_POST['type']);
+        $sMethod = 'getForm' . ucfirst($sType);
+        if(!method_exists($this, $sMethod)) {
+            echoJson(array());
+            return;
+        }
+
+        $this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
+
+        $mixedAllowed = $this->isAllowedPost(true);
+        if($mixedAllowed !== true) {
+            echoJson(array('message' => strip_tags($mixedAllowed)));
+            return;
+        }
+
+        $aResult = $this->$sMethod();
+        echoJson($aResult);
+    }
+
+	function actionPin()
+    {
+        $this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
+
+        $iId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+
+        $mixedAllowed = $this->{'isAllowed' . ((int)$aEvent['pinned'] == 0 ? 'Pin' : 'Unpin')}($aEvent, true);
+        if($mixedAllowed !== true)
+            return echoJson(array('code' => 1, 'message' => strip_tags($mixedAllowed)));
+
+		$aEvent['pinned'] = (int)$aEvent['pinned'] == 0 ? time() : 0;
+        if(!$this->_oDb->updateEvent(array('pinned' => $aEvent['pinned']), array('id' => $iId)))
+        	return echoJson(array('code' => 2));
+
+		echoJson(array(
+			'code' => 0, 
+			'id' => $iId, 
+			'eval' => $this->_oConfig->getJsObject('view') . '.onPinPost(oData)'
+		));
+    }
+
+    function actionDelete()
+    {
+        $this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
+
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => bx_process_input(bx_get('id'), BX_DATA_INT)));
+
+        $mixedAllowed = $this->isAllowedDelete($aEvent, true);
+        if($mixedAllowed !== true)
+            return echoJson(array('code' => 1, 'message' => strip_tags($mixedAllowed)));
+
+        if(!$this->deleteEvent($aEvent))
+            return echoJson(array('code' => 2));
+
+        echoJson(array(
+        	'code' => 0, 
+        	'id' => $aEvent['id'], 
+        	'eval' => $this->_oConfig->getJsObject('view') . '.onDeletePost(oData)'
+        ));
+    }
+
+    public function actionRepost()
+    {
+    	$iAuthorId = $this->getUserId();
+
+        $iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
+        $aContent = array(
+            'type' => bx_process_input(bx_get('type'), BX_DATA_TEXT),
+            'action' => bx_process_input(bx_get('action'), BX_DATA_TEXT),
+            'object_id' => bx_process_input(bx_get('object_id'), BX_DATA_INT),
+        );
+
+        $aReposted = $this->_oDb->getReposted($aContent['type'], $aContent['action'], $aContent['object_id']);
+        if(empty($aReposted) || !is_array($aReposted)) {
+            echoJson(array('code' => 1, 'message' => _t('_bx_timeline_txt_err_cannot_repost')));
+            return;
+        }
+
+        $mixedAllowed = $this->isAllowedRepost($aReposted, true);
+        if($mixedAllowed !== true) {
+            echoJson(array('code' => 2, 'message' => strip_tags($mixedAllowed)));
+            return;
+        }
+
+        $bReposted = $this->_oDb->isReposted($aReposted['id'], $iOwnerId, $iAuthorId);
+		if($bReposted) {
+        	echoJson(array('code' => 3, 'message' => _t('_bx_timeline_txt_err_already_reposted')));
+            return;
+        }
+
+        $iId = $this->_oDb->insertEvent(array(
+            'owner_id' => $iOwnerId,
+            'type' => $this->_oConfig->getPrefix('common_post') . 'repost',
+            'action' => '',
+            'object_id' => $iAuthorId,
+            'object_privacy_view' => $this->_oConfig->getPrivacyViewDefault('object'),
+            'content' => serialize($aContent),
+            'title' => '',
+            'description' => ''
+        ));
+
+        if(empty($iId)) {
+	        echoJson(array('code' => 4, 'message' => _t('_bx_timeline_txt_err_cannot_repost')));        
+	        return;
+        }
+
+        $this->onRepost($iId, $aReposted);
+
+        $aReposted = $this->_oDb->getReposted($aContent['type'], $aContent['action'], $aContent['object_id']);
+		$sCounter = $this->_oTemplate->getRepostCounter($aReposted);
+
+		echoJson(array(
+			'code' => 0, 
+			'message' => _t('_bx_timeline_txt_msg_success_repost'), 
+			'count' => $aReposted['reposts'], 
+			'counter' => $sCounter,
+			'disabled' => !$bReposted
+		));
+    }
+
+    function actionGetPost()
+    {
+        $sView = bx_process_input(bx_get('view'));
+        $this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
+
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => bx_process_input(bx_get('id'), BX_DATA_INT)));
+        if(empty($aEvent) || !is_array($aEvent))
+            return echoJson(array());
+
+        echoJson(array(
+            'id' => $aEvent['id'],
+            'view' => $sView,
+        	'item' => $this->_oTemplate->getPost($aEvent, array(
+        		'view' => $sView, 
+        		'type' => 'owner', 
+        		'owner_id' => $this->_iOwnerId, 
+        		'dynamic_mode' => true
+            )),
+            'eval' => $this->_oConfig->getJsObject('post') . "._onGetPost(oData)"
+        ));
+    }
+
+    function actionGetPosts()
+    {
+        $aParams = $this->_prepareParamsGet();
+        list($sItems, $sLoadMore, $sBack, $sEmpty) = $this->_oTemplate->getPosts($aParams);
+
+        echoJson(array(
+        	'view' => $aParams['view'],
+        	'items' => $sItems, 
+        	'load_more' => $sLoadMore, 
+        	'back' => $sBack,
+            'empty' => $sEmpty,
+        	'eval' => $this->_oConfig->getJsObject('view') . "._onGetPosts(oData)"
+        ));
+    }
+
+    public function actionGetPostForm($sType)
+    {
+        $this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
+
+        $sMethod = 'getForm' . ucfirst($sType);
+        if(!method_exists($this, $sMethod)) {
+            echoJson(array());
+            return;
+        }
+        $aResult = $this->$sMethod();
+
+        echoJson($aResult);
+    }
+
+    public function actionGetComments()
+    {
+        $this->_iOwnerId = bx_process_input(bx_get('owner_id'), BX_DATA_INT);
+
+        $sSystem = bx_process_input(bx_get('system'), BX_DATA_TEXT);
+        $iId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        $sComments = $this->_oTemplate->getComments($sSystem, $iId, true);
+
+        echoJson(array('content' => $sComments));
+    }
+
+    public function actionAddAttachLink()
+    {
+        $aResult = $this->getFormAttachLink();
+
+        echoJson($aResult);
+    }
+
+    public function actionDeleteAttachLink()
+    {
+    	$iUserId = $this->getUserId();
+        $iLinkId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        if(empty($iLinkId)) {
+            echoJson(array());
+            return;
+        }
+
+        $aLink = $this->_oDb->getUnusedLinks($iUserId, $iLinkId);
+    	if(empty($aLink) || !is_array($aLink)) {
+            echoJson(array());
+            return;
+        }
+
+		if(!empty($aLink['media_id']))
+			BxDolStorage::getObjectInstance($this->_oConfig->getObject('storage_photos'))->deleteFile($aLink['media_id']);
+
+        $aResult = array();
+        if($this->_oDb->deleteUnusedLinks($iUserId, $iLinkId))
+            $aResult = array('code' => 0);
+        else
+            $aResult = array('code' => 1, 'message' => _t('_bx_timeline_form_post_input_link_err_delete'));
+
+        echoJson($aResult);
+    }
+
+    public function actionGetAttachLinkForm()
+    {
+        echo $this->_oTemplate->getAttachLinkForm();
+    }
+
+    public function actionGetRepostedBy()
+    {
+        $iRepostedId = bx_process_input(bx_get('id'), BX_DATA_INT);
+
+        echo $this->_oTemplate->getRepostedBy($iRepostedId);
+    }
+
+    public function actionGetItemBrief()
+    {
+        echo BxDolPage::getObjectInstance($this->_oConfig->getObject('page_item_brief'), $this->_oTemplate)->getCode();
+    }
+
+    function actionRss()
+    {
+        $aArgs = func_get_args();
+
+        $sType = array_shift($aArgs);
+        $iOwnerId = 0;
+
+        switch($sType) {
+            case BX_BASE_MOD_NTFS_TYPE_OWNER:
+                $iOwnerId = array_shift($aArgs);
+                list($sUserName) = $this->getUserInfo($iOwnerId);
+
+                $sRssCaption = _t('_bx_timeline_txt_rss_caption', $sUserName);
+                $sRssLink = $this->_oConfig->getViewUrl($iOwnerId);
+                break;
+
+            case BX_BASE_MOD_NTFS_TYPE_PUBLIC:
+                $sRssCaption = _t('_bx_timeline_page_title_view_home');
+                $sRssLink = $this->_oConfig->getHomeViewUrl();
+                break;
+        }
+        
+
+        $aParams = $this->_prepareParams(BX_TIMELINE_VIEW_DEFAULT, $sType, $iOwnerId, 0, $this->_oConfig->getRssLength(), '', array(), 0);
+        $aEvents = $this->_oDb->getEvents($aParams);
+
+        $aRssData = array();
+        foreach($aEvents as $aEvent) {
+            if(empty($aEvent['title'])) continue;
+
+            $aRssData[$aEvent['id']] = array(
+               'UnitID' => $aEvent['id'],
+               'UnitTitle' => $aEvent['title'],
+               'UnitLink' => $this->_oConfig->getItemViewUrl($aEvent),
+               'UnitDesc' => $aEvent['description'],
+               'UnitDateTimeUTS' => $aEvent['date'],
+            );
+        }
+
+        $oRss = new BxDolRssFactory();
+
+        header('Content-Type: application/xml; charset=utf-8');
+        echo $oRss->GenRssByData($aRssData, $sRssCaption, $sRssLink);
+    }
+
+    /**
+     * SERVICE METHODS
+     */
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_author get_author
+     * 
+     * @code bx_srv('bx_timeline', 'get_author', [...]); @endcode
+     * 
+     * Get author ID from content info by content ID. Is used in "Content Info Objects" system.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @return integer value with author ID.
+     * 
+     * @see BxTimelineModule::serviceGetAuthor
+     */
+    /** 
+     * @ref bx_timeline-get_author "get_author"
+     */
+    public function serviceGetAuthor ($iContentId)
+    {
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContentId));
+        if(empty($aEvent) || !is_array($aEvent))
+            return 0;
+
+        return $this->_oConfig->isSystem($aEvent['type'], $aEvent['action']) ? (int)$aEvent['owner_id'] : (int)$aEvent['object_id'];
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_date_changed get_date_changed
+     * 
+     * @code bx_srv('bx_timeline', 'get_date_changed', [...]); @endcode
+     * 
+     * Get date when the content was changed last time. Is used in "Content Info Objects" system.
+     * Note. In case of Timeline event 0 is returned everytime.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @return integer value with changing date.
+     * 
+     * @see BxTimelineModule::serviceGetDateChanged
+     */
+    /** 
+     * @ref bx_timeline-get_date_changed "get_date_changed"
+     */
+    public function serviceGetDateChanged ($iContentId)
+    {
+        return 0;
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_link get_link
+     * 
+     * @code bx_srv('bx_timeline', 'get_link', [...]); @endcode
+     * 
+     * Get content view page link. Is used in "Content Info Objects" system.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @return string value with view page link.
+     * 
+     * @see BxTimelineModule::serviceGetLink
+     */
+    /** 
+     * @ref bx_timeline-get_link "get_link"
+     */
+    public function serviceGetLink ($iContentId)
+    {
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContentId));
+        if(empty($aEvent) || !is_array($aEvent))
+            return '';
+
+        return $this->_oConfig->getItemViewUrl($aEvent);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_thumb get_thumb
+     * 
+     * @code bx_srv('bx_timeline', 'get_thumb', [...]); @endcode
+     * 
+     * Get content thumbnail link. Is used in "Content Info Objects" system.
+     * Note. In case of Timeline event an empty string is returned everytime.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @param $sTranscoder (optional) string value with transcoder name which should be applied to thumbnail image.
+     * @return string value with thumbnail link.
+     * 
+     * @see BxTimelineModule::serviceGetThumb
+     */
+    /** 
+     * @ref bx_timeline-get_thumb "get_thumb"
+     */
+    public function serviceGetThumb ($iContentId, $sTranscoder = '') 
+    {
+        return '';
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_info get_info
+     * 
+     * @code bx_srv('bx_timeline', 'get_info', [...]); @endcode
+     * 
+     * Get content info by content ID. Is used in "Content Info Objects" system.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @param $bSearchableFieldsOnly (optional) boolean value determining all info or "searchable fields" only will be returned.
+     * @return an array with content info. Empty array is returned if something is wrong.
+     * 
+     * @see BxTimelineModule::serviceGetInfo
+     */
+    /** 
+     * @ref bx_timeline-get_info "get_info"
+     */
+    public function serviceGetInfo ($iContentId, $bSearchableFieldsOnly = true)
+    {
+        $aContentInfo = $this->_oDb->getEvents(array(
+        	'browse' => 'id', 
+        	'value' => $iContentId)
+        );
+
+        return BxDolContentInfo::formatFields($aContentInfo);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_search_result_unit get_search_result_unit
+     * 
+     * @code bx_srv('bx_timeline', 'get_search_result_unit', [...]); @endcode
+     * 
+     * Get search result unit by content ID. Is used in "Content Info Objects" system.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @param $sUnitTemplate (optional) string value with template name.
+     * @return HTML string with search result unit. Empty string is returned if something is wrong.
+     * 
+     * @see BxTimelineModule::serviceGetSearchResultUnit
+     */
+    /** 
+     * @ref bx_timeline-get_search_result_unit "get_search_result_unit"
+     */
+    public function serviceGetSearchResultUnit ($iContentId, $sUnitTemplate = '')
+    {
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContentId));
+        if(empty($aEvent) || !is_array($aEvent))
+            return '';
+
+        if(empty($sUnitTemplate))
+            $sUnitTemplate = 'unit.html';
+
+        return $this->_oTemplate->unit($aEvent, true, $sUnitTemplate);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_post get_block_post
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_post', [...]); @endcode
+     * 
+     * Get Post block for a separate page.
+     *
+     * @param $iProfileId (optional) profile ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockPost
+     */
+    /** 
+     * @ref bx_timeline-get_block_post "get_block_post"
+     */
+    public function serviceGetBlockPost($iProfileId = 0)
+    {
+    	if(empty($iProfileId) && bx_get('profile_id') !== false)
+			$iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
+
+		if(empty($iProfileId) && isLogged())
+			$iProfileId = bx_get_logged_profile_id();
+
+        if(!$iProfileId)
+            return array();
+
+        return $this->_getBlockPost($iProfileId);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_post_profile get_block_post_profile
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_post_profile', [...]); @endcode
+     * 
+     * Get Post block for the Profile page.
+     *
+     * @param $sProfileModule (optional) string value with profile based module name. Persons module is used by default.
+     * @param $iProfileContentId (optional) profile's content ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockPostProfile
+     */
+    /** 
+     * @ref bx_timeline-get_block_post_profile "get_block_post_profile"
+     */
+    public function serviceGetBlockPostProfile($sProfileModule = 'bx_persons', $iProfileContentId = 0)
+    {
+        if(empty($sProfileModule))
+    		return array();
+
+    	if(empty($iProfileContentId) && bx_get('id') !== false)
+    		$iProfileContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
+
+		$oProfile = BxDolProfile::getInstanceByContentAndType($iProfileContentId, $sProfileModule);
+		if(empty($oProfile))
+			return array();
+
+		return $this->_getBlockPost($oProfile->id());
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_post_home get_block_post_home
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_post_home', [...]); @endcode
+     * 
+     * Get Post block for site's Home page.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockPostHome
+     */
+    /** 
+     * @ref bx_timeline-get_block_post_home "get_block_post_home"
+     */
+    public function serviceGetBlockPostHome()
+    {
+        $iProfileId = 0;
+        return $this->_getBlockPost($iProfileId, array(
+            'form_display' => 'form_display_post_add_public'
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_post_account get_block_post_account
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_post_account', [...]); @endcode
+     * 
+     * Get Post block for the Dashboard page.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockPostAccount
+     */
+    /** 
+     * @ref bx_timeline-get_block_post_account "get_block_post_account"
+     */
+    public function serviceGetBlockPostAccount()
+    {
+        if(!isLogged())
+            return '';
+
+        $iProfileId = $this->getProfileId();
+		return $this->_getBlockPost($iProfileId);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view get_block_view
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view', [...]); @endcode
+     * 
+     * Get Timeline View block for a separate page.
+     *
+     * @param $iProfileId (optional) profile ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockView
+     */
+    /** 
+     * @ref bx_timeline-get_block_view "get_block_view"
+     */
+    public function serviceGetBlockView($iProfileId = 0)
+    {
+    	return $this->_serviceGetBlockView($iProfileId, BX_TIMELINE_VIEW_TIMELINE);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_outline get_block_view_outline
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_outline', [...]); @endcode
+     * 
+     * Get Outline View block for a separate page.
+     * 
+     * @param $iProfileId (optional) profile ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewOutline
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_outline "get_block_view_outline"
+     */
+    public function serviceGetBlockViewOutline($iProfileId = 0)
+    {
+        return $this->_serviceGetBlockView($iProfileId, BX_TIMELINE_VIEW_OUTLINE);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_profile get_block_view_profile
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_profile', [...]); @endcode
+     * 
+     * Get Timeline View block for the Profile page.
+     * 
+     * @param $sProfileModule (optional) string value with profile based module name. Persons module is used by default.
+     * @param $iProfileContentId (optional) profile's content ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewProfile
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_profile "get_block_view_profile"
+     */
+    public function serviceGetBlockViewProfile($sProfileModule = 'bx_persons', $iProfileContentId = 0, $iStart = -1, $iPerPage = -1, $sFilter = '', $aModules = array(), $iTimeline = -1)
+    {
+        $sView = BX_TIMELINE_VIEW_TIMELINE;
+
+        return $this->_serviceGetBlockViewProfile($sProfileModule, $iProfileContentId, $sView, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_profile_outline get_block_view_profile_outline
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_profile_outline', [...]); @endcode
+     * 
+     * Get Outline View block for the Profile page.
+     * 
+     * @param $sProfileModule (optional) string value with profile based module name. Persons module is used by default.
+     * @param $iProfileContentId (optional) profile's content ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewProfileOutline
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_profile_outline "get_block_view_profile_outline"
+     */
+	public function serviceGetBlockViewProfileOutline($sProfileModule = 'bx_persons', $iProfileContentId = 0, $iStart = -1, $iPerPage = -1, $sFilter = '', $aModules = array(), $iTimeline = -1)
+    {
+        $sView = BX_TIMELINE_VIEW_OUTLINE;
+
+        return $this->_serviceGetBlockViewProfile($sProfileModule, $iProfileContentId, $sView, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_home get_block_view_home
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_home', [...]); @endcode
+     * 
+     * Get Timeline View block for site's Home page.
+     * 
+     * @param $iProfileId (optional) profile ID. 0 should be used here.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewHome
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_home "get_block_view_home"
+     */
+    public function serviceGetBlockViewHome($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        return $this->_serviceGetBlockViewHome($iProfileId, BX_TIMELINE_VIEW_TIMELINE, $iStart, $iPerPage, $this->_oConfig->getPerPage('home'), $iTimeline, $sFilter, $aModules);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_home_outline get_block_view_home_outline
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_home_outline', [...]); @endcode
+     * 
+     * Get Outline View block for site's Home page.
+     * 
+     * @param $iProfileId (optional) profile ID. 0 should be used here.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewHomeOutline
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_home_outline "get_block_view_home_outline"
+     */
+	public function serviceGetBlockViewHomeOutline($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        return $this->_serviceGetBlockViewHome($iProfileId, BX_TIMELINE_VIEW_OUTLINE, $iStart, $iPerPage, $this->_oConfig->getPerPage('home'), $iTimeline, $sFilter, $aModules);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_account get_block_view_account
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_account', [...]); @endcode
+     * 
+     * Get Timeline View block for the Dashboard page.
+     * 
+     * @param $iProfileId (optional) profile ID. 0 should be used here.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewAccount
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_account "get_block_view_account"
+     */
+    public function serviceGetBlockViewAccount($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        if(!isLogged())
+            return '';
+
+        return $this->_serviceGetBlockViewByType($iProfileId, BX_TIMELINE_VIEW_TIMELINE, BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS, $iStart, $iPerPage, $this->_oConfig->getPerPage('account'), $iTimeline, $sFilter, $aModules);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_account_outline get_block_view_account_outline
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_account_outline', [...]); @endcode
+     * 
+     * Get Outline View block for the Dashboard page.
+     * 
+     * @param $iProfileId (optional) profile ID. 0 should be used here.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewAccountOutline
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_account_outline "get_block_view_account_outline"
+     */
+    public function serviceGetBlockViewAccountOutline($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        if(!isLogged())
+            return '';
+
+        return $this->_serviceGetBlockViewByType($iProfileId, BX_TIMELINE_VIEW_OUTLINE, BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS, $iStart, $iPerPage, $this->_oConfig->getPerPage('account'), $iTimeline, $sFilter, $aModules);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_item get_block_item
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_item', [...]); @endcode
+     * 
+     * Get View Item block.
+     * 
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockItem
+     */
+    /** 
+     * @ref bx_timeline-get_block_item "get_block_item"
+     */
+    public function serviceGetBlockItem()
+    {
+        $iItemId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        if(!$iItemId)
+            return array();
+
+        return $this->_oTemplate->getItemBlock($iItemId);
+    }
+
+    public function serviceGetBlockItemContent()
+    {
+        $iItemId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        $sMode = bx_process_input(bx_get('mode'));
+        if(!$iItemId || !$sMode)
+            return '';
+            
+        return $this->_oTemplate->getItemBlockContent($iItemId, $sMode);
+    }
+    
+    public function serviceGetBlockItemInfo()
+    {
+        $iItemId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        if(!$iItemId)
+            return '';
+
+        return $this->_oTemplate->getItemBlockInfo($iItemId);
+    }
+
+    public function serviceGetBlockItemComments()
+    {
+        $iItemId = bx_process_input(bx_get('id'), BX_DATA_INT);
+        if(!$iItemId)
+            return '';
+
+        return $this->_oTemplate->getItemBlockComments($iItemId);
+    }
+    
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_data get_notifications_data
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_data', [...]); @endcode
+     * 
+     * Data for Notifications module.
+     * 
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsData
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_data "get_notifications_data"
+     */
+    public function serviceGetNotificationsData()
+    {
+    	$sModule = $this->_aModule['name'];
+
+        return array(
+            'handlers' => array(
+                array('group' => $sModule . '_object', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'post_common', 'module_name' => $sModule, 'module_method' => 'get_notifications_post', 'module_class' => 'Module'),
+                array('group' => $sModule . '_object', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'delete'),
+                array('group' => $sModule . '_repost', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'repost', 'module_name' => $sModule, 'module_method' => 'get_notifications_repost', 'module_class' => 'Module'),
+                array('group' => $sModule . '_repost', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'delete_repost'),
+                array('group' => $sModule . '_comment', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'commentPost', 'module_name' => $sModule, 'module_method' => 'get_notifications_comment', 'module_class' => 'Module'),
+                array('group' => $sModule . '_comment', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'commentRemoved'),
+                array('group' => $sModule . '_vote', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'doVote', 'module_name' => $sModule, 'module_method' => 'get_notifications_vote', 'module_class' => 'Module'),
+				array('group' => $sModule . '_vote', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'undoVote'),
+            ),
+            'alerts' => array(
+                array('unit' => $sModule, 'action' => 'post_common'),
+                array('unit' => $sModule, 'action' => 'delete'),
+                array('unit' => $sModule, 'action' => 'repost'),
+                array('unit' => $sModule, 'action' => 'delete_repost'),
+                array('unit' => $sModule, 'action' => 'commentPost'),
+                array('unit' => $sModule, 'action' => 'commentRemoved'),
+                array('unit' => $sModule, 'action' => 'doVote'),
+                array('unit' => $sModule, 'action' => 'undoVote'),
+            )
+        );
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_repost get_notifications_repost
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_repost', [...]); @endcode
+     * 
+     * Get data for Repost event to display in Notifications module.
+     * 
+     * @param $aEvent an array with event description.
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsRepost
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_repost "get_notifications_repost"
+     */
+    public function serviceGetNotificationsRepost($aEvent)
+    {
+        $aResult = $this->serviceGetNotificationsPost($aEvent);
+        $aResult['lang_key'] = '_bx_timeline_txt_object_reposted';
+
+        return $aResult;
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_post get_notifications_post
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_post', [...]); @endcode
+     * 
+     * Get data for Post event to display in Notifications module.
+     * 
+     * @param $aEvent an array with event description.
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsPost
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_post "get_notifications_post"
+     */
+    public function serviceGetNotificationsPost($aEvent)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+    	$iContent = (int)$aEvent['object_id'];
+		$aContent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContent));
+        if(empty($aContent) || !is_array($aContent))
+            return array();
+
+        $sEntryCaption = !empty($aContent['title']) ? $aContent['title'] : $this->_oConfig->getTitle($aContent['description']);
+
+		return array(
+			'entry_sample' => $CNF['T']['txt_sample_single_ext'],
+			'entry_url' => $this->_oConfig->getItemViewUrl($aContent),
+			'entry_caption' => $sEntryCaption,
+			'entry_author' => $aContent['owner_id'],
+			'lang_key' => '_bx_timeline_ntfs_txt_object_added', //may be empty or not specified. In this case the default one from Notification module will be used.
+		);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_comment get_notifications_comment
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_comment', [...]); @endcode
+     * 
+     * Get data for Post Comment event to display in Notifications module.
+     * 
+     * @param $aEvent an array with event description.
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsComment
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_comment "get_notifications_comment"
+     */
+    public function serviceGetNotificationsComment($aEvent)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+    	$iContent = (int)$aEvent['object_id'];
+    	$aContent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContent));
+        if(empty($aContent) || !is_array($aContent))
+            return array();
+
+		$oComment = BxDolCmts::getObjectInstance($CNF['OBJECT_COMMENTS'], $iContent);
+        if(!$oComment || !$oComment->isEnabled())
+            return array();
+
+        $sEntryCaption = !empty($aContent['title']) ? $aContent['title'] : $this->_oConfig->getTitle($aContent['description']);
+
+		return array(
+			'entry_sample' => $CNF['T']['txt_sample_single'],
+			'entry_url' => $this->_oConfig->getItemViewUrl($aContent),
+			'entry_caption' => $sEntryCaption,
+			'entry_author' => $aContent['owner_id'],
+			'subentry_sample' => $CNF['T']['txt_sample_comment_single'],
+			'subentry_url' => $oComment->getViewUrl((int)$aEvent['subobject_id']),
+			'lang_key' => '', //may be empty or not specified. In this case the default one from Notification module will be used.
+		);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_vote get_notifications_vote
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_vote', [...]); @endcode
+     * 
+     * Get data for Vote event to display in Notifications module.
+     * 
+     * @param $aEvent an array with event description.
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsVote
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_vote "get_notifications_vote"
+     */
+    public function serviceGetNotificationsVote($aEvent)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+    	$iContent = (int)$aEvent['object_id'];
+    	$aContent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContent));
+        if(empty($aContent) || !is_array($aContent))
+            return array();
+
+		$oVote = BxDolVote::getObjectInstance($CNF['OBJECT_VOTES'], $iContent);
+        if(!$oVote || !$oVote->isEnabled())
+            return array();
+
+        $sEntryCaption = !empty($aContent['title']) ? $aContent['title'] : $this->_oConfig->getTitle($aContent['description']);
+
+		return array(
+			'entry_sample' => $CNF['T']['txt_sample_single'],
+			'entry_url' => $this->_oConfig->getItemViewUrl($aContent),
+			'entry_caption' => $sEntryCaption,
+			'entry_author' => $aContent['owner_id'],
+			'subentry_sample' => $CNF['T']['txt_sample_vote_single'],
+			'lang_key' => '', //may be empty or not specified. In this case the default one from Notification module will be used.
+		);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-repost Repost
+     * @subsubsection bx_timeline-get_repost_element_block get_repost_element_block
+     * 
+     * @code bx_srv('bx_timeline', 'get_repost_element_block', [...]); @endcode
+     * 
+     * Get repost element for content based modules.
+     * 
+     * @param $iOwnerId integer value with owner profile ID.
+     * @param $sType string value with type (module name). 
+     * @param $sAction string value with action (module action). 
+     * @param $iObjectId integer value with object ID to be reposted. 
+     * @param $aParams (optional) an array with additional params.
+     * @return HTML string with repost element to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetRepostElementBlock
+     */
+    /** 
+     * @ref bx_timeline-get_repost_element_block "get_repost_element_block"
+     */
+    public function serviceGetRepostElementBlock($iOwnerId, $sType, $sAction, $iObjectId, $aParams = array())
+    {
+    	if(!$this->isEnabled())
+    		return '';
+
+        $aParams = array_merge($this->_oConfig->getRepostDefaults(), $aParams);
+        return $this->_oTemplate->getRepostElement($iOwnerId, $sType, $sAction, $iObjectId, $aParams);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-repost Repost
+     * @subsubsection bx_timeline-get_repost_counter get_repost_counter
+     * 
+     * @code bx_srv('bx_timeline', 'get_repost_counter', [...]); @endcode
+     * 
+     * Get repost counter.
+     * 
+     * @param $sType string value with type (module name). 
+     * @param $sAction string value with action (module action). 
+     * @param $iObjectId integer value with object ID to be reposted. 
+     * @return HTML string with repost counter to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetRepostCounter
+     */
+    /** 
+     * @ref bx_timeline-get_repost_counter "get_repost_counter"
+     */
+    public function serviceGetRepostCounter($sType, $sAction, $iObjectId)
+    {
+    	if(!$this->isEnabled())
+    		return '';
+
+		$aReposted = $this->_oDb->getReposted($sType, $sAction, $iObjectId);
+
+        return $this->_oTemplate->getRepostCounter($aReposted);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-repost Repost
+     * @subsubsection bx_timeline-get_repost_js_script get_repost_js_script
+     * 
+     * @code bx_srv('bx_timeline', 'get_repost_js_script', [...]); @endcode
+     * 
+     * Get repost JavaScript code.
+     * 
+     * @return HTML string with JavaScript code to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetRepostJsScript
+     */
+    /** 
+     * @ref bx_timeline-get_repost_js_script "get_repost_js_script"
+     */
+    public function serviceGetRepostJsScript()
+    {
+    	if(!$this->isEnabled())
+    		return '';
+
+        return $this->_oTemplate->getRepostJsScript();
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-repost Repost
+     * @subsubsection bx_timeline-get_repost_js_click get_repost_js_click
+     * 
+     * @code bx_srv('bx_timeline', 'get_repost_js_click', [...]); @endcode
+     * 
+     * Get repost JavaScript code for OnClick event.
+     * 
+     * @param $iOwnerId integer value with owner profile ID.
+     * @param $sType string value with type (module name). 
+     * @param $sAction string value with action (module action). 
+     * @param $iObjectId integer value with object ID to be reposted. 
+     * @return HTML string with JavaScript code to display in OnClick events of HTML elements.
+     * 
+     * @see BxTimelineModule::serviceGetRepostJsClick
+     */
+    /** 
+     * @ref bx_timeline-get_repost_js_click "get_repost_js_click"
+     */
+    public function serviceGetRepostJsClick($iOwnerId, $sType, $sAction, $iObjectId)
+    {
+    	if(!$this->isEnabled())
+    		return '';
+
+        return $this->_oTemplate->getRepostJsClick($iOwnerId, $sType, $sAction, $iObjectId);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_menu_item_addon_comment get_menu_item_addon_comment
+     * 
+     * @code bx_srv('bx_timeline', 'get_menu_item_addon_comment', [...]); @endcode
+     * 
+     * Get addon for Comment menu item.
+     * 
+     * @param $sSystem string value with comments engine system.
+     * @param $iObjectId integer value with object ID. 
+     * @return HTML string to display in menu item.
+     * 
+     * @see BxTimelineModule::serviceGetMenuItemAddonComment
+     */
+    /** 
+     * @ref bx_timeline-get_menu_item_addon_comment "get_menu_item_addon_comment"
+     */
+    public function serviceGetMenuItemAddonComment($sSystem, $iObjectId)
+    {
+        if(empty($sSystem) || empty($iObjectId))
+            return '';
+
+        $oCmts = $this->getCmtsObject($sSystem, $iObjectId);
+        if($oCmts === false)
+            return '';
+
+        $iCounter = (int)$oCmts->getCommentsCount();
+        return  $this->_oTemplate->parseLink('javascript:void(0)', $iCounter > 0 ? $iCounter : '', array(
+            'title' => _t('_bx_timeline_menu_item_title_item_comment'),
+        	'onclick' => "javascript:" . $this->_oConfig->getJsObject('view') . ".commentItem(this, '" . $sSystem . "', " . $iObjectId . ")" 
+        ));
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_settings_checker_helper get_settings_checker_helper
+     * 
+     * @code bx_srv('bx_timeline', 'get_settings_checker_helper', [...]); @endcode
+     * 
+     * Get Checker Helper class name for Forms engine.
+     * 
+     * @return string with Checker Helper class name.
+     * 
+     * @see BxTimelineModule::serviceGetSettingsCheckerHelper
+     */
+    /** 
+     * @ref bx_timeline-get_settings_checker_helper "get_settings_checker_helper"
+     */
+    public function serviceGetSettingsCheckerHelper()
+    {
+        bx_import('FormCheckerHelper', $this->_aModule);
+        return 'BxTimelineFormCheckerHelper';
+    }
+
+    /*
+     * COMMON METHODS
+     */
+    public function deleteEvent($aEvent)
+    {
+    	if(empty($aEvent) || !is_array($aEvent) || !$this->_oDb->deleteEvent(array('id' => (int)$aEvent['id'])))
+            return false;
+
+        $this->onDelete($aEvent);
+        return true;
+    }
+
+    public function getFormAttachLink()
+    {
+        $iUserId = $this->getUserId();
+
+        $oForm = BxDolForm::getObjectInstance($this->_oConfig->getObject('form_attach_link'), $this->_oConfig->getObject('form_display_attach_link_add'), $this->_oTemplate);
+        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'add_attach_link/';
+        $oForm->aInputs['url']['checker']['params']['preg'] = $this->_oConfig->getPregPattern('url');
+
+        $oForm->initChecker();
+        if($oForm->isSubmittedAndValid()) {
+            $sLink = $oForm->getCleanValue('url');
+
+            $aMatches = array();
+            preg_match($this->_oConfig->getPregPattern('url'), $sLink, $aMatches);
+            $sLink = (empty($aMatches[2]) ? 'http://' : '') . $aMatches[0];
+
+            $aSiteInfo = bx_get_site_info($sLink, array(
+                'thumbnailUrl' => array('tag' => 'link', 'content_attr' => 'href'),
+                'OGImage' => array('name_attr' => 'property', 'name' => 'og:image'),
+            ));
+
+            $sTitle = !empty($aSiteInfo['title']) ? $aSiteInfo['title'] : _t('_Empty');
+            $sDescription = !empty($aSiteInfo['description']) ? $aSiteInfo['description'] : _t('_Empty');
+
+            $sMediaUrl = '';
+            if(!empty($aSiteInfo['thumbnailUrl']))
+            	$sMediaUrl = $aSiteInfo['thumbnailUrl'];
+            else if(!empty($aSiteInfo['OGImage']))
+            	$sMediaUrl = $aSiteInfo['OGImage'];
+
+			$iMediaId = 0;
+			$oStorage = null;
+            if(!empty($sMediaUrl)) {
+            	$oStorage = BxDolStorage::getObjectInstance($this->_oConfig->getObject('storage_' . BX_TIMELINE_MEDIA_PHOTO . 's'));
+
+            	$iMediaId = $oStorage->storeFileFromUrl($sMediaUrl, true, $iUserId);
+            }
+
+            $iId = (int)$oForm->insert(array('profile_id' => $iUserId, 'media_id' => $iMediaId, 'url' => $sLink, 'title' => $sTitle, 'text' => $sDescription, 'added' => time()));
+            if(!empty($iId)) {
+            	if(!empty($oStorage) && !empty($iMediaId))
+            		$oStorage->afterUploadCleanup($iMediaId, $iUserId);
+
+                return array('item' => $this->_oTemplate->getAttachLinkItem($iUserId, $iId));
+            }
+
+            return array('message' => _t('_bx_timeline_txt_err_cannot_perform_action'));
+        }
+
+        return array('form' => $oForm->getCode(), 'form_id' => $oForm->id);
+    }
+
+    public function getFormPost($aParams = array())
+    {
+        $iUserId = $this->getUserId();
+
+        $sFormObject = !empty($aParams['form_object']) ? $aParams['form_object'] : 'form_post';
+        $sFormDisplay = !empty($aParams['form_display']) ? $aParams['form_display'] : 'form_display_post_add';
+        $oForm = BxDolForm::getObjectInstance($this->_oConfig->getObject($sFormObject), $this->_oConfig->getObject($sFormDisplay), $this->_oTemplate);
+
+        $oForm->initChecker();
+        if($oForm->isSubmittedAndValid()) {
+            list($sUserName) = $this->getUserInfo($iUserId);
+
+            $sType = $oForm->getCleanValue('type');
+            $sType = $this->_oConfig->getPrefix('common_post') . $sType;
+            BxDolForm::setSubmittedValue('type', $sType, $oForm->aFormAttrs['method']);
+
+            $aContent = array();
+
+            //--- Process Text ---//
+            $sText = $oForm->getCleanValue('text');
+            $sText = $this->_prepareTextForSave($sText);
+            $bText = !empty($sText);
+            unset($oForm->aInputs['text']);
+
+            if($bText)
+            	$aContent['text'] = $sText;
+
+            //--- Process Privacy ---//
+            $iObjectPrivacyView = (int)$oForm->getCleanValue('object_privacy_view');
+            if(empty($iObjectPrivacyView))
+                $iObjectPrivacyView = $this->_oConfig->getPrivacyViewDefault('object');
+
+            //--- Process Link ---//
+            $aLinkIds = $oForm->getCleanValue('link');
+            $bLinkIds = !empty($aLinkIds) && is_array($aLinkIds);
+
+            //--- Process Media ---//
+            $aPhotoIds = $oForm->getCleanValue(BX_TIMELINE_MEDIA_PHOTO);
+            $bPhotoIds = !empty($aPhotoIds) && is_array($aPhotoIds);
+
+            $aVideoIds = $oForm->getCleanValue(BX_TIMELINE_MEDIA_VIDEO);
+            $bVideoIds = !empty($aVideoIds) && is_array($aVideoIds);
+
+            if(!$bText && !$bLinkIds && !$bPhotoIds && !$bVideoIds)
+            	return array('message' => _t('_bx_timeline_txt_err_empty_post'));
+
+            $sTitle = $bText ? $this->_oConfig->getTitle($sText) : $this->_oTemplate->getItemIcon($bText, $bLinkIds, $bPhotoIds, $bVideoIds);
+            $sDescription = _t('_bx_timeline_txt_user_added_sample', $sUserName, _t('_bx_timeline_txt_sample_with_article'));
+
+            $iId = $oForm->insert(array(
+                'object_id' => $iUserId,
+                'object_privacy_view' => $iObjectPrivacyView,
+                'content' => serialize($aContent),
+                'title' => $sTitle,
+                'description' => $sDescription,
+                'date' => time()
+            ));
+
+            if(!empty($iId)) {
+            	$oMetatags = BxDolMetatags::getObjectInstance($this->_oConfig->getObject('metatags'));
+            	if($bText)
+ 					$oMetatags->metaAdd($iId, $sText);
+ 				$oMetatags->locationsAddFromForm($iId, $this->_oConfig->CNF['FIELD_LOCATION_PREFIX']);
+
+				//--- Process Link ---//
+                if($bLinkIds)
+                    foreach($aLinkIds as $iLinkId)
+                        $this->_oDb->saveLink($iId, $iLinkId);
+
+				//--- Process Media ---//
+				if($bPhotoIds) 
+					$this->_saveMedia(BX_TIMELINE_MEDIA_PHOTO, $iId, $aPhotoIds);
+
+				if($bVideoIds)
+					$this->_saveMedia(BX_TIMELINE_MEDIA_VIDEO, $iId, $aVideoIds);
+
+                $this->onPost($iId);
+
+                return array('id' => $iId);
+            }
+
+            return array('message' => _t('_bx_timeline_txt_err_cannot_perform_action'));
+        }
+
+        return array('form' => $oForm->getCode(), 'form_id' => $oForm->id);
+    }
+
+    public function getCmtsObject($sSystem, $iId)
+    {
+        if(empty($sSystem) || (int)$iId == 0)
+            return false;
+
+        $oCmts = BxDolCmts::getObjectInstance($sSystem, $iId, true, $this->_oTemplate);
+        if(!$oCmts || !$oCmts->isEnabled())
+            return false;
+
+        return $oCmts;
+    }
+
+    public function getViewObject($sSystem, $iId)
+    {
+        if(empty($sSystem) || (int)$iId == 0)
+            return false;
+
+        $oView = BxDolView::getObjectInstance($sSystem, $iId, true, $this->_oTemplate);
+        if(!$oView || !$oView->isEnabled())
+            return false;
+
+        return $oView;
+    }
+
+    public function getVoteObject($sSystem, $iId)
+    {
+        if(empty($sSystem) || (int)$iId == 0)
+            return false;
+
+        $oVote = BxDolVote::getObjectInstance($sSystem, $iId, true, $this->_oTemplate);
+        if(!$oVote || !$oVote->isEnabled())
+            return false;
+
+        return $oVote;
+    }
+
+	public function getReportObject($sSystem, $iId)
+    {
+        if(empty($sSystem) || (int)$iId == 0)
+            return false;
+
+        $oReport = BxDolReport::getObjectInstance($sSystem, $iId, true, $this->_oTemplate);
+        if(!$oReport || !$oReport->isEnabled())
+            return false;
+
+        return $oReport;
+    }
+
+    public function getAttachmentsMenuObject()
+    {
+        $oMenu = BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_post_attachments'), $this->_oTemplate);
+        $oMenu->addMarkers(array(
+            'js_object' => $this->_oConfig->getJsObject('post'),
+        ));
+
+        return $oMenu;
+    }
+
+    public function getManageMenuObject()
+    {
+        return BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_item_manage'), $this->_oTemplate);
+    }
+
+    //--- Check permissions methods ---//
+    public function isAllowedPost($bPerform = false)
+    {
+        if(isAdmin())
+            return true;
+
+        $iUserId = $this->getUserId();
+        $aCheckResult = checkActionModule($iUserId, 'post', $this->getName(), $bPerform);
+
+        $oProfileOwner = BxDolProfile::getInstance($this->_iOwnerId);
+        if($oProfileOwner !== false) {
+            if($oProfileOwner->checkAllowedPostInProfile() !== CHECK_ACTION_RESULT_ALLOWED)
+                return _t('_sys_txt_access_denied');
+
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_post', $oProfileOwner->id(), $iUserId, array('check_result' => &$aCheckResult));
+        }
+
+        return $aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
+    }
+
+    public function isAllowedView($aEvent, $bPerform = false)
+    {
+        $CNF = $this->_oConfig->CNF;
+
+        $mixedResult = BxDolProfile::getInstance($aEvent[$CNF['FIELD_OWNER_ID']])->checkAllowedProfileView();
+        if($mixedResult !== CHECK_ACTION_RESULT_ALLOWED)
+            return false;
+
+		return true;
+    }
+
+    public function isAllowedDelete($aEvent, $bPerform = false)
+    {
+        if(!isLogged())
+            return false;
+
+        if(isAdmin())
+            return true;
+
+        $iUserId = (int)$this->getUserId();
+        if((int)$aEvent['owner_id'] == $iUserId && $this->_oConfig->isAllowDelete())
+           return true;
+
+        $aCheckResult = checkActionModule($iUserId, 'delete', $this->getName(), $bPerform);
+
+        $oProfileOwner = BxDolProfile::getInstance((int)$aEvent['owner_id']);
+        if($oProfileOwner !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_delete', $oProfileOwner->id(), $iUserId, array('check_result' => &$aCheckResult));
+
+        return $aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
+    }
+
+    public function isAllowedComment($aEvent, $bPerform = false)
+    {
+        $mixedComments = $this->getCommentsData($aEvent['comments']);
+        if($mixedComments === false)
+            return false;
+
+        list($sSystem, $iObjectId) = $mixedComments;
+        $oCmts = $this->getCmtsObject($sSystem, $iObjectId);
+        $oCmts->addCssJs();
+
+        $bResult = true;
+
+        $oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id']);
+        if($oProfileOwner !== false) {
+            if($oProfileOwner->checkAllowedPostInProfile() !== CHECK_ACTION_RESULT_ALLOWED)
+                return false;
+
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_comment', $oProfileOwner->id(), (int)$this->getUserId(), array('result' => &$bResult));
+        }
+
+        return $bResult;
+    }
+
+    public function isAllowedViewCounter($aEvent, $bPerform = false)
+    {
+        $mixedViews = $this->getViewsData($aEvent['views']);
+        if($mixedViews === false)
+            return false;
+
+        list($sSystem, $iObjectId) = $mixedViews;
+        $oView = $this->getViewObject($sSystem, $iObjectId);
+
+        $bResult = true;
+
+        $oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id']);
+        if($oProfileOwner !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_view_counter', $oProfileOwner->id(), (int)$this->getUserId(), array('result' => &$bResult));
+
+        return $bResult;
+    }
+
+    public function isAllowedVote($aEvent, $bPerform = false)
+    {
+        $mixedVotes = $this->getVotesData($aEvent['votes']);
+        if($mixedVotes === false)
+            return false;
+
+        list($sSystem, $iObjectId) = $mixedVotes;
+        $oVote = $this->getVoteObject($sSystem, $iObjectId);
+        $oVote->addCssJs();
+
+        $bResult = true;
+
+        $oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id']);
+        if($oProfileOwner !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_vote', $oProfileOwner->id(), (int)$this->getUserId(), array('result' => &$bResult));
+
+        return $bResult;
+    }
+
+    public function isAllowedReport($aEvent, $bPerform = false)
+    {
+        $mixedReports = $this->getReportsData($aEvent['reports']);
+        if($mixedReports === false)
+            return false;
+
+        list($sSystem, $iObjectId) = $mixedReports;
+        $oReport = $this->getReportObject($sSystem, $iObjectId);
+        $oReport->addCssJs();
+
+        $bResult = true;
+
+        $oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id']);
+        if($oProfileOwner !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_report', $oProfileOwner->id(), (int)$this->getUserId(), array('result' => &$bResult));
+
+        return $bResult;
+    }
+
+    public function isAllowedRepost($aEvent, $bPerform = false)
+    {
+        if(isAdmin())
+            return true;
+
+        $iUserId = (int)$this->getUserId();
+        if($iUserId == 0)
+            return false;
+
+        $aCheckResult = checkActionModule($iUserId, 'repost', $this->getName(), $bPerform);
+
+        $oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id']);
+        if($oProfileOwner !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_repost', $oProfileOwner->id(), $iUserId, array('check_result' => &$aCheckResult));
+
+        return $aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
+    }
+
+    public function isAllowedSend($aEvent, $bPerform = false)
+    {
+        if(!$this->_oDb->isEnabledByName('bx_convos'))
+            return false;
+
+        if(isAdmin())
+            return true;
+
+        $iUserId = (int)$this->getUserId();
+        if($iUserId == 0)
+            return false;
+
+        $aCheckResult = checkActionModule($iUserId, 'send', $this->getName(), $bPerform);
+
+        $oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id']);
+        if($oProfileOwner !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_send', $oProfileOwner->id(), $iUserId, array('check_result' => &$aCheckResult));
+
+        return $aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
+    }
+
+	public function isAllowedPin($aEvent, $bPerform = false)
+    {
+    	if((int)$aEvent['pinned'] != 0)
+    		return false;
+
+        return $this->_isAllowedPin($aEvent, $bPerform);
+    }
+
+	public function isAllowedUnpin($aEvent, $bPerform = false)
+    {
+    	if((int)$aEvent['pinned'] == 0)
+    		return false;
+
+        return $this->_isAllowedPin($aEvent, $bPerform);
+    }
+
+    public function isAllowedMore($aEvent, $bPerform = false)
+    {
+    	$oMoreMenu = $this->getManageMenuObject();
+    	$oMoreMenu->setEventId($aEvent['id']);
+    	return $oMoreMenu->isVisible();
+    }
+
+    public function checkAllowedView ($aContentInfo, $isPerformAction = false)
+    {
+        if(!$this->isAllowedView($aContentInfo, $isPerformAction))
+            return _t('_sys_txt_access_denied');
+
+        return CHECK_ACTION_RESULT_ALLOWED;
+    }
+
+    public function checkAllowedCommentsView ($aContentInfo, $isPerformAction = false)
+    {
+        $CNF = $this->_oConfig->CNF;
+
+        $mixedResult = BxDolProfile::getInstance($aContentInfo[$CNF['FIELD_OWNER_ID']])->checkAllowedProfileView();
+        if($mixedResult !== CHECK_ACTION_RESULT_ALLOWED)
+            return $mixedResult;
+
+        return CHECK_ACTION_RESULT_ALLOWED;
+    }
+
+    public function checkAllowedCommentsPost ($aContentInfo, $isPerformAction = false)
+    {
+        $sError = '_sys_txt_access_denied';
+
+        $aContentInfo = $this->_oTemplate->getData($aContentInfo);
+        if($aContentInfo === false)
+            return _t($sError);
+
+        if(!$this->isAllowedComment($aContentInfo, $isPerformAction))
+            return _t($sError);
+
+        return CHECK_ACTION_RESULT_ALLOWED;
+    }
+
+    public function onPost($iId)
+    {
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+
+        if($this->_oConfig->isSystem($aEvent['type'], $aEvent['action'])) {
+            //--- Request event's data from content module and update it in the Timeline DB.
+            $this->_oTemplate->getData($aEvent);
+
+            $sPostType = 'system';
+            $iSenderId = $aEvent['owner_id'];
+        } else {
+            $sPostType = 'common';
+            $iSenderId = $aEvent['object_id'];
+        }
+
+        //--- Event -> Post for Alerts Engine ---//
+        $oAlert = new BxDolAlerts($this->_oConfig->getObject('alert'), 'post_' . $sPostType, $iId, $iSenderId, array(
+        	'privacy_view' => $aEvent['object_privacy_view'],
+        	'object_author_id' => $aEvent['owner_id'],
+        ));
+        $oAlert->alert();
+        //--- Event -> Post for Alerts Engine ---//
+    }
+
+    public function onRepost($iId, $aReposted = array())
+    {
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+
+        if(empty($aReposted)) {
+            $aContent = unserialize($aEvent['content']);
+
+            $aReposted = $this->_oDb->getReposted($aContent['type'], $aContent['action'], $aContent['object_id']);
+            if(empty($aReposted) || !is_array($aReposted))
+                return;
+        }
+
+        $iUserId = $this->getUserId();
+        $this->_oDb->insertRepostTrack($aEvent['id'], $iUserId, $this->getUserIp(), $aReposted['id']);
+        $this->_oDb->updateRepostCounter($aReposted['id'], $aReposted['reposts']);
+
+        //--- Timeline -> Update for Alerts Engine ---//
+        $oAlert = new BxDolAlerts($this->_oConfig->getObject('alert'), 'repost', $aReposted['id'], $iUserId, array(
+        	'privacy_view' => $aEvent['object_privacy_view'],
+        	'object_author_id' => $aReposted['owner_id'],
+        	'repost_id' => $iId,
+        ));
+        $oAlert->alert();
+        //--- Timeline -> Update for Alerts Engine ---//
+    }
+
+    public function onDelete($aEvent)
+    {
+        $iUserId = $this->getUserId();
+    	$sCommonPostPrefix = $this->_oConfig->getPrefix('common_post');
+
+    	//--- Delete attached photos, videos and links when common event was deleted.
+    	if($aEvent['type'] == $sCommonPostPrefix . BX_TIMELINE_PARSE_TYPE_POST) {
+    		$this->_deleteMedia(BX_TIMELINE_MEDIA_PHOTO, $aEvent['id']);
+    		$this->_deleteMedia(BX_TIMELINE_MEDIA_VIDEO, $aEvent['id']);
+
+	        $this->_deleteLinks($aEvent['id']);
+    	}
+
+    	//--- Update parent event when repost event was deleted.
+    	$bRepost = $aEvent['type'] == $sCommonPostPrefix . BX_TIMELINE_PARSE_TYPE_REPOST;
+        if($bRepost) {
+            $this->_oDb->deleteRepostTrack($aEvent['id']);
+
+            $aContent = unserialize($aEvent['content']);
+            $aReposted = $this->_oDb->getReposted($aContent['type'], $aContent['action'], $aContent['object_id']);
+            if(!empty($aReposted) && is_array($aReposted))
+                $this->_oDb->updateRepostCounter($aReposted['id'], $aReposted['reposts'], -1);
+        }
+
+        //--- Find and delete repost events when parent event was deleted.
+        $bSystem = $this->_oConfig->isSystem($aEvent['type'], $aEvent['action']);
+	    $aRepostEvents = $this->_oDb->getEvents(array('browse' => 'reposted_by_descriptor', 'type' => $aEvent['type']));
+		foreach($aRepostEvents as $aRepostEvent) {
+			$aContent = unserialize($aRepostEvent['content']);
+			if(isset($aContent['type']) && $aContent['type'] == $aEvent['type'] && isset($aContent['object_id']) && (($bSystem && (int)$aContent['object_id'] == (int)$aEvent['object_id']) || (!$bSystem  && (int)$aContent['object_id'] == (int)$aEvent['id'])) && (int)$this->_oDb->deleteEvent(array('id' => (int)$aRepostEvent['id'])) > 0) {
+                $oAlert = new BxDolAlerts($this->_oConfig->getObject('alert'), 'delete_repost', $aEvent['id'], $iUserId, array(
+                    'repost_id' => $aRepostEvent['id'],
+                ));
+                $oAlert->alert();
+            }
+		}
+
+		//--- Delete associated meta.
+        $oMetatags = BxDolMetatags::getObjectInstance($this->_oConfig->getObject('metatags'));
+        $oMetatags->onDeleteContent($aEvent['id']);
+
+        //--- Event -> Delete for Alerts Engine ---//
+        if($bRepost)
+            $oAlert = new BxDolAlerts($this->_oConfig->getObject('alert'), 'delete_repost', $aReposted['id'], $iUserId, array(
+                'repost_id' => $aEvent['id'],
+            ));
+        else
+            $oAlert = new BxDolAlerts($this->_oConfig->getObject('alert'), 'delete', $aEvent['id'], $iUserId);
+        $oAlert->alert();
+        //--- Event -> Delete for Alerts Engine ---//
+    }
+
+    public function getParams($sView = '', $sType = '', $iOwnerId = 0, $iStart = 0, $iPerPage = 0, $sFilter = '', $aModules = array(), $iTimeline = 0)
+    {
+        return $this->_prepareParams($sView, $sType, $iOwnerId, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
+    }
+
+    public function getViewsData(&$aViews)
+    {
+        if(empty($aViews) || !is_array($aViews))
+            return false;
+
+        $sSystem = isset($aViews['system']) ? $aViews['system'] : '';
+        $iObjectId = isset($aViews['object_id']) ? (int)$aViews['object_id'] : 0;
+        $iCount = isset($aViews['count']) ? (int)$aViews['count'] : 0;
+        if($sSystem == '' || $iObjectId == 0)
+            return false;
+
+        return array($sSystem, $iObjectId, $iCount);
+    }
+
+    public function getVotesData(&$aVotes)
+    {
+        if(empty($aVotes) || !is_array($aVotes))
+            return false;
+
+        $sSystem = isset($aVotes['system']) ? $aVotes['system'] : '';
+        $iObjectId = isset($aVotes['object_id']) ? (int)$aVotes['object_id'] : 0;
+        $iCount = isset($aVotes['count']) ? (int)$aVotes['count'] : 0;
+        if($sSystem == '' || $iObjectId == 0)
+            return false;
+
+        return array($sSystem, $iObjectId, $iCount);
+    }
+
+    public function getReportsData(&$aReports)
+    {
+        if(empty($aReports) || !is_array($aReports))
+            return false;
+
+        $sSystem = isset($aReports['system']) ? $aReports['system'] : '';
+        $iObjectId = isset($aReports['object_id']) ? (int)$aReports['object_id'] : 0;
+        $iCount = isset($aReports['count']) ? (int)$aReports['count'] : 0;
+        if($sSystem == '' || $iObjectId == 0)
+            return false;
+
+        return array($sSystem, $iObjectId, $iCount);
+    }
+
+    public function getCommentsData(&$aComments)
+    {
+        if(empty($aComments) || !is_array($aComments))
+            return false;
+
+        $sSystem = isset($aComments['system']) ? $aComments['system'] : '';
+        $iObjectId = isset($aComments['object_id']) ? (int)$aComments['object_id'] : 0;
+        $iCount = isset($aComments['count']) ? (int)$aComments['count'] : 0;
+        if($sSystem == '' || $iObjectId == 0 || ($iCount == 0 && !isLogged()))
+            return false;
+
+        return array($sSystem, $iObjectId, $iCount);
+    }
+
+    /**
+     * Protected Methods 
+     */
+    protected function _serviceGetBlockView($iProfileId = 0, $sView = BX_TIMELINE_VIEW_DEFAULT)
+    {
+        if(empty($iProfileId) && bx_get('profile_id') !== false)
+			$iProfileId = bx_process_input(bx_get('profile_id'), BX_DATA_INT);
+
+		if(empty($iProfileId) && isLogged())
+			$iProfileId = bx_get_logged_profile_id();
+
+        $aBlock = $this->_getBlockView($iProfileId, $sView);
+        if(!empty($aBlock))
+            return $aBlock;
+
+        return array('content' => MsgBox(_t('_bx_timeline_txt_msg_no_results')));
+    }
+
+    protected function _serviceGetBlockViewProfile($sProfileModule = 'bx_persons', $iProfileContentId = 0, $sView = BX_TIMELINE_VIEW_DEFAULT, $iStart = -1, $iPerPage = -1, $sFilter = '', $aModules = array(), $iTimeline = -1)
+    {
+    	if(empty($sProfileModule))
+    		return array();
+
+    	if(empty($iProfileContentId) && bx_get('id') !== false)
+    		$iProfileContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
+
+		$oProfile = BxDolProfile::getInstanceByContentAndType($iProfileContentId, $sProfileModule);
+		if(empty($oProfile))
+			return array();
+
+        return $this->_getBlockView($oProfile->id(), $sView, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
+    }
+
+    protected function _serviceGetBlockViewHome($iProfileId = 0, $sView = BX_TIMELINE_VIEW_DEFAULT, $iStart = -1, $iPerPage = -1, $iPerPageDefault = -1,  $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        $sRssUrl = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'rss/' . BX_BASE_MOD_NTFS_TYPE_PUBLIC . '/';
+        BxDolTemplate::getInstance()->addPageRssLink(_t('_bx_timeline_page_title_view_home'), $sRssUrl);
+
+        return $this->_serviceGetBlockViewByType($iProfileId, $sView, BX_BASE_MOD_NTFS_TYPE_PUBLIC, $iStart, $iPerPage, $this->_oConfig->getPerPage('home'), $iTimeline, $sFilter, $aModules);
+    } 
+
+    protected function _serviceGetBlockViewByType($iProfileId = 0, $sView = BX_TIMELINE_VIEW_DEFAULT, $sType = BX_TIMELINE_TYPE_DEFAULT, $iStart = -1, $iPerPage = -1, $iPerPageDefault = -1,  $iTimeline = -1, $sFilter = '', $aModules = array())
+    {
+        $aParams = $this->_prepareParams($sView, $sType, $iProfileId, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
+
+        $aParams['view'] = $sView;
+        $aParams['per_page'] = (int)$iPerPage > 0 ? $iPerPage : ((int)$iPerPageDefault > 0 ? $iPerPageDefault : $this->_oConfig->getPerPage());
+
+        $this->_iOwnerId = $aParams['owner_id'];
+
+        $sContent = $this->_oTemplate->getViewBlock($aParams);
+        return array('content' => $sContent);
+    }
+
+    protected function _getBlockPost($iProfileId, $aParams = array())
+    {
+        $this->_iOwnerId = $iProfileId;
+
+        if($this->isAllowedPost() !== true)
+            return array();
+
+		$sContent = $this->_oTemplate->getPostBlock($this->_iOwnerId, $aParams);
+        return array('content' => $sContent);
+    }
+
+    protected function _getBlockView($iProfileId, $sView = BX_TIMELINE_VIEW_DEFAULT, $iStart = -1, $iPerPage = -1, $sFilter = '', $aModules = array(), $iTimeline = -1)
+    {
+        if(!$iProfileId)
+			return array();
+
+        $aParams = $this->_prepareParams($sView, BX_BASE_MOD_NTFS_TYPE_OWNER, $iProfileId, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
+        $aParams['view'] = $sView;
+        $aParams['per_page'] = (int)$iPerPage > 0 ? $iPerPage : $this->_oConfig->getPerPage('profile');
+
+        $this->_iOwnerId = $aParams['owner_id'];
+        $oProfileOwner = BxDolProfile::getInstance($this->_iOwnerId);
+
+        $mixedResult = $oProfileOwner->checkAllowedProfileView();
+        if($mixedResult !== CHECK_ACTION_RESULT_ALLOWED)
+            return array('content' => MsgBox($mixedResult));
+
+        list($sUserName, $sUserUrl) = $this->getUserInfo($aParams['owner_id']);
+
+        $sRssUrl = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'rss/' . BX_BASE_MOD_NTFS_TYPE_OWNER . '/' . $iProfileId . '/';
+        $sJsObject = $this->_oConfig->getJsObject('view');
+        $aMenu = array(
+            array('id' => $sView . '-view-all', 'name' => $sView . '-view-all', 'class' => '', 'link' => 'javascript:void(0)', 'onclick' => 'javascript:' . $sJsObject . '.changeFilter(this)', 'target' => '_self', 'title' => _t('_bx_timeline_menu_item_view_all'), 'active' => 1),
+            array('id' => $sView . '-view-owner', 'name' => $sView . '-view-owner', 'class' => '', 'link' => 'javascript:void(0)', 'onclick' => 'javascript:' . $sJsObject . '.changeFilter(this)', 'target' => '_self', 'title' => _t('_bx_timeline_menu_item_view_owner', $sUserName)),
+            array('id' => $sView . '-view-other', 'name' => $sView . '-view-other', 'class' => '', 'link' => 'javascript:void(0)', 'onclick' => 'javascript:' . $sJsObject . '.changeFilter(this)', 'target' => '_self', 'title' => _t('_bx_timeline_menu_item_view_other')),
+            array('id' => $sView . '-get-rss', 'name' => $sView . '-get-rss', 'class' => '', 'link' => $sRssUrl, 'target' => '_blank', 'title' => _t('_bx_timeline_menu_item_get_rss')),
+        );
+
+        $sContent = '';
+        bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_view', $this->_iOwnerId, $this->getUserId(), array('override_content' => &$sContent, 'params' => &$aParams, 'menu' => &$aMenu));
+
+        $oMenu = new BxTemplMenuInteractive(array('template' => 'menu_interactive_vertical.html', 'menu_id'=> $sView . '-view-all', 'menu_items' => $aMenu));
+        $oMenu->setSelected('', $sView . '-view-all');
+
+        if (!$sContent)
+            $sContent = $this->_oTemplate->getViewBlock($aParams);
+
+        BxDolTemplate::getInstance()->addPageRssLink(_t('_bx_timeline_page_title_view'), $sRssUrl);
+
+        return array('content' => $sContent, 'menu' => $oMenu);
+    }
+
+	protected function _isAllowedPin($aEvent, $bPerform = false)
+    {
+        if(isAdmin())
+            return true;
+
+        $iUserId = (int)$this->getUserId();
+        if($iUserId == 0)
+            return false;
+
+		if((int)$aEvent['owner_id'] == $iUserId)
+           return true;
+
+        $aCheckResult = checkActionModule($iUserId, 'pin', $this->getName(), $bPerform);
+
+        $oProfileOwner = BxDolProfile::getInstance($aEvent['owner_id']);
+        if($oProfileOwner !== false)
+            bx_alert($oProfileOwner->getModule(), $this->_oConfig->getUri() . '_pin', $oProfileOwner->id(), $iUserId, array('check_result' => &$aCheckResult));
+
+        return $aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
+    }
+
+	protected function _deleteLinks($iId)
+    {
+	    $aLinks = $this->_oDb->getLinks($iId);
+	    if(empty($aLinks) || !is_array($aLinks))
+	    	return;
+
+		$oStorage = BxDolStorage::getObjectInstance($this->_oConfig->getObject('storage_photos'));
+		foreach($aLinks as $aLink)
+			if(!empty($aLink['media_id']))
+				$oStorage->deleteFile($aLink['media_id']);
+
+		$this->_oDb->deleteLinks($iId);
+    }
+
+    protected function _saveMedia($sType, $iId, $aItemIds)
+    {
+    	if(empty($aItemIds) || !is_array($aItemIds))
+    		return; 
+
+    	$iUserId = $this->getUserId();
+
+		$oStorage = BxDolStorage::getObjectInstance($this->_oConfig->getObject('storage_' . strtolower($sType) . 's'));
+		foreach($aItemIds as $iItemId)
+        	if($this->_oDb->saveMedia($sType, $iId, $iItemId))
+            	$oStorage->afterUploadCleanup($iItemId, $iUserId);
+    }
+
+    protected function _deleteMedia($sType, $iId)
+    {
+	    $aItems = $this->_oDb->getMedia($sType, $iId);
+	    if(empty($aItems) || !is_array($aItems))
+	    	return;
+
+		$oStorage = BxDolStorage::getObjectInstance($this->_oConfig->getObject('storage_' . strtolower($sType) . 's'));
+		foreach($aItems as $iItemId)
+			$oStorage->deleteFile($iItemId);
+
+		$this->_oDb->deleteMedia($sType, $iId);
+    }
+
+    protected function _prepareParams($sView, $sType, $iOwnerId, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline)
+    {
+        return array(
+            'view' => !empty($sView) ? $sView : BX_TIMELINE_VIEW_DEFAULT,
+
+            'browse' => 'list',
+            'type' => !empty($sType) ? $sType : BX_TIMELINE_TYPE_DEFAULT,
+            'owner_id' => (int)$iOwnerId != 0 ? $iOwnerId : $this->getUserId(),
+            'filter' => !empty($sFilter) ? $sFilter : BX_TIMELINE_FILTER_ALL,
+            'modules' => is_array($aModules) && !empty($aModules) ? $aModules : array(),
+            'timeline' => (int)$iTimeline > 0 ? $iTimeline : 0,
+            'active' => 1,
+            'hidden' => 0,
+
+            'start' => (int)$iStart > 0 ? $iStart : 0,
+            'per_page' => (int)$iPerPage > 0 ? $iPerPage : $this->_oConfig->getPerPage(),
+        );
+    }
+
+    protected function _prepareParamsGet()
+    {
+        $aParams = array(
+            'browse' => 'list',
+            'dynamic_mode' => true,
+        );
+
+        $aParams['view'] = bx_get('view');
+        $aParams['view'] = $aParams['view'] !== false ? bx_process_input($aParams['view'], BX_DATA_TEXT) : BX_TIMELINE_VIEW_DEFAULT;
+
+        $aParams['type'] = bx_get('type');
+        $aParams['type'] = $aParams['type'] !== false ? bx_process_input($aParams['type'], BX_DATA_TEXT) : BX_TIMELINE_TYPE_DEFAULT;
+
+        $aParams['owner_id'] = bx_get('owner_id');
+        $aParams['owner_id'] = $aParams['owner_id'] !== false ? bx_process_input($aParams['owner_id'], BX_DATA_INT) : $this->getUserId();
+
+        $aParams['start'] = bx_get('start');
+        $aParams['start'] = $aParams['start'] !== false ? bx_process_input($aParams['start'], BX_DATA_INT) : 0;
+
+        $aParams['per_page'] = bx_get('per_page');
+        $aParams['per_page'] = $aParams['per_page'] !== false ? bx_process_input($aParams['per_page'], BX_DATA_INT) : $this->_oConfig->getPerPage();
+
+        $aParams['filter'] = bx_get('filter');
+        $aParams['filter'] = $aParams['filter'] !== false ? bx_process_input($aParams['filter'], BX_DATA_TEXT) : BX_TIMELINE_FILTER_ALL;
+
+        $aParams['modules'] = bx_get('modules');
+        $aParams['modules'] = $aParams['modules'] !== false ? bx_process_input($aParams['modules'], BX_DATA_TEXT) : array();
+
+        $aParams['timeline'] = bx_get('timeline');
+        $aParams['timeline'] = $aParams['timeline'] !== false ? bx_process_input($aParams['timeline'], BX_DATA_INT) : 0;
+
+        $aParams['active'] = 1;
+        $aParams['hidden'] = 0;
+
+        return $aParams;
+    }
+
+    protected function _prepareTextForSave($s)
+    {
+        return bx_process_input($s, BX_DATA_HTML);
+    }
+
+    protected function _getFieldValue($sField, $iContentId)
+    {
+        $CNF = &$this->_oConfig->CNF;
+        if(empty($CNF[$sField]))
+            return false;
+
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContentId));
+        if(empty($aEvent) || empty($aEvent[$CNF[$sField]]))
+            return false;
+
+        return $aEvent[$CNF[$sField]];
+    }
+}
+
+/** @} */

+ 1330 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/classes/BxTimelineTemplate.php

@@ -0,0 +1,1330 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxTimelineTemplate extends BxBaseModNotificationsTemplate
+{
+    protected static $_sTmplContentItemItem;
+    protected static $_sTmplContentItemOutline;
+    protected static $_sTmplContentItemTimeline;
+    protected static $_sTmplContentItemSearch;
+    protected static $_sTmplContentTypePost;
+    protected static $_sTmplContentTypeRepost;
+
+    protected $_bShowTimelineDividers;
+
+    function __construct(&$oConfig, &$oDb)
+    {
+        parent::__construct($oConfig, $oDb);
+
+        $this->_bShowTimelineDividers = false;
+    }
+
+    public function getCssJs()
+    {
+    	parent::getCssJs();
+
+        $this->addCss(array(
+        	BX_DIRECTORY_PATH_PLUGINS_PUBLIC . 'flickity/|flickity.css',
+            'jquery-ui/jquery-ui.css',
+			'cmts.css',
+            'post.css',
+            'repost.css',
+        ));
+        $this->addJs(array(
+            'jquery-ui/jquery-ui.custom.min.js',
+            'jquery.form.min.js',
+            'jquery.ba-resize.min.js',
+        	'autosize.min.js',
+            'masonry.pkgd.min.js',
+            'modernizr.js',
+        	'flickity/flickity.pkgd.min.js',
+            'BxDolCmts.js',
+            'post.js',
+            'repost.js',
+        ));
+    }
+
+    public function getPostBlock($iOwnerId, $aParams = array())
+    {
+        $aForm = $this->getModule()->getFormPost($aParams);
+
+        return $this->parseHtmlByName('block_post.html', array (
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'js_object' => $this->_oConfig->getJsObject('post'),
+            'js_content' => $this->getJsCode('post', array(
+            	'oRequestParams' => array('owner_id' => $iOwnerId)
+        	)),
+            'form' => $aForm['form']
+        ));
+    }
+
+    public function getViewBlock($aParams)
+    {
+        list($sContent, $sLoadMore, $sBack, $sEmpty) = $this->getPosts($aParams);
+
+        return $this->parseHtmlByName('block_view.html', array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+        	'html_id' => $this->_oConfig->getHtmlIds('view', 'main_' . $aParams['view']),
+            'view' => $aParams['view'],
+            'back' => $sBack,
+            'empty' => $sEmpty, 
+            'content' => $sContent,
+            'load_more' =>  $sLoadMore,
+            'show_more' => $this->_getShowMore($aParams),
+        	'view_image_popup' => $this->_getImagePopup($aParams),
+            'js_content' => $this->getJsCode('view', array(
+            	'oRequestParams' => array(
+	                'type' => $aParams['type'],
+	                'owner_id' => $aParams['owner_id'],
+	                'start' => $aParams['start'],
+	                'per_page' => $aParams['per_page'],
+	                'filter' => $aParams['filter'],
+	                'modules' => $aParams['modules'],
+	                'timeline' => $aParams['timeline'],
+        		)
+            )) . $this->getJsCode('repost')
+        ));
+    }
+
+    public function getSearchBlock($sContent)
+    {
+        $oModule = $this->getModule();
+        $aParams = $oModule->getParams(BX_TIMELINE_VIEW_SEARCH);
+
+        return $this->parseHtmlByName('block_search.html', array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+        	'html_id' => $this->_oConfig->getHtmlIds('view', 'main_' . $aParams['view']),
+            'view' => $aParams['view'],
+            'content' => $sContent,
+        	'view_image_popup' => $this->_getImagePopup($aParams),
+            'js_content' => $this->getJsCode('view', array(
+            	'oRequestParams' => array(
+	                'type' => $aParams['type'],
+	                'owner_id' => $aParams['owner_id'],
+	                'start' => $aParams['start'],
+	                'per_page' => $aParams['per_page'],
+	                'filter' => $aParams['filter'],
+	                'modules' => $aParams['modules'],
+	                'timeline' => $aParams['timeline'],
+        		)
+            ))
+        ));
+    }
+
+    public function getItemBlock($iId)
+    {
+        $CNF = $this->_oConfig->CNF;
+
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+        if(empty($aEvent))
+            return array('content' => MsgBox(_t('_Empty')), 'designbox_id' => 13);
+
+        $iProfile = (int)$aEvent[$CNF['FIELD_OWNER_ID']];
+        if(!empty($iProfile)) {
+            $oProfile = BxDolProfile::getInstance($iProfile);
+            if(!$oProfile)
+                return array('content' => MsgBox(_t('_Empty')), 'designbox_id' => 13);
+
+            $mixedResult = $oProfile->checkAllowedProfileView();
+            if($mixedResult !== CHECK_ACTION_RESULT_ALLOWED)
+                return array('content' => MsgBox($mixedResult), 'designbox_id' => 13);
+        }
+
+        $aParams = array(
+        	'view' => BX_TIMELINE_VIEW_ITEM, 
+        	'type' => BX_TIMELINE_TYPE_ITEM
+        );
+        $sContent = $this->getPost($aEvent, $aParams);
+
+        $oModule = $this->getModule();
+        if($oModule->isAllowedViewCounter($aEvent) !== true)
+            return array('content' => MsgBox(_t('_Access denied')), 'designbox_id' => 13);
+
+        if(!$this->_oConfig->isSystem($aEvent['type'], $aEvent['action'])) {
+            $mixedViews = $oModule->getViewsData($aEvent['views']);
+            if($mixedViews !== false) {
+                list($sSystem, $iObjectId) = $mixedViews;
+                $oModule->getViewObject($sSystem, $iObjectId)->doView();
+            }
+        }
+
+        list($sAuthorName) = $oModule->getUserInfo($aEvent['object_owner_id']);
+
+        $oTemplate = BxDolTemplate::getInstance();
+        $oTemplate->setPageHeader(strip_tags($sAuthorName . ' ' . _t($aEvent['sample_action'], _t($aEvent['sample']))));
+        $oTemplate->setPageDescription(strip_tags($aEvent['title']));
+
+        $oMetatags = BxDolMetatags::getObjectInstance($this->_oConfig->getObject('metatags'));
+        if($oMetatags)
+            $oMetatags->addPageMetaInfo($aEvent[$CNF['FIELD_ID']]);
+
+        $sReferrer = '';
+        if(isset($_SERVER['HTTP_REFERER']) && mb_stripos($_SERVER['HTTP_REFERER'], BX_DOL_URL_ROOT) === 0)
+            $sReferrer = $_SERVER['HTTP_REFERER'];
+        else 
+            $sReferrer = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink($this->_oConfig->CNF['URL_HOME']);
+
+        return array('content' => $this->parseHtmlByName('block_item.html', array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+        	'html_id' => $this->_oConfig->getHtmlIds('view', 'main_item'),
+        	'content' => $sContent,
+        	'view_image_popup' => $this->_getImagePopup($aParams),
+            'js_content' => $this->getJsCode('view', array(
+                'sReferrer' => $sReferrer
+            )) . $this->getJsCode('repost')
+        )));
+    }
+
+    /**
+     * Get event's content.
+     * @param integer $iId - event ID.
+     * @param string $sMode - 'photo' is only one mode which is available for now.
+     */
+    public function getItemBlockContent($iId, $sMode) {
+        $CNF = $this->_oConfig->CNF;
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+        if(empty($aEvent))
+            return '';
+
+        $aTmplVars = array(
+        	'style_prefix' => $sStylePrefix,
+            'bx_if:show_image' => array(
+                'condition' => false,
+                'content' => array()
+            )
+        );
+
+        switch($sMode) {
+            case 'photo':
+                $aTmplVars['bx_if:show_image']['condition'] = true;
+                $aTmplVars['bx_if:show_image']['content'] = array(
+                    'style_prefix' => $sStylePrefix,
+                    'src' => base64_decode(bx_process_input(bx_get('src'))),
+                );
+                break;
+        }
+
+        return $this->parseHtmlByName('block_item_content.html', $aTmplVars);
+    }
+
+    public function getItemBlockInfo($iId) {
+        $CNF = $this->_oConfig->CNF;
+
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+        if(empty($aEvent))
+            return '';
+
+        $aResult = $this->getData($aEvent);
+        if($aResult === false)
+            return '';
+
+        list($sAuthorName, $sAuthorUrl, $sAuthorIcon, $sAuthorUnit) = $this->getModule()->getUserInfo($aResult['owner_id']);
+
+        return $this->parseHtmlByName('block_item_info.html', array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'author' => $sAuthorUnit
+        ));
+    }
+
+    public function getItemBlockComments($iId) {
+        $CNF = $this->_oConfig->CNF;
+
+        $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iId));
+        if(empty($aEvent))
+            return '';
+
+        $aResult = $this->getData($aEvent);
+        if($aResult === false)
+            return '';
+            
+        return $this->_getComments($aResult['comments']);
+    }
+
+    public function getUnit(&$aEvent, $aBrowseParams = array())
+    {
+        $oModule = $this->getModule();
+
+        if(empty($aBrowseParams) || !is_array($aBrowseParams))
+            $aBrowseParams = $oModule->getParams(BX_TIMELINE_VIEW_SEARCH);
+
+        return $this->getPost($aEvent, $aBrowseParams);
+    }
+
+    public function getPost(&$aEvent, $aBrowseParams = array())
+    {
+        $oPrivacy = BxDolPrivacy::getObjectInstance($this->_oConfig->getObject('privacy_view'));
+        if($oPrivacy) {
+            $oPrivacy->setTableFieldAuthor($this->_oConfig->isSystem($aEvent['type'], $aEvent['action']) ? 'owner_id' : 'object_id');
+            if(!$oPrivacy->check($aEvent['id']))
+                return '';
+        }
+
+        $aResult = $this->getData($aEvent, $aBrowseParams);
+        if($aResult === false)
+            return '';
+
+        $aEvent['object_owner_id'] = $aResult['owner_id'];
+        $aEvent['icon'] = !empty($aResult['icon']) ? $aResult['icon'] : '';
+        $aEvent['sample'] = !empty($aResult['sample']) ? $aResult['sample'] : '_bx_timeline_txt_sample';
+        $aEvent['sample_action'] = !empty($aResult['sample_action']) ? $aResult['sample_action'] : '_bx_timeline_txt_added_sample';
+        $aEvent['content'] = $aResult['content'];
+        $aEvent['views'] = $aResult['views'];
+        $aEvent['votes'] = $aResult['votes'];
+        $aEvent['reports'] = $aResult['reports'];
+        $aEvent['comments'] = $aResult['comments'];
+
+        $sType = !empty($aResult['content_type']) ? $aResult['content_type'] : BX_TIMELINE_PARSE_TYPE_DEFAULT;
+        return $this->_getPost($sType, $aEvent, $aBrowseParams);
+    }
+
+    public function getPosts($aParams)
+    {
+        $bViewTimeline = $aParams['view'] == BX_TIMELINE_VIEW_TIMELINE;
+
+        $iStart = $aParams['start'];
+        $iPerPage = $aParams['per_page'];
+
+        $aParamsDb = $aParams;
+
+        //--- Check for Previous
+        $iDays = -1;
+        $bPrevious = false;
+        if($iStart - 1 >= 0) {
+            $aParamsDb['start'] -= 1;
+            $aParamsDb['per_page'] += 1;
+            $bPrevious = true;
+        }
+
+        //--- Check for Next
+        $aParamsDb['per_page'] += 1;
+        $aEvents = $this->_oDb->getEvents($aParamsDb);
+
+        //--- Check for Previous
+        if($bPrevious) {
+            $aEvent = array_shift($aEvents);
+            $iDays = (int)$aEvent['days'];
+        }
+
+        //--- Check for Next
+        $bNext = false;
+        if(count($aEvents) > $iPerPage) {
+            $aEvent = array_pop($aEvents);
+            $bNext = true;
+        }
+
+        $iEvents = count($aEvents);
+        $sContent = '';
+        if($bViewTimeline && $iEvents <= 0)
+        	$sContent .= $this->getDividerToday();
+
+        $bFirst = true;
+        foreach($aEvents as $aEvent) {
+            $sEvent = $this->getPost($aEvent, $aParams);
+            $bEvent = !empty($sEvent);
+            if(!$bEvent)
+                continue;
+
+            if($bViewTimeline && $bFirst) {
+                $sContent .= $this->getDividerToday($aEvent);
+                $bFirst = false;
+            }
+
+            $sContent .= $bViewTimeline && $bEvent ? $this->getDivider($iDays, $aEvent) : '';
+            $sContent .= $sEvent;
+        }
+
+        $sBack = $this->getBack($aParams);
+        $sLoadMore = $this->getLoadMore($aParams, $bNext, $iEvents > 0);
+        $sEmpty = $this->getEmpty($iEvents <= 0);
+        return array($sContent, $sLoadMore, $sBack, $sEmpty);
+    }
+
+    public function getEmpty($bVisible)
+    {
+        return $this->parseHtmlByName('empty.html', array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'visible' => $bVisible ? 'block' : 'none',
+            'content' => MsgBox(_t('_bx_timeline_txt_msg_no_results'))
+        ));
+    }
+
+    public function getDivider(&$iDays, &$aEvent)
+    {
+        if(!$this->_bShowTimelineDividers || $iDays == $aEvent['days'])
+            return '';
+
+        $iDays = $aEvent['days'];
+        $iDaysAgo = (int)$aEvent['ago_days'];
+        if($aEvent['today'] == $aEvent['days'] || (($aEvent['today'] - $aEvent['days']) == 1 && $iDaysAgo == 0))
+            return '';
+
+        return $this->parseHtmlByName('divider.html', array(
+        	'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'type' => 'common',
+            'bx_if:show_hidden' => array(
+                'condition' => false,
+                'content' => array()
+            ),
+            'content' => bx_time_js($aEvent['date'])
+        ));
+    }
+
+    public function getDividerToday($aEvent = array())
+    {
+        if(!$this->_bShowTimelineDividers)
+            return '';
+
+    	$bToday = !empty($aEvent) && ($aEvent['today'] == $aEvent['days'] || (($aEvent['today'] - $aEvent['days']) == 1 && (int)$aEvent['ago_days'] == 0));
+
+        return $this->parseHtmlByName('divider.html', array(
+        	'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'type' => 'today',
+        	'bx_if:show_hidden' => array(
+                'condition' => !$bToday,
+                'content' => array()
+            ),
+            'content' => _t('_bx_timeline_txt_today')
+        ));
+    }
+
+    public function getBack($aParams)
+    {
+        $iYearSel = (int)$aParams['timeline'];
+        if($iYearSel == 0)
+            return '';
+
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObject('view');
+
+        $iYearNow = date('Y', time());
+        return $this->parseHtmlByName('back.html', array(
+        	'style_prefix' => $sStylePrefix,
+            'content' => $this->parseLink('javascript:void(0)', _t('_bx_timeline_txt_jump_to_recent'), array(
+                'title' => _t('_bx_timeline_txt_jump_to_n_year', $iYearNow),
+        		'onclick' => 'javascript:' . $sJsObject . '.changeTimeline(this, 0)'
+            ))
+        ));
+    }
+
+    public function getLoadMore($aParams, $bEnabled, $bVisible = true)
+    {
+        $iStart = $aParams['start'];
+        $iPerPage = $aParams['per_page'];
+        $iYearSel = (int)$aParams['timeline'];
+        $iYearMin = $this->_oDb->getMaxDuration($aParams);
+
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObject('view');
+
+        $sYears = '';
+        if(!empty($iYearMin)) {
+            $iYearMax = date('Y', time()) - 1;
+            for($i = $iYearMax; $i >= $iYearMin; $i--)
+                $sYears .= ($i != $iYearSel ? $this->parseLink('javascript:void(0)', $i, array(
+                    'title' => _t('_bx_timeline_txt_jump_to_n_year', $i),
+                    'onclick' => 'javascript:' . $sJsObject . '.changeTimeline(this, ' . $i . ')'
+                )) : $i) . ', ';
+
+            $sYears = substr($sYears, 0, -2);
+        }
+
+        $aTmplVars = array(
+            'style_prefix' => $sStylePrefix,
+            'visible' => ($aParams['view'] == BX_TIMELINE_VIEW_TIMELINE && $bVisible) || ($aParams['view'] == BX_TIMELINE_VIEW_OUTLINE && $bEnabled && $bVisible) ? 'block' : 'none',
+            'bx_if:is_disabled' => array(
+                'condition' => !$bEnabled,
+                'content' => array()
+            ),
+            'bx_if:show_on_click' => array(
+                'condition' => $bEnabled,
+                'content' => array(
+                    'on_click' => 'javascript:' . $sJsObject . '.changePage(this, ' . ($iStart + $iPerPage) . ', ' . $iPerPage . ')'
+                )
+            ),
+            'bx_if:show_jump_to' => array(
+                'condition' => !empty($sYears),
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'years' => $sYears
+                )
+            )
+        );
+        return $this->parseHtmlByName('load_more.html', $aTmplVars);
+    }
+
+    public function getComments($sSystem, $iId, $bDynamic = false)
+    {
+        $oModule = $this->getModule();
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+
+        $oCmts = $oModule->getCmtsObject($sSystem, $iId);
+        if($oCmts === false)
+            return '';
+
+        $aComments = $oCmts->getCommentsBlock(array(), array('in_designbox' => false, 'dynamic_mode' => $bDynamic));
+        return $this->parseHtmlByName('comments.html', array(
+            'style_prefix' => $sStylePrefix,
+            'id' => $iId,
+            'content' => $aComments['content']
+        ));
+    }
+
+    public function getRepostElement($iOwnerId, $sType, $sAction, $iObjectId, $aParams = array())
+    {
+        $aReposted = $this->_oDb->getReposted($sType, $sAction, $iObjectId);
+        if(empty($aReposted) || !is_array($aReposted))
+            return '';
+
+		$oModule = $this->getModule();
+		$bDisabled = $oModule->isAllowedRepost($aReposted) !== true || $this->_oDb->isReposted($aReposted['id'], $iOwnerId, $oModule->getUserId());
+		if($bDisabled && (int)$aReposted['reposts'] == 0)
+            return '';
+
+		$sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sStylePrefixRepost = $sStylePrefix . '-repost-';
+
+        $bShowDoRepostAsButtonSmall = isset($aParams['show_do_repost_as_button_small']) && $aParams['show_do_repost_as_button_small'] == true;
+        $bShowDoRepostAsButton = !$bShowDoRepostAsButtonSmall && isset($aParams['show_do_repost_as_button']) && $aParams['show_do_repost_as_button'] == true;
+
+        $bShowDoRepostIcon = isset($aParams['show_do_repost_icon']) && $aParams['show_do_repost_icon'] == true;
+        $bShowDoRepostLabel = isset($aParams['show_do_repost_label']) && $aParams['show_do_repost_label'] == true;
+        $bShowCounter = isset($aParams['show_counter']) && $aParams['show_counter'] === true;
+
+        //--- Do repost link ---//
+		$sClass = $sStylePrefixRepost . 'do-repost';
+		if($bShowDoRepostAsButton)
+			$sClass .= ' bx-btn';
+		else if($bShowDoRepostAsButtonSmall)
+			$sClass .= ' bx-btn bx-btn-small';
+
+		$sOnClick = '';
+		if(!$bDisabled) {
+			$sCommonPrefix = $this->_oConfig->getPrefix('common_post');
+			if(str_replace($sCommonPrefix, '', $sType) == BX_TIMELINE_PARSE_TYPE_REPOST) {
+				$aRepostedData = $this->_getCommonData($aReposted);
+	
+	            $sOnClick = $this->_getRepostJsClick($iOwnerId, $aRepostedData['content']['type'], $aRepostedData['content']['action'], $aRepostedData['content']['object_id']);
+			}
+			else
+				$sOnClick = $this->_getRepostJsClick($iOwnerId, $sType, $sAction, $iObjectId);
+		}
+		else
+			$sClass .= $bShowDoRepostAsButton || $bShowDoRepostAsButtonSmall ? ' bx-btn-disabled' : ' ' . $sStylePrefixRepost . 'disabled';
+
+		$aOnClickAttrs = array(
+			'title' => _t('_bx_timeline_txt_do_repost')
+		);
+		if(!empty($sClass))
+			$aOnClickAttrs['class'] = $sClass;
+		if(!empty($sOnClick))
+			$aOnClickAttrs['onclick'] = $sOnClick;
+
+		$sDoRepost = '';
+        if($bShowDoRepostIcon)
+            $sDoRepost .= $this->parseIcon('repeat');
+
+        if($bShowDoRepostLabel)
+            $sDoRepost .= ($sDoRepost != '' ? ' ' : '') . _t('_bx_timeline_txt_do_repost');
+
+        return $this->parseHtmlByName('repost_element_block.html', array(
+            'style_prefix' => $sStylePrefix,
+            'html_id' => $this->_oConfig->getHtmlIds('repost', 'main') . $aReposted['id'],
+            'class' => ($bShowDoRepostAsButton ? $sStylePrefixRepost . 'button' : '') . ($bShowDoRepostAsButtonSmall ? $sStylePrefixRepost . 'button-small' : ''),
+            'count' => $aReposted['reposts'],
+            'do_repost' => $this->parseLink('javascript:void(0)', $sDoRepost, $aOnClickAttrs),
+            'bx_if:show_counter' => array(
+                'condition' => $bShowCounter,
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+        			'bx_if:show_hidden' => array(
+        				'condition' => (int)$aReposted['reposts'] == 0,
+        				'content' => array()
+        			),
+                    'counter' => $this->getRepostCounter($aReposted, $aParams)
+                )
+            ),
+            'script' => $this->getRepostJsScript()
+        ));
+    }
+
+    public function getRepostCounter($aEvent, $aParams = array())
+    {
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObject('repost');
+
+        $bShowDoRepostAsButtonSmall = isset($aParams['show_do_repost_as_button_small']) && $aParams['show_do_repost_as_button_small'] == true;
+        $bShowDoRepostAsButton = !$bShowDoRepostAsButtonSmall && isset($aParams['show_do_repost_as_button']) && $aParams['show_do_repost_as_button'] == true;
+
+        $sClass = $sStylePrefix . '-repost-counter';
+        if($bShowDoRepostAsButtonSmall)
+            $sClass .= ' bx-btn-small-height';
+        if($bShowDoRepostAsButton)
+            $sClass .= ' bx-btn-height';
+
+        return $this->parseLink('javascript:void(0)', !empty($aEvent['reposts']) && (int)$aEvent['reposts'] > 0 ? $aEvent['reposts'] : '', array(
+        	'id' => $this->_oConfig->getHtmlIds('repost', 'counter') . $aEvent['id'],
+        	'class' => $sClass,
+            'title' => _t('_bx_timeline_txt_reposted_by'),
+        	'onclick' => 'javascript:' . $sJsObject . '.toggleByPopup(this, ' . $aEvent['id'] . ')'
+        ));
+    }
+
+    public function getRepostedBy($iId)
+    {
+        $aTmplUsers = array();
+        $oModule = $this->getModule();
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+
+        $aUserIds = $this->_oDb->getRepostedBy($iId);
+        foreach($aUserIds as $iUserId) {
+            list($sUserName, $sUserUrl, $sUserIcon, $sUserUnit) = $oModule->getUserInfo($iUserId);
+            $aTmplUsers[] = array(
+                'style_prefix' => $sStylePrefix,
+                'user_unit' => $sUserUnit
+            );
+        }
+
+        if(empty($aTmplUsers))
+            $aTmplUsers = MsgBox(_t('_Empty'));
+
+        return $this->parseHtmlByName('repost_by_list.html', array(
+            'style_prefix' => $sStylePrefix,
+            'bx_repeat:list' => $aTmplUsers
+        ));
+    }
+
+    public function getRepostJsScript()
+    {
+        $this->addCss(array('repost.css'));
+        $this->addJs(array('main.js', 'repost.js'));
+
+        return $this->getJsCode('repost');
+    }
+
+    public function getRepostJsClick($iOwnerId, $sType, $sAction, $iObjectId)
+    {
+        $aReposted = $this->_oDb->getReposted($sType, $sAction, $iObjectId);
+        if(empty($aReposted) || !is_array($aReposted))
+            return '';
+
+        $sResult = '';
+        $sCommonPrefix = $this->_oConfig->getPrefix('common_post');
+        if(str_replace($sCommonPrefix, '', $sType) == BX_TIMELINE_PARSE_TYPE_REPOST) {
+            $aRepostedData = $this->_getCommonData($aReposted);
+
+            $sResult = $this->_getRepostJsClick($iOwnerId, $aRepostedData['content']['type'], $aRepostedData['content']['action'], $aRepostedData['content']['object_id']);
+        }
+        else
+            $sResult = $this->_getRepostJsClick($iOwnerId, $sType, $sAction, $iObjectId);
+
+        return $sResult;
+    }
+
+    public function getAttachLinkForm()
+    {
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObject('post');
+
+        $aForm = $this->getModule()->getFormAttachLink();
+
+        return $this->parseHtmlByName('attach_link_form.html', array(
+            'style_prefix' => $sStylePrefix,
+            'js_object' => $sJsObject,
+            'form_id' => $aForm['form_id'],
+            'form' => $aForm['form'],
+        ));
+    }
+
+    public function getAttachLinkField($iUserId)
+    {
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+
+        $aLinks = $this->_oDb->getUnusedLinks($iUserId);
+
+        $sLinks = '';
+        foreach($aLinks as $aLink)
+            $sLinks .= $this->getAttachLinkItem($iUserId, $aLink);
+
+        return $this->parseHtmlByName('attach_link_form_field.html', array(
+            'html_id' => $this->_oConfig->getHtmlIds('post', 'attach_link_form_field'),
+            'style_prefix' => $sStylePrefix,
+            'links' => $sLinks
+        ));
+    }
+
+    public function getAttachLinkItem($iUserId, $mixedLink)
+    {
+        $aLink = is_array($mixedLink) ? $mixedLink : $this->_oDb->getUnusedLinks($iUserId, (int)$mixedLink);
+        if(empty($aLink) || !is_array($aLink))
+            return '';
+
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObject('post');
+        $sLinkIdPrefix = $this->_oConfig->getHtmlIds('post', 'attach_link_item');
+
+        $bTmplVarsEmbed = false;
+        $aTmplVarsEmbed = array();
+        $sIframelyKey = $this->_oDb->getParam('sys_iframely_api_key');
+        $sEmbedlyKey = $this->_oDb->getParam('sys_embedly_api_key');
+        $sEmbedlyPattern = $this->_oDb->getParam('sys_embedly_api_pattern');
+        if(!empty($sIframelyKey) || (!empty($sEmbedlyKey) && (empty($sEmbedlyPattern) || preg_match("/" . $sEmbedlyPattern . "/i", $aLink['url'])))) {
+            $bTmplVarsEmbed = true;
+            $aTmplVarsEmbed = array(
+                'style_prefix' => $sStylePrefix,
+            	'embed' => $this->parseLink($aLink['url'], $aLink['title'], array(
+            		'class' => 'bx-link',
+            		'title' => $aLink['title']
+            	))
+            );
+        }
+        else {
+            $aLinkAttrs = array(
+            	'title' => bx_html_attribute($aLink['title'])
+            );
+            if(!$this->_oConfig->isEqualUrls(BX_DOL_URL_ROOT, $aLink['url'])) {
+                $aLinkAttrs['target'] = '_blank';
+    
+                if($this->_oDb->getParam('sys_add_nofollow') == 'on')
+            	    $aLinkAttrs['rel'] = 'nofollow';
+            }
+
+            $sThumbnail = "";
+            if((int)$aLink['media_id'] != 0)
+                $sThumbnail = BxDolTranscoderImage::getObjectInstance($this->_oConfig->getObject('transcoder_photos_preview'))->getFileUrl($aLink['media_id']);
+
+            $aTmplVarsEmbed = array(
+                'style_prefix' => $sStylePrefix,
+            	'bx_if:show_thumbnail' => array(
+            		'condition' => !empty($sThumbnail),
+            		'content' => array(
+            			'style_prefix' => $sStylePrefix,
+            			'thumbnail' => $sThumbnail
+            		)
+            	),
+    			'url' => $aLink['url'],
+            	'link' => $this->parseLink($aLink['url'], $aLink['title'], $aLinkAttrs)
+            );
+        }
+
+        return $this->parseHtmlByName('attach_link_item.html', array(
+            'html_id' => $sLinkIdPrefix . $aLink['id'],
+            'style_prefix' => $sStylePrefix,
+            'js_object' => $sJsObject,
+            'id' => $aLink['id'],
+        	'bx_if:show_embed_outer' => array(
+        		'condition' => $bTmplVarsEmbed,
+        		'content' => $aTmplVarsEmbed
+        	),
+        	'bx_if:show_embed_inner' => array(
+        		'condition' => !$bTmplVarsEmbed,
+        		'content' => $aTmplVarsEmbed
+            ),
+        ));
+    }
+
+    public function getData(&$aEvent, $aBrowseParams = array())
+    {
+        $aResult = $this->_oConfig->isSystem($aEvent['type'], $aEvent['action']) ? $this->_getSystemData($aEvent, $aBrowseParams) : $this->_getCommonData($aEvent, $aBrowseParams);
+        if(empty($aResult) || empty($aResult['owner_id']) || empty($aResult['content']))
+            return false;
+
+        list($sUserName) = $this->getModule()->getUserInfo($aResult['owner_id']);
+
+        $sSample = !empty($aResult['sample']) ? $aResult['sample'] : '_bx_timeline_txt_sample';
+        if(empty($aEvent['title']) || empty($aEvent['description'])) {
+            $sTitle = !empty($aResult['title']) ? $this->_oConfig->getTitle($aResult['title']) : _t($sSample);
+
+            $sDescription = !empty($aResult['description']) ? $aResult['description'] : _t('_bx_timeline_txt_user_added_sample', $sUserName, _t($sSample));
+            if($sDescription == '' && !empty($aResult['content']['text']))
+                $sDescription = $aResult['content']['text'];
+
+            $this->_oDb->updateEvent(array(
+                'title' => bx_process_input(strip_tags($sTitle)),
+                'description' => bx_process_input(strip_tags($sDescription))
+            ), array('id' => $aEvent['id']));
+        }
+
+        return $aResult;
+    }
+
+    public function getItemIcon($bT, $bL, $bP, $bV)
+    {
+        $sResult = '';
+
+        if($bT && !$bL && !$bP && !$bV)
+            $sResult = 'file-text-o';
+        else if(!$bT && $bL && !$bP && !$bV)
+            $sResult = 'link';
+        else if(!$bT && !$bL && $bP && !$bV)
+            $sResult = 'picture-o';
+        else if(!$bT && !$bL && !$bP && $bV)
+            $sResult = 'film';
+        else 
+            $sResult = 'file-o';
+
+        return '<i class="sys-icon ' . $sResult . '"></i>';
+    }
+
+    protected function _getPost($sType, $aEvent, $aBrowseParams = array())
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $oModule = $this->getModule();
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObject('view');
+
+        list($sAuthorName, $sAuthorUrl, $sAuthorIcon, $sAuthorUnit, $sAuthorUnitShort) = $oModule->getUserInfo($aEvent['object_owner_id']);
+        $bAuthorIcon = !empty($sAuthorIcon);
+
+        $aTmplVarsMenuItemActions = $this->_getTmplVarsMenuItemActions($aEvent, $aBrowseParams);
+
+        $aTmplVarsTimelineOwner = array();
+        if(isset($aBrowseParams['type']) && $aBrowseParams['type'] == BX_BASE_MOD_NTFS_TYPE_CONNECTIONS)
+            $aTmplVarsTimelineOwner = $this->_getTmplVarsTimelineOwner($aEvent);
+
+        $bBrowseItem = isset($aBrowseParams['type']) && $aBrowseParams['type'] == BX_TIMELINE_TYPE_ITEM;
+        $bViewOutline = isset($aBrowseParams['view']) && $aBrowseParams['view'] == BX_TIMELINE_VIEW_OUTLINE;
+
+        $oMetatags = BxDolMetatags::getObjectInstance($this->_oConfig->getObject('metatags'));
+ 		$sLocation = $oMetatags->locationsString($aEvent['id']);
+ 
+        $aTmplVars = array (
+            'style_prefix' => $sStylePrefix,
+            'js_object' => $sJsObject,
+        	'html_id' => $this->_oConfig->getHtmlIds('view', 'item_' . $aBrowseParams['view']) . $aEvent['id'],
+            'class' => $bBrowseItem || !$bViewOutline ? 'bx-tl-view-sizer' : 'bx-tl-grid-sizer',
+        	'class_content' => $bBrowseItem ? 'bx-def-color-bg-block' : 'bx-def-color-bg-box',
+            'id' => $aEvent['id'],
+            'bx_if:show_owner_icon' => array(
+                'condition' => $bAuthorIcon,
+                'content' => array(
+                    'owner_icon' => $sAuthorIcon
+                )
+            ),
+            'bx_if:show_owner_icon_empty' => array(
+                'condition' => !$bAuthorIcon,
+                'content' => array()
+            ),
+            'item_icon' => !empty($aEvent['icon']) ? $aEvent['icon'] : $CNF['ICON'],
+            'item_owner_url' => $sAuthorUrl,
+            'item_owner_title' => bx_html_attribute($sAuthorName),
+            'item_owner_name' => $sAuthorName,
+            'item_owner_unit' => $sAuthorUnitShort,
+            'item_owner_action' => _t($aEvent['sample_action'], _t($aEvent['sample'])),
+            'bx_if:show_timeline_owner' => array(
+                'condition' => !empty($aTmplVarsTimelineOwner),
+                'content' => $aTmplVarsTimelineOwner
+            ),
+            'item_view_url' => $this->_oConfig->getItemViewUrl($aEvent),
+            'item_date' => bx_time_js($aEvent['date']),
+            'bx_if:show_pinned' => array(
+            	'condition' => (int)$aEvent['pinned'] != 0,
+            	'content' => array(
+            		'style_prefix' => $sStylePrefix,
+            	)
+            ),
+            'content' => is_string($aEvent['content']) ? $aEvent['content'] : $this->_getContent($sType, $aEvent, $aBrowseParams),
+            'bx_if:show_location' => array(
+            	'condition' => !empty($sLocation),
+            	'content' => array(
+            		'style_prefix' => $sStylePrefix,
+            		'location' => $sLocation
+            	)
+            ),
+            'bx_if:show_menu_item_actions' => array(
+                'condition' => !empty($aTmplVarsMenuItemActions),
+                'content' => $aTmplVarsMenuItemActions
+            ),
+            'comments' => $bBrowseItem ? $this->_getComments($aEvent['comments']) : '',
+        );
+
+        $sVariable = '_sTmplContentItem' . bx_gen_method_name($aBrowseParams['view']);
+        if(empty(self::$$sVariable))
+            self::$$sVariable = $this->getHtml('item_' . $aBrowseParams['view'] . '.html');
+
+        return $this->parseHtmlByContent(self::$$sVariable, $aTmplVars);
+    }
+
+    protected function _getContent($sType, $aEvent, $aBrowseParams = array())
+    {
+        $sMethod = '_getTmplVarsContent' . ucfirst($sType);
+        if(!method_exists($this, $sMethod))
+            return '';
+
+        $sVariable = '_sTmplContentType' . bx_gen_method_name($sType);
+        if(empty(self::$$sVariable))
+            self::$$sVariable = $this->getHtml('type_' . $sType . '.html');
+
+		return $this->parseHtmlByContent(self::$$sVariable, $this->$sMethod($aEvent, $aBrowseParams));
+    }
+
+    protected function _getComments($aComments)
+    {
+        $mixedComments = $this->getModule()->getCommentsData($aComments);
+        if($mixedComments === false)
+            return '';
+
+        list($sSystem, $iObjectId, $iCount) = $mixedComments;
+        return $this->getComments($sSystem, $iObjectId);
+    }
+
+    protected function _getShowMore($aParams)
+    {
+        return $this->parseHtmlByName('show_more.html', array(
+        	'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'js_object' => $this->_oConfig->getJsObject('view'),
+        ));
+    }
+
+    protected function _getImagePopup($aParams)
+    {
+        $sViewImagePopupId = $this->_oConfig->getHtmlIds('view', 'photo_popup_' . $aParams['view']);
+        $sViewImagePopupContent = $this->parseHtmlByName('popup_image.html', array(
+    		'image_url' => ''
+    	));
+
+    	return BxTemplFunctions::getInstance()->transBox($sViewImagePopupId, $sViewImagePopupContent, true);
+    }
+
+    protected function _getRepostJsClick($iOwnerId, $sType, $sAction, $iObjectId)
+    {
+        $sJsObject = $this->_oConfig->getJsObject('repost');
+        $sFormat = "%s.repostItem(this, %d, '%s', '%s', %d);";
+
+        $iOwnerId = !empty($iOwnerId) ? (int)$iOwnerId : $this->getModule()->getUserId(); //--- in whose timeline the content will be reposted
+        return sprintf($sFormat, $sJsObject, $iOwnerId, $sType, $sAction, (int)$iObjectId);
+    }
+
+    protected function _getTmplVarsMenuItemActions(&$aEvent, $aBrowseParams = array())
+    {
+        $oMenu = BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_item_actions'));
+        $oMenu->setEvent($aBrowseParams['view'], $aEvent);
+        $oMenu->setDynamicMode(isset($aBrowseParams['dynamic_mode']) && $aBrowseParams['dynamic_mode'] === true);
+
+        $sMenu = $oMenu->getCode();
+        if(empty($sMenu))
+            return array();
+
+        return array(
+            'style_prefix' => $this->_oConfig->getPrefix('style'),
+            'js_object' => $this->_oConfig->getJsObject('view'),
+            'menu_item_actions' => $sMenu
+        );
+    }
+
+    protected function _getTmplVarsTimelineOwner(&$aEvent)
+    {
+        $oModule = $this->getModule();
+
+        $aTmplVarsTimelineOwner = array();
+        if((int)$aEvent['owner_id'] != (int)$aEvent['object_owner_id']) {
+            list($sTimelineAuthorName, $sTimelineAuthorUrl) = $oModule->getUserInfo($aEvent['owner_id']);
+
+            $aTmplVarsTimelineOwner = array(
+            	'style_prefix' => $this->_oConfig->getPrefix('style'),
+                'owner_url' => $sTimelineAuthorUrl,
+                'owner_username' => $sTimelineAuthorName,
+            );
+        }
+
+        return $aTmplVarsTimelineOwner;
+    }
+
+    protected function _getTmplVarsContentPost($aEvent, $aBrowseParams = array())
+    {
+    	$aContent = &$aEvent['content'];
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+        $sJsObject = $this->_oConfig->getJsObject('view');
+
+        $bBrowseItem = isset($aBrowseParams['type']) && $aBrowseParams['type'] == BX_TIMELINE_TYPE_ITEM;
+
+        //--- Process Raw ---//
+        $sRaw = isset($aContent['raw']) ? $aContent['raw'] : '';
+
+        //--- Process Text ---//
+        $sUrl = isset($aContent['url']) ? bx_html_attribute($aContent['url']) : '';
+        $sTitle = '';
+        if(isset($aContent['title']))
+            $sTitle = bx_process_output($aContent['title']);
+
+        if(!empty($sUrl) && !empty($sTitle))
+            $sTitle = $this->parseLink($sUrl, $sTitle, array(
+            	'class' => $sStylePrefix . '-title',
+                'title' => $sTitle
+            ));
+
+        $sText = isset($aContent['text']) ? $aContent['text'] : '';
+        $sText = $this->_prepareTextForOutput($sText, $aEvent['id']);
+
+        //--- Process Links ---//
+        $bAddNofollow = $this->_oDb->getParam('sys_add_nofollow') == 'on';
+
+        $aTmplVarsLinks = array();
+        if(!empty($aContent['links']))
+            foreach($aContent['links'] as $aLink) {
+                $bTmplVarsEmbed = false;
+                $aTmplVarsEmbed = array();
+                $sIframelyKey = $this->_oDb->getParam('sys_iframely_api_key');
+                $sEmbedlyKey = $this->_oDb->getParam('sys_embedly_api_key');
+                $sEmbedlyPattern = $this->_oDb->getParam('sys_embedly_api_pattern');
+                if(!empty($sIframelyKey) || (!empty($sEmbedlyKey) && (empty($sEmbedlyPattern) || preg_match("/" . $sEmbedlyPattern . "/i", $aLink['url'])))) {
+                    $bTmplVarsEmbed = true;
+                    $aTmplVarsEmbed = array(
+                        'style_prefix' => $sStylePrefix,
+                    	'embed' => $this->parseLink($aLink['url'], $aLink['title'], array(
+                    		'class' => 'bx-link',
+                    		'title' => $aLink['title']
+                    	))
+                    );
+                }
+                else {
+                    $aLinkAttrs = array(
+                    	'title' => $aLink['title']
+                    );
+                    if(!$this->_oConfig->isEqualUrls(BX_DOL_URL_ROOT, $aLink['url'])) {
+                        $aLinkAttrs['target'] = '_blank';
+    
+                        if($bAddNofollow)
+                    	    $aLinkAttrs['rel'] = 'nofollow';
+                    }
+
+                    $aTmplVarsEmbed = array(
+                        'bx_if:show_thumbnail' => array(
+                    		'condition' => !empty($aLink['thumbnail']),
+                    		'content' => array(
+                    			'style_prefix' => $sStylePrefix,
+                    			'thumbnail' => $aLink['thumbnail']
+                    		)
+                    	),
+                    	'link' => $this->parseLink($aLink['url'], $aLink['title'], $aLinkAttrs),
+                        'bx_if:show_text' => array(
+                            'condition' => !empty($aLink['text']),
+                            'content' => array(
+                                'style_prefix' => $sStylePrefix,
+                                'text' => $aLink['text']
+                            )
+                        )
+                    );
+                }
+
+                $aTmplVarsLinks[] = array(
+                    'style_prefix' => $sStylePrefix,
+                    'bx_if:show_embed_outer' => array(
+                		'condition' => $bTmplVarsEmbed,
+                		'content' => $aTmplVarsEmbed
+                	),
+                	'bx_if:show_embed_inner' => array(
+                		'condition' => !$bTmplVarsEmbed,
+                		'content' => $aTmplVarsEmbed
+                    )
+                );
+            }
+
+        //--- Process Photos ---//
+        $aTmplVarsImages = array();
+        if(!empty($aContent['images'])) {
+            foreach($aContent['images'] as $aImage) {
+                $sImageSrc = '';
+                if($bBrowseItem && !empty($aImage['src_orig']))
+                    $sImageSrc = $aImage['src_orig'];
+                else if(!empty($aImage['src']))
+                    $sImageSrc = $aImage['src'];
+
+                if(empty($sImageSrc))
+                    continue;
+                
+                $sImage = $this->parseImage($sImageSrc, array(
+                	'class' => $sStylePrefix . '-item-img'
+                ));
+
+                $aAttrs = array();
+                if(isset($aImage['onclick']))
+                    $aAttrs['onclick'] = $aImage['onclick'];
+                else if(!$bBrowseItem && !empty($aImage['src_orig']))
+                    $aAttrs['onclick'] = 'return ' . $sJsObject . '.showItem(this, \'' . $aEvent['id'] . '\', \'photo\', ' . json_encode(array('src' => base64_encode($aImage['src_orig']))) . ')'; 
+
+                $sImage = $this->parseLink(isset($aImage['url']) ? $aImage['url'] : 'javascript:void(0)', $sImage, $aAttrs);
+
+                $aTmplVarsImages[] = array(
+                    'style_prefix' => $sStylePrefix,
+                    'image' => $sImage
+                );
+            }
+
+            //--- Add Meta Image when Item is viewed on a separate page ---//
+            if($bBrowseItem && !empty($aContent['images'][0]['src']))
+                BxDolTemplate::getInstance()->addPageMetaImage($aContent['images'][0]['src']);
+        }
+
+    	//--- Process Videos ---//
+        $aTmplVarsVideos = array();
+        if(!empty($aContent['videos']))
+            foreach($aContent['videos'] as $aVideo) {
+                $aTmplVarsVideos[] = array(
+                    'style_prefix' => $sStylePrefix,
+                	'video' => BxTemplFunctions::getInstance()->videoPlayer($aVideo['src_poster'], $aVideo['src_mp4'], $aVideo['src_webm']) 
+                );
+            }
+
+        return array(
+            'style_prefix' => $sStylePrefix,
+            'bx_if:show_title' => array(
+                'condition' => !empty($sTitle),
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'title' => $sTitle,
+                )
+            ),
+            'bx_if:show_content' => array(
+                'condition' => !empty($sText),
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'item_content' => $sText
+                )
+            ),
+            'bx_if:show_content_raw' => array(
+                'condition' => !empty($sRaw),
+                'content' => array(
+                    'item_content_raw' => $sRaw
+                )
+            ),
+            'bx_if:show_links' => array(
+                'condition' => !empty($aTmplVarsLinks),
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'bx_repeat:links' => $aTmplVarsLinks
+                )
+            ),
+            'bx_if:show_images' => array(
+                'condition' => !empty($aTmplVarsImages),
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'bx_repeat:images' => $aTmplVarsImages
+                )
+            ),
+            'bx_if:show_videos' => array(
+                'condition' => !empty($aTmplVarsVideos),
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'bx_repeat:videos' => $aTmplVarsVideos
+                )
+            )
+        );
+    }
+
+    protected function _getTmplVarsContentRepost($aEvent, $aBrowseParams = array())
+    {
+    	$aContent = &$aEvent['content'];
+        $sStylePrefix = $this->_oConfig->getPrefix('style');
+
+        $sOwnerLink = $this->parseLink($aContent['owner_url'], $aContent['owner_name']);
+
+        $sSample = _t($aContent['sample']);
+        $sSampleLink = empty($aContent['url']) ? $sSample : $this->parseLink($aContent['url'], $sSample);
+
+        $sTitle = _t('_bx_timeline_txt_reposted', $sOwnerLink, $sSampleLink);
+        $sText = $this->_getContent($aContent['parse_type'], $aEvent);
+
+        return array(
+            'bx_if:show_title' => array(
+                'condition' => !empty($sTitle),
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'title' => $sTitle,
+                )
+            ),
+            'bx_if:show_content' => array(
+                'condition' => !empty($sText),
+                'content' => array(
+                    'style_prefix' => $sStylePrefix,
+                    'content' => $sText,
+                )
+            )
+        );
+    }
+
+    protected function _getSystemData(&$aEvent, $aBrowseParams = array())
+    {
+        $mixedResult = $this->_oConfig->getSystemData($aEvent, $aBrowseParams);
+		if($mixedResult !== false)
+			return $mixedResult;
+
+		$sMethod = 'display' . bx_gen_method_name($aEvent['type'] . '_' . $aEvent['action']);
+		if(!method_exists($this, $sMethod))
+        	return '';
+
+		return $this->$sMethod($aEvent);
+    }
+
+    protected function _getCommonData(&$aEvent, $aBrowseParams = array())
+    {
+        $CNF = $this->_oConfig->CNF;
+
+        $oModule = $this->getModule();
+        $sJsObject = $this->_oConfig->getJsObject('view');
+        $sPrefix = $this->_oConfig->getPrefix('common_post');
+        $sType = str_replace($sPrefix, '', $aEvent['type']);
+
+        $aResult = array(
+            'owner_id' => $aEvent['object_id'],
+            'icon' => $CNF['ICON'],
+        	'sample' => '_bx_timeline_txt_sample_with_article',
+            'sample_wo_article' => '_bx_timeline_txt_sample',
+        	'sample_action' => '_bx_timeline_txt_added_sample',
+            'content_type' => $sType,
+            'content' => array(
+                'sample' => '_bx_timeline_txt_sample_with_article',
+        		'sample_wo_article' => '_bx_timeline_txt_sample',
+        		'sample_action' => '_bx_timeline_txt_added_sample',
+                'url' => $this->_oConfig->getItemViewUrl($aEvent)
+            ), //a string to display or array to parse default template before displaying.
+            'views' => '',
+            'votes' => '',
+            'reports' => '',
+            'comments' => '',
+            'title' => $aEvent['title'], //may be empty.
+            'description' => $aEvent['description'] //may be empty.
+        );
+
+        switch($sType) {
+            case BX_TIMELINE_PARSE_TYPE_POST:
+                if(!empty($aEvent['content']))
+                    $aResult['content'] = array_merge($aResult['content'], unserialize($aEvent['content']));
+
+                $aLinks = $this->_oDb->getLinks($aEvent['id']);
+                if(!empty($aLinks) && is_array($aLinks))
+                	$oTranscoder = BxDolTranscoderImage::getObjectInstance($this->_oConfig->getObject('transcoder_photos_preview'));
+
+                    foreach($aLinks as $aLink)
+                        $aResult['content']['links'][] = array(
+                            'url' => $aLink['url'],
+                            'title' => $aLink['title'],
+                            'text' => $aLink['text'],
+                        	'thumbnail' => (int)$aLink['media_id'] != 0 ? $oTranscoder->getFileUrl($aLink['media_id']) : ''
+                        );
+
+                $aPhotos = $this->_oDb->getMedia(BX_TIMELINE_MEDIA_PHOTO, $aEvent['id']);
+                if(!empty($aPhotos) && is_array($aPhotos)) {
+                    $oTranscoder = BxDolTranscoderImage::getObjectInstance($this->_oConfig->getObject('transcoder_photos_view'));
+                    $oTranscoderBig = BxDolTranscoderImage::getObjectInstance($this->_oConfig->getObject('transcoder_photos_big'));
+
+                    foreach($aPhotos as $iPhotoId) {
+                        $sPhotoSrc = $oTranscoder->getFileUrl($iPhotoId);
+                        $sPhotoSrcBig = $oTranscoderBig->getFileUrl($iPhotoId);
+                        if(empty($sPhotoSrcBig) && !empty($sPhotoSrc))
+                            $sPhotoSrcBig = $sPhotoSrc;
+
+                        $aResult['content']['images'][] = array(
+                            'src' => $sPhotoSrc,
+                            'src_orig' => $sPhotoSrcBig,
+                        );
+                    }
+                }
+
+                $aVideos = $this->_oDb->getMedia(BX_TIMELINE_MEDIA_VIDEO, $aEvent['id']);
+                if(!empty($aVideos) && is_array($aVideos)) {
+                    $oTranscoderPoster = BxDolTranscoderVideo::getObjectInstance($this->_oConfig->getObject('transcoder_videos_poster'));
+                    $oTranscoderMp4 = BxDolTranscoderVideo::getObjectInstance($this->_oConfig->getObject('transcoder_videos_mp4'));
+                    $oTranscoderWebm = BxDolTranscoderVideo::getObjectInstance($this->_oConfig->getObject('transcoder_videos_webm'));
+
+                    foreach($aVideos as $iVideoId) {
+                        $aResult['content']['videos'][] = array(
+                            'src_poster' => $oTranscoderPoster->getFileUrl($iVideoId),
+                        	'src_mp4' => $oTranscoderMp4->getFileUrl($iVideoId),
+                        	'src_webm' => $oTranscoderWebm->getFileUrl($iVideoId),
+                        );
+                    }
+                }
+                break;
+
+            case BX_TIMELINE_PARSE_TYPE_REPOST:
+                if(empty($aEvent['content']))
+                    return array();
+
+                $aContent = unserialize($aEvent['content']);
+
+                if(!$this->_oConfig->isSystem($aContent['type'] , $aContent['action'])) {
+                    $aReposted = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $aContent['object_id']));
+                    $aReposted = $this->_getCommonData($aReposted, $aBrowseParams);
+                } 
+                else
+                	$aReposted = $this->_getSystemData($aContent, $aBrowseParams);
+
+				if(empty($aReposted) || !is_array($aReposted))
+					return array();
+
+                $aResult['content'] = array_merge($aContent, $aReposted['content']);
+                $aResult['content']['parse_type'] = !empty($aReposted['content_type']) ? $aReposted['content_type'] : BX_TIMELINE_PARSE_TYPE_DEFAULT;
+                $aResult['content']['owner_id'] = $aReposted['owner_id'];
+                list($aResult['content']['owner_name'], $aResult['content']['owner_url']) = $oModule->getUserInfo($aReposted['owner_id']);
+
+                if(!empty($aReposted['sample']))
+                    $aResult['content']['sample'] = $aReposted['sample'];
+                if(!empty($aReposted['sample_wo_article']))
+                    $aResult['content']['sample'] = $aReposted['sample_wo_article'];
+
+                list($sUserName) = $oModule->getUserInfo($aEvent['object_id']);
+                $aResult['title'] = _t('_bx_timeline_txt_user_repost', $sUserName, _t($aResult['content']['sample']));
+                $aResult['description'] = _t('_bx_timeline_txt_user_reposted_user_sample', $sUserName, $aResult['content']['owner_name'], _t($aResult['content']['sample']));
+                break;
+        }
+
+        $sSystem = $this->_oConfig->getObject('view');
+        if($oModule->getViewObject($sSystem, $aEvent['id']) !== false)
+            $aResult['views'] = array(
+                'system' => $sSystem,
+                'object_id' => $aEvent['id'],
+                'count' => $aEvent['views']
+            );
+
+        $sSystem = $this->_oConfig->getObject('vote');
+        if($oModule->getVoteObject($sSystem, $aEvent['id']) !== false)
+            $aResult['votes'] = array(
+                'system' => $sSystem,
+                'object_id' => $aEvent['id'],
+                'count' => $aEvent['votes']
+            );
+
+		$sSystem = $this->_oConfig->getObject('report');
+        if($oModule->getReportObject($sSystem, $aEvent['id']) !== false)
+            $aResult['reports'] = array(
+                'system' => $sSystem,
+                'object_id' => $aEvent['id'],
+                'count' => $aEvent['reports']
+            );
+
+        $sSystem = $this->_oConfig->getObject('comment');
+        if($oModule->getCmtsObject($sSystem, $aEvent['id']) !== false)
+            $aResult['comments'] = array(
+                'system' => $sSystem,
+                'object_id' => $aEvent['id'],
+                'count' => $aEvent['comments']
+            );
+
+        return $aResult;
+    }
+
+    protected function _prepareTextForOutput($s, $iEventId = 0)
+    {
+        $s = bx_trim_nl_duplicates($s);
+
+    	$s = bx_process_output($s, BX_DATA_HTML);
+
+        $oMetatags = BxDolMetatags::getObjectInstance($this->_oConfig->getObject('metatags'));
+		$s = $oMetatags->metaParse($iEventId, $s);
+
+        return $s;
+    }
+}
+
+/** @} */

+ 135 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/install/config.php

@@ -0,0 +1,135 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_timeline',
+    'title' => 'Timeline',
+    'note' => 'Timeline module.',
+    'version' => '9.0.7',
+    'vendor' => 'BoonEx',
+	'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC5'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/timeline/',
+    'home_uri' => 'timeline',
+
+    'db_prefix' => 'bx_timeline_',
+    'class_prefix' => 'BxTimeline',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Timeline',
+
+    /**
+     * List of page triggers.
+     */
+    'page_triggers' => array (
+        'trigger_page_profile_view_entry',
+        'trigger_page_group_view_entry',
+    ),
+
+    /**
+     * Menu triggers.
+     */
+    'menu_triggers' => array(
+    	'trigger_profile_view_submenu',
+    	'trigger_group_view_submenu',
+    ),
+
+	/**
+     * Storage objects to automatically delete files from upon module uninstallation.
+     * Note. Don't add storage objects used in transcoder objects.
+     */
+    'storages' => array(
+    	'bx_timeline_photos',
+    	'bx_timeline_videos'
+    ),
+
+    /**
+     * Transcoders.
+     */
+    'transcoders' => array(
+    	'bx_timeline_photos_preview',
+    	'bx_timeline_photos_view',
+        'bx_timeline_photos_big',
+    	'bx_timeline_videos_poster',
+    	'bx_timeline_videos_mp4',
+    	'bx_timeline_videos_webm'
+    ),
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+    	'update_relations_for_all' => 1,
+    	'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable_success' => array(
+    	'process_page_triggers' => 1,
+		'process_menu_triggers' => 1,
+    	'register_transcoders' => 1,
+    	'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+    	'update_relations_for_all' => 1,
+    	'update_relations' => 1,
+    	'unregister_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable_failed' => array (
+    	'register_transcoders' => 1,
+    	'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+
+    /**
+     * Relations Section
+     */
+    'relation_handlers' => array(
+    	'on_install' => '',
+    	'on_uninstall' => 'delete_module_events',
+	    'on_enable' => 'add_handlers',
+	    'on_disable' => 'delete_handlers',
+    ),
+    'relations' => array(
+    	'bx_notifications'
+    )
+);
+
+/** @} */

+ 186 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/install/langs/en.xml

@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+
+	<string name="_bx_timeline"><![CDATA[Timeline]]></string>
+	<string name="_bx_timeline_cmts"><![CDATA[Timelines' Comments]]></string>
+
+	<string name="_bx_timeline_option_enable_delete"><![CDATA[Allow Timeline owner to remove items]]></string>
+	<string name="_bx_timeline_option_events_per_page_profile"><![CDATA[Number of items on profile page]]></string>
+	<string name="_bx_timeline_option_events_per_page_account"><![CDATA[Number of items on dashboard page]]></string>
+	<string name="_bx_timeline_option_events_per_page_home"><![CDATA[Number of items on site home page]]></string>
+	<string name="_bx_timeline_option_events_per_page"><![CDATA[Number of items per page]]></string>
+	<string name="_bx_timeline_option_rss_length"><![CDATA[The length of RSS feed]]></string>
+	<string name="_bx_timeline_option_events_hide"><![CDATA[Show events in Timeline]]></string>
+	<string name="_bx_timeline_option_chars_display_max"><![CDATA[Max number of displayed character in text post]]></string>
+	<string name="_bx_timeline_option_err_chars_display_max"><![CDATA[Enter the number which should be greater then 150.]]></string>
+
+	<string name="_bx_timeline_form_post"><![CDATA[Post]]></string>
+	<string name="_bx_timeline_form_post_display_add"><![CDATA[Write Post]]></string>
+	<string name="_bx_timeline_form_post_display_add_public"><![CDATA[Write Public Post]]></string>
+	<string name="_bx_timeline_form_post_input_sys_owner_id"><![CDATA[Owner ID]]></string>
+	<string name="_bx_timeline_form_post_input_sys_action"><![CDATA[Action]]></string>
+	<string name="_bx_timeline_form_post_input_sys_type"><![CDATA[Type]]></string>
+	<string name="_bx_timeline_form_post_input_sys_text"><![CDATA[Content]]></string>
+	<string name="_bx_timeline_form_post_input_text"><![CDATA[]]></string>
+	<string name="_bx_timeline_form_post_input_sys_object_privacy_view"><![CDATA[Visibility]]></string>
+    <string name="_bx_timeline_form_post_input_object_privacy_view"><![CDATA[Visibility]]></string>
+	<string name="_bx_timeline_form_post_input_sys_link"><![CDATA[Link]]></string>
+	<string name="_bx_timeline_form_post_input_link_alt"><![CDATA[Add Link]]></string>
+	<string name="_bx_timeline_form_post_input_link_err_delete"><![CDATA[Cannot remove the link. Please report.]]></string>
+	<string name="_bx_timeline_form_post_input_sys_photo"><![CDATA[Photo]]></string>
+	<string name="_bx_timeline_form_post_input_photo"><![CDATA[]]></string>
+	<string name="_bx_timeline_form_post_input_photo_alt"><![CDATA[Add Photo]]></string>
+	<string name="_bx_timeline_form_post_input_sys_video"><![CDATA[Video]]></string>
+	<string name="_bx_timeline_form_post_input_video"><![CDATA[]]></string>
+	<string name="_bx_timeline_form_post_input_video_alt"><![CDATA[Add Video]]></string>
+	<string name="_bx_timeline_form_post_input_sys_attachments"><![CDATA[Attachments]]></string>
+	<string name="_bx_timeline_form_post_input_sys_do_submit"><![CDATA[Post]]></string>
+	<string name="_bx_timeline_form_post_input_do_submit"><![CDATA[Post]]></string>
+
+	<string name="_bx_timeline_form_attach_link"><![CDATA[Attach Link]]></string>
+	<string name="_bx_timeline_form_attach_link_display_add"><![CDATA[Attach Link]]></string>
+	<string name="_bx_timeline_form_attach_link_input_sys_url"><![CDATA[Url]]></string>
+	<string name="_bx_timeline_form_attach_link_input_url"><![CDATA[Add Link]]></string>
+	<string name="_bx_timeline_form_attach_link_input_url_err"><![CDATA[Correct Link is essential. Please, fill in this field.]]></string>
+	<string name="_bx_timeline_form_attach_link_input_sys_do_submit"><![CDATA[Add]]></string>
+	<string name="_bx_timeline_form_attach_link_input_do_submit"><![CDATA[Add]]></string>
+	<string name="_bx_timeline_form_attach_link_input_do_cancel"><![CDATA[Close]]></string>
+
+	<string name="_bx_timeline_privacy_view"><![CDATA[View event]]></string>
+
+	<string name="_bx_timeline_acl_action_post"><![CDATA[Post]]></string>
+	<string name="_bx_timeline_acl_action_delete"><![CDATA[Delete]]></string>
+	<string name="_bx_timeline_acl_action_vote"><![CDATA[Vote]]></string>
+	<string name="_bx_timeline_acl_action_repost"><![CDATA[Repost]]></string>
+	<string name="_bx_timeline_acl_action_send"><![CDATA[Send]]></string>
+	<string name="_bx_timeline_acl_action_pin"><![CDATA[Pin]]></string>
+
+	<string name="_bx_timeline_page_title_sys_view"><![CDATA[Profile Feed]]></string>
+	<string name="_bx_timeline_page_title_view"><![CDATA[Profile Feed]]></string>
+	<string name="_bx_timeline_page_title_sys_view_home"><![CDATA[Public Feed]]></string>
+    <string name="_bx_timeline_page_title_view_home"><![CDATA[Public Feed]]></string>
+	<string name="_bx_timeline_page_title_sys_item"><![CDATA[Feed Item]]></string>
+	<string name="_bx_timeline_page_title_item"><![CDATA[Feed Item]]></string>
+	<string name="_bx_timeline_page_title_sys_item_brief"><![CDATA[Feed Item Preview]]></string>
+    <string name="_bx_timeline_page_title_item_brief"><![CDATA[Feed Item Preview]]></string>
+	<string name="_bx_timeline_page_title_sys_account"><![CDATA[Feed]]></string>
+	<string name="_bx_timeline_page_title_account"><![CDATA[Feed]]></string>
+	<string name="_bx_timeline_page_block_title_system_post_profile"><![CDATA[Post to Feed]]></string>
+	<string name="_bx_timeline_page_block_title_post_profile"><![CDATA[Post to Feed]]></string>
+	<string name="_bx_timeline_page_block_title_system_view_profile"><![CDATA[Profile Feed (Timeline)]]></string>
+	<string name="_bx_timeline_page_block_title_view_profile"><![CDATA[Profile Feed]]></string>
+	<string name="_bx_timeline_page_block_title_system_view_profile_outline"><![CDATA[Profile Feed (Outline)]]></string>
+	<string name="_bx_timeline_page_block_title_view_profile_outline"><![CDATA[Profile Feed]]></string>
+	<string name="_bx_timeline_page_block_title_item"><![CDATA[Item]]></string>
+	<string name="_bx_timeline_page_block_title_item_content"><![CDATA[Content]]></string>
+	<string name="_bx_timeline_page_block_title_item_info"><![CDATA[Info]]></string>
+	<string name="_bx_timeline_page_block_title_item_comments"><![CDATA[Comments]]></string>
+	<string name="_bx_timeline_page_block_title_system_post_account"><![CDATA[Post to Feed]]></string>
+	<string name="_bx_timeline_page_block_title_post_account"><![CDATA[Post to Feed]]></string>
+	<string name="_bx_timeline_page_block_title_system_view_account"><![CDATA[Feed (Timeline)]]></string>
+	<string name="_bx_timeline_page_block_title_view_account"><![CDATA[Feed]]></string>
+	<string name="_bx_timeline_page_block_title_system_view_account_outline"><![CDATA[Feed (Outline)]]></string>
+	<string name="_bx_timeline_page_block_title_view_account_outline"><![CDATA[Feed]]></string>
+	<string name="_bx_timeline_page_block_title_system_post_home"><![CDATA[Post to Public Feed]]></string>
+	<string name="_bx_timeline_page_block_title_post_home"><![CDATA[Post to Feed]]></string>
+	<string name="_bx_timeline_page_block_title_system_view_home"><![CDATA[Public Feed (Timeline)]]></string>
+	<string name="_bx_timeline_page_block_title_view_home"><![CDATA[Public Feed]]></string>
+	<string name="_bx_timeline_page_block_title_system_view_home_outline"><![CDATA[Public Feed (Outline)]]></string>
+	<string name="_bx_timeline_page_block_title_view_home_outline"><![CDATA[Public Feed]]></string>
+	<string name="_bx_timeline_page_block_title_browse_cmts"><![CDATA[Feeds' Comments]]></string>
+
+    <string name="_bx_timeline_menu_item_view_all"><![CDATA[All posts]]></string>
+    <string name="_bx_timeline_menu_item_view_owner"><![CDATA[Posts by {0}]]></string>
+    <string name="_bx_timeline_menu_item_view_other"><![CDATA[Posts by others]]></string>
+    <string name="_bx_timeline_menu_item_get_rss"><![CDATA[RSS]]></string>
+
+    <string name="_bx_timeline_menu_title_item_share"><![CDATA[Share Item]]></string>
+    <string name="_bx_timeline_menu_set_title_item_share"><![CDATA[Share Item]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_repost"><![CDATA[Repost]]></string>
+    <string name="_bx_timeline_menu_item_title_item_repost"><![CDATA[Repost]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_send"><![CDATA[Send]]></string>
+    <string name="_bx_timeline_menu_item_title_item_send"><![CDATA[Send to Friend]]></string>
+    
+    <string name="_bx_timeline_menu_title_item_manage"><![CDATA[Manage Item]]></string>
+    <string name="_bx_timeline_menu_set_title_item_manage"><![CDATA[Manage Item]]></string>
+	<string name="_bx_timeline_menu_item_title_system_item_pin"><![CDATA[Pin]]></string>
+    <string name="_bx_timeline_menu_item_title_item_pin"><![CDATA[Pin]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_unpin"><![CDATA[Unpin]]></string>
+    <string name="_bx_timeline_menu_item_title_item_unpin"><![CDATA[Unpin]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_timeline_menu_item_title_item_delete"><![CDATA[Delete]]></string>
+
+	<string name="_bx_timeline_menu_title_item_actions"><![CDATA[Item Actions]]></string>
+    <string name="_bx_timeline_menu_set_title_item_actions"><![CDATA[Item Actions]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_comment"><![CDATA[Comment]]></string>
+    <string name="_bx_timeline_menu_item_title_item_comment"><![CDATA[Comment]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_view"><![CDATA[View]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_vote"><![CDATA[Vote]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_share"><![CDATA[Share]]></string>
+    <string name="_bx_timeline_menu_item_title_item_share"><![CDATA[Share]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_report"><![CDATA[Report]]></string>
+    <string name="_bx_timeline_menu_item_title_system_item_more"><![CDATA[More]]></string>
+    <string name="_bx_timeline_menu_item_title_item_more"><![CDATA[More Actions]]></string>
+
+	<string name="_bx_timeline_menu_title_post_attachments"><![CDATA[Form Attachments]]></string>
+    <string name="_bx_timeline_menu_set_title_post_attachments"><![CDATA[Form Attachments]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_link"><![CDATA[Add Link]]></string>
+    <string name="_bx_timeline_menu_item_title_add_link"><![CDATA[Add Link]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_photo"><![CDATA[Add Photo]]></string>
+    <string name="_bx_timeline_menu_item_title_add_photo"><![CDATA[Add Photo]]></string>
+    <string name="_bx_timeline_menu_item_title_system_add_video"><![CDATA[Add Video]]></string>
+    <string name="_bx_timeline_menu_item_title_add_video"><![CDATA[Add Video]]></string>
+
+    <string name="_bx_timeline_menu_item_title_system_timeline"><![CDATA[Timeline]]></string>
+    <string name="_bx_timeline_menu_item_title_timeline"><![CDATA[Timeline]]></string>
+    
+    <string name="_bx_timeline_menu_item_title_system_create_entry"><![CDATA[Update Status]]></string>
+    <string name="_bx_timeline_menu_item_title_create_entry"><![CDATA[Update Status]]></string>
+
+	<string name="_bx_timeline_menu_item_title_system_view_timeline_view"><![CDATA[Timeline]]></string>
+	<string name="_bx_timeline_menu_item_title_view_timeline_view"><![CDATA[Timeline]]></string>
+
+	<string name="_bx_timeline_alert_module_timeline_common_post"><![CDATA[Timeline (post)]]></string>
+	<string name="_bx_timeline_alert_module_timeline_common_repost"><![CDATA[Timeline (repost)]]></string>
+	<string name="_bx_timeline_alert_action_added"><![CDATA[add]]></string>
+	<string name="_bx_timeline_alert_action_post_common"><![CDATA[add post]]></string>
+	<string name="_bx_timeline_alert_action_repost"><![CDATA[repost]]></string>
+
+	<string name="_bx_timeline_txt_msg_no_results"><![CDATA[Empty]]></string>
+	<string name="_bx_timeline_txt_err_cannot_perform_action"><![CDATA[Cannot perform action. Please report.]]></string>
+	<string name="_bx_timeline_txt_err_empty_post"><![CDATA[The post is empty.]]></string>
+
+	<string name="_bx_timeline_txt_load_more"><![CDATA[Load More]]></string>
+	<string name="_bx_timeline_txt_or_jump_to"><![CDATA[... or jump to:]]></string>
+	<string name="_bx_timeline_txt_jump_to_n_year"><![CDATA[Jump to {0} year]]></string>
+	<string name="_bx_timeline_txt_jump_to_recent"><![CDATA[Jump to recent posts]]></string>
+	<string name="_bx_timeline_txt_pinned"><![CDATA[Pinned post]]></string>
+
+	<string name="_bx_timeline_txt_rss_caption"><![CDATA[{0}'s timeline]]></string>
+	<string name="_bx_timeline_txt_added_sample"><![CDATA[added {0}]]></string>
+	<string name="_bx_timeline_txt_user_added_sample"><![CDATA[{0} added {1}]]></string>
+	<string name="_bx_timeline_txt_user_repost"><![CDATA[{0}'s repost]]></string>
+	<string name="_bx_timeline_txt_user_reposted_user_sample"><![CDATA[{0} reposted {1}'s {2}]]></string>
+	<string name="_bx_timeline_txt_sample"><![CDATA[post]]></string>
+	<string name="_bx_timeline_txt_sample_with_article"><![CDATA[a post]]></string>
+	<string name="_bx_timeline_txt_sample_ext"><![CDATA[timeline post]]></string>
+	<string name="_bx_timeline_txt_sample_comment_single"><![CDATA[comment to timeline post]]></string>
+    <string name="_bx_timeline_txt_sample_vote_single"><![CDATA[vote to timeline post]]></string>
+    <string name="_bx_timeline_ntfs_txt_object_added"><![CDATA[<b class="bx-ntfs-content-profile">{owner_name}</b> added a {entry_sample} <b class="bx-ntfs-content-entry">{entry_caption}</b>]]></string>
+    <string name="_bx_timeline_txt_today"><![CDATA[Today]]></string>
+
+	<string name="_bx_timeline_txt_do_repost"><![CDATA[Repost]]></string>
+	<string name="_bx_timeline_txt_reposted"><![CDATA[Reposted {0}'s {1}.]]></string>
+	<string name="_bx_timeline_txt_reposted_by"><![CDATA[Reposted by]]></string>
+	<string name="_bx_timeline_txt_err_cannot_repost"><![CDATA[Cannot repost. Please report.]]></string>
+	<string name="_bx_timeline_txt_err_already_reposted"><![CDATA[You already reposted the item.]]></string>
+	<string name="_bx_timeline_txt_msg_success_repost"><![CDATA[The item was successfully reposted.]]></string>
+	<string name="_bx_timeline_txt_object_reposted"><![CDATA[<b class="bx-ntfs-content-profile">{owner_name}</b> reposted a {entry_sample} <b class="bx-ntfs-content-entry">{entry_caption}</b>]]></string>
+
+    <!-- EMAIL TEMPLATES -->
+    <string name="_bx_timeline_et_txt_name_send"><![CDATA[Send to Friend.]]></string>
+    <string name="_bx_timeline_et_txt_subject_send"><![CDATA[It may be interesting for you.]]></string>
+    <string name="_bx_timeline_et_txt_body_send"><![CDATA[
+<p>Hello.</p>
+<p>Take a look at <a href="{ViewLink}">this post</a>, it may be interesting for you.</p>]]></string>
+</resources>

+ 64 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/install/sql/disable.sql

@@ -0,0 +1,64 @@
+-- PAGES & BLOCKS
+DELETE FROM `sys_objects_page` WHERE `module` = 'bx_timeline';
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_timeline' OR `object` IN('bx_timeline_view', 'bx_timeline_view_home', 'bx_timeline_item', 'bx_photos_item_brief');
+
+
+-- MENU
+DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_timeline';
+DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_timeline';
+DELETE FROM `sys_menu_items` WHERE `module` = 'bx_timeline' OR `set_name` IN('bx_timeline_menu_item_share', 'bx_timeline_menu_item_manage', 'bx_timeline_menu_item_actions', 'bx_timeline_menu_post_attachments');
+
+
+-- SETTINGS
+SET @iTypeId = (SELECT `ID` FROM `sys_options_types` WHERE `name` = 'bx_timeline' LIMIT 1);
+SET @iCategId = (SELECT `ID` FROM `sys_options_categories` WHERE `type_id` = @iTypeId LIMIT 1);
+DELETE FROM `sys_options` WHERE `category_id` = @iCategId;
+DELETE FROM `sys_options_categories` WHERE `type_id` = @iTypeId;
+DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
+
+
+-- PRIVACY 
+DELETE FROM `sys_objects_privacy` WHERE `module` = 'bx_timeline';
+
+
+-- ACL
+DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Module` = 'bx_timeline';
+DELETE FROM `sys_acl_actions` WHERE `Module` = 'bx_timeline';
+
+
+-- ALERTS
+SET @iHandlerId = (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_timeline' LIMIT 1);
+DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandlerId;
+DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandlerId LIMIT 1;
+
+
+-- COMMENTS
+DELETE FROM `sys_objects_cmts` WHERE `Name` = 'bx_timeline' LIMIT 1;
+
+
+-- VIEWS
+DELETE FROM `sys_objects_view` WHERE `name` = 'bx_timeline' LIMIT 1;
+
+
+-- VOTES
+DELETE FROM `sys_objects_vote` WHERE `Name` = 'bx_timeline' LIMIT 1;
+
+
+-- REPORTS
+DELETE FROM `sys_objects_report` WHERE `Name` = 'bx_timeline' LIMIT 1;
+
+
+-- SEARCH
+DELETE FROM `sys_objects_search` WHERE `ObjectName` IN ('bx_timeline', 'bx_timeline_cmts');
+
+
+-- METATAGS
+DELETE FROM `sys_objects_metatags` WHERE `object` = 'bx_timeline';
+
+
+-- EMAIL TEMPLATES
+DELETE FROM `sys_email_templates` WHERE `Module` = 'bx_timeline';
+
+
+-- CONTENT INFO
+DELETE FROM `sys_objects_content_info` WHERE `name` IN ('bx_timeline', 'bx_timeline_cmts');

+ 260 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/install/sql/enable.sql

@@ -0,0 +1,260 @@
+-- PAGES & BLOCKS
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_timeline_view', '_bx_timeline_page_title_sys_view', '_bx_timeline_page_title_view', 'bx_timeline', 5, 2147483647, 1, 'timeline-view', 'page.php?i=timeline-view', '', '', '', 0, 1, 0, 'BxTimelinePageView', 'modules/boonex/timeline/classes/BxTimelinePageView.php'),
+('bx_timeline_view_home', '_bx_timeline_page_title_sys_view_home', '_bx_timeline_page_title_view_home', 'bx_timeline', 5, 2147483647, 1, 'timeline-view-home', 'page.php?i=timeline-view-home', '', '', '', 0, 1, 0, '', ''),
+
+('bx_timeline_item', '_bx_timeline_page_title_sys_item', '_bx_timeline_page_title_item', 'bx_timeline', 5, 2147483647, 1, 'timeline-item', 'page.php?i=timeline-item', '', '', '', 0, 1, 0, '', ''),
+('bx_timeline_item_brief', '_bx_timeline_page_title_sys_item_brief', '_bx_timeline_page_title_item_brief', 'bx_timeline', 2, 2147483647, 1, 'timeline-item-quick', 'page.php?i=timeline-item-quick', '', '', '', 0, 1, 0, '', '');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('bx_timeline_view', 1, 'bx_timeline', '_bx_timeline_page_block_title_system_post_profile', '_bx_timeline_page_block_title_post_profile', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:14:"get_block_post";}', 0, 0, 1, 1),
+('bx_timeline_view', 1, 'bx_timeline', '_bx_timeline_page_block_title_system_view_profile', '_bx_timeline_page_block_title_view_profile', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:14:"get_block_view";}', 0, 0, 1, 2),
+('bx_timeline_view', 1, 'bx_timeline', '_bx_timeline_page_block_title_system_view_profile_outline', '_bx_timeline_page_block_title_view_profile_outline', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_outline";}', 0, 0, 0, 3),
+
+('bx_timeline_view_home', 1, 'bx_timeline', '_bx_timeline_page_block_title_system_post_home', '_bx_timeline_page_block_title_post_home', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_post_home";}', 0, 0, 1, 1),
+('bx_timeline_view_home', 1, 'bx_timeline', '_bx_timeline_page_block_title_system_view_home', '_bx_timeline_page_block_title_view_home', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_view_home";}', 0, 0, 0, 2),
+('bx_timeline_view_home', 1, 'bx_timeline', '_bx_timeline_page_block_title_system_view_home_outline', '_bx_timeline_page_block_title_view_home_outline', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:27:"get_block_view_home_outline";}', 0, 0, 1, 3),
+
+('bx_timeline_item', 1, 'bx_timeline', '', '_bx_timeline_page_block_title_item', 0, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:14:"get_block_item";}', 0, 0, 1, 1),
+
+('bx_timeline_item_brief', 1, 'bx_timeline', '', '_bx_timeline_page_block_title_item_content', 0, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_item_content";}', 0, 0, 1, 1),
+('bx_timeline_item_brief', 2, 'bx_timeline', '', '_bx_timeline_page_block_title_item_info', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_item_info";}', 0, 0, 1, 1),
+('bx_timeline_item_brief', 2, 'bx_timeline', '', '_bx_timeline_page_block_title_item_comments', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:23:"get_block_item_comments";}', 0, 0, 1, 2);
+
+
+-- PAGES: add page block on dashboard
+SET @iPBCellDashboard = 2;
+SET @iPBOrderDashboard = 1; --(SELECT IFNULL(MAX(`order`), 0) FROM `sys_pages_blocks` WHERE `object` = 'sys_dashboard' AND `cell_id` = @iPBCellDashboard LIMIT 1);
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('sys_dashboard', @iPBCellDashboard, 'bx_timeline', '_bx_timeline_page_block_title_system_post_account', '_bx_timeline_page_block_title_post_account', 11, 2147483644, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_post_account";}', 0, 1, 1, @iPBOrderDashboard),
+('sys_dashboard', @iPBCellDashboard, 'bx_timeline', '_bx_timeline_page_block_title_system_view_account', '_bx_timeline_page_block_title_view_account', 11, 2147483644, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_account";}', 0, 1, 1, @iPBOrderDashboard + 1),
+('sys_dashboard', @iPBCellDashboard, 'bx_timeline', '_bx_timeline_page_block_title_system_view_account_outline', '_bx_timeline_page_block_title_view_account_outline', 11, 2147483644, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:30:"get_block_view_account_outline";}', 0, 1, 0, @iPBOrderDashboard + 1);
+
+-- PAGES: add page block on home
+SET @iPBCellHome = 1;
+SET @iPBOrderHome = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_pages_blocks` WHERE `object` = 'sys_home' AND `cell_id` = @iPBCellHome ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('sys_home', @iPBCellHome, 'bx_timeline', '_bx_timeline_page_block_title_system_post_home', '_bx_timeline_page_block_title_post_home', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_post_home";}', 0, 1, 1, @iPBOrderHome + 1),
+('sys_home', @iPBCellHome, 'bx_timeline', '_bx_timeline_page_block_title_system_view_home', '_bx_timeline_page_block_title_view_home', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:19:"get_block_view_home";}', 0, 1, 0, @iPBOrderHome + 2),
+('sys_home', @iPBCellHome, 'bx_timeline', '_bx_timeline_page_block_title_system_view_home_outline', '_bx_timeline_page_block_title_view_home_outline', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:27:"get_block_view_home_outline";}', 0, 1, 1, @iPBOrderHome + 3);
+
+-- PAGES: add page block to profiles modules (trigger* page objects are processed separately upon modules enable/disable)
+SET @iPBCellProfile = 2;
+SET @iPBCellGroup = 4;
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_timeline', '_bx_timeline_page_block_title_system_post_profile', '_bx_timeline_page_block_title_post_profile', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_post_profile";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 1, 0),
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_timeline', '_bx_timeline_page_block_title_system_view_profile', '_bx_timeline_page_block_title_view_profile', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_profile";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 1, 0),
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_timeline', '_bx_timeline_page_block_title_system_view_profile_outline', '_bx_timeline_page_block_title_view_profile_outline', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:30:"get_block_view_profile_outline";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 0, 0),
+
+('trigger_page_group_view_entry', @iPBCellGroup, 'bx_timeline', '_bx_timeline_page_block_title_system_post_profile', '_bx_timeline_page_block_title_post_profile', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_post_profile";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 1, 0),
+('trigger_page_group_view_entry', @iPBCellGroup, 'bx_timeline', '_bx_timeline_page_block_title_system_view_profile', '_bx_timeline_page_block_title_view_profile', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:22:"get_block_view_profile";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 1, 0),
+('trigger_page_group_view_entry', @iPBCellGroup, 'bx_timeline', '_bx_timeline_page_block_title_system_view_profile_outline', '_bx_timeline_page_block_title_view_profile_outline', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:30:"get_block_view_profile_outline";s:6:"params";a:1:{i:0;s:6:"{type}";}}', 0, 0, 0, 0);
+
+
+-- MENU: Item Share (Repost, Send to Friend, etc)
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_timeline_menu_item_share', '_bx_timeline_menu_title_item_share', 'bx_timeline_menu_item_share', 'bx_timeline', 6, 0, 1, 'BxTimelineMenuItemShare', 'modules/boonex/timeline/classes/BxTimelineMenuItemShare.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_timeline_menu_item_share', 'bx_timeline', '_bx_timeline_menu_set_title_item_share', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+('bx_timeline_menu_item_share', 'bx_timeline', 'item-repost', '_bx_timeline_menu_item_title_system_item_repost', '_bx_timeline_menu_item_title_item_repost', 'javascript:void(0)', 'javascript:{js_onclick_repost}', '_self', 'repeat', '', 2147483647, 1, 0, 1),
+('bx_timeline_menu_item_share', 'bx_timeline', 'item-send', '_bx_timeline_menu_item_title_system_item_send', '_bx_timeline_menu_item_title_item_send', 'page.php?i=start-convo&et={et_send}', '', '_self', 'envelope', '', 2147483647, 1, 0, 2);
+
+-- MENU: Item Manage (Pin, Delete, etc)
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_timeline_menu_item_manage', '_bx_timeline_menu_title_item_manage', 'bx_timeline_menu_item_manage', 'bx_timeline', 6, 0, 1, 'BxTimelineMenuItemManage', 'modules/boonex/timeline/classes/BxTimelineMenuItemManage.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_timeline_menu_item_manage', 'bx_timeline', '_bx_timeline_menu_set_title_item_manage', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_timeline_menu_item_manage', 'bx_timeline', 'item-pin', '_bx_timeline_menu_item_title_system_item_pin', '_bx_timeline_menu_item_title_item_pin', 'javascript:void(0)', 'javascript:{js_object_view}.pinPost(this, {content_id}, 1)', '_self', 'thumb-tack', '', 2147483647, 1, 0, 0),
+('bx_timeline_menu_item_manage', 'bx_timeline', 'item-unpin', '_bx_timeline_menu_item_title_system_item_unpin', '_bx_timeline_menu_item_title_item_unpin', 'javascript:void(0)', 'javascript:{js_object_view}.pinPost(this, {content_id}, 0)', '_self', 'thumb-tack', '', 2147483647, 1, 0, 1),
+('bx_timeline_menu_item_manage', 'bx_timeline', 'item-delete', '_bx_timeline_menu_item_title_system_item_delete', '_bx_timeline_menu_item_title_item_delete', 'javascript:void(0)', 'javascript:{js_object_view}.deletePost(this, {content_id})', '_self', 'remove', '', 2147483647, 1, 0, 2);
+
+-- MENU: Item Actions (Comment, Vote, Share, Report, etc)
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_timeline_menu_item_actions', '_bx_timeline_menu_title_item_actions', 'bx_timeline_menu_item_actions', 'bx_timeline', 15, 0, 1, 'BxTimelineMenuItemActions', 'modules/boonex/timeline/classes/BxTimelineMenuItemActions.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_timeline_menu_item_actions', 'bx_timeline', '_bx_timeline_menu_set_title_item_actions', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `submenu_popup`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES
+('bx_timeline_menu_item_actions', 'bx_timeline', 'item-view', '_bx_timeline_menu_item_title_system_item_view', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 0, 0, 1, 0),
+('bx_timeline_menu_item_actions', 'bx_timeline', 'item-comment', '_bx_timeline_menu_item_title_system_item_comment', '_bx_timeline_menu_item_title_item_comment', 'javascript:void(0)', 'javascript:{comment_onclick}', '_self', 'comment', 'a:3:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:27:"get_menu_item_addon_comment";s:6:"params";a:3:{i:0;s:16:"{comment_system}";i:1;s:16:"{comment_object}";i:2;s:6:"{view}";}}', '', 0, 2147483647, 1, 0, 1, 1),
+('bx_timeline_menu_item_actions', 'bx_timeline', 'item-vote', '_bx_timeline_menu_item_title_system_item_vote', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 2),
+('bx_timeline_menu_item_actions', 'bx_timeline', 'item-share', '_bx_timeline_menu_item_title_system_item_share', '_bx_timeline_menu_item_title_item_share', 'javascript:void(0)', 'bx_menu_popup(''bx_timeline_menu_item_share'', this, {''id'':''bx_timeline_menu_item_share_{content_id}''}, {content_id:{content_id}});', '', 'share-alt', '', 'bx_timeline_menu_item_share', 1, 2147483647, 1, 0, 1, 3),
+('bx_timeline_menu_item_actions', 'bx_timeline', 'item-report', '_bx_timeline_menu_item_title_system_item_report', '', 'javascript:void(0)', '', '', '', '', '', 0, 2147483647, 1, 0, 1, 4),
+('bx_timeline_menu_item_actions', 'bx_timeline', 'item-more', '_bx_timeline_menu_item_title_system_item_more', '_bx_timeline_menu_item_title_item_more', 'javascript:void(0)', 'bx_menu_popup(''bx_timeline_menu_item_manage'', this, {''id'':''bx_timeline_menu_item_manage_{content_id}''}, {content_id:{content_id}});', '', 'ellipsis-h', '', 'bx_timeline_menu_item_manage', 1, 2147483647, 1, 0, 1, 5);
+
+-- MENU: Post form attachments (Link, Photo, Video)
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_timeline_menu_post_attachments', '_bx_timeline_menu_title_post_attachments', 'bx_timeline_menu_post_attachments', 'bx_timeline', 9, 0, 1, '', '');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_timeline_menu_post_attachments', 'bx_timeline', '_bx_timeline_menu_set_title_post_attachments', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES 
+('bx_timeline_menu_post_attachments', 'bx_timeline', 'add-link', '_bx_timeline_menu_item_title_system_add_link', '_bx_timeline_menu_item_title_add_link', 'javascript:void(0)', 'javascript:{js_object}.showAttachLink(this);', '_self', 'link', '', '', 2147483647, 1, 0, 1, 1),
+('bx_timeline_menu_post_attachments', 'bx_timeline', 'add-photo', '_bx_timeline_menu_item_title_system_add_photo', '_bx_timeline_menu_item_title_add_photo', 'javascript:void(0)', 'javascript:{js_object_uploader_photo}.showUploaderForm();', '_self', 'camera', '', '', 2147483647, 1, 0, 1, 2),
+('bx_timeline_menu_post_attachments', 'bx_timeline', 'add-video', '_bx_timeline_menu_item_title_system_add_video', '_bx_timeline_menu_item_title_add_video', 'javascript:void(0)', 'javascript:{js_object_uploader_video}.showUploaderForm();', '_self', 'video-camera', '', '', 2147483647, 1, 0, 1, 3);
+
+-- MENU: add to "add content" menu
+SET @iAddMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_add_content_links' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_add_content_links', 'bx_timeline', 'create-post', '_bx_timeline_menu_item_title_system_create_entry', '_bx_timeline_menu_item_title_create_entry', 'page.php?i=timeline-view', '', '', 'clock-o col-green1', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
+
+-- MENU: add menu item to profiles modules (trigger* menu sets are processed separately upon modules enable/disable)
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('trigger_profile_view_submenu', 'bx_timeline', 'timeline-view', '_bx_timeline_menu_item_title_system_view_timeline_view', '_bx_timeline_menu_item_title_view_timeline_view', 'page.php?i=timeline-view&profile_id={profile_id}', '', '', 'clock-o col-green1', '', 2147483647, 1, 0, 0),
+('trigger_group_view_submenu', 'bx_timeline', 'timeline-view', '_bx_timeline_menu_item_title_system_view_timeline_view', '_bx_timeline_menu_item_title_view_timeline_view', 'page.php?i=timeline-view&profile_id={profile_id}', '', '', 'clock-o col-green1', '', 2147483647, 1, 0, 0);
+
+
+-- SETTINGS
+SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
+INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES 
+('modules', 'bx_timeline', '_bx_timeline', 'bx_timeline@modules/boonex/timeline/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
+SET @iTypeId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_timeline', '_bx_timeline', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_params`, `check_error`, `extra`, `order`) VALUES
+('bx_timeline_enable_delete', 'on', @iCategId, '_bx_timeline_option_enable_delete', 'checkbox', '', '', '', '', 1),
+('bx_timeline_events_per_page_profile', '12', @iCategId, '_bx_timeline_option_events_per_page_profile', 'digit', '', '', '', '', 2),
+('bx_timeline_events_per_page_account', '12', @iCategId, '_bx_timeline_option_events_per_page_account', 'digit', '', '', '', '', 3),
+('bx_timeline_events_per_page_home', '24', @iCategId, '_bx_timeline_option_events_per_page_home', 'digit', '', '', '', '', 4),
+('bx_timeline_events_per_page', '24', @iCategId, '_bx_timeline_option_events_per_page', 'digit', '', '', '', '', 5),
+('bx_timeline_rss_length', '5', @iCategId, '_bx_timeline_option_rss_length', 'digit', '', '', '', '', 6),
+('bx_timeline_events_hide', '', @iCategId, '_bx_timeline_option_events_hide', 'rlist', '', '', '', 'a:2:{s:6:"module";s:11:"bx_timeline";s:6:"method";s:21:"get_actions_checklist";}', 7),
+('bx_timeline_chars_display_max', '300', @iCategId, '_bx_timeline_option_chars_display_max', 'digit', 'GreaterThan', 'a:1:{s:3:"min";i:150;}', '_bx_timeline_option_err_chars_display_max', '', 8);
+
+
+-- PRIVACY 
+INSERT INTO `sys_objects_privacy` (`object`, `module`, `action`, `title`, `default_group`, `table`, `table_field_id`, `table_field_author`, `override_class_name`, `override_class_file`) VALUES
+('bx_timeline_privacy_view', 'bx_timeline', 'view', '_bx_timeline_privacy_view', '3', 'bx_timeline_events', 'id', '', 'BxTimelinePrivacy', 'modules/boonex/timeline/classes/BxTimelinePrivacy.php');
+
+
+-- ACL
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'post', NULL, '_bx_timeline_acl_action_post', '', 1, 3);
+SET @iIdActionPost = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'delete', NULL, '_bx_timeline_acl_action_delete', '', 1, 3);
+SET @iIdActionDelete = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'vote', NULL, '_bx_timeline_acl_action_vote', '', 1, 0);
+SET @iIdActionVote = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'repost', NULL, '_bx_timeline_acl_action_repost', '', 1, 3);
+SET @iIdActionRepost = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'send', NULL, '_bx_timeline_acl_action_send', '', 1, 3);
+SET @iIdActionSend = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_timeline', 'pin', NULL, '_bx_timeline_acl_action_pin', '', 1, 3);
+SET @iIdActionPin = LAST_INSERT_ID();
+
+SET @iUnauthenticated = 1;
+SET @iAccount = 2;
+SET @iStandard = 3;
+SET @iUnconfirmed = 4;
+SET @iPending = 5;
+SET @iSuspended = 6;
+SET @iModerator = 7;
+SET @iAdministrator = 8;
+SET @iPremium = 9;
+
+INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
+
+-- post
+(@iStandard, @iIdActionPost),
+(@iModerator, @iIdActionPost),
+(@iAdministrator, @iIdActionPost),
+(@iPremium, @iIdActionPost),
+
+-- delete
+(@iModerator, @iIdActionDelete),
+(@iAdministrator, @iIdActionDelete),
+
+-- vote
+(@iStandard, @iIdActionVote),
+(@iModerator, @iIdActionVote),
+(@iAdministrator, @iIdActionVote),
+(@iPremium, @iIdActionVote),
+
+-- repost
+(@iStandard, @iIdActionRepost),
+(@iModerator, @iIdActionRepost),
+(@iAdministrator, @iIdActionRepost),
+(@iPremium, @iIdActionRepost),
+
+-- send
+(@iStandard, @iIdActionSend),
+(@iModerator, @iIdActionSend),
+(@iAdministrator, @iIdActionSend),
+(@iPremium, @iIdActionSend),
+
+-- pin
+(@iModerator, @iIdActionPin),
+(@iAdministrator, @iIdActionPin);
+
+
+-- ALERTS
+INSERT INTO `sys_alerts_handlers`(`name`, `class`, `file`, `service_call`) VALUES 
+('bx_timeline', 'BxTimelineResponse', 'modules/boonex/timeline/classes/BxTimelineResponse.php', '');
+SET @iHandler := LAST_INSERT_ID();
+
+INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
+('profile', 'delete', @iHandler);
+
+
+-- COMMENTS
+INSERT INTO `sys_objects_cmts` (`Name`, `Module`, `Table`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Nl2br`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `ObjectVote`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
+('bx_timeline', 'bx_timeline', 'bx_timeline_comments', 1, 5000, 1000, 0, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=timeline-item&id={object_id}', '', 'bx_timeline_events', 'id', 'object_id', 'title', 'comments', 'BxTimelineCmts', 'modules/boonex/timeline/classes/BxTimelineCmts.php');
+
+
+-- VIEWS
+INSERT INTO `sys_objects_view` (`name`, `table_track`, `period`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_timeline', 'bx_timeline_views_track', '86400', '1', 'bx_timeline_events', 'id', 'object_id', 'views', '', '');
+
+
+-- VOTES
+INSERT INTO `sys_objects_vote`(`Name`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES 
+('bx_timeline', 'bx_timeline_votes', 'bx_timeline_votes_track', '604800', '1', '1', '0', '1', 'bx_timeline_events', 'id', 'object_id', 'rate', 'votes', 'BxTimelineVote', 'modules/boonex/timeline/classes/BxTimelineVote.php');
+
+
+-- REPORTS
+INSERT INTO `sys_objects_report` (`name`, `table_main`, `table_track`, `is_on`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_timeline', 'bx_timeline_reports', 'bx_timeline_reports_track', '1', 'page.php?i=timeline-item&id={object_id}', 'bx_timeline_events', 'id', 'owner_id', 'reports',  'BxTimelineReport', 'modules/boonex/timeline/classes/BxTimelineReport.php');
+
+
+-- SEARCH
+SET @iSearchOrder = (SELECT IFNULL(MAX(`Order`), 0) FROM `sys_objects_search`);
+INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `ClassPath`) VALUES
+('bx_timeline', '_bx_timeline', @iSearchOrder + 1, 'BxTimelineSearchResult', 'modules/boonex/timeline/classes/BxTimelineSearchResult.php'),
+('bx_timeline_cmts', '_bx_timeline_cmts', @iSearchOrder + 2, 'BxTimelineCmtsSearchResult', 'modules/boonex/timeline/classes/BxTimelineCmtsSearchResult.php');
+
+
+-- METATAGS
+INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
+('bx_timeline', 'bx_timeline_meta_keywords', 'bx_timeline_meta_locations', 'bx_timeline_meta_mentions', '', '');
+
+
+-- EMAIL TEMPLATES
+INSERT INTO `sys_email_templates` (`Module`, `NameSystem`, `Name`, `Subject`, `Body`) VALUES 
+('bx_timeline', '_bx_timeline_et_txt_name_send', 'bx_timeline_send', '_bx_timeline_et_txt_subject_send', '_bx_timeline_et_txt_body_send');
+
+
+-- CONTENT INFO
+INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
+('bx_timeline', '_bx_timeline', 'bx_timeline', 'post_common', '', 'delete', '', ''),
+('bx_timeline_cmts', '_bx_timeline_cmts', 'bx_timeline', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');

+ 360 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/install/sql/install.sql

@@ -0,0 +1,360 @@
+SET @sName = 'bx_timeline';
+SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
+
+-- TABLES
+CREATE TABLE IF NOT EXISTS `bx_timeline_events` (
+  `id` int(11) NOT NULL auto_increment,
+  `owner_id` int(11) unsigned NOT NULL default '0',
+  `type` varchar(255) NOT NULL,
+  `action` varchar(255) NOT NULL,
+  `object_id` text NOT NULL,
+  `object_privacy_view` int(11) NOT NULL default '3',
+  `content` text NOT NULL,
+  `title` varchar(255) NOT NULL,
+  `description` text NOT NULL,
+  `views` int(11) unsigned NOT NULL default '0',
+  `rate` float NOT NULL default '0',
+  `votes` int(11) unsigned NOT NULL default '0',
+  `comments` int(11) unsigned NOT NULL default '0',
+  `reports` int(11) unsigned NOT NULL default '0',
+  `reposts` int(11) unsigned NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  `active` tinyint(4) NOT NULL default '1',
+  `hidden` tinyint(4) NOT NULL default '0',
+  `pinned` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `owner_id` (`owner_id`),
+  FULLTEXT KEY `search_fields` (`title`, `description`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_timeline_handlers` (
+  `id` int(11) NOT NULL auto_increment,
+  `group` varchar(64) NOT NULL default '',
+  `type` enum('insert','update','delete') NOT NULL DEFAULT 'insert',
+  `alert_unit` varchar(64) NOT NULL default '',
+  `alert_action` varchar(64) NOT NULL default '',
+  `content` text NOT NULL,
+  `privacy` varchar(64) NOT NULL default '',
+  PRIMARY KEY  (`id`),
+  UNIQUE `handler` (`group`, `type`),
+  UNIQUE `alert` (`alert_unit`, `alert_action`)
+);
+
+INSERT INTO `bx_timeline_handlers`(`group`, `type`, `alert_unit`, `alert_action`, `content`) VALUES
+('common_post', 'insert', 'timeline_common_post', '', ''),
+('common_repost', 'insert', 'timeline_common_repost', '', ''),
+('profile', 'delete', 'profile', 'delete', '');
+
+-- TABLES: STORAGES, TRANSCODERS, UPLOADERS
+CREATE TABLE IF NOT EXISTS `bx_timeline_photos` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_timeline_photos_processed` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_timeline_photos2events` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `event_id` int(11) NOT NULL DEFAULT '0',
+  `media_id` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `media` (`event_id`, `media_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_timeline_videos` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_timeline_videos_processed` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_timeline_videos2events` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `event_id` int(11) NOT NULL DEFAULT '0',
+  `media_id` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `media` (`event_id`, `media_id`)
+);
+
+-- TABLES: LINKS
+CREATE TABLE IF NOT EXISTS `bx_timeline_links` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `media_id` int(11) NOT NULL DEFAULT '0',
+  `url` varchar(255) NOT NULL,
+  `title` varchar(255) NOT NULL,
+  `text` text NOT NULL,
+  `added` int(11) NOT NULL,
+  PRIMARY KEY (`id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_timeline_links2events` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `event_id` int(11) NOT NULL DEFAULT '0',
+  `link_id` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `link` (`event_id`, `link_id`)
+);
+
+-- TABLES: REPOSTS
+CREATE TABLE IF NOT EXISTS `bx_timeline_reposts_track` (
+  `event_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `reposted_id` int(11) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  UNIQUE KEY `event_id` (`event_id`),
+  KEY `repost` (`reposted_id`, `author_nip`)
+);
+
+-- TABLES: COMMENTS
+CREATE TABLE IF NOT EXISTS `bx_timeline_comments` (
+  `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
+  `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_object_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_level` int(11) NOT NULL DEFAULT '0',
+  `cmt_text` text NOT NULL,
+  `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
+  `cmt_replies` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`cmt_id`),
+  KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
+  FULLTEXT KEY `search_fields` (`cmt_text`)
+);
+
+-- TABLE: views
+CREATE TABLE IF NOT EXISTS `bx_timeline_views_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `viewer_id` int(11) NOT NULL default '0',
+  `viewer_nip` int(11) unsigned NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
+);
+
+-- TABLES: VOTES
+CREATE TABLE IF NOT EXISTS `bx_timeline_votes` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  `sum` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_timeline_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`)
+);
+
+-- TABLE: metas
+CREATE TABLE IF NOT EXISTS `bx_timeline_meta_keywords` (
+  `object_id` int(10) unsigned NOT NULL,
+  `keyword` varchar(255) NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `keyword` (`keyword`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_timeline_meta_locations` (
+  `object_id` int(10) unsigned NOT NULL,
+  `lat` double NOT NULL,
+  `lng` double NOT NULL,
+  `country` varchar(2) NOT NULL,
+  `state` varchar(255) NOT NULL,
+  `city` varchar(255) NOT NULL,
+  `zip` varchar(255) NOT NULL,
+  `street` varchar(255) NOT NULL,
+  `street_number` varchar(255) NOT NULL,
+  PRIMARY KEY (`object_id`),
+  KEY `country_state_city` (`country`,`state`(8),`city`(8))
+);
+
+CREATE TABLE IF NOT EXISTS `bx_timeline_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
+-- TABLE: reports
+CREATE TABLE IF NOT EXISTS `bx_timeline_reports` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_timeline_reports_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',
+  `type` varchar(32) NOT NULL default '',
+  `text` text NOT NULL default '',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `report` (`object_id`, `author_nip`)
+);
+
+
+-- STORAGES, TRANSCODERS, UPLOADERS
+INSERT INTO `sys_objects_uploader` (`object`, `active`, `override_class_name`, `override_class_file`) VALUES
+('bx_timeline_simple_photo', 1, 'BxTimelineUploaderSimplePhoto', 'modules/boonex/timeline/classes/BxTimelineUploaderSimplePhoto.php'),
+('bx_timeline_simple_video', 1, 'BxTimelineUploaderSimpleVideo', 'modules/boonex/timeline/classes/BxTimelineUploaderSimpleVideo.php');
+
+INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `cache_control`, `levels`, `table_files`, `ext_mode`, `ext_allow`, `ext_deny`, `quota_size`, `current_size`, `quota_number`, `current_number`, `max_file_size`, `ts`) VALUES
+('bx_timeline_photos', @sStorageEngine, '', 360, 2592000, 3, 'bx_timeline_photos', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
+('bx_timeline_photos_processed', @sStorageEngine, '', 360, 2592000, 3, 'bx_timeline_photos_processed', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
+
+('bx_timeline_videos', @sStorageEngine, '', 360, 2592000, 3, 'bx_timeline_videos', 'allow-deny', 'avi,flv,mpg,mpeg,wmv,mp4,m4v,mov,divx,xvid,3gp,webm,jpg', '', 0, 0, 0, 0, 0, 0),
+('bx_timeline_videos_processed', @sStorageEngine, '', 360, 2592000, 3, 'bx_timeline_videos_processed', 'allow-deny', 'avi,flv,mpg,mpeg,wmv,mp4,m4v,mov,divx,xvid,3gp,webm,jpg', '', 0, 0, 0, 0, 0, 0);
+
+INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`, `override_class_name`, `override_class_file`) VALUES
+('bx_timeline_photos_preview', 'bx_timeline_photos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_photos";}', 'no', '1', '2592000', '0', '', ''),
+('bx_timeline_photos_view', 'bx_timeline_photos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_photos";}', 'no', '1', '2592000', '0', '', ''),
+('bx_timeline_photos_big', 'bx_timeline_photos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_photos";}', 'no', '1', '2592000', '0', '', ''),
+
+('bx_timeline_videos_poster', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
+('bx_timeline_videos_mp4', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
+('bx_timeline_videos_webm', 'bx_timeline_videos_processed', 'Storage', 'a:1:{s:6:"object";s:18:"bx_timeline_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', '');
+
+INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES
+('bx_timeline_photos_preview', 'Resize', 'a:3:{s:1:"w";s:3:"100";s:1:"h";s:3:"100";s:13:"square_resize";s:1:"1";}', '0'),
+('bx_timeline_photos_view', 'Resize', 'a:3:{s:1:"w";s:3:"318";s:1:"h";s:3:"318";s:13:"square_resize";s:1:"1";}', '0'),
+('bx_timeline_photos_big', 'Resize', 'a:2:{s:1:"w";s:4:"1280";s:1:"h";s:4:"1280";}', '0'),
+
+('bx_timeline_videos_poster', 'Poster', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"jpg";}', 0),
+('bx_timeline_videos_mp4', 'Mp4', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"mp4";}', 0),
+('bx_timeline_videos_webm', 'Webm', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:4:"webm";}', 0);
+
+
+-- Forms -> Post
+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_post', @sName, '_bx_timeline_form_post', '', '', 'do_submit', 'bx_timeline_events', 'id', '', '', '', 0, 1, 'BxTimelineFormPost', 'modules/boonex/timeline/classes/BxTimelineFormPost.php');
+
+INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
+('bx_timeline_post_add', @sName, 'bx_timeline_post', '_bx_timeline_form_post_display_add', 0),
+('bx_timeline_post_add_public', @sName, 'bx_timeline_post', '_bx_timeline_form_post_display_add_public', 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_post', @sName, 'type', 'post', '', 0, 'hidden', '_bx_timeline_form_post_input_sys_type', '', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
+('bx_timeline_post', @sName, 'action', '', '', 0, 'hidden', '_bx_timeline_form_post_input_sys_action', '', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
+('bx_timeline_post', @sName, 'owner_id', '0', '', 0, 'hidden', '_bx_timeline_form_post_input_sys_owner_id', '', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0),
+('bx_timeline_post', @sName, 'text', '', '', 0, 'textarea', '_bx_timeline_form_post_input_sys_text', '_bx_timeline_form_post_input_text', '', 0, 0, 3, 'a:1:{s:12:"autocomplete";s:3:"off";}', '', '', '', '', '', 'XssHtml', '', 1, 0),
+('bx_timeline_post', @sName, 'object_privacy_view', '', '', 0, 'custom', '_bx_timeline_form_post_input_sys_object_privacy_view', '_bx_timeline_form_post_input_object_privacy_view', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_timeline_post', @sName, 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_timeline_post', @sName, 'link', '', '', 0, 'custom', '_bx_timeline_form_post_input_sys_link', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_timeline_post', @sName, 'photo', 'a:1:{i:0;s:24:"bx_timeline_simple_photo";}', 'a:1:{s:24:"bx_timeline_simple_photo";s:26:"_sys_uploader_simple_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:1:{i:0;s:24:"bx_timeline_simple_video";}', 'a:1:{s:24:"bx_timeline_simple_video";s:26:"_sys_uploader_simple_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, 'attachments', '', '', 0, 'custom', '_bx_timeline_form_post_input_sys_attachments', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_timeline_post', @sName, 'do_submit', '_bx_timeline_form_post_input_do_submit', '', 0, 'submit', '_bx_timeline_form_post_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0);
+
+INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
+('bx_timeline_post_add', 'type', 2147483647, 1, 1),
+('bx_timeline_post_add', 'action', 2147483647, 1, 2),
+('bx_timeline_post_add', 'owner_id', 2147483647, 1, 3),
+('bx_timeline_post_add', 'text', 2147483647, 1, 4),
+('bx_timeline_post_add', 'object_privacy_view', 2147483647, 1, 5),
+('bx_timeline_post_add', 'location', 2147483647, 1, 6),
+('bx_timeline_post_add', 'link', 2147483647, 1, 7),
+('bx_timeline_post_add', 'photo', 2147483647, 1, 8),
+('bx_timeline_post_add', 'video', 2147483647, 1, 9),
+('bx_timeline_post_add', 'attachments', 2147483647, 1, 10),
+('bx_timeline_post_add', 'do_submit', 2147483647, 1, 11),
+
+('bx_timeline_post_add_public', 'type', 2147483647, 1, 1),
+('bx_timeline_post_add_public', 'action', 2147483647, 1, 2),
+('bx_timeline_post_add_public', 'owner_id', 2147483647, 1, 3),
+('bx_timeline_post_add_public', 'text', 2147483647, 1, 4),
+('bx_timeline_post_add_public', 'object_privacy_view', 2147483647, 1, 5),
+('bx_timeline_post_add_public', 'location', 2147483647, 1, 6),
+('bx_timeline_post_add_public', 'link', 2147483647, 1, 7),
+('bx_timeline_post_add_public', 'photo', 2147483647, 1, 8),
+('bx_timeline_post_add_public', 'video', 2147483647, 1, 9),
+('bx_timeline_post_add_public', 'attachments', 2147483647, 1, 10),
+('bx_timeline_post_add_public', 'do_submit', 2147483647, 1, 11);
+
+-- 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
+('bx_timeline_attach_link', @sName, '_bx_timeline_form_attach_link', '', '', 'do_submit', 'bx_timeline_links', 'id', '', '', '', 0, 1, '', '');
+
+INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
+('bx_timeline_attach_link_add', @sName, 'bx_timeline_attach_link', '_bx_timeline_form_attach_link_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_attach_link', @sName, 'url', '', '', 0, 'text', '_bx_timeline_form_attach_link_input_sys_url', '_bx_timeline_form_attach_link_input_url', '', 0, 0, 0, '', '', '', 'Preg', 'a:1:{s:4:"preg";s:0:"";}', '_bx_timeline_form_attach_link_input_url_err', '', '', 0, 0),
+('bx_timeline_attach_link', @sName, 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
+('bx_timeline_attach_link', @sName, 'do_submit', '_bx_timeline_form_attach_link_input_do_submit', '', 0, 'submit', '_bx_timeline_form_attach_link_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
+('bx_timeline_attach_link', @sName, 'do_cancel', '_bx_timeline_form_attach_link_input_do_cancel', '', 0, 'button', '_bx_timeline_form_attach_link_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_attach_link_add', 'url', 2147483647, 1, 1),
+('bx_timeline_attach_link_add', 'controls', 2147483647, 1, 2),
+('bx_timeline_attach_link_add', 'do_submit', 2147483647, 1, 3),
+('bx_timeline_attach_link_add', 'do_cancel', 2147483647, 1, 4);
+
+
+-- STUDIO PAGE & WIDGET
+INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
+(3, 'bx_timeline', '_bx_timeline', '_bx_timeline', 'bx_timeline@modules/boonex/timeline/|std-icon.svg');
+SET @iPageId = LAST_INSERT_ID();
+
+SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
+SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
+INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
+(@iPageId, 'bx_timeline', '{url_studio}module.php?name=bx_timeline', '', 'bx_timeline@modules/boonex/timeline/|std-icon.svg', '_bx_timeline', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
+INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
+(@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));

+ 53 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/install/sql/uninstall.sql

@@ -0,0 +1,53 @@
+SET @sName = 'bx_timeline';
+
+DROP TABLE IF EXISTS `bx_timeline_events`;
+DROP TABLE IF EXISTS `bx_timeline_handlers`;
+
+DROP TABLE IF EXISTS `bx_timeline_photos`;
+DROP TABLE IF EXISTS `bx_timeline_photos_processed`;
+DROP TABLE IF EXISTS `bx_timeline_photos2events`;
+
+DROP TABLE IF EXISTS `bx_timeline_videos`;
+DROP TABLE IF EXISTS `bx_timeline_videos_processed`;
+DROP TABLE IF EXISTS `bx_timeline_videos2events`;
+
+DROP TABLE IF EXISTS `bx_timeline_links`;
+DROP TABLE IF EXISTS `bx_timeline_links2events`;
+
+DROP TABLE IF EXISTS `bx_timeline_reposts_track`;
+
+DROP TABLE IF EXISTS `bx_timeline_comments`;
+
+DROP TABLE IF EXISTS `bx_timeline_views_track`;
+
+DROP TABLE IF EXISTS `bx_timeline_votes`;
+DROP TABLE IF EXISTS `bx_timeline_votes_track`;
+
+DROP TABLE IF EXISTS `bx_timeline_meta_keywords`;
+DROP TABLE IF EXISTS `bx_timeline_meta_locations`;
+DROP TABLE IF EXISTS `bx_timeline_meta_mentions`;
+
+DROP TABLE IF EXISTS `bx_timeline_reports`;
+DROP TABLE IF EXISTS `bx_timeline_reports_track`;
+
+
+-- STORAGES, TRANSCODERS, UPLOADERS
+DELETE FROM `sys_objects_uploader` WHERE `object` LIKE 'bx_timeline%';
+DELETE FROM `sys_objects_storage` WHERE `object`  LIKE 'bx_timeline%';
+DELETE FROM `sys_objects_transcoder` WHERE `object`  LIKE 'bx_timeline%';
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` LIKE 'bx_timeline%';
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` LIKE 'bx_timeline%';
+DELETE FROM `sys_transcoder_videos_files` WHERE `transcoder_object` LIKE 'bx_timeline%';
+
+
+
+-- Forms All
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN  (SELECT `display_name` FROM `sys_form_displays` WHERE `module` = @sName);
+DELETE FROM `sys_form_inputs` WHERE `module` = @sName;
+DELETE FROM `sys_form_displays` WHERE `module` = @sName;
+DELETE FROM `sys_objects_form` WHERE `module` = @sName;
+
+-- STUDIO PAGE & WIDGET
+DELETE FROM `tp`, `tw`, `tpw`
+USING `sys_std_pages` AS `tp`, `sys_std_widgets` AS `tw`, `sys_std_pages_widgets` AS `tpw`
+WHERE `tp`.`id` = `tw`.`page_id` AND `tw`.`id` = `tpw`.`widget_id` AND `tp`.`name` = @sName;

+ 249 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/js/main.js

@@ -0,0 +1,249 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+function BxTimelineMain() {
+	this.sIdPost = '#bx-timeline-post';
+
+	this.sIdView = '#bx-timeline-';
+	this.sIdViewTimeline = '#bx-timeline-timeline';
+	this.sIdViewOutline = '#bx-timeline-outline';
+	this.sIdItem = '#bx-timeline-item-';
+	this.sIdItemTimeline = '#bx-timeline-item-timeline-';
+	this.sIdItemOutline = '#bx-timeline-item-outline-';
+
+	this.sSP = 'bx-tl';
+	this.sClassView = this.sSP + '-view';
+	this.sClassMasonry = this.sSP + '-masonry';
+	this.sClassItems = this.sSP + '-items';
+	this.sClassItem = this.sSP + '-item';
+	this.sClassDividerToday = this.sSP + '-divider-today';
+	this.sClassItemComments = this.sSP + '-item-comments-holder';
+	this.sClassItemImages = this.sSP + '-item-images';
+	this.sClassItemImage = this.sSP + '-item-image';
+
+	this.oViewTimeline = null;
+	this.bViewTimeline = false;
+
+	this.oViewOutline = null;
+	this.bViewOutline = false;
+}
+
+BxTimelineMain.prototype.isMasonry = function() {
+	return $(this.sIdViewOutline + ' .' + this.sClassItems).hasClass(this.sClassMasonry);
+};
+
+BxTimelineMain.prototype.isMasonryEmpty = function() {
+	return $(this.sIdViewOutline + ' .' + this.sClassItems + ' .' + this.sClassItem).length == 0;
+};
+
+BxTimelineMain.prototype.initMasonry = function(onComplete) {
+	var $this = this;
+	var oHolder = $(this.sIdViewOutline + ' .' + this.sClassItems);
+
+	var oItems = oHolder.find('.' + this.sClassItem);
+	if(oItems.length == 0) 
+		return;
+
+	oItems.resize(function(){
+		$this.reloadMasonry();
+	}).find('.bx-tl-item-text .bx-tl-content').checkOverflowHeight(this.sSP + '-overflow', function(oElement) {
+		$this.onFindOverflow(oElement);
+	});
+
+	oHolder.addClass(this.sClassMasonry).masonry({
+	  itemSelector: '.' + this.sClassItem,
+	  columnWidth: '.' + this.sSP + '-grid-sizer'
+	}).masonry('once', 'layoutComplete', function() {
+		if(typeof onComplete === 'function')
+			onComplete(oItems);
+	});
+};
+
+BxTimelineMain.prototype.destroyMasonry = function() {
+	$(this.sIdViewOutline + ' .' + this.sClassItems).removeClass(this.sClassMasonry).masonry('destroy');
+};
+
+BxTimelineMain.prototype.appendMasonry = function(oItems, onComplete) {
+	var $this = this;
+	var oItems = $(oItems);
+	oItems.resize(function(){
+		$this.reloadMasonry();
+	}).find('iframe').load(function() {
+		$this.reloadMasonry();
+	}).find('img.' + this.sSP + '-item-image').load(function() {
+		$this.reloadMasonry();
+	});
+
+	var oHolder = $(this.sIdViewOutline + ' .' + this.sClassItems).masonry('layout').append(oItems);
+	if(!this.isMasonry())
+		this.initMasonry(onComplete);
+	else
+		oHolder.masonry('appended', oItems).masonry('layout').masonry('once', 'layoutComplete', function() {
+			if(typeof onComplete === 'function')
+				onComplete(oItems);
+		});
+};
+
+BxTimelineMain.prototype.prependMasonry = function(oItems, onComplete) {
+	var $this = this;
+	var oItems = $(oItems);
+	oItems.resize(function(){
+		$this.reloadMasonry();
+	}).find('iframe').load(function() {
+		$this.reloadMasonry();
+	}).find('img.' + this.sSP + '-item-image').load(function() {
+		$this.reloadMasonry();
+	});
+
+	var oHolder = $(this.sIdViewOutline + ' .' + this.sClassItems).masonry('layout').prepend(oItems);
+	if(!this.isMasonry())
+		this.initMasonry(onComplete);
+	else
+		oHolder.masonry('prepended', oItems).masonry('layout').masonry('once', 'layoutComplete', function() {
+			if(typeof onComplete === 'function')
+				onComplete(oItems);
+		});
+};
+
+BxTimelineMain.prototype.removeMasonry = function(oItems, onRemove) {
+	var $this = this;
+	var oItems = $(oItems);
+
+	var oHolder = $(this.sIdViewOutline + ' .' + this.sClassItems);
+	if(typeof onRemove === 'function')
+		oHolder.masonry('once', 'removeComplete', onRemove);
+
+	oHolder.masonry('remove', oItems).masonry('layout');
+};
+
+BxTimelineMain.prototype.reloadMasonry = function() {
+	$(this.sIdViewOutline + ' .' + this.sClassItems).masonry('reloadItems').masonry('layout');
+};
+
+BxTimelineMain.prototype.initFlickity = function() {
+	var $this = this;
+
+	$('.' + this.sClassItem + ' .' + this.sClassItemImages).each(function() {
+		if($(this).find('.' + $this.sClassItemImage).length <= 1)
+			return;
+
+		$(this).flickity({
+			cellSelector: 'div.' + $this.sClassItemImage,
+			cellAlign: 'left',
+			pageDots: false,
+			imagesLoaded: true
+		});
+	});
+};
+
+BxTimelineMain.prototype.onFindOverflow = function(oElement) {
+	$(oElement).after($(oElement).parents('.' + this.sClassView + ':first').find('.' + this.sSP + '-content-show-more:hidden:first').clone().show());
+};
+
+BxTimelineMain.prototype.loadingInButton = function(e, bShow) {
+	if($(e).length)
+		bx_loading_btn($(e), bShow);
+	else
+		bx_loading($('body'), bShow);	
+};
+
+BxTimelineMain.prototype.loadingInItem = function(e, bShow) {
+	var oParent = $('body');
+	if($(e).length)
+		oParent = !$(e).hasClass(this.sClassItem) ? $(e).parents('.' + this.sClassItem + ':first') : $(e);
+
+	bx_loading(oParent, bShow);
+};
+
+BxTimelineMain.prototype.loadingInBlock = function(e, bShow) {
+	var oParent = $(e).length ? $(e).parents('.bx-db-container:first') : $('body'); 
+	bx_loading(oParent, bShow);
+};
+
+BxTimelineMain.prototype.loadingInPopup = function(e, bShow) {
+	var oParent = $(e).length ? $(e).parents('.bx-popup-content:first') : $('body'); 
+	bx_loading(oParent, bShow);
+};
+
+BxTimelineMain.prototype.loadingIn = function(e, bShow) {
+	var oElement = $(e);
+	var bElement = oElement.length > 0;
+
+	if(bElement && oElement.hasClass('bx-btn'))
+		this.loadingInButton(e, bShow);
+	else if(bElement && (oElement.hasClass(this.sClassItem) || oElement.parents('.' + this.sClassItem + ':first').length > 0))
+		this.loadingInItem(e, bShow);
+	else if(bElement && oElement.parents('.bx-popup-content:first').length > 0)
+		this.loadingInPopup(e, bShow);
+	else if(bElement && oElement.parents('.bx-db-container:first').length > 0)
+		this.loadingInBlock(e, bShow);
+	else 
+		bx_loading($('body'), bShow);
+};
+
+BxTimelineMain.prototype._loading = function(e, bShow) {
+	var oParent = $(e).length ? $(e) : $('body'); 
+	bx_loading(oParent, bShow);
+};
+
+BxTimelineMain.prototype._getView = function(oElement) {
+	oElement = $(oElement);
+
+	var oView = oElement;
+	if(!oView.hasClass(this.sClassView))
+		oView = oElement.parents('.' + this.sClassView + ':first');
+
+	if(!oView.hasClass(this.sClassView))
+		oView = oElement.parents('.bx-page-block-container:first').find('.' + this.sClassView + ':first');
+
+	if(oView.hasClass(this.sClassView + '-item'))
+		return 'item';
+
+	if(oView.hasClass(this.sClassView + '-timeline'))
+		return 'timeline';
+
+	if(oView.hasClass(this.sClassView + '-outline'))
+		return 'outline';
+
+	if(oView.hasClass(this.sClassView + '-search'))
+		return 'search';
+
+	return '';
+};
+
+BxTimelineMain.prototype._getDefaultData = function(oElement) {
+	var oDate = new Date();
+	var sView = oElement != undefined ? this._getView(oElement) : '';
+
+    return jQuery.extend({}, this._oRequestParams[sView.length > 0 ? sView : 'general'], {
+    	view: sView,
+		_t:oDate.getTime()
+    });
+};
+
+(function($) {
+    $.fn.checkOverflowHeight = function(sClass, onFind) {
+    	if(!sClass)
+    		sClass = 'bx-overflow';
+
+        return this.each(function() {
+            var oElement = $(this);
+            if(oElement.hasClass(sClass) || oElement.css('overflow') != 'hidden')
+            	return;
+
+            if(oElement.prop('scrollHeight') <= oElement.height())
+            	return;
+
+            oElement.addClass(sClass);
+            if(typeof onFind === 'function')
+            	onFind(oElement);
+        });
+    };
+})(jQuery);

+ 285 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/js/post.js

@@ -0,0 +1,285 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+function BxTimelinePost(oOptions) {
+	this._sActionsUri = oOptions.sActionUri;
+    this._sActionsUrl = oOptions.sActionUrl;
+    this._sObjName = oOptions.sObjName == undefined ? 'oTimelinePost' : oOptions.sObjName;
+    this._iOwnerId = oOptions.iOwnerId == undefined ? 0 : parseInt(oOptions.iOwnerId);
+    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'slide' : oOptions.sAnimationEffect;
+    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
+    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
+    this._oRequestParams = {
+    	timeline: null,
+    	outline: null,
+    	general: oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams
+    };
+
+    var $this = this;
+    $(document).ready(function () {
+    	$($this.sIdPost + ' form').each(function() {
+    		var sId = $(this).attr('id');
+    		$this.initFormPost(sId);
+    	});
+	});
+}
+
+BxTimelinePost.prototype = new BxTimelineMain();
+
+BxTimelinePost.prototype.initFormPost = function(sFormId)
+{
+	var $this = this;
+	var oForm = $('#' + sFormId);
+
+	autosize(oForm.find('textarea'));
+	oForm.ajaxForm({
+        dataType: "json",
+        beforeSubmit: function (formData, jqForm, options) {
+        	window[$this._sObjName].beforeFormPostSubmit(oForm);
+        },
+        success: function (oData) {
+        	window[$this._sObjName].afterFormPostSubmit(oForm, oData);
+        }
+    });
+};
+
+BxTimelinePost.prototype.beforeFormPostSubmit = function(oForm)
+{
+	this.loadingInButton($(oForm).children().find(':submit'), true);
+};
+
+BxTimelinePost.prototype.afterFormPostSubmit = function (oForm, oData)
+{
+	var $this = this;
+	var fContinue = function() {
+		if(oData && oData.id != undefined) {
+			var iId = parseInt(oData.id);
+	        if(iId <= 0) 
+	        	return;
+
+	        if($('#' + $this._aHtmlIds['main_timeline']).length)
+	        	$this._getPost(oForm, iId, 'timeline');
+
+	        if($('#' + $this._aHtmlIds['main_outline']).length)
+	        	$this._getPost(oForm, iId, 'outline');
+
+	        $this._getForm(oForm, $(oForm).find("input[name = 'type']").val());
+
+	        return;
+		}
+
+		if(oData && oData.form != undefined && oData.form_id != undefined) {
+			$('#' + oData.form_id).replaceWith(oData.form);
+			$this.initFormPost(oData.form_id);
+
+			return;
+		}
+	};
+
+	this.loadingInButton($(oForm).children().find(':submit'), false);
+
+	if(oData && oData.message != undefined)
+        bx_alert(oData.message, fContinue);
+	else
+		fContinue();
+};
+
+BxTimelinePost.prototype.initFormAttachLink = function(sFormId)
+{
+	var $this = this;
+	var oForm = $('#' + sFormId);
+
+	oForm.ajaxForm({
+        dataType: "json",
+        clearForm: true,
+        beforeSubmit: function (formData, jqForm, options) {
+        	window[$this._sObjName].beforeFormAttachLinkSubmit(oForm);
+        },
+        success: function (oData) {
+        	window[$this._sObjName].afterFormAttachLinkSubmit(oForm, oData);
+        }
+    });
+};
+
+BxTimelinePost.prototype.beforeFormAttachLinkSubmit = function(oForm)
+{
+	this.loadingInButton($(oForm).children().find(':submit'), true);
+};
+
+BxTimelinePost.prototype.afterFormAttachLinkSubmit = function (oForm, oData)
+{
+	var $this = this;
+	var fContinue = function() {
+		if(oData && oData.item != undefined) {
+			$('#' + $this._aHtmlIds['attach_link_popup']).dolPopupHide({onHide: function() {
+				$(oForm).find('.bx-form-warn').hide();
+			}});
+
+			if(!$.trim(oData.item).length)
+				return;
+
+			var oItem = $(oData.item).hide();
+			$('#' + $this._aHtmlIds['attach_link_form_field']).prepend(oItem).find('#' + oItem.attr('id')).bx_anim('show', $this._sAnimationEffect, $this._sAnimationSpeed, function() {
+				$(this).find('a.bx-link').dolConverLinks();
+			});
+
+	        return;
+		}
+
+		if(oData && oData.form != undefined && oData.form_id != undefined) {
+			$('#' + oData.form_id).replaceWith(oData.form);
+			$this.initFormAttachLink(oData.form_id);
+
+			return;
+		}
+	};
+
+	this.loadingInButton($(oForm).find(':submit'), false);
+
+	if(oData && oData.message != undefined)
+        bx_alert(oData.message, fContinue);
+	else
+		fContinue();
+};
+
+BxTimelinePost.prototype.deleteAttachLink = function(oLink, iId) {
+	var $this = this;
+    var oData = this._getDefaultData();
+    oData['id'] = iId;
+
+    var oAttachLink = $('#' + this._aHtmlIds['attach_link_item'] + iId);
+    bx_loading(oAttachLink, true);
+    
+    jQuery.post (
+        this._sActionsUrl + 'delete_attach_link/',
+        oData,
+        function(oData) {
+        	var fContinue = function() {
+        		if(oData && oData.code != undefined && oData.code == 0) {
+            		oAttachLink.bx_anim('hide', $this._sAnimationEffect, $this._sAnimationSpeed, function() {
+            			$(this).remove;
+            		});
+            	}
+        	};
+
+        	bx_loading(oAttachLink, false);
+
+        	if(oData && oData.message != undefined)
+                bx_alert(oData.message, fContinue);
+        	else
+        		fContinue();
+        },
+        'json'
+    );
+
+	return false;
+};
+
+BxTimelinePost.prototype.showAttachLink = function(oLink) {
+	var oData = this._getDefaultData();    
+
+    $(window).dolPopupAjax({
+		id: {value: this._aHtmlIds['attach_link_popup'], force: true},
+		url: bx_append_url_params(this._sActionsUri + 'get_attach_link_form/', oData),
+		closeOnOuterClick: false
+	});
+
+	return false;
+};
+
+BxTimelinePost.prototype._getForm = function(oElement, sType) {
+    var $this = this;
+    var oData = this._getDefaultData();
+
+    jQuery.post (
+	    this._sActionsUrl + 'get_post_form/' + sType + '/',
+	    oData,
+	    function(oData) {
+            if(oData && oData.form != undefined && oData.form_id != undefined) {
+                $('#' + oData.form_id).replaceWith(oData.form);
+                $this.initFormPost(oData.form_id);
+            }
+	    },
+	    'json'
+	);
+};
+
+BxTimelinePost.prototype._getPost = function(oElement, iId, sView) {
+    var $this = this;
+    var oData = this._getDefaultData();
+    oData['id'] = iId;
+    oData['view'] = sView;
+
+    var oElementView = $('#' + this._aHtmlIds['main_' + sView]);
+    this.loadingInBlock(oElementView, true);
+
+    jQuery.post (
+        this._sActionsUrl + 'get_post/',
+        oData,
+        function(oData) {
+        	$this.loadingInBlock(oElementView, false);
+
+        	processJsonData(oData);
+        },
+        'json'
+    );
+};
+
+BxTimelinePost.prototype._onGetPost = function(oData) {
+	if(!$.trim(oData.item).length) 
+		return;
+
+	var $this = this;
+	var oView = $('#' + this._aHtmlIds['main_' + oData.view]);
+
+	var oLoadMore = oView.find('.' + this.sSP + '-load-more');
+	if(!oLoadMore.is(':visible'))
+		oLoadMore.show();
+
+	var oEmpty = oView.find('.' + this.sSP + '-empty');
+	if(oEmpty.is(':visible'))
+		oEmpty.hide();
+
+	var oContent = $(oData.item).bxTime();
+	switch(oData.view) {
+		case 'timeline':
+			var oItem = null;
+			var oItems = $('#' + this._aHtmlIds['main_timeline'] + ' ' + '.' + this.sClassItems);
+			var oDivider  = oItems.find('.' + this.sClassDividerToday);
+			var bDivider = oDivider.length > 0;
+
+			if(bDivider && !oDivider.is(':visible'))
+				oDivider.show();
+
+			oContent.hide();
+
+			oItem = bDivider ? oDivider.after(oContent).next('.' + this.sClassItem + ':hidden') : oContent.prependTo(oItems);
+			oItem.bx_anim('show', this._sAnimationEffect, this._iAnimationSpeed, function() {
+				$(this).find('a.bx-link').dolConverLinks();
+				$(this).find('.bx-tl-item-text .bx-tl-content').checkOverflowHeight($this.sSP + '-overflow', function(oElement) {
+					$this.onFindOverflow(oElement);
+				});
+
+				$this.initFlickity();
+			});
+			break;
+
+		case 'outline':
+			this.prependMasonry(oContent, function(oItems) {
+				$(oItems).find('a.bx-link').dolConverLinks();
+				$(oItems).find('.bx-tl-item-text .bx-tl-content').checkOverflowHeight($this.sSP + '-overflow', function(oElement) {
+					$this.onFindOverflow(oElement);
+				});
+
+				$this.initFlickity();
+			});
+			break;
+	}
+};

+ 414 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/js/view.js

@@ -0,0 +1,414 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Timeline Timeline
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+function BxTimelineView(oOptions) {
+	this._sActionsUri = oOptions.sActionUri;
+    this._sActionsUrl = oOptions.sActionUrl;
+    this._sObjName = oOptions.sObjName == undefined ? 'oTimelineView' : oOptions.sObjName;
+    this._iOwnerId = oOptions.iOwnerId == undefined ? 0 : oOptions.iOwnerId;
+    this._sReferrer = oOptions.sReferrer == undefined ? '' : oOptions.sReferrer;
+    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'slide' : oOptions.sAnimationEffect;
+    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
+    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
+    this._oRequestParams = {
+    	timeline: null,
+    	outline: null,
+    	general: oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams
+    };
+
+    this._fOutsideOffset = 0.8;
+
+    var $this = this;
+    $(document).ready(function() {
+    	$this.init();
+    });
+}
+
+BxTimelineView.prototype = new BxTimelineMain();
+
+BxTimelineView.prototype.init = function() {
+	var $this = this;
+
+	this.oViewTimeline = $('#' + this._aHtmlIds['main_timeline']);
+	this.bViewTimeline = this.oViewTimeline.length > 0;
+
+	this.oViewOutline = $('#' + this._aHtmlIds['main_outline']);
+	this.bViewOutline = this.oViewOutline.length > 0;	
+
+	if(this.bViewTimeline) {
+		this._oRequestParams['timeline'] = jQuery.extend({}, this._oRequestParams['general']);
+
+		var oItems = this.oViewTimeline.find('.' + this.sClassItem);
+		oItems.find('.bx-tl-item-text .bx-tl-content').checkOverflowHeight(this.sSP + '-overflow', function(oElement) {
+			$this.onFindOverflow(oElement);
+		});
+
+		//--- Hide timeline Events which are outside the viewport
+		this.hideEvents(oItems, this._fOutsideOffset);
+
+		//on scolling, show/animate timeline Events when enter the viewport
+		$(window).on('scroll', function() {
+			if(!window.requestAnimationFrame) 
+				setTimeout(function() {
+					$this.showEvents(oItems, $this._fOutsideOffset);
+				}, 100);
+			else
+				window.requestAnimationFrame(function() {
+					$this.showEvents(oItems, $this._fOutsideOffset);
+				});
+		});
+	}
+
+	if(this.bViewOutline) {
+		this._oRequestParams['outline'] = jQuery.extend({}, this._oRequestParams['general']);
+
+    	this.initMasonry();
+
+    	this.oViewOutline.find('.' + this.sClassItem).resize(function() {
+    		$this.reloadMasonry();
+    	});
+    	this.oViewOutline.find('img.' + this.sClassItemImage).load(function() {
+    		$this.reloadMasonry();
+    	});
+	}
+
+	this.initFlickity();
+};
+
+BxTimelineView.prototype.hideEvents = function(oEvents, fOffset) {
+	oEvents.each(function() {
+		( $(this).offset().top > $(window).scrollTop() + $(window).height() * fOffset ) && $(this).find('.bx-tl-item-type, .bx-tl-item-cnt').addClass('is-hidden');
+	});
+};
+
+BxTimelineView.prototype.showEvents = function(oEvents, fOffset) {
+	oEvents.each(function() {
+		( $(this).offset().top <= $(window).scrollTop() + $(window).height() * fOffset && $(this).find('.bx-tl-item-type').hasClass('is-hidden') ) && $(this).find('.bx-tl-item-type, .bx-tl-item-cnt').removeClass('is-hidden').addClass('bounce-in');
+	});
+};
+
+BxTimelineView.prototype.changePage = function(oLink, iStart, iPerPage) {
+	var $this = this;
+	var sView = this._getView(oLink);
+
+	this.loadingInButton(oLink, true);
+
+	this._oRequestParams[sView].start = iStart;
+    this._oRequestParams[sView].per_page = iPerPage;
+    this._getPosts(oLink, function(oData) {
+    	$this.loadingInButton(oLink, false);
+
+    	var oView = null;
+    	var sItems = $.trim(oData.items);
+    	switch(sView) {
+    		case 'timeline':
+    			oView = $this.oViewTimeline;
+    			oView.find('.' + $this.sClassItems).append($(sItems).hide()).find('.' + $this.sClassItem + ':hidden').bx_anim('show', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
+					$(this).bxTime();
+
+					$this.initFlickity();
+			    });
+    			break;
+
+    		case 'outline':
+    			oView = $this.oViewOutline;
+    			$this.appendMasonry($(sItems).bxTime(), function() {
+    				$this.initFlickity();
+    			});
+    			break;
+    	}
+
+    	if(oView && oData && oData.load_more != undefined)
+    		oView.find('.' + $this.sSP + '-load-more-holder').html($.trim(oData.load_more));
+
+    	if(oView && oData && oData.back != undefined)
+    		oView.find('.' + $this.sSP + '-back-holder').html($.trim(oData.back));
+
+    	if(oData && oData.empty != undefined)
+			oView.find('.' + $this.sSP + '-empty-holder').html($.trim(oData.empty));
+    });
+};
+
+BxTimelineView.prototype.changeFilter = function(oLink) {
+	var sView = this._getView(oLink);
+
+    var sId = $(oLink).attr('id');
+    sId = sId.substr(sId.lastIndexOf('-') + 1, sId.length);
+
+    this.loadingInBlock(oLink, true);
+
+    this._oRequestParams[sView].start = 0;
+    this._oRequestParams[sView].filter = sId;
+    this._getPosts(oLink);
+};
+
+BxTimelineView.prototype.changeTimeline = function(oLink, iYear) {
+	var sView = this._getView(oLink);
+
+	this.loadingInBlock(oLink, true);
+
+	this._oRequestParams[sView].start = 0;
+    this._oRequestParams[sView].timeline = iYear;
+	this._getPosts(oLink);
+};
+
+BxTimelineView.prototype.showMore = function(oLink) {
+	var sView = this._getView(oLink);
+	var sClassOverflow = this.sSP + '-overflow';
+
+	$(oLink).parents('.' + this.sClassItem + ':first').find('.' + sClassOverflow).css('max-height', 'none').removeClass(sClassOverflow);
+	$(oLink).parents('.' + this.sSP + '-content-show-more:first').remove();
+
+	switch(sView) {
+		case 'timeline':
+			break;
+	
+		case 'outline':
+			this.reloadMasonry();
+			break;
+	}	
+};
+
+BxTimelineView.prototype.showItem = function(oLink, iId, sMode, oParams) {
+	var sView = this._getView(oLink);
+	var oData = $.extend({}, this._getDefaultData(), {id: iId, mode: sMode}, (oParams != undefined ? oParams : {}));
+
+	$(".bx-popup-full-screen.bx-popup-applied:visible").dolPopupHide();
+
+	$(window).dolPopupAjax({
+		id: {value: this._aHtmlIds['item_popup_' + sView] + iId, force: true},
+		url: bx_append_url_params(this._sActionsUrl + 'get_item_brief', oData),
+		removeOnClose: true,
+		fullScreen: true
+	});
+
+	return false;
+};
+
+BxTimelineView.prototype.commentItem = function(oLink, sSystem, iId) {
+	var $this = this;
+    var oData = this._getDefaultData(oLink);
+    oData['system'] = sSystem;
+    oData['id'] = iId;
+
+    var oComments = $(oLink).parents('.' + this.sClassItem + ':first').find('.' + this.sClassItemComments);
+    if(oComments.children().length > 0) {
+    	oComments.bx_anim('toggle', this._sAnimationEffect, this._iAnimationSpeed);
+    	return;
+    }
+
+    if(oLink)
+    	this.loadingInItem(oLink, true);
+
+    jQuery.get (
+        this._sActionsUrl + 'get_comments',
+        oData,
+        function(oData) {
+        	if(oLink)
+        		$this.loadingInItem(oLink, false);
+
+        	if(!oData.content)
+        		return;
+
+        	oComments.html($(oData.content).hide()).children(':hidden').bxTime().bx_anim('show', $this._sAnimationEffect, $this._iAnimationSpeed);
+        },
+        'json'
+    );
+};
+
+BxTimelineView.prototype.pinPost = function(oLink, iId, iWay) {
+	var $this = this;
+    var oData = this._getDefaultData();
+    oData['id'] = iId;
+
+    $(oLink).parents('.bx-popup-applied:first:visible').dolPopupHide({
+		onHide: function(oPopup) {
+			$(oPopup).remove();
+		}
+	});
+
+    if(this.bViewTimeline)
+    	this.loadingInItem($(this.sIdItemTimeline + iId), true);
+
+    if(this.bViewOutline)
+    	this.loadingInItem($(this.sIdItemOutline + iId), true);
+
+    $.post(
+        this._sActionsUrl + 'pin/',
+        oData,
+        function(oData) {
+        	processJsonData(oData);
+        },
+        'json'
+    );
+};
+
+BxTimelineView.prototype.onPinPost = function(oData) {
+	var $this = this;
+
+	//--- Pin on Timeline (if available)
+	if(this.bViewTimeline) {
+		var sItemTimeline = this.sIdItemTimeline + oData.id;
+
+		this._oRequestParams['timeline'].start = 0;
+        this._getPosts(this.oViewTimeline, function(oData) {
+        	$(sItemTimeline).bx_anim('hide', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
+    	        $(this).remove();
+
+    	        processJsonData(oData);
+        	});
+        });
+	}
+
+	//--- Pin on Outline (if available)
+	if(this.bViewOutline) {
+		var sItemOutline = this.sIdItemOutline + oData.id;
+
+		this._oRequestParams['outline'].start = 0;
+        this._getPosts(this.oViewOutline, function(oData) {
+        	$this.removeMasonry(sItemOutline, function() {
+        		processJsonData(oData);
+    		});
+        });
+	}
+};
+
+BxTimelineView.prototype.deletePost = function(oLink, iId) {
+    var $this = this;
+    var oData = this._getDefaultData();
+    oData['id'] = iId;
+
+    $(oLink).parents('.bx-popup-applied:first:visible').dolPopupHide();
+
+    if(this.bViewTimeline)
+    	this.loadingInItem($(this.sIdItemTimeline + iId), true);
+
+    if(this.bViewOutline)
+    	this.loadingInItem($(this.sIdItemOutline + iId), true);
+
+    $.post(
+        this._sActionsUrl + 'delete/',
+        oData,
+        function(oData) {
+        	processJsonData(oData);
+        },
+        'json'
+    );
+};
+
+BxTimelineView.prototype.onDeletePost = function(oData) {
+	var $this = this;
+
+	//--- Delete from 'Timeline' (if available)
+	if(this.bViewTimeline) {
+		$(this.sIdItemTimeline + oData.id).bx_anim('hide', this._sAnimationEffect, this._iAnimationSpeed, function() {
+	        $(this).remove();
+
+	        if($this.oViewTimeline.find('.' + $this.sClassItem).length == 0) {
+	        	$this.oViewTimeline.find('.' + $this.sClassDividerToday).hide();
+	        	$this.oViewTimeline.find('.' + $this.sSP + '-load-more').hide();
+	        	$this.oViewTimeline.find('.' + $this.sSP + '-empty').show();
+	        }
+	    });
+
+		return;
+	}
+
+	//--- Delete from 'Outline' (if available)
+	if(this.bViewOutline) {
+		$(this.sIdItemOutline + oData.id).bx_anim('hide', this._sAnimationEffect, this._iAnimationSpeed, function() {
+	        $(this).remove();
+
+	        if($this.oViewOutline.find('.' + $this.sClassItem).length == 0) {
+	        	$this.destroyMasonry();
+
+	        	$this.oViewOutline.find('.' + $this.sSP + '-load-more').hide();
+	        	$this.oViewOutline.find('.' + $this.sSP + '-empty').show();
+	        } 
+	        else
+	        	$this.reloadMasonry();
+	    });
+
+		return;
+	}
+
+	//--- Delete from 'View Item' page.
+	if(this._sReferrer.length != 0)
+		document.location = this._sReferrer;
+};
+
+BxTimelineView.prototype._getPosts = function(oElement, onComplete) {
+	var $this = this;
+	var oData = this._getDefaultData(oElement);
+
+	jQuery.get(
+        this._sActionsUrl + 'get_posts/',
+        oData,
+        function(oData) {
+        	if(typeof onComplete === 'function')
+        		return onComplete(oData);
+
+        	$this.loadingInBlock(oElement, false);
+
+        	processJsonData(oData);
+        },
+        'json'
+    );
+};
+
+BxTimelineView.prototype._onGetPosts = function(oData) {
+	var $this = this;
+	var oView = $('#' + this._aHtmlIds['main_' + oData.view]);
+
+	var onComplete = function() {
+		if(oData && oData.load_more != undefined)
+			oView.find('.' + $this.sSP + '-load-more-holder').html($.trim(oData.load_more));
+
+		if(oData && oData.back != undefined)
+			oView.find('.' + $this.sSP + '-back-holder').html($.trim(oData.back));
+
+		if(oData && oData.empty != undefined)
+			oView.find('.' + $this.sSP + '-empty-holder').html($.trim(oData.empty));
+	};
+
+	if(oData && oData.items != undefined) {
+		var sItems = $.trim(oData.items);
+
+		switch(oData.view) {
+			case 'timeline':
+				oView.find('.' + this.sClassItems).bx_anim('hide', this._sAnimationEffect, this._iAnimationSpeed, function() {
+					$(this).html(sItems).show().bxTime();
+
+					$this.initFlickity();
+
+					onComplete();
+			    });
+				break;
+
+			case 'outline':
+				oView.find('.' + this.sClassItems).bx_anim('hide', this._sAnimationEffect, this._iAnimationSpeed, function() {
+			        $(this).html(sItems).show().bxTime();
+
+			        if($this.isMasonry())
+			        	$this.destroyMasonry();
+
+			        if(!$this.isMasonryEmpty())
+			        	$this.initMasonry();
+
+			        $this.initFlickity();
+
+			        onComplete();
+			    });
+				break;
+		}
+	}
+
+	
+};

+ 9 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/template/block_item_content.html

@@ -0,0 +1,9 @@
+<div class="__style_prefix__-bview-content">
+	<div class="__style_prefix__-bview-cnt">
+        <bx_if:show_image>
+            <div class="__style_prefix__-bview-image">
+                <img src="__src__" />
+            </div>
+        </bx_if:show_image>
+	</div>
+</div>

+ 5 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/template/block_item_info.html

@@ -0,0 +1,5 @@
+<div class="__style_prefix__-bview-info">
+	<div class="__style_prefix__-bview-cnt">
+        __author__
+	</div>
+</div>

+ 13 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/template/block_view.html

@@ -0,0 +1,13 @@
+<div id="__html_id__" class="__style_prefix__-view __style_prefix__-view-__view__ bx-def-bc-margin">
+	<div class="__style_prefix__-cnt">
+        <div class="__style_prefix__-back-holder">__back__</div>
+        <div class="__style_prefix__-empty-holder">__empty__</div>
+        <div class="__style_prefix__-items-wrapper">
+            <div class="__style_prefix__-items bx-def-margin-sec-leftright-neg">__content__</div>
+        </div>
+		<div class="__style_prefix__-load-more-holder">__load_more__</div>
+	</div>
+	__show_more__
+	__view_image_popup__
+    __js_content__
+</div>

+ 330 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/template/css/view.css

@@ -0,0 +1,330 @@
+/*--- General section ---*/
+
+
+/*--- View Block Style ---*/
+div.bx-tl-view {
+	position: relative;
+}
+.bx-tl-grid-sizer {
+	width: 100%;
+}
+.bx-tl-view-sizer {
+	width: 100%;
+}
+.bx-tl-view-sizer div.bx-tl-item-ind {
+	padding: 0px;
+}
+div.bx-tl-items-wrapper {
+	position: relative;
+}
+
+/*--- Back Style ---*/
+
+
+/*--- Load More Style ---*/
+div.bx-tl-view-timeline div.bx-tl-load-more {
+	padding-top: 0px;
+}
+
+div.bx-tl-jump-to {
+	position: relative;
+	float: right;
+	line-height: 36px;
+	line-height: 2.25rem;
+}
+
+
+/*--- Divider Styles ---*/
+div.bx-tl-divider {
+    position: relative;
+}
+
+div.bx-tl-divider-cnt {
+    position: relative;
+    box-sizing: border-box;
+
+    width: 100%;
+
+    border: 2px solid rgba(0, 0, 0, 0.1);
+    border-radius: 20px;
+    -moz-border-radius: 20px;
+    -webkit-border-radius: 20px;
+    background-color: rgba(0, 0, 0, 0.1);
+    
+    text-align: center;
+    text-transform: uppercase;
+    font-weight: bold;
+    color: #ffffff;
+}
+
+/*--- Item Style ---*/
+div.bx-tl-item,
+div.bx-tl-item-cnt {
+    position: relative;
+}
+
+/*--- Item Owner Style ---*/
+div.bx-tl-item div.bx-tl-item-owner {
+    position: relative;
+	text-align: left;
+}
+div.bx-tl-item div.bx-tl-owner-avatar {
+    position: absolute;
+    top: 0px;
+    left: 0px;
+}
+div.bx-tl-item div.bx-tl-owner-info {
+    display: -webkit-flex;
+    display: flex;
+    -webkit-align-items: center;
+    align-items: center;
+}
+div.bx-tl-item div.bx-tl-owner-name {
+    text-overflow: ellipsis;
+    overflow: hidden;
+}
+div.bx-tl-item div.bx-tl-owner-name a.bx-tl-owner-name,
+div.bx-tl-item div.bx-tl-owner-name a.bx-tl-timeline-owner-name {
+    font-weight: 700;
+}
+div.bx-tl-item div.bx-tl-owner-name .bx-tl-date,
+div.bx-tl-item div.bx-tl-owner-name .bx-tl-pinned .sys-icon {
+    color: rgba(40, 60, 80, 0.5);
+}
+div.bx-tl-item div.bx-tl-owner-name .bx-tl-pinned .sys-icon {
+    cursor: default;
+}
+
+/*--- Item Content Style ---*/
+div.bx-tl-item-content {
+	position: relative;
+    text-align: left;
+}
+div.bx-tl-item-content div.bx-tl-title {
+	text-overflow: ellipsis;
+    overflow: hidden;
+}
+div.bx-tl-item-content div.bx-tl-content iframe {
+	width: 100%;
+}
+div.bx-tl-item-text div.bx-tl-content {
+	position: relative;
+    max-height: 200px;
+
+	text-overflow: ellipsis;
+    overflow: hidden;
+}
+div.bx-tl-item-text div.bx-tl-content.bx-tl-overflow {
+    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
+}
+div.bx-tl-item-text div.bx-tl-content-show-more {
+    position: relative;
+
+    text-transform: lowercase;
+    text-align: center;
+}
+
+/*--- Item Images Style ---*/
+div.bx-tl-item div.bx-tl-item-images {
+    position: relative;
+    white-space: nowrap;
+    overflow: hidden;
+}
+div.bx-tl-item div.bx-tl-item-image {
+    display: inline-block;
+}
+
+div.bx-tl-item div.bx-tl-item-activity .bx-menu-custom li > span {
+	margin-right: 1.25rem;
+} 
+
+
+/*--- Item Style: Timeline ---*/
+div.bx-tl-view-timeline div.bx-tl-items:before {
+    content: '';
+    position: absolute;
+    top: 0px;
+    left: 18px;
+    left: 1.125rem;
+    width: 4px;
+    height: 100%;
+
+    background: rgba(0, 0, 0, 0.1);
+}
+div.bx-tl-view-timeline div.bx-tl-items,
+div.bx-tl-view-search div.bx-tl-items,
+div.bx-tl-view-item div.bx-tl-items {
+	margin-left: 0px;
+	margin-right: 0px;
+}
+div.bx-tl-view-timeline div.bx-tl-item,
+div.bx-tl-view-search div.bx-tl-item,
+div.bx-tl-view-item div.bx-tl-item {
+    position: relative;
+}
+div.bx-tl-view-timeline div.bx-tl-item-type {
+	position: absolute;
+    top: 0px;
+    left: 0px;
+}
+div.bx-tl-view-timeline div.bx-tl-item-circle {
+	width: 40px;
+    width: 2.5rem;
+    height: 40px;
+    height: 2.5rem;
+
+	background-color: #ffffff;
+	background-clip: padding-box;
+	border-radius: 5rem;
+	box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.1);
+
+    text-align: center;
+    color: #999999;
+	
+	overflow: hidden;
+}
+div.bx-tl-view-timeline div.bx-tl-item-circle .sys-icon {
+	display: block;
+
+	margin-left: auto;
+	margin-right: auto;
+
+	width: 40px;
+    width: 2.5rem;
+    height: 40px;
+    height: 2.5rem;
+
+	text-align: center;
+
+	line-height: 38px;
+	line-height: 2.375rem;
+    font-size: 20px;
+	font-size: 1.25rem;
+}
+
+
+/*--- Item Style: Outline ---*/
+div.bx-tl-view-outline div.bx-tl-item {
+	position: relative;
+}
+div.bx-tl-view-outline div.bx-tl-item-ind {
+	position: relative;
+}
+div.bx-tl-view-outline div.bx-tl-item-cnt {
+	overflow: hidden;
+}
+
+/*+++ Item Text +++*/
+div.bx-tl-view-outline div.bx-tl-item-text div.bx-tl-title {
+	font-weight: bold;
+}
+div.bx-tl-view-outline div.bx-tl-content-show-more a {
+	font-weight: bold;
+}
+
+/*+++ Item Image +++*/
+div.bx-tl-view-timeline div.bx-tl-item-images,
+div.bx-tl-view-search div.bx-tl-item-images,
+div.bx-tl-view-item div.bx-tl-item-images {
+	margin-left: 0px;
+	margin-right: 0px;
+}
+div.bx-tl-view-timeline div.bx-tl-item-image,
+div.bx-tl-view-search div.bx-tl-item-image,
+div.bx-tl-view-item div.bx-tl-item-image {
+	margin-right: 2px;
+	margin-right: 0.125rem;
+}
+div.bx-tl-view-outline div.bx-tl-item-image {
+	width: 100%;
+    text-align: center;
+    overflow: hidden;
+}
+div.bx-tl-view-timeline div.bx-tl-item-image img,
+div.bx-tl-view-search div.bx-tl-item-image img,
+div.bx-tl-view-item div.bx-tl-item-image img {
+	height: 12.5rem;
+}
+div.bx-tl-view-outline div.bx-tl-item-image img {
+	max-width: 100%;
+	min-height: 12.5rem;
+	max-height: 18.4375rem;
+	object-fit: cover;
+	object-position: center center;
+}
+
+/*+++ Item Link +++*/
+div.bx-tl-view-outline div.bx-tl-item-link {
+	text-align: center;
+}
+div.bx-tl-view-outline div.bx-tl-il-thumbnail img {
+	width: 100%;
+	max-width: 100px;
+	height: 100%;
+	max-height: 100px;
+}
+div.bx-tl-view-outline div.bx-tl-il-embed iframe,
+div.bx-tl-view-timeline div.bx-tl-il-embed iframe {
+    width: 100%;
+    height: auto;
+}
+
+/*+++ Item Reposted +++*/
+div.bx-tl-view-outline div.bx-tl-reposted div.bx-tl-item-text {
+	padding-left: 5px;
+	padding-left: 0.3rem;
+
+	border-left: 1px solid #999999;
+	border-left: 0.07rem solid #999999;
+}
+div.bx-tl-view-outline div.bx-tl-reposted div.bx-tl-title {
+	font-size: 1.0rem;
+}
+div.bx-tl-view-outline div.bx-tl-reposted div.bx-tl-title a {
+	color: #999999;
+}
+div.bx-tl-view-outline div.bx-tl-reposted div.bx-tl-content {
+	font-size: 0.875rem;
+	color: #999999;
+}
+
+
+/*--- Item Brief Style ---*/
+div.bx-tl-bview-image {
+	text-align: center;
+}
+div.bx-tl-bview-image img {
+	max-width: 100%;
+}
+
+
+/*--- Empty Style ---*/
+div.bx-tl-empty div.bx-msg-box-container {
+	margin-top: 0px;
+	margin-bottom: 0px;
+}
+
+
+/*--- Comments Styles ---*/
+div.bx-tl-item-comments-holder .cmt.bx-def-box {
+	border-width: 0px;
+}
+div.bx-tl-item-comments-holder .bx-def-thumb-size {
+	width: 32px;
+	width: 2rem;
+	height: 32px;
+	height: 2rem;
+
+	line-height: 32px;
+	line-height: 2rem;
+}
+div.bx-tl-item-comments-holder .bx-def-thumb-size-left-indent {
+	margin-left: 3.25rem;
+}
+div.bx-tl-item-comments-holder .bx-def-thumb-size-min-height {
+    min-height: 2rem;
+}
+div.bx-tl-item-comments-holder .cmts.cmts-margin {
+	font-size: 12px;
+	font-size: 0.75rem;
+}

+ 1 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/template/show_more.html

@@ -0,0 +1 @@
+<div class="__style_prefix__-content-show-more bx-def-padding-thd-top bx-def-font-small" style="display:none;"><a href="javascript:void(0)" onclick="__js_object__.showMore(this);"><bx_text:_see_more /></a></div>

+ 45 - 0
modules/boonex/timeline/updates/9.0.6_9.0.7/source/template/type_post.html

@@ -0,0 +1,45 @@
+<bx_if:show_images>
+    <div class="__style_prefix__-item-images bx-def-margin-topbottom bx-def-margin-leftright-neg">
+        <bx_repeat:images>
+            <div class="__style_prefix__-item-image">__image__</div>
+        </bx_repeat:images>
+    </div>
+</bx_if:show_images>
+<bx_if:show_videos>
+    <div class="__style_prefix__-item-videos bx-def-margin-top bx-def-margin-leftright-neg">
+        <bx_repeat:videos>
+            <div class="__style_prefix__-item-video bx-def-margin-top-auto">__video__</div>
+        </bx_repeat:videos>
+    </div>
+</bx_if:show_videos>
+<div class="__style_prefix__-item-text">
+	<bx_if:show_title>
+		<div class="__style_prefix__-title bx-def-margin-sec-bottom bx-def-font-h3">__title__</div>
+	</bx_if:show_title>
+	<bx_if:show_content>
+		<div class="__style_prefix__-content">__item_content__</div>
+	</bx_if:show_content>
+	<bx_if:show_content_raw>__item_content_raw__</bx_if:show_content_raw>
+</div>
+<bx_if:show_links>
+	<div class="__style_prefix__-item-links bx-def-margin-top">
+		<bx_repeat:links>
+	   		<div class="__style_prefix__-item-link bx-def-margin-top-auto bx-def-padding-sec bx-def-border">
+				<bx_if:show_embed_outer>
+				    <div class="__style_prefix__-il-embed">__embed__</div>
+				</bx_if:show_embed_outer>
+                <bx_if:show_embed_inner>
+		   			<bx_if:show_thumbnail>
+		   				<div class="__style_prefix__-il-thumbnail">
+		   					<img src="__thumbnail__" />
+		   				</div>
+		   			</bx_if:show_thumbnail>
+		   			<div class="__style_prefix__-il-title">__link__</div>
+		   			<bx_if:show_text>
+		   				<div class="__style_prefix__-il-text bx-def-font-small bx-def-font-grayed">__text__</div>
+		   			</bx_if:show_text>
+                </bx_if:show_embed_inner>
+	   		</div>
+	   	</bx_repeat:links>
+	</div>
+</bx_if:show_links>

+ 31 - 0
modules/boonex/twitter_connect/updates/9.0.3_9.0.4/source/classes/BxTwitterStudioPage.php

@@ -0,0 +1,31 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    TwitterConnect Twitter Connect
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxTwitterStudioPage extends BxTemplStudioModule
+{
+    function __construct($sModule = "", $sPage = "")
+    {
+        parent::__construct($sModule, $sPage);
+
+        $this->aMenuItems = array(
+            array('name' => 'settings', 'icon' => 'cogs', 'title' => '_adm_lmi_cpt_settings'),
+            array('name' => 'help', 'icon' => 'question', 'title' => '_sys_connect_information'),
+        );
+    }
+
+    function getHelp ()
+    {
+        $oModule = BxDolModule::getInstance('bx_twitter'); 
+        return _t('_bx_twitter_information_block', BX_DOL_URL_ROOT . $oModule -> _oConfig -> getBaseUri() . 'handle');
+    }
+}
+
+/** @} */

+ 68 - 0
modules/boonex/twitter_connect/updates/9.0.3_9.0.4/source/install/config.php

@@ -0,0 +1,68 @@
+<?php 
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    TwitterConnect Twitter Connect
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_twitter',
+    'title' => 'Twitter connect',
+    'note' => 'Join the site using Twitter account.',
+    'version' => '9.0.4',
+    'vendor' => 'Boonex',
+    'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC5'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/twitter_connect/',
+    'home_uri' => 'twitter',
+
+    'db_prefix' => 'bx_twitter_',
+    'class_prefix' => 'BxTwitter',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Twitter Connect',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+);
+
+/** @} */

+ 30 - 0
modules/boonex/una_connect/updates/9.0.1_9.0.2/source/classes/BxUnaConStudioPage.php

@@ -0,0 +1,30 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaConnect UNA Connect
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxUnaConStudioPage extends BxTemplStudioModule
+{
+    function __construct($sModule = "", $sPage = "")
+    {
+        parent::__construct($sModule, $sPage);
+
+        $this->aMenuItems = array(
+            array('name' => 'settings', 'icon' => 'cogs', 'title' => '_adm_lmi_cpt_settings'),
+            array('name' => 'help', 'icon' => 'question', 'title' => '_sys_connect_information'),
+        );
+    }
+
+    function getHelp ()
+    {
+        return _t('_bx_unacon_information_block', BX_DOL_URL_ROOT);
+    }
+}
+
+/** @} */

+ 68 - 0
modules/boonex/una_connect/updates/9.0.1_9.0.2/source/install/config.php

@@ -0,0 +1,68 @@
+<?php 
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    UnaConnect UNA Connect
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_unacon',
+    'title' => 'UNA connect',
+    'note' => 'Join the site using another UNA site account credentials.',
+    'version' => '9.0.2',
+    'vendor' => 'Boonex',
+    'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC5'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/una_connect/',
+    'home_uri' => 'unacon',
+
+    'db_prefix' => 'bx_unacon_',
+    'class_prefix' => 'BxUnaCon',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'UNA Connect',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+);
+
+/** @} */

+ 8 - 9
modules/boonex/videos/updates/9.0.0_9.0.1/install/sql/install.sql

@@ -1,3 +1,11 @@
+-- TABLES
+CREATE TABLE IF NOT EXISTS `bx_videos_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
 -- TABLE: bx_videos_cmts
 
 ALTER TABLE `bx_videos_cmts` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -160,15 +168,6 @@ REPAIR TABLE `bx_videos_votes_track`;
 OPTIMIZE TABLE `bx_videos_votes_track`;
 
 
--- TABLES
-CREATE TABLE IF NOT EXISTS `bx_videos_meta_mentions` (
-  `object_id` int(10) unsigned NOT NULL,
-  `profile_id` int(10) unsigned NOT NULL,
-  KEY `object_id` (`object_id`),
-  KEY `profile_id` (`profile_id`)
-);
-
-
 -- FORMS
 UPDATE `sys_objects_form` SET `submit_name`='a:2:{i:0;s:9:"do_submit";i:1;s:10:"do_publish";}' WHERE `object`='bx_videos';
 

+ 121 - 0
modules/boonex/videos/updates/9.0.0_9.0.1/source/classes/BxVideosModule.php

@@ -0,0 +1,121 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Videos module
+ */
+class BxVideosModule extends BxBaseModTextModule
+{
+    function __construct(&$aModule)
+    {
+        parent::__construct($aModule);
+    }
+
+    /**
+     * @page service Service Calls
+     * @section bx_videos Videos
+     * @subsection bx_videos-page_blocks Page Blocks
+     * @subsubsection bx_videos-entity_video_block entity_video_block
+     * 
+     * @code bx_srv('bx_videos', 'entity_video_block', [...]); @endcode
+     * 
+     * Get page block with video player.
+     *
+     * @param $iContentId (optional) video ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return HTML string with block content to display on the site or false if there is no enough input data. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxVideosModule::serviceEntityVideoBlock
+     */
+    /** 
+     * @ref bx_videos-entity_video_block "entity_video_block"
+     */
+    public function serviceEntityVideoBlock ($iContentId = 0)
+    {
+        $mixedContent = $this->_getContent($iContentId);
+        if($mixedContent === false)
+            return false;
+
+        list($iContentId, $aContentInfo) = $mixedContent;
+
+        return $this->_oTemplate->entryVideo($aContentInfo);
+    }
+
+	/**
+     * @page service Service Calls
+     * @section bx_videos Videos
+     * @subsection bx_videos-page_blocks Page Blocks
+     * @subsubsection bx_videos-entity_rating entity_rating
+     * 
+     * @code bx_srv('bx_videos', 'entity_rating', [...]); @endcode
+     * 
+     * Get page block with Stars based video's rating.
+     *
+     * @param $iContentId (optional) video ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return HTML string with block content to display on the site or false if there is no enough input data. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxVideosModule::serviceEntityRating
+     */
+    /** 
+     * @ref bx_videos-entity_rating "entity_rating"
+     */
+    public function serviceEntityRating($iContentId = 0)
+    {
+    	return $this->_serviceTemplateFunc ('entryRating', $iContentId);
+    }
+
+    protected function _getContentForTimelinePost($aEvent, $aContentInfo, $aBrowseParams = array())
+    {
+        $aResult = parent::_getContentForTimelinePost($aEvent, $aContentInfo, $aBrowseParams);
+
+        if(!empty($aResult['videos']) && is_array($aResult['videos']))
+            $aResult['images'] = array();
+
+        return $aResult;
+    }
+    protected function _getImagesForTimelinePost($aEvent, $aContentInfo, $sUrl, $aBrowseParams = array())
+    {
+        list($sImageThumb, $sImageGallery, $sImageCover) = $this->_oTemplate->getUnitImages($aContentInfo);
+        if(empty($sImageGallery) && !empty($sImageThumb))
+            $sImageGallery = $sImageThumb;
+
+        if(empty($sImageGallery))
+            return array();
+
+        return array(
+            array('url' => $sUrl, 'src' => $sImageGallery, 'src_orig' => $sImageCover),
+        );
+    }
+
+    protected function _getVideosForTimelinePost($aEvent, $aContentInfo, $sUrl, $aBrowseParams = array())
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        if(empty($CNF['OBJECT_STORAGE_VIDEOS']) || empty($CNF['OBJECT_VIDEOS_TRANSCODERS']))
+            return array();
+
+        $iFile = (int)$aContentInfo[$CNF['FIELD_VIDEO']];
+        $aFile = BxDolStorage::getObjectInstance($CNF['OBJECT_STORAGE_VIDEOS'])->getFile($iFile);
+        if(empty($aFile) || !is_array($aFile) || strncmp('video/', $aFile['mime_type'], 6) !== 0)
+            return array();
+
+        $aTcvPoster = BxDolTranscoder::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['poster']);
+        $aTcvMp4 = BxDolTranscoder::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['mp4']);
+        $aTcvWebm = BxDolTranscoder::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['webm']);
+        if(!$aTcvPoster || !$aTcvMp4 || !$aTcvWebm)
+            return array();
+
+        return array(
+            array('src_poster' => $aTcvPoster->getFileUrl($iFile), 'src_mp4' => $aTcvMp4->getFileUrl($iFile), 'src_webm' => $aTcvWebm->getFileUrl($iFile))
+        );
+    }
+}
+
+/** @} */

+ 165 - 0
modules/boonex/videos/updates/9.0.0_9.0.1/source/classes/BxVideosTemplate.php

@@ -0,0 +1,165 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/*
+ * Module representation.
+ */
+class BxVideosTemplate extends BxBaseModTextTemplate
+{
+    /**
+     * Constructor
+     */
+    public function __construct(&$oConfig, &$oDb)
+    {
+        $this->MODULE = 'bx_videos';
+        parent::__construct($oConfig, $oDb);
+    }
+
+    public function entryVideo ($aContentInfo, $mixedContext = false)
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $oStorage = BxDolStorage::getObjectInstance($CNF['OBJECT_STORAGE_VIDEOS']);
+
+        $aTranscodersVideo = false;
+        if($CNF['OBJECT_VIDEOS_TRANSCODERS'])
+            $aTranscodersVideo = array (
+                'poster' => BxDolTranscoder::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['poster']),
+                'mp4' => BxDolTranscoder::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['mp4']),
+                'webm' => BxDolTranscoder::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['webm']),
+            );
+
+        $iFile = (int)$aContentInfo[$CNF['FIELD_VIDEO']];
+        $aFile = $oStorage->getFile($iFile);
+        if(empty($aFile) || !is_array($aFile) || strncmp('video/', $aFile['mime_type'], 6) !== 0)
+            return '';
+
+        $sTitle = bx_process_output($aContentInfo['title']);
+        $sTitleAttr = bx_html_attribute($aContentInfo['title']);
+
+        $this->_checkDuration($aContentInfo);
+
+        return $this->parseHtmlByName('entry-video.html', array(
+            'img_title' => $sTitle,
+            'img_title_attr' => $sTitleAttr,
+            'img_src' => $aTranscodersVideo['poster']->getFileUrl($iFile),
+            'video' => BxTemplFunctions::getInstance()->videoPlayer(
+                $aTranscodersVideo['poster']->getFileUrl($iFile), 
+                $aTranscodersVideo['mp4']->getFileUrl($iFile), 
+                $aTranscodersVideo['webm']->getFileUrl($iFile),
+                false, 'max-height:' . $CNF['OBJECT_VIDEO_TRANSCODER_HEIGHT']
+            )
+        ));
+    }
+
+    public function entryRating($aData)
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+    	$sVotes = '';
+        $oVotes = BxDolVote::getObjectInstance($CNF['OBJECT_VOTES_STARS'], $aData['id']);
+        if($oVotes) {
+			$sVotes = $oVotes->getElementBlock(array('show_counter' => true, 'show_legend' => true));
+			if(!empty($sVotes))
+				$sVotes = $this->parseHtmlByName('entry-rating.html', array(
+		    		'content' => $sVotes,
+		    	));
+        }
+
+    	return $sVotes; 
+    }
+
+    public function getUnitImages ($aData)
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        list($sImageThumb, $sImageGallery) = $this->getUnitThumbAndGallery ($aData);
+        if(empty($sImageThumb) && empty($sImageGallery))
+            return array($sImageThumb, $sImageGallery);
+
+        $sImageCover = $this->_getUnitImage($CNF['FIELD_THUMB'], $CNF['OBJECT_IMAGES_TRANSCODER_COVER'], $aData);
+        if(!empty($sImageCover))
+            return array($sImageThumb, $sImageGallery, $sImageCover);
+
+        $sImageCover = $this->_getUnitImage($CNF['FIELD_VIDEO'], $CNF['OBJECT_VIDEOS_TRANSCODERS']['poster'], $aData);
+        if(!empty($sImageCover))
+            return array($sImageThumb, $sImageGallery, $sImageCover);
+
+        return array($sImageThumb, $sImageGallery, '');
+    }
+
+    protected function getUnit($aData, $aParams = array())
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $this->_checkDuration($aData);
+
+        $aUnit = parent::getUnit($aData, $aParams);
+        $aUnit['bx_if:thumb']['content']['duration'] = _t_format_duration($aData[$CNF['FIELD_DURATION']]);
+
+        return $aUnit;
+    }
+
+    /**
+     * Use Gallery image for both because currently there is no Unit types with small thumbnails.
+     */
+    protected function getUnitThumbAndGallery ($aData)
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $sImage = $this->_getUnitImage($CNF['FIELD_THUMB'], $CNF['OBJECT_IMAGES_TRANSCODER_GALLERY'], $aData);
+        if(!empty($sImage))
+            return array($sImage, $sImage);
+
+        $sImage = $this->_getUnitImage($CNF['FIELD_VIDEO'], $CNF['OBJECT_VIDEOS_TRANSCODERS']['poster_gallery'], $aData);
+        if(!empty($sImage))
+            return array($sImage, $sImage);
+
+        return array('', '');
+    }
+    
+    protected function _getUnitImage ($sField, $sTranscoder, &$aData)
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $sImage = '';
+        if(empty($sField) || empty($aData[$sField])) 
+            return $sImage;
+
+        $oImagesTranscoder = BxDolTranscoderImage::getObjectInstance($sTranscoder);
+        if($oImagesTranscoder)
+            $sImage = $oImagesTranscoder->getFileUrl($aData[$sField]);
+
+        return $sImage;
+    }
+
+    protected function _checkDuration(&$aContentInfo) 
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $iVideo = (int)$aContentInfo[$CNF['FIELD_VIDEO']];
+        if(empty($iVideo) || !empty($aContentInfo[$CNF['FIELD_DURATION']]))
+            return;
+
+        $sFile = BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_VIDEOS_TRANSCODERS']['mp4'])->getFileUrl($iVideo);
+        if(empty($sFile))
+            return;
+
+        $iDuration = BxDolTranscoderVideo::getDuration($sFile);
+        if(empty($iDuration))
+            return;
+
+        $this->_oDb->updateEntries(array($CNF['FIELD_DURATION'] => $iDuration), array($CNF['FIELD_ID'] => $aContentInfo[$CNF['FIELD_ID']]));
+    }
+
+}
+
+/** @} */

+ 135 - 0
modules/boonex/videos/updates/9.0.0_9.0.1/source/install/config.php

@@ -0,0 +1,135 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Videos Videos
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_videos',
+    'title' => 'Videos',
+    'note' => 'Basic video posting module.',
+    'version' => '9.0.1',
+    'vendor' => 'BoonEx',
+	'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => array(
+        '9.0.0-RC5'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/videos/',
+    'home_uri' => 'videos',
+
+    'db_prefix' => 'bx_videos_',
+    'class_prefix' => 'BxVideos',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Videos',
+
+    /**
+     * List of page triggers.
+     */
+    'page_triggers' => array (
+    	'trigger_page_profile_view_entry',
+    ),
+    
+    /**
+     * Menu triggers.
+     */
+    'menu_triggers' => array(
+    	'trigger_profile_view_submenu'
+    ),
+
+    /**
+     * Storage objects to automatically delete files from upon module uninstallation.
+     * Note. Don't add storage objects used in transcoder objects.
+     */
+    'storages' => array(
+    	'bx_videos_files'
+    ),
+
+    /**
+     * Transcoders.
+     */
+    'transcoders' => array(
+		'bx_videos_preview',
+        'bx_videos_gallery',
+        'bx_videos_cover'
+    ),
+
+    /**
+     * Extended Search Forms.
+     */
+    'esearches' => array(
+        'bx_videos',
+    	'bx_videos_cmts'
+    ),
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'uninstall' => array (
+    	'process_esearches' => 1,
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+        'update_relations' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable_success' => array(
+        'process_menu_triggers' => 1,
+        'process_page_triggers' => 1,
+    	'process_esearches' => 1,
+        'register_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+        'update_relations' => 1,
+        'unregister_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable_failed' => array (
+        'register_transcoders' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+
+    /**
+     * Relations Section
+     */
+    'relations' => array(
+    	'bx_timeline',
+    	'bx_notifications'
+    ),
+
+);
+
+/** @} */

+ 212 - 0
modules/boonex/videos/updates/9.0.0_9.0.1/source/install/langs/en.xml

@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+
+	<string name="_bx_videos"><![CDATA[Videos]]></string>
+	<string name="_bx_videos_cmts"><![CDATA[Videos' Comments]]></string>
+
+	<string name="_bx_videos_option_summary_chars"><![CDATA[Number of characters in auto-cropped video summary]]></string>
+	<string name="_bx_videos_option_plain_summary_chars"><![CDATA[Number of characters in plain video description when video hasn't thumb]]></string>
+	<string name="_bx_videos_option_per_page_browse"><![CDATA[Number of items per page]]></string>
+	<string name="_bx_videos_option_per_page_profile"><![CDATA[Number of items on profile/group page]]></string>
+	<string name="_bx_videos_option_rss_num"><![CDATA[Number of items in RSS feed]]></string>
+	<string name="_bx_videos_option_searchable_fields"><![CDATA[Searchable fields for keyword search]]></string>
+
+	<string name="_bx_videos_form_entry"><![CDATA[Videos]]></string>
+	<string name="_bx_videos_form_entry_display_add"><![CDATA[Add Video]]></string>
+	<string name="_bx_videos_form_entry_display_edit"><![CDATA[Edit Video]]></string>
+	<string name="_bx_videos_form_entry_display_delete"><![CDATA[Delete Video]]></string>
+	<string name="_bx_videos_form_entry_display_view"><![CDATA[View Video]]></string>
+	<string name="_bx_videos_form_entry_input_author"><![CDATA[Author]]></string>
+	<string name="_bx_videos_form_entry_input_sys_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_videos_form_entry_input_do_submit"><![CDATA[Submit]]></string>
+	<string name="_bx_videos_form_entry_input_sys_do_publish"><![CDATA[Publish]]></string>
+	<string name="_bx_videos_form_entry_input_do_publish"><![CDATA[Publish]]></string>
+	<string name="_bx_videos_form_entry_input_sys_title"><![CDATA[Title]]></string>
+	<string name="_bx_videos_form_entry_input_title"><![CDATA[Title]]></string>
+	<string name="_bx_videos_form_entry_input_title_err"><![CDATA[Title is essential. Please, fill in this field]]></string>
+	<string name="_bx_videos_form_entry_input_sys_cat"><![CDATA[Category]]></string>
+	<string name="_bx_videos_form_entry_input_cat"><![CDATA[Category]]></string>
+    <string name="_bx_videos_form_entry_input_cat_err"><![CDATA[Please select category]]></string>
+	<string name="_bx_videos_form_entry_input_sys_text"><![CDATA[Text]]></string>
+	<string name="_bx_videos_form_entry_input_text"><![CDATA[Text]]></string>
+	<string name="_bx_videos_form_entry_input_sys_duration"><![CDATA[Duration]]></string>
+    <string name="_bx_videos_form_entry_input_duration"><![CDATA[Duration]]></string>
+	<string name="_bx_videos_form_entry_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
+	<string name="_bx_videos_form_entry_input_delete_confirm"><![CDATA[I am sure I want to delete this video]]></string>
+	<string name="_bx_videos_form_entry_input_delete_confirm_info"><![CDATA[This action can not be undone]]></string>
+	<string name="_bx_videos_form_entry_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete the video]]></string>
+	<string name="_bx_videos_form_entry_input_sys_pictures"><![CDATA[Pictures]]></string>
+	<string name="_bx_videos_form_entry_input_pictures"><![CDATA[Pictures]]></string>
+	<string name="_bx_videos_form_entry_input_sys_videos"><![CDATA[Video]]></string>
+    <string name="_bx_videos_form_entry_input_videos"><![CDATA[Video]]></string>
+    <string name="_bx_videos_form_entry_input_videos_upload"><![CDATA[Upload]]></string>
+    <string name="_bx_videos_form_entry_input_sys_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_videos_form_entry_input_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_videos_form_entry_input_picture_use_as_thumb"><![CDATA[Cover Image]]></string>
+    <string name="_bx_videos_form_entry_input_sys_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_videos_form_entry_input_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_videos_form_entry_input_sys_date_changed"><![CDATA[Updated]]></string>
+    <string name="_bx_videos_form_entry_input_date_changed"><![CDATA[Updated]]></string>
+
+	<string name="_bx_videos_acl_action_create_entry"><![CDATA[Create Video]]></string>
+	<string name="_bx_videos_acl_action_delete_entry"><![CDATA[Delete Video]]></string>
+	<string name="_bx_videos_acl_action_view_entry"><![CDATA[View Video]]></string>
+	<string name="_bx_videos_acl_action_set_thumb"><![CDATA[Set Video Thumbnail]]></string>
+	<string name="_bx_videos_acl_action_edit_any_entry"><![CDATA[Edit Any Video]]></string>
+
+	<string name="_bx_videos_page_title_sys_create_entry"><![CDATA[New Video]]></string>
+	<string name="_bx_videos_page_title_create_entry"><![CDATA[New Video]]></string>
+	<string name="_bx_videos_page_block_title_create_entry"><![CDATA[New Video]]></string>
+	<string name="_bx_videos_page_title_sys_edit_entry"><![CDATA[Edit]]></string>
+	<string name="_bx_videos_page_title_edit_entry"><![CDATA[Edit]]></string>
+	<string name="_bx_videos_page_block_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_videos_page_title_sys_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_videos_page_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_videos_page_block_title_delete_entry"><![CDATA[Delete]]></string>
+	<string name="_bx_videos_page_title_sys_view_entry"><![CDATA[View Video]]></string>
+	<string name="_bx_videos_page_title_view_entry"><![CDATA[{title}]]></string>
+	<string name="_bx_videos_page_block_title_entry_text"><![CDATA[Text]]></string>
+	<string name="_bx_videos_page_block_title_entry_video"><![CDATA[Video]]></string>
+	<string name="_bx_videos_page_title_browse"><![CDATA[Videos]]></string>
+	<string name="_bx_videos_page_title_search_results"><![CDATA[Videos matching "{0}"]]></string>
+	<string name="_bx_videos_page_title_browse_by_author"><![CDATA[Videos of {display_name}]]></string>
+	<string name="_bx_videos_page_title_browse_featured"><![CDATA[Featured Videos]]></string>
+    <string name="_bx_videos_page_title_browse_recent"><![CDATA[Latest Videos]]></string>
+    <string name="_bx_videos_page_title_browse_popular"><![CDATA[Popular Videos]]></string>
+    <string name="_bx_videos_page_title_browse_updated"><![CDATA[Updated Videos]]></string>
+    <string name="_bx_videos_page_title_sys_home"><![CDATA[Videos Home]]></string>
+    <string name="_bx_videos_page_title_home"><![CDATA[Videos]]></string>
+    <string name="_bx_videos_page_block_title_featured_entries"><![CDATA[Featured Videos (Gallery View)]]></string>
+    <string name="_bx_videos_page_block_title_featured_entries_view_extended"><![CDATA[Featured Videos]]></string>
+    <string name="_bx_videos_page_block_title_featured_entries_view_full"><![CDATA[Featured Videos (Full View)]]></string>
+    <string name="_bx_videos_page_block_title_recent_entries"><![CDATA[Latest Videos (Gallery View)]]></string>
+    <string name="_bx_videos_page_block_title_recent_entries_view_extended"><![CDATA[Latest Videos]]></string>
+    <string name="_bx_videos_page_block_title_recent_entries_view_full"><![CDATA[Latest Videos (Full View)]]></string>
+    <string name="_bx_videos_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
+    <string name="_bx_videos_page_block_title_entry_author"><![CDATA[Author]]></string>
+    <string name="_bx_videos_page_block_title_entry_actions"><![CDATA[Actions]]></string>
+    <string name="_bx_videos_page_block_title_entry_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_videos_page_block_title_entry_comments_link"><![CDATA[Comments to <a href="{entry_link}">{title}</a>]]></string>
+    <string name="_bx_videos_page_block_title_entry_location"><![CDATA[Location]]></string>
+    <string name="_bx_videos_page_block_title_entry_attachments"><![CDATA[Attachments]]></string>
+    <string name="_bx_videos_page_block_title_entry_all_actions"><![CDATA[All Actions]]></string>
+    <string name="_bx_videos_page_block_title_entry_rating"><![CDATA[Rating]]></string>
+    <string name="_bx_videos_page_title_sys_entries_popular"><![CDATA[Popular Videos]]></string>
+    <string name="_bx_videos_page_title_entries_popular"><![CDATA[Popular Videos]]></string>
+    <string name="_bx_videos_page_title_sys_entries_updated"><![CDATA[Updated Videos]]></string>
+    <string name="_bx_videos_page_title_entries_updated"><![CDATA[Updated Videos]]></string>
+    <string name="_bx_videos_page_title_sys_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_videos_page_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_videos_page_block_title_search_form"><![CDATA[Search Form]]></string>
+    <string name="_bx_videos_page_block_title_search_results"><![CDATA[Search Results]]></string>
+    <string name="_bx_videos_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>
+    <string name="_bx_videos_page_block_title_search_results_cmts"><![CDATA[Comments Search Results]]></string>
+    <string name="_bx_videos_page_block_title_popular_entries"><![CDATA[Popular Videos]]></string>
+    <string name="_bx_videos_page_block_title_popular_entries_view_extended"><![CDATA[Popular Videos (Extended View)]]></string>
+    <string name="_bx_videos_page_block_title_popular_entries_view_full"><![CDATA[Popular Videos (Full View)]]></string>
+    <string name="_bx_videos_page_block_title_updated_entries"><![CDATA[Updated Videos]]></string>
+    <string name="_bx_videos_page_title_sys_view_entry_comments"><![CDATA[Video Comments]]></string>
+    <string name="_bx_videos_page_title_view_entry_comments"><![CDATA[Comments to {title}]]></string>
+    <string name="_bx_videos_page_title_sys_entries_of_author"><![CDATA[Videos of author]]></string>
+    <string name="_bx_videos_page_title_entries_of_author"><![CDATA[Videos by {display_name}]]></string>
+    <string name="_bx_videos_page_block_title_favorites_of_author"><![CDATA[Favorites by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_videos_page_block_title_sys_favorites_of_author"><![CDATA[Favorites of author]]></string>
+    <string name="_bx_videos_page_block_title_entries_of_author"><![CDATA[Videos by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_videos_page_block_title_sys_entries_of_author"><![CDATA[Videos of author]]></string>   
+    <string name="_bx_videos_page_block_title_entries_actions"><![CDATA[Videos actions]]></string>
+    <string name="_bx_videos_page_block_title_browse_cmts"><![CDATA[Videos' Comments]]></string>
+	<string name="_bx_videos_page_title_sys_manage"><![CDATA[Manage Own]]></string>
+	<string name="_bx_videos_page_title_sys_manage_administration"><![CDATA[Manage All]]></string>
+	<string name="_bx_videos_page_title_manage"><![CDATA[Manage]]></string>
+	<string name="_bx_videos_page_block_title_system_manage"><![CDATA[Manage Own]]></string>
+	<string name="_bx_videos_page_block_title_system_manage_administration"><![CDATA[Manage All]]></string>
+	<string name="_bx_videos_page_block_title_manage"><![CDATA[Manage]]></string>    
+	<string name="_bx_videos_page_block_title_popular_keywords"><![CDATA[Popular Hashtags]]></string>
+	<string name="_bx_videos_page_block_title_cats"><![CDATA[Videos Categories]]></string>
+	<string name="_bx_videos_page_block_title_entry_info"><![CDATA[Info]]></string>
+	<string name="_bx_videos_page_block_title_my_entries"><![CDATA[My Videos]]></string>
+    <string name="_bx_videos_page_block_title_sys_recent_entries_view_showcase"><![CDATA[Latest Videos (Showcase View)]]></string>
+    <string name="_bx_videos_page_block_title_recent_entries_view_showcase"><![CDATA[Latest Videos]]></string>
+    <string name="_bx_videos_page_block_title_sys_popular_entries_view_showcase"><![CDATA[Popular Videos (Showcase View)]]></string>
+    <string name="_bx_videos_page_block_title_popular_entries_view_showcase"><![CDATA[Popular Videos]]></string>
+    <string name="_bx_videos_page_block_title_sys_featured_entries_view_showcase"><![CDATA[Featured Videos (Showcase View)]]></string>
+    <string name="_bx_videos_page_block_title_featured_entries_view_showcase"><![CDATA[Featured Videos]]></string>
+
+    <string name="_bx_videos_menu_set_title_view_entry"><![CDATA[Video Actions]]></string>
+    <string name="_bx_videos_menu_title_view_entry"><![CDATA[Video Actions]]></string>
+    <string name="_bx_videos_menu_title_submenu"><![CDATA[Videos Submenu]]></string>
+    <string name="_bx_videos_menu_set_title_submenu"><![CDATA[Videos Submenu]]></string>
+    <string name="_bx_videos_menu_item_title_system_create_entry"><![CDATA[New Video]]></string>
+    <string name="_bx_videos_menu_item_title_create_entry"><![CDATA[New Video]]></string>
+    <string name="_bx_videos_menu_item_title_system_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_videos_menu_item_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_videos_menu_item_title_system_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_videos_menu_item_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_videos_menu_item_title_system_view_entry"><![CDATA[View Video]]></string>
+    <string name="_bx_videos_menu_item_title_system_entries_home"><![CDATA[Videos]]></string>
+    <string name="_bx_videos_menu_item_title_entries_home"><![CDATA[Videos]]></string>
+    <string name="_bx_videos_menu_item_title_system_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_videos_menu_item_title_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_videos_menu_item_title_system_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_videos_menu_item_title_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_videos_menu_item_title_system_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_videos_menu_item_title_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_videos_menu_item_title_system_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_videos_menu_item_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_videos_menu_title_view_entry_submenu"><![CDATA[View Video Submenu]]></string>
+    <string name="_bx_videos_menu_set_title_view_entry_submenu"><![CDATA[View Video Submenu]]></string>
+    <string name="_bx_videos_menu_item_title_view_entry_submenu_entry"><![CDATA[Video]]></string>
+    <string name="_bx_videos_menu_item_title_view_entry_submenu_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_videos_menu_item_title_system_view_entry_comments"><![CDATA[Video Comments]]></string>
+    <string name="_bx_videos_menu_item_title_system_view_entries_author"><![CDATA[Videos]]></string>
+    <string name="_bx_videos_menu_item_title_view_entries_author"><![CDATA[Videos]]></string>
+    <string name="_bx_videos_menu_title_entries_my"><![CDATA[My Videos Action Menu]]></string>
+    <string name="_bx_videos_menu_set_title_entries_my"><![CDATA[My Videos Menu]]></string>
+	<string name="_bx_videos_menu_item_title_system_manage_my_videos"><![CDATA[My videos]]></string>
+    <string name="_bx_videos_menu_item_title_manage_my_videos"><![CDATA[{addon} videos]]></string>
+    <string name="_bx_videos_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_videos_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_videos_menu_item_title_system_manage_account"><![CDATA[Manage account]]></string>
+    <string name="_bx_videos_menu_item_title_manage_account"><![CDATA[Manage account]]></string>
+	<string name="_bx_videos_menu_item_title_system_admt_videos"><![CDATA[Videos]]></string>
+	<string name="_bx_videos_menu_item_title_admt_videos"><![CDATA[Videos - {addon} hidden]]></string>
+	<string name="_bx_videos_menu_item_title_manage_my"><![CDATA[My Videos]]></string>
+	<string name="_bx_videos_menu_item_title_manage_all"><![CDATA[All Videos]]></string>
+
+	<string name="_bx_videos_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+	<string name="_bx_videos_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
+	<string name="_bx_videos_grid_filter_item_title_adm_hidden"><![CDATA[Hidden]]></string>
+	<string name="_bx_videos_grid_column_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_videos_grid_column_title_adm_title"><![CDATA[Title]]></string>
+    <string name="_bx_videos_grid_column_title_adm_added"><![CDATA[Added]]></string>
+    <string name="_bx_videos_grid_column_title_adm_author"><![CDATA[Author]]></string>
+    <string name="_bx_videos_grid_action_title_adm_edit"><![CDATA[Edit]]></string>
+    <string name="_bx_videos_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_videos_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
+    <string name="_bx_videos_grid_action_err_delete"><![CDATA[Cannot delete the selected video(s).]]></string>
+    <string name="_bx_videos_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
+
+    <string name="_bx_videos_chart_growth"><![CDATA[Videos: Growth]]></string>
+    <string name="_bx_videos_chart_growth_speed"><![CDATA[Videos: Growth Speed]]></string>
+
+    <string name="_bx_videos_search_extended"><![CDATA[Videos Search]]></string>
+    <string name="_bx_videos_search_extended_cmts"><![CDATA[Videos Comments Search]]></string>
+
+    <string name="_bx_videos_pre_lists_cats"><![CDATA[Video categories]]></string>
+    <string name="_bx_videos_cat_animals_and_pets"><![CDATA[Animals & Pets]]></string>
+    <string name="_bx_videos_cat_education"><![CDATA[Education]]></string>
+    <string name="_bx_videos_cat_entertainment"><![CDATA[Entertainment]]></string>
+    <string name="_bx_videos_cat_film_and_animation"><![CDATA[Film & Animation]]></string>
+    <string name="_bx_videos_cat_music"><![CDATA[Music]]></string>
+    <string name="_bx_videos_cat_news"><![CDATA[News]]></string>
+    <string name="_bx_videos_cat_people_and_blogs"><![CDATA[People & Blogs]]></string>
+    <string name="_bx_videos_cat_sports"><![CDATA[Sports]]></string>
+    <string name="_bx_videos_cat_travel"><![CDATA[Travel]]></string>
+
+    <string name="_bx_videos_txt_all_entries_by"><![CDATA[<a href="{0}">All Videos by {1} ({2})</a>]]></string>
+    <string name="_bx_videos_txt_sample_single"><![CDATA[video]]></string>
+    <string name="_bx_videos_txt_sample_single_with_article"><![CDATA[a video]]></string>
+    <string name="_bx_videos_txt_sample_comment_single"><![CDATA[comment to video]]></string>
+    <string name="_bx_videos_txt_sample_vote_single"><![CDATA[vote to video]]></string>
+    <string name="_bx_videos_txt_n_views"><![CDATA[{0} views]]></string>
+</resources>

+ 394 - 0
modules/boonex/videos/updates/9.0.0_9.0.1/source/install/sql/enable.sql

@@ -0,0 +1,394 @@
+
+-- SETTINGS
+SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
+INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES 
+('modules', 'bx_videos', '_bx_videos', 'bx_videos@modules/boonex/videos/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
+SET @iTypeId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, 'bx_videos', '_bx_videos', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
+('bx_videos_summary_chars', '700', @iCategId, '_bx_videos_option_summary_chars', 'digit', '', '', '', 1),
+('bx_videos_plain_summary_chars', '240', @iCategId, '_bx_videos_option_plain_summary_chars', 'digit', '', '', '', 2),
+('bx_videos_per_page_browse', '12', @iCategId, '_bx_videos_option_per_page_browse', 'digit', '', '', '', 10),
+('bx_videos_per_page_profile', '6', @iCategId, '_bx_videos_option_per_page_profile', 'digit', '', '', '', 12),
+('bx_videos_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
+('bx_videos_rss_num', '10', @iCategId, '_bx_videos_option_rss_num', 'digit', '', '', '', 20),
+('bx_videos_searchable_fields', 'title,text', @iCategId, '_bx_videos_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:21:"get_searchable_fields";}', 30);
+
+
+-- PAGE: create entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_create_entry', '_bx_videos_page_title_sys_create_entry', '_bx_videos_page_title_create_entry', 'bx_videos', 5, 2147483647, 1, 'create-video', 'page.php?i=create-video', '', '', '', 0, 1, 0, 'BxVideosPageBrowse', 'modules/boonex/videos/classes/BxVideosPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_videos_create_entry', 1, 'bx_videos', '_bx_videos_page_block_title_create_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"entity_create";}', 0, 1, 1);
+
+-- PAGE: edit entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_edit_entry', '_bx_videos_page_title_sys_edit_entry', '_bx_videos_page_title_edit_entry', 'bx_videos', 5, 2147483647, 1, 'edit-video', '', '', '', '', 0, 1, 0, 'BxVideosPageEntry', 'modules/boonex/videos/classes/BxVideosPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_videos_edit_entry', 1, 'bx_videos', '_bx_videos_page_block_title_edit_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:11:"entity_edit";}', 0, 0, 0);
+
+-- PAGE: delete entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_delete_entry', '_bx_videos_page_title_sys_delete_entry', '_bx_videos_page_title_delete_entry', 'bx_videos', 5, 2147483647, 1, 'delete-video', '', '', '', '', 0, 1, 0, 'BxVideosPageEntry', 'modules/boonex/videos/classes/BxVideosPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_videos_delete_entry', 1, 'bx_videos', '_bx_videos_page_block_title_delete_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"entity_delete";}', 0, 0, 0);
+
+-- PAGE: view entry
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_view_entry', '_bx_videos_page_title_sys_view_entry', '_bx_videos_page_title_view_entry', 'bx_videos', 10, 2147483647, 1, 'view-video', '', '', '', '', 0, 1, 0, 'BxVideosPageEntry', 'modules/boonex/videos/classes/BxVideosPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('bx_videos_view_entry', 1, 'bx_videos', '', '_bx_videos_page_block_title_entry_video', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:18:"entity_video_block";}', 0, 0, 1, 0),
+('bx_videos_view_entry', 1, 'bx_videos', '', '_bx_videos_page_block_title_entry_text', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:17:"entity_text_block";}', 0, 0, 1, 1),
+('bx_videos_view_entry', 2, 'bx_videos', '', '_bx_videos_page_block_title_entry_author', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"entity_author";}', 0, 0, 1, 0),
+('bx_videos_view_entry', 2, 'bx_market', '', '_bx_videos_page_block_title_entry_rating', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"entity_rating";}', 0, 0, 1, 1),
+('bx_videos_view_entry', 3, 'bx_videos', '', '_bx_videos_page_block_title_entry_info', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:11:"entity_info";}', 0, 0, 1, 1),
+('bx_videos_view_entry', 3, 'bx_videos', '', '_bx_videos_page_block_title_entry_location', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:15:"entity_location";}', 0, 0, 0, 2),
+('bx_videos_view_entry', 4, 'bx_videos', '', '_bx_videos_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:18:"entity_all_actions";}', 0, 0, 1, 0),
+('bx_videos_view_entry', 4, 'bx_videos', '', '_bx_videos_page_block_title_entry_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:14:"entity_actions";}', 0, 0, 0, 1),
+('bx_videos_view_entry', 4, 'bx_videos', '', '_bx_videos_page_block_title_entry_social_sharing', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:21:"entity_social_sharing";}', 0, 0, 0, 2),
+('bx_videos_view_entry', 4, 'bx_videos', '', '_bx_videos_page_block_title_entry_attachments', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:18:"entity_attachments";}', 0, 0, 0, 3),
+('bx_videos_view_entry', 4, 'bx_videos', '', '_bx_videos_page_block_title_entry_comments', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:15:"entity_comments";}', 0, 0, 1, 4),
+('bx_videos_view_entry', 4, 'bx_videos', '', '_bx_videos_page_block_title_entry_location', 3, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:13:"locations_map";s:6:"params";a:2:{i:0;s:9:"bx_videos";i:1;s:4:"{id}";}s:5:"class";s:20:"TemplServiceMetatags";}', 0, 0, 1, 5);
+
+-- PAGE: view entry comments
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_view_entry_comments', '_bx_videos_page_title_sys_view_entry_comments', '_bx_videos_page_title_view_entry_comments', 'bx_videos', 5, 2147483647, 1, 'view-video-comments', '', '', '', '', 0, 1, 0, 'BxVideosPageEntry', 'modules/boonex/videos/classes/BxVideosPageEntry.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_videos_view_entry_comments', 1, 'bx_videos', '_bx_videos_page_block_title_entry_comments', '_bx_videos_page_block_title_entry_comments_link', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:15:"entity_comments";}', 0, 0, 1);
+
+-- PAGE: popular entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_popular', '_bx_videos_page_title_sys_entries_popular', '_bx_videos_page_title_entries_popular', 'bx_videos', 5, 2147483647, 1, 'videos-popular', 'page.php?i=videos-popular', '', '', '', 0, 1, 0, 'BxVideosPageBrowse', 'modules/boonex/videos/classes/BxVideosPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_videos_popular', 1, 'bx_videos', '_bx_videos_page_block_title_popular_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:14:"browse_popular";s:6:"params";a:3:{s:9:"unit_view";s:7:"gallery";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, 1);
+
+-- PAGE: recently updated entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_updated', '_bx_videos_page_title_sys_entries_updated', '_bx_videos_page_title_entries_updated', 'bx_videos', 5, 2147483647, 1, 'videos-updated', 'page.php?i=videos-updated', '', '', '', 0, 1, 0, 'BxVideosPageBrowse', 'modules/boonex/videos/classes/BxVideosPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_videos_updated', 1, 'bx_videos', '_bx_videos_page_block_title_updated_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:14:"browse_updated";s:6:"params";a:3:{s:9:"unit_view";s:7:"gallery";s:13:"empty_message";b:1;s:13:"ajax_paginate";b:0;}}', 0, 1, 1);
+
+-- PAGE: entries of author
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_author', 'videos-author', '_bx_videos_page_title_sys_entries_of_author', '_bx_videos_page_title_entries_of_author', 'bx_videos', 5, 2147483647, 1, '', '', '', '', 0, 1, 0, 'BxVideosPageAuthor', 'modules/boonex/videos/classes/BxVideosPageAuthor.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_videos_author', 1, 'bx_videos', '', '_bx_videos_page_block_title_entries_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:18:"my_entries_actions";}', 0, 0, 1, 1),
+('bx_videos_author', 1, 'bx_videos', '_bx_videos_page_block_title_sys_favorites_of_author', '_bx_videos_page_block_title_favorites_of_author', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:15:"browse_favorite";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 0, 1, 1, 2),
+('bx_videos_author', 1, 'bx_videos', '_bx_videos_page_block_title_sys_entries_of_author', '_bx_videos_page_block_title_entries_of_author', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"browse_author";}', 0, 0, 1, 3);
+
+-- PAGE: module home
+INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_home', 'videos-home', '_bx_videos_page_title_sys_home', '_bx_videos_page_title_home', 'bx_videos', 2, 2147483647, 1, 'page.php?i=videos-home', '', '', '', 0, 1, 0, 'BxVideosPageBrowse', 'modules/boonex/videos/classes/BxVideosPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_videos_home', 1, 'bx_videos', '', '_bx_videos_page_block_title_featured_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, 1, 0),
+('bx_videos_home', 1, 'bx_videos', '', '_bx_videos_page_block_title_recent_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, 1, 1),
+('bx_videos_home', 2, 'bx_videos', '', '_bx_videos_page_block_title_popular_keywords', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:14:"keywords_cloud";s:6:"params";a:2:{i:0;s:9:"bx_videos";i:1;s:9:"bx_videos";}s:5:"class";s:20:"TemplServiceMetatags";}', 0, 1, 1, 0),
+('bx_videos_home', 2, 'bx_videos', '', '_bx_videos_page_block_title_cats', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:15:"categories_list";s:6:"params";a:2:{i:0;s:14:"bx_videos_cats";i:1;a:1:{s:10:"show_empty";b:1;}}s:5:"class";s:20:"TemplServiceCategory";}', 0, 1, 1, 1);
+
+-- PAGE: search for entries
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_search', '_bx_videos_page_title_sys_entries_search', '_bx_videos_page_title_entries_search', 'bx_videos', 5, 2147483647, 1, 'videos-search', 'page.php?i=videos-search', '', '', '', 0, 1, 0, 'BxVideosPageBrowse', 'modules/boonex/videos/classes/BxVideosPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_videos_search', 1, 'bx_videos', '_bx_videos_page_block_title_search_form', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:9:"bx_videos";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 1),
+('bx_videos_search', 1, 'bx_videos', '_bx_videos_page_block_title_search_results', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:9:"bx_videos";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 2),
+('bx_videos_search', 1, 'bx_videos', '_bx_videos_page_block_title_search_form_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:8:"get_form";s:6:"params";a:1:{i:0;a:1:{s:6:"object";s:14:"bx_videos_cmts";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 3),
+('bx_videos_search', 1, 'bx_videos', '_bx_videos_page_block_title_search_results_cmts', 11, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_results";s:6:"params";a:1:{i:0;a:2:{s:6:"object";s:14:"bx_videos_cmts";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 4);
+
+-- PAGE: module manage own
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_manage', '_bx_videos_page_title_sys_manage', '_bx_videos_page_title_manage', 'bx_videos', 5, 2147483647, 1, 'videos-manage', 'page.php?i=videos-manage', '', '', '', 0, 1, 0, 'BxVideosPageBrowse', 'modules/boonex/videos/classes/BxVideosPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_videos_manage', 1, 'bx_videos', '_bx_videos_page_block_title_system_manage', '_bx_videos_page_block_title_manage', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:12:"manage_tools";}}', 0, 1, 0);
+
+-- PAGE: module manage all
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_administration', '_bx_videos_page_title_sys_manage_administration', '_bx_videos_page_title_manage', 'bx_videos', 5, 192, 1, 'videos-administration', 'page.php?i=videos-administration', '', '', '', 0, 1, 0, 'BxVideosPageBrowse', 'modules/boonex/videos/classes/BxVideosPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_videos_administration', 1, 'bx_videos', '_bx_videos_page_block_title_system_manage_administration', '_bx_videos_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:12:"manage_tools";s:6:"params";a:1:{i:0;s:14:"administration";}}', 0, 1, 0);
+
+-- PAGE: add block to homepage
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = 'sys_home' AND `cell_id` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('sys_home', 1, 'bx_videos', '_bx_videos_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"browse_public";s:6:"params";a:2:{i:0;b:0;i:1;b:0;}}', 1, 0, 0, IFNULL(@iBlockOrder, 0) + 1);
+
+-- PAGES: add page block to profiles modules (trigger* page objects are processed separately upon modules enable/disable)
+SET @iPBCellProfile = 3;
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('trigger_page_profile_view_entry', @iPBCellProfile, 'bx_videos', '_bx_videos_page_block_title_my_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"browse_author";s:6:"params";a:2:{i:0;s:12:"{profile_id}";i:1;a:2:{s:8:"per_page";s:26:"bx_videos_per_page_profile";s:13:"empty_message";b:0;}}}', 0, 0, 0);
+
+-- PAGE: service blocks
+SET @iBlockOrder = (SELECT `order` FROM `sys_pages_blocks` WHERE `object` = '' AND `cell_id` = 0 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('', 0, 'bx_videos', '', '_bx_videos_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:7:"gallery";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 1),
+('', 0, 'bx_videos', '', '_bx_videos_page_block_title_recent_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 2),
+('', 0, 'bx_videos', '', '_bx_videos_page_block_title_popular_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 3),
+('', 0, 'bx_videos', '', '_bx_videos_page_block_title_popular_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:14:"browse_popular";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 4),
+('', 0, 'bx_videos', '', '_bx_videos_page_block_title_featured_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:7:"gallery";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 5),
+('', 0, 'bx_videos', '', '_bx_videos_page_block_title_featured_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:9:"bx_videos";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:4:"full";}}', 0, 1, IFNULL(@iBlockOrder, 0) + 6),
+('', 0, 'bx_videos', '_bx_videos_page_block_title_sys_recent_entries_view_showcase', '_bx_videos_page_block_title_recent_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_videos\";s:6:\"method\";s:13:\"browse_public\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 7),
+('', 0, 'bx_videos', '_bx_videos_page_block_title_sys_popular_entries_view_showcase', '_bx_videos_page_block_title_popular_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_videos\";s:6:\"method\";s:13:\"browse_popular\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 8),
+('', 0, 'bx_videos', '_bx_videos_page_block_title_sys_featured_entries_view_showcase', '_bx_videos_page_block_title_featured_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:9:\"bx_videos\";s:6:\"method\";s:15:\"browse_featured\";s:6:\"params\";a:3:{s:9:\"unit_view\";s:8:\"showcase\";s:13:\"empty_message\";b:0;s:13:\"ajax_paginate\";b:0;}}', 0, 1, IFNULL(@iBlockOrder, 0) + 9);
+
+
+-- MENU: add to site menu
+SET @iSiteMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_site' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_site', 'bx_videos', 'videos-home', '_bx_videos_menu_item_title_system_entries_home', '_bx_videos_menu_item_title_entries_home', 'page.php?i=videos-home', '', '', 'film col-gray', 'bx_videos_submenu', 2147483647, 1, 1, IFNULL(@iSiteMenuOrder, 0) + 1);
+
+-- MENU: add to homepage menu
+SET @iHomepageMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_homepage' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_homepage', 'bx_videos', 'videos-home', '_bx_videos_menu_item_title_system_entries_home', '_bx_videos_menu_item_title_entries_home', 'page.php?i=videos-home', '', '', 'film col-gray', 'bx_videos_submenu', 2147483647, 1, 1, IFNULL(@iHomepageMenuOrder, 0) + 1);
+
+-- MENU: add to "add content" menu
+SET @iAddMenuOrder = (SELECT `order` FROM `sys_menu_items` WHERE `set_name` = 'sys_add_content_links' AND `active` = 1 ORDER BY `order` DESC LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_add_content_links', 'bx_videos', 'create-video', '_bx_videos_menu_item_title_system_create_entry', '_bx_videos_menu_item_title_create_entry', 'page.php?i=create-video', '', '', 'film col-gray', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
+
+-- MENU: actions menu for view entry 
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_view', '_bx_videos_menu_title_view_entry', 'bx_videos_view', 'bx_videos', 9, 0, 1, 'BxVideosMenuView', 'modules/boonex/videos/classes/BxVideosMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_videos_view', 'bx_videos', '_bx_videos_menu_set_title_view_entry', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_videos_view', 'bx_videos', 'edit-video', '_bx_videos_menu_item_title_system_edit_entry', '_bx_videos_menu_item_title_edit_entry', 'page.php?i=edit-video&id={content_id}', '', '', 'pencil', '', 2147483647, 1, 0, 1),
+('bx_videos_view', 'bx_videos', 'delete-video', '_bx_videos_menu_item_title_system_delete_entry', '_bx_videos_menu_item_title_delete_entry', 'page.php?i=delete-video&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 2);
+
+-- MENU: actions menu for my entries
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_my', '_bx_videos_menu_title_entries_my', 'bx_videos_my', 'bx_videos', 9, 0, 1, 'BxVideosMenu', 'modules/boonex/videos/classes/BxVideosMenu.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_videos_my', 'bx_videos', '_bx_videos_menu_set_title_entries_my', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_videos_my', 'bx_videos', 'create-video', '_bx_videos_menu_item_title_system_create_entry', '_bx_videos_menu_item_title_create_entry', 'page.php?i=create-video', '', '', 'plus', '', 2147483647, 1, 0, 0);
+
+-- MENU: module sub-menu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_submenu', '_bx_videos_menu_title_submenu', 'bx_videos_submenu', 'bx_videos', 8, 0, 1, '', '');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_videos_submenu', 'bx_videos', '_bx_videos_menu_set_title_submenu', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_videos_submenu', 'bx_videos', 'videos-home', '_bx_videos_menu_item_title_system_entries_public', '_bx_videos_menu_item_title_entries_public', 'page.php?i=videos-home', '', '', '', '', 2147483647, 1, 1, 1),
+('bx_videos_submenu', 'bx_videos', 'videos-popular', '_bx_videos_menu_item_title_system_entries_popular', '_bx_videos_menu_item_title_entries_popular', 'page.php?i=videos-popular', '', '', '', '', 2147483647, 1, 1, 2),
+('bx_videos_submenu', 'bx_videos', 'videos-search', '_bx_videos_menu_item_title_system_entries_search', '_bx_videos_menu_item_title_entries_search', 'page.php?i=videos-search', '', '', '', '', 2147483647, 1, 1, 3),
+('bx_videos_submenu', 'bx_videos', 'videos-manage', '_bx_videos_menu_item_title_system_entries_manage', '_bx_videos_menu_item_title_entries_manage', 'page.php?i=videos-manage', '', '', '', '', 2147483646, 1, 1, 4);
+
+-- MENU: sub-menu for view entry
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_view_submenu', '_bx_videos_menu_title_view_entry_submenu', 'bx_videos_view_submenu', 'bx_videos', 8, 0, 1, 'BxVideosMenuView', 'modules/boonex/videos/classes/BxVideosMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_videos_view_submenu', 'bx_videos', '_bx_videos_menu_set_title_view_entry_submenu', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('bx_videos_view_submenu', 'bx_videos', 'view-video', '_bx_videos_menu_item_title_system_view_entry', '_bx_videos_menu_item_title_view_entry_submenu_entry', 'page.php?i=view-video&id={content_id}', '', '', '', '', 2147483647, 0, 0, 1),
+('bx_videos_view_submenu', 'bx_videos', 'view-video-comments', '_bx_videos_menu_item_title_system_view_entry_comments', '_bx_videos_menu_item_title_view_entry_submenu_comments', 'page.php?i=view-video-comments&id={content_id}', '', '', '', '', 2147483647, 0, 0, 2);
+
+-- MENU: custom menu for snippet meta info
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_snippet_meta', '_sys_menu_title_snippet_meta', 'bx_videos_snippet_meta', 'bx_videos', 15, 0, 1, 'BxVideosMenuSnippetMeta', 'modules/boonex/videos/classes/BxVideosMenuSnippetMeta.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_videos_snippet_meta', 'bx_videos', '_sys_menu_set_title_snippet_meta', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `editable`, `order`) VALUES 
+('bx_videos_snippet_meta', 'bx_videos', 'date', '_sys_menu_item_title_system_sm_date', '_sys_menu_item_title_sm_date', '', '', '', '', '', 2147483647, 1, 0, 1, 1),
+('bx_videos_snippet_meta', 'bx_videos', 'rating', '_sys_menu_item_title_system_sm_rating', '_sys_menu_item_title_sm_rating', '', '', '', '', '', 2147483647, 1, 0, 1, 2),
+('bx_videos_snippet_meta', 'bx_videos', 'author', '_sys_menu_item_title_system_sm_author', '_sys_menu_item_title_sm_author', '', '', '', '', '', 2147483647, 1, 0, 1, 3),
+('bx_videos_snippet_meta', 'bx_videos', 'category', '_sys_menu_item_title_system_sm_category', '_sys_menu_item_title_sm_category', '', '', '', '', '', 2147483647, 0, 0, 1, 4),
+('bx_videos_snippet_meta', 'bx_videos', 'tags', '_sys_menu_item_title_system_sm_tags', '_sys_menu_item_title_sm_tags', '', '', '', '', '', 2147483647, 0, 0, 1, 5),
+('bx_videos_snippet_meta', 'bx_videos', 'views', '_sys_menu_item_title_system_sm_views', '_sys_menu_item_title_sm_views', '', '', '', '', '', 2147483647, 0, 0, 1, 6),
+('bx_videos_snippet_meta', 'bx_videos', 'comments', '_sys_menu_item_title_system_sm_comments', '_sys_menu_item_title_sm_comments', '', '', '', '', '', 2147483647, 0, 0, 1, 7);
+
+-- MENU: profile stats
+SET @iNotifMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name` = 'sys_profile_stats' AND `active` = 1 LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+('sys_profile_stats', 'bx_videos', 'profile-stats-manage-videos', '_bx_videos_menu_item_title_system_manage_my_videos', '_bx_videos_menu_item_title_manage_my_videos', 'page.php?i=videos-manage', '', '_self', 'film col-gray', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:41:"get_menu_addon_manage_tools_profile_stats";}', '', 2147483646, 1, 0, @iNotifMenuOrder + 1);
+
+-- MENU: manage tools submenu
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_menu_manage_tools', '_bx_videos_menu_title_manage_tools', 'bx_videos_menu_manage_tools', 'bx_videos', 6, 0, 1, 'BxVideosMenuManageTools', 'modules/boonex/videos/classes/BxVideosMenuManageTools.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_videos_menu_manage_tools', 'bx_videos', '_bx_videos_menu_set_title_manage_tools', 0);
+
+--INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+--('bx_videos_menu_manage_tools', 'bx_videos', 'delete-with-content', '_bx_videos_menu_item_title_system_delete_with_content', '_bx_videos_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id});', '_self', 'trash-o', '', 128, 1, 0, 0);
+
+-- MENU: dashboard manage tools
+SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('sys_account_dashboard_manage_tools', 'bx_videos', 'videos-administration', '_bx_videos_menu_item_title_system_admt_videos', '_bx_videos_menu_item_title_admt_videos', 'page.php?i=videos-administration', '', '_self', '', 'a:2:{s:6:"module";s:9:"bx_videos";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
+
+-- MENU: add menu item to profiles modules (trigger* menu sets are processed separately upon modules enable/disable)
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
+('trigger_profile_view_submenu', 'bx_videos', 'videos-author', '_bx_videos_menu_item_title_system_view_entries_author', '_bx_videos_menu_item_title_view_entries_author', 'page.php?i=videos-author&profile_id={profile_id}', '', '', 'film col-gray', '', 2147483647, 1, 0, 0);
+
+
+-- PRIVACY 
+INSERT INTO `sys_objects_privacy` (`object`, `module`, `action`, `title`, `default_group`, `table`, `table_field_id`, `table_field_author`, `override_class_name`, `override_class_file`) VALUES
+('bx_videos_allow_view_to', 'bx_videos', 'view', '_bx_videos_form_entry_input_allow_view_to', '3', 'bx_videos_entries', 'id', 'author', '', '');
+
+
+-- ACL
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_videos', 'create entry', NULL, '_bx_videos_acl_action_create_entry', '', 1, 3);
+SET @iIdActionEntryCreate = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_videos', 'delete entry', NULL, '_bx_videos_acl_action_delete_entry', '', 1, 3);
+SET @iIdActionEntryDelete = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_videos', 'view entry', NULL, '_bx_videos_acl_action_view_entry', '', 1, 0);
+SET @iIdActionEntryView = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_videos', 'set thumb', NULL, '_bx_videos_acl_action_set_thumb', '', 1, 3);
+SET @iIdActionSetThumb = LAST_INSERT_ID();
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_videos', 'edit any entry', NULL, '_bx_videos_acl_action_edit_any_entry', '', 1, 3);
+SET @iIdActionEntryEditAny = LAST_INSERT_ID();
+
+SET @iUnauthenticated = 1;
+SET @iAccount = 2;
+SET @iStandard = 3;
+SET @iUnconfirmed = 4;
+SET @iPending = 5;
+SET @iSuspended = 6;
+SET @iModerator = 7;
+SET @iAdministrator = 8;
+SET @iPremium = 9;
+
+INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
+
+-- entry create
+(@iStandard, @iIdActionEntryCreate),
+(@iModerator, @iIdActionEntryCreate),
+(@iAdministrator, @iIdActionEntryCreate),
+(@iPremium, @iIdActionEntryCreate),
+
+-- entry delete
+(@iStandard, @iIdActionEntryDelete),
+(@iModerator, @iIdActionEntryDelete),
+(@iAdministrator, @iIdActionEntryDelete),
+(@iPremium, @iIdActionEntryDelete),
+
+-- entry view
+(@iUnauthenticated, @iIdActionEntryView),
+(@iAccount, @iIdActionEntryView),
+(@iStandard, @iIdActionEntryView),
+(@iUnconfirmed, @iIdActionEntryView),
+(@iPending, @iIdActionEntryView),
+(@iModerator, @iIdActionEntryView),
+(@iAdministrator, @iIdActionEntryView),
+(@iPremium, @iIdActionEntryView),
+
+-- set entry thumb
+(@iStandard, @iIdActionSetThumb),
+(@iModerator, @iIdActionSetThumb),
+(@iAdministrator, @iIdActionSetThumb),
+(@iPremium, @iIdActionSetThumb),
+
+-- edit any entry
+(@iModerator, @iIdActionEntryEditAny),
+(@iAdministrator, @iIdActionEntryEditAny);
+
+
+-- SEARCH
+SET @iSearchOrder = (SELECT IFNULL(MAX(`Order`), 0) FROM `sys_objects_search`);
+INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `ClassPath`) VALUES
+('bx_videos', '_bx_videos', @iSearchOrder + 1, 'BxVideosSearchResult', 'modules/boonex/videos/classes/BxVideosSearchResult.php'),
+('bx_videos_cmts', '_bx_videos_cmts', @iSearchOrder + 2, 'BxVideosCmtsSearchResult', 'modules/boonex/videos/classes/BxVideosCmtsSearchResult.php');
+
+
+-- METATAGS
+INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
+('bx_videos', 'bx_videos_meta_keywords', 'bx_videos_meta_locations', 'bx_videos_meta_mentions', '', '');
+
+
+-- CATEGORY
+INSERT INTO `sys_objects_category` (`object`, `search_object`, `form_object`, `list_name`, `table`, `field`, `join`, `where`, `override_class_name`, `override_class_file`) VALUES
+('bx_videos_cats', 'bx_videos', 'bx_videos', 'bx_videos_cats', 'bx_videos_entries', 'cat', 'INNER JOIN `sys_profiles` ON (`sys_profiles`.`id` = `bx_videos_entries`.`author`)', 'AND `sys_profiles`.`status` = ''active''', '', '');
+
+
+-- STATS
+SET @iMaxOrderStats = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_statistics`);
+INSERT INTO `sys_statistics` (`module`, `name`, `title`, `link`, `icon`, `query`, `order`) VALUES 
+('bx_videos', 'bx_videos', '_bx_videos', 'page.php?i=videos-home', 'film col-gray', 'SELECT COUNT(*) FROM `bx_videos_entries` WHERE 1 AND `status` = ''active'' AND `status_admin` = ''active''', @iMaxOrderStats + 1);
+
+
+-- CHARTS
+SET @iMaxOrderCharts = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_objects_chart`);
+INSERT INTO `sys_objects_chart` (`object`, `title`, `table`, `field_date_ts`, `field_date_dt`, `field_status`, `query`, `active`, `order`, `class_name`, `class_file`) VALUES
+('bx_videos_growth', '_bx_videos_chart_growth', 'bx_videos_entries', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 1, 'BxDolChartGrowth', ''),
+('bx_videos_growth_speed', '_bx_videos_chart_growth_speed', 'bx_videos_entries', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 2, 'BxDolChartGrowthSpeed', '');
+
+
+-- GRIDS: moderation tools
+INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
+('bx_videos_administration', 'Sql', 'SELECT * FROM `bx_videos_entries` WHERE 1 ', 'bx_videos_entries', 'id', 'added', 'status_admin', '', 20, NULL, 'start', '', 'title,text', '', 'like', '', '', 192, 'BxVideosGridAdministration', 'modules/boonex/videos/classes/BxVideosGridAdministration.php'),
+('bx_videos_common', 'Sql', 'SELECT * FROM `bx_videos_entries` WHERE 1 ', 'bx_videos_entries', 'id', 'added', 'status', '', 20, NULL, 'start', '', 'title,text', '', 'like', '', '', 2147483647, 'BxVideosGridCommon', 'modules/boonex/videos/classes/BxVideosGridCommon.php');
+
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
+('bx_videos_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_videos_administration', 'switcher', '_bx_videos_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_videos_administration', 'title', '_bx_videos_grid_column_title_adm_title', '25%', 0, '25', '', 3),
+('bx_videos_administration', 'added', '_bx_videos_grid_column_title_adm_added', '20%', 1, '25', '', 4),
+('bx_videos_administration', 'author', '_bx_videos_grid_column_title_adm_author', '25%', 0, '25', '', 5),
+('bx_videos_administration', 'actions', '', '20%', 0, '', '', 6),
+('bx_videos_common', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_videos_common', 'switcher', '_bx_videos_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_videos_common', 'title', '_bx_videos_grid_column_title_adm_title', '40%', 0, '35', '', 3),
+('bx_videos_common', 'added', '_bx_videos_grid_column_title_adm_added', '30%', 1, '25', '', 4),
+('bx_videos_common', 'actions', '', '20%', 0, '', '', 5);
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
+('bx_videos_administration', 'bulk', 'delete', '_bx_videos_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_videos_administration', 'single', 'edit', '_bx_videos_grid_action_title_adm_edit', 'pencil', 1, 0, 1),
+('bx_videos_administration', 'single', 'delete', '_bx_videos_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_videos_administration', 'single', 'settings', '_bx_videos_grid_action_title_adm_more_actions', 'cog', 1, 0, 3),
+('bx_videos_common', 'bulk', 'delete', '_bx_videos_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_videos_common', 'single', 'edit', '_bx_videos_grid_action_title_adm_edit', 'pencil', 1, 0, 1),
+('bx_videos_common', 'single', 'delete', '_bx_videos_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_videos_common', 'single', 'settings', '_bx_videos_grid_action_title_adm_more_actions', 'cog', 1, 0, 3);
+
+
+-- UPLOADERS
+INSERT INTO `sys_objects_uploader` (`object`, `active`, `override_class_name`, `override_class_file`) VALUES
+('bx_videos_simple', 1, 'BxVideosUploaderSimple', 'modules/boonex/videos/classes/BxVideosUploaderSimple.php'),
+('bx_videos_html5', 1, 'BxVideosUploaderHTML5', 'modules/boonex/videos/classes/BxVideosUploaderHTML5.php');
+
+
+-- ALERTS
+INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES 
+('bx_videos', 'BxVideosAlertsResponse', 'modules/boonex/videos/classes/BxVideosAlertsResponse.php', '');
+SET @iHandler := LAST_INSERT_ID();
+
+INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
+('system', 'save_setting', @iHandler),
+('profile', 'delete', @iHandler);

+ 360 - 0
modules/boonex/videos/updates/9.0.0_9.0.1/source/install/sql/install.sql

@@ -0,0 +1,360 @@
+SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
+
+
+-- TABLE: entries
+CREATE TABLE IF NOT EXISTS `bx_videos_entries` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `author` int(10) unsigned NOT NULL default '0',
+  `added` int(11) NOT NULL default '0',
+  `changed` int(11) NOT NULL default '0',
+  `thumb` int(11) NOT NULL default '0',
+  `video` int(11) NOT NULL default '0',
+  `title` varchar(255) NOT NULL,
+  `cat` int(11) NOT NULL,
+  `text` text NOT NULL,
+  `duration` int(11) NOT NULL,
+  `views` int(11) NOT NULL default '0',
+  `rate` float NOT NULL default '0',
+  `votes` int(11) NOT NULL default '0',
+  `srate` float NOT NULL default '0',
+  `svotes` int(11) NOT NULL default '0',
+  `favorites` int(11) NOT NULL default '0',
+  `comments` int(11) NOT NULL default '0',
+  `reports` int(11) NOT NULL default '0',
+  `featured` int(11) NOT NULL default '0',
+  `allow_view_to` int(11) NOT NULL DEFAULT '3',
+  `status` enum('active','hidden') NOT NULL DEFAULT 'active',
+  `status_admin` enum('active','hidden') NOT NULL DEFAULT 'active',
+  PRIMARY KEY (`id`),
+  FULLTEXT KEY `title_text` (`title`,`text`)
+);
+
+-- TABLE: storages & transcoders
+CREATE TABLE IF NOT EXISTS `bx_videos_photos` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_videos_videos` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_videos_media_resized` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `profile_id` int(10) unsigned NOT NULL,
+  `remote_id` varchar(128) NOT NULL,
+  `path` varchar(255) NOT NULL,
+  `file_name` varchar(255) NOT NULL,
+  `mime_type` varchar(128) NOT NULL,
+  `ext` varchar(32) NOT NULL,
+  `size` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `modified` int(11) NOT NULL,
+  `private` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `remote_id` (`remote_id`)
+);
+
+-- TABLE: comments
+CREATE TABLE IF NOT EXISTS `bx_videos_cmts` (
+  `cmt_id` int(11) NOT NULL AUTO_INCREMENT,
+  `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_object_id` int(11) NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_level` int(11) NOT NULL DEFAULT '0',
+  `cmt_text` text NOT NULL,
+  `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',
+  `cmt_rate` int(11) NOT NULL DEFAULT '0',
+  `cmt_rate_count` int(11) NOT NULL DEFAULT '0',
+  `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',
+  `cmt_replies` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`cmt_id`),
+  KEY `cmt_object_id` (`cmt_object_id`,`cmt_parent_id`),
+  FULLTEXT KEY `search_fields` (`cmt_text`)
+);
+
+-- TABLE: votes
+CREATE TABLE IF NOT EXISTS `bx_videos_votes` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  `sum` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_videos_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`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_videos_svotes` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  `sum` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_videos_svotes_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`)
+);
+
+-- TABLE: views
+CREATE TABLE `bx_videos_views_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `viewer_id` int(11) NOT NULL default '0',
+  `viewer_nip` int(11) unsigned NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`viewer_id`,`viewer_nip`)
+);
+
+-- TABLE: metas
+CREATE TABLE `bx_videos_meta_keywords` (
+  `object_id` int(10) unsigned NOT NULL,
+  `keyword` varchar(255) NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `keyword` (`keyword`)
+);
+
+CREATE TABLE `bx_videos_meta_locations` (
+  `object_id` int(10) unsigned NOT NULL,
+  `lat` double NOT NULL,
+  `lng` double NOT NULL,
+  `country` varchar(2) NOT NULL,
+  `state` varchar(255) NOT NULL,
+  `city` varchar(255) NOT NULL,
+  `zip` varchar(255) NOT NULL,
+  `street` varchar(255) NOT NULL,
+  `street_number` varchar(255) NOT NULL,
+  PRIMARY KEY (`object_id`),
+  KEY `country_state_city` (`country`,`state`(8),`city`(8))
+);
+
+CREATE TABLE `bx_videos_meta_mentions` (
+  `object_id` int(10) unsigned NOT NULL,
+  `profile_id` int(10) unsigned NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `profile_id` (`profile_id`)
+);
+
+-- TABLE: reports
+CREATE TABLE IF NOT EXISTS `bx_videos_reports` (
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_videos_reports_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',
+  `type` varchar(32) NOT NULL default '',
+  `text` text NOT NULL default '',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `report` (`object_id`, `author_nip`)
+);
+
+-- TABLE: favorites
+CREATE TABLE `bx_videos_favorites_track` (
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  KEY `id` (`object_id`,`author_id`)
+);
+
+
+-- STORAGES & TRANSCODERS
+INSERT INTO `sys_objects_storage` (`object`, `engine`, `params`, `token_life`, `cache_control`, `levels`, `table_files`, `ext_mode`, `ext_allow`, `ext_deny`, `quota_size`, `current_size`, `quota_number`, `current_number`, `max_file_size`, `ts`) VALUES
+('bx_videos_photos', @sStorageEngine, '', 360, 2592000, 3, 'bx_videos_photos', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
+('bx_videos_videos', @sStorageEngine, '', 360, 2592000, 3, 'bx_videos_videos', 'allow-deny', 'avi,flv,mpg,mpeg,wmv,mp4,m4v,mov,qt,divx,xvid,3gp,3g2,webm,mkv,ogv,ogg,rm,rmvb,asf,drc', '', 0, 0, 0, 0, 0, 0),
+('bx_videos_media_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_videos_media_resized', 'allow-deny', 'jpg,jpeg,jpe,gif,png,avi,flv,mpg,mpeg,wmv,mp4,m4v,mov,qt,divx,xvid,3gp,3g2,webm,mkv,ogv,ogg,rm,rmvb,asf,drc', '', 0, 0, 0, 0, 0, 0);
+
+INSERT INTO `sys_objects_transcoder` (`object`, `storage_object`, `source_type`, `source_params`, `private`, `atime_tracking`, `atime_pruning`, `ts`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos_preview', 'bx_videos_media_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_videos_photos";}', 'no', 1, 2592000, 0, '', ''),
+('bx_videos_gallery', 'bx_videos_media_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_videos_photos";}', 'no', 1, 2592000, 0, '', ''),
+('bx_videos_cover', 'bx_videos_media_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_videos_photos";}', 'no', 1, 2592000, 0, '', ''),
+
+('bx_videos_video_poster_preview', 'bx_videos_media_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_videos_videos";}', 'no', 0, 0, 0, 'BxDolTranscoderVideo', ''),
+('bx_videos_video_poster_gallery', 'bx_videos_media_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_videos_videos";}', 'no', 0, 0, 0, 'BxDolTranscoderVideo', ''),
+('bx_videos_video_poster_cover', 'bx_videos_media_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_videos_videos";}', 'no', 0, 0, 0, 'BxDolTranscoderVideo', ''),
+('bx_videos_video_mp4', 'bx_videos_media_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_videos_videos";}', 'no', 0, 0, 0, 'BxDolTranscoderVideo', ''),
+('bx_videos_video_webm', 'bx_videos_media_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_videos_videos";}', 'no', 0, 0, 0, 'BxDolTranscoderVideo', '');
+
+INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
+('bx_videos_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
+('bx_videos_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
+('bx_videos_cover', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0'),
+
+('bx_videos_video_poster_preview', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:13:"square_resize";s:1:"1";}', 10),
+('bx_videos_video_poster_preview', 'Poster', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:3:"jpg";}', 0),
+('bx_videos_video_poster_gallery', 'Poster', 'a:2:{s:1:"w";s:3:"500";s:10:"force_type";s:3:"jpg";}', 0),
+('bx_videos_video_poster_cover', 'Poster', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:3:"jpg";}', 0),
+('bx_videos_video_mp4', 'Mp4', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:3:"mp4";}', 0),
+('bx_videos_video_webm', 'Webm', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:4:"webm";}', 0);
+
+
+-- FORMS
+INSERT INTO `sys_objects_form`(`object`, `module`, `title`, `action`, `form_attrs`, `table`, `key`, `uri`, `uri_title`, `submit_name`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_videos', 'bx_videos', '_bx_videos_form_entry', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_videos_entries', 'id', '', '', 'a:2:{i:0;s:9:"do_submit";i:1;s:10:"do_publish";}', '', 0, 1, 'BxVideosFormEntry', 'modules/boonex/videos/classes/BxVideosFormEntry.php');
+
+INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES 
+('bx_videos', 'bx_videos_entry_add', 'bx_videos', 0, '_bx_videos_form_entry_display_add'),
+('bx_videos', 'bx_videos_entry_delete', 'bx_videos', 0, '_bx_videos_form_entry_display_delete'),
+('bx_videos', 'bx_videos_entry_edit', 'bx_videos', 0, '_bx_videos_form_entry_display_edit'),
+('bx_videos', 'bx_videos_entry_view', 'bx_videos', 1, '_bx_videos_form_entry_display_view');
+
+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_videos', 'bx_videos', 'allow_view_to', '', '', 0, 'custom', '_bx_videos_form_entry_input_sys_allow_view_to', '_bx_videos_form_entry_input_allow_view_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_videos', 'bx_videos', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_videos_form_entry_input_sys_delete_confirm', '_bx_videos_form_entry_input_delete_confirm', '_bx_videos_form_entry_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_videos_form_entry_input_delete_confirm_error', '', '', 1, 0),
+('bx_videos', 'bx_videos', 'do_publish', '_bx_videos_form_entry_input_do_publish', '', 0, 'submit', '_bx_videos_form_entry_input_sys_do_publish', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_videos', 'bx_videos', 'do_submit', '_bx_videos_form_entry_input_do_submit', '', 0, 'submit', '_bx_videos_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_videos', 'bx_videos', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_videos', 'bx_videos', 'videos', 'a:1:{i:0;s:15:"bx_videos_html5";}', 'a:2:{s:16:"bx_videos_simple";s:26:"_sys_uploader_simple_title";s:15:"bx_videos_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_videos_form_entry_input_sys_videos', '_bx_videos_form_entry_input_videos', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_videos', 'bx_videos', 'pictures', 'a:1:{i:0;s:15:"bx_videos_html5";}', 'a:2:{s:16:"bx_videos_simple";s:26:"_sys_uploader_simple_title";s:15:"bx_videos_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_videos_form_entry_input_sys_pictures', '_bx_videos_form_entry_input_pictures', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_videos', 'bx_videos', 'text', '', '', 0, 'textarea', '_bx_videos_form_entry_input_sys_text', '_bx_videos_form_entry_input_text', '', 0, 0, 3, '', '', '', '', '', '', 'XssHtml', '', 1, 0),
+('bx_videos', 'bx_videos', 'title', '', '', 0, 'text', '_bx_videos_form_entry_input_sys_title', '_bx_videos_form_entry_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_videos_form_entry_input_title_err', 'Xss', '', 1, 0),
+('bx_videos', 'bx_videos', 'cat', '', '#!bx_videos_cats', 0, 'select', '_bx_videos_form_entry_input_sys_cat', '_bx_videos_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_videos_form_entry_input_cat_err', 'Xss', '', 1, 0),
+('bx_videos', 'bx_videos', 'duration', '', '', 0, 'text', '_bx_videos_form_entry_input_sys_duration', '_bx_videos_form_entry_input_duration', '', 1, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0),
+('bx_videos', 'bx_videos', 'added', '', '', 0, 'datetime', '_bx_videos_form_entry_input_sys_date_added', '_bx_videos_form_entry_input_date_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_videos', 'bx_videos', 'changed', '', '', 0, 'datetime', '_bx_videos_form_entry_input_sys_date_changed', '_bx_videos_form_entry_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0);
+
+INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
+('bx_videos_entry_add', 'title', 2147483647, 1, 1),
+('bx_videos_entry_add', 'cat', 2147483647, 1, 2),
+('bx_videos_entry_add', 'text', 2147483647, 1, 3),
+('bx_videos_entry_add', 'videos', 2147483647, 1, 4),
+('bx_videos_entry_add', 'pictures', 2147483647, 1, 5),
+('bx_videos_entry_add', 'allow_view_to', 2147483647, 1, 6),
+('bx_videos_entry_add', 'location', 2147483647, 1, 7),
+('bx_videos_entry_add', 'do_publish', 2147483647, 1, 8),
+
+('bx_videos_entry_delete', 'delete_confirm', 2147483647, 1, 1),
+('bx_videos_entry_delete', 'do_submit', 2147483647, 1, 2),
+
+('bx_videos_entry_edit', 'title', 2147483647, 1, 1),
+('bx_videos_entry_edit', 'cat', 2147483647, 1, 2),
+('bx_videos_entry_edit', 'text', 2147483647, 1, 3),
+('bx_videos_entry_edit', 'videos', 2147483647, 1, 4),
+('bx_videos_entry_edit', 'pictures', 2147483647, 1, 5),
+('bx_videos_entry_edit', 'allow_view_to', 2147483647, 1, 6),
+('bx_videos_entry_edit', 'location', 2147483647, 1, 7),
+('bx_videos_entry_edit', 'do_submit', 2147483647, 1, 8),
+
+('bx_videos_entry_view', 'duration', 2147483647, 1, 1),
+('bx_videos_entry_view', 'cat', 2147483647, 1, 2),
+('bx_videos_entry_view', 'added', 2147483647, 1, 3),
+('bx_videos_entry_view', 'changed', 2147483647, 1, 4);
+
+
+-- PRE-VALUES
+INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
+('bx_videos_cats', '_bx_videos_pre_lists_cats', 'bx_videos', '0');
+
+INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`) VALUES
+('bx_videos_cats', '', 0, '_sys_please_select', ''),
+('bx_videos_cats', '1', 1, '_bx_videos_cat_animals_and_pets', ''),
+('bx_videos_cats', '2', 2, '_bx_videos_cat_education', ''),
+('bx_videos_cats', '3', 3, '_bx_videos_cat_entertainment', ''),
+('bx_videos_cats', '4', 4, '_bx_videos_cat_film_and_animation', ''),
+('bx_videos_cats', '5', 5, '_bx_videos_cat_music', ''),
+('bx_videos_cats', '6', 6, '_bx_videos_cat_news', ''),
+('bx_videos_cats', '7', 7, '_bx_videos_cat_people_and_blogs', ''),
+('bx_videos_cats', '8', 8, '_bx_videos_cat_sports', ''),
+('bx_videos_cats', '9', 9, '_bx_videos_cat_travel', '');
+
+
+-- COMMENTS
+INSERT INTO `sys_objects_cmts` (`Name`, `Module`, `Table`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Nl2br`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `ObjectVote`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
+('bx_videos', 'bx_videos', 'bx_videos_cmts', 1, 5000, 1000, 0, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-video&id={object_id}', '', 'bx_videos_entries', 'id', 'author', 'title', 'comments', '', '');
+
+
+-- VOTES
+INSERT INTO `sys_objects_vote` (`Name`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES 
+('bx_videos', 'bx_videos_votes', 'bx_videos_votes_track', '604800', '1', '1', '0', '1', 'bx_videos_entries', 'id', 'author', 'rate', 'votes', '', ''),
+('bx_videos_stars', 'bx_videos_svotes', 'bx_videos_svotes_track', '604800', '1', '5', '0', '1', 'bx_videos_entries', 'id', 'author', 'srate', 'svotes', '', '');
+
+
+-- REPORTS
+INSERT INTO `sys_objects_report` (`name`, `table_main`, `table_track`, `is_on`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_videos', 'bx_videos_reports', 'bx_videos_reports_track', '1', 'page.php?i=view-video&id={object_id}', 'bx_videos_entries', 'id', 'author', 'reports', '', '');
+
+
+-- VIEWS
+INSERT INTO `sys_objects_view` (`name`, `table_track`, `period`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_videos', 'bx_videos_views_track', '86400', '1', 'bx_videos_entries', 'id', 'author', 'views', '', '');
+
+
+-- FAFORITES
+INSERT INTO `sys_objects_favorite` (`name`, `table_track`, `is_on`, `is_undo`, `is_public`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_videos', 'bx_videos_favorites_track', '1', '1', '1', 'page.php?i=view-video&id={object_id}', 'bx_videos_entries', 'id', 'author', 'favorites', '', '');
+
+
+-- FEATURED
+INSERT INTO `sys_objects_feature` (`name`, `is_on`, `is_undo`, `base_url`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_flag`, `class_name`, `class_file`) VALUES 
+('bx_videos', '1', '1', 'page.php?i=view-video&id={object_id}', 'bx_videos_entries', 'id', 'author', 'featured', '', '');
+
+
+-- CONTENT INFO
+INSERT INTO `sys_objects_content_info` (`name`, `title`, `alert_unit`, `alert_action_add`, `alert_action_update`, `alert_action_delete`, `class_name`, `class_file`) VALUES
+('bx_videos', '_bx_videos', 'bx_videos', 'added', 'edited', 'deleted', '', ''),
+('bx_videos_cmts', '_bx_videos_cmts', 'bx_videos', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
+
+INSERT INTO `sys_content_info_grids` (`object`, `grid_object`, `grid_field_id`, `condition`, `selection`) VALUES
+('bx_videos', 'bx_videos_administration', 'id', '', ''),
+('bx_videos', 'bx_videos_common', 'id', '', '');
+
+
+-- SEARCH EXTENDED
+INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
+('bx_videos', 'bx_videos', 'bx_videos', '_bx_videos_search_extended', 1, '', ''),
+('bx_videos_cmts', 'bx_videos_cmts', 'bx_videos', '_bx_videos_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
+
+
+-- STUDIO: page & widget
+INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
+(3, 'bx_videos', '_bx_videos', '_bx_videos', 'bx_videos@modules/boonex/videos/|std-icon.svg');
+SET @iPageId = LAST_INSERT_ID();
+
+SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
+SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
+INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
+(@iPageId, 'bx_videos', '{url_studio}module.php?name=bx_videos', '', 'bx_videos@modules/boonex/videos/|std-icon.svg', '_bx_videos', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
+INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
+(@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));

+ 66 - 0
modules/boonex/videos/updates/9.0.0_9.0.1/source/install/sql/uninstall.sql

@@ -0,0 +1,66 @@
+
+-- TABLES
+DROP TABLE IF EXISTS `bx_videos_entries`, `bx_videos_photos`, `bx_videos_videos`, `bx_videos_media_resized`, `bx_videos_cmts`, `bx_videos_votes`, `bx_videos_votes_track`, `bx_videos_svotes`, `bx_videos_svotes_track`, `bx_videos_views_track`, `bx_videos_meta_keywords`, `bx_videos_meta_locations`, `bx_videos_meta_mentions`, `bx_videos_reports`, `bx_videos_reports_track`, `bx_videos_favorites_track`;
+
+
+-- STORAGES & TRANSCODERS
+DELETE FROM `sys_objects_storage` WHERE `object` IN ('bx_videos_photos', 'bx_videos_videos', 'bx_videos_media_resized');
+DELETE FROM `sys_storage_tokens` WHERE `object` IN ('bx_videos_photos', 'bx_videos_videos', 'bx_videos_media_resized');
+
+DELETE FROM `sys_objects_transcoder` WHERE `object` IN('bx_videos_preview', 'bx_videos_gallery', 'bx_videos_cover', 'bx_videos_video_poster_preview', 'bx_videos_video_poster_gallery', 'bx_videos_video_poster_cover', 'bx_videos_video_mp4', 'bx_videos_video_webm');
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` IN('bx_videos_preview', 'bx_videos_gallery', 'bx_videos_cover', 'bx_videos_video_poster_preview', 'bx_videos_video_poster_gallery', 'bx_videos_video_poster_cover', 'bx_videos_video_mp4', 'bx_videos_video_webm');
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` IN('bx_videos_preview', 'bx_videos_gallery', 'bx_videos_cover', 'bx_videos_video_poster_preview', 'bx_videos_video_poster_gallery', 'bx_videos_video_poster_cover');
+DELETE FROM `sys_transcoder_videos_files` WHERE `transcoder_object` IN('bx_videos_video_mp4', 'bx_videos_video_webm');
+
+
+-- FORMS
+DELETE FROM `sys_objects_form` WHERE `module` = 'bx_videos';
+DELETE FROM `sys_form_displays` WHERE `module` = 'bx_videos';
+DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_videos';
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN ('bx_videos_entry_add', 'bx_videos_entry_edit', 'bx_videos_entry_view', 'bx_videos_entry_delete');
+
+
+-- PRE-VALUES
+DELETE FROM `sys_form_pre_lists` WHERE `module` = 'bx_videos';
+
+DELETE FROM `sys_form_pre_values` WHERE `Key` IN('bx_videos_cats');
+
+
+-- COMMENTS
+DELETE FROM `sys_objects_cmts` WHERE `Name` = 'bx_videos';
+
+
+-- VOTES
+DELETE FROM `sys_objects_vote` WHERE `Name` IN ('bx_videos', 'bx_videos_stars');
+
+
+-- REPORTS
+DELETE FROM `sys_objects_report` WHERE `name` = 'bx_videos';
+
+
+-- VIEWS
+DELETE FROM `sys_objects_view` WHERE `name` = 'bx_videos';
+
+
+-- FAFORITES
+DELETE FROM `sys_objects_favorite` WHERE `name` = 'bx_videos';
+
+
+-- FEATURED
+DELETE FROM `sys_objects_feature` WHERE `name` = 'bx_videos';
+
+
+-- CONTENT INFO
+DELETE FROM `sys_objects_content_info` WHERE `name` IN ('bx_videos', 'bx_videos_cmts');
+
+DELETE FROM `sys_content_info_grids` WHERE `object` IN ('bx_videos');
+
+
+-- SEARCH EXTENDED
+DELETE FROM `sys_objects_search_extended` WHERE `module` = 'bx_videos';
+
+
+-- STUDIO: page & widget
+DELETE FROM `tp`, `tw`, `tpw`
+USING `sys_std_pages` AS `tp`, `sys_std_widgets` AS `tw`, `sys_std_pages_widgets` AS `tpw`
+WHERE `tp`.`id` = `tw`.`page_id` AND `tw`.`id` = `tpw`.`widget_id` AND `tp`.`name` = 'bx_videos';

+ 1 - 0
modules/boonex/videos/updates/9.0.0_9.0.1/source/template/unit_showcase.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/unit_showcase.html />