Ver Fonte

#2842 Reviews Initial Commit.

Alexander há 6 anos atrás
pai
commit
1008deff30
82 ficheiros alterados com 3200 adições e 0 exclusões
  1. 3 0
      .gitignore
  2. 21 0
      modules/boonex/reviews/classes/BxReviewsAlertsResponse.php
  3. 24 0
      modules/boonex/reviews/classes/BxReviewsCmtsSearchResult.php
  4. 223 0
      modules/boonex/reviews/classes/BxReviewsConfig.php
  5. 36 0
      modules/boonex/reviews/classes/BxReviewsCronPublishing.php
  6. 23 0
      modules/boonex/reviews/classes/BxReviewsDb.php
  7. 180 0
      modules/boonex/reviews/classes/BxReviewsFormEntry.php
  8. 24 0
      modules/boonex/reviews/classes/BxReviewsFormPoll.php
  9. 23 0
      modules/boonex/reviews/classes/BxReviewsFormsEntryHelper.php
  10. 21 0
      modules/boonex/reviews/classes/BxReviewsGridAdministration.php
  11. 21 0
      modules/boonex/reviews/classes/BxReviewsGridCommon.php
  12. 24 0
      modules/boonex/reviews/classes/BxReviewsMenu.php
  13. 25 0
      modules/boonex/reviews/classes/BxReviewsMenuAttachments.php
  14. 25 0
      modules/boonex/reviews/classes/BxReviewsMenuManageTools.php
  15. 22 0
      modules/boonex/reviews/classes/BxReviewsMenuSnippetMeta.php
  16. 24 0
      modules/boonex/reviews/classes/BxReviewsMenuView.php
  17. 35 0
      modules/boonex/reviews/classes/BxReviewsMenuViewActions.php
  18. 67 0
      modules/boonex/reviews/classes/BxReviewsModule.php
  19. 24 0
      modules/boonex/reviews/classes/BxReviewsPageAuthor.php
  20. 24 0
      modules/boonex/reviews/classes/BxReviewsPageBrowse.php
  21. 32 0
      modules/boonex/reviews/classes/BxReviewsPageEntry.php
  22. 129 0
      modules/boonex/reviews/classes/BxReviewsSearchResult.php
  23. 26 0
      modules/boonex/reviews/classes/BxReviewsStudioPage.php
  24. 35 0
      modules/boonex/reviews/classes/BxReviewsTemplate.php
  25. 27 0
      modules/boonex/reviews/classes/BxReviewsUploaderHTML5.php
  26. 27 0
      modules/boonex/reviews/classes/BxReviewsUploaderHTML5Attach.php
  27. 27 0
      modules/boonex/reviews/classes/BxReviewsUploaderSimple.php
  28. 27 0
      modules/boonex/reviews/classes/BxReviewsUploaderSimpleAttach.php
  29. 22 0
      modules/boonex/reviews/classes/BxReviewsVotePollAnswers.php
  30. 150 0
      modules/boonex/reviews/install/config.php
  31. 20 0
      modules/boonex/reviews/install/installer.php
  32. 318 0
      modules/boonex/reviews/install/langs/en.xml
  33. 54 0
      modules/boonex/reviews/install/sql/disable.sql
  34. 496 0
      modules/boonex/reviews/install/sql/enable.sql
  35. 574 0
      modules/boonex/reviews/install/sql/install.sql
  36. 61 0
      modules/boonex/reviews/install/sql/uninstall.sql
  37. 56 0
      modules/boonex/reviews/js/manage_tools.js
  38. 21 0
      modules/boonex/reviews/js/polls.js
  39. 18 0
      modules/boonex/reviews/request.php
  40. 3 0
      modules/boonex/reviews/template/attachments.html
  41. 3 0
      modules/boonex/reviews/template/author.html
  42. 1 0
      modules/boonex/reviews/template/author_link.html
  43. 1 0
      modules/boonex/reviews/template/badges.html
  44. 1 0
      modules/boonex/reviews/template/category_list_inline.html
  45. 1 0
      modules/boonex/reviews/template/context.html
  46. 1 0
      modules/boonex/reviews/template/css/categories.css
  47. 1 0
      modules/boonex/reviews/template/css/forms.css
  48. 1 0
      modules/boonex/reviews/template/css/main.css
  49. 1 0
      modules/boonex/reviews/template/css/manage_tools.css
  50. 1 0
      modules/boonex/reviews/template/css/polls.css
  51. 3 0
      modules/boonex/reviews/template/entry-all-actions.html
  52. 3 0
      modules/boonex/reviews/template/entry-location.html
  53. 1 0
      modules/boonex/reviews/template/entry-share.html
  54. 1 0
      modules/boonex/reviews/template/entry-text.html
  55. 1 0
      modules/boonex/reviews/template/form_categories.html
  56. 22 0
      modules/boonex/reviews/template/form_ghost_template.html
  57. 16 0
      modules/boonex/reviews/template/form_ghost_template_cover.html
  58. 19 0
      modules/boonex/reviews/template/form_ghost_template_file.html
  59. 22 0
      modules/boonex/reviews/template/form_ghost_template_video.html
  60. 77 0
      modules/boonex/reviews/template/images/icons/std-icon.svg
  61. 1 0
      modules/boonex/reviews/template/poll_answer_ve_block.html
  62. 1 0
      modules/boonex/reviews/template/poll_form.html
  63. 1 0
      modules/boonex/reviews/template/poll_form_answers.html
  64. 1 0
      modules/boonex/reviews/template/poll_form_field.html
  65. 1 0
      modules/boonex/reviews/template/poll_item.html
  66. 1 0
      modules/boonex/reviews/template/poll_item_answers.html
  67. 1 0
      modules/boonex/reviews/template/poll_item_results.html
  68. 1 0
      modules/boonex/reviews/template/poll_items.html
  69. 1 0
      modules/boonex/reviews/template/poll_items_embed.html
  70. 1 0
      modules/boonex/reviews/template/poll_items_showcase.html
  71. 1 0
      modules/boonex/reviews/template/title_link.html
  72. 2 0
      modules/boonex/reviews/template/unit.html
  73. 1 0
      modules/boonex/reviews/template/unit_full.html
  74. 3 0
      modules/boonex/reviews/template/unit_full_private.html
  75. 1 0
      modules/boonex/reviews/template/unit_gallery.html
  76. 3 0
      modules/boonex/reviews/template/unit_gallery_private.html
  77. 3 0
      modules/boonex/reviews/template/unit_live_search.html
  78. 1 0
      modules/boonex/reviews/template/unit_meta_item.html
  79. 3 0
      modules/boonex/reviews/template/unit_private.html
  80. 1 0
      modules/boonex/reviews/template/unit_showcase.html
  81. 1 0
      modules/boonex/reviews/template/uploader_button_html5_attach.html
  82. 1 0
      modules/boonex/reviews/template/uploader_button_simple_attach.html

+ 3 - 0
.gitignore

@@ -31,3 +31,6 @@ modules/boonex/market_api
 modules/boonex/messenger
 modules/boonex/messenger
 modules/boonex/una_mods
 modules/boonex/una_mods
 modules/vendor
 modules/vendor
+
+# Exclude IDE project folder
+/.idea

+ 21 - 0
modules/boonex/reviews/classes/BxReviewsAlertsResponse.php

@@ -0,0 +1,21 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxReviewsAlertsResponse extends BxBaseModTextAlertsResponse
+{
+    public function __construct()
+    {
+        $this->MODULE = 'bx_reviews';
+        parent::__construct();
+    }
+}
+
+/** @} */

+ 24 - 0
modules/boonex/reviews/classes/BxReviewsCmtsSearchResult.php

@@ -0,0 +1,24 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxReviewsCmtsSearchResult extends BxBaseModGeneralCmtsSearchResult
+{
+    function __construct($sMode = '', $aParams = array())
+    {
+    	$this->sModule = 'bx_reviews';
+
+        parent::__construct($sMode, $aParams);
+
+        $this->aCurrent['title'] = _t('_bx_reviews_page_block_title_browse_cmts');
+    }
+}
+
+/** @} */

+ 223 - 0
modules/boonex/reviews/classes/BxReviewsConfig.php

@@ -0,0 +1,223 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+bx_import('BxDolInformer');
+
+class BxReviewsConfig extends BxBaseModTextConfig
+{
+    function __construct($aModule)
+    {
+        parent::__construct($aModule);
+
+        $aMenuItems2Methods = array (
+            'edit-review' => 'checkAllowedEdit',
+            'delete-review' => 'checkAllowedDelete',
+        );
+
+        $this->CNF = array_merge($this->CNF, array (
+
+            // module icon
+            'ICON' => 'address-card col-red3',
+
+            // database tables
+            'TABLE_ENTRIES' => $aModule['db_prefix'] . 'reviews',
+            'TABLE_ENTRIES_FULLTEXT' => 'title_text',
+
+            // database fields
+            'FIELD_ID' => 'id',
+            'FIELD_AUTHOR' => 'author',
+            'FIELD_ADDED' => 'added',
+            'FIELD_CHANGED' => 'changed',
+            'FIELD_PUBLISHED' => 'published',
+            'FIELD_TITLE' => 'title',
+            'FIELD_TEXT' => 'text',
+            'FIELD_TEXT_ID' => 'review-text',
+            'FIELD_CATEGORY' => 'cat',
+            'FIELD_MULTICAT' => 'multicat',
+            'FIELD_ALLOW_VIEW_TO' => 'allow_view_to',
+            'FIELD_COVER' => 'covers',
+            'FIELD_PHOTO' => 'pictures',
+            'FIELD_VIDEO' => 'videos',
+            'FIELD_FILE' => 'files',
+            'FIELD_POLL' => 'polls',
+            'FIELD_THUMB' => 'thumb',
+            'FIELD_ATTACHMENTS' => 'attachments',
+            'FIELD_VIEWS' => 'views',
+            'FIELD_COMMENTS' => 'comments',
+            'FIELD_STATUS' => 'status',
+            'FIELD_STATUS_ADMIN' => 'status_admin',
+            'FIELD_LOCATION' => 'location',
+            'FIELD_LOCATION_PREFIX' => 'location',
+            'FIELD_LABELS' => 'labels',
+            'FIELD_ANONYMOUS' => 'anonymous',
+            'FIELD_DISABLE_COMMENTS' => 'disable_comments',
+            'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
+            'FIELDS_DELAYED_PROCESSING' => 'videos', // can be array of fields or comma separated string of field names
+
+             // some params
+            'PARAM_MULTICAT_ENABLED' => true,
+            'PARAM_MULTICAT_AUTO_ACTIVATION_FOR_CATEGORIES' => 'bx_reviews_auto_activation_for_categories',
+            
+            // page URIs
+            'URI_VIEW_ENTRY' => 'view-review',
+            'URI_AUTHOR_ENTRIES' => 'reviews-author',
+            'URI_ENTRIES_BY_CONTEXT' => 'reviews-context',
+            'URI_ADD_ENTRY' => 'create-review',
+            'URI_EDIT_ENTRY' => 'edit-review',
+            'URI_MANAGE_COMMON' => 'reviews-manage',
+
+            'URL_HOME' => 'page.php?i=reviews-home',
+            'URL_POPULAR' => 'page.php?i=reviews-popular',
+            'URL_TOP' => 'page.php?i=reviews-top',
+            'URL_UPDATED' => 'page.php?i=reviews-updated',
+            'URL_MANAGE_COMMON' => 'page.php?i=reviews-manage',
+            'URL_MANAGE_ADMINISTRATION' => 'page.php?i=reviews-administration',
+
+            // some params
+            'PARAM_CHARS_SUMMARY' => 'bx_reviews_summary_chars',
+            'PARAM_CHARS_SUMMARY_PLAIN' => 'bx_reviews_plain_summary_chars',
+            'PARAM_NUM_RSS' => 'bx_reviews_rss_num',
+            'PARAM_SEARCHABLE_FIELDS' => 'bx_reviews_searchable_fields',
+            'PARAM_PER_PAGE_BROWSE_SHOWCASE' => 'bx_reviews_per_page_browse_showcase',
+
+            // objects
+            'OBJECT_STORAGE' => 'bx_reviews_covers',
+            'OBJECT_STORAGE_FILES' => 'bx_reviews_files',
+            'OBJECT_STORAGE_PHOTOS' => 'bx_reviews_photos',
+            'OBJECT_STORAGE_VIDEOS' => 'bx_reviews_videos',
+            'OBJECT_IMAGES_TRANSCODER_PREVIEW' => 'bx_reviews_preview',
+            'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_reviews_gallery',
+            'OBJECT_IMAGES_TRANSCODER_COVER' => 'bx_reviews_cover',
+            'OBJECT_IMAGES_TRANSCODER_PREVIEW_FILES' => 'bx_reviews_preview_files',
+            'OBJECT_IMAGES_TRANSCODER_GALLERY_FILES' => 'bx_reviews_gallery_files',
+            'OBJECT_IMAGES_TRANSCODER_PREVIEW_PHOTOS' => 'bx_reviews_preview_photos',
+            'OBJECT_IMAGES_TRANSCODER_GALLERY_PHOTOS' => 'bx_reviews_gallery_photos',
+            'OBJECT_VIDEOS_TRANSCODERS' => array(
+                'poster' => 'bx_reviews_videos_poster', 
+            	'poster_preview' => 'bx_reviews_videos_poster_preview',
+            	'mp4' => 'bx_reviews_videos_mp4', 
+            	'mp4_hd' => 'bx_reviews_videos_mp4_hd'
+            ),
+            'OBJECT_VIDEO_TRANSCODER_HEIGHT' => '480px',
+            'OBJECT_REPORTS' => 'bx_reviews',
+            'OBJECT_VIEWS' => 'bx_reviews',
+            'OBJECT_VOTES' => 'bx_reviews',
+            'OBJECT_REACTIONS' => 'bx_reviews_reactions',
+            'OBJECT_SCORES' => 'bx_reviews',
+            'OBJECT_FAVORITES' => 'bx_reviews',
+            'OBJECT_FEATURED' => 'bx_reviews',
+            'OBJECT_METATAGS' => 'bx_reviews',
+            'OBJECT_COMMENTS' => 'bx_reviews',
+            'OBJECT_NOTES' => 'bx_reviews_notes',
+            'OBJECT_CATEGORY' => 'bx_reviews_cats',
+            'OBJECT_PRIVACY_VIEW' => 'bx_reviews_allow_view_to',
+            'OBJECT_FORM_ENTRY' => 'bx_reviews',
+            'OBJECT_FORM_ENTRY_DISPLAY_VIEW' => 'bx_reviews_entry_view',
+            'OBJECT_FORM_ENTRY_DISPLAY_ADD' => 'bx_reviews_entry_add',
+            'OBJECT_FORM_ENTRY_DISPLAY_EDIT' => 'bx_reviews_entry_edit',
+            'OBJECT_FORM_ENTRY_DISPLAY_DELETE' => 'bx_reviews_entry_delete',
+            'OBJECT_FORM_POLL' => 'bx_reviews_poll',
+            'OBJECT_FORM_POLL_DISPLAY_ADD' => 'bx_reviews_poll_add',
+            'OBJECT_MENU_ENTRY_ATTACHMENTS' => 'bx_reviews_entry_attachments', // attachments menu in create/edit forms
+            'OBJECT_MENU_ACTIONS_VIEW_ENTRY' => 'bx_reviews_view', // actions menu on view entry page
+            'OBJECT_MENU_ACTIONS_VIEW_ENTRY_ALL' => 'bx_reviews_view_actions', // all actions menu on view entry page
+            'OBJECT_MENU_ACTIONS_MY_ENTRIES' => 'bx_reviews_my', // actions menu on my entries page
+            'OBJECT_MENU_SUBMENU' => 'bx_reviews_submenu', // main module submenu
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY' => 'bx_reviews_view_submenu', // view entry submenu
+            'OBJECT_MENU_SUBMENU_VIEW_ENTRY_MAIN_SELECTION' => 'reviews-home', // first item in view entry submenu from main module submenu
+            'OBJECT_MENU_SNIPPET_META' => 'bx_reviews_snippet_meta', // menu for snippet meta info
+            'OBJECT_MENU_MANAGE_TOOLS' => 'bx_reviews_menu_manage_tools', //manage menu in content administration tools
+            'OBJECT_GRID_ADMINISTRATION' => 'bx_reviews_administration',
+            'OBJECT_GRID_COMMON' => 'bx_reviews_common',
+            'OBJECT_GRID_CATEGORIES' => 'bx_reviews_categories',
+            'OBJECT_UPLOADERS' => array('bx_reviews_simple', 'bx_reviews_html5'),
+            'OBJECT_CONTENT_INFO' => 'bx_reviews',
+            'OBJECT_CMTS_CONTENT_INFO' => 'bx_reviews_cmts',
+            
+            'BADGES_AVALIABLE' => true,
+
+            // menu items which visibility depends on custom visibility checking
+            'MENU_ITEM_TO_METHOD' => array (
+                'bx_reviews_my' => array (
+                    'create-review' => 'checkAllowedAdd',
+                ),
+                'bx_reviews_view' => $aMenuItems2Methods,
+            ),
+
+            // informer messages
+            'INFORMERS' => array (
+                'processing' => array (
+                    'name' => 'bx-reviews-processing',
+                    'map' => array (
+                        'awaiting' => array('msg' => '_bx_reviews_txt_processing_awaiting', 'type' => BX_INFORMER_ALERT),
+                        'failed' => array('msg' => '_bx_reviews_txt_processing_failed', 'type' => BX_INFORMER_ERROR)
+                    ),
+                ),
+                'scheduled' => array (
+                    'name' => 'bx-reviews-scheduled',
+                    'map' => array (
+                        'awaiting' => array('msg' => '_bx_reviews_txt_scheduled_awaiting', 'type' => BX_INFORMER_ALERT),
+                    ),
+                ),
+            ),
+
+            // some language keys
+            'T' => array (
+                'txt_sample_single' => '_bx_reviews_txt_sample_single',
+            	'txt_sample_single_with_article' => '_bx_reviews_txt_sample_single_with_article',
+            	'txt_sample_comment_single' => '_bx_reviews_txt_sample_comment_single',
+            	'txt_sample_vote_single' => '_bx_reviews_txt_sample_vote_single',
+                'txt_sample_reaction_single' => '_bx_reviews_txt_sample_reaction_single',
+                'txt_sample_score_up_single' => '_bx_reviews_txt_sample_score_up_single',
+                'txt_sample_score_down_single' => '_bx_reviews_txt_sample_score_down_single',
+                'form_field_author' => '_bx_reviews_form_entry_input_author',
+            	'grid_action_err_delete' => '_bx_reviews_grid_action_err_delete',
+            	'grid_txt_account_manager' => '_bx_reviews_grid_txt_account_manager',
+                'filter_item_active' => '_bx_reviews_grid_filter_item_title_adm_active',
+            	'filter_item_hidden' => '_bx_reviews_grid_filter_item_title_adm_hidden',
+            	'filter_item_select_one_filter1' => '_bx_reviews_grid_filter_item_title_adm_select_one_filter1',
+            	'menu_item_manage_my' => '_bx_reviews_menu_item_title_manage_my',
+            	'menu_item_manage_all' => '_bx_reviews_menu_item_title_manage_all',
+                'txt_all_entries_by' => '_bx_reviews_txt_all_entries_by',
+                'txt_all_entries_in' => '_bx_reviews_txt_all_entries_in',
+                'txt_all_entries_by_author' => '_bx_reviews_page_title_browse_by_author',
+                'txt_all_entries_by_context' => '_bx_reviews_page_title_browse_by_context',
+                'txt_err_cannot_perform_action' => '_bx_reviews_txt_err_cannot_perform_action',
+                'txt_poll_form_answers_add' => '_bx_reviews_form_poll_input_answers_add',
+                'txt_poll_menu_view_answers' => '_bx_reviews_txt_poll_view_answers',
+                'txt_poll_menu_view_results' => '_bx_reviews_txt_poll_view_results',
+                'txt_poll_menu_view_' => '_bx_reviews_txt_poll_view_',
+                'txt_poll_answer_vote_do_by' => '_bx_reviews_txt_poll_answer_vote_do_by',
+                'txt_poll_answer_vote_counter' => '_bx_reviews_txt_poll_answer_vote_counter',
+                'txt_poll_answer_vote_percent' => '_bx_reviews_txt_poll_answer_vote_percent'
+            ),
+        ));
+        
+        $this->_aJsClasses = array_merge($this->_aJsClasses, array(
+            'manage_tools' => 'BxReviewsManageTools',
+            'categories' => 'BxDolCategories'
+        ));
+
+        $this->_aJsObjects = array_merge($this->_aJsObjects, array(
+            'manage_tools' => 'oBxReviewsManageTools',
+             'categories' => 'oBxDolCategories'
+        ));
+
+        $this->_aGridObjects = array(
+            'common' => $this->CNF['OBJECT_GRID_COMMON'],
+            'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION'],
+        );
+
+        $this->_bAttachmentsInTimeline = true;
+    }
+}
+
+/** @} */

+ 36 - 0
modules/boonex/reviews/classes/BxReviewsCronPublishing.php

@@ -0,0 +1,36 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxReviewsCronPublishing extends BxDolCron
+{
+    protected $_sModule;
+    protected $_oModule;
+
+    public function __construct()
+    {
+        parent::__construct();
+
+    	$this->_sModule = 'bx_reviews';
+    	$this->_oModule = BxDolModule::getInstance($this->_sModule);
+    }
+
+    function processing()
+    {
+        $mixedIds = $this->_oModule->_oDb->publishEntries();
+        if($mixedIds === false)
+            return;
+
+        foreach($mixedIds as $iId)
+            $this->_oModule->onPublished($iId);
+    }
+}
+
+/** @} */

+ 23 - 0
modules/boonex/reviews/classes/BxReviewsDb.php

@@ -0,0 +1,23 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/*
+ * Module database queries
+ */
+class BxReviewsDb extends BxBaseModTextDb
+{
+    function __construct(&$oConfig)
+    {
+        parent::__construct($oConfig);
+    }
+}
+
+/** @} */

+ 180 - 0
modules/boonex/reviews/classes/BxReviewsFormEntry.php

@@ -0,0 +1,180 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Create/Edit entry form
+ */
+class BxReviewsFormEntry extends BxBaseModTextFormEntry
+{
+    protected $_sGhostTemplateCover = 'form_ghost_template_cover.html';
+	
+    public function __construct($aInfo, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_reviews';
+        parent::__construct($aInfo, $oTemplate);
+
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+    	if(isset($CNF['FIELD_COVER']) && isset($this->aInputs[$CNF['FIELD_COVER']])) {
+            if($this->_oModule->checkAllowedSetThumb() === CHECK_ACTION_RESULT_ALLOWED) {
+                $this->aInputs[$CNF['FIELD_COVER']]['storage_object'] = $CNF['OBJECT_STORAGE'];
+                $this->aInputs[$CNF['FIELD_COVER']]['uploaders'] = !empty($this->aInputs[$CNF['FIELD_COVER']]['value']) ? unserialize($this->aInputs[$CNF['FIELD_COVER']]['value']) : $CNF['OBJECT_UPLOADERS'];
+                $this->aInputs[$CNF['FIELD_COVER']]['upload_buttons_titles'] = array(
+                    'Simple' => _t('_bx_reviews_form_entry_input_covers_uploader_simple_title'), 
+                    'HTML5' => _t('_bx_reviews_form_entry_input_covers_uploader_html5_title')
+                );
+                $this->aInputs[$CNF['FIELD_COVER']]['images_transcoder'] = $CNF['OBJECT_IMAGES_TRANSCODER_PREVIEW'];
+                $this->aInputs[$CNF['FIELD_COVER']]['storage_private'] = 0;
+                $this->aInputs[$CNF['FIELD_COVER']]['multiple'] = false;
+                $this->aInputs[$CNF['FIELD_COVER']]['content_id'] = 0;
+                $this->aInputs[$CNF['FIELD_COVER']]['ghost_template'] = '';
+            }
+            else
+                unset($this->aInputs[$CNF['FIELD_COVER']]);
+        }
+
+        if(isset($CNF['FIELD_PHOTO']) && isset($this->aInputs[$CNF['FIELD_PHOTO']])) {
+            $this->aInputs[$CNF['FIELD_PHOTO']]['storage_object'] = $CNF['OBJECT_STORAGE_PHOTOS'];
+            $this->aInputs[$CNF['FIELD_PHOTO']]['uploaders'] = !empty($this->aInputs[$CNF['FIELD_PHOTO']]['value']) ? unserialize($this->aInputs[$CNF['FIELD_PHOTO']]['value']) : $CNF['OBJECT_UPLOADERS'];
+            $this->aInputs[$CNF['FIELD_PHOTO']]['images_transcoder'] = $CNF['OBJECT_IMAGES_TRANSCODER_PREVIEW_PHOTOS'];
+            $this->aInputs[$CNF['FIELD_PHOTO']]['storage_private'] = 0;
+            $this->aInputs[$CNF['FIELD_PHOTO']]['multiple'] = true;
+            $this->aInputs[$CNF['FIELD_PHOTO']]['content_id'] = 0;
+            $this->aInputs[$CNF['FIELD_PHOTO']]['ghost_template'] = '';
+            $this->aInputs[$CNF['FIELD_PHOTO']]['tr_attrs'] = array('class'=> 'bx-base-text-attachment-item');
+        }
+
+        if(isset($this->aInputs[$CNF['FIELD_VIDEO']])) {
+            $this->aInputs[$CNF['FIELD_VIDEO']]['storage_object'] = $CNF['OBJECT_STORAGE_VIDEOS'];
+            $this->aInputs[$CNF['FIELD_VIDEO']]['uploaders'] = !empty($this->aInputs[$CNF['FIELD_VIDEO']]['value']) ? unserialize($this->aInputs[$CNF['FIELD_VIDEO']]['value']) : $CNF['OBJECT_UPLOADERS'];
+            $this->aInputs[$CNF['FIELD_VIDEO']]['images_transcoder'] = $CNF['OBJECT_VIDEOS_TRANSCODERS']['poster_preview'];
+            $this->aInputs[$CNF['FIELD_VIDEO']]['storage_private'] = 0;
+            $this->aInputs[$CNF['FIELD_VIDEO']]['multiple'] = true;
+            $this->aInputs[$CNF['FIELD_VIDEO']]['content_id'] = 0;
+            $this->aInputs[$CNF['FIELD_VIDEO']]['ghost_template'] = '';
+            $this->aInputs[$CNF['FIELD_VIDEO']]['tr_attrs'] = array('class'=> 'bx-base-text-attachment-item');
+        }
+
+        if (isset($CNF['FIELD_FILE']) && isset($this->aInputs[$CNF['FIELD_FILE']])) {
+            $this->aInputs[$CNF['FIELD_FILE']]['storage_object'] = $CNF['OBJECT_STORAGE_FILES'];
+            $this->aInputs[$CNF['FIELD_FILE']]['uploaders'] = !empty($this->aInputs[$CNF['FIELD_FILE']]['value']) ? unserialize($this->aInputs[$CNF['FIELD_FILE']]['value']) : $CNF['OBJECT_UPLOADERS'];
+            $this->aInputs[$CNF['FIELD_FILE']]['images_transcoder'] = $CNF['OBJECT_IMAGES_TRANSCODER_PREVIEW_FILES'];
+            $this->aInputs[$CNF['FIELD_FILE']]['storage_private'] = 0;
+            $this->aInputs[$CNF['FIELD_FILE']]['multiple'] = true;
+            $this->aInputs[$CNF['FIELD_FILE']]['content_id'] = 0;
+            $this->aInputs[$CNF['FIELD_FILE']]['ghost_template'] = '';
+            $this->aInputs[$CNF['FIELD_FILE']]['tr_attrs'] = array('class'=> 'bx-base-text-attachment-item');
+        }
+
+        if(isset($this->aInputs[$CNF['FIELD_POLL']])) {
+            $this->aInputs[$CNF['FIELD_POLL']]['tr_attrs'] = array('class'=> 'bx-base-text-attachment-item');
+        }
+    }
+
+    function initChecker ($aValues = array (), $aSpecificValues = array())
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        $bValues = $aValues && !empty($aValues['id']);
+        $aContentInfo = $bValues ? $this->_oModule->_oDb->getContentInfoById($aValues['id']) : false;
+
+        if($this->aParams['display'] == $CNF['OBJECT_FORM_ENTRY_DISPLAY_EDIT'] && isset($CNF['FIELD_PUBLISHED']) && isset($this->aInputs[$CNF['FIELD_PUBLISHED']]))
+            if($bValues && in_array($aValues[$CNF['FIELD_STATUS']], array('active', 'hidden')))
+                unset($this->aInputs[$CNF['FIELD_PUBLISHED']]);
+
+        if (isset($CNF['FIELD_COVER']) && isset($this->aInputs[$CNF['FIELD_COVER']])) {
+            if($bValues)
+                $this->aInputs[$CNF['FIELD_COVER']]['content_id'] = $aValues['id'];
+
+            $this->aInputs[$CNF['FIELD_COVER']]['ghost_template'] = $this->_oModule->_oTemplate->parseHtmlByName($this->_sGhostTemplateCover, $this->_getCoverGhostTmplVars($aContentInfo));
+        }
+
+        parent::initChecker ($aValues, $aSpecificValues);
+    }
+
+    public function insert ($aValsToAdd = array(), $isIgnore = false)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        if(isset($CNF['FIELD_ADDED']) && empty($aValsToAdd[$CNF['FIELD_ADDED']])) {
+            $iAdded = 0;
+            if(isset($this->aInputs[$CNF['FIELD_ADDED']]))
+                $iAdded = $this->getCleanValue($CNF['FIELD_ADDED']);
+            
+            if(empty($iAdded))
+                 $iAdded = time();
+
+            $aValsToAdd[$CNF['FIELD_ADDED']] = $iAdded;
+        }
+
+        if(empty($aValsToAdd[$CNF['FIELD_PUBLISHED']])) {
+            $iPublished = 0;
+            if(isset($this->aInputs[$CNF['FIELD_PUBLISHED']]))
+                $iPublished = $this->getCleanValue($CNF['FIELD_PUBLISHED']);
+                
+             if(empty($iPublished))
+                 $iPublished = time();
+
+             $aValsToAdd[$CNF['FIELD_PUBLISHED']] = $iPublished;
+        }
+
+        $aValsToAdd[$CNF['FIELD_STATUS']] = $aValsToAdd[$CNF['FIELD_PUBLISHED']] > $aValsToAdd[$CNF['FIELD_ADDED']] ? 'awaiting' : 'active';
+
+        $iContentId = parent::insert ($aValsToAdd, $isIgnore);
+        if(!empty($iContentId)){
+            $this->processFiles($CNF['FIELD_COVER'], $iContentId, true);
+        }
+        return $iContentId;
+    }
+
+    function update ($iContentId, $aValsToAdd = array(), &$aTrackTextFieldsChanges = null)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        if(empty($aValsToAdd[$CNF['FIELD_PUBLISHED']]) && isset($this->aInputs[$CNF['FIELD_PUBLISHED']])) {
+            $iPublished = $this->getCleanValue($CNF['FIELD_PUBLISHED']);
+            if(empty($iPublished))
+                $iPublished = time();
+
+            $aValsToAdd[$CNF['FIELD_PUBLISHED']] = $iPublished;
+        }
+        
+        $iResult = parent::update ($iContentId, $aValsToAdd, $aTrackTextFieldsChanges);
+        $this->processFiles($CNF['FIELD_COVER'], $iContentId, false);   
+        return $iResult;
+    }
+
+    protected function _getCoverGhostTmplVars($aContentInfo = array())
+    {
+    	$CNF = &$this->_oModule->_oConfig->CNF;
+
+    	return array (
+            'name' => $this->aInputs[$CNF['FIELD_COVER']]['name'],
+            'content_id' => $this->aInputs[$CNF['FIELD_COVER']]['content_id'],
+            'editor_id' => isset($CNF['FIELD_TEXT_ID']) ? $CNF['FIELD_TEXT_ID'] : '',
+            'thumb_id' => isset($CNF['FIELD_THUMB']) && isset($aContentInfo[$CNF['FIELD_THUMB']]) ? $aContentInfo[$CNF['FIELD_THUMB']] : 0,
+            'name_thumb' => isset($CNF['FIELD_THUMB']) ? $CNF['FIELD_THUMB'] : ''
+        );
+    }
+
+    protected function _getPhotoGhostTmplVars($aContentInfo = array())
+    {
+    	$CNF = &$this->_oModule->_oConfig->CNF;
+
+    	return array (
+            'name' => $this->aInputs[$CNF['FIELD_PHOTO']]['name'],
+            'content_id' => (int)$this->aInputs[$CNF['FIELD_PHOTO']]['content_id'],
+            'editor_id' => isset($CNF['FIELD_TEXT_ID']) ? $CNF['FIELD_TEXT_ID'] : ''
+    	);
+    }
+}
+
+/** @} */

+ 24 - 0
modules/boonex/reviews/classes/BxReviewsFormPoll.php

@@ -0,0 +1,24 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxReviewsFormPoll extends BxBaseModTextFormPoll
+{
+    public function __construct($aInfo, $oTemplate = false)
+    {
+        $this->_sModule = 'bx_reviews';
+        $this->_aFieldsCheckForSpam = array('answers');
+        parent::__construct($aInfo, $oTemplate);
+    }
+}
+
+class BxReviewsFormPollCheckerHelper extends BxBaseModTextFormPollCheckerHelper {}
+
+/** @} */

+ 23 - 0
modules/boonex/reviews/classes/BxReviewsFormsEntryHelper.php

@@ -0,0 +1,23 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Entry forms helper functions
+ */
+class BxReviewsFormsEntryHelper extends BxBaseModTextFormsEntryHelper
+{
+    public function __construct($oModule)
+    {
+        parent::__construct($oModule);
+    }
+}
+
+/** @} */

+ 21 - 0
modules/boonex/reviews/classes/BxReviewsGridAdministration.php

@@ -0,0 +1,21 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ * 
+ * @{
+ */
+
+class BxReviewsGridAdministration extends BxBaseModTextGridAdministration
+{
+    public function __construct ($aOptions, $oTemplate = false)
+    {
+    	$this->MODULE = 'bx_reviews';
+        parent::__construct ($aOptions, $oTemplate);
+    }
+}
+
+/** @} */

+ 21 - 0
modules/boonex/reviews/classes/BxReviewsGridCommon.php

@@ -0,0 +1,21 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ * 
+ * @{
+ */
+
+class BxReviewsGridCommon extends BxBaseModTextGridCommon
+{
+    public function __construct ($aOptions, $oTemplate = false)
+    {
+    	$this->MODULE = 'bx_reviews';
+        parent::__construct ($aOptions, $oTemplate);
+    }
+}
+
+/** @} */

+ 24 - 0
modules/boonex/reviews/classes/BxReviewsMenu.php

@@ -0,0 +1,24 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * General class for module menu.
+ */
+class BxReviewsMenu extends BxBaseModTextMenu
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_reviews';
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 25 - 0
modules/boonex/reviews/classes/BxReviewsMenuAttachments.php

@@ -0,0 +1,25 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * View entry menu
+ */
+class BxReviewsMenuAttachments extends BxBaseModTextMenuAttachments
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->_sModule = 'bx_reviews';
+
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 25 - 0
modules/boonex/reviews/classes/BxReviewsMenuManageTools.php

@@ -0,0 +1,25 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * 'Reviews manage tools' menu.
+ */
+class BxReviewsMenuManageTools extends BxBaseModTextMenuManageTools
+{
+
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_reviews';
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 22 - 0
modules/boonex/reviews/classes/BxReviewsMenuSnippetMeta.php

@@ -0,0 +1,22 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxReviewsMenuSnippetMeta extends BxBaseModTextMenuSnippetMeta
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->_sModule = 'bx_reviews';
+
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 24 - 0
modules/boonex/reviews/classes/BxReviewsMenuView.php

@@ -0,0 +1,24 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * View entry menu
+ */
+class BxReviewsMenuView extends BxBaseModTextMenuView
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_reviews';
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 35 - 0
modules/boonex/reviews/classes/BxReviewsMenuViewActions.php

@@ -0,0 +1,35 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * View entry social actions menu
+ */
+class BxReviewsMenuViewActions extends BxBaseModTextMenuViewActions
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->_sModule = 'bx_reviews';
+
+        parent::__construct($aObject, $oTemplate);
+    }
+
+    protected function _getMenuItemEditReview($aItem)
+    {
+        return $this->_getMenuItemByNameActions($aItem);
+    }
+
+    protected function _getMenuItemDeleteReview($aItem)
+    {
+        return $this->_getMenuItemByNameActions($aItem);
+    }
+}
+
+/** @} */

+ 67 - 0
modules/boonex/reviews/classes/BxReviewsModule.php

@@ -0,0 +1,67 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Reviews module
+ */
+class BxReviewsModule extends BxBaseModTextModule
+{
+    function __construct(&$aModule)
+    {
+        parent::__construct($aModule);
+
+        $CNF = &$this->_oConfig->CNF;
+        $this->_aSearchableNamesExcept = array_merge($this->_aSearchableNamesExcept, array(
+            $CNF['FIELD_PUBLISHED'],
+            $CNF['FIELD_DISABLE_COMMENTS']
+        ));
+    }
+
+    /**
+     * Entry post for Timeline module
+     */
+    public function serviceGetTimelinePost($aEvent, $aBrowseParams = array())
+    {
+        $CNF = &$this->_oConfig->CNF;
+
+        $aResult = parent::serviceGetTimelinePost($aEvent, $aBrowseParams);
+        if(empty($aResult) || !is_array($aResult) || empty($aResult['date']))
+            return $aResult;
+
+        $aContentInfo = $this->_oDb->getContentInfoById($aEvent['object_id']);
+        if($aContentInfo[$CNF['FIELD_PUBLISHED']] > $aResult['date'])
+            $aResult['date'] = $aContentInfo[$CNF['FIELD_PUBLISHED']];
+
+        return $aResult;
+    }
+
+    public function serviceCheckAllowedCommentsPost($iContentId, $sObjectComments) 
+    {
+        $CNF = &$this->_oConfig->CNF;
+        $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
+        if ($aContentInfo[$CNF['FIELD_DISABLE_COMMENTS']] == 1)
+            return false;
+
+        return parent::serviceCheckAllowedCommentsPost($iContentId, $sObjectComments);
+    }
+	
+	public function serviceCheckAllowedCommentsView($iContentId, $sObjectComments) 
+    {
+        $CNF = &$this->_oConfig->CNF;
+        $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
+        if ($aContentInfo[$CNF['FIELD_DISABLE_COMMENTS']] == 1)
+            return false;
+
+        return parent::serviceCheckAllowedCommentsView($iContentId, $sObjectComments);
+    }
+}
+
+/** @} */

+ 24 - 0
modules/boonex/reviews/classes/BxReviewsPageAuthor.php

@@ -0,0 +1,24 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Profile's entries page.
+ */
+class BxReviewsPageAuthor extends BxBaseModTextPageAuthor
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        parent::__construct($aObject, $oTemplate);
+    }
+
+}
+
+/** @} */

+ 24 - 0
modules/boonex/reviews/classes/BxReviewsPageBrowse.php

@@ -0,0 +1,24 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Browse entries pages.
+ */
+class BxReviewsPageBrowse extends BxBaseModTextPageBrowse
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_reviews';
+        parent::__construct($aObject, $oTemplate);
+    }
+}
+
+/** @} */

+ 32 - 0
modules/boonex/reviews/classes/BxReviewsPageEntry.php

@@ -0,0 +1,32 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/**
+ * Entry create/edit pages
+ */
+class BxReviewsPageEntry extends BxBaseModTextPageEntry
+{
+    public function __construct($aObject, $oTemplate = false)
+    {
+        $this->MODULE = 'bx_reviews';
+        parent::__construct($aObject, $oTemplate);
+    }
+
+    protected function _setSubmenu($aParams)
+    {
+    	parent::_setSubmenu(array_merge($aParams, array(
+    		'title' => '',
+    		'icon' => ''
+    	)));
+    }
+}
+
+/** @} */

+ 129 - 0
modules/boonex/reviews/classes/BxReviewsSearchResult.php

@@ -0,0 +1,129 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxReviewsSearchResult extends BxBaseModTextSearchResult
+{
+    function __construct($sMode = '', $aParams = array())
+    {
+        parent::__construct($sMode, $aParams);
+
+        $this->aCurrent = array(
+            'name' => 'bx_reviews',
+            'module_name' => 'bx_reviews',
+            'object_metatags' => 'bx_reviews',
+            'title' => _t('_bx_reviews_page_title_browse'),
+            'table' => 'bx_reviews_reviews',
+            'ownFields' => array('id', 'title', 'text', 'thumb', 'author', 'added'),
+            'searchFields' => array(),
+            'restriction' => array(
+                'author' => array('value' => '', 'field' => 'author', 'operator' => '='),
+        		'featured' => array('value' => '', 'field' => 'featured', 'operator' => '<>'),
+        		'status' => array('value' => 'active', 'field' => 'status', 'operator' => '='),
+        		'statusAdmin' => array('value' => 'active', 'field' => 'status_admin', 'operator' => '='),
+            ),
+            'paginate' => array('perPage' => getParam('bx_reviews_per_page_browse'), 'start' => 0),
+            'sorting' => 'last',
+            'rss' => array(
+                'title' => '',
+                'link' => '',
+                'image' => '',
+                'profile' => 0,
+                'fields' => array (
+                    'Guid' => 'link',
+                    'Link' => 'link',
+                    'Title' => 'title',
+                    'DateTimeUTS' => 'added',
+                    'Desc' => 'text',
+                    'Image' => 'thumb'
+                ),
+            ),
+            'ident' => 'id',
+        );
+
+        $this->sFilterName = 'bx_reviews_filter';
+        $this->oModule = $this->getMain();
+
+        $CNF = &$this->oModule->_oConfig->CNF;
+
+        $sSearchFields = getParam($CNF['PARAM_SEARCHABLE_FIELDS']);
+        $this->aCurrent['searchFields'] = !empty($sSearchFields) ? explode(',', $sSearchFields) : '';
+
+        $oProfileAuthor = null;
+
+        switch ($sMode) {
+            case 'author':
+                if(!$this->_updateCurrentForAuthor($sMode, $aParams, $oProfileAuthor))
+                    $this->isError = true;
+                break;
+
+            case 'context':
+                if(!$this->_updateCurrentForContext($sMode, $aParams, $oProfileAuthor))
+                    $this->isError = true;
+                break;
+                
+            case 'favorite':
+                if(!$this->_updateCurrentForFavorite($sMode, $aParams, $oProfileAuthor))
+                    $this->isError = true;
+                break;
+
+            case 'public':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']);
+                $this->aCurrent['title'] = _t('_bx_reviews_page_title_browse_recent');
+                $this->aCurrent['rss']['link'] = 'modules/?r=reviews/rss/' . $sMode;
+                break;
+
+            case 'featured':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_HOME']);
+                $this->aCurrent['title'] = _t('_bx_reviews_page_title_browse_featured');
+                $this->aCurrent['restriction']['featured']['value'] = '0';
+                $this->aCurrent['rss']['link'] = 'modules/?r=reviews/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'featured';
+                break;
+
+            case 'popular':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_TOP']);
+                $this->aCurrent['title'] = _t('_bx_reviews_page_title_browse_popular');
+                $this->aCurrent['rss']['link'] = 'modules/?r=reviews/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'popular';
+                break;
+
+            case 'top':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_POPULAR']);
+                $this->aCurrent['title'] = _t('_bx_reviews_page_title_browse_top');
+                $this->aCurrent['rss']['link'] = 'modules/?r=reviews/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'top';
+                break;
+
+            case 'updated':
+                $this->sBrowseUrl = BxDolPermalinks::getInstance()->permalink($CNF['URL_UPDATED']);
+                $this->aCurrent['title'] = _t('_bx_reviews_page_title_browse_updated');
+                $this->aCurrent['rss']['link'] = 'modules/?r=reviews/rss/' . $sMode;
+                $this->aCurrent['sorting'] = 'updated';
+                break;
+
+            case '': // search results
+                $this->sBrowseUrl = BX_DOL_SEARCH_KEYWORD_PAGE;
+                $this->aCurrent['title'] = _t('_bx_reviews');
+                unset($this->aCurrent['paginate']['perPage'], $this->aCurrent['rss']);
+                break;
+
+            default:
+                $sMode = '';
+                $this->isError = true;
+        }
+
+        $this->processReplaceableMarkers($oProfileAuthor);
+
+        $this->addConditionsForPrivateContent($CNF, $oProfileAuthor);
+    }
+}
+
+/** @} */

+ 26 - 0
modules/boonex/reviews/classes/BxReviewsStudioPage.php

@@ -0,0 +1,26 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxReviewsStudioPage extends BxTemplStudioModule
+{
+    protected $_sModule;
+	protected $_oModule;
+    
+    function __construct($sModule = "", $sPage = "")
+    {
+    	$this->_sModule = 'bx_reviews';
+    	$this->_oModule = BxDolModule::getInstance($this->_sModule);
+
+        parent::__construct($sModule, $sPage);
+    }
+}
+
+/** @} */

+ 35 - 0
modules/boonex/reviews/classes/BxReviewsTemplate.php

@@ -0,0 +1,35 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+/*
+ * Module representation.
+ */
+class BxReviewsTemplate extends BxBaseModTextTemplate
+{
+    function __construct(&$oConfig, &$oDb)
+    {
+        $this->MODULE = 'bx_reviews';
+
+        parent::__construct($oConfig, $oDb);
+    }
+
+    /**
+     * Use Gallery image for both because currently there is no Unit types with small thumbnails.
+     */
+    protected function getUnitThumbAndGallery ($aData)
+    {
+        list($sPhotoThumb, $sPhotoGallery) = parent::getUnitThumbAndGallery($aData);
+
+        return array($sPhotoGallery, $sPhotoGallery);
+    }
+}
+
+/** @} */

+ 27 - 0
modules/boonex/reviews/classes/BxReviewsUploaderHTML5.php

@@ -0,0 +1,27 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxReviewsUploaderHTML5 extends BxBaseModTextUploaderHTML5
+{
+    public function __construct ($aObject, $sStorageObject, $sUniqId, $oTemplate)
+    {
+        $this->_sModule = 'bx_reviews';
+
+        parent::__construct($aObject, $sStorageObject, $sUniqId, $oTemplate);
+    }
+
+    protected function isAdmin ($iContentId = 0)
+    {
+        return $this->_oModule->_isModerator (false);
+    }
+}
+
+/** @} */

+ 27 - 0
modules/boonex/reviews/classes/BxReviewsUploaderHTML5Attach.php

@@ -0,0 +1,27 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxReviewsUploaderHTML5Attach extends BxBaseModTextUploaderHTML5Attach
+{
+    public function __construct ($aObject, $sStorageObject, $sUniqId, $oTemplate)
+    {
+        $this->_sModule = 'bx_reviews';
+
+        parent::__construct($aObject, $sStorageObject, $sUniqId, $oTemplate);
+    }
+
+    protected function isAdmin ($iContentId = 0)
+    {
+        return $this->_oModule->_isModerator (false);
+    }
+}
+
+/** @} */

+ 27 - 0
modules/boonex/reviews/classes/BxReviewsUploaderSimple.php

@@ -0,0 +1,27 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxReviewsUploaderSimple extends BxBaseModTextUploaderSimple
+{
+    public function __construct ($aObject, $sStorageObject, $sUniqId, $oTemplate)
+    {
+        $this->_sModule = 'bx_reviews';
+        
+        parent::__construct($aObject, $sStorageObject, $sUniqId, $oTemplate);
+    }
+
+    protected function isAdmin ($iContentId = 0)
+    {
+        return $this->_oModule->_isModerator (false);
+    }
+}
+
+/** @} */

+ 27 - 0
modules/boonex/reviews/classes/BxReviewsUploaderSimpleAttach.php

@@ -0,0 +1,27 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxReviewsUploaderSimpleAttach extends BxBaseModTextUploaderSimpleAttach
+{
+    public function __construct ($aObject, $sStorageObject, $sUniqId, $oTemplate)
+    {
+        $this->_sModule = 'bx_reviews';
+
+        parent::__construct($aObject, $sStorageObject, $sUniqId, $oTemplate);
+    }
+
+    protected function isAdmin ($iContentId = 0)
+    {
+        return $this->_oModule->_isModerator (false);
+    }
+}
+
+/** @} */

+ 22 - 0
modules/boonex/reviews/classes/BxReviewsVotePollAnswers.php

@@ -0,0 +1,22 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxReviewsVotePollAnswers extends BxBaseModTextVotePollAnswers
+{
+    function __construct($sSystem, $iId, $iInit = 1)
+    {
+    	$this->_sModule = 'bx_reviews';
+
+        parent::__construct($sSystem, $iId, $iInit);
+    }
+}
+
+/** @} */

+ 150 - 0
modules/boonex/reviews/install/config.php

@@ -0,0 +1,150 @@
+<?php
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+
+    /**
+     * Main Section.
+     */
+    'type' => BX_DOL_MODULE_TYPE_MODULE,
+    'name' => 'bx_reviews',
+    'title' => 'Reviews',
+    'note' => 'Reviews based on Posts module.',
+    'version' => '11.0.2.DEV',
+    'vendor' => 'BoonEx',
+    'help_url' => 'http://feed.una.io/?section={module_name}',
+
+    'compatible_with' => array(
+        '11.0.x'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/reviews/',
+    'home_uri' => 'reviews',
+
+    'db_prefix' => 'bx_reviews_',
+    'class_prefix' => 'BxReviews',
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Reviews',
+
+    /**
+     * List of page triggers.
+     */
+    'page_triggers' => array (
+    	'trigger_page_profile_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_reviews_covers',
+    	'bx_reviews_photos',
+        'bx_reviews_videos',
+        'bx_reviews_files'
+    ),
+
+    /**
+     * Transcoders.
+     */
+    'transcoders' => array(
+        'bx_reviews_preview',
+        'bx_reviews_gallery',
+        'bx_reviews_cover',
+
+        'bx_reviews_preview_photos',
+        'bx_reviews_gallery_photos', 
+
+        'bx_reviews_videos_poster',
+        'bx_reviews_videos_poster_preview',
+        'bx_reviews_videos_mp4',
+        'bx_reviews_videos_mp4_hd',
+
+        'bx_reviews_preview_files',
+        'bx_reviews_gallery_files'
+    ),
+
+    /**
+     * Extended Search Forms.
+     */
+    'esearches' => array(
+        'bx_reviews',
+    	'bx_reviews_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'
+    ),
+
+);
+
+/** @} */

+ 20 - 0
modules/boonex/reviews/install/installer.php

@@ -0,0 +1,20 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxReviewsInstaller extends BxBaseModTextInstaller
+{
+    function __construct($aConfig)
+    {
+        parent::__construct($aConfig);
+    }
+}
+
+/** @} */

+ 318 - 0
modules/boonex/reviews/install/langs/en.xml

@@ -0,0 +1,318 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+
+    <string name="_bx_reviews"><![CDATA[Reviews]]></string>
+    <string name="_bx_reviews_cmts"><![CDATA[Reviews' Comments]]></string>
+    <string name="_bx_reviews_reactions"><![CDATA[Reviews' Reactions]]></string>
+
+    <string name="_bx_reviews_option_summary_chars"><![CDATA[Number of characters in auto-cropped review summary]]></string>
+    <string name="_bx_reviews_option_plain_summary_chars"><![CDATA[Number of characters in plain review description when review hasn't thumb]]></string>
+    <string name="_bx_reviews_option_per_page_browse"><![CDATA[Number of items per page]]></string>
+    <string name="_bx_reviews_option_per_page_profile"><![CDATA[Number of items on profile/group page]]></string>
+    <string name="_bx_reviews_option_rss_num"><![CDATA[Number of items in RSS feed]]></string>
+    <string name="_bx_reviews_option_searchable_fields"><![CDATA[Searchable fields for keyword search]]></string>
+    <string name="_bx_reviews_option_auto_activation_for_categories"><![CDATA[Auto-Activation For Categories]]></string>
+  
+    <string name="_bx_reviews_form_entry"><![CDATA[Reviews]]></string>
+    <string name="_bx_reviews_form_entry_display_add"><![CDATA[Add Review]]></string>
+    <string name="_bx_reviews_form_entry_display_edit"><![CDATA[Edit Review]]></string>
+    <string name="_bx_reviews_form_entry_display_delete"><![CDATA[Delete Review]]></string>
+    <string name="_bx_reviews_form_entry_display_view"><![CDATA[View Review]]></string>
+    <string name="_bx_reviews_form_entry_input_author"><![CDATA[Author]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_do_submit"><![CDATA[Submit]]></string>
+    <string name="_bx_reviews_form_entry_input_do_submit"><![CDATA[Submit]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_do_publish"><![CDATA[Publish]]></string>
+    <string name="_bx_reviews_form_entry_input_do_publish"><![CDATA[Publish]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_title"><![CDATA[Title]]></string>
+    <string name="_bx_reviews_form_entry_input_title"><![CDATA[Title]]></string>
+    <string name="_bx_reviews_form_entry_input_title_err"><![CDATA[Title is essential. Please, fill in this field]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_cat"><![CDATA[Category]]></string>
+    <string name="_bx_reviews_form_entry_input_cat"><![CDATA[Category]]></string>
+    <string name="_bx_reviews_form_entry_input_cat_err"><![CDATA[Please select category]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_multicat"><![CDATA[Categories]]></string>
+    <string name="_bx_reviews_form_entry_input_multicat"><![CDATA[Categories]]></string>
+    <string name="_bx_reviews_form_entry_input_multicat_err"><![CDATA[Please select category]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_text"><![CDATA[Text]]></string>
+    <string name="_bx_reviews_form_entry_input_text"><![CDATA[Text]]></string>
+    <string name="_bx_reviews_form_entry_input_text_err"><![CDATA[Text field can't be empty]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_delete_confirm"><![CDATA[Delete confirmation]]></string>
+    <string name="_bx_reviews_form_entry_input_delete_confirm"><![CDATA[I am sure I want to delete this review]]></string>
+    <string name="_bx_reviews_form_entry_input_delete_confirm_info"><![CDATA[This action can not be undone]]></string>
+    <string name="_bx_reviews_form_entry_input_delete_confirm_error"><![CDATA[Please check this checkbox if you really want to delete the review]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_covers"><![CDATA[Header Image]]></string>
+    <string name="_bx_reviews_form_entry_input_covers"><![CDATA[Header Image]]></string>
+    <string name="_bx_reviews_form_entry_input_covers_uploader_simple_title"><![CDATA[Upload]]></string>
+    <string name="_bx_reviews_form_entry_input_covers_uploader_html5_title"><![CDATA[Upload]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_pictures"><![CDATA[Images]]></string>
+    <string name="_bx_reviews_form_entry_input_pictures"><![CDATA[]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_videos"><![CDATA[Videos]]></string>
+    <string name="_bx_reviews_form_entry_input_videos"><![CDATA[]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_files"><![CDATA[Files]]></string>
+    <string name="_bx_reviews_form_entry_input_files"><![CDATA[]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_polls"><![CDATA[Polls]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_reviews_form_entry_input_allow_view_to"><![CDATA[Visibility]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_reviews_form_entry_input_date_added"><![CDATA[Created]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_date_changed"><![CDATA[Updated]]></string>
+    <string name="_bx_reviews_form_entry_input_date_changed"><![CDATA[Updated]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_date_published"><![CDATA[Publishing time]]></string>
+    <string name="_bx_reviews_form_entry_input_date_published"><![CDATA[Publishing time]]></string>
+    <string name="_bx_reviews_form_entry_input_date_published_info"><![CDATA[Leave empty to publish immediately.]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_attachments"><![CDATA[Attachments]]></string>
+    <string name="_bx_reviews_form_entry_input_sys_disable_comments"><![CDATA[Disable comments]]></string>
+    <string name="_bx_reviews_form_entry_input_disable_comments"><![CDATA[Disable comments]]></string>
+
+    <string name="_bx_reviews_form_poll"><![CDATA[Polls]]></string>
+    <string name="_bx_reviews_form_poll_display_add"><![CDATA[Add Poll]]></string>
+    <string name="_bx_reviews_form_poll_input_sys_text"><![CDATA[Question]]></string>
+    <string name="_bx_reviews_form_poll_input_text"><![CDATA[Question]]></string>
+    <string name="_bx_reviews_form_poll_input_text_err"><![CDATA[Question is essential. Please, fill in this field]]></string>
+    <string name="_bx_reviews_form_poll_input_sys_answers"><![CDATA[Answers]]></string>
+    <string name="_bx_reviews_form_poll_input_answers"><![CDATA[Answers]]></string>
+    <string name="_bx_reviews_form_poll_input_answers_err"><![CDATA[Poll should have at least 2 non-empty answers.]]></string>
+    <string name="_bx_reviews_form_poll_input_answers_add"><![CDATA[Add More]]></string>
+    <string name="_bx_reviews_form_poll_input_sys_do_submit"><![CDATA[Add]]></string>
+    <string name="_bx_reviews_form_poll_input_do_submit"><![CDATA[Add]]></string>
+    <string name="_bx_reviews_form_poll_input_do_cancel"><![CDATA[Close]]></string>
+
+    <string name="_bx_reviews_category_form_entry"><![CDATA[Categories Form]]></string>
+    <string name="_bx_reviews_category_display_add"><![CDATA[Add category]]></string>
+    <string name="_bx_reviews_category_display_edit"><![CDATA[Edit category]]></string>
+    <string name="_bx_reviews_category_form_entry_input_sys_value"><![CDATA[Value]]></string>
+    <string name="_bx_reviews_category_form_entry_input_value"><![CDATA[Value]]></string>>
+    <string name="_bx_reviews_category_form_entry_input_value_err"><![CDATA[Value is essential. Please, fill in this field]]></string>
+    <string name="_bx_reviews_lmi_cpt_categories"><![CDATA[Categories]]></string>
+
+  <string name="_bx_reviews_acl_action_create_entry"><![CDATA[Create Review]]></string>
+    <string name="_bx_reviews_acl_action_delete_entry"><![CDATA[Delete Review]]></string>
+    <string name="_bx_reviews_acl_action_view_entry"><![CDATA[View Review]]></string>
+    <string name="_bx_reviews_acl_action_set_thumb"><![CDATA[Set Review Header Image]]></string>
+    <string name="_bx_reviews_acl_action_edit_any_entry"><![CDATA[Edit Any Review]]></string>
+
+    <string name="_bx_reviews_page_title_sys_create_entry"><![CDATA[New Review]]></string>
+    <string name="_bx_reviews_page_title_create_entry"><![CDATA[New Review]]></string>
+    <string name="_bx_reviews_page_block_title_create_entry"><![CDATA[New Review]]></string>
+    <string name="_bx_reviews_page_title_sys_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_reviews_page_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_reviews_page_block_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_reviews_page_title_sys_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_reviews_page_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_reviews_page_block_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_reviews_page_title_sys_view_entry"><![CDATA[View Review]]></string>
+    <string name="_bx_reviews_page_title_view_entry"><![CDATA[{title}]]></string>
+    <string name="_bx_reviews_page_block_title_entry_text"><![CDATA[Review Text]]></string>
+    <string name="_bx_reviews_page_title_browse"><![CDATA[Reviews]]></string>
+    <string name="_bx_reviews_page_title_search_results"><![CDATA[Reviews matching "{0}"]]></string>
+    <string name="_bx_reviews_page_title_browse_by_author"><![CDATA[Reviews of {display_name}]]></string>
+    <string name="_bx_reviews_page_title_browse_by_context"><![CDATA[Reviews in {display_name}]]></string>
+    <string name="_bx_reviews_page_title_browse_featured"><![CDATA[Featured Reviews]]></string>
+    <string name="_bx_reviews_page_title_browse_recent"><![CDATA[Latest Reviews]]></string>
+    <string name="_bx_reviews_page_title_browse_popular"><![CDATA[Popular Reviews]]></string>
+    <string name="_bx_reviews_page_title_browse_top"><![CDATA[Top Reviews]]></string>
+    <string name="_bx_reviews_page_title_browse_updated"><![CDATA[Updated Reviews]]></string>
+    <string name="_bx_reviews_page_title_sys_home"><![CDATA[Reviews Home]]></string>
+    <string name="_bx_reviews_page_title_home"><![CDATA[Reviews]]></string>
+    <string name="_bx_reviews_page_block_title_featured_entries_view_extended"><![CDATA[Featured Reviews]]></string>
+    <string name="_bx_reviews_page_block_title_recent_entries"><![CDATA[Latest Reviews (Gallery View)]]></string>
+    <string name="_bx_reviews_page_block_title_recent_entries_view_extended"><![CDATA[Latest Reviews]]></string>
+    <string name="_bx_reviews_page_block_title_recent_entries_view_full"><![CDATA[Latest Reviews (Full View)]]></string>
+    <string name="_bx_reviews_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
+    <string name="_bx_reviews_page_block_title_entry_author"><![CDATA[Author]]></string>
+    <string name="_bx_reviews_page_block_title_entry_actions"><![CDATA[Actions]]></string>
+    <string name="_bx_reviews_page_block_title_entry_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_reviews_page_block_title_entry_comments_link"><![CDATA[Comments to <a href="{entry_link}">{title}</a>]]></string>
+    <string name="_bx_reviews_page_block_title_entry_location"><![CDATA[Location]]></string>
+    <string name="_bx_reviews_page_block_title_entry_attachments"><![CDATA[Attachments]]></string>
+    <string name="_bx_reviews_page_block_title_entry_polls"><![CDATA[Polls]]></string>
+    <string name="_bx_reviews_page_block_title_entry_all_actions"><![CDATA[All Actions]]></string>
+    <string name="_bx_reviews_page_title_sys_entries_popular"><![CDATA[Popular Reviews]]></string>
+    <string name="_bx_reviews_page_title_entries_popular"><![CDATA[Popular Reviews]]></string>
+    <string name="_bx_reviews_page_title_sys_entries_top"><![CDATA[Top Reviews]]></string>
+    <string name="_bx_reviews_page_title_entries_top"><![CDATA[Top Reviews]]></string>
+    <string name="_bx_reviews_page_title_sys_entries_updated"><![CDATA[Updated Reviews]]></string>
+    <string name="_bx_reviews_page_title_entries_updated"><![CDATA[Updated Reviews]]></string>
+    <string name="_bx_reviews_page_title_sys_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_reviews_page_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_reviews_page_block_title_search_form"><![CDATA[Search Form]]></string>
+    <string name="_bx_reviews_page_block_title_search_results"><![CDATA[Search Results]]></string>
+    <string name="_bx_reviews_page_block_title_search_form_cmts"><![CDATA[Comments Search Form]]></string>
+    <string name="_bx_reviews_page_block_title_search_results_cmts"><![CDATA[Comments Search Results]]></string>
+    <string name="_bx_reviews_page_block_title_popular_entries"><![CDATA[Popular Reviews]]></string>
+    <string name="_bx_reviews_page_block_title_popular_entries_view_extended"><![CDATA[Popular Reviews (Extended View)]]></string>
+    <string name="_bx_reviews_page_block_title_popular_entries_view_full"><![CDATA[Popular Reviews (Full View)]]></string>
+    <string name="_bx_reviews_page_block_title_top_entries"><![CDATA[Top Reviews]]></string>
+    <string name="_bx_reviews_page_block_title_updated_entries"><![CDATA[Updated Reviews]]></string>
+    <string name="_bx_reviews_page_title_sys_view_entry_comments"><![CDATA[Review Comments]]></string>
+    <string name="_bx_reviews_page_title_view_entry_comments"><![CDATA[Comments to {title}]]></string>
+    <string name="_bx_reviews_page_title_sys_entries_of_author"><![CDATA[Reviews of author]]></string>
+    <string name="_bx_reviews_page_title_entries_of_author"><![CDATA[Reviews by {display_name}]]></string>
+    <string name="_bx_reviews_page_title_sys_entries_in_context"><![CDATA[Reviews in context]]></string>
+    <string name="_bx_reviews_page_title_entries_in_context"><![CDATA[Reviews in {display_name}]]></string>
+    <string name="_bx_reviews_page_block_title_favorites_of_author"><![CDATA[Favorites by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_reviews_page_block_title_sys_favorites_of_author"><![CDATA[Favorites of author]]></string>
+    <string name="_bx_reviews_page_block_title_entries_of_author"><![CDATA[Reviews by <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_reviews_page_block_title_sys_entries_of_author"><![CDATA[Reviews of author]]></string>
+    <string name="_bx_reviews_page_block_title_entries_in_context"><![CDATA[Reviews in <a href="{profile_link}">{display_name}</a>]]></string>
+    <string name="_bx_reviews_page_block_title_sys_entries_in_context"><![CDATA[Reviews in context]]></string>
+    <string name="_bx_reviews_page_block_title_entries_actions"><![CDATA[Reviews actions]]></string>
+    <string name="_bx_reviews_page_block_title_browse_cmts"><![CDATA[Reviews' Comments]]></string>
+    <string name="_bx_reviews_page_title_sys_manage"><![CDATA[Manage Own]]></string>
+    <string name="_bx_reviews_page_title_sys_manage_administration"><![CDATA[Manage All]]></string>
+    <string name="_bx_reviews_page_title_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_reviews_page_block_title_system_manage"><![CDATA[Manage Own]]></string>
+    <string name="_bx_reviews_page_block_title_system_manage_administration"><![CDATA[Manage All]]></string>
+    <string name="_bx_reviews_page_block_title_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_reviews_page_block_title_popular_keywords"><![CDATA[Popular Hashtags]]></string>
+    <string name="_bx_reviews_page_block_title_cats"><![CDATA[Reviews Categories]]></string>
+    <string name="_bx_reviews_page_block_title_sys_multicats"><![CDATA[Reviews Categories(Multi)]]></string>
+    <string name="_bx_reviews_page_block_title_multicats"><![CDATA[Reviews Categories]]></string>
+    <string name="_bx_reviews_page_block_title_entry_info"><![CDATA[Info]]></string>
+    <string name="_bx_reviews_page_block_title_my_entries"><![CDATA[My Reviews]]></string>
+    <string name="_bx_reviews_page_block_title_sys_recent_entries_view_showcase"><![CDATA[Latest Reviews (Showcase View)]]></string>
+    <string name="_bx_reviews_page_block_title_recent_entries_view_showcase"><![CDATA[Latest Reviews]]></string>
+    <string name="_bx_reviews_page_block_title_sys_popular_entries_view_showcase"><![CDATA[Popular Reviews (Showcase View)]]></string>
+    <string name="_bx_reviews_page_block_title_popular_entries_view_showcase"><![CDATA[Popular Reviews]]></string>
+    <string name="_bx_reviews_page_block_title_sys_featured_entries_view_showcase"><![CDATA[Featured Reviews (Showcase View)]]></string>
+    <string name="_bx_reviews_page_block_title_featured_entries_view_showcase"><![CDATA[Featured Reviews]]></string>
+    <string name="_bx_reviews_page_block_title_sys_entry_context"><![CDATA[Posted in]]></string>
+    <string name="_bx_reviews_page_block_title_entry_context"><![CDATA[Posted in]]></string>
+
+    <string name="_bx_reviews_menu_title_entry_attachments"><![CDATA[Form Attachments]]></string>
+    <string name="_bx_reviews_menu_set_title_entry_attachments"><![CDATA[Form Attachments]]></string>
+    <string name="_bx_reviews_menu_item_title_system_cpa_photo_simple"><![CDATA[Add Photo (simple)]]></string>
+    <string name="_bx_reviews_menu_item_title_cpa_photo_simple"><![CDATA[Add Photo]]></string>
+    <string name="_bx_reviews_menu_item_title_system_cpa_photo_html5"><![CDATA[Add Photo (html5)]]></string>
+    <string name="_bx_reviews_menu_item_title_cpa_photo_html5"><![CDATA[Add Photos]]></string>
+    <string name="_bx_reviews_menu_item_title_system_cpa_video_simple"><![CDATA[Add Video (simple)]]></string>
+    <string name="_bx_reviews_menu_item_title_cpa_video_simple"><![CDATA[Add Video]]></string>
+    <string name="_bx_reviews_menu_item_title_system_cpa_video_html5"><![CDATA[Add Video (html5)]]></string>
+    <string name="_bx_reviews_menu_item_title_cpa_video_html5"><![CDATA[Add Videos]]></string>
+    <string name="_bx_reviews_menu_item_title_system_cpa_file_simple"><![CDATA[Add File (simple)]]></string>
+    <string name="_bx_reviews_menu_item_title_cpa_file_simple"><![CDATA[Add File]]></string>
+    <string name="_bx_reviews_menu_item_title_system_cpa_file_html5"><![CDATA[Add File (html5)]]></string>
+    <string name="_bx_reviews_menu_item_title_cpa_file_html5"><![CDATA[Add Files]]></string>
+    <string name="_bx_reviews_menu_item_title_system_cpa_poll"><![CDATA[Add Poll]]></string>
+    <string name="_bx_reviews_menu_item_title_cpa_poll"><![CDATA[Add Poll]]></string>
+
+    <string name="_bx_reviews_menu_set_title_view_entry"><![CDATA[Review Actions]]></string>
+    <string name="_bx_reviews_menu_title_view_entry"><![CDATA[Review Actions]]></string>
+    <string name="_bx_reviews_menu_title_submenu"><![CDATA[Reviews Submenu]]></string>
+    <string name="_bx_reviews_menu_set_title_submenu"><![CDATA[Reviews Submenu]]></string>
+    <string name="_bx_reviews_menu_item_title_system_create_entry"><![CDATA[Review]]></string>
+    <string name="_bx_reviews_menu_item_title_create_entry"><![CDATA[Review]]></string>
+    <string name="_bx_reviews_menu_item_title_system_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_reviews_menu_item_title_edit_entry"><![CDATA[Edit]]></string>
+    <string name="_bx_reviews_menu_item_title_system_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_reviews_menu_item_title_delete_entry"><![CDATA[Delete]]></string>
+    <string name="_bx_reviews_menu_item_title_system_view_entry"><![CDATA[View Review]]></string>
+    <string name="_bx_reviews_menu_item_title_system_entries_home"><![CDATA[Reviews]]></string>
+    <string name="_bx_reviews_menu_item_title_entries_home"><![CDATA[Reviews]]></string>
+    <string name="_bx_reviews_menu_item_title_system_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_reviews_menu_item_title_entries_public"><![CDATA[Latest]]></string>
+    <string name="_bx_reviews_menu_item_title_system_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_reviews_menu_item_title_entries_manage"><![CDATA[Manage]]></string>
+    <string name="_bx_reviews_menu_item_title_system_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_reviews_menu_item_title_entries_popular"><![CDATA[Popular]]></string>
+    <string name="_bx_reviews_menu_item_title_system_entries_top"><![CDATA[Top]]></string>
+    <string name="_bx_reviews_menu_item_title_entries_top"><![CDATA[Top]]></string>
+    <string name="_bx_reviews_menu_item_title_system_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_reviews_menu_item_title_entries_search"><![CDATA[Search]]></string>
+    <string name="_bx_reviews_menu_title_view_entry_submenu"><![CDATA[View Review Submenu]]></string>
+    <string name="_bx_reviews_menu_set_title_view_entry_submenu"><![CDATA[View Review Submenu]]></string>
+    <string name="_bx_reviews_menu_item_title_view_entry_submenu_entry"><![CDATA[Review]]></string>
+    <string name="_bx_reviews_menu_item_title_view_entry_submenu_comments"><![CDATA[Comments]]></string>
+    <string name="_bx_reviews_menu_item_title_system_view_entry_comments"><![CDATA[Review Comments]]></string>
+    <string name="_bx_reviews_menu_item_title_system_view_entries_author"><![CDATA[Reviews]]></string>
+    <string name="_bx_reviews_menu_item_title_view_entries_author"><![CDATA[Reviews]]></string>
+    <string name="_bx_reviews_menu_item_title_system_view_entries_in_context"><![CDATA[Reviews]]></string>
+    <string name="_bx_reviews_menu_item_title_view_entries_in_context"><![CDATA[Reviews]]></string>
+    <string name="_bx_reviews_menu_title_entries_my"><![CDATA[My Reviews Action Menu]]></string>
+    <string name="_bx_reviews_menu_set_title_entries_my"><![CDATA[My Reviews Menu]]></string>
+	<string name="_bx_reviews_menu_item_title_system_manage_my_reviews"><![CDATA[My reviews]]></string>
+    <string name="_bx_reviews_menu_item_title_manage_my_reviews"><![CDATA[Reviews]]></string>
+    <string name="_bx_reviews_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_reviews_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
+    <string name="_bx_reviews_menu_item_title_system_manage_account"><![CDATA[Manage account]]></string>
+    <string name="_bx_reviews_menu_item_title_manage_account"><![CDATA[Manage account]]></string>
+	<string name="_bx_reviews_menu_item_title_system_admt_reviews"><![CDATA[Reviews]]></string>
+	<string name="_bx_reviews_menu_item_title_admt_reviews"><![CDATA[Reviews]]></string>
+	<string name="_bx_reviews_menu_item_title_manage_my"><![CDATA[My Reviews]]></string>
+	<string name="_bx_reviews_menu_item_title_manage_all"><![CDATA[All Reviews]]></string>
+
+	<string name="_bx_reviews_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
+	<string name="_bx_reviews_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
+	<string name="_bx_reviews_grid_filter_item_title_adm_hidden"><![CDATA[Hidden]]></string>
+	<string name="_bx_reviews_grid_column_title_adm_active"><![CDATA[Active]]></string>
+    <string name="_bx_reviews_grid_column_title_adm_title"><![CDATA[Title]]></string>
+    <string name="_bx_reviews_grid_action_title_adm_audit_content"><![CDATA[Audit actions]]></string>
+    <string name="_bx_reviews_grid_column_title_adm_added"><![CDATA[Added]]></string>
+    <string name="_bx_reviews_grid_column_title_adm_author"><![CDATA[Author]]></string>>
+    <string name="_bx_reviews_grid_action_title_adm_add"><![CDATA[Add]]></string>
+    <string name="_bx_reviews_grid_action_title_adm_edit"><![CDATA[Edit]]></string>
+    <string name="_bx_reviews_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
+    <string name="_bx_reviews_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
+    <string name="_bx_reviews_grid_action_err_delete"><![CDATA[Cannot delete the selected review(s).]]></string>
+    <string name="_bx_reviews_grid_txt_account_manager"><![CDATA[Redirect to manage account.]]></string>
+
+    <string name="_bx_reviews_chart_growth"><![CDATA[Reviews: Growth]]></string>
+    <string name="_bx_reviews_chart_growth_speed"><![CDATA[Reviews: Growth Speed]]></string>
+
+    <string name="_bx_reviews_search_extended"><![CDATA[Reviews Search]]></string>
+    <string name="_bx_reviews_search_extended_cmts"><![CDATA[Reviews Comments Search]]></string>
+
+    <string name="_bx_reviews_pre_lists_cats"><![CDATA[Review categories]]></string>
+    <string name="_bx_reviews_cat_Animals_Pets"><![CDATA[Animals & Pets]]></string>
+    <string name="_bx_reviews_cat_Architecture"><![CDATA[Architecture]]></string>
+    <string name="_bx_reviews_cat_Art"><![CDATA[Art]]></string>
+    <string name="_bx_reviews_cat_Cars_Motorcycles"><![CDATA[Cars & Motorcycles]]></string>
+    <string name="_bx_reviews_cat_Celebrities"><![CDATA[Celebrities]]></string>
+    <string name="_bx_reviews_cat_Design"><![CDATA[Design]]></string>
+    <string name="_bx_reviews_cat_DIY_Crafts"><![CDATA[DIY & Crafts]]></string>
+    <string name="_bx_reviews_cat_Education"><![CDATA[Education]]></string>
+    <string name="_bx_reviews_cat_Film_Music_Books"><![CDATA[Film, Music & Books]]></string>
+    <string name="_bx_reviews_cat_Food_Drink"><![CDATA[Food & Drink]]></string>
+    <string name="_bx_reviews_cat_Gardening"><![CDATA[Gardening]]></string>
+    <string name="_bx_reviews_cat_Geek"><![CDATA[Geek]]></string>
+    <string name="_bx_reviews_cat_Hair_Beauty"><![CDATA[Hair & Beauty]]></string>
+    <string name="_bx_reviews_cat_Health_Fitness"><![CDATA[Health & Fitness]]></string>
+    <string name="_bx_reviews_cat_History"><![CDATA[History]]></string>
+    <string name="_bx_reviews_cat_Holidays_Events"><![CDATA[Holidays & Events]]></string>
+    <string name="_bx_reviews_cat_Home_Decor"><![CDATA[Home Decor]]></string>
+    <string name="_bx_reviews_cat_Humor"><![CDATA[Humor]]></string>
+    <string name="_bx_reviews_cat_Illustrations_Posters"><![CDATA[Illustrations & Posters]]></string>
+    <string name="_bx_reviews_cat_Kids_Parenting"><![CDATA[Kids & Parenting]]></string>
+    <string name="_bx_reviews_cat_Mens_Fashion"><![CDATA[Men's Fashion]]></string>
+    <string name="_bx_reviews_cat_Outdoors"><![CDATA[Outdoors]]></string>
+    <string name="_bx_reviews_cat_Photography"><![CDATA[Photography]]></string>
+    <string name="_bx_reviews_cat_Products"><![CDATA[Products]]></string>
+    <string name="_bx_reviews_cat_Quotes"><![CDATA[Quotes]]></string>
+    <string name="_bx_reviews_cat_Science_Nature"><![CDATA[Science & Nature]]></string>
+    <string name="_bx_reviews_cat_Sports"><![CDATA[Sports]]></string>
+    <string name="_bx_reviews_cat_Tattoos"><![CDATA[Tattoos]]></string>
+    <string name="_bx_reviews_cat_Technology"><![CDATA[Technology]]></string>
+    <string name="_bx_reviews_cat_Travel"><![CDATA[Travel]]></string>
+    <string name="_bx_reviews_cat_Weddings"><![CDATA[Weddings]]></string>
+    <string name="_bx_reviews_cat_Womens_Fashion"><![CDATA[Women's Fashion]]></string>
+
+    <string name="_bx_reviews_txt_all_entries_in"><![CDATA[<a href="{0}">All Reviews in {1} ({2})</a>]]></string>
+    <string name="_bx_reviews_txt_all_entries_by"><![CDATA[{0} reviews]]></string>
+    <string name="_bx_reviews_txt_sample_single"><![CDATA[review]]></string>
+    <string name="_bx_reviews_txt_sample_single_with_article"><![CDATA[a review]]></string>
+    <string name="_bx_reviews_txt_sample_comment_single"><![CDATA[comment to review]]></string>
+    <string name="_bx_reviews_txt_sample_vote_single"><![CDATA[vote to review]]></string>
+    <string name="_bx_reviews_txt_sample_reaction_single"><![CDATA['{0}' reaction to review]]></string>
+    <string name="_bx_reviews_txt_sample_score_up_single"><![CDATA[score up vote to review]]></string>
+    <string name="_bx_reviews_txt_sample_score_down_single"><![CDATA[score down vote to review]]></string>
+    <string name="_bx_reviews_txt_processing_awaiting"><![CDATA[Scheduled for publishing as soon as video conversion is complete.]]></string>
+    <string name="_bx_reviews_txt_processing_failed"><![CDATA[Review isn't published because video conversion failed, edit video to fix the issue.]]></string>
+    <string name="_bx_reviews_txt_scheduled_awaiting"><![CDATA[Review publishing date is {date_publish_uf}]]></string>
+
+    <string name="_bx_reviews_txt_err_cannot_perform_action"><![CDATA[Cannot perform action. Please report.]]></string>
+
+    <string name="_bx_reviews_txt_poll_view_answers"><![CDATA[poll]]></string>
+    <string name="_bx_reviews_txt_poll_view_results"><![CDATA[results]]></string>
+    <string name="_bx_reviews_txt_poll_answer_vote_do_by"><![CDATA[Voted for]]></string>
+    <string name="_bx_reviews_txt_poll_answer_vote_counter"><![CDATA[{0} votes]]></string>
+    <string name="_bx_reviews_txt_poll_answer_vote_percent"><![CDATA[({0}%)]]></string>
+</resources>

+ 54 - 0
modules/boonex/reviews/install/sql/disable.sql

@@ -0,0 +1,54 @@
+
+-- SETTINGS
+SET @iTypeId = (SELECT `ID` FROM `sys_options_types` WHERE `name` = 'bx_reviews' 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;
+
+-- PAGES
+DELETE FROM `sys_objects_page` WHERE `module` = 'bx_reviews';
+DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_reviews' OR `object` IN('bx_reviews_create_entry', 'bx_reviews_edit_entry', 'bx_reviews_delete_entry', 'bx_reviews_view_entry', 'bx_reviews_view_entry_comments', 'bx_reviews_home', 'bx_reviews_popular', 'bx_reviews_top', 'bx_reviews_updated', 'bx_reviews_author', 'bx_reviews_context', 'bx_reviews_search', 'bx_reviews_manage');
+
+-- MENU
+DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_reviews';
+DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_reviews';
+DELETE FROM `sys_menu_items` WHERE `module` = 'bx_reviews' OR `set_name` IN('bx_reviews_create_post_attachments', 'bx_reviews_view', 'bx_reviews_view_actions', 'bx_reviews_submenu', 'bx_reviews_view_submenu', 'bx_reviews_snippet_meta', 'bx_reviews_my', 'bx_reviews_menu_manage_tools');
+
+-- PRIVACY 
+DELETE FROM `sys_objects_privacy` WHERE `object` = 'bx_reviews_allow_view_to';
+
+-- 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_reviews';
+DELETE FROM `sys_acl_actions` WHERE `Module` = 'bx_reviews';
+
+-- SEARCH
+DELETE FROM `sys_objects_search` WHERE `ObjectName` IN ('bx_reviews', 'bx_reviews_cmts');
+
+-- METATAGS
+DELETE FROM `sys_objects_metatags` WHERE `object` = 'bx_reviews';
+
+-- CATEGORY
+DELETE FROM `sys_objects_category` WHERE `object` = 'bx_reviews_cats';
+
+-- STATS
+DELETE FROM `sys_statistics` WHERE `name` LIKE 'bx_reviews%';
+
+-- CHARTS
+DELETE FROM `sys_objects_chart` WHERE `object` LIKE 'bx_reviews%';
+
+-- GRIDS
+DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_reviews_administration', 'bx_reviews_common');
+DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_reviews_administration', 'bx_reviews_common');
+DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_reviews_administration', 'bx_reviews_common');
+
+-- UPLOADERS
+DELETE FROM `sys_objects_uploader` WHERE `object` LIKE 'bx_reviews_%';
+
+-- ALERTS
+SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_reviews' LIMIT 1);
+DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
+DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;
+
+-- CRON
+DELETE FROM `sys_cron_jobs` WHERE `name` LIKE 'bx_reviews%';

+ 496 - 0
modules/boonex/reviews/install/sql/enable.sql

@@ -0,0 +1,496 @@
+
+-- 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_reviews', '_bx_reviews', 'bx_reviews@modules/boonex/reviews/|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_reviews', '_bx_reviews', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
+('bx_reviews_summary_chars', '700', @iCategId, '_bx_reviews_option_summary_chars', 'digit', '', '', '', 1),
+('bx_reviews_plain_summary_chars', '240', @iCategId, '_bx_reviews_option_plain_summary_chars', 'digit', '', '', '', 2),
+('bx_reviews_per_page_browse', '12', @iCategId, '_bx_reviews_option_per_page_browse', 'digit', '', '', '', 10),
+('bx_reviews_per_page_profile', '6', @iCategId, '_bx_reviews_option_per_page_profile', 'digit', '', '', '', 12),
+('bx_reviews_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 15),
+('bx_reviews_rss_num', '10', @iCategId, '_bx_reviews_option_rss_num', 'digit', '', '', '', 20),
+('bx_reviews_searchable_fields', 'title,text', @iCategId, '_bx_reviews_option_searchable_fields', 'list', '', '', 'a:2:{s:6:"module";s:10:"bx_reviews";s:6:"method";s:21:"get_searchable_fields";}', 30),
+('bx_reviews_auto_activation_for_categories', 'on', @iCategId, '_bx_reviews_option_auto_activation_for_categories', 'checkbox', '', '', '', 35);
+
+-- 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_reviews_create_entry', '_bx_reviews_page_title_sys_create_entry', '_bx_reviews_page_title_create_entry', 'bx_reviews', 5, 2147483647, 1, 'create-review', 'page.php?i=create-review', '', '', '', 0, 1, 0, 'BxReviewsPageBrowse', 'modules/boonex/reviews/classes/BxReviewsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_reviews_create_entry', 1, 'bx_reviews', '_bx_reviews_page_block_title_create_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_reviews";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_reviews_edit_entry', '_bx_reviews_page_title_sys_edit_entry', '_bx_reviews_page_title_edit_entry', 'bx_reviews', 5, 2147483647, 1, 'edit-review', '', '', '', '', 0, 1, 0, 'BxReviewsPageEntry', 'modules/boonex/reviews/classes/BxReviewsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_reviews_edit_entry', 1, 'bx_reviews', '_bx_reviews_page_block_title_edit_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_reviews";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_reviews_delete_entry', '_bx_reviews_page_title_sys_delete_entry', '_bx_reviews_page_title_delete_entry', 'bx_reviews', 5, 2147483647, 1, 'delete-review', '', '', '', '', 0, 1, 0, 'BxReviewsPageEntry', 'modules/boonex/reviews/classes/BxReviewsPageEntry.php');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_reviews_delete_entry', 1, 'bx_reviews', '_bx_reviews_page_block_title_delete_entry', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_reviews";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_reviews_view_entry', '_bx_reviews_page_title_sys_view_entry', '_bx_reviews_page_title_view_entry', 'bx_reviews', 12, 2147483647, 1, 'view-review', '', '', '', '', 0, 1, 0, 'BxReviewsPageEntry', 'modules/boonex/reviews/classes/BxReviewsPageEntry.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_reviews_view_entry', 2, 'bx_reviews', '', '_bx_reviews_page_block_title_entry_text', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:"bx_reviews";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 2),
+('bx_reviews_view_entry', 2, 'bx_reviews', '', '_bx_reviews_page_block_title_entry_author', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:"bx_reviews";s:6:\"method\";s:13:\"entity_author\";}', 0, 0, 1, 1),
+('bx_reviews_view_entry', 3, 'bx_reviews', '_bx_reviews_page_block_title_sys_entry_context', '_bx_reviews_page_block_title_entry_context', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:"bx_reviews";s:6:\"method\";s:14:\"entity_context\";}', 0, 0, 1, 1),
+('bx_reviews_view_entry', 3, 'bx_reviews', '', '_bx_reviews_page_block_title_entry_info', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:"bx_reviews";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 2),
+('bx_reviews_view_entry', 3, 'bx_reviews', '', '_bx_reviews_page_block_title_entry_location', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:"bx_reviews";s:6:\"method\";s:15:\"entity_location\";}', 0, 0, 0, 0),
+('bx_reviews_view_entry', 2, 'bx_reviews', '', '_bx_reviews_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:"bx_reviews";s:6:\"method\";s:18:\"entity_all_actions\";}', 0, 0, 1, 3),
+('bx_reviews_view_entry', 4, 'bx_reviews', '', '_bx_reviews_page_block_title_entry_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:"bx_reviews";s:6:\"method\";s:14:\"entity_actions\";}', 0, 0, 0, 0),
+('bx_reviews_view_entry', 4, 'bx_reviews', '', '_bx_reviews_page_block_title_entry_social_sharing', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:"bx_reviews";s:6:\"method\";s:21:\"entity_social_sharing\";}', 0, 0, 0, 0),
+('bx_reviews_view_entry', 2, 'bx_reviews', '', '_bx_reviews_page_block_title_entry_attachments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:"bx_reviews";s:6:\"method\";s:18:\"entity_attachments\";}', 0, 0, 1, 4),
+('bx_reviews_view_entry', 2, 'bx_reviews', '', '_bx_reviews_page_block_title_entry_comments', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:"bx_reviews";s:6:\"method\";s:15:\"entity_comments\";}', 0, 0, 1, 6),
+('bx_reviews_view_entry', 3, 'bx_reviews', '', '_bx_reviews_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_reviews";i:1;s:4:\"{id}\";}s:5:\"class\";s:20:\"TemplServiceMetatags\";}', 0, 0, 1, 3),
+('bx_reviews_view_entry', 2, 'bx_reviews', '', '_bx_reviews_page_block_title_entry_polls', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:"bx_reviews";s:6:\"method\";s:12:\"entity_polls\";}', 0, 0, 1, 5),
+('bx_reviews_view_entry', 3, 'bx_reviews', '', '_bx_reviews_page_block_title_featured_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_reviews";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:8:"extended";}}', 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_reviews_view_entry_comments', '_bx_reviews_page_title_sys_view_entry_comments', '_bx_reviews_page_title_view_entry_comments', 'bx_reviews', 5, 2147483647, 1, 'view-review-comments', '', '', '', '', 0, 1, 0, 'BxReviewsPageEntry', 'modules/boonex/reviews/classes/BxReviewsPageEntry.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_reviews_view_entry_comments', 1, 'bx_reviews', '_bx_reviews_page_block_title_entry_comments', '_bx_reviews_page_block_title_entry_comments_link', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:"bx_reviews";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_reviews_popular', '_bx_reviews_page_title_sys_entries_popular', '_bx_reviews_page_title_entries_popular', 'bx_reviews', 5, 2147483647, 1, 'reviews-popular', 'page.php?i=reviews-popular', '', '', '', 0, 1, 0, 'BxReviewsPageBrowse', 'modules/boonex/reviews/classes/BxReviewsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_reviews_popular', 1, 'bx_reviews', '_bx_reviews_page_block_title_popular_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_reviews";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: top 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_reviews_top', '_bx_reviews_page_title_sys_entries_top', '_bx_reviews_page_title_entries_top', 'bx_reviews', 5, 2147483647, 1, 'reviews-top', 'page.php?i=reviews-top', '', '', '', 0, 1, 0, 'BxReviewsPageBrowse', 'modules/boonex/reviews/classes/BxReviewsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_reviews_top', 1, 'bx_reviews', '_bx_reviews_page_block_title_top_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_reviews";s:6:"method";s:10:"browse_top";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_reviews_updated', '_bx_reviews_page_title_sys_entries_updated', '_bx_reviews_page_title_entries_updated', 'bx_reviews', 5, 2147483647, 1, 'reviews-updated', 'page.php?i=reviews-updated', '', '', '', 0, 1, 0, 'BxReviewsPageBrowse', 'modules/boonex/reviews/classes/BxReviewsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
+('bx_reviews_updated', 1, 'bx_reviews', '_bx_reviews_page_block_title_updated_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_reviews";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_reviews_author', 'reviews-author', '_bx_reviews_page_title_sys_entries_of_author', '_bx_reviews_page_title_entries_of_author', 'bx_reviews', 5, 2147483647, 1, '', '', '', '', 0, 1, 0, 'BxReviewsPageAuthor', 'modules/boonex/reviews/classes/BxReviewsPageAuthor.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_reviews_author', 1, 'bx_reviews', '', '_bx_reviews_page_block_title_entries_actions', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:"bx_reviews";s:6:\"method\";s:18:\"my_entries_actions\";}', 0, 0, 1, 1),
+('bx_reviews_author', 1, 'bx_reviews', '_bx_reviews_page_block_title_sys_favorites_of_author', '_bx_reviews_page_block_title_favorites_of_author', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:"bx_reviews";s:6:\"method\";s:15:\"browse_favorite\";s:6:"params";a:1:{i:0;s:12:"{profile_id}";}}', 0, 1, 1, 2),
+('bx_reviews_author', 1, 'bx_reviews', '_bx_reviews_page_block_title_sys_entries_of_author', '_bx_reviews_page_block_title_entries_of_author', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:"bx_reviews";s:6:\"method\";s:13:\"browse_author\";}', 0, 0, 1, 3);
+
+-- PAGE: entries in context
+
+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_reviews_context', 'reviews-context', '_bx_reviews_page_title_sys_entries_in_context', '_bx_reviews_page_title_entries_in_context', 'bx_reviews', 5, 2147483647, 1, '', '', '', '', 0, 1, 0, 'BxReviewsPageAuthor', 'modules/boonex/reviews/classes/BxReviewsPageAuthor.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_reviews_context', 1, 'bx_reviews', '_bx_reviews_page_block_title_sys_entries_in_context', '_bx_reviews_page_block_title_entries_in_context', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:"bx_reviews";s:6:\"method\";s:14:\"browse_context\";}', 0, 0, 1, 1);
+
+-- 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_reviews_home', 'reviews-home', '_bx_reviews_page_title_sys_home', '_bx_reviews_page_title_home', 'bx_reviews', 2, 2147483647, 1, 'page.php?i=reviews-home', '', '', '', 0, 1, 0, 'BxReviewsPageBrowse', 'modules/boonex/reviews/classes/BxReviewsPageBrowse.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_reviews_home', 1, 'bx_reviews', '', '_bx_reviews_page_block_title_featured_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_reviews";s:6:"method";s:15:"browse_featured";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, 1, 0),
+('bx_reviews_home', 1, 'bx_reviews', '', '_bx_reviews_page_block_title_recent_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_reviews";s:6:"method";s:13:"browse_public";s:6:"params";a:1:{i:0;s:8:"extended";}}', 0, 1, 1, 1),
+('bx_reviews_home', 2, 'bx_reviews', '', '_bx_reviews_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_reviews";i:1;s:10:"bx_reviews";}s:5:\"class\";s:20:\"TemplServiceMetatags\";}', 0, 1, 1, 0),
+('bx_reviews_home', 2, 'bx_reviews', '', '_bx_reviews_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:13:\"bx_reviews_cats\";i:1;a:1:{s:10:\"show_empty\";b:1;}}s:5:\"class\";s:20:\"TemplServiceCategory\";}', 0, 1, 1, 1),
+('bx_reviews_home', 2, 'bx_reviews', '_bx_reviews_page_block_title_sys_multicats', '_bx_reviews_page_block_title_multicats', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_reviews";s:6:"method";s:21:"categories_multi_list";}', 0, 1, 0, 2);
+
+-- 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_reviews_search', '_bx_reviews_page_title_sys_entries_search', '_bx_reviews_page_title_entries_search', 'bx_reviews', 5, 2147483647, 1, 'reviews-search', 'page.php?i=reviews-search', '', '', '', 0, 1, 0, 'BxReviewsPageBrowse', 'modules/boonex/reviews/classes/BxReviewsPageBrowse.php');
+
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+('bx_reviews_search', 1, 'bx_reviews', '_bx_reviews_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_reviews";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 1),
+('bx_reviews_search', 1, 'bx_reviews', '_bx_reviews_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:10:"bx_reviews";s:10:"show_empty";b:1;}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 1, 2),
+('bx_reviews_search', 1, 'bx_reviews', '_bx_reviews_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_reviews_cmts";}}s:5:"class";s:27:"TemplSearchExtendedServices";}', 0, 1, 0, 3),
+('bx_reviews_search', 1, 'bx_reviews', '_bx_reviews_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_reviews_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_reviews_manage', '_bx_reviews_page_title_sys_manage', '_bx_reviews_page_title_manage', 'bx_reviews', 5, 2147483647, 1, 'reviews-manage', 'page.php?i=reviews-manage', '', '', '', 0, 1, 0, 'BxReviewsPageBrowse', 'modules/boonex/reviews/classes/BxReviewsPageBrowse.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_reviews_manage', 1, 'bx_reviews', '_bx_reviews_page_block_title_system_manage', '_bx_reviews_page_block_title_manage', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:10:"bx_reviews";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_reviews_administration', '_bx_reviews_page_title_sys_manage_administration', '_bx_reviews_page_title_manage', 'bx_reviews', 5, 192, 1, 'reviews-administration', 'page.php?i=reviews-administration', '', '', '', 0, 1, 0, 'BxReviewsPageBrowse', 'modules/boonex/reviews/classes/BxReviewsPageBrowse.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_reviews_administration', 1, 'bx_reviews', '_bx_reviews_page_block_title_system_manage_administration', '_bx_reviews_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:10:"bx_reviews";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_reviews', '_bx_reviews_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_reviews";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_reviews', '_bx_reviews_page_block_title_my_entries', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_reviews";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_reviews_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_reviews', '', '_bx_reviews_page_block_title_recent_entries', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:"bx_reviews";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_reviews', '', '_bx_reviews_page_block_title_recent_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_reviews";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_reviews', '', '_bx_reviews_page_block_title_popular_entries_view_extended', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_reviews";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_reviews', '', '_bx_reviews_page_block_title_popular_entries_view_full', 11, 2147483647, 'service', 'a:3:{s:6:"module";s:10:"bx_reviews";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_reviews', '_bx_reviews_page_block_title_sys_recent_entries_view_showcase', '_bx_reviews_page_block_title_recent_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:"bx_reviews";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_reviews', '_bx_reviews_page_block_title_sys_popular_entries_view_showcase', '_bx_reviews_page_block_title_popular_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:"bx_reviews";s:6:\"method\";s:14:\"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_reviews', '_bx_reviews_page_block_title_sys_featured_entries_view_showcase', '_bx_reviews_page_block_title_featured_entries_view_showcase', 11, 2147483647, 'service', 'a:3:{s:6:\"module\";s:10:"bx_reviews";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_reviews', 'reviews-home', '_bx_reviews_menu_item_title_system_entries_home', '_bx_reviews_menu_item_title_entries_home', 'page.php?i=reviews-home', '', '', 'address-card col-red3', 'bx_reviews_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_reviews', 'reviews-home', '_bx_reviews_menu_item_title_system_entries_home', '_bx_reviews_menu_item_title_entries_home', 'page.php?i=reviews-home', '', '', 'address-card col-red3', 'bx_reviews_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_reviews', 'create-review', '_bx_reviews_menu_item_title_system_create_entry', '_bx_reviews_menu_item_title_create_entry', 'page.php?i=create-review', '', '', 'address-card col-red3', '', 2147483647, 1, 1, IFNULL(@iAddMenuOrder, 0) + 1);
+
+-- MENU: create review form attachments (link, photo, video, etc)
+
+INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
+('bx_reviews_entry_attachments', '_bx_reviews_menu_title_entry_attachments', 'bx_reviews_entry_attachments', 'bx_reviews', 23, 0, 1, 'BxReviewsMenuAttachments', 'modules/boonex/reviews/classes/BxReviewsMenuAttachments.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_reviews_entry_attachments', 'bx_reviews', '_bx_reviews_menu_set_title_entry_attachments', 0);
+
+INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `visibility_custom`, `active`, `copyable`, `editable`, `order`) VALUES 
+('bx_reviews_entry_attachments', 'bx_reviews', 'photo_simple', '_bx_reviews_menu_item_title_system_cpa_photo_simple', '_bx_reviews_menu_item_title_cpa_photo_simple', 'javascript:void(0)', 'javascript:{js_object_uploader_photos_simple}.showUploaderForm();', '_self', 'camera', '', '', 2147483647, '', 0, 0, 1, 1),
+('bx_reviews_entry_attachments', 'bx_reviews', 'photo_html5', '_bx_reviews_menu_item_title_system_cpa_photo_html5', '_bx_reviews_menu_item_title_cpa_photo_html5', 'javascript:void(0)', 'javascript:{js_object_uploader_photos_html5}.showUploaderForm();', '_self', 'camera', '', '', 2147483647, '', 1, 0, 1, 2),
+('bx_reviews_entry_attachments', 'bx_reviews', 'video_simple', '_bx_reviews_menu_item_title_system_cpa_video_simple', '_bx_reviews_menu_item_title_cpa_video_simple', 'javascript:void(0)', 'javascript:{js_object_uploader_videos_simple}.showUploaderForm();', '_self', 'video', '', '', 2147483647, '', 0, 0, 1, 3),
+('bx_reviews_entry_attachments', 'bx_reviews', 'video_html5', '_bx_reviews_menu_item_title_system_cpa_video_html5', '_bx_reviews_menu_item_title_cpa_video_html5', 'javascript:void(0)', 'javascript:{js_object_uploader_videos_html5}.showUploaderForm();', '_self', 'video', '', '', 2147483647, '', 1, 0, 1, 4),
+('bx_reviews_entry_attachments', 'bx_reviews', 'file_simple', '_bx_reviews_menu_item_title_system_cpa_file_simple', '_bx_reviews_menu_item_title_cpa_file_simple', 'javascript:void(0)', 'javascript:{js_object_uploader_files_simple}.showUploaderForm();', '_self', 'file', '', '', 2147483647, '', 0, 0, 1, 5),
+('bx_reviews_entry_attachments', 'bx_reviews', 'file_html5', '_bx_reviews_menu_item_title_system_cpa_file_html5', '_bx_reviews_menu_item_title_cpa_file_html5', 'javascript:void(0)', 'javascript:{js_object_uploader_files_html5}.showUploaderForm();', '_self', 'file', '', '', 2147483647, '', 1, 0, 1, 6),
+('bx_reviews_entry_attachments', 'bx_reviews', 'poll', '_bx_reviews_menu_item_title_system_cpa_poll', '_bx_reviews_menu_item_title_cpa_poll', 'javascript:void(0)', 'javascript:{js_object}.showPollForm(this);', '_self', 'tasks', '', '', 2147483647, '', 1, 0, 1, 7);
+
+-- 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_reviews_view', '_bx_reviews_menu_title_view_entry', 'bx_reviews_view', 'bx_reviews', 9, 0, 1, 'BxReviewsMenuView', 'modules/boonex/reviews/classes/BxReviewsMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_reviews_view', 'bx_reviews', '_bx_reviews_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_reviews_view', 'bx_reviews', 'edit-review', '_bx_reviews_menu_item_title_system_edit_entry', '_bx_reviews_menu_item_title_edit_entry', 'page.php?i=edit-review&id={content_id}', '', '', 'pencil-alt', '', 2147483647, 1, 0, 1),
+('bx_reviews_view', 'bx_reviews', 'delete-review', '_bx_reviews_menu_item_title_system_delete_entry', '_bx_reviews_menu_item_title_delete_entry', 'page.php?i=delete-review&id={content_id}', '', '', 'remove', '', 2147483647, 1, 0, 2);
+
+
+-- MENU: all 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_reviews_view_actions', '_sys_menu_title_view_actions', 'bx_reviews_view_actions', 'bx_reviews', 15, 0, 1, 'BxReviewsMenuViewActions', 'modules/boonex/reviews/classes/BxReviewsMenuViewActions.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_reviews_view_actions', 'bx_reviews', '_sys_menu_set_title_view_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`, `visibility_custom`, `active`, `copyable`, `order`) VALUES 
+('bx_reviews_view_actions', 'bx_reviews', 'edit-review', '_bx_reviews_menu_item_title_system_edit_entry', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 10),
+('bx_reviews_view_actions', 'bx_reviews', 'delete-review', '_bx_reviews_menu_item_title_system_delete_entry', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 20),
+('bx_reviews_view_actions', 'bx_reviews', 'set-badges', '_sys_menu_item_title_system_set_badges', '_sys_menu_item_title_set_badges', 'javascript:void(0)', 'bx_menu_popup(''sys_set_badges'', window, {}, {module: ''bx_reviews'', content_id: {content_id}});', '', 'check-circle', '', '', 0, 2147483647, 'a:2:{s:6:"module";s:10:"bx_reviews";s:6:"method";s:19:"is_badges_avaliable";}', 1, 0, 40),
+('bx_reviews_view_actions', 'bx_reviews', 'comment', '_sys_menu_item_title_system_va_comment', '', '', '', '', '', '', '', 0, 2147483647, '', 0, 0, 200),
+('bx_reviews_view_actions', 'bx_reviews', 'view', '_sys_menu_item_title_system_va_view', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 210),
+('bx_reviews_view_actions', 'bx_reviews', 'vote', '_sys_menu_item_title_system_va_vote', '', '', '', '', '', '', '', 0, 2147483647, '', 0, 0, 220),
+('bx_reviews_view_actions', 'bx_reviews', 'reaction', '_sys_menu_item_title_system_va_reaction', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 225),
+('bx_reviews_view_actions', 'bx_reviews', 'score', '_sys_menu_item_title_system_va_score', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 230),
+('bx_reviews_view_actions', 'bx_reviews', 'favorite', '_sys_menu_item_title_system_va_favorite', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 240),
+('bx_reviews_view_actions', 'bx_reviews', 'feature', '_sys_menu_item_title_system_va_feature', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 250),
+('bx_reviews_view_actions', 'bx_reviews', 'repost', '_sys_menu_item_title_system_va_repost', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 260),
+('bx_reviews_view_actions', 'bx_reviews', 'report', '_sys_menu_item_title_system_va_report', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 270),
+('bx_reviews_view_actions', 'bx_reviews', 'notes', '_sys_menu_item_title_system_va_notes', '_sys_menu_item_title_va_notes', 'javascript:void(0)', 'javascript:bx_get_notes(this,  ''{module_uri}'', {content_id});', '', 'exclamation-triangle', '', '', 0, 2147483647, '', 1, 0, 280),
+('bx_reviews_view_actions', 'bx_reviews', 'social-sharing-facebook', '_sys_menu_item_title_system_social_sharing_facebook', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 300),
+('bx_reviews_view_actions', 'bx_reviews', 'social-sharing-twitter', '_sys_menu_item_title_system_social_sharing_twitter', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 320),
+('bx_reviews_view_actions', 'bx_reviews', 'social-sharing-pinterest', '_sys_menu_item_title_system_social_sharing_pinterest', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 330),
+('bx_reviews_view_actions', 'bx_reviews', 'more-auto', '_sys_menu_item_title_system_va_more_auto', '_sys_menu_item_title_va_more_auto', 'javascript:void(0)', '', '', 'ellipsis-v', '', '', 0, 2147483647, '', 1, 0, 9999);
+
+
+-- 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_reviews_my', '_bx_reviews_menu_title_entries_my', 'bx_reviews_my', 'bx_reviews', 9, 0, 1, 'BxReviewsMenu', 'modules/boonex/reviews/classes/BxReviewsMenu.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_reviews_my', 'bx_reviews', '_bx_reviews_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_reviews_my', 'bx_reviews', 'create-review', '_bx_reviews_menu_item_title_system_create_entry', '_bx_reviews_menu_item_title_create_entry', 'page.php?i=create-review', '', '', '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_reviews_submenu', '_bx_reviews_menu_title_submenu', 'bx_reviews_submenu', 'bx_reviews', 8, 0, 1, '', '');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_reviews_submenu', 'bx_reviews', '_bx_reviews_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_reviews_submenu', 'bx_reviews', 'reviews-home', '_bx_reviews_menu_item_title_system_entries_public', '_bx_reviews_menu_item_title_entries_public', 'page.php?i=reviews-home', '', '', '', '', 2147483647, 1, 1, 1),
+('bx_reviews_submenu', 'bx_reviews', 'reviews-popular', '_bx_reviews_menu_item_title_system_entries_popular', '_bx_reviews_menu_item_title_entries_popular', 'page.php?i=reviews-popular', '', '', '', '', 2147483647, 1, 1, 2),
+('bx_reviews_submenu', 'bx_reviews', 'reviews-top', '_bx_reviews_menu_item_title_system_entries_top', '_bx_reviews_menu_item_title_entries_top', 'page.php?i=reviews-top', '', '', '', '', 2147483647, 1, 1, 3),
+('bx_reviews_submenu', 'bx_reviews', 'reviews-search', '_bx_reviews_menu_item_title_system_entries_search', '_bx_reviews_menu_item_title_entries_search', 'page.php?i=reviews-search', '', '', '', '', 2147483647, 1, 1, 4),
+('bx_reviews_submenu', 'bx_reviews', 'reviews-manage', '_bx_reviews_menu_item_title_system_entries_manage', '_bx_reviews_menu_item_title_entries_manage', 'page.php?i=reviews-manage', '', '', '', '', 2147483646, 1, 1, 5);
+
+-- 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_reviews_view_submenu', '_bx_reviews_menu_title_view_entry_submenu', 'bx_reviews_view_submenu', 'bx_reviews', 8, 0, 1, 'BxReviewsMenuView', 'modules/boonex/reviews/classes/BxReviewsMenuView.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_reviews_view_submenu', 'bx_reviews', '_bx_reviews_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_reviews_view_submenu', 'bx_reviews', 'view-review', '_bx_reviews_menu_item_title_system_view_entry', '_bx_reviews_menu_item_title_view_entry_submenu_entry', 'page.php?i=view-review&id={content_id}', '', '', '', '', 2147483647, 0, 0, 1),
+('bx_reviews_view_submenu', 'bx_reviews', 'view-review-comments', '_bx_reviews_menu_item_title_system_view_entry_comments', '_bx_reviews_menu_item_title_view_entry_submenu_comments', 'page.php?i=view-review-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_reviews_snippet_meta', '_sys_menu_title_snippet_meta', 'bx_reviews_snippet_meta', 'bx_reviews', 15, 0, 1, 'BxReviewsMenuSnippetMeta', 'modules/boonex/reviews/classes/BxReviewsMenuSnippetMeta.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_reviews_snippet_meta', 'bx_reviews', '_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_reviews_snippet_meta', 'bx_reviews', 'date', '_sys_menu_item_title_system_sm_date', '_sys_menu_item_title_sm_date', '', '', '', '', '', 2147483647, 1, 0, 1, 1),
+('bx_reviews_snippet_meta', 'bx_reviews', 'author', '_sys_menu_item_title_system_sm_author', '_sys_menu_item_title_sm_author', '', '', '', '', '', 2147483647, 1, 0, 1, 2),
+('bx_reviews_snippet_meta', 'bx_reviews', 'category', '_sys_menu_item_title_system_sm_category', '_sys_menu_item_title_sm_category', '', '', '', '', '', 2147483647, 0, 0, 1, 3),
+('bx_reviews_snippet_meta', 'bx_reviews', 'tags', '_sys_menu_item_title_system_sm_tags', '_sys_menu_item_title_sm_tags', '', '', '', '', '', 2147483647, 0, 0, 1, 4),
+('bx_reviews_snippet_meta', 'bx_reviews', 'views', '_sys_menu_item_title_system_sm_views', '_sys_menu_item_title_sm_views', '', '', '', '', '', 2147483647, 0, 0, 1, 5),
+('bx_reviews_snippet_meta', 'bx_reviews', '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_reviews', 'profile-stats-manage-reviews', '_bx_reviews_menu_item_title_system_manage_my_reviews', '_bx_reviews_menu_item_title_manage_my_reviews', 'page.php?i=reviews-manage', '', '_self', 'address-card col-red3', 'a:2:{s:6:"module";s:10:"bx_reviews";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_reviews_menu_manage_tools', '_bx_reviews_menu_title_manage_tools', 'bx_reviews_menu_manage_tools', 'bx_reviews', 6, 0, 1, 'BxReviewsMenuManageTools', 'modules/boonex/reviews/classes/BxReviewsMenuManageTools.php');
+
+INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
+('bx_reviews_menu_manage_tools', 'bx_reviews', '_bx_reviews_menu_set_title_manage_tools', 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_reviews', 'reviews-administration', '_bx_reviews_menu_item_title_system_admt_reviews', '_bx_reviews_menu_item_title_admt_reviews', 'page.php?i=reviews-administration', '', '_self', 'address-card', 'a:2:{s:6:"module";s:10:"bx_reviews";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_reviews', 'reviews-author', '_bx_reviews_menu_item_title_system_view_entries_author', '_bx_reviews_menu_item_title_view_entries_author', 'page.php?i=reviews-author&profile_id={profile_id}', '', '', 'address-card col-red3', '', 2147483647, 1, 0, 0),
+('trigger_group_view_submenu', 'bx_reviews', 'reviews-context', '_bx_reviews_menu_item_title_system_view_entries_in_context', '_bx_reviews_menu_item_title_view_entries_in_context', 'page.php?i=reviews-context&profile_id={profile_id}', '', '', 'address-card col-red3', '', 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_reviews_allow_view_to', 'bx_reviews', 'view', '_bx_reviews_form_entry_input_allow_view_to', '3', 'bx_reviews_reviews', 'id', 'author', '', '');
+
+
+-- ACL
+
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+('bx_reviews', 'create entry', NULL, '_bx_reviews_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_reviews', 'delete entry', NULL, '_bx_reviews_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_reviews', 'view entry', NULL, '_bx_reviews_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_reviews', 'set thumb', NULL, '_bx_reviews_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_reviews', 'edit any entry', NULL, '_bx_reviews_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_reviews', '_bx_reviews', @iSearchOrder + 1, 'BxReviewsSearchResult', 'modules/boonex/reviews/classes/BxReviewsSearchResult.php'),
+('bx_reviews_cmts', '_bx_reviews_cmts', @iSearchOrder + 2, 'BxReviewsCmtsSearchResult', 'modules/boonex/reviews/classes/BxReviewsCmtsSearchResult.php');
+
+-- METATAGS
+INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
+('bx_reviews', 'bx_reviews_meta_keywords', 'bx_reviews_meta_locations', 'bx_reviews_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_reviews_cats', 'bx_reviews', 'bx_reviews', 'bx_reviews_cats', 'bx_reviews_reviews', 'cat', 'INNER JOIN `sys_profiles` ON (`sys_profiles`.`id` = ABS(`bx_reviews_reviews`.`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_reviews', 'bx_reviews', '_bx_reviews', 'page.php?i=reviews-home', 'address-card col-red3', 'SELECT COUNT(*) FROM `bx_reviews_reviews` 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_reviews_growth', '_bx_reviews_chart_growth', 'bx_reviews_reviews', 'added', '', 'status,status_admin', '', 1, @iMaxOrderCharts + 1, 'BxDolChartGrowth', ''),
+('bx_reviews_growth_speed', '_bx_reviews_chart_growth_speed', 'bx_reviews_reviews', '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_reviews_administration', 'Sql', 'SELECT * FROM `bx_reviews_reviews` WHERE 1 ', 'bx_reviews_reviews', 'id', 'added', 'status_admin', '', 20, NULL, 'start', '', 'title,text', '', 'like', 'reports', '', 192, 'BxReviewsGridAdministration', 'modules/boonex/reviews/classes/BxReviewsGridAdministration.php'),
+('bx_reviews_common', 'Sql', 'SELECT * FROM `bx_reviews_reviews` WHERE 1 ', 'bx_reviews_reviews', 'id', 'added', 'status', '', 20, NULL, 'start', '', 'title,text', '', 'like', '', '', 2147483647, 'BxReviewsGridCommon', 'modules/boonex/reviews/classes/BxReviewsGridCommon.php');
+
+INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
+('bx_reviews_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_reviews_administration', 'switcher', '_bx_reviews_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_reviews_administration', 'reports', '_sys_txt_reports_title', '5%', 0, '', '', 3),
+('bx_reviews_administration', 'title', '_bx_reviews_grid_column_title_adm_title', '25%', 0, '25', '', 4),
+('bx_reviews_administration', 'added', '_bx_reviews_grid_column_title_adm_added', '20%', 1, '25', '', 5),
+('bx_reviews_administration', 'author', '_bx_reviews_grid_column_title_adm_author', '20%', 0, '25', '', 6),
+('bx_reviews_administration', 'actions', '', '20%', 0, '', '', 7),
+('bx_reviews_common', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
+('bx_reviews_common', 'switcher', '_bx_reviews_grid_column_title_adm_active', '8%', 0, '', '', 2),
+('bx_reviews_common', 'title', '_bx_reviews_grid_column_title_adm_title', '40%', 0, '35', '', 3),
+('bx_reviews_common', 'added', '_bx_reviews_grid_column_title_adm_added', '30%', 1, '25', '', 4),
+('bx_reviews_common', 'actions', '', '20%', 0, '', '', 5);
+
+
+INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
+('bx_reviews_administration', 'bulk', 'delete', '_bx_reviews_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_reviews_administration', 'single', 'edit', '_bx_reviews_grid_action_title_adm_edit', 'pencil-alt', 1, 0, 1),
+('bx_reviews_administration', 'single', 'delete', '_bx_reviews_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_reviews_administration', 'single', 'settings', '_bx_reviews_grid_action_title_adm_more_actions', 'cog', 1, 0, 3),
+('bx_reviews_administration', 'single', 'audit_content', '_bx_reviews_grid_action_title_adm_audit_content', 'search', 1, 0, 4),
+('bx_reviews_common', 'bulk', 'delete', '_bx_reviews_grid_action_title_adm_delete', '', 0, 1, 1),
+('bx_reviews_common', 'single', 'edit', '_bx_reviews_grid_action_title_adm_edit', 'pencil-alt', 1, 0, 1),
+('bx_reviews_common', 'single', 'delete', '_bx_reviews_grid_action_title_adm_delete', 'remove', 1, 1, 2),
+('bx_reviews_common', 'single', 'settings', '_bx_reviews_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_reviews_simple', 1, 'BxReviewsUploaderSimple', 'modules/boonex/reviews/classes/BxReviewsUploaderSimple.php'),
+('bx_reviews_html5', 1, 'BxReviewsUploaderHTML5', 'modules/boonex/reviews/classes/BxReviewsUploaderHTML5.php'),
+('bx_reviews_photos_simple', 1, 'BxReviewsUploaderSimpleAttach', 'modules/boonex/reviews/classes/BxReviewsUploaderSimpleAttach.php'),
+('bx_reviews_photos_html5', 1, 'BxReviewsUploaderHTML5Attach', 'modules/boonex/reviews/classes/BxReviewsUploaderHTML5Attach.php'),
+('bx_reviews_videos_simple', 1, 'BxReviewsUploaderSimpleAttach', 'modules/boonex/reviews/classes/BxReviewsUploaderSimpleAttach.php'),
+('bx_reviews_videos_html5', 1, 'BxReviewsUploaderHTML5Attach', 'modules/boonex/reviews/classes/BxReviewsUploaderHTML5Attach.php'),
+('bx_reviews_files_simple', 1, 'BxReviewsUploaderSimpleAttach', 'modules/boonex/reviews/classes/BxReviewsUploaderSimpleAttach.php'),
+('bx_reviews_files_html5', 1, 'BxReviewsUploaderHTML5Attach', 'modules/boonex/reviews/classes/BxReviewsUploaderHTML5Attach.php');
+
+-- ALERTS
+
+INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES 
+('bx_reviews', 'BxReviewsAlertsResponse', 'modules/boonex/reviews/classes/BxReviewsAlertsResponse.php', '');
+SET @iHandler := LAST_INSERT_ID();
+
+INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
+('system', 'save_setting', @iHandler),
+('profile', 'delete', @iHandler),
+
+('bx_reviews_videos_mp4', 'transcoded', @iHandler);
+
+
+-- CRON
+INSERT INTO `sys_cron_jobs` (`name`, `time`, `class`, `file`, `service_call`) VALUES
+('bx_reviews_publishing', '* * * * *', 'BxReviewsCronPublishing', 'modules/boonex/reviews/classes/BxReviewsCronPublishing.php', '');

+ 574 - 0
modules/boonex/reviews/install/sql/install.sql

@@ -0,0 +1,574 @@
+-- TABLE: entries
+CREATE TABLE IF NOT EXISTS `bx_reviews_reviews` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `author` int(11) NOT NULL,
+  `added` int(11) NOT NULL,
+  `changed` int(11) NOT NULL,
+  `published` int(11) NOT NULL,
+  `thumb` int(11) NOT NULL,
+  `title` varchar(255) NOT NULL,
+  `cat` int(11) NOT NULL,
+  `multicat` text NOT NULL,
+  `text` mediumtext NOT NULL,
+  `labels` text NOT NULL,
+  `location` text NOT NULL,
+  `views` int(11) NOT NULL default '0',
+  `rate` float NOT NULL default '0',
+  `votes` int(11) NOT NULL default '0',
+  `rrate` float NOT NULL default '0',
+  `rvotes` int(11) NOT NULL default '0',
+  `score` int(11) NOT NULL default '0',
+  `sc_up` int(11) NOT NULL default '0',
+  `sc_down` int(11) NOT NULL default '0',
+  `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` varchar(16) NOT NULL DEFAULT '3',
+  `disable_comments` tinyint(4) NOT NULL DEFAULT '0',
+  `status` enum('active','awaiting','failed','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_reviews_covers` (
+  `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` bigint(20) 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_reviews_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` bigint(20) 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_reviews_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` bigint(20) 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_reviews_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` bigint(20) 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_reviews_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` bigint(20) 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_reviews_videos_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` bigint(20) 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_reviews_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(11) 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`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_reviews_cmts_notes` (
+  `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(11) 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_reviews_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_reviews_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_reviews_reactions` (
+  `object_id` int(11) NOT NULL default '0',
+  `reaction` varchar(32) NOT NULL default '',
+  `count` int(11) NOT NULL default '0',
+  `sum` int(11) NOT NULL default '0',
+  UNIQUE KEY `reaction` (`object_id`, `reaction`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_reviews_reactions_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `reaction` varchar(32) NOT NULL default '',
+  `value` tinyint(4) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `vote` (`object_id`, `author_nip`)
+);
+
+-- TABLE: views
+CREATE TABLE `bx_reviews_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_reviews_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_reviews_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`)
+);
+
+CREATE TABLE `bx_reviews_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))
+);
+
+-- TABLE: reports
+CREATE TABLE IF NOT EXISTS `bx_reviews_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_reviews_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_reviews_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`)
+);
+
+-- TABLE: scores
+CREATE TABLE IF NOT EXISTS `bx_reviews_scores` (
+  `object_id` int(11) NOT NULL default '0',
+  `count_up` int(11) NOT NULL default '0',
+  `count_down` int(11) NOT NULL default '0',
+  UNIQUE KEY `object_id` (`object_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_reviews_scores_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(8) NOT NULL default '',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `vote` (`object_id`, `author_nip`)
+);
+
+-- TABLE: polls
+CREATE TABLE IF NOT EXISTS `bx_reviews_polls` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `author_id` int(11) NOT NULL default '0',
+  `content_id` int(11) NOT NULL default '0',
+  `text` text NOT NULL,
+  PRIMARY KEY (`id`),
+  KEY `content_id` (`content_id`),
+  FULLTEXT KEY `search_fields` (`text`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_reviews_polls_answers` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `poll_id` int(11) unsigned NOT NULL default '0',
+  `title` varchar(255) NOT NULL,
+  `rate` float NOT NULL default '0',
+  `votes` int(11) NOT NULL default '0',
+  `order` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `poll_id` (`poll_id`),
+  FULLTEXT KEY `title` (`title`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_reviews_polls_answers_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_reviews_polls_answers_votes_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `value` tinyint(4) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `vote` (`object_id`, `author_nip`)
+);
+
+-- STORAGES & TRANSCODERS
+SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
+
+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_reviews_covers', @sStorageEngine, '', 360, 2592000, 3, 'bx_reviews_covers', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
+
+('bx_reviews_photos', @sStorageEngine, '', 360, 2592000, 3, 'bx_reviews_photos', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
+('bx_reviews_photos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_reviews_photos_resized', 'allow-deny', 'jpg,jpeg,jpe,gif,png', '', 0, 0, 0, 0, 0, 0),
+
+('bx_reviews_videos', @sStorageEngine, '', 360, 2592000, 3, 'bx_reviews_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_reviews_videos_resized', @sStorageEngine, '', 360, 2592000, 3, 'bx_reviews_videos_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),
+
+('bx_reviews_files', @sStorageEngine, '', 360, 2592000, 3, 'bx_reviews_files', 'deny-allow', '', 'action,apk,app,bat,bin,cmd,com,command,cpl,csh,exe,gadget,inf,ins,inx,ipa,isu,job,jse,ksh,lnk,msc,msi,msp,mst,osx,out,paf,pif,prg,ps1,reg,rgs,run,sct,shb,shs,u3p,vb,vbe,vbs,vbscript,workflow,ws,wsf', 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_reviews_preview', 'bx_reviews_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_covers";}', 'no', '1', '2592000', '0', '', ''),
+('bx_reviews_gallery', 'bx_reviews_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_covers";}', 'no', '1', '2592000', '0', '', ''),
+('bx_reviews_cover', 'bx_reviews_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_covers";}', 'no', '1', '2592000', '0', '', ''),
+
+('bx_reviews_preview_photos', 'bx_reviews_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_photos";}', 'no', '1', '2592000', '0', '', ''),
+('bx_reviews_gallery_photos', 'bx_reviews_photos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_photos";}', 'no', '1', '2592000', '0', '', ''),
+
+('bx_reviews_videos_poster', 'bx_reviews_videos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
+('bx_reviews_videos_poster_preview', 'bx_reviews_videos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
+('bx_reviews_videos_mp4', 'bx_reviews_videos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
+('bx_reviews_videos_mp4_hd', 'bx_reviews_videos_resized', 'Storage', 'a:1:{s:6:"object";s:17:"bx_reviews_videos";}', 'no', '0', '0', '0', 'BxDolTranscoderVideo', ''),
+
+('bx_reviews_preview_files', 'bx_reviews_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_reviews_files";}', 'no', '1', '2592000', '0', '', ''),
+('bx_reviews_gallery_files', 'bx_reviews_photos_resized', 'Storage', 'a:1:{s:6:"object";s:16:"bx_reviews_files";}', 'no', '1', '2592000', '0', '', '');
+
+INSERT INTO `sys_transcoder_filters` (`transcoder_object`, `filter`, `filter_params`, `order`) VALUES 
+('bx_reviews_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_reviews_gallery', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0'),
+('bx_reviews_cover', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0'),
+
+('bx_reviews_preview_photos', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
+('bx_reviews_gallery_photos', 'Resize', 'a:1:{s:1:"w";s:4:"2000";}', '0'),
+
+('bx_reviews_videos_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_reviews_videos_poster_preview', 'Poster', 'a:2:{s:1:"h";s:3:"480";s:10:"force_type";s:3:"jpg";}', 0),
+('bx_reviews_videos_poster', 'Poster', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"jpg";}', 0),
+('bx_reviews_videos_mp4', 'Mp4', 'a:2:{s:1:"h";s:3:"318";s:10:"force_type";s:3:"mp4";}', 0),
+('bx_reviews_videos_mp4_hd', 'Mp4', 'a:3:{s:1:"h";s:3:"720";s:13:"video_bitrate";s:4:"1536";s:10:"force_type";s:3:"mp4";}', 0),
+
+('bx_reviews_preview_files', 'Resize', 'a:3:{s:1:"w";s:3:"300";s:1:"h";s:3:"200";s:11:"crop_resize";s:1:"1";}', '0'),
+('bx_reviews_gallery_files', 'Resize', 'a:1:{s:1:"w";s:3:"500";}', '0');
+
+
+-- FORMS: entry (review)
+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_reviews', 'bx_reviews', '_bx_reviews_form_entry', '', 'a:1:{s:7:"enctype";s:19:"multipart/form-data";}', 'bx_reviews_reviews', 'id', '', '', 'a:2:{i:0;s:9:"do_submit";i:1;s:10:"do_publish";}', '', 0, 1, 'BxReviewsFormEntry', 'modules/boonex/reviews/classes/BxReviewsFormEntry.php');
+
+INSERT INTO `sys_form_displays`(`object`, `display_name`, `module`, `view_mode`, `title`) VALUES 
+('bx_reviews', 'bx_reviews_entry_add', 'bx_reviews', 0, '_bx_reviews_form_entry_display_add'),
+('bx_reviews', 'bx_reviews_entry_delete', 'bx_reviews', 0, '_bx_reviews_form_entry_display_delete'),
+('bx_reviews', 'bx_reviews_entry_edit', 'bx_reviews', 0, '_bx_reviews_form_entry_display_edit'),
+('bx_reviews', 'bx_reviews_entry_view', 'bx_reviews', 1, '_bx_reviews_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_reviews', 'bx_reviews', 'allow_view_to', '', '', 0, 'custom', '_bx_reviews_form_entry_input_sys_allow_view_to', '_bx_reviews_form_entry_input_allow_view_to', '', 1, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'delete_confirm', 1, '', 0, 'checkbox', '_bx_reviews_form_entry_input_sys_delete_confirm', '_bx_reviews_form_entry_input_delete_confirm', '_bx_reviews_form_entry_input_delete_confirm_info', 1, 0, 0, '', '', '', 'Avail', '', '_bx_reviews_form_entry_input_delete_confirm_error', '', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'do_publish', '_bx_reviews_form_entry_input_do_publish', '', 0, 'submit', '_bx_reviews_form_entry_input_sys_do_publish', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'do_submit', '_bx_reviews_form_entry_input_do_submit', '', 0, 'submit', '_bx_reviews_form_entry_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'location', '', '', 0, 'location', '_sys_form_input_sys_location', '_sys_form_input_location', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'covers', 'a:1:{i:0;s:16:"bx_reviews_html5";}', 'a:2:{s:17:"bx_reviews_simple";s:26:"_sys_uploader_simple_title";s:16:"bx_reviews_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_reviews_form_entry_input_sys_covers', '_bx_reviews_form_entry_input_covers', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'pictures', 'a:1:{i:0;s:23:"bx_reviews_photos_html5";}', 'a:2:{s:24:"bx_reviews_photos_simple";s:26:"_sys_uploader_simple_title";s:23:"bx_reviews_photos_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_reviews_form_entry_input_sys_pictures', '_bx_reviews_form_entry_input_pictures', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'videos', 'a:1:{i:0;s:23:"bx_reviews_videos_html5";}', 'a:2:{s:24:"bx_reviews_videos_simple";s:26:"_sys_uploader_simple_title";s:23:"bx_reviews_videos_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_reviews_form_entry_input_sys_videos', '_bx_reviews_form_entry_input_videos', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'files', 'a:1:{i:0;s:22:"bx_reviews_files_html5";}', 'a:2:{s:23:"bx_reviews_files_simple";s:26:"_sys_uploader_simple_title";s:22:"bx_reviews_files_html5";s:25:"_sys_uploader_html5_title";}', 0, 'files', '_bx_reviews_form_entry_input_sys_files', '_bx_reviews_form_entry_input_files', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'polls', '', '', 0, 'custom', '_bx_reviews_form_entry_input_sys_polls', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'text', '', '', 0, 'textarea', '_bx_reviews_form_entry_input_sys_text', '_bx_reviews_form_entry_input_text', '', 1, 0, 2, '', '', '', 'Avail', '', '_bx_reviews_form_entry_input_text_err', 'XssHtml', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'title', '', '', 0, 'text', '_bx_reviews_form_entry_input_sys_title', '_bx_reviews_form_entry_input_title', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_reviews_form_entry_input_title_err', 'Xss', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'cat', '', '#!bx_reviews_cats', 0, 'select', '_bx_reviews_form_entry_input_sys_cat', '_bx_reviews_form_entry_input_cat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_reviews_form_entry_input_cat_err', 'Xss', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'multicat', '', '', 0, 'custom', '_bx_reviews_form_entry_input_sys_multicat', '_bx_reviews_form_entry_input_multicat', '', 1, 0, 0, '', '', '', 'avail', '', '_bx_reviews_form_entry_input_multicat_err', 'Xss', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'added', '', '', 0, 'datetime', '_bx_reviews_form_entry_input_sys_date_added', '_bx_reviews_form_entry_input_date_added', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'changed', '', '', 0, 'datetime', '_bx_reviews_form_entry_input_sys_date_changed', '_bx_reviews_form_entry_input_date_changed', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'published', '', '', 0, 'datetime', '_bx_reviews_form_entry_input_sys_date_published', '_bx_reviews_form_entry_input_date_published', '_bx_reviews_form_entry_input_date_published_info', 0, 0, 0, '', '', '', '', '', '', 'DateTimeTs', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'attachments', '', '', 0, 'custom', '_bx_reviews_form_entry_input_sys_attachments', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'labels', '', '', 0, 'custom', '_sys_form_input_sys_labels', '_sys_form_input_labels', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'anonymous', '', '', 0, 'switcher', '_sys_form_input_sys_anonymous', '_sys_form_input_anonymous', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
+('bx_reviews', 'bx_reviews', 'disable_comments', '1', '', 0, 'switcher', '_bx_reviews_form_entry_input_sys_disable_comments', '_bx_reviews_form_entry_input_disable_comments', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 1, 0);
+
+
+
+INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES 
+('bx_reviews_entry_add', 'delete_confirm', 2147483647, 0, 1),
+('bx_reviews_entry_add', 'title', 2147483647, 1, 2),
+('bx_reviews_entry_add', 'cat', 2147483647, 1, 3),
+('bx_reviews_entry_add', 'text', 2147483647, 1, 4),
+('bx_reviews_entry_add', 'attachments', 2147483647, 1, 5),
+('bx_reviews_entry_add', 'pictures', 2147483647, 1, 6),
+('bx_reviews_entry_add', 'videos', 2147483647, 1, 7),
+('bx_reviews_entry_add', 'files', 2147483647, 1, 8),
+('bx_reviews_entry_add', 'polls', 2147483647, 1, 9),
+('bx_reviews_entry_add', 'covers', 2147483647, 1, 10),
+('bx_reviews_entry_add', 'allow_view_to', 2147483647, 1, 11),
+('bx_reviews_entry_add', 'location', 2147483647, 1, 12),
+('bx_reviews_entry_add', 'published', 192, 1, 13),
+('bx_reviews_entry_add', 'disable_comments', 192, 1, 14),
+('bx_reviews_entry_add', 'do_publish', 2147483647, 1, 15),
+
+('bx_reviews_entry_delete', 'delete_confirm', 2147483647, 1, 1),
+('bx_reviews_entry_delete', 'do_submit', 2147483647, 1, 2),
+
+('bx_reviews_entry_edit', 'do_publish', 2147483647, 0, 1),
+('bx_reviews_entry_edit', 'delete_confirm', 2147483647, 0, 2),
+('bx_reviews_entry_edit', 'title', 2147483647, 1, 3),
+('bx_reviews_entry_edit', 'cat', 2147483647, 1, 4),
+('bx_reviews_entry_edit', 'text', 2147483647, 1, 5),
+('bx_reviews_entry_edit', 'attachments', 2147483647, 1, 6),
+('bx_reviews_entry_edit', 'pictures', 2147483647, 1, 7),
+('bx_reviews_entry_edit', 'videos', 2147483647, 1, 8),
+('bx_reviews_entry_edit', 'files', 2147483647, 1, 9),
+('bx_reviews_entry_edit', 'polls', 2147483647, 1, 10),
+('bx_reviews_entry_edit', 'covers', 2147483647, 1, 11),
+('bx_reviews_entry_edit', 'allow_view_to', 2147483647, 1, 12),
+('bx_reviews_entry_edit', 'location', 2147483647, 1, 13),
+('bx_reviews_entry_edit', 'disable_comments', 192, 1, 14),
+('bx_reviews_entry_edit', 'published', 192, 1, 15),
+('bx_reviews_entry_edit', 'do_submit', 2147483647, 1, 16),
+
+('bx_reviews_entry_view', 'cat', 2147483647, 1, 1),
+('bx_reviews_entry_view', 'added', 2147483647, 1, 2),
+('bx_reviews_entry_view', 'changed', 2147483647, 1, 3),
+('bx_reviews_entry_view', 'published', 192, 1, 4);
+
+-- FORMS: poll
+INSERT INTO `sys_objects_form` (`object`, `module`, `title`, `action`, `form_attrs`, `submit_name`, `table`, `key`, `uri`, `uri_title`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
+('bx_reviews_poll', 'bx_reviews', '_bx_reviews_form_poll', '', '', 'do_submit', 'bx_reviews_polls', 'id', '', '', 'a:1:{s:14:"checker_helper";s:30:"BxReviewsFormPollCheckerHelper";}', 0, 1, 'BxReviewsFormPoll', 'modules/boonex/reviews/classes/BxReviewsFormPoll.php');
+
+INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
+('bx_reviews_poll_add', 'bx_reviews', 'bx_reviews_poll', '_bx_reviews_form_poll_display_add', 0);
+
+INSERT INTO `sys_form_inputs` (`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES
+('bx_reviews_poll', 'bx_reviews', 'text', '', '', 0, 'text', '_bx_reviews_form_poll_input_sys_text', '_bx_reviews_form_poll_input_text', '', 1, 0, 0, '', '', '', 'Avail', '', '_bx_reviews_form_poll_input_text_err', 'Xss', '', 1, 0),
+('bx_reviews_poll', 'bx_reviews', 'answers', '', '', 0, 'custom', '_bx_reviews_form_poll_input_sys_answers', '_bx_reviews_form_poll_input_answers', '', 1, 0, 0, '', '', '', 'AvailAnswers', '', '_bx_reviews_form_poll_input_answers_err', '', '', 1, 0),
+('bx_reviews_poll', 'bx_reviews', 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
+('bx_reviews_poll', 'bx_reviews', 'do_submit', '_bx_reviews_form_poll_input_do_submit', '', 0, 'submit', '_bx_reviews_form_poll_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
+('bx_reviews_poll', 'bx_reviews', 'do_cancel', '_bx_reviews_form_poll_input_do_cancel', '', 0, 'button', '_bx_reviews_form_poll_input_do_cancel', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:45:"$(''.bx-popup-applied:visible'').dolPopupHide()";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 0, 0);
+
+INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
+('bx_reviews_poll_add', 'text', 2147483647, 1, 1),
+('bx_reviews_poll_add', 'answers', 2147483647, 1, 2),
+('bx_reviews_poll_add', 'controls', 2147483647, 1, 3),
+('bx_reviews_poll_add', 'do_submit', 2147483647, 1, 4),
+('bx_reviews_poll_add', 'do_cancel', 2147483647, 1, 5);
+
+-- PRE-VALUES
+INSERT INTO `sys_form_pre_lists`(`key`, `title`, `module`, `use_for_sets`) VALUES
+('bx_reviews_cats', '_bx_reviews_pre_lists_cats', 'bx_reviews', '0');
+
+INSERT INTO `sys_form_pre_values`(`Key`, `Value`, `Order`, `LKey`, `LKey2`, `Data`) VALUES
+('bx_reviews_cats', '', 0, '_sys_please_select', '', ''),
+('bx_reviews_cats', '1', 1, '_bx_reviews_cat_Animals_Pets', '', ''),
+('bx_reviews_cats', '2', 2, '_bx_reviews_cat_Architecture', '', ''),
+('bx_reviews_cats', '3', 3, '_bx_reviews_cat_Art', '', ''),
+('bx_reviews_cats', '4', 4, '_bx_reviews_cat_Cars_Motorcycles', '', ''),
+('bx_reviews_cats', '5', 5, '_bx_reviews_cat_Celebrities', '', ''),
+('bx_reviews_cats', '6', 6, '_bx_reviews_cat_Design', '', ''),
+('bx_reviews_cats', '7', 7, '_bx_reviews_cat_DIY_Crafts', '', ''),
+('bx_reviews_cats', '8', 8, '_bx_reviews_cat_Education', '', ''),
+('bx_reviews_cats', '9', 9, '_bx_reviews_cat_Film_Music_Books', '', ''),
+('bx_reviews_cats', '10', 10, '_bx_reviews_cat_Food_Drink', '', ''),
+('bx_reviews_cats', '11', 11, '_bx_reviews_cat_Gardening', '', ''),
+('bx_reviews_cats', '12', 12, '_bx_reviews_cat_Geek', '', ''),
+('bx_reviews_cats', '13', 13, '_bx_reviews_cat_Hair_Beauty', '', ''),
+('bx_reviews_cats', '14', 14, '_bx_reviews_cat_Health_Fitness', '', ''),
+('bx_reviews_cats', '15', 15, '_bx_reviews_cat_History', '', ''),
+('bx_reviews_cats', '16', 16, '_bx_reviews_cat_Holidays_Events', '', ''),
+('bx_reviews_cats', '17', 17, '_bx_reviews_cat_Home_Decor', '', ''),
+('bx_reviews_cats', '18', 18, '_bx_reviews_cat_Humor', '', ''),
+('bx_reviews_cats', '19', 19, '_bx_reviews_cat_Illustrations_Posters', '', ''),
+('bx_reviews_cats', '20', 20, '_bx_reviews_cat_Kids_Parenting', '', ''),
+('bx_reviews_cats', '21', 21, '_bx_reviews_cat_Mens_Fashion', '', ''),
+('bx_reviews_cats', '22', 22, '_bx_reviews_cat_Outdoors', '', ''),
+('bx_reviews_cats', '23', 23, '_bx_reviews_cat_Photography', '', ''),
+('bx_reviews_cats', '24', 24, '_bx_reviews_cat_Products', '', ''),
+('bx_reviews_cats', '25', 25, '_bx_reviews_cat_Quotes', '', ''),
+('bx_reviews_cats', '26', 26, '_bx_reviews_cat_Science_Nature', '', ''),
+('bx_reviews_cats', '27', 27, '_bx_reviews_cat_Sports', '', ''),
+('bx_reviews_cats', '28', 28, '_bx_reviews_cat_Tattoos', '', ''),
+('bx_reviews_cats', '29', 29, '_bx_reviews_cat_Technology', '', ''),
+('bx_reviews_cats', '30', 30, '_bx_reviews_cat_Travel', '', ''),
+('bx_reviews_cats', '31', 31, '_bx_reviews_cat_Weddings', '', ''),
+('bx_reviews_cats', '32', 32, '_bx_reviews_cat_Womens_Fashion', '', '');
+
+-- COMMENTS
+INSERT INTO `sys_objects_cmts` (`Name`, `Module`, `Table`, `CharsPostMin`, `CharsPostMax`, `CharsDisplayMax`, `Html`, `PerView`, `PerViewReplies`, `BrowseType`, `IsBrowseSwitch`, `PostFormPosition`, `NumberOfLevels`, `IsDisplaySwitch`, `IsRatable`, `ViewingThreshold`, `IsOn`, `RootStylePrefix`, `BaseUrl`, `ObjectVote`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldTitle`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES
+('bx_reviews', 'bx_reviews', 'bx_reviews_cmts', 1, 5000, 1000, 3, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-review&id={object_id}', '', 'bx_reviews_reviews', 'id', 'author', 'title', 'comments', '', ''),
+('bx_reviews_notes', 'bx_reviews', 'bx_reviews_cmts_notes', 1, 5000, 1000, 3, 5, 3, 'tail', 1, 'bottom', 1, 1, 1, -3, 1, 'cmt', 'page.php?i=view-review&id={object_id}', '', 'bx_reviews_reviews', '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_reviews', 'bx_reviews_votes', 'bx_reviews_votes_track', '604800', '1', '1', '0', '1', 'bx_reviews_reviews', 'id', 'author', 'rate', 'votes', '', ''),
+('bx_reviews_reactions', 'bx_reviews_reactions', 'bx_reviews_reactions_track', '604800', '1', '1', '1', '1', 'bx_reviews_reviews', 'id', 'author', 'rrate', 'rvotes', 'BxTemplVoteReactions', ''),
+('bx_reviews_poll_answers', 'bx_reviews_polls_answers_votes', 'bx_reviews_polls_answers_votes_track', '604800', '1', '1', '0', '1', 'bx_reviews_polls_answers', 'id', 'author_id', 'rate', 'votes', 'BxReviewsVotePollAnswers', 'modules/boonex/reviews/classes/BxReviewsVotePollAnswers.php');
+
+-- SCORES
+INSERT INTO `sys_objects_score` (`name`, `module`, `table_main`, `table_track`, `post_timeout`, `is_on`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_score`, `trigger_field_cup`, `trigger_field_cdown`, `class_name`, `class_file`) VALUES 
+('bx_reviews', 'bx_reviews', 'bx_reviews_scores', 'bx_reviews_scores_track', '604800', '0', 'bx_reviews_reviews', 'id', 'author', 'score', 'sc_up', 'sc_down', '', '');
+
+-- REPORTS
+INSERT INTO `sys_objects_report` (`name`, `table_main`, `table_track`, `is_on`, `base_url`, `object_comment`, `trigger_table`, `trigger_field_id`, `trigger_field_author`, `trigger_field_count`, `class_name`, `class_file`) VALUES 
+('bx_reviews', 'bx_reviews_reports', 'bx_reviews_reports_track', '1', 'page.php?i=view-review&id={object_id}', 'bx_reviews_notes', 'bx_reviews_reviews', '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_reviews', 'bx_reviews_views_track', '86400', '1', 'bx_reviews_reviews', '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_reviews', 'bx_reviews_favorites_track', '1', '1', '1', 'page.php?i=view-review&id={object_id}', 'bx_reviews_reviews', '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_reviews', '1', '1', 'page.php?i=view-review&id={object_id}', 'bx_reviews_reviews', '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_reviews', '_bx_reviews', 'bx_reviews', 'added', 'edited', 'deleted', '', ''),
+('bx_reviews_cmts', '_bx_reviews_cmts', 'bx_reviews', 'commentPost', 'commentUpdated', 'commentRemoved', 'BxDolContentInfoCmts', '');
+
+INSERT INTO `sys_content_info_grids` (`object`, `grid_object`, `grid_field_id`, `condition`, `selection`) VALUES
+('bx_reviews', 'bx_reviews_administration', 'id', '', ''),
+('bx_reviews', 'bx_reviews_common', 'id', '', '');
+
+-- SEARCH EXTENDED
+INSERT INTO `sys_objects_search_extended` (`object`, `object_content_info`, `module`, `title`, `active`, `class_name`, `class_file`) VALUES
+('bx_reviews', 'bx_reviews', 'bx_reviews', '_bx_reviews_search_extended', 1, '', ''),
+('bx_reviews_cmts', 'bx_reviews_cmts', 'bx_reviews', '_bx_reviews_search_extended_cmts', 1, 'BxTemplSearchExtendedCmts', '');
+
+-- STUDIO: page & widget
+INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
+(3, 'bx_reviews', '_bx_reviews', '_bx_reviews', 'bx_reviews@modules/boonex/reviews/|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_reviews', '{url_studio}module.php?name=bx_reviews', '', 'bx_reviews@modules/boonex/reviews/|std-icon.svg', '_bx_reviews', '', '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));
+

+ 61 - 0
modules/boonex/reviews/install/sql/uninstall.sql

@@ -0,0 +1,61 @@
+
+-- TABLES
+DROP TABLE IF EXISTS `bx_reviews_reviews`, `bx_reviews_covers`, `bx_reviews_files`, `bx_reviews_photos`, `bx_reviews_photos_resized`, `bx_reviews_videos`, `bx_reviews_videos_resized`, `bx_reviews_cmts`, `bx_reviews_cmts_notes`, `bx_reviews_votes`, `bx_reviews_votes_track`, `bx_reviews_reactions`, `bx_reviews_reactions_track`, `bx_reviews_views_track`, `bx_reviews_meta_keywords`, `bx_reviews_meta_locations`, `bx_reviews_meta_mentions`, `bx_reviews_reports`, `bx_reviews_reports_track`, `bx_reviews_favorites_track`, `bx_reviews_scores`, `bx_reviews_scores_track`, `bx_reviews_polls`, `bx_reviews_polls_answers`, `bx_reviews_polls_answers_votes`, `bx_reviews_polls_answers_votes_track`;
+
+-- STORAGES & TRANSCODERS
+DELETE FROM `sys_objects_storage` WHERE `object` LIKE 'bx_reviews_%';
+DELETE FROM `sys_storage_tokens` WHERE `object` LIKE 'bx_reviews_%';
+
+DELETE FROM `sys_objects_transcoder` WHERE `object` LIKE 'bx_reviews_%';
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` LIKE 'bx_reviews_%';
+DELETE FROM `sys_transcoder_images_files` WHERE `transcoder_object` LIKE 'bx_reviews_%';
+
+-- FORMS
+DELETE FROM `sys_objects_form` WHERE `module` = 'bx_reviews';
+DELETE FROM `sys_form_displays` WHERE `module` = 'bx_reviews';
+DELETE FROM `sys_form_inputs` WHERE `module` = 'bx_reviews';
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` LIKE 'bx_reviews_%';
+
+-- PRE-VALUES
+DELETE FROM `sys_form_pre_lists` WHERE `module` = 'bx_reviews';
+
+DELETE FROM `sys_form_pre_values` WHERE `Key` IN('bx_reviews_cats');
+
+-- CATEGORIES
+DELETE FROM `sys_categories` WHERE `module` = 'bx_reviews';
+DELETE FROM `sys_categories2objects` WHERE `module` = 'bx_reviews';
+
+-- COMMENTS
+DELETE FROM `sys_objects_cmts` WHERE `Name` LIKE 'bx_reviews%';
+
+-- VOTES
+DELETE FROM `sys_objects_vote` WHERE `Name` IN ('bx_reviews', 'bx_reviews_reactions', 'bx_reviews_poll_answers');
+
+-- SCORES
+DELETE FROM `sys_objects_score` WHERE `name` = 'bx_reviews';
+
+-- REPORTS
+DELETE FROM `sys_objects_report` WHERE `name` = 'bx_reviews';
+
+-- VIEWS
+DELETE FROM `sys_objects_view` WHERE `name` = 'bx_reviews';
+
+-- FAFORITES
+DELETE FROM `sys_objects_favorite` WHERE `name` = 'bx_reviews';
+
+-- FEATURED
+DELETE FROM `sys_objects_feature` WHERE `name` = 'bx_reviews';
+
+-- CONTENT INFO
+DELETE FROM `sys_objects_content_info` WHERE `name` IN ('bx_reviews', 'bx_reviews_cmts');
+
+DELETE FROM `sys_content_info_grids` WHERE `object` IN ('bx_reviews');
+
+-- SEARCH EXTENDED
+DELETE FROM `sys_objects_search_extended` WHERE `module` = 'bx_reviews';
+
+-- 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_reviews';
+

+ 56 - 0
modules/boonex/reviews/js/manage_tools.js

@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+function BxReviewsManageTools(oOptions) {
+	this._iSearchTimeoutId = false;
+	this._sActionsUrl = oOptions.sActionUrl;
+	this._sObjNameGrid = oOptions.sObjNameGrid;
+    this._sObjName = oOptions.sObjName == undefined ? 'oBxReviewsManageTools' : oOptions.sObjName;
+
+    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'fade' : oOptions.sAnimationEffect;
+    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
+    this._sParamsDivider = oOptions.sParamsDivider == undefined ? '#-#' : oOptions.sParamsDivider;
+
+    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
+    this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
+}
+
+BxReviewsManageTools.prototype.onChangeFilter = function(oFilter) {
+	var $this = this;
+	var oFilter1 = $('#bx-grid-filter1-' + this._sObjNameGrid);
+	var sValueFilter1 = oFilter1.length > 0 ? oFilter1.val() : '';
+
+	var oSearch = $('#bx-grid-search-' + this._sObjNameGrid);
+	var sValueSearch = oSearch.length > 0 ? oSearch.val() : '';
+	if(sValueSearch == _t('_sys_grid_search'))
+		sValueSearch = '';
+
+	clearTimeout($this._iSearchTimeoutId);
+    $this._iSearchTimeoutId = setTimeout(function () {
+        glGrids[$this._sObjNameGrid].setFilter(sValueFilter1 + $this._sParamsDivider + sValueSearch, true);
+    }, 500);
+};
+
+BxReviewsManageTools.prototype.onClickSettings = function(sMenuObject, oButton) {
+	if($(oButton).hasClass('bx-btn-disabled'))
+		return false;
+
+	bx_menu_popup(sMenuObject, oButton, {}, {
+		content_id: $(oButton).attr('bx_grid_action_data')
+	});
+};
+
+BxReviewsManageTools.prototype.onClickDelete = function(iContentId) {
+	$('.bx-popup-applied:visible').dolPopupHide();
+
+	glGrids[this._sObjNameGrid].actionWithId(iContentId, 'delete', {}, '', false, 1);
+};
+
+/** @} */

+ 21 - 0
modules/boonex/reviews/js/polls.js

@@ -0,0 +1,21 @@
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+function BxReviewsPolls(oOptions)
+{
+    BxBaseModTextPolls.call(this, oOptions);
+
+    this._sObjName = oOptions.sObjName == undefined ? 'oBxReviewsPolls' : oOptions.sObjName;
+}
+
+BxReviewsPolls.prototype = Object.create(BxBaseModTextPolls.prototype);
+BxReviewsPolls.prototype.constructor = BxReviewsPolls;
+
+/** @} */

+ 18 - 0
modules/boonex/reviews/request.php

@@ -0,0 +1,18 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Reviews Reviews
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
+
+check_logged();
+
+BxBaseModTextRequest::processAsAction($GLOBALS['aModule'], $GLOBALS['aRequest']);
+
+/** @} */

+ 3 - 0
modules/boonex/reviews/template/attachments.html

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

+ 3 - 0
modules/boonex/reviews/template/author.html

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

+ 1 - 0
modules/boonex/reviews/template/author_link.html

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

+ 1 - 0
modules/boonex/reviews/template/badges.html

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

+ 1 - 0
modules/boonex/reviews/template/category_list_inline.html

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

+ 1 - 0
modules/boonex/reviews/template/context.html

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

+ 1 - 0
modules/boonex/reviews/template/css/categories.css

@@ -0,0 +1 @@
+@import url(../../../../base/text/template/css/categories.css);

+ 1 - 0
modules/boonex/reviews/template/css/forms.css

@@ -0,0 +1 @@
+@import url(../../../../base/text/template/css/forms.css);

+ 1 - 0
modules/boonex/reviews/template/css/main.css

@@ -0,0 +1 @@
+@import url(../../../../base/text/template/css/main.css);

+ 1 - 0
modules/boonex/reviews/template/css/manage_tools.css

@@ -0,0 +1 @@
+@import url(../../../../base/general/template/css/manage_tools.css);

+ 1 - 0
modules/boonex/reviews/template/css/polls.css

@@ -0,0 +1 @@
+@import url(../../../../base/text/template/css/polls.css);

+ 3 - 0
modules/boonex/reviews/template/entry-all-actions.html

@@ -0,0 +1,3 @@
+
+<bx_include_base:../modules/base/text/template/entry-all-actions.html />
+

+ 3 - 0
modules/boonex/reviews/template/entry-location.html

@@ -0,0 +1,3 @@
+
+<bx_include_base:../modules/base/general/template/entry-location.html />
+

+ 1 - 0
modules/boonex/reviews/template/entry-share.html

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

+ 1 - 0
modules/boonex/reviews/template/entry-text.html

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

+ 1 - 0
modules/boonex/reviews/template/form_categories.html

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

+ 22 - 0
modules/boonex/reviews/template/form_ghost_template.html

@@ -0,0 +1,22 @@
+<div id="bx-uploader-file-{storage_object}-{file_id}" class="bx-uploader-ghost bx-def-margin-sec-top bx-clearfix">
+    <input type="hidden" name="__name__[]" value="{file_id}" />
+    <div class="bx-base-general-icon-wrapper bx-def-margin-sec-right">
+        <img src="{file_icon}" class="bx-def-round-corners bx-base-general-icon bx-base-general-icon-{file_id}" />
+    </div>
+    <span class="bx-base-general-uploader-ghost">
+        <b><bx_text:_sys_txt_form_entry_input_picture_pic_url /></b><br />
+        <input class="bx-def-font-inputs bx-form-input-text bx-def-margin-sec-bottom" type="text" value="{file_url}" readonly="1" /> <br />
+        <span id="bx-base-general-intert-to-post-link-{file_id}" style="display:none;">
+            <a class="bx-btn bx-btn-small bx-def-margin-sec-right" href="javascript:void(0);" onclick="bx_base_general_insert_to_post('{file_id}', '{file_url}', '__editor_id__');"><bx_text:_sys_txt_form_entry_input_picture_insert /></a>
+        </span>
+        <a class="bx-btn bx-btn-small bx-def-margin-sec-right" href="javascript:void(0);" onclick="bx_base_general_delete_ghost('{file_id}', '{file_url}', '{file_icon}', ['__editor_id__'], {js_instance_name});"><bx_text:_sys_txt_form_entry_input_picture_delete /></a>
+    </span>
+</div>
+<script>
+    $('#bx-base-general-intert-to-post-link-{file_id}').show();
+
+    // disable images drag&drop, because resized images address can be reset after some time
+    $(".bx-base-general-icon-{file_id}").bind('dragstart', function(){
+        return false; 
+    });
+</script>

+ 16 - 0
modules/boonex/reviews/template/form_ghost_template_cover.html

@@ -0,0 +1,16 @@
+<div id="bx-uploader-file-{storage_object}-{file_id}" class="bx-uploader-ghost bx-def-margin-sec-top bx-clearfix">
+    <input type="hidden" name="__name__[]" value="{file_id}" />
+    <input type="hidden" name="__name_thumb__[]" value="{file_id}" onclick="bx_base_general_select_thumb(this)" id="__name_thumb__-{file_id}" />
+    <div class="bx-base-general-icon-wrapper bx-def-margin-sec-right">
+        <img src="{file_icon}" class="bx-def-round-corners bx-base-general-icon bx-base-general-icon-{file_id}" />
+    </div>
+    <span class="bx-base-general-uploader-ghost">
+        <a class="bx-btn bx-btn-small bx-def-margin-sec-right" href="javascript:void(0);" onclick="bx_base_general_delete_ghost('{file_id}', '{file_url}', '{file_icon}', ['__editor_id__'], {js_instance_name});"><bx_text:_sys_txt_form_entry_input_picture_delete /></a>
+    </span>
+</div>
+<script>
+    // disable images drag&drop, because resized images address can be reset after some time
+    $(".bx-base-general-icon-{file_id}").bind('dragstart', function(){
+        return false; 
+    });
+</script>

+ 19 - 0
modules/boonex/reviews/template/form_ghost_template_file.html

@@ -0,0 +1,19 @@
+<div id="bx-uploader-file-{storage_object}-{file_id}" class="bx-uploader-ghost bx-def-margin-sec-top bx-clearfix">
+    <input type="hidden" name="__name__[]" value="{file_id}" />
+    <div class="bx-base-general-icon-wrapper bx-def-margin-sec-right">
+        <img src="{file_icon}" class="bx-def-round-corners bx-base-general-icon bx-base-general-icon-{file_id}" />
+    </div>
+    <span class="bx-base-general-uploader-ghost">
+        <b><bx_text:_sys_txt_form_entry_input_picture_pic_url /></b><br />
+        <input class="bx-def-font-inputs bx-form-input-text bx-def-margin-sec-bottom" type="text" value="{file_url}" readonly="1" /> <br />
+        <a class="bx-btn bx-btn-small bx-def-margin-sec-right" href="javascript:void(0);" onclick="bx_base_general_delete_ghost('{file_id}', '{file_url}', '{file_icon}', ['__editor_id__'], {js_instance_name});"><bx_text:_sys_txt_form_entry_input_picture_delete /></a>
+    </span>
+</div>
+<script>
+    $('#bx-base-general-intert-to-post-link-{file_id}').show();
+
+    // disable images drag&drop, because resized images address can be reset after some time
+    $(".bx-base-general-icon-{file_id}").bind('dragstart', function(){
+        return false; 
+    });
+</script>

+ 22 - 0
modules/boonex/reviews/template/form_ghost_template_video.html

@@ -0,0 +1,22 @@
+<div id="bx-uploader-file-{storage_object}-{file_id}" class="bx-uploader-ghost bx-def-margin-sec-top bx-clearfix">
+    <input type="hidden" name="__name__[]" value="{file_id}" />
+    <div class="bx-base-general-icon-wrapper bx-def-margin-sec-right">
+        <img src="{file_icon}" class="bx-def-round-corners bx-base-general-icon bx-base-general-icon-{file_id}" />
+    </div>
+    <span class="bx-base-general-uploader-ghost">
+        <b><bx_text:_sys_txt_form_entry_input_picture_pic_url /></b><br />
+        <input class="bx-def-font-inputs bx-form-input-text bx-def-margin-sec-bottom" type="text" value="{file_url}" readonly="1" /> <br />
+        <span id="bx-base-general-intert-to-post-link-{file_id}" style="display:none;">
+            <a class="bx-btn bx-btn-small bx-def-margin-sec-right" href="javascript:void(0);" onclick="bx_base_general_insert_to_post('{file_id}', '{file_url}', '__editor_id__', '{file_type}', '__embed_url__');"><bx_text:_sys_txt_form_entry_input_picture_insert /></a>
+        </span>
+        <a class="bx-btn bx-btn-small bx-def-margin-sec-right" href="javascript:void(0);" onclick="bx_base_general_delete_ghost('{file_id}', '{file_url}', '{file_icon}', ['__editor_id__'], {js_instance_name});"><bx_text:_sys_txt_form_entry_input_picture_delete /></a>
+    </span>
+</div>
+<script>
+    $('#bx-base-general-intert-to-post-link-{file_id}').show();
+
+    // disable images drag&drop, because resized images address can be reset after some time
+    $(".bx-base-general-icon-{file_id}").bind('dragstart', function(){
+        return false; 
+    });
+</script>

Diff do ficheiro suprimidas por serem muito extensas
+ 77 - 0
modules/boonex/reviews/template/images/icons/std-icon.svg


+ 1 - 0
modules/boonex/reviews/template/poll_answer_ve_block.html

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

+ 1 - 0
modules/boonex/reviews/template/poll_form.html

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

+ 1 - 0
modules/boonex/reviews/template/poll_form_answers.html

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

+ 1 - 0
modules/boonex/reviews/template/poll_form_field.html

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

+ 1 - 0
modules/boonex/reviews/template/poll_item.html

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

+ 1 - 0
modules/boonex/reviews/template/poll_item_answers.html

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

+ 1 - 0
modules/boonex/reviews/template/poll_item_results.html

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

+ 1 - 0
modules/boonex/reviews/template/poll_items.html

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

+ 1 - 0
modules/boonex/reviews/template/poll_items_embed.html

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

+ 1 - 0
modules/boonex/reviews/template/poll_items_showcase.html

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

+ 1 - 0
modules/boonex/reviews/template/title_link.html

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

+ 2 - 0
modules/boonex/reviews/template/unit.html

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

+ 1 - 0
modules/boonex/reviews/template/unit_full.html

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

+ 3 - 0
modules/boonex/reviews/template/unit_full_private.html

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

+ 1 - 0
modules/boonex/reviews/template/unit_gallery.html

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

+ 3 - 0
modules/boonex/reviews/template/unit_gallery_private.html

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

+ 3 - 0
modules/boonex/reviews/template/unit_live_search.html

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

+ 1 - 0
modules/boonex/reviews/template/unit_meta_item.html

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

+ 3 - 0
modules/boonex/reviews/template/unit_private.html

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

+ 1 - 0
modules/boonex/reviews/template/unit_showcase.html

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

+ 1 - 0
modules/boonex/reviews/template/uploader_button_html5_attach.html

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

+ 1 - 0
modules/boonex/reviews/template/uploader_button_simple_attach.html

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

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff