Zota_BetterContactForm - Version 1.0.0.0

Version Notes

The responsive contact form let your customer send a message easily on any devices.

Download this release

Release Info

Developer Better Contact Form
Extension Zota_BetterContactForm
Version 1.0.0.0
Comparing to
See all releases


Version 1.0.0.0

app/code/community/Zota/BetterContactForm/Block/Adminhtml/Source/System/Config/CreateFormButton.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Zota_BetterContactForm_Block_Adminhtml_Source_System_Config_CreateFormButton extends Mage_Adminhtml_Block_System_Config_Form_Field
3
+ {
4
+
5
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
6
+ {
7
+ $this->setElement($element);
8
+ $formBuilderUrl = "http://bettercontactform.com/contact/form/builder";
9
+ $html = $this->getLayout()->createBlock('adminhtml/widget_button')
10
+ ->setType('button')
11
+ ->setClass('btn-create-contact-form')
12
+ ->setLabel('Create Yours Contact Form')
13
+ ->setOnClick("window.open('$formBuilderUrl', '_create_new_form');return false;")
14
+ ->toHtml();
15
+ return $html;
16
+ }
17
+ }
18
+ ?>
app/code/community/Zota/BetterContactForm/Block/Script.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Zota_BetterContactForm_Block_Script extends Mage_Core_Block_Template
3
+ {
4
+ const XML_PATH_BETTERCONTACTFORM_AVAILABILITY = 'bettercontactform/settings/availability';
5
+ const XML_PATH_BETTERCONTACTFORM_SCRIPT_CODE = 'bettercontactform/settings/code_pool';
6
+
7
+ public function isEnable() {
8
+ $is_enabled = Mage::getStoreConfig(self::XML_PATH_BETTERCONTACTFORM_AVAILABILITY);
9
+ if ($is_enabled) {
10
+ return true;
11
+ }
12
+ return false;
13
+ }
14
+
15
+ public function getScript() {
16
+ $script = Mage::getStoreConfig(self::XML_PATH_BETTERCONTACTFORM_SCRIPT_CODE);
17
+ if (isset($script) && !empty($script)) {
18
+ return $script;
19
+ }
20
+ return false;
21
+ }
22
+ }
app/code/community/Zota/BetterContactForm/Helper/Data.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ class Zota_BetterContactForm_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ }
5
+ ?>
app/code/community/Zota/BetterContactForm/etc/adminhtml.xml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <all>
6
+ <title>Allow Everything</title>
7
+ </all>
8
+ <admin>
9
+ <children>
10
+ <system>
11
+ <children>
12
+ <config>
13
+ <children>
14
+ <bettercontactform translate="title" module="bettercontactform">
15
+ <title>Better Contact Form Section</title>
16
+ </bettercontactform>
17
+ </children>
18
+ </config>
19
+ </children>
20
+ </system>
21
+ </children>
22
+ </admin>
23
+ </resources>
24
+ </acl>
25
+ </config>
app/code/community/Zota/BetterContactForm/etc/config.xml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Zota_BetterContactForm>
5
+ <version>1.0.0.0</version>
6
+ </Zota_BetterContactForm>
7
+ </modules>
8
+
9
+ <global>
10
+ <blocks>
11
+ <bettercontactform>
12
+ <class>Zota_BetterContactForm_Block</class>
13
+ </bettercontactform>
14
+ </blocks>
15
+ <helpers>
16
+ <bettercontactform>
17
+ <class>Zota_BetterContactForm_Helper</class>
18
+ </bettercontactform>
19
+ </helpers>
20
+ </global>
21
+ <adminhtml>
22
+ <translate>
23
+ <modules>
24
+ <Zota_BetterContactForm>
25
+ <files>
26
+ <default>Zota_BetterContactForm.csv</default>
27
+ </files>
28
+ </Zota_BetterContactForm>
29
+ </modules>
30
+ </translate>
31
+ </adminhtml>
32
+ <frontend>
33
+ <translate>
34
+ <modules>
35
+ <Zota_BetterContactForm>
36
+ <files>
37
+ <default>Zota_BetterContactForm.csv</default>
38
+ </files>
39
+ </Zota_BetterContactForm>
40
+ </modules>
41
+ </translate>
42
+ <layout>
43
+ <updates>
44
+ <bettercontactform>
45
+ <file>bettercontactform.xml</file>
46
+ </bettercontactform>
47
+ </updates>
48
+ </layout>
49
+ </frontend>
50
+ </config>
app/code/community/Zota/BetterContactForm/etc/system.xml ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <zotasoft translate="label">
5
+ <label>Zotasoft</label>
6
+ <sort_order>200</sort_order>
7
+ </zotasoft>
8
+ </tabs>
9
+ <sections>
10
+ <bettercontactform translate="label" module="bettercontactform">
11
+ <label>Better Contact Form</label>
12
+ <tab>zotasoft</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>1</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
+ <settings translate="label">
20
+ <label>Better Contact Form Settings</label>
21
+ <expanded>1</expanded>
22
+ <sort_order>2</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>1</show_in_store>
26
+ <fields>
27
+ <availability translate="label comment">
28
+ <label>Enabled</label>
29
+ <comment>Select to enable or disable Contact Form.</comment>
30
+ <frontend_type>select</frontend_type>
31
+ <source_model>adminhtml/system_config_source_yesno</source_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
+ </availability>
37
+ <code_pool translate="label comment">
38
+ <label>Embbeded Code</label>
39
+ <comment>Put your better contact form code here.</comment>
40
+ <frontend_type>textarea</frontend_type>
41
+ <sort_order>2</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
+ </code_pool>
46
+ <build_form translate="comment">
47
+ <comment>If your don't have a Better Contact Form code yet, please click "Create Yours Contact Form".</comment>
48
+ <frontend_model>bettercontactform/adminhtml_source_system_config_createformbutton</frontend_model>
49
+ <sort_order>3</sort_order>
50
+ <show_in_default>1</show_in_default>
51
+ <show_in_website>1</show_in_website>
52
+ <show_in_store>1</show_in_store>
53
+ </build_form>
54
+ </fields>
55
+ </settings>
56
+ <copyright translate="label">
57
+ <label>Support</label>
58
+ <comment><![CDATA[
59
+ <div style="text-align: left;">
60
+ <span>This extension is developed by <a target="Better Contact Form" href="http://bettercontactform.com" target="_blank" title="Better Contact Form">BetterContactForm.com</a>. </span>
61
+ <span>If you have any questions or comments, please <a target="_discussion" href="http://bettercontactform.com/discussion" title="Click to send a question">leave your feedback here</a>.</span>
62
+ </div>
63
+ ]]></comment>
64
+ <expanded>1</expanded>
65
+ <sort_order>4</sort_order>
66
+ <show_in_default>1</show_in_default>
67
+ <show_in_website>1</show_in_website>
68
+ <show_in_store>1</show_in_store>
69
+ </copyright>
70
+ </groups>
71
+ </bettercontactform>
72
+ </sections>
73
+ </config>
app/design/frontend/base/default/layout/bettercontactform.xml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="after_body_start">
5
+ <block type="bettercontactform/script" name="bcf_script" as="bcf_script" translate="label">
6
+ <label>Better Contact Form Script</label>
7
+ <action method="setTemplate"><template>bettercontactform/bcf-script.phtml</template></action>
8
+ </block>
9
+ </reference>
10
+ </default>
11
+ </layout>
app/design/frontend/base/default/template/bettercontactform/bcf-script.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ if ($this->isEnable()) {
3
+ echo $this->getScript();
4
+ }
5
+ ?>
app/etc/modules/Zota_BetterContactForm.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Zota_BetterContactForm>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </Zota_BetterContactForm>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Zota_BetterContactForm</name>
4
+ <version>1.0.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>The professional contact form.</summary>
10
+ <description>The professional contact form let your customers comfortable to drop a message quickly whenever they want.</description>
11
+ <notes>The responsive contact form let your customer send a message easily on any devices.</notes>
12
+ <authors><author><name>Better Contact Form</name><user>hai</user><email>hai@bettercontactform.com</email></author></authors>
13
+ <date>2013-11-01</date>
14
+ <time>09:56:47</time>
15
+ <contents><target name="magecommunity"><dir name="Zota"><dir name="BetterContactForm"><dir name="Block"><dir name="Adminhtml"><dir name="Source"><dir name="System"><dir name="Config"><file name="CreateFormButton.php" hash="c9427813634029595775401de9aae142"/></dir></dir></dir></dir><file name="Script.php" hash="62e66da78a90ea26f0cb83fbef262d7e"/></dir><dir name="Helper"><file name="Data.php" hash="3dbcff5095004d843452c25d1525e285"/></dir><dir name="etc"><file name="adminhtml.xml" hash="626639463f50f518cd89619cdb499e9d"/><file name="config.xml" hash="82adc4b8dd88d68ce5dcf80ff48b01a3"/><file name="system.xml" hash="db5a6734b06877808745d387422a6fea"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="bettercontactform.xml" hash="d3b50fd14cb5f2f76cd187ef17c56561"/></dir><dir name="template"><dir name="bettercontactform"><file name="bcf-script.phtml" hash="297895dc6468e88f54fd403fbdfbddc3"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Zota_BetterContactForm.xml" hash="6456dad11f95aa957cc9999046078b90"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>5.5.0</max></php></required></dependencies>
18
+ </package>