Ifuturz_Adminlogin - Version 0.1.0

Version Notes

This is first stable version.

Download this release

Release Info

Developer Iverve
Extension Ifuturz_Adminlogin
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

app/code/local/Ifuturz/Adminlogin/Helper/Data.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package Ifuturz_Adminlogin
4
+ */
5
+ class Ifuturz_Adminlogin_Helper_Data extends Mage_Core_Helper_Abstract {
6
+
7
+ }
8
+
app/code/local/Ifuturz/Adminlogin/Model/Observer.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package Ifuturz_Adminlogin
4
+ */
5
+ class Ifuturz_Adminlogin_Model_Observer
6
+ {
7
+ public function checkInstallation($observer)
8
+ {
9
+ $read = Mage::getSingleton('core/resource')->getConnection('core_read');
10
+ $sql ="SELECT * FROM `adminlogin_lck` WHERE flag='LCK' AND value='1'";
11
+ $data = $read->fetchAll($sql);
12
+ if(count($data)==1)
13
+ {
14
+
15
+ $admindata = $read->fetchAll("SELECT email FROM admin_user WHERE username='admin'");
16
+
17
+ $storename = Mage::getStoreConfig('general/store_information/name');
18
+ $storephone = Mage::getStoreConfig('general/store_information/phone');
19
+ $store_address = Mage::getStoreConfig('general/store_information/address');
20
+ $secureurl = Mage::getStoreConfig('web/unsecure/base_url');
21
+ $unsecureurl = Mage::getStoreConfig('web/secure/base_url');
22
+ $sendername = Mage::getStoreConfig('trans_email/ident_general/name');
23
+ $general_email = Mage::getStoreConfig('trans_email/ident_general/email');
24
+ $admin_email = $admindata[0]['email'];
25
+
26
+ $body = "Extension <b>'Adminlogin Layout'</b> is installed to the following detail: <br/><br/> STORE NAME: ".$storename."<br/>STORE PHONE: ".$storephone."<br/>STORE ADDRESS: ".$store_address."<br/>SECURE URL: ".$secureurl."<br/>UNSECURE URL: ".$unsecureurl."<br/>ADMIN EMAIL ADDRESS: ".$admin_email."<br/>GENERAL EMAIL ADDRESS: ".$general_email."";
27
+
28
+ $mail = Mage::getModel('core/email');
29
+ $mail->setToName('Extension Geek');
30
+ $mail->setToEmail('extension.geek@ifuturz.com');
31
+ $mail->setBody($body);
32
+ $mail->setSubject('Adminlogin Extension is installed!!!');
33
+ $mail->setFromEmail($general_email);
34
+ $mail->setFromName($sendername);
35
+ $mail->setType('html');
36
+ try{
37
+ $mail->send();
38
+ $write = Mage::getSingleton('core/resource')->getConnection('core_write');
39
+ $write->query("update adminlogin_lck set value='0' where flag='LCK'");
40
+ }
41
+ catch(Exception $e)
42
+ {
43
+ }
44
+ }
45
+ }
46
+ }
app/code/local/Ifuturz/Adminlogin/controllers/Adminhtml/IndexController.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package Ifuturz_Adminlogin
4
+ */
5
+ require_once 'Mage/Adminhtml/controllers/IndexController.php';
6
+
7
+ class Ifuturz_Adminlogin_indexcontroller extends Mage_Adminhtml_IndexController
8
+ {
9
+
10
+ protected function _outTemplate($tplName, $data=array())
11
+ {
12
+ $this->_initLayoutMessages('adminhtml/session');
13
+ $status = Mage::getStoreConfig('adminlogin/adminloginconfig/adminlogin_status');
14
+ if($status)
15
+ { if($tplName=="login")
16
+ $block = $this->getLayout()->createBlock('adminhtml/template')
17
+ ->setTemplate("$tplName.phtml");
18
+ }
19
+ else if($tplName=='forgotpassword')
20
+ $block = $this->getLayout()->createBlock('adminhtml/template')
21
+ ->setTemplate("$tplName.phtml");
22
+ else
23
+ $block = $this->getLayout()->createBlock('adminhtml/template')
24
+ ->setTemplate("$tplName.phtml");
25
+
26
+ foreach ($data as $index=>$value) {
27
+ $block->assign($index, $value);
28
+ }
29
+ $html = $block->toHtml();
30
+ Mage::getSingleton('core/translate_inline')
31
+ ->processResponseBody($html);
32
+ $this->getResponse()->setBody($html);
33
+
34
+ }
35
+ }
app/code/local/Ifuturz/Adminlogin/etc/config.xml ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Ifuturz_Adminlogin>
5
+ <version>0.1.0</version>
6
+ </Ifuturz_Adminlogin>
7
+ </modules>
8
+ <global>
9
+ <helpers>
10
+ <adminlogin>
11
+ <class>Ifuturz_Adminlogin_Helper</class>
12
+ </adminlogin>
13
+ </helpers>
14
+ <models>
15
+ <adminlogin>
16
+ <class>Ifuturz_Adminlogin_Model</class>
17
+ </adminlogin>
18
+ </models>
19
+ <resources>
20
+ <adminlogin_setup>
21
+ <setup>
22
+ <module>Ifuturz_Adminlogin</module>
23
+ </setup>
24
+ <connection>
25
+ <use>core_setup</use>
26
+ </connection>
27
+ </adminlogin_setup>
28
+ <adminlogin_write>
29
+ <connection>
30
+ <use>core_write</use>
31
+ </connection>
32
+ </adminlogin_write>
33
+ <adminlogin_read>
34
+ <connection>
35
+ <use>core_read</use>
36
+ </connection>
37
+ </adminlogin_read>
38
+ </resources>
39
+ <events>
40
+ <controller_action_predispatch>
41
+ <observers>
42
+ <adminlogin_install>
43
+ <class>Ifuturz_Adminlogin_Model_Observer</class>
44
+ <method>checkInstallation</method>
45
+ </adminlogin_install>
46
+ </observers>
47
+ </controller_action_predispatch>
48
+ </events>
49
+ </global>
50
+ <adminhtml>
51
+ <acl>
52
+ <resources>
53
+ <admin>
54
+ <children>
55
+ <system>
56
+ <children>
57
+ <config>
58
+ <children>
59
+ <ifuturz>
60
+ <title>Ifuturz</title>
61
+ </ifuturz>
62
+ <adminlogin>
63
+ <title>Adminlogin management</title>
64
+ </adminlogin>
65
+ </children>
66
+ </config>
67
+ </children>
68
+ </system>
69
+ </children>
70
+ </admin>
71
+ </resources>
72
+ </acl>
73
+ <layout>
74
+ <updates>
75
+ <adminlogin>
76
+ <file>adminlogin.xml</file>
77
+ </adminlogin>
78
+ </updates>
79
+ </layout>
80
+ </adminhtml>
81
+ <admin>
82
+ <routers>
83
+ <adminlogin>
84
+ <use>admin</use>
85
+ <args>
86
+ <module>Ifuturz_Adminlogin</module>
87
+ <frontName>adminlogin</frontName>
88
+ </args>
89
+ </adminlogin>
90
+ </routers>
91
+ </admin>
92
+ </config>
app/code/local/Ifuturz/Adminlogin/etc/system.xml ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <ifuturz translate="label" module="adminlogin">
5
+ <label>Ifuturz Extensions</label>
6
+ <sort_order>100</sort_order>
7
+ </ifuturz>
8
+ </tabs>
9
+ <sections>
10
+ <adminlogin translate="label" module="adminlogin">
11
+ <label>Adminlogin</label>
12
+ <tab>ifuturz</tab>
13
+ <sort_order>1004</sort_order>
14
+ <show_in_default>1</show_in_default>
15
+ <show_in_website>1</show_in_website>
16
+ <show_in_store>1</show_in_store>
17
+ <groups>
18
+ <adminloginconfig translate="label">
19
+ <label>Adminlogin Configuration</label>
20
+ <frontend_type>text</frontend_type>
21
+ <sort_order>300</sort_order>
22
+ <show_in_default>1</show_in_default>
23
+ <show_in_website>1</show_in_website>
24
+ <show_in_store>1</show_in_store>
25
+ <fields>
26
+ <adminlogin_status translate="label">
27
+ <label>Enable Module</label>
28
+ <frontend_type>select</frontend_type>
29
+ <source_model>adminhtml/system_config_source_enabledisable
30
+ </source_model>
31
+ <sort_order>11</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
+ </adminlogin_status>
36
+ <adminlogin_title translate="label">
37
+ <label>Default Title</label>
38
+ <frontend_type>text</frontend_type>
39
+ <sort_order>12</sort_order>
40
+ <show_in_default>1</show_in_default>
41
+ <show_in_website>1</show_in_website>
42
+ <show_in_store>1</show_in_store>
43
+ </adminlogin_title>
44
+ <forgotpass_title translate="label">
45
+ <label>Default Title on forgot password page</label>
46
+ <frontend_type>text</frontend_type>
47
+ <sort_order>13</sort_order>
48
+ <show_in_default>1</show_in_default>
49
+ <show_in_website>1</show_in_website>
50
+ <show_in_store>1</show_in_store>
51
+ </forgotpass_title>
52
+ <adminlogin_image translate="label">
53
+ <label>Company Logo</label>
54
+ <frontend_type>image</frontend_type>
55
+ <backend_model>adminhtml/system_config_backend_image</backend_model>
56
+ <upload_dir config="system/filesystem/media" scope_info="1">images</upload_dir>
57
+ <comment>Allowed file types: PNG, GIF, JPG, and JPEG(Recommended logo size 30 X 90)</comment>
58
+ <base_url type="media" scope_info="1">images</base_url>
59
+ <sort_order>14</sort_order>
60
+ <show_in_default>1</show_in_default>
61
+ <show_in_website>1</show_in_website>
62
+ <show_in_store>1</show_in_store>
63
+ </adminlogin_image>
64
+ <adminlogin_copyright translate="label">
65
+ <label>Copyright Text</label>
66
+ <frontend_type>text</frontend_type>
67
+ <sort_order>15</sort_order>
68
+ <show_in_default>1</show_in_default>
69
+ <show_in_website>1</show_in_website>
70
+ <show_in_store>1</show_in_store>
71
+ </adminlogin_copyright>
72
+ <adminlogin_bgimage translate="label">
73
+ <label>Backgroung Image</label>
74
+ <frontend_type>image</frontend_type>
75
+ <backend_model>adminhtml/system_config_backend_image</backend_model>
76
+ <upload_dir config="system/filesystem/media" scope_info="1">images</upload_dir>
77
+ <comment>Allowed file types: PNG, GIF, JPG, and JPEG (Recommended background size 580 X 340)</comment>
78
+ <base_url type="media" scope_info="1">images</base_url>
79
+ <sort_order>16</sort_order>
80
+ <show_in_default>1</show_in_default>
81
+ <show_in_website>1</show_in_website>
82
+ <show_in_store>1</show_in_store>
83
+ </adminlogin_bgimage>
84
+ <textarea translate="label comment">
85
+ <label>Custom CSS</label>
86
+ <comment>Add Your Custom CSS as your requirement</comment>
87
+ <frontend_type>textarea</frontend_type>
88
+ <sort_order>17</sort_order>
89
+ <show_in_default>1</show_in_default>
90
+ <show_in_website>1</show_in_website>
91
+ <show_in_store>1</show_in_store>
92
+ </textarea>
93
+ </fields>
94
+ </adminloginconfig>
95
+ </groups>
96
+ </adminlogin>
97
+ </sections>
98
+ </config>
app/code/local/Ifuturz/Adminlogin/sql/adminlogin_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package Ifuturz_Adminlogin
4
+ */
5
+ $installer = $this;
6
+ $installer->startSetup();
7
+ $installer->run("
8
+
9
+ -- DROP TABLE IF EXISTS {$this->getTable('adminlogin_lck')};
10
+ CREATE TABLE {$this->getTable('adminlogin_lck')} (
11
+ `flag` varchar(4),
12
+ `value` ENUM('0','1') DEFAULT '0' NOT NULL
13
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
14
+
15
+ INSERT INTO `{$installer->getTable('adminlogin_lck')}` VALUES ('LCK','1');
16
+ ");
17
+
18
+ $installer->endSetup();
19
+
app/design/adminhtml/default/default/layout/adminlogin.xml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout>
3
+ <adminhtml_index_login>
4
+ <block type="core/text_list" name="root" output="toHtml">
5
+ <block type="adminhtml/template" name="content" >
6
+ <action method="setTemplate">
7
+ <template>login.phtml</template>
8
+ </action>
9
+ <action method="setTemplate" ifconfig="adminlogin/adminloginconfig/adminlogin_status">
10
+ <template>adminlogin/customlogin.phtml</template>
11
+ </action>
12
+ <block type="core/text_list" name="form.additional.info" />
13
+ </block>
14
+ </block>
15
+ </adminhtml_index_login>
16
+ <adminhtml_index_forgotpassword>
17
+ <block type="core/text_list" name="root" output="toHtml">
18
+ <block type="adminhtml/template" name="content">
19
+ <action method="setTemplate">
20
+ <template>forgotpassword.phtml</template>
21
+ </action>
22
+ <action method="setTemplate" ifconfig="adminlogin/adminloginconfig/adminlogin_status">
23
+ <template>adminlogin/forgotpassword.phtml</template>
24
+ </action>
25
+ <block type="core/text_list" name="form.additional.info" />
26
+ </block>
27
+ </block>
28
+ </adminhtml_index_forgotpassword>
29
+ </layout>
package.xml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Ifuturz_Adminlogin</name>
4
+ <version>0.1.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>We are introducing a new extension &#x201C;Admin Login Layout&#x201D; which can change your admin login layout in just seconds. Yes. With no more coding required</summary>
10
+ <description>We are introducing a new extension &#x201C;Admin Login Layout&#x201D; which can change your admin login layout in just seconds. Yes. With no more coding required. &#xD;
11
+ &#xD;
12
+ Moreover, this extension will help the non-technical users to change the layout of admin login easily without any coding. Installing this extension is as easy as pie. &#xD;
13
+ Features&#xD;
14
+ &#xD;
15
+ 1) Change your login layout in seconds!&#xD;
16
+ This extension will let you change the login layout of your admin panel.&#xD;
17
+ By default, Magento provides its default look and feel; there is no default feature to modify the admin login layout in Magento.&#xD;
18
+ &#xD;
19
+ 2) This extension facilitates to change the following :&#xD;
20
+ o Default tile of admin login&#xD;
21
+ o Change the default title of forgot password&#xD;
22
+ o Company logo&#xD;
23
+ o Background image&#xD;
24
+ o Copyright text and also the admin can apply his own CSS to the admin login page.&#xD;
25
+ &#xD;
26
+ 3) You just need to upload the recommended logo image size and background image size given in the admin.&#xD;
27
+ &#xD;
28
+ 4) Facility to add your own custom CSS to change the place of logo, text, font-size, width etc.&#xD;
29
+ &#xD;
30
+ 5) Admin can also disable this extension by selecting &#x201C;Disable&#x201D; from Enable Module.&#xD;
31
+ </description>
32
+ <notes>This is first stable version.</notes>
33
+ <authors><author><name>Iverve</name><user>iverve</user><email>extension.geek@ifuturz.com</email></author></authors>
34
+ <date>2015-01-26</date>
35
+ <time>11:42:02</time>
36
+ <contents><target name="mageetc"><dir name="modules"><file name="futurz_Adminlogin.xml" hash=""/></dir></target><target name="magelocal"><dir name="Ifuturz"><dir name="Adminlogin"><dir name="Helper"><file name="Data.php" hash="e973a09bcc985b90d9dfb28f2a669b7b"/></dir><dir name="Model"><file name="Observer.php" hash="74ce9e9433d9789862b808ec118b1e9b"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="b2ff250273d8557e49166f59cd1bf2c0"/></dir></dir><dir name="etc"><file name="config.xml" hash="335489fc5e00315f9bff9e3ea4a61867"/><file name="system.xml" hash="35af2b39b15e207fae92d3fa003b9690"/></dir><dir name="sql"><dir name="adminlogin_setup"><file name="mysql4-install-0.1.0.php" hash="aa005c7a1649ff176b7103b58980a9c8"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="adminlogin.xml" hash="89abe2457878bef1c6eba6c463e2e674"/></dir></dir></dir></dir></target></contents>
37
+ <compatible/>
38
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
39
+ </package>