Ver Fonte

#3860 Streams: make Stream page accessible when not streaming

Alex Trofimov há 4 anos atrás
pai
commit
927ade341e

+ 7 - 0
modules/boonex/stream/classes/BxStrmPageEntry.php

@@ -27,6 +27,13 @@ class BxStrmPageEntry extends BxBaseModTextPageEntry
     		'icon' => ''
     	)));
     }
+
+    public function isActive()
+    {
+        if (getParam('bx_stream_always_accessible'))
+            return true;
+        return parent::isActive();
+    }
 }
 
 /** @} */

+ 1 - 0
modules/boonex/stream/install/langs/en.xml

@@ -33,6 +33,7 @@
     <string name="_bx_stream_option_per_page_profile"><![CDATA[Number of items on profile/group page]]></string>
     <string name="_bx_stream_option_rss_num"><![CDATA[Number of items in RSS feed]]></string>
     <string name="_bx_stream_option_auto_activation_for_categories"><![CDATA[Auto-Activation For Categories]]></string>
+    <string name="_bx_stream_option_always_accessible"><![CDATA[Make Stream page accessible when not streaming]]></string>
 
     <string name="_bx_stream_form_entry"><![CDATA[Streams]]></string>
     <string name="_bx_stream_form_entry_display_add"><![CDATA[Add Stream]]></string>

+ 2 - 1
modules/boonex/stream/install/sql/enable.sql

@@ -54,7 +54,8 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_stream_per_page_profile', '6', @iCategId, '_bx_stream_option_per_page_profile', 'digit', '', '', '', 140),
 ('bx_stream_per_page_browse_showcase', '32', @iCategId, '_sys_option_per_page_browse_showcase', 'digit', '', '', '', 150),
 ('bx_stream_rss_num', '10', @iCategId, '_bx_stream_option_rss_num', 'digit', '', '', '', 20),
-('bx_stream_auto_activation_for_categories', 'on', @iCategId, '_bx_stream_option_auto_activation_for_categories', 'checkbox', '', '', '', 160);
+('bx_stream_auto_activation_for_categories', 'on', @iCategId, '_bx_stream_option_auto_activation_for_categories', 'checkbox', '', '', '', 160),
+('bx_stream_always_accessible', '', @iCategId, '_bx_stream_option_always_accessible', 'checkbox', '', '', '', 170);
 
 -- PAGE: create entry