Version Notes
First Stable
Download this release
Release Info
Developer | Ansyori |
Extension | Ansyori_Autotrans |
Version | 0.1.0 |
Comparing to | |
See all releases |
Version 0.1.0
- app/code/local/Ansyori/Autotrans/Block/Index.php +8 -0
- app/code/local/Ansyori/Autotrans/Helper/Data.php +5 -0
- app/code/local/Ansyori/Autotrans/controllers/IndexController.php +10 -0
- app/code/local/Ansyori/Autotrans/etc/adminhtml.xml +23 -0
- app/code/local/Ansyori/Autotrans/etc/config.xml +38 -0
- app/code/local/Ansyori/Autotrans/etc/system.xml +60 -0
- app/design/frontend/base/default/layout/autotrans.xml +28 -0
- app/design/frontend/base/default/template/autotrans/index.phtml +11 -0
- app/design/frontend/base/default/template/autotrans/meta.phtml +7 -0
- app/etc/modules/Ansyori_Autotrans.xml +10 -0
- package.xml +18 -0
app/code/local/Ansyori/Autotrans/Block/Index.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ansyori_Autotrans_Block_Index extends Mage_Core_Block_Template{
|
3 |
+
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
}
|
app/code/local/Ansyori/Autotrans/Helper/Data.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ansyori_Autotrans_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
}
|
5 |
+
|
app/code/local/Ansyori/Autotrans/controllers/IndexController.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ansyori_Autotrans_IndexController extends Mage_Core_Controller_Front_Action{
|
3 |
+
public function IndexAction() {
|
4 |
+
|
5 |
+
$this->loadLayout();
|
6 |
+
|
7 |
+
$this->renderLayout();
|
8 |
+
|
9 |
+
}
|
10 |
+
}
|
app/code/local/Ansyori/Autotrans/etc/adminhtml.xml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<admin>
|
6 |
+
<children>
|
7 |
+
<system>
|
8 |
+
<children>
|
9 |
+
<config>
|
10 |
+
<children>
|
11 |
+
<gtransec translate="title" module="autotrans">
|
12 |
+
<title>Configuration Section</title>
|
13 |
+
<sort_order>0</sort_order>
|
14 |
+
</gtransec>
|
15 |
+
</children>
|
16 |
+
</config>
|
17 |
+
</children>
|
18 |
+
</system>
|
19 |
+
</children>
|
20 |
+
</admin>
|
21 |
+
</resources>
|
22 |
+
</acl>
|
23 |
+
</config>
|
app/code/local/Ansyori/Autotrans/etc/config.xml
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Ansyori_Autotrans>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Ansyori_Autotrans>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<autotrans>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>Ansyori_Autotrans</module>
|
14 |
+
<frontName>autotrans</frontName>
|
15 |
+
</args>
|
16 |
+
</autotrans>
|
17 |
+
</routers>
|
18 |
+
<layout>
|
19 |
+
<updates>
|
20 |
+
<autotrans>
|
21 |
+
<file>autotrans.xml</file>
|
22 |
+
</autotrans>
|
23 |
+
</updates>
|
24 |
+
</layout>
|
25 |
+
</frontend>
|
26 |
+
<global>
|
27 |
+
<helpers>
|
28 |
+
<autotrans>
|
29 |
+
<class>Ansyori_Autotrans_Helper</class>
|
30 |
+
</autotrans>
|
31 |
+
</helpers>
|
32 |
+
<blocks>
|
33 |
+
<autotrans>
|
34 |
+
<class>Ansyori_Autotrans_Block</class>
|
35 |
+
</autotrans>
|
36 |
+
</blocks>
|
37 |
+
</global>
|
38 |
+
</config>
|
app/code/local/Ansyori/Autotrans/etc/system.xml
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<gtrans translate="label" module="autotrans">
|
5 |
+
<label>GTranslate Extension</label>
|
6 |
+
<sort_order>0</sort_order>
|
7 |
+
</gtrans>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<gtransec translate="label" module="autotrans">
|
11 |
+
<label>Configuration</label>
|
12 |
+
<tab>gtrans</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>0</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 |
+
<gtransgroup translate="label">
|
20 |
+
<label>Configuration</label>
|
21 |
+
<frontend_type>text</frontend_type>
|
22 |
+
<sort_order>0</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 |
+
<enable translate="label">
|
28 |
+
<label>Enable</label>
|
29 |
+
<frontend_type>select</frontend_type>
|
30 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
31 |
+
<sort_order>0</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 |
+
<comment>Enable</comment>
|
36 |
+
</enable>
|
37 |
+
<head translate="label">
|
38 |
+
<label>Meta Tag</label>
|
39 |
+
<frontend_type>textarea</frontend_type>
|
40 |
+
<sort_order>1</sort_order>
|
41 |
+
<show_in_default>1</show_in_default>
|
42 |
+
<show_in_website>1</show_in_website>
|
43 |
+
<show_in_store>1</show_in_store>
|
44 |
+
<comment>Meta Tag</comment>
|
45 |
+
</head>
|
46 |
+
<snippet translate="label">
|
47 |
+
<label>Snippet</label>
|
48 |
+
<frontend_type>textarea</frontend_type>
|
49 |
+
<sort_order>2</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 |
+
<comment>Snippet</comment>
|
54 |
+
</snippet>
|
55 |
+
</fields>
|
56 |
+
</gtransgroup>
|
57 |
+
</groups>
|
58 |
+
</gtransec>
|
59 |
+
</sections>
|
60 |
+
</config>
|
app/design/frontend/base/default/layout/autotrans.xml
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
|
4 |
+
<default>
|
5 |
+
|
6 |
+
<reference name="head">
|
7 |
+
<block type="autotrans/index" template="autotrans/meta.phtml" />
|
8 |
+
</reference>
|
9 |
+
|
10 |
+
|
11 |
+
<reference name="store_language">
|
12 |
+
<action method="setTemplate">
|
13 |
+
<template>autotrans/index.phtml</template>
|
14 |
+
</action>
|
15 |
+
</reference>
|
16 |
+
|
17 |
+
</default>
|
18 |
+
|
19 |
+
<autotrans_index_index>
|
20 |
+
<reference name="root">
|
21 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
22 |
+
</reference>
|
23 |
+
<reference name="content">
|
24 |
+
<block type="autotrans/index" name="autotrans_index" template="autotrans/index.phtml"/>
|
25 |
+
</reference>
|
26 |
+
</autotrans_index_index>
|
27 |
+
</layout>
|
28 |
+
|
app/design/frontend/base/default/template/autotrans/index.phtml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$cekAktif = Mage::getStoreConfig('gtransec/gtransgroup/enable');
|
3 |
+
|
4 |
+
if($cekAktif):
|
5 |
+
?>
|
6 |
+
<div class="form-language">
|
7 |
+
<label for="select-language"><?php echo $this->__('Translate This Page:') ?></label>
|
8 |
+
<?php echo Mage::getStoreConfig('gtransec/gtransgroup/snippet');?>
|
9 |
+
</div>
|
10 |
+
|
11 |
+
<?php endif;?>
|
app/design/frontend/base/default/template/autotrans/meta.phtml
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- META GOOGLE TRANSLATE-->
|
2 |
+
<?php
|
3 |
+
$cekAktif = Mage::getStoreConfig('gtransec/gtransgroup/enable');
|
4 |
+
if($cekAktif):
|
5 |
+
echo Mage::getStoreConfig('gtransec/gtransgroup/head');
|
6 |
+
endif;
|
7 |
+
?>
|
app/etc/modules/Ansyori_Autotrans.xml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Ansyori_Autotrans>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
<version>0.1.0</version>
|
8 |
+
</Ansyori_Autotrans>
|
9 |
+
</modules>
|
10 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Ansyori_Autotrans</name>
|
4 |
+
<version>0.1.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v.3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Replace Store Language Switcher</summary>
|
10 |
+
<description>Replace Store Language Switcher with google translate page</description>
|
11 |
+
<notes>First Stable</notes>
|
12 |
+
<authors><author><name>Ansyori</name><user>ansyori</user><email>ansyori@gmail.com</email></author></authors>
|
13 |
+
<date>2013-04-15</date>
|
14 |
+
<time>04:35:54</time>
|
15 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Ansyori_Autotrans.xml" hash="58f21a676874394522c28b270a0dde26"/></dir></target><target name="magelocal"><dir name="Ansyori"><dir name="Autotrans"><dir name="Block"><file name="Index.php" hash="74ffa0f7c8311fb69a0c6083de99139f"/></dir><dir name="Helper"><file name="Data.php" hash="5c2981e82e1098575ebad2df66712f2e"/></dir><dir name="controllers"><file name="IndexController.php" hash="2e8528334a96da6f17470a301c8df5ff"/></dir><dir name="etc"><file name="adminhtml.xml" hash="9b82c05359448c94ce726fd0a230dbe4"/><file name="config.xml" hash="ccc8b03d8cbfaa823ae906794278e23f"/><file name="system.xml" hash="543e66fb5a32cf24e300ef16339248a1"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="autotrans.xml" hash="2b3b903b46eb7afc4b4bc31078392b98"/></dir><dir name="template"><dir name="autotrans"><file name="index.phtml" hash="a04b8fdbbdc14993ec479c52621925b4"/><file name="meta.phtml" hash="1de1436c5b116700b36da793b9e8da58"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.6.0.0</min><max>1.7.0.2</max></package></required></dependencies>
|
18 |
+
</package>
|