contentplum_widget - Version 1.0.0

Version Notes

Initial version

Download this release

Release Info

Developer Magento Core Team
Extension contentplum_widget
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/local/Contentplum/WidgetInstance/Block/Testimonial.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WidgetInstance block
4
+ *
5
+ * @category Contentplum
6
+ * @package Contentplum_WidgetInstance
7
+ * @author Bhavesh Surani <bhaveshsurani@gmail.com>
8
+ */
9
+
10
+ class Contentplum_WidgetInstance_Block_Testimonial
11
+ extends Mage_Core_Block_Template
12
+ implements Mage_Widget_Block_Interface
13
+ {
14
+ protected $access_code;
15
+
16
+ protected function _beforeToHtml()
17
+ {
18
+ $widgetinstance_id = $this->getData('widgetinstance_id');
19
+
20
+ //$this->access_code = Mage::getStoreConfig('widgetinstance/general/access_code');
21
+ $this->access_code = (rand(100,999).$widgetinstance_id.rand(1000,9999));
22
+
23
+ $this->setTemplate('contentplum_widgetinstance/widget.phtml');
24
+ }
25
+
26
+ public function getAccessCode()
27
+ {
28
+ return $this->access_code;
29
+ }
30
+
31
+ }
app/code/local/Contentplum/WidgetInstance/Helper/Data.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WidgetInstance block
4
+ *
5
+ * @category Contentplum
6
+ * @package Contentplum_WidgetInstance
7
+ * @author Bhavesh Surani <bhaveshsurani@gmail.com>
8
+ */
9
+ class Contentplum_WidgetInstance_Helper_Data extends Mage_Core_Helper_Abstract
10
+ {
11
+
12
+ }
app/code/local/Contentplum/WidgetInstance/Model/System/Config/Source/Widget.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Widget Model
4
+ *
5
+ * @category Contentplum
6
+ * @package Contentplum_WidgetInstance
7
+ * @author Bhavesh Surani <bhaveshsurani@gmail.com>
8
+ */
9
+
10
+ class Contentplum_WidgetInstance_Model_System_Config_Source_Widget
11
+ {
12
+ /*
13
+ * Prepare data for System->Configuration dropdown
14
+ */
15
+ public function toOptionArray()
16
+ {
17
+ $accessCode = Mage::getStoreConfig('widgetinstance/general/access_code');
18
+
19
+ if(!$accessCode)
20
+ return false;
21
+
22
+ $contentplum_url = "https://www.contentplum.com/widgets/".$accessCode.".json";
23
+ $contentplum_rslt = file_get_contents($contentplum_url);
24
+ $objRslts = json_decode($contentplum_rslt);
25
+
26
+ $arrWidgets = array();
27
+
28
+ foreach($objRslts->{'widgets'} as $objRslt){
29
+ $arrWidgets[$objRslt->{'Widget'}->id] = $objRslt->{'Widget'}->title;
30
+ }
31
+ return $arrWidgets;
32
+ }
33
+ }
app/code/local/Contentplum/WidgetInstance/etc/config.xml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Contentplum_WidgetInstance>
5
+ <version>0.1.0</version>
6
+ </Contentplum_WidgetInstance>
7
+ </modules>
8
+ <global>
9
+ <blocks>
10
+ <widgetinstance>
11
+ <class>Contentplum_WidgetInstance_Block</class>
12
+ </widgetinstance>
13
+ </blocks>
14
+ <helpers>
15
+ <widgetinstance>
16
+ <class>Contentplum_WidgetInstance_Helper</class>
17
+ </widgetinstance>
18
+ </helpers>
19
+ <models>
20
+ <widgetinstance>
21
+ <class>Contentplum_WidgetInstance_Model</class>
22
+ </widgetinstance>
23
+ </models>
24
+ <resources>
25
+ <widgetinstance_setup>
26
+ <setup>
27
+ <module>Contentplum_WidgetInstance</module>
28
+ </setup>
29
+ <connection>
30
+ <use>core_setup</use>
31
+ </connection>
32
+ </widgetinstance_setup>
33
+ <widgetinstance_write>
34
+ <connection>
35
+ <use>core_write</use>
36
+ </connection>
37
+ </widgetinstance_write>
38
+ <widgetinstance_read>
39
+ <connection>
40
+ <use>core_read</use>
41
+ </connection>
42
+ </widgetinstance_read>
43
+ </resources>
44
+ </global>
45
+ <frontend>
46
+ <layout>
47
+ <updates>
48
+ <widgetinstance>
49
+ <file>contentplum_widgetinstance.xml</file>
50
+ </widgetinstance>
51
+ </updates>
52
+ </layout>
53
+ </frontend>
54
+ <adminhtml>
55
+ <acl>
56
+ <resources>
57
+ <admin>
58
+ <children>
59
+ <system>
60
+ <children>
61
+ <config>
62
+ <children>
63
+ <widgetinstance translate="title" module="widgetinstance">
64
+ <title>Contentplum Widget</title>
65
+ </widgetinstance>
66
+ </children>
67
+ </config>
68
+ </children>
69
+ </system>
70
+ </children>
71
+ </admin>
72
+ </resources>
73
+ </acl>
74
+ </adminhtml>
75
+ </config>
app/code/local/Contentplum/WidgetInstance/etc/system.xml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <contentplum translate="label">
5
+ <label>Contentplum</label>
6
+ <sort_order>100</sort_order>
7
+ </contentplum>
8
+ </tabs>
9
+ <sections>
10
+ <widgetinstance>
11
+ <label>Contentplum Widget</label>
12
+ <tab>contentplum</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>1000000</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>0</show_in_store>
18
+ <groups>
19
+ <general translate="label" module="widget">
20
+ <label>General Settings</label>
21
+ <sort_order>1</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
+ <access_code translate="label">
27
+ <label>Access Code</label>
28
+ <frontend_type>text</frontend_type>
29
+ <sort_order>11</sort_order>
30
+ <show_in_default>1</show_in_default>
31
+ <show_in_store>1</show_in_store>
32
+ <show_in_website>1</show_in_website>
33
+ <comment><![CDATA[Get Contentplum Access Code by signing up at <a target="_blank" href="http://www.contentplum.com">www.contentplum.com</a>.]]></comment>
34
+ </access_code>
35
+ </fields>
36
+ </general>
37
+ </groups>
38
+ </widgetinstance>
39
+ </sections>
40
+ </config>
app/code/local/Contentplum/WidgetInstance/etc/widget.xml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <widgets>
3
+ <widget type="widgetinstance/testimonial" translate="label description" module="widgetinstance">
4
+ <name>Contentplum Widget</name>
5
+ <description>Select Contentplum.com Widget - Please wait for a moment as system loading contentplum widget instance.</description>
6
+ <parameters>
7
+ <widgetinstance_id translate="label">
8
+ <label>Contentplum Widget Instance</label>
9
+ <type>select</type>
10
+ <required>1</required>
11
+ <visible>1</visible>
12
+ <source_model>widgetinstance/system_config_source_widget</source_model>
13
+ </widgetinstance_id>
14
+ </parameters>
15
+ </widget>
16
+ </widgets>
app/design/frontend/default/default/layout/contentplum_widgetinstance.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <block type="core/text" name="contentplum_js">
6
+ <action method="setText"><text><![CDATA[<script src="https://www.contentplum.com/js/feeds/code.js"></script>]]></text></action>
7
+ </block>
8
+ </reference>
9
+ </default>
10
+ </layout>
app/design/frontend/default/default/template/contentplum_widgetinstance/widget.phtml ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <div id="contentplum_widget_<?php echo $this->getAccessCode() ?>"></div>
2
+ <script type="text/javascript">new contentplum_widget_function('contentplum_widget_<?php echo $this->getAccessCode() ?>','0','1');</script>
3
+
package.xml ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>contentplum_widget</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Contentplum increases user engagement, sharing and trust by integrating social feeds and testimonials</summary>
10
+ <description>&lt;h2&gt; &lt;b&gt; Contentplum: Most powerful tool to integrate social feeds, RSS feeds, web articles and Testimonials to your store &lt;/b&gt; &lt;/h2&gt;&#xD;
11
+ &#xD;
12
+ &#xD;
13
+ &lt;ul&gt;&#xD;
14
+ &lt;li&gt; &#xD;
15
+ &lt;b&gt; Increase user engagement and sharing by displaying curated social content from Facebook, Twitter, Instagram and other social networks &lt;/b&gt;&#xD;
16
+ &lt;/li&gt;&#xD;
17
+ &lt;li&gt; &#xD;
18
+ &lt;b&gt; Provide social proof at various conversion points by displaying Testimonials from your most influential and loyal customers&lt;/b&gt;&#xD;
19
+ &lt;/li&gt;&#xD;
20
+ &lt;li&gt; &#xD;
21
+ &lt;b&gt;&#xD;
22
+ Blend your merchandize with your customer Twitter, Facebook social posts and instagram photos.&lt;/b&gt;&#xD;
23
+ &lt;/li&gt;&#xD;
24
+ &lt;/ul&gt;&#xD;
25
+ &#xD;
26
+ &lt;h3&gt; Contentplum can be used for.. &lt;/h3&gt;&#xD;
27
+ &lt;ul&gt;&#xD;
28
+ &lt;li&gt; &lt;b&gt; Social HUB - &lt;/b&gt;&#xD;
29
+ Create socially interactive and engaging experience by bringing all your social conversations from different social media back to your store&#xD;
30
+ &lt;/li&gt;&#xD;
31
+ &lt;li&gt; &lt;b&gt; Contests - &lt;/b&gt;&#xD;
32
+ Create hashtag contests. All your customer tweets and photos with that hashtag will directly show up on your store. Expect your customer shout out to get featured on your store.&#xD;
33
+ &lt;/li&gt; &#xD;
34
+ &lt;li&gt; &lt;b&gt; Testimonials - &lt;/b&gt;&#xD;
35
+ Manually add and collect testimonials. Curate social posts into testimonials. Display most relevant testimonial at the right place on your store&#xD;
36
+ &lt;/li&gt;&#xD;
37
+ &lt;li&gt; &lt;b&gt; Gallery - &lt;/b&gt;&#xD;
38
+ Collect photos shared on twitter and instagram with specific search term and show right below your product or on separate gallery page &#xD;
39
+ &lt;/li&gt;&#xD;
40
+ &lt;/ul&gt;&#xD;
41
+ &lt;h2&gt; Features &lt;/h2&gt;&#xD;
42
+ &lt;ul&gt; &#xD;
43
+ &lt;li&gt; &lt;h3&gt; &lt;b&gt; Add</description>
44
+ <notes>Initial version</notes>
45
+ <authors><author><name>contentplum</name><user>auto-converted</user><email>ravish@contentplum.com</email></author></authors>
46
+ <date>2014-04-02</date>
47
+ <time>17:52:28</time>
48
+ <contents><target name="magelocal"><dir name="Contentplum"><dir name="WidgetInstance"><dir name="Block"><file name="Testimonial.php" hash="4e6be2b974cf0c5cf54c5ee295921d31"/></dir><dir name="Helper"><file name="Data.php" hash="30ea16be51bacfcf5eec1287dbbb45a8"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Widget.php" hash="46ca6fed08561dad7087ef7b1701b85a"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="2f19d84543780e3b484979fdf050a9fd"/><file name="system.xml" hash="415c3e0c81127996ceead34d1c12b58e"/><file name="widget.xml" hash="e2be4dea749fdad59cfac03a438f1134"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="contentplum_widgetinstance"><file name="widget.phtml" hash="2462af8a3e8adea785ab9b36b3d03ee8"/></dir></dir><dir name="layout"><file name="contentplum_widgetinstance.xml" hash="88911f52bda51e8e70be13ff79c258d5"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="."><file name="Contentplum_WidgetInstance.xml" hash=""/></dir></target></contents>
49
+ <compatible/>
50
+ <dependencies/>
51
+ </package>