Ecomwise_Forcelogin - Version 1.0.4

Version Notes

1.0.4

Download this release

Release Info

Developer EcomwiseTeam
Extension Ecomwise_Forcelogin
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

app/code/community/Ecomwise/Forcelogin/Block/Adminhtml/Support.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Ecomwise_Forcelogin_Block_Adminhtml_Support extends Mage_Adminhtml_Block_Abstract
3
+ implements Varien_Data_Form_Element_Renderer_Interface
4
+ {
5
+
6
+ protected $_template = 'forcelogin/support.phtml';
7
+
8
+ public $module = 'Ecomwise_Forcelogin';
9
+ public $supportUrl = 'http://support.ecomwise.com/support/tickets/new';
10
+ public $email = 'feedback@ecomwise.com';
11
+ public $faq = 'http://support.ecomwise.com/support/solutions/folders/111251';
12
+ public $name = 'B2B Forced Login';
13
+ public $compatibility = 'Magento CE 1.7-1.9';
14
+ public $manualUrl = 'http://support.ecomwise.com/support/solutions/articles/162497-forced-login-';
15
+
16
+ public function render(Varien_Data_Form_Element_Abstract $element) {
17
+ return $this->toHtml();
18
+ }
19
+ }
app/code/community/Ecomwise/Forcelogin/Model/Config/Source/YesNo.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Ecomwise_Forcelogin_Model_Config_Source_YesNo
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value'=>'1', 'label'=>Mage::helper('adminhtml')->__('No')),
9
+ array('value'=>'0', 'label'=>Mage::helper('adminhtml')->__('Yes')),
10
+ );
11
+ }
12
+ }
app/code/community/Ecomwise/Forcelogin/Model/Observer.php CHANGED
@@ -9,7 +9,7 @@ class Ecomwise_Forcelogin_Model_Observer extends Varien_Object{
9
  $adminUrl = $url->asArray();
10
 
11
 
12
- $forceLogin = (bool) Mage::getStoreConfig('forcelogin/forcelogin/disable_ext', Mage::app()->getStore());
13
  if(!$forceLogin){
14
  if ( ! Mage::getSingleton('customer/session')->isLoggedIn()
15
  && ! Mage::getSingleton('admin/session')->isLoggedIn()
9
  $adminUrl = $url->asArray();
10
 
11
 
12
+ $forceLogin = (bool) Mage::getStoreConfig('forcelogin/parameters/enabled', Mage::app()->getStore());
13
  if(!$forceLogin){
14
  if ( ! Mage::getSingleton('customer/session')->isLoggedIn()
15
  && ! Mage::getSingleton('admin/session')->isLoggedIn()
app/code/community/Ecomwise/Forcelogin/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Ecomwise_Forcelogin>
5
- <version>1.0.3</version>
6
  </Ecomwise_Forcelogin>
7
 
8
  </modules>
2
  <config>
3
  <modules>
4
  <Ecomwise_Forcelogin>
5
+ <version>1.0.4</version>
6
  </Ecomwise_Forcelogin>
7
 
8
  </modules>
app/code/community/Ecomwise/Forcelogin/etc/system.xml CHANGED
@@ -1,24 +1,23 @@
1
  <?xml version="1.0"?>
2
-
3
  <config>
4
- <tabs>
5
- <ecomwise translate="label">
6
- <label>B2B-extensions</label>
7
- <sort_order>100</sort_order>
8
- </ecomwise>
9
- </tabs>
10
- <sections>
11
- <forcelogin translate="label" module="forcelogin">
12
- <label>Forced Login</label>
13
- <tab>ecomwise</tab>
14
- <frontend_type>text</frontend_type>
15
- <sort_order>90</sort_order>
16
- <show_in_default>1</show_in_default>
17
- <show_in_website>1</show_in_website>
18
- <show_in_store>1</show_in_store>
19
- <groups>
20
- <forcelogin translate="label">
21
- <label>Info</label>
22
  <frontend_type>text</frontend_type>
23
  <sort_order>1</sort_order>
24
  <show_in_default>1</show_in_default>
@@ -26,26 +25,36 @@
26
  <show_in_store>1</show_in_store>
27
  <fields>
28
  <forcelogin_version translate="label">
29
- <label>Forced Login</label>
30
- <frontend_type>select</frontend_type>
31
- <frontend_model>forcelogin/system_config_version</frontend_model>
32
- <sort_order>1</sort_order>
33
- <show_in_default>1</show_in_default>
34
- <show_in_website>1</show_in_website>
35
- <show_in_store>1</show_in_store>
36
- </forcelogin_version>
37
- <disable_ext translate="label">
38
- <label>Disable</label>
39
- <frontend_type>select</frontend_type>
40
- <source_model>adminhtml/system_config_source_yesno</source_model>
41
- <sort_order>10</sort_order>
42
- <show_in_default>1</show_in_default>
43
- <show_in_website>1</show_in_website>
44
- <show_in_store>1</show_in_store>
45
- </disable_ext>
46
- </fields>
47
  </forcelogin>
48
- </groups>
49
- </forcelogin>
50
- </sections>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  </config>
1
  <?xml version="1.0"?>
 
2
  <config>
3
+ <tabs>
4
+ <ecomwise translate="label">
5
+ <label><![CDATA[<div style="position: absolute;"><img id="ecomwise_block" src="" alt="" border="0" /></div>&nbsp;<script>$('ecomwise_block').src = SKIN_URL + "images/ecomwise/extensions_logo.png";</script>]]></label>
6
+ <sort_order>100</sort_order>
7
+ </ecomwise>
8
+ </tabs>
9
+ <sections>
10
+ <forcelogin translate="label" module="forcelogin">
11
+ <label>B2B Forced Login</label>
12
+ <tab>ecomwise</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>90</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
+ <groups>
19
+ <forcelogin translate="label">
20
+ <label>Info &amp; Support</label>
21
  <frontend_type>text</frontend_type>
22
  <sort_order>1</sort_order>
23
  <show_in_default>1</show_in_default>
25
  <show_in_store>1</show_in_store>
26
  <fields>
27
  <forcelogin_version translate="label">
28
+ <label>B2B Forced Login</label>
29
+ <frontend_type>select</frontend_type>
30
+ <frontend_model>forcelogin/adminhtml_support</frontend_model>
31
+ <sort_order>1</sort_order>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>1</show_in_store>
35
+ </forcelogin_version>
36
+ </fields>
 
 
 
 
 
 
 
 
 
37
  </forcelogin>
38
+ <parameters translate="label">
39
+ <label>Settings</label>
40
+ <frontend_type>text</frontend_type>
41
+ <sort_order>3</sort_order>
42
+ <show_in_default>1</show_in_default>
43
+ <show_in_website>1</show_in_website>
44
+ <show_in_store>1</show_in_store>
45
+ <fields>
46
+ <enabled translate="label">
47
+ <label>Extension Enabled</label>
48
+ <frontend_type>select</frontend_type>
49
+ <source_model>forcelogin/config_source_yesNo</source_model>
50
+ <sort_order>10</sort_order>
51
+ <show_in_default>1</show_in_default>
52
+ <show_in_website>1</show_in_website>
53
+ <show_in_store>1</show_in_store>
54
+ </enabled>
55
+ </fields>
56
+ </parameters>
57
+ </groups>
58
+ </forcelogin>
59
+ </sections>
60
  </config>
app/design/adminhtml/default/default/template/forcelogin/support.phtml ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php $_helper = $this->helper('forcelogin'); ?>
2
+ <style type="text/css">
3
+ .contentWrap h2{
4
+ font-size:13px;
5
+ padding: 10px 0 4px;
6
+ }
7
+
8
+ .contentWrap .version h2, .contentWrap .compatibility h2 {
9
+ float: left;
10
+ width: 200px;
11
+ }
12
+
13
+ .contentWrap .installation{
14
+ padding-bottom:20px;
15
+ }
16
+ .contentWrap div{
17
+ padding-bottom:15px;
18
+ }
19
+
20
+ .contentWrap div.paragraph{
21
+ padding: 11px 0 4px;
22
+ }
23
+ </style>
24
+ <div class="contentWrap">
25
+ <div>
26
+ <h2><?php echo $_helper->__('Name & Version:');?></h2>
27
+ <p><?php echo $this->name?> <?php echo Mage::getConfig()->getModuleConfig($this->module)->version;?></p>
28
+ </div>
29
+ <div>
30
+ <h2><?php echo $_helper->__('Compatibility:');?></h2>
31
+ <p><?php echo $this->compatibility;?></p>
32
+ </div>
33
+ <div class="documentation">
34
+ <h2><?php echo $_helper->__('Documentation & Installation');?></h2>
35
+ <p><?php echo $_helper->__('Read the installation manual & user guide to help you with the installation and configuration.');?></p>
36
+ <p><?php echo $_helper->__('<a class="pdf" href="'.$this->manualUrl.'" title="Download User Guide" target="'.$this->manualUrl.'">B2B Forced Login installation & user guide</a>');?></p>
37
+ </div>
38
+
39
+ <div class="questions">
40
+ <h2><?php echo $_helper->__('Support & Questions?');?></h2>
41
+ <p><?php echo $_helper->__('Visit our %s for more info.','<a href="'.$this->faq.'" target="_blank">FAQ page</a>');?></p>
42
+ <p><?php echo $_helper->__('<a class="support" href="'.$this->supportUrl.'" title="Contact Support" target="_blank">'.$_helper->__('Contact support').'</a>');?></p>
43
+ </div>
44
+
45
+ <div class="about">
46
+ <h2><?php echo $_helper->__('About B2B Extensions');?></h2>
47
+ <p><?php echo $_helper->__('B2B Extensions is a product of %s','<a href="http://www.ecomwise.com/" target="_blank">Ecomwise.com</a>');?></p>
48
+ </div>
49
+
50
+ <div class="mail">
51
+ <h2><?php echo $_helper->__('Do you have Feedback or improvements?');?></h2>
52
+ <p><?php echo $_helper->__('<a href="mailto:'.$this->email.'" target="_blank">Please e-mail us your feedback</a>');?></p>
53
+ </div>
54
+ </div>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ecomwise_Forcelogin</name>
4
- <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license>OSL-3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Ecomwise_Forcelogin</summary>
10
  <description>Ecomwise_Forcelogin</description>
11
- <notes>1.0.3</notes>
12
  <authors><author><name>EcomwiseTeam</name><user>EcomwiseTeam</user><email>info@ecomwise.com</email></author></authors>
13
- <date>2014-11-19</date>
14
- <time>15:46:09</time>
15
- <contents><target name="magecommunity"><dir><dir name="Ecomwise"><dir name="Base"><dir name="Block"><dir name="NotificationsNotifier"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Fieldset"><dir name="Ecomwise"><file name="Extensions.php" hash="bd35aca3be511e975d9f52200b61793a"/></dir></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="7b4c6e200a7c96d8b636057efad0cc1e"/></dir><dir name="Model"><dir name="ExtensionsLicencer"><file name="Observer.php" hash="e5ce78f2d1de491159194d5c26fa8338"/></dir><dir name="NotificationsNotifier"><file name="Observer.php" hash="d7717cc44d954eb771a26160ea6206ae"/><dir name="Source"><dir name="Updates"><file name="Type.php" hash="9dc2b16665b60c4334a5e9b75bbcd1fd"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="4233a2cbfb1c2b8a5de6ca8911955195"/><file name="system.xml" hash="89d092ed5df73b846826e6032d741885"/></dir></dir><dir name="Forcelogin"><dir name="Block"><dir name="System"><dir name="Config"><file name="Version.php" hash="e5ea1ca5d03c0d3fce4f91144c35c05c"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="529c0c5b3186eae81d6ee9a3fb900214"/></dir><dir name="Model"><file name="Observer.php" hash="39be4b737fbe65d6e45d42200e2039c9"/></dir><dir name="etc"><file name="config.xml" hash="4c1caa89a37a56d3c18ce498f9155b98"/><file name="system.xml" hash="b82e942c9a5283d127120cd558753a9e"/></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Ecomwise_Base.xml" hash=""/><file name="Ecomwise_Forcelogin.xml" hash=""/></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.0.0</min><max>5.9.9</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ecomwise_Forcelogin</name>
4
+ <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license>OSL-3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Ecomwise_Forcelogin</summary>
10
  <description>Ecomwise_Forcelogin</description>
11
+ <notes>1.0.4</notes>
12
  <authors><author><name>EcomwiseTeam</name><user>EcomwiseTeam</user><email>info@ecomwise.com</email></author></authors>
13
+ <date>2015-05-28</date>
14
+ <time>10:19:14</time>
15
+ <contents><target name="magecommunity"><dir><dir name="Ecomwise"><dir name="Base"><dir name="Block"><dir name="NotificationsNotifier"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Fieldset"><dir name="Ecomwise"><file name="Extensions.php" hash="bd35aca3be511e975d9f52200b61793a"/></dir></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="7b4c6e200a7c96d8b636057efad0cc1e"/></dir><dir name="Model"><dir name="ExtensionsLicencer"><file name="Observer.php" hash="e5ce78f2d1de491159194d5c26fa8338"/></dir><dir name="NotificationsNotifier"><file name="Observer.php" hash="d7717cc44d954eb771a26160ea6206ae"/><dir name="Source"><dir name="Updates"><file name="Type.php" hash="9dc2b16665b60c4334a5e9b75bbcd1fd"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="4233a2cbfb1c2b8a5de6ca8911955195"/><file name="system.xml" hash="89d092ed5df73b846826e6032d741885"/></dir></dir><dir name="Forcelogin"><dir name="Block"><dir name="Adminhtml"><file name="Support.php" hash="aa96e2681816d83867f21e88edc1cfa9"/></dir><dir name="System"><dir name="Config"><file name="Version.php" hash="e5ea1ca5d03c0d3fce4f91144c35c05c"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="529c0c5b3186eae81d6ee9a3fb900214"/></dir><dir name="Model"><dir name="Config"><dir name="Source"><file name="YesNo.php" hash="5990e9ac771451b19a7f28b507773046"/></dir></dir><file name="Observer.php" hash="9b14386f9fa355a5e75e8bd5bc65ac52"/></dir><dir name="etc"><file name="config.xml" hash="1c369220ccdb0770a99567aba7d5811e"/><file name="system.xml" hash="7e6a031fbabea65ad4de223ef576e3ea"/></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Ecomwise_Base.xml" hash=""/><file name="Ecomwise_Forcelogin.xml" hash=""/></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="forcelogin"><file name="support.phtml" hash="6f645f27af2e11ea2786f35c03b4791b"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="ecomwise"><file name="extensions_logo.png" hash="398cfc27d0a8fc693da176e102e7c013"/></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.0.0</min><max>5.9.9</max></php></required></dependencies>
18
  </package>
skin/adminhtml/default/default/images/ecomwise/extensions_logo.png ADDED
Binary file