Eke_Ogmeta - Version 0.1.0

Version Notes

Initial release of og meta data integration module.

Download this release

Release Info

Developer Eke Digital
Extension Eke_Ogmeta
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

app/code/community/Eke/Ogmeta/Helper/Data.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Eke_Ogmeta_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ public function isOgMetaEnabled()
5
+ {
6
+ return Mage::getStoreConfig("eke_ogmeta/og/enabled");
7
+ }
8
+
9
+ public function getOgImage()
10
+ {
11
+ return Mage::getStoreConfig("eke_ogmeta/og/image");
12
+ }
13
+
14
+ public function getSiteName()
15
+ {
16
+ return Mage::getStoreConfig("eke_ogmeta/og/sitename");
17
+ }
18
+
19
+ }
app/code/community/Eke/Ogmeta/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
+ <eke_ogmeta>
12
+ <title>Eke Digital OG Meta Data</title>
13
+ <sort_order>990</sort_order>
14
+ </eke_ogmeta>
15
+ </children>
16
+ </config>
17
+ </children>
18
+ </system>
19
+ </children>
20
+ </admin>
21
+ </resources>
22
+ </acl>
23
+ </config>
app/code/community/Eke/Ogmeta/etc/config.xml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Eke_Ogmeta>
5
+ <version>0.1.0</version>
6
+ </Eke_Ogmeta>
7
+ </modules>
8
+ <global>
9
+ <models>
10
+ <eke_ogmeta>
11
+ <class>Eke_Ogmeta_Model</class>
12
+ <resourceModel>eke_ogmeta_resource</resourceModel>
13
+ </eke_ogmeta>
14
+ <eke_ogmeta_resource>
15
+ <class>Eke_Ogmeta_Model_Resource</class>
16
+ </eke_ogmeta_resource>
17
+ </models>
18
+ <blocks>
19
+ <eke_ogmeta>
20
+ <class>Eke_Ogmeta_Block</class>
21
+ </eke_ogmeta>
22
+ </blocks>
23
+ <helpers>
24
+ <eke_ogmeta>
25
+ <class>Eke_Ogmeta_Helper</class>
26
+ </eke_ogmeta>
27
+ </helpers>
28
+ </global>
29
+ <frontend>
30
+ <layout>
31
+ <updates>
32
+ <eke_ogmeta>
33
+ <file>eke_ogmeta.xml</file>
34
+ </eke_ogmeta>
35
+ </updates>
36
+ </layout>
37
+ </frontend>
38
+ <default>
39
+ <eke_ogmeta>
40
+ <og>
41
+ <enabled>0</enabled>
42
+ </og>
43
+ </eke_ogmeta>
44
+ </default>
45
+ </config>
app/code/community/Eke/Ogmeta/etc/system.xml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <eke>
5
+ <label>EKE DIGITAL</label>
6
+ <sort_order>100</sort_order>
7
+ </eke>
8
+ </tabs>
9
+ <sections>
10
+ <eke_ogmeta translate="label">
11
+ <label>Open Graph Meta Data</label>
12
+ <tab>eke</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>100</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
+ <og translate="label">
20
+ <label>Configuration</label>
21
+ <show_in_default>1</show_in_default>
22
+ <show_in_website>1</show_in_website>
23
+ <show_in_store>1</show_in_store>
24
+ <sort_order>1</sort_order>
25
+ <fields>
26
+ <enabled translate="label" module="eke_ogmeta">
27
+ <label>Enable</label>
28
+ <frontend_type>select</frontend_type>
29
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
30
+ <sort_order>10</sort_order>
31
+ <show_in_default>1</show_in_default>
32
+ <show_in_website>1</show_in_website>
33
+ <show_in_store>1</show_in_store>
34
+ </enabled>
35
+ <image translate="label" module="eke_ogmeta">
36
+ <label>Default OG Meta Image</label>
37
+ <frontend_type>text</frontend_type>
38
+ <sort_order>20</sort_order>
39
+ <show_in_default>1</show_in_default>
40
+ <show_in_website>1</show_in_website>
41
+ <show_in_store>1</show_in_store>
42
+ </image>
43
+ <sitename translate="label" module="eke_ogmeta">
44
+ <label>Site Name</label>
45
+ <frontend_type>text</frontend_type>
46
+ <sort_order>20</sort_order>
47
+ <show_in_default>1</show_in_default>
48
+ <show_in_website>1</show_in_website>
49
+ <show_in_store>1</show_in_store>
50
+ </sitename>
51
+ </fields>
52
+ </og>
53
+ </groups>
54
+ </eke_ogmeta>
55
+ </sections>
56
+ </config>
app/design/frontend/base/default/layout/eke_ogmeta.xml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <cms_index_index>
4
+ <reference name="head">
5
+ <block type="core/template" template="eke/ogmeta/home.phtml" />
6
+ </reference>
7
+ </cms_index_index>
8
+
9
+ <catalog_category_view>
10
+ <reference name="head">
11
+ <block type="core/template" template="eke/ogmeta/category.phtml" />
12
+ </reference>
13
+ </catalog_category_view>
14
+
15
+
16
+ <catalog_product_view>
17
+ <reference name="head">
18
+ <block type="core/template" template="eke/ogmeta/product.phtml" />
19
+ </reference>
20
+ </catalog_product_view>
21
+
22
+ <cms_page_view>
23
+ <reference name="head">
24
+ <block type="core/template" template="eke/ogmeta/cms.phtml" />
25
+ </reference>
26
+ </cms_page_view>
27
+
28
+ <contacts_index_index>
29
+ <reference name="head">
30
+ <block type="core/template" template="eke/ogmeta/cms.phtml" />
31
+ </reference>
32
+ </contacts_index_index>
33
+
34
+ <blog_index_list>
35
+ <reference name="head">
36
+ <block type="core/template" template="eke/ogmeta/blog.phtml" />
37
+ </reference>
38
+ </blog_index_list>
39
+
40
+ <blog_post_view>
41
+ <reference name="head">
42
+ <block type="core/template" template="eke/ogmeta/blog_post.phtml" />
43
+ </reference>
44
+ </blog_post_view>
45
+ </layout>
app/design/frontend/base/default/template/eke/ogmeta/blog.phtml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $helper = Mage::helper("eke_ogmeta");
3
+ if (!$helper->isOgMetaEnabled()) {
4
+ return;
5
+ }
6
+ $image = $helper->getOgImage();
7
+ $siteName = $helper->getSiteName();
8
+ ?>
9
+
10
+ <!-- OG META Data -->
11
+ <meta property="og:title" content="<?php echo $this->getLayout()->getBlock('head')->getTitle(); ?>" />
12
+ <meta property="og:site_name" content="<?php echo $siteName; ?>" />
13
+ <meta property="og:type" content="website" />
14
+ <meta property="og:url" content="<?php echo $this->helper('core/url')->getCurrentUrl(); ?>" />
15
+ <meta property="og:image" content="<?php echo $image; ?>" />
16
+ <meta property="og:description" content="<?php echo $this->getLayout()->getBlock('head')->getDescription(); ?>" />
17
+
app/design/frontend/base/default/template/eke/ogmeta/blog_post.phtml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $helper = Mage::helper("eke_ogmeta");
3
+ if (!$helper->isOgMetaEnabled()) {
4
+ return;
5
+ }
6
+ $image = $helper->getOgImage();
7
+ $siteName = $helper->getSiteName();
8
+ ?>
9
+
10
+ <!-- OG META Data -->
11
+ <meta property="og:title" content="<?php echo $this->getLayout()->getBlock('head')->getTitle(); ?>" />
12
+ <meta property="og:site_name" content="<?php echo $siteName; ?>" />
13
+ <meta property="og:type" content="article" />
14
+ <meta property="og:url" content="<?php echo $this->helper('core/url')->getCurrentUrl(); ?>" />
15
+ <meta property="og:image" content="<?php echo $image; ?>" />
16
+ <meta property="og:description" content="<?php echo $this->getLayout()->getBlock('head')->getDescription(); ?>" />
17
+
app/design/frontend/base/default/template/eke/ogmeta/category.phtml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $helper = Mage::helper("eke_ogmeta");
3
+ if (!$helper->isOgMetaEnabled()) {
4
+ return;
5
+ }
6
+ $image = $helper->getOgImage();
7
+ $siteName = $helper->getSiteName();
8
+ ?>
9
+
10
+ <!-- OG META Data -->
11
+ <meta property="og:title" content="<?php echo $this->getLayout()->getBlock('head')->getTitle(); ?>" />
12
+ <meta property="og:site_name" content="<?php echo $siteName; ?>" />
13
+ <meta property="og:type" content="product.group" />
14
+ <meta property="og:url" content="<?php echo $this->helper('core/url')->getCurrentUrl(); ?>" />
15
+ <meta property="og:description" content="<?php echo $this->getLayout()->getBlock('head')->getDescription(); ?>" />
16
+ <meta property="og:image" content="<?php echo $image; ?>" />
17
+
app/design/frontend/base/default/template/eke/ogmeta/cms.phtml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $helper = Mage::helper("eke_ogmeta");
3
+ if (!$helper->isOgMetaEnabled()) {
4
+ return;
5
+ }
6
+ $image = $helper->getOgImage();
7
+ $siteName = $helper->getSiteName();
8
+ ?>
9
+
10
+ <!-- OG META Data -->
11
+ <meta property="og:title" content="<?php echo $this->getLayout()->getBlock('head')->getTitle(); ?>" />
12
+ <meta property="og:site_name" content="<?php echo $siteName; ?>" />
13
+ <meta property="og:type" content="website" />
14
+ <meta property="og:url" content="<?php echo $this->helper('core/url')->getCurrentUrl(); ?>" />
15
+ <meta property="og:image" content="<?php echo $image; ?>" />
16
+ <meta property="og:description" content="<?php echo $this->getLayout()->getBlock('head')->getDescription(); ?>" />
17
+
app/design/frontend/base/default/template/eke/ogmeta/home.phtml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $helper = Mage::helper("eke_ogmeta");
3
+ if (!$helper->isOgMetaEnabled()) {
4
+ return;
5
+ }
6
+ $image = $helper->getOgImage();
7
+ $siteName = $helper->getSiteName();
8
+ ?>
9
+
10
+ <!-- OG META Data -->
11
+ <meta property="og:title" content="<?php echo $this->getLayout()->getBlock('head')->getTitle(); ?>" />
12
+ <meta property="og:site_name" content="<?php echo $siteName; ?>" />
13
+ <meta property="og:type" content="website" />
14
+ <meta property="og:url" content="<?php echo $this->helper('core/url')->getCurrentUrl(); ?>" />
15
+ <meta property="og:image" content="<?php echo $image; ?>" />
16
+ <meta property="og:description" content="<?php echo $this->getLayout()->getBlock('head')->getDescription(); ?>" />
17
+
app/design/frontend/base/default/template/eke/ogmeta/product.phtml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $helper = Mage::helper("eke_ogmeta");
3
+ if (!$helper->isOgMetaEnabled()) {
4
+ return;
5
+ }
6
+ $siteName = $helper->getSiteName();
7
+ $product = Mage::registry('current_product');
8
+ ?>
9
+
10
+ <!-- OG META Product Data -->
11
+ <meta property="og:title" content="<?php echo $this->getLayout()->getBlock('head')->getTitle(); ?>" />
12
+ <meta property="og:site_name" content="<?php echo $siteName; ?>" />
13
+ <meta property="og:type" content="product" />
14
+ <meta property="og:url" content="<?php echo $this->helper('core/url')->getCurrentUrl(); ?>" />
15
+ <meta property="og:image" content="<?php echo $product->getImageUrl(); ?>" />
16
+ <meta property="og:description" content="<?php echo strip_tags($product->getDescription()); ?>" />
17
+
app/etc/modules/Eke_Ogmeta.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Eke_Ogmeta>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </Eke_Ogmeta>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Eke_Ogmeta</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>Social sharing og meta data integration extension for Magento.</summary>
10
+ <description>This extension adds page meta data in order to accurately show page content when sharing via social widgets and sites.</description>
11
+ <notes>Initial release of og meta data integration module.</notes>
12
+ <authors><author><name>Eke Digital</name><user>ekedigital</user><email>dane@ekedigital.com</email></author></authors>
13
+ <date>2016-09-18</date>
14
+ <time>00:18:11</time>
15
+ <contents><target name="magecommunity"><dir name="Eke"><dir name="Ogmeta"><dir name="Helper"><file name="Data.php" hash="df103d102fe0acb19693e1b2a0656677"/></dir><dir name="etc"><file name="adminhtml.xml" hash="982fbe059f750444ae947a8dcf8f208e"/><file name="config.xml" hash="6cbf18b2104aef6d99464263ab3a2f12"/><file name="system.xml" hash="5f145a9b07f4b5cbd42688f9cb3ca476"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="eke"><dir name="ogmeta"><file name="blog.phtml" hash="060f0a777846496883441c2075860981"/><file name="blog_post.phtml" hash="9ac3af92d391d213321e129054370a98"/><file name="category.phtml" hash="cb9b73a4c5ba10f92f205a64d2d7d5ef"/><file name="cms.phtml" hash="060f0a777846496883441c2075860981"/><file name="home.phtml" hash="060f0a777846496883441c2075860981"/><file name="product.phtml" hash="88aea7d886063345cdefe95df91d3c11"/></dir></dir></dir><dir name="layout"><file name="eke_ogmeta.xml" hash="23f069d209cf28c6f5cc2ee0eaaced5d"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eke_Ogmeta.xml" hash="0db8296bd9d9b8fd76bbced04845d67b"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>Mage_Core_Helper_Abstract</name><channel>community</channel><min>1.6</min><max>1.9</max></package></required></dependencies>
18
+ </package>