Просмотр исходного кода

Ticket #4986 - Spaces: Integrate Stars based voting.

AntonLV 1 год назад
Родитель
Сommit
9c0ef261dd

+ 1 - 0
modules/boonex/english/data/langs/system/en.xml

@@ -3316,6 +3316,7 @@ If it is not enabled then please consider implement this optimization, since it
     <string name="_sys_menu_item_title_system_va_favorite"><![CDATA[Favorite]]></string>
     <string name="_sys_menu_item_title_system_va_feature"><![CDATA[Feature]]></string>
     <string name="_sys_menu_item_title_system_va_reaction"><![CDATA[Reaction]]></string>
+    <string name="_sys_menu_item_title_system_sm_rate"><![CDATA[Rate]]></string>
     <string name="_sys_menu_item_title_system_va_repost"><![CDATA[Repost]]></string>
     <string name="_sys_menu_item_title_system_va_repost_with_text"><![CDATA[Repost with Text]]></string>
     <string name="_sys_menu_item_title_system_va_repost_to_context"><![CDATA[Repost to Context]]></string>

+ 2 - 0
modules/boonex/russian/data/langs/bx_spaces/ru.xml

@@ -181,6 +181,7 @@
     <string name="_bx_spaces_page_block_title_joined_profiles"><![CDATA[Мои пространства]]></string>
     <string name="_bx_spaces_page_block_title_entry_all_actions"><![CDATA[Все действия]]></string>
     <string name="_bx_spaces_page_block_title_entry_social_sharing"><![CDATA[Поделиться]]></string>
+    <string name="_bx_spaces_page_block_title_entry_rating"><![CDATA[Рейтинг]]></string>
     <string name="_bx_spaces_page_block_title_categories"><![CDATA[Категории пространств]]></string>
     <string name="_bx_spaces_page_block_title_invite_to_space"><![CDATA[Пригласить участников в пространство]]></string>
     <string name="_bx_spaces_page_block_title_search_form"><![CDATA[Форма поиска]]></string>
@@ -370,6 +371,7 @@
     <string name="_bx_spaces_txt_n_unit"><![CDATA[{0} ({1})]]></string>
     <string name="_bx_spaces_txt_cart_item_title"><![CDATA[{0}: {1} ({2} {3})]]></string>
     <string name="_bx_spaces_txt_cart_item_title_lifetime"><![CDATA[{0}: {1} (пожизненно)]]></string>
+    <string name="_bx_spaces_txt_vote_starts_counter"><![CDATA[{0} голосов]]></string>
 
     <string name="_bx_spaces_msg_performed"><![CDATA[Действие было успешно выполнено.]]></string>
     <string name="_bx_spaces_err_price_duplicate"><![CDATA[Аналогичный ценовой план уже существует.]]></string>

+ 1 - 0
modules/boonex/russian/data/langs/system/ru.xml

@@ -3284,6 +3284,7 @@
     <string name="_sys_menu_item_title_system_va_score"><![CDATA[Проголосовать (за/против)]]></string>
     <string name="_sys_menu_item_title_system_va_favorite"><![CDATA[В избранное]]></string>
     <string name="_sys_menu_item_title_system_va_feature"><![CDATA[В продвинутые]]></string>
+    <string name="_sys_menu_item_title_system_va_rate"><![CDATA[Оценить]]></string>
     <string name="_sys_menu_item_title_system_va_reaction"><![CDATA[Отреагировать]]></string>
     <string name="_sys_menu_item_title_system_va_repost"><![CDATA[Сделать репост]]></string>
     <string name="_sys_menu_item_title_system_va_repost_with_text"><![CDATA[Сделать репост с текстом]]></string>

+ 2 - 0
modules/boonex/spaces/classes/BxSpacesConfig.php

@@ -72,6 +72,7 @@ class BxSpacesConfig extends BxBaseModGroupsConfig
 
             // page URIs
             'URI_VIEW_ENTRY' => 'view-space-profile',
+            'URI_ADD_ENTRY' => 'create-space-profile',
             'URI_EDIT_ENTRY' => 'edit-space-profile',
             'URI_JOIN_ENTRY' => 'join-space-profile',
             'URI_JOINED_ENTRIES' => 'joined-spaces',
@@ -109,6 +110,7 @@ class BxSpacesConfig extends BxBaseModGroupsConfig
             'OBJECT_IMAGES_TRANSCODER_GALLERY' => 'bx_spaces_gallery',
             'OBJECT_VIEWS' => 'bx_spaces',
             'OBJECT_VOTES' => 'bx_spaces',
+            'OBJECT_VOTES_STARS' => 'bx_spaces_stars',
             'OBJECT_SCORES' => 'bx_spaces',
             'OBJECT_FAVORITES' => 'bx_spaces',
             'OBJECT_FEATURED' => 'bx_spaces',

+ 12 - 0
modules/boonex/spaces/classes/BxSpacesMenuViewActionsAll.php

@@ -55,6 +55,18 @@ class BxSpacesMenuViewActionsAll extends BxBaseModGroupsMenuViewActionsAll
     {
         return $this->_getMenuItemByNameActionsMore($aItem);
     }
+    
+    protected function _getMenuItemRate($aItem, $aParams = [])
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+
+        if(!is_array($aParams))
+            $aParams = [];
+
+        return parent::_getMenuItemVote($aItem, array_merge($aParams, [
+            'object' => $CNF['OBJECT_VOTES_STARS']
+        ]));
+    }
 }
 
 /** @} */

+ 24 - 1
modules/boonex/spaces/classes/BxSpacesModule.php

@@ -65,7 +65,30 @@ class BxSpacesModule extends BxBaseModGroupsModule
     {
         return $this->_serviceTemplateFuncEx ('entryChilds', $iContentId, $aParams);
     }
-    
+
+    /**
+     * @page service Service Calls
+     * @section bx_spaces Spaces
+     * @subsection bx_spaces-page_blocks Page Blocks
+     * @subsubsection bx_spaces-entity_rating entity_rating
+     * 
+     * @code bx_srv('bx_spaces', 'entity_rating', [...]); @endcode
+     * 
+     * Get page block with Stars based space's rating.
+     *
+     * @param $iContentId (optional) space's ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return HTML string with block content to display on the site or false if there is no enough input data. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxSpacesModule::serviceEntityRating
+     */
+    /** 
+     * @ref bx_spaces-entity_rating "entity_rating"
+     */
+    public function serviceEntityRating($iContentId = 0)
+    {
+    	return $this->_serviceTemplateFunc ('entryRating', $iContentId);
+    }
+
     public function serviceBrowseTopLevel ($bDisplayEmptyMsg = false)
     {
         return $this->_serviceBrowse ('top_level', false, BX_DB_PADDING_DEF, $bDisplayEmptyMsg);

+ 17 - 1
modules/boonex/spaces/classes/BxSpacesTemplate.php

@@ -52,7 +52,23 @@ class BxSpacesTemplate extends BxBaseModGroupsTemplate
             'content' => $this->getBrowseQuick([$aData[$CNF['FIELD_PARENT']]], $aParams['template'])
         ]);
     }
-    
+
+    public function entryRating($aData)
+    {
+        $CNF = &$this->getModule()->_oConfig->CNF;
+
+        $sVotes = '';
+        if(($oVotes = BxDolVote::getObjectInstance($CNF['OBJECT_VOTES_STARS'], $aData['id']))) {
+            $sVotes = $oVotes->getElementBlock(['show_counter' => true, 'show_legend' => true]);
+            if(!empty($sVotes))
+                $sVotes = $this->parseHtmlByName('entry-rating.html', [
+                    'content' => $sVotes,
+                ]);
+        }
+
+        return $sVotes; 
+    }
+
     private function getBrowseQuick($aProfiles, $sTemplate = 'unit_wo_cover')
     {
         $sRv = '';

+ 44 - 0
modules/boonex/spaces/classes/BxSpacesVoteStars.php

@@ -0,0 +1,44 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    Spaces Spaces
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxSpacesVoteStars extends BxTemplVoteStars
+{
+    protected $_sModule;
+    protected $_oModule;
+
+    public function __construct($sSystem, $iId, $iInit = 1)
+    {
+    	$this->_sModule = 'bx_spaces';
+    	$this->_oModule = BxDolModule::getInstance($this->_sModule);
+
+        parent::__construct($sSystem, $iId, $iInit);        
+    }
+
+    public function isAllowedVote($isPerformAction = false)
+    {
+    	$CNF = &$this->_oModule->_oConfig->CNF;
+
+    	if($this->getObjectAuthorId() == $this->_getAuthorId())
+            return false;
+
+        if($this->_oModule->_oConfig->isPaidJoin() && !$this->_oModule->isFan($this->_iId))
+            return false;
+
+    	return parent::isAllowedVote($isPerformAction);
+    }
+
+    protected function _getCounterLabel($iCount, $aParams = [])
+    {
+        return _t('_bx_spaces_txt_vote_starts_counter', $iCount);
+    }
+}
+
+/** @} */

+ 12 - 10
modules/boonex/spaces/install/langs/en.xml

@@ -86,7 +86,7 @@
     <string name="_bx_spaces_acl_action_delete_profile"><![CDATA[Delete Space]]></string>
     <string name="_bx_spaces_acl_action_view_profile"><![CDATA[View Space]]></string>
     <string name="_bx_spaces_acl_action_edit_any_profile"><![CDATA[Edit Any Space]]></string>
-	<string name="_bx_spaces_acl_action_delete_any_profile"><![CDATA[Delete Any Space]]></string>
+    <string name="_bx_spaces_acl_action_delete_any_profile"><![CDATA[Delete Any Space]]></string>
     <string name="_bx_spaces_acl_action_delete_invites"><![CDATA[Delete Invites]]></string>
 	
 	<string name="_bx_spaces_page_title_sys_joined_entries"><![CDATA[Profile Spaces]]></string>
@@ -151,9 +151,9 @@
 	<string name="_bx_spaces_page_block_title_sys_favorites_of_author"><![CDATA[Favorite Spaces]]></string>
 	<string name="_bx_spaces_page_block_title_sys_joined_entries"><![CDATA[Joined Spaces]]></string>
 	<string name="_bx_spaces_page_block_title_joined_entries"><![CDATA[Joined Spaces]]></string>
-  <string name="_bx_spaces_page_block_title_parent"><![CDATA[Parent Space]]></string>
-  <string name="_bx_spaces_page_block_title_childs"><![CDATA[Child Spaces]]></string>
-  <string name="_bx_spaces_page_block_title_create_profile"><![CDATA[Create Space]]></string>
+        <string name="_bx_spaces_page_block_title_parent"><![CDATA[Parent Space]]></string>
+        <string name="_bx_spaces_page_block_title_childs"><![CDATA[Child Spaces]]></string>
+        <string name="_bx_spaces_page_block_title_create_profile"><![CDATA[Create Space]]></string>
 	<string name="_bx_spaces_page_block_title_edit_profile"><![CDATA[Edit Space]]></string>
 	<string name="_bx_spaces_page_block_title_edit_profile_cover"><![CDATA[Edit Cover]]></string>
         <string name="_bx_spaces_page_block_title_edit_profile_settings"><![CDATA[Edit Settings]]></string>
@@ -173,8 +173,8 @@
 	<string name="_bx_spaces_page_block_title_fans_link"><![CDATA[Members of <a href="{profile_link}">{display_name}</a>]]></string>
 	<string name="_bx_spaces_page_block_title_fans"><![CDATA[Members]]></string>
 	<string name="_bx_spaces_page_block_title_system_fans"><![CDATA[Members]]></string>
-  <string name="_bx_spaces_page_block_title_fans_invites"><![CDATA[Invites]]></string>
-  <string name="_bx_spaces_page_block_title_system_invites"><![CDATA[Invites]]></string>
+        <string name="_bx_spaces_page_block_title_fans_invites"><![CDATA[Invites]]></string>
+        <string name="_bx_spaces_page_block_title_system_invites"><![CDATA[Invites]]></string>
         <string name="_bx_spaces_page_block_title_profile_location"><![CDATA[Location]]></string>
 	<string name="_bx_spaces_page_block_title_profile_comments"><![CDATA[Comments]]></string>
 	<string name="_bx_spaces_page_block_title_entry_reports"><![CDATA[Reports]]></string>
@@ -189,6 +189,7 @@
         <string name="_bx_spaces_page_block_title_joined_profiles"><![CDATA[Joined Spaces]]></string>
         <string name="_bx_spaces_page_block_title_entry_all_actions"><![CDATA[All Actions]]></string>
 	<string name="_bx_spaces_page_block_title_entry_social_sharing"><![CDATA[Share]]></string>
+        <string name="_bx_spaces_page_block_title_entry_rating"><![CDATA[Rating]]></string>
 	<string name="_bx_spaces_page_block_title_categories"><![CDATA[Spaces Categories]]></string>
 	<string name="_bx_spaces_page_block_title_invite_to_space"><![CDATA[Invite Members to the Space]]></string>
 	<string name="_bx_spaces_page_block_title_search_form"><![CDATA[Search Form]]></string>
@@ -199,9 +200,9 @@
 	<string name="_bx_spaces_page_block_title_featured_entries_view_showcase"><![CDATA[Featured Spaces]]></string>
 	<string name="_bx_spaces_page_block_title_sys_recommended_entries_view_showcase"><![CDATA[Recommended Spaces (Showcase View)]]></string>
 	<string name="_bx_spaces_page_block_title_recommended_entries_view_showcase"><![CDATA[Recommended Spaces]]></string>
-  <string name="_bx_spaces_page_block_title_top_level_spaces"><![CDATA[Top Level Spaces]]></string>
-  <string name="_bx_spaces_page_block_title_sys_cover_block"><![CDATA[Cover]]></string>
-  <string name="_bx_spaces_page_block_title_cover_block"><![CDATA[Cover]]></string>
+        <string name="_bx_spaces_page_block_title_top_level_spaces"><![CDATA[Top Level Spaces]]></string>
+        <string name="_bx_spaces_page_block_title_sys_cover_block"><![CDATA[Cover]]></string>
+        <string name="_bx_spaces_page_block_title_cover_block"><![CDATA[Cover]]></string>
 
         <string name="_bx_spaces_menu_title_submenu"><![CDATA[Spaces Submenu]]></string>
 	<string name="_bx_spaces_menu_set_title_submenu"><![CDATA[Spaces Submenu]]></string>
@@ -373,7 +374,8 @@
     <string name="_bx_spaces_txt_invite_popup_error_invitation_wrong_user"><![CDATA[Sorry, an error has occurred. You can not join this space. This invitation cannot be used by you.]]></string>
     <string name="_bx_spaces_txt_n_unit"><![CDATA[{0} ({1})]]></string>
     <string name="_bx_spaces_txt_cart_item_title"><![CDATA[{0}: {1} ({2} {3})]]></string>
-    <string name="_bx_spaces_txt_cart_item_title_lifetime"><![CDATA[{0}: {1} (lifetime)]]></string>    
+    <string name="_bx_spaces_txt_cart_item_title_lifetime"><![CDATA[{0}: {1} (lifetime)]]></string>
+    <string name="_bx_spaces_txt_vote_starts_counter"><![CDATA[{0} ratings]]></string>
 
     <string name="_bx_spaces_msg_performed"><![CDATA[The action was successfully performed.]]></string>
     <string name="_bx_spaces_err_price_duplicate"><![CDATA[Similar pricing plan is already exists.]]></string>

+ 3 - 0
modules/boonex/spaces/install/sql/enable.sql

@@ -40,6 +40,7 @@ INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module
 ('bx_spaces_view_profile', 'view-space-profile', '_bx_spaces_page_title_sys_view_profile', '_bx_spaces_page_title_view_profile', 'bx_spaces', 10, 2147483647, 1, 'page.php?i=view-space-profile', '', '', '', 0, 1, 0, 'BxSpacesPageEntry', 'modules/boonex/spaces/classes/BxSpacesPageEntry.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_spaces_view_profile', 0, 'bx_spaces', '', '_bx_spaces_page_block_title_entry_rating', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_spaces";s:6:"method";s:13:"entity_rating";}', 0, 0, 0, 0),
 ('bx_spaces_view_profile', 1, 'bx_spaces', '', '_bx_spaces_page_block_title_entry_social_sharing', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:21:\"entity_social_sharing\";}', 0, 0, 0, 0),
 ('bx_spaces_view_profile', 1, 'bx_spaces', '', '_bx_spaces_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_spaces";s:6:"method";s:18:"entity_all_actions";}', 0, 0, 0, 0),
 ('bx_spaces_view_profile', 2, 'bx_spaces', '', '_bx_spaces_page_block_title_profile_info', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_spaces\";s:6:\"method\";s:11:\"entity_info\";}', 0, 0, 1, 0),
@@ -287,6 +288,7 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_spaces_view_actions_all', 'bx_spaces', 'comment', '_sys_menu_item_title_system_va_comment', '', '', '', '', '', '', '', 0, 2147483647, '', 0, 0, 200),
 ('bx_spaces_view_actions_all', 'bx_spaces', 'view', '_sys_menu_item_title_system_va_view', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 210),
 ('bx_spaces_view_actions_all', 'bx_spaces', 'vote', '_sys_menu_item_title_system_va_vote', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 220),
+('bx_spaces_view_actions_all', 'bx_spaces', 'rate', '_sys_menu_item_title_system_va_rate', '', '', '', '', '', '', '', 0, 2147483647, '', 0, 0, 225),
 ('bx_spaces_view_actions_all', 'bx_spaces', 'score', '_sys_menu_item_title_system_va_score', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 230),
 ('bx_spaces_view_actions_all', 'bx_spaces', 'favorite', '_sys_menu_item_title_system_va_favorite', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 240),
 ('bx_spaces_view_actions_all', 'bx_spaces', 'feature', '_sys_menu_item_title_system_va_feature', '', '', '', '', '', '', '', 0, 2147483647, '', 1, 0, 250),
@@ -364,6 +366,7 @@ INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `titl
 ('bx_spaces_snippet_meta', 'bx_spaces', 'category', '_sys_menu_item_title_system_sm_category', '_sys_menu_item_title_sm_category', '', '', '', '', '', 2147483647, '', 0, 0, 1, 5),
 ('bx_spaces_snippet_meta', 'bx_spaces', 'tags', '_sys_menu_item_title_system_sm_tags', '_sys_menu_item_title_sm_tags', '', '', '', '', '', 2147483647, '', 0, 0, 1, 10),
 ('bx_spaces_snippet_meta', 'bx_spaces', 'views', '_sys_menu_item_title_system_sm_views', '_sys_menu_item_title_sm_views', '', '', '', '', '', 2147483647, '', 0, 0, 1, 15),
+('bx_spaces_snippet_meta', 'bx_spaces', 'rating', '_sys_menu_item_title_system_sm_rating', '_sys_menu_item_title_sm_rating', '', '', '', '', '', 2147483647, '', 0, 0, 1, 17),
 ('bx_spaces_snippet_meta', 'bx_spaces', 'comments', '_sys_menu_item_title_system_sm_comments', '_sys_menu_item_title_sm_comments', '', '', '', '', '', 2147483647, '', 0, 0, 1, 20),
 ('bx_spaces_snippet_meta', 'bx_spaces', 'members', '_sys_menu_item_title_system_sm_members', '_sys_menu_item_title_sm_members', '', '', '', '', '', 2147483647, '', 0, 0, 1, 25),
 ('bx_spaces_snippet_meta', 'bx_spaces', 'subscribers', '_sys_menu_item_title_system_sm_subscribers', '_sys_menu_item_title_sm_subscribers', '', '', '', '', '', 2147483647, '', 1, 0, 1, 30),

+ 25 - 1
modules/boonex/spaces/install/sql/install.sql

@@ -19,6 +19,8 @@ CREATE TABLE IF NOT EXISTS `bx_spaces_data` (
   `views` int(11) NOT NULL default '0',
   `rate` float NOT NULL default '0',
   `votes` int(11) NOT NULL default '0',
+  `srate` float NOT NULL default '0',
+  `svotes` int(11) NOT NULL default '0',
   `score` int(11) NOT NULL default '0',
   `sc_up` int(11) NOT NULL default '0',
   `sc_down` int(11) NOT NULL default '0',
@@ -143,6 +145,27 @@ CREATE TABLE IF NOT EXISTS `bx_spaces_votes_track` (
   KEY `vote` (`object_id`, `author_nip`)
 );
 
+-- TABLE: STARS
+CREATE TABLE IF NOT EXISTS `bx_spaces_stars` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `count` int(11) NOT NULL default '0',
+  `sum` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `object_id` (`object_id`)
+);
+
+CREATE TABLE IF NOT EXISTS `bx_spaces_stars_track` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `object_id` int(11) NOT NULL default '0',
+  `author_id` int(11) NOT NULL default '0',
+  `author_nip` int(11) unsigned NOT NULL default '0',
+  `value` tinyint(4) NOT NULL default '0',
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY (`id`),
+  KEY `vote` (`object_id`, `author_nip`)
+);
+
 -- TABLE: REPORTS
 CREATE TABLE IF NOT EXISTS `bx_spaces_reports` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
@@ -475,7 +498,8 @@ INSERT INTO `sys_objects_view` (`name`, `module`, `table_track`, `period`, `is_o
 
 -- VOTES
 INSERT INTO `sys_objects_vote` (`Name`, `Module`, `TableMain`, `TableTrack`, `PostTimeout`, `MinValue`, `MaxValue`, `IsUndo`, `IsOn`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldAuthor`, `TriggerFieldRate`, `TriggerFieldRateCount`, `ClassName`, `ClassFile`) VALUES 
-('bx_spaces', 'bx_spaces', 'bx_spaces_votes', 'bx_spaces_votes_track', '604800', '1', '1', '0', '1', 'bx_spaces_data', 'id', 'author', 'rate', 'votes', '', '');
+('bx_spaces', 'bx_spaces', 'bx_spaces_votes', 'bx_spaces_votes_track', '604800', '1', '1', '0', '1', 'bx_spaces_data', 'id', 'author', 'rate', 'votes', '', ''),
+('bx_spaces_stars', 'bx_spaces', 'bx_spaces_stars', 'bx_spaces_stars_track', '604800', '1', '5', '0', '1', 'bx_spaces_data', 'id', 'author', 'srate', 'svotes', 'BxSpacesVoteStars', 'modules/boonex/spaces/classes/BxSpacesVoteStars.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 

+ 2 - 2
modules/boonex/spaces/install/sql/uninstall.sql

@@ -1,7 +1,7 @@
 
 -- TABLES
 
-DROP TABLE IF EXISTS `bx_spaces_data`, `bx_spaces_pics`, `bx_spaces_pics_resized`, `bx_spaces_cmts`, `bx_spaces_cmts_notes`, `bx_spaces_views_track`, `bx_spaces_meta_keywords`, `bx_spaces_meta_locations`, `bx_spaces_meta_mentions`, `bx_spaces_fans`, `bx_spaces_admins`, `bx_spaces_votes`, `bx_spaces_votes_track`, `bx_spaces_reports`, `bx_spaces_reports_track`, `bx_spaces_favorites_track`, `bx_spaces_favorites_lists`, `bx_spaces_scores`, `bx_spaces_scores_track`, `bx_spaces_invites`, `bx_spaces_prices`;
+DROP TABLE IF EXISTS `bx_spaces_data`, `bx_spaces_pics`, `bx_spaces_pics_resized`, `bx_spaces_cmts`, `bx_spaces_cmts_notes`, `bx_spaces_views_track`, `bx_spaces_meta_keywords`, `bx_spaces_meta_locations`, `bx_spaces_meta_mentions`, `bx_spaces_fans`, `bx_spaces_admins`, `bx_spaces_votes`, `bx_spaces_votes_track`, `bx_spaces_stars`, `bx_spaces_stars_track`, `bx_spaces_reports`, `bx_spaces_reports_track`, `bx_spaces_favorites_track`, `bx_spaces_favorites_lists`, `bx_spaces_scores`, `bx_spaces_scores_track`, `bx_spaces_invites`, `bx_spaces_prices`;
 
 -- PROFILES
 
@@ -35,7 +35,7 @@ DELETE FROM `sys_objects_cmts` WHERE `Name` LIKE 'bx_spaces%';
 DELETE FROM `sys_objects_view` WHERE `name` = 'bx_spaces';
 
 -- VOTES
-DELETE FROM `sys_objects_vote` WHERE `Name` = 'bx_spaces';
+DELETE FROM `sys_objects_vote` WHERE `Name` LIKE 'bx_spaces%';
 
 -- SCORES
 DELETE FROM `sys_objects_score` WHERE `name` = 'bx_spaces';

+ 1 - 0
modules/boonex/spaces/template/entry-rating.html

@@ -0,0 +1 @@
+<div class="bx-spaces-entity-rating">__content__</div>