Version Notes
-
Download this release
Release Info
Developer | Magento Core Team |
Extension | ip_googleplusone |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/Ip/Googleplus/Block/Developer.php +65 -0
- app/code/community/Ip/Googleplus/Block/Home.php +101 -0
- app/code/community/Ip/Googleplus/Helper/Data.php +15 -0
- app/code/community/Ip/Googleplus/Model/Source/Language.php +56 -0
- app/code/community/Ip/Googleplus/Model/Source/Size.php +13 -0
- app/code/community/Ip/Googleplus/etc/config.xml +96 -0
- app/code/community/Ip/Googleplus/etc/system.xml +77 -0
- app/design/frontend/base/default/layout/ip_googleplus.xml +23 -0
- app/design/frontend/base/default/template/ip_googleplus/snippet.phtml +6 -0
- app/design/frontend/base/default/template/ip_googleplus/snippet_content.phtml +11 -0
- app/design/frontend/base/default/template/ip_googleplus/snippet_product.phtml +11 -0
- app/etc/modules/Ip_Googleplus.xml +9 -0
- package.xml +20 -0
- skin/frontend/base/default/ip_googleplus/promo.jpg +0 -0
app/code/community/Ip/Googleplus/Block/Developer.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ip_Googleplus_Block_Developer extends Mage_Adminhtml_Block_System_Config_Form_Fieldset {
|
4 |
+
|
5 |
+
public function render(Varien_Data_Form_Element_Abstract $element) {
|
6 |
+
$content = '<p></p>';
|
7 |
+
$content.= '<style>';
|
8 |
+
$content.= '.developer {
|
9 |
+
background:#FAFAFA;
|
10 |
+
border: 1px solid #CCCCCC;
|
11 |
+
margin-bottom: 10px;
|
12 |
+
padding: 10px;
|
13 |
+
height:auto;
|
14 |
+
|
15 |
+
}
|
16 |
+
.developer h3 {
|
17 |
+
color: #EA7601;
|
18 |
+
}
|
19 |
+
.contact-type {
|
20 |
+
color: #EA7601;
|
21 |
+
font-weight:bold;
|
22 |
+
}
|
23 |
+
.developer img {
|
24 |
+
border: 1px solid #CCCCCC;
|
25 |
+
float:left;
|
26 |
+
height:255px;
|
27 |
+
}
|
28 |
+
.developer .info {
|
29 |
+
border: 1px solid #CCCCCC;
|
30 |
+
background:#E7EFEF;
|
31 |
+
padding: 5px 10px 0 5px;
|
32 |
+
margin-left:230px;
|
33 |
+
height:250px;
|
34 |
+
}
|
35 |
+
';
|
36 |
+
$content.= '</style>';
|
37 |
+
|
38 |
+
|
39 |
+
$content.= '<div class="developer">';
|
40 |
+
$content.= '<a href="http://www.proskuryakovs.com/" target="_blank"><img src="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN).'frontend/base/default/ip_googleplus/promo.jpg" alt="www.proskuryakovs.com" /></a>';
|
41 |
+
$content.= '<div class="info">';
|
42 |
+
$content.= '<h3>Magento extensions</h3>';
|
43 |
+
$content.= '<p><a href="http://www.proskuryakovs.com/" target="_blank">www.proskuryakovs.com</a> - experts are specializing in custom extension development for the world\'s fastest growing eCommerce platform - Magento. <br/>';
|
44 |
+
$content.= 'All extensions are designed for the Magento CMS archetecture, using native libraries and only the most efficient approaches to development.<br/>';
|
45 |
+
$content.= 'If you need Magento development or have a concept for an extension you\'d like developed for the Magento CMS platform, please contact us.</br></p>';
|
46 |
+
$content.= '--------------------------------------------------------<br>';
|
47 |
+
$content.= '<span class="contact-type">Website:</span> <a href="http://www.proskuryakovs.com/" target="_blank">www.proskuryakovs.com</a> <br/>';
|
48 |
+
$content.= '<span class="contact-type">E-mail:</span> volgodark@gmail.com <br/>';
|
49 |
+
$content.= '<span class="contact-type">Skype:</span> volgodark <br/>';
|
50 |
+
$content.= '<span class="contact-type">Phone:</span> +7 909389 2222 <br/>';
|
51 |
+
$content.= '<span class="contact-type">Magento:</span> <a href="http://www.magentocommerce.com/magento-connect/developer/developer" target="_blank">visit</a> <br/>';
|
52 |
+
$content.= '<span class="contact-type">Facebook:</span> <a href="http://www.facebook.com/ivan.proskuryakov" target="_blank">visit</a> <br/>';
|
53 |
+
$content.= '<span class="contact-type">LinkedIn:</span> <a href="http://www.linkedin.com/pub/ivan-proskuryakov/31/200/316" target="_blank">visit</a> <br/>';
|
54 |
+
|
55 |
+
$content.= '</div>';
|
56 |
+
|
57 |
+
$content.= '</div>';
|
58 |
+
|
59 |
+
return $content;
|
60 |
+
|
61 |
+
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
}
|
app/code/community/Ip/Googleplus/Block/Home.php
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on July 13, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Ip_Googleplus_Block_Home extends Mage_Catalog_Block_Product_Abstract {
|
12 |
+
|
13 |
+
|
14 |
+
// protected function _construct() {
|
15 |
+
// parent::_construct();
|
16 |
+
// $this->addData(array(
|
17 |
+
// 'cache_lifetime' => 86400,
|
18 |
+
// 'cache_tags' => array('magazentogoogleplus_home'),
|
19 |
+
// ));
|
20 |
+
//
|
21 |
+
// }
|
22 |
+
|
23 |
+
protected function _beforeToHtml() {
|
24 |
+
|
25 |
+
$storeId = Mage::app()->getStore()->getId();
|
26 |
+
$sellDate=$this->getModel()->getSellDate($this->getModel()->getHomepageDaysLimit());
|
27 |
+
$collection = Mage::getResourceModel('reports/product_sold_collection')
|
28 |
+
->addOrderedQty()
|
29 |
+
->setStoreId($storeId)
|
30 |
+
->addStoreFilter($storeId)
|
31 |
+
->setDateRange($sellDate['startdate'], $sellDate['todaydate']) //
|
32 |
+
->addUrlRewrite()
|
33 |
+
->addAttributeToFilter('visibility', array('in' => array(Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)))
|
34 |
+
->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED)
|
35 |
+
->setOrder('ordered_qty', 'desc')
|
36 |
+
->setPageSize($this->getModel()->getHomepageProductsLimit())
|
37 |
+
->setCurPage(1)
|
38 |
+
->setOrder('ordered_qty', 'desc');
|
39 |
+
|
40 |
+
$catId=$this->getModel()->getHomepageCatID();
|
41 |
+
if ($catId>0) {
|
42 |
+
$category = $this->getModel()->getCategory($catId);
|
43 |
+
$collection->addCategoryFilter($category);
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
$this->setProductCollection($collection);
|
48 |
+
return parent::_beforeToHtml();
|
49 |
+
}
|
50 |
+
|
51 |
+
public function getModel() {
|
52 |
+
return Mage::getModel('googleplus/Data');
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
|
61 |
+
|
62 |
+
|
63 |
+
|
64 |
+
|
65 |
+
|
66 |
+
|
67 |
+
|
68 |
+
|
69 |
+
|
70 |
+
// ->setDateRange($sellDate['startdate'], $sellDate['todaydate'])
|
71 |
+
// ->addAttributeToFilter('is_salable')
|
72 |
+
// ->addAttributeToFilter('visibility', array('in' => array(Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)))
|
73 |
+
// ->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED)
|
74 |
+
// ->addSaleableFilterToCollection()
|
75 |
+
// ->addInStockFilterToCollection()
|
76 |
+
// ->addUrlRewrite()
|
77 |
+
//// ->addCategoryFilter($currentCategory)
|
78 |
+
// ->setPageSize($this->getModel()->getHomepageProductsLimit())
|
79 |
+
// ->setCurPage(1)
|
80 |
+
// ->addOrderedQty()
|
81 |
+
// ->setOrder('ordered_qty', 'desc');
|
82 |
+
//
|
83 |
+
|
84 |
+
// ->addAttributeToSelect(array('entity_id', 'name', 'price', 'small_image', 'short_description', 'description', 'type_id', 'status'))
|
85 |
+
// ->addOrderedQty()
|
86 |
+
// ->setStoreId($storeId)
|
87 |
+
// ->addStoreFilter($storeId)
|
88 |
+
//// ->addCategoryFilter($currentCategory)
|
89 |
+
// ->setOrder('ordered_qty', 'desc')
|
90 |
+
// ->setPageSize($this->getModel()->getHomepageProductsLimit())
|
91 |
+
// ->setCurPage(1);
|
92 |
+
//
|
93 |
+
// $collection= array();
|
94 |
+
// foreach ($rawcollection as $product) {
|
95 |
+
//// $addproduct = $product->getData('is_salable');
|
96 |
+
// $collection[]=$product->getData();
|
97 |
+
// }
|
98 |
+
// var_dump($rawcollection);
|
99 |
+
////
|
100 |
+
//
|
101 |
+
// exit();
|
app/code/community/Ip/Googleplus/Helper/Data.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Created on July 13, 2011
|
4 |
+
* Author Ivan Proskuryakov - volgodark@gmail.com - Magazento.com
|
5 |
+
* Copyright Proskuryakov Ivan. Magazento.com © 2011. All Rights Reserved.
|
6 |
+
* Single Use, Limited Licence and Single Use No Resale Licence ["Single Use"]
|
7 |
+
*/
|
8 |
+
?>
|
9 |
+
<?php
|
10 |
+
|
11 |
+
class Ip_Googleplus_Helper_Data extends Mage_Core_Helper_Abstract
|
12 |
+
{
|
13 |
+
|
14 |
+
|
15 |
+
}
|
app/code/community/Ip/Googleplus/Model/Source/Language.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ip_Googleplus_Model_Source_Language {
|
3 |
+
|
4 |
+
public function toOptionArray() {
|
5 |
+
return array(
|
6 |
+
|
7 |
+
array('label' => 'Arabic', 'value' => 'ar'),
|
8 |
+
array('label' => 'Bulgarian', 'value' => 'bg'),
|
9 |
+
array('label' => 'Catalan', 'value' => 'ca'),
|
10 |
+
array('label' => 'Chinese (Simplified)', 'value' => 'zh-CN'),
|
11 |
+
array('label' => 'Chinese (Traditional)', 'value' => 'zh-TW'),
|
12 |
+
array('label' => 'Croatian', 'value' => 'hr'),
|
13 |
+
array('label' => 'Czech', 'value' => 'cs'),
|
14 |
+
array('label' => 'Danish', 'value' => 'da'),
|
15 |
+
array('label' => 'Dutch', 'value' => 'nl'),
|
16 |
+
array('label' => 'English (UK)', 'value' => 'en-GB'),
|
17 |
+
array('label' => 'English (US)', 'value' => 'en-US'),
|
18 |
+
array('label' => 'Estonian', 'value' => 'et'),
|
19 |
+
array('label' => 'Filipino', 'value' => 'fil'),
|
20 |
+
array('label' => 'Finnish', 'value' => 'fi'),
|
21 |
+
array('label' => 'French', 'value' => 'fr'),
|
22 |
+
array('label' => 'German', 'value' => 'de'),
|
23 |
+
array('label' => 'Greek', 'value' => 'el'),
|
24 |
+
array('label' => 'Hebrew', 'value' => 'iw'),
|
25 |
+
array('label' => 'Hindi', 'value' => 'hi'),
|
26 |
+
array('label' => 'Hungarian', 'value' => 'hu'),
|
27 |
+
array('label' => 'Indonesian', 'value' => 'id'),
|
28 |
+
array('label' => 'Italian', 'value' => 'it'),
|
29 |
+
array('label' => 'Japanese', 'value' => 'ja'),
|
30 |
+
array('label' => 'Korean', 'value' => 'ko'),
|
31 |
+
array('label' => 'Latvian', 'value' => 'lv'),
|
32 |
+
array('label' => 'Lithuanian', 'value' => 'lt'),
|
33 |
+
array('label' => 'Malay', 'value' => 'ms'),
|
34 |
+
array('label' => 'Norwegian', 'value' => 'no'),
|
35 |
+
array('label' => 'Persian', 'value' => 'fa'),
|
36 |
+
array('label' => 'Polish', 'value' => 'pl'),
|
37 |
+
array('label' => 'Portuguese (Brazil)', 'value' => 'pt-BR'),
|
38 |
+
array('label' => 'Portuguese (Portugal)', 'value' => 'pt-PT'),
|
39 |
+
array('label' => 'Romanian', 'value' => 'ro'),
|
40 |
+
array('label' => 'Russian', 'value' => 'ru'),
|
41 |
+
array('label' => 'Serbian', 'value' => 'sr'),
|
42 |
+
array('label' => 'Slovak', 'value' => 'sk'),
|
43 |
+
array('label' => 'Slovenian', 'value' => 'sl'),
|
44 |
+
array('label' => 'Spanish', 'value' => 'es'),
|
45 |
+
array('label' => 'Spanish (Latin America)', 'value' => 'es-419'),
|
46 |
+
array('label' => 'Swedish', 'value' => 'sv'),
|
47 |
+
array('label' => 'Thai', 'value' => 'th'),
|
48 |
+
array('label' => 'Turkish', 'value' => 'tr'),
|
49 |
+
array('label' => 'Ukrainian', 'value' => 'uk'),
|
50 |
+
array('label' => 'Vietnamese', 'value' => 'vi')
|
51 |
+
|
52 |
+
|
53 |
+
);
|
54 |
+
}
|
55 |
+
|
56 |
+
}
|
app/code/community/Ip/Googleplus/Model/Source/Size.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ip_Googleplus_Model_Source_Size {
|
3 |
+
|
4 |
+
public function toOptionArray() {
|
5 |
+
return array(
|
6 |
+
array('label' => 'small', 'value' => 'small'),
|
7 |
+
array('label' => 'medium', 'value' => 'medium'),
|
8 |
+
array('label' => 'standard', 'value' => 'standard'),
|
9 |
+
array('label' => 'tall', 'value' => 'tall')
|
10 |
+
);
|
11 |
+
}
|
12 |
+
|
13 |
+
}
|
app/code/community/Ip/Googleplus/etc/config.xml
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Ip_Googleplus>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
</Ip_Googleplus>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<layout>
|
10 |
+
<updates>
|
11 |
+
<googleplus>
|
12 |
+
<file>ip_googleplus.xml</file>
|
13 |
+
</googleplus>
|
14 |
+
</updates>
|
15 |
+
</layout>
|
16 |
+
<translate>
|
17 |
+
<modules>
|
18 |
+
<Ip_Googleplus>
|
19 |
+
<files>
|
20 |
+
<default>Ip_Googleplus.csv</default>
|
21 |
+
</files>
|
22 |
+
</Ip_Googleplus>
|
23 |
+
</modules>
|
24 |
+
</translate>
|
25 |
+
</frontend>
|
26 |
+
|
27 |
+
<global>
|
28 |
+
<models>
|
29 |
+
<googleplus>
|
30 |
+
<class>Ip_Googleplus_Model</class>
|
31 |
+
<resourceModel>googleplus_mysql4</resourceModel>
|
32 |
+
</googleplus>
|
33 |
+
</models>
|
34 |
+
<blocks>
|
35 |
+
<googleplus>
|
36 |
+
<class>Ip_Googleplus_Block</class>
|
37 |
+
</googleplus>
|
38 |
+
</blocks>
|
39 |
+
<helpers>
|
40 |
+
<googleplus>
|
41 |
+
<class>Ip_Googleplus_Helper</class>
|
42 |
+
</googleplus>
|
43 |
+
</helpers>
|
44 |
+
<resources>
|
45 |
+
<googleplus_setup>
|
46 |
+
<setup>
|
47 |
+
<module>Ip_Googleplus</module>
|
48 |
+
</setup>
|
49 |
+
<connection>
|
50 |
+
<use>core_setup</use>
|
51 |
+
</connection>
|
52 |
+
</googleplus_setup>
|
53 |
+
<googleplus_write>
|
54 |
+
<connection>
|
55 |
+
<use>core_write</use>
|
56 |
+
</connection>
|
57 |
+
</googleplus_write>
|
58 |
+
<googleplus_read>
|
59 |
+
<connection>
|
60 |
+
<use>core_read</use>
|
61 |
+
</connection>
|
62 |
+
</googleplus_read>
|
63 |
+
</resources>
|
64 |
+
</global>
|
65 |
+
|
66 |
+
<adminhtml>
|
67 |
+
<acl>
|
68 |
+
<resources>
|
69 |
+
<admin>
|
70 |
+
<children>
|
71 |
+
<system>
|
72 |
+
<children>
|
73 |
+
<config>
|
74 |
+
<children>
|
75 |
+
<googleplus translate="title" module="googleplus">
|
76 |
+
<title>Googleplus</title>
|
77 |
+
</googleplus>
|
78 |
+
</children>
|
79 |
+
</config>
|
80 |
+
</children>
|
81 |
+
</system>
|
82 |
+
</children>
|
83 |
+
</admin>
|
84 |
+
</resources>
|
85 |
+
</acl>
|
86 |
+
</adminhtml>
|
87 |
+
<default>
|
88 |
+
<googleplus>
|
89 |
+
<options>
|
90 |
+
<enable_content>1</enable_content>
|
91 |
+
<enable_product>1</enable_product>
|
92 |
+
<language>en-GB</language>
|
93 |
+
</options>
|
94 |
+
</googleplus>
|
95 |
+
</default>
|
96 |
+
</config>
|
app/code/community/Ip/Googleplus/etc/system.xml
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<ip translate="label">
|
5 |
+
<label>IP</label>
|
6 |
+
<sort_order>0</sort_order>
|
7 |
+
</ip>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<googleplus translate="label" module="googleplus">
|
11 |
+
<label>Google + One</label>
|
12 |
+
<tab>ip</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 |
+
<developer>
|
20 |
+
<frontend_model>googleplus/developer</frontend_model>
|
21 |
+
<sort_order>999</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 |
+
</developer>
|
26 |
+
<options translate="label">
|
27 |
+
<label>Options</label>
|
28 |
+
<frontend_type>text</frontend_type>
|
29 |
+
<sort_order>1</sort_order>
|
30 |
+
<show_in_default>1</show_in_default>
|
31 |
+
<show_in_website>1</show_in_website>
|
32 |
+
<show_in_store>1</show_in_store>
|
33 |
+
<fields>
|
34 |
+
<enable_product translate="label">
|
35 |
+
<label>Enable on product pages</label>
|
36 |
+
<frontend_type>select</frontend_type>
|
37 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
38 |
+
<sort_order>1</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 |
+
</enable_product>
|
43 |
+
<enable_content translate="label">
|
44 |
+
<label>Enable on content pages</label>
|
45 |
+
<frontend_type>select</frontend_type>
|
46 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
47 |
+
<sort_order>1</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 |
+
</enable_content>
|
52 |
+
<language translate="label">
|
53 |
+
<label>Language</label>
|
54 |
+
<frontend_type>select</frontend_type>
|
55 |
+
<comment>The value must be one of the valid language values for the +1 button.</comment>
|
56 |
+
<source_model>googleplus/source_language</source_model>
|
57 |
+
<sort_order>54</sort_order>
|
58 |
+
<show_in_default>1</show_in_default>
|
59 |
+
<show_in_website>1</show_in_website>
|
60 |
+
<show_in_store>1</show_in_store>
|
61 |
+
</language>
|
62 |
+
<size translate="label">
|
63 |
+
<label>Size</label>
|
64 |
+
<frontend_type>select</frontend_type>
|
65 |
+
<comment>+1 button icons will render at four heights: small (15px), medium (20px), standard (24px), and tall (65px). Heights below the smallest supported height render as the smallest supported height. Other heights render the largest icon that will fit, and vertically center that icon in the requested space. Given enough horizontal room, the small and standard buttons will render the total number of +1s for that page. The tall button will always render this number. These are the available button sizes:</comment>
|
66 |
+
<source_model>googleplus/source_size</source_model>
|
67 |
+
<sort_order>54</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 |
+
</size>
|
72 |
+
</fields>
|
73 |
+
</options>
|
74 |
+
</groups>
|
75 |
+
</googleplus>
|
76 |
+
</sections>
|
77 |
+
</config>
|
app/design/frontend/base/default/layout/ip_googleplus.xml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<layout version="0.1.0">
|
4 |
+
<default>
|
5 |
+
<reference name="content">
|
6 |
+
<block type="core/template"
|
7 |
+
before="-"
|
8 |
+
name="ip.googleplus.content"
|
9 |
+
template="ip_googleplus/snippet_content.phtml"
|
10 |
+
/>
|
11 |
+
</reference>
|
12 |
+
</default>
|
13 |
+
<catalog_product_view>
|
14 |
+
<remove name="ip.googleplus.content"/>
|
15 |
+
<reference name="alert.urls">
|
16 |
+
<block type="core/template"
|
17 |
+
after="-"
|
18 |
+
name="ip.googleplus.alert.urls"
|
19 |
+
template="ip_googleplus/snippet_product.phtml"
|
20 |
+
/>
|
21 |
+
</reference>
|
22 |
+
</catalog_product_view>
|
23 |
+
</layout>
|
app/design/frontend/base/default/template/ip_googleplus/snippet.phtml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $language = Mage::getStoreConfig('googleplus/options/language');?>
|
2 |
+
<?php $size = Mage::getStoreConfig('googleplus/options/size');?>
|
3 |
+
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
|
4 |
+
{lang: '<?php echo $language;?>'}
|
5 |
+
</script>
|
6 |
+
<g:plusone size="<?php echo $size;?>"></g:plusone>
|
app/design/frontend/base/default/template/ip_googleplus/snippet_content.phtml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if (Mage::getStoreConfig('googleplus/options/enable_content')) :?>
|
2 |
+
|
3 |
+
|
4 |
+
<?php $language = Mage::getStoreConfig('googleplus/options/language');?>
|
5 |
+
<?php $size = Mage::getStoreConfig('googleplus/options/size');?>
|
6 |
+
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
|
7 |
+
{lang: '<?php echo $language;?>'}
|
8 |
+
</script>
|
9 |
+
<g:plusone size="<?php echo $size;?>"></g:plusone>
|
10 |
+
|
11 |
+
<?php endif;?>
|
app/design/frontend/base/default/template/ip_googleplus/snippet_product.phtml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if (Mage::getStoreConfig('googleplus/options/enable_product')) :?>
|
2 |
+
|
3 |
+
|
4 |
+
<?php $language = Mage::getStoreConfig('googleplus/options/language');?>
|
5 |
+
<?php $size = Mage::getStoreConfig('googleplus/options/size');?>
|
6 |
+
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
|
7 |
+
{lang: '<?php echo $language;?>'}
|
8 |
+
</script>
|
9 |
+
<g:plusone size="<?php echo $size;?>"></g:plusone>
|
10 |
+
|
11 |
+
<?php endif;?>
|
app/etc/modules/Ip_Googleplus.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Ip_Googleplus>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Ip_Googleplus>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>ip_googleplusone</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>OSL</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Add +1 to your pages to help your site stand out.
|
10 |
+
+1 buttons let people who love your content recommend it on Google search.</summary>
|
11 |
+
<description>Adding the +1 button to your site
|
12 |
+
+1 is shorthand for "this is pretty cool" or "you should check this out." Let visitors recommend your pages right in Google search results and help your site stand out.</description>
|
13 |
+
<notes>-</notes>
|
14 |
+
<authors><author><name>volgodark</name><user>auto-converted</user><email>volgodark@gmail.com</email></author></authors>
|
15 |
+
<date>2011-07-13</date>
|
16 |
+
<time>18:23:29</time>
|
17 |
+
<contents><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="ip_googleplus"><file name="promo.jpg" hash="88520d456df68c98130433b5184b8e7f"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="ip_googleplus.xml" hash="35ef3a28695e01393bc864bd993b48f7"/></dir><dir name="template"><dir name="ip_googleplus"><file name="snippet.phtml" hash="d16b8597d0346c526b530bfe5b1ef45b"/><file name="snippet_content.phtml" hash="8b120f7aa36e32baff40468a4ed9914a"/><file name="snippet_product.phtml" hash="f829d741207a6aec68c19d9fe430f0f7"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Ip"><dir name="Googleplus"><dir name="Block"><file name="Developer.php" hash="3e4285d300ebfc2cb08f6da020e61742"/><file name="Home.php" hash="376fafc5595370b79722a32479065a64"/></dir><dir name="etc"><file name="config.xml" hash="5e6285889be4519356565134a891bb72"/><file name="system.xml" hash="c479167aaf4ac08be641802dafa75049"/></dir><dir name="Helper"><file name="Data.php" hash="0d6f9e91610b1565287fa2503e5f2560"/></dir><dir name="Model"><dir name="Source"><file name="Language.php" hash="805c61bf0b3c4996ec9d8a14eeb93a51"/><file name="Size.php" hash="2a62d00c7946c8278820b025bb335048"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ip_Googleplus.xml" hash="c1ad390be3f9ce599fc3785b7bda2b36"/></dir></target></contents>
|
18 |
+
<compatible/>
|
19 |
+
<dependencies/>
|
20 |
+
</package>
|
skin/frontend/base/default/ip_googleplus/promo.jpg
ADDED
Binary file
|