Version Notes
First stable version of our ExtensionsMall Twitter extension.
Download this release
Release Info
Developer | Extensions Mall |
Extension | EMALLTWITTER |
Version | 0.0.1 |
Comparing to | |
See all releases |
Version 0.0.1
- app/code/community/SMDesign/SMDTwitter/Block/Twitter.php +23 -0
- app/code/community/SMDesign/SMDTwitter/Helper/Data.php +3 -0
- app/code/community/SMDesign/SMDTwitter/Helper/Help.php +7 -0
- app/code/community/SMDesign/SMDTwitter/Model/Salute.php +9 -0
- app/code/community/SMDesign/SMDTwitter/Model/System/Config/Source/Load/Options.php +10 -0
- app/code/community/SMDesign/SMDTwitter/etc/adminhtml.xml +22 -0
- app/code/community/SMDesign/SMDTwitter/etc/config.xml +61 -0
- app/code/community/SMDesign/SMDTwitter/etc/system.xml +148 -0
- app/design/frontend/default/default/layout/smdtwitter.xml +8 -0
- app/design/frontend/default/default/template/smdtwitter/twitter.phtml +165 -0
- app/etc/modules/SMDesign_SMDTwitter.xml +9 -0
- package.xml +18 -0
app/code/community/SMDesign/SMDTwitter/Block/Twitter.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class SMDesign_SMDTwitter_Block_twitter extends Mage_Core_Block_Template {
|
3 |
+
function getSomething() {
|
4 |
+
return Mage::getModel('smdtwitter/salute')->getName();
|
5 |
+
}
|
6 |
+
public function getTwitterConfig() {
|
7 |
+
$twitterConfig = array();
|
8 |
+
$twitterConfig['enabled'] = Mage::getStoreConfig('smdesign_smdtwitter/twitter/enabled');
|
9 |
+
$twitterConfig['twitter_feed'] = Mage::getStoreConfig('smdesign_smdtwitter/twitter/twitter_feed');
|
10 |
+
$twitterConfig['twitter_feed_number'] = Mage::getStoreConfig('smdesign_smdtwitter/twitter/twitter_feed_number');
|
11 |
+
$twitterConfig['twitter_box_side'] = Mage::getStoreConfig('smdesign_smdtwitter/twitter/twitter_box_side');
|
12 |
+
$twitterConfig['twitter_box_top_position'] = Mage::getStoreConfig('smdesign_smdtwitter/twitter/twitter_box_top_position');
|
13 |
+
$twitterConfig['twitter_box_width'] = Mage::getStoreConfig('smdesign_smdtwitter/twitter/twitter_box_width');
|
14 |
+
$twitterConfig['twitter_box_height'] = Mage::getStoreConfig('smdesign_smdtwitter/twitter/twitter_box_height');
|
15 |
+
$twitterConfig['twitter_box_background'] = Mage::getStoreConfig('smdesign_smdtwitter/twitter/twitter_box_background');
|
16 |
+
$twitterConfig['twitter_box_color'] = Mage::getStoreConfig('smdesign_smdtwitter/twitter/twitter_box_color');
|
17 |
+
$twitterConfig['twitter_tweets_background'] = Mage::getStoreConfig('smdesign_smdtwitter/twitter/twitter_tweets_background');
|
18 |
+
$twitterConfig['twitter_tweets_color'] = Mage::getStoreConfig('smdesign_smdtwitter/twitter/twitter_tweets_color');
|
19 |
+
$twitterConfig['twitter_tweets_link_color'] = Mage::getStoreConfig('smdesign_smdtwitter/twitter/twitter_tweets_link_color');
|
20 |
+
return $twitterConfig;
|
21 |
+
}
|
22 |
+
}
|
23 |
+
?>
|
app/code/community/SMDesign/SMDTwitter/Helper/Data.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class SMDesign_SMDTwitter_Helper_Data extends Mage_Core_Helper_Abstract {}
|
app/code/community/SMDesign/SMDTwitter/Helper/Help.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class SMDesign_SMDTwitter_Helper_Help extends Mage_Core_Helper_Abstract {
|
4 |
+
function shouldSayHi() {
|
5 |
+
return true;
|
6 |
+
}
|
7 |
+
}
|
app/code/community/SMDesign/SMDTwitter/Model/Salute.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class SMDesign_SMDTwitter_Model_Salute extends Mage_Core_Model_Abstract {
|
4 |
+
//or Varien_Object or none
|
5 |
+
function getName() {
|
6 |
+
//do some heavy logic here
|
7 |
+
return 'John';
|
8 |
+
}
|
9 |
+
}
|
app/code/community/SMDesign/SMDTwitter/Model/System/Config/Source/Load/Options.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class SMDesign_SMDTwitter_Model_System_Config_Source_Load_Options {
|
3 |
+
|
4 |
+
public function toOptionArray() {
|
5 |
+
return array(
|
6 |
+
array('value' => 1, 'label'=>Mage::helper('smdtwitter')->__('Left')),
|
7 |
+
array('value' => 2, 'label'=>Mage::helper('smdtwitter')->__('Right')),
|
8 |
+
);
|
9 |
+
}
|
10 |
+
}
|
app/code/community/SMDesign/SMDTwitter/etc/adminhtml.xml
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<config>
|
2 |
+
<acl>
|
3 |
+
<resources>
|
4 |
+
<admin>
|
5 |
+
<children>
|
6 |
+
<system>
|
7 |
+
<children>
|
8 |
+
<config>
|
9 |
+
<children>
|
10 |
+
<smdesign_smdtwitter translate="title" module="smdtwitter">
|
11 |
+
<title>SMDesign Twitter</title>
|
12 |
+
<sort_order>50</sort_order>
|
13 |
+
</smdesign_smdtwitter>
|
14 |
+
</children>
|
15 |
+
</config>
|
16 |
+
</children>
|
17 |
+
</system>
|
18 |
+
</children>
|
19 |
+
</admin>
|
20 |
+
</resources>
|
21 |
+
</acl>
|
22 |
+
</config>
|
app/code/community/SMDesign/SMDTwitter/etc/config.xml
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<SMDesign_SMDTwitter>
|
5 |
+
<version>0.0.1</version>
|
6 |
+
</SMDesign_SMDTwitter>
|
7 |
+
</modules>
|
8 |
+
|
9 |
+
<global>
|
10 |
+
<models>
|
11 |
+
<smdtwitter>
|
12 |
+
<class>SMDesign_SMDTwitter_Model</class>
|
13 |
+
</smdtwitter>
|
14 |
+
</models>
|
15 |
+
|
16 |
+
<blocks>
|
17 |
+
<smdtwitter>
|
18 |
+
<class>SMDesign_SMDTwitter_Block</class>
|
19 |
+
</smdtwitter>
|
20 |
+
</blocks>
|
21 |
+
|
22 |
+
<helpers>
|
23 |
+
<smdtwitter>
|
24 |
+
<class>SMDesign_SMDTwitter_Helper</class>
|
25 |
+
</smdtwitter>
|
26 |
+
</helpers>
|
27 |
+
</global>
|
28 |
+
|
29 |
+
<frontend>
|
30 |
+
<layout>
|
31 |
+
<updates>
|
32 |
+
<smdtwitter>
|
33 |
+
<file>smdtwitter.xml</file>
|
34 |
+
</smdtwitter>
|
35 |
+
</updates>
|
36 |
+
</layout>
|
37 |
+
</frontend>
|
38 |
+
|
39 |
+
<!-- START DEFAULTS -->
|
40 |
+
<default>
|
41 |
+
<smdesign_smdtwitter>
|
42 |
+
<twitter>
|
43 |
+
<enabled>1</enabled>
|
44 |
+
<twitter_feed>smdesignserbia</twitter_feed>
|
45 |
+
<twitter_feed_number>4</twitter_feed_number>
|
46 |
+
<twitter_box_side>1</twitter_box_side>
|
47 |
+
<twitter_box_top_position>50</twitter_box_top_position>
|
48 |
+
<twitter_box_width>250</twitter_box_width>
|
49 |
+
<twitter_box_height>250</twitter_box_height>
|
50 |
+
<twitter_box_background>#618499</twitter_box_background>
|
51 |
+
<twitter_box_color>#ffffff</twitter_box_color>
|
52 |
+
<twitter_tweets_background>#B6D1E2</twitter_tweets_background>
|
53 |
+
<twitter_tweets_color>#ffffff</twitter_tweets_color>
|
54 |
+
<twitter_tweets_link_color>#496778</twitter_tweets_link_color>
|
55 |
+
|
56 |
+
</twitter>
|
57 |
+
</smdesign_smdtwitter>
|
58 |
+
</default>
|
59 |
+
<!-- END DEFAULTS -->
|
60 |
+
|
61 |
+
</config>
|
app/code/community/SMDesign/SMDTwitter/etc/system.xml
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<smdesign_extensions_config translate="label" module="catalog">
|
5 |
+
<label>SMDesign Extensions Config</label>
|
6 |
+
<sort_order>300</sort_order>
|
7 |
+
</smdesign_extensions_config>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<smdesign_smdtwitter translate="label" module="smdtwitter">
|
11 |
+
<label>SMDesign Twitter</label>
|
12 |
+
<tab>smdesign_extensions_config</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>10</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 |
+
<twitter translate="label">
|
20 |
+
<label>Twitter Settings</label>
|
21 |
+
<frontend_type>text</frontend_type>
|
22 |
+
<sort_order>200</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 |
+
<enabled>
|
28 |
+
<label>Enable Twitter</label>
|
29 |
+
<frontend_type>select</frontend_type>
|
30 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
31 |
+
<sort_order>150</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 SMDTwitter plugin</comment>
|
36 |
+
</enabled>
|
37 |
+
|
38 |
+
<twitter_feed>
|
39 |
+
<label>Twitter Feed</label>
|
40 |
+
<frontend_type>text</frontend_type>
|
41 |
+
<sort_order>155</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 |
+
<comment>Twitter feed</comment>
|
46 |
+
</twitter_feed>
|
47 |
+
|
48 |
+
<twitter_feed_number>
|
49 |
+
<label>Number of Twitter Feeds</label>
|
50 |
+
<frontend_type>text</frontend_type>
|
51 |
+
<sort_order>160</sort_order>
|
52 |
+
<show_in_default>1</show_in_default>
|
53 |
+
<show_in_website>1</show_in_website>
|
54 |
+
<show_in_store>1</show_in_store>
|
55 |
+
<comment>Number of twitter feeds to display, 4 by default</comment>
|
56 |
+
</twitter_feed_number>
|
57 |
+
|
58 |
+
|
59 |
+
<twitter_box_top_position>
|
60 |
+
<label>Twitter Container Top Position</label>
|
61 |
+
<frontend_type>text</frontend_type>
|
62 |
+
<sort_order>163</sort_order>
|
63 |
+
<show_in_default>1</show_in_default>
|
64 |
+
<show_in_website>1</show_in_website>
|
65 |
+
<show_in_store>1</show_in_store>
|
66 |
+
<comment>Twitter Container offset from top of screen</comment>
|
67 |
+
</twitter_box_top_position>
|
68 |
+
|
69 |
+
<twitter_box_side>
|
70 |
+
<label>Twitter Box Side</label>
|
71 |
+
<frontend_type>select</frontend_type>
|
72 |
+
<source_model>smdtwitter/system_config_source_load_options</source_model>
|
73 |
+
<sort_order>163</sort_order>
|
74 |
+
<show_in_default>1</show_in_default>
|
75 |
+
<show_in_website>1</show_in_website>
|
76 |
+
<show_in_store>1</show_in_store>
|
77 |
+
<comment>Select side to display twitter box</comment>
|
78 |
+
</twitter_box_side>
|
79 |
+
|
80 |
+
<twitter_box_width>
|
81 |
+
<label>Twitter Container Width</label>
|
82 |
+
<frontend_type>text</frontend_type>
|
83 |
+
<sort_order>164</sort_order>
|
84 |
+
<show_in_default>1</show_in_default>
|
85 |
+
<show_in_website>1</show_in_website>
|
86 |
+
<show_in_store>1</show_in_store>
|
87 |
+
</twitter_box_width>
|
88 |
+
|
89 |
+
<twitter_box_height>
|
90 |
+
<label>Twitter Container Height</label>
|
91 |
+
<frontend_type>text</frontend_type>
|
92 |
+
<sort_order>165</sort_order>
|
93 |
+
<show_in_default>1</show_in_default>
|
94 |
+
<show_in_website>1</show_in_website>
|
95 |
+
<show_in_store>1</show_in_store>
|
96 |
+
</twitter_box_height>
|
97 |
+
|
98 |
+
<twitter_box_background>
|
99 |
+
<label>Twitter Container Background Color</label>
|
100 |
+
<frontend_type>text</frontend_type>
|
101 |
+
<sort_order>166</sort_order>
|
102 |
+
<show_in_default>1</show_in_default>
|
103 |
+
<show_in_website>1</show_in_website>
|
104 |
+
<show_in_store>1</show_in_store>
|
105 |
+
</twitter_box_background>
|
106 |
+
|
107 |
+
<twitter_box_color>
|
108 |
+
<label>Twitter Container Text Color</label>
|
109 |
+
<frontend_type>text</frontend_type>
|
110 |
+
<sort_order>167</sort_order>
|
111 |
+
<show_in_default>1</show_in_default>
|
112 |
+
<show_in_website>1</show_in_website>
|
113 |
+
<show_in_store>1</show_in_store>
|
114 |
+
</twitter_box_color>
|
115 |
+
|
116 |
+
<twitter_tweets_background>
|
117 |
+
<label>Twitter Tweets Background Color</label>
|
118 |
+
<frontend_type>text</frontend_type>
|
119 |
+
<sort_order>169</sort_order>
|
120 |
+
<show_in_default>1</show_in_default>
|
121 |
+
<show_in_website>1</show_in_website>
|
122 |
+
<show_in_store>1</show_in_store>
|
123 |
+
</twitter_tweets_background>
|
124 |
+
|
125 |
+
<twitter_tweets_color>
|
126 |
+
<label>Twitter Tweets Text Color</label>
|
127 |
+
<frontend_type>text</frontend_type>
|
128 |
+
<sort_order>170</sort_order>
|
129 |
+
<show_in_default>1</show_in_default>
|
130 |
+
<show_in_website>1</show_in_website>
|
131 |
+
<show_in_store>1</show_in_store>
|
132 |
+
</twitter_tweets_color>
|
133 |
+
|
134 |
+
<twitter_tweets_link_color>
|
135 |
+
<label>Twitter Tweets Links Color</label>
|
136 |
+
<frontend_type>text</frontend_type>
|
137 |
+
<sort_order>171</sort_order>
|
138 |
+
<show_in_default>1</show_in_default>
|
139 |
+
<show_in_website>1</show_in_website>
|
140 |
+
<show_in_store>1</show_in_store>
|
141 |
+
</twitter_tweets_link_color>
|
142 |
+
|
143 |
+
</fields>
|
144 |
+
</twitter>
|
145 |
+
</groups>
|
146 |
+
</smdesign_smdtwitter>
|
147 |
+
</sections>
|
148 |
+
</config>
|
app/design/frontend/default/default/layout/smdtwitter.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="content">
|
5 |
+
<block type="smdtwitter/twitter" name="smdtwitter" template="smdtwitter/twitter.phtml" after="-" />
|
6 |
+
</reference>
|
7 |
+
</default>
|
8 |
+
</layout>
|
app/design/frontend/default/default/template/smdtwitter/twitter.phtml
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!--
|
2 |
+
Magento Twitter Extension - SMDTwitter
|
3 |
+
Copyright (C) 2012 SMDesign - www.smdesign.rs/www.extensionsmall.com
|
4 |
+
|
5 |
+
This program is free software: you can redistribute it and/or modify
|
6 |
+
it under the terms of the GNU General Public License as published by
|
7 |
+
the Free Software Foundation, either version 3 of the License, or
|
8 |
+
(at your option) any later version.
|
9 |
+
|
10 |
+
This program is distributed in the hope that it will be useful,
|
11 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
+
GNU General Public License for more details.
|
14 |
+
|
15 |
+
You should have received a copy of the GNU General Public License
|
16 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17 |
+
|
18 |
+
If you like our Extensions please keep the link at the bottom of widget.
|
19 |
+
|
20 |
+
-->
|
21 |
+
|
22 |
+
<?php
|
23 |
+
$twitterConfig = $this->getTwitterConfig();
|
24 |
+
$twitterConfigEnabled = ($twitterConfig['enabled']!='') ? $twitterConfig['enabled'] : '1';
|
25 |
+
$twitterConfigTwitterFeed = ($twitterConfig['twitter_feed']!='') ? $twitterConfig['twitter_feed'] : 'smdesignserbia';
|
26 |
+
$twitterConfigTwitterFeedNumber = ($twitterConfig['twitter_feed_number']!='') ? $twitterConfig['twitter_feed_number'] : '4';
|
27 |
+
$twitterConfigTwitterBoxSide = ($twitterConfig['twitter_box_side']!='') ? $twitterConfig['twitter_box_side'] : '1';
|
28 |
+
$twitterConfigTwitterBoxTopPosition = $twitterConfig['twitter_box_top_position']!='' ? $twitterConfig['twitter_box_top_position'] : '50px';
|
29 |
+
$twitterConfigTwitterBoxWidth = ($twitterConfig['twitter_box_width']!='') ? $twitterConfig['twitter_box_width'] : '300';
|
30 |
+
$twitterConfigTwitterBoxHeight = ($twitterConfig['twitter_box_height']!='') ? $twitterConfig['twitter_box_height'] : '300';
|
31 |
+
$twitterConfigTwitterBoxBackground = ($twitterConfig['twitter_box_background']!='') ? $twitterConfig['twitter_box_background'] : '#333333';
|
32 |
+
$twitterConfigTwitterBoxColor = ($twitterConfig['twitter_box_color']) ? $twitterConfig['twitter_box_color'] : '#ffffff';
|
33 |
+
$twitterConfigTwitterTweetsBackground = ($twitterConfig['twitter_tweets_background']!='') ? $twitterConfig['twitter_tweets_background'] : '#000000';
|
34 |
+
$twitterConfigTwitterTweetsColor = ($twitterConfig['twitter_tweets_color']!='') ? $twitterConfig['twitter_tweets_color'] : '#ffffff';
|
35 |
+
$twitterConfigTwitterTweetsLinkColor = ($twitterConfig['twitter_tweets_link_color']!='') ? $twitterConfig['twitter_tweets_link_color'] : '#4aed05';
|
36 |
+
?>
|
37 |
+
<?php if($twitterConfigEnabled == 1){ ?>
|
38 |
+
<style type="text/css">
|
39 |
+
div.smdtwitter-wraper{
|
40 |
+
position:fixed;
|
41 |
+
top:<?php echo $twitterConfigTwitterBoxTopPosition ?>px;
|
42 |
+
}
|
43 |
+
div.smdtwitter-wraper.left{
|
44 |
+
left:0px;
|
45 |
+
}
|
46 |
+
div.smdtwitter-wraper.right{
|
47 |
+
right:0px;
|
48 |
+
}
|
49 |
+
div#smdtwitter{
|
50 |
+
background: <?php echo $twitterConfigTwitterBoxBackground ?>;
|
51 |
+
float:left;
|
52 |
+
}
|
53 |
+
div#smdtwitter label{
|
54 |
+
padding:5px;
|
55 |
+
color:<?php echo $twitterConfigTwitterTweetsColor ?>;
|
56 |
+
}
|
57 |
+
div#smdtwitter label a{
|
58 |
+
text-decoration:none;
|
59 |
+
color:<?php echo $twitterConfigTwitterTweetsLinkColor ?>;
|
60 |
+
}
|
61 |
+
div#smdtwitter label a:hover{
|
62 |
+
text-decoration:underline;
|
63 |
+
}
|
64 |
+
div.smdtwitter-wraper.left div#smdtwitter{
|
65 |
+
border-radius: 0 10px 10px 0;
|
66 |
+
box-shadow: 3px 3px 10px <?php echo $twitterConfigTwitterBoxBackground ?>;
|
67 |
+
}
|
68 |
+
div.smdtwitter-wraper.right div#smdtwitter{
|
69 |
+
border-radius: 10px 0 10px 10px;
|
70 |
+
box-shadow: -3px 3px 10px <?php echo $twitterConfigTwitterBoxBackground ?>;
|
71 |
+
}
|
72 |
+
#smdtwitter-open{
|
73 |
+
background: <?php echo $twitterConfigTwitterBoxBackground ?>;
|
74 |
+
color:<?php echo $twitterConfigTwitterTweetsColor ?>;
|
75 |
+
display: inline-block;
|
76 |
+
padding: 5px;
|
77 |
+
text-decoration: none;
|
78 |
+
}
|
79 |
+
.smdtwitter-wraper.left #smdtwitter-open{
|
80 |
+
border-radius: 0 5px 0 0;
|
81 |
+
box-shadow: 3px 3px 10px <?php echo $twitterConfigTwitterBoxBackground ?>;
|
82 |
+
}
|
83 |
+
.smdtwitter-wraper.right #smdtwitter-open{
|
84 |
+
border-radius: 5px 0 0 0;
|
85 |
+
box-shadow: -3px 3px 10px <?php echo $twitterConfigTwitterBoxBackground ?>;
|
86 |
+
float: right;
|
87 |
+
}
|
88 |
+
</style>
|
89 |
+
<script>
|
90 |
+
function createCookie(name,value,days) {
|
91 |
+
if (days) {
|
92 |
+
var date = new Date();
|
93 |
+
date.setTime(date.getTime()+(days*24*60*60*1000));
|
94 |
+
var expires = "; expires="+date.toGMTString();
|
95 |
+
}
|
96 |
+
else var expires = "";
|
97 |
+
document.cookie = name+"="+value+expires+"; path=/";
|
98 |
+
}
|
99 |
+
function readCookie(name) {
|
100 |
+
var nameEQ = name + "=";
|
101 |
+
var ca = document.cookie.split(';');
|
102 |
+
for(var i=0;i < ca.length;i++) {
|
103 |
+
var c = ca[i];
|
104 |
+
while (c.charAt(0)==' ') c = c.substring(1,c.length);
|
105 |
+
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
|
106 |
+
}
|
107 |
+
return null;
|
108 |
+
}
|
109 |
+
function eraseCookie(name) {
|
110 |
+
createCookie(name,"",-1);
|
111 |
+
}
|
112 |
+
function setState(){
|
113 |
+
if(readCookie('smdtwitt')==null){
|
114 |
+
createCookie('smdtwitt','hide',1);
|
115 |
+
} else {
|
116 |
+
eraseCookie('smdtwitt');
|
117 |
+
}
|
118 |
+
}
|
119 |
+
function checkCookie() {
|
120 |
+
if(readCookie('smdtwitt')=='hide'){
|
121 |
+
$('smdtwitter').hide();
|
122 |
+
}
|
123 |
+
}
|
124 |
+
</script>
|
125 |
+
|
126 |
+
<div class="smdtwitter-wraper <?php if($twitterConfigTwitterBoxSide==1){ echo('left'); } else { echo('right'); } ;?>" id="smdtwitter-wraper">
|
127 |
+
<a id="smdtwitter-open" onclick="$('smdtwitter').toggle('blind'); setState(); return false;" href="#">Follow us @<?php echo $twitterConfigTwitterFeed ?></a>
|
128 |
+
<br />
|
129 |
+
<div class="smdtwitter" id="smdtwitter">
|
130 |
+
<script charset="utf-8" src="http://widgets.twimg.com/j/2/widget.js"></script>
|
131 |
+
<script>
|
132 |
+
new TWTR.Widget({
|
133 |
+
version: 2,
|
134 |
+
type: 'profile',
|
135 |
+
rpp: <?php echo $twitterConfigTwitterFeedNumber ?>,
|
136 |
+
interval: 30000,
|
137 |
+
width: <?php echo $twitterConfigTwitterBoxWidth ?>,
|
138 |
+
height: <?php echo $twitterConfigTwitterBoxHeight ?>,
|
139 |
+
theme: {
|
140 |
+
shell: {
|
141 |
+
background: '<?php echo $twitterConfigTwitterBoxBackground ?>',
|
142 |
+
color: '<?php echo $twitterConfigTwitterBoxColor ?>'
|
143 |
+
},
|
144 |
+
tweets: {
|
145 |
+
background: '<?php echo $twitterConfigTwitterTweetsBackground ?>',
|
146 |
+
color: '<?php echo $twitterConfigTwitterTweetsColor ?>',
|
147 |
+
links: '<?php echo $twitterConfigTwitterTweetsLinkColor ?>'
|
148 |
+
}
|
149 |
+
},
|
150 |
+
features: {
|
151 |
+
scrollbar: false,
|
152 |
+
loop: false,
|
153 |
+
live: false,
|
154 |
+
behavior: 'all'
|
155 |
+
}
|
156 |
+
}).render().setUser('<?php echo $twitterConfigTwitterFeed ?>').start();
|
157 |
+
</script>
|
158 |
+
<label>Powered by <a href="http://www.extensionsmall.com/" target="_blank">Extensions Mall</a></label>
|
159 |
+
</div>
|
160 |
+
</div>
|
161 |
+
<script>
|
162 |
+
checkCookie();
|
163 |
+
</script>
|
164 |
+
<?php } ?>
|
165 |
+
|
app/etc/modules/SMDesign_SMDTwitter.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<SMDesign_SMDTwitter>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</SMDesign_SMDTwitter>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>EMALLTWITTER</name>
|
4 |
+
<version>0.0.1</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Show your latest tweets on your Magento website using our ExtensionsMall Twitter extension.</summary>
|
10 |
+
<description>With our ExtensionsMall Twitter Extension you can: style the "Latest Tweets Box" to your Magento theme using only Magento Administration, choose where you'd like to show your "Latest Tweets Box" on your Magento website, choose what width and height you&#x2019;d like "Latest Tweets Box" to be and select how many latest tweets you&#x2019;d like to show to the users</description>
|
11 |
+
<notes>First stable version of our ExtensionsMall Twitter extension.</notes>
|
12 |
+
<authors><author><name>SMDesign</name><user>smdesign</user><email>info@smdesign-usa.com</email></author></authors>
|
13 |
+
<date>2012-08-21</date>
|
14 |
+
<time>14:16:35</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="SMDesign"><dir name="SMDTwitter"><dir name="Block"><file name="Twitter.php" hash="5a095967e76f9e1198b02120420aa159"/></dir><dir name="Helper"><file name="Data.php" hash="5806661c52992e2298210c419e6e90a4"/><file name="Help.php" hash="e36870dbe215aa242b54de4a5f3c58c3"/></dir><dir name="Model"><file name="Salute.php" hash="78c806803ab4e30bf586751bef1db58f"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Load"><file name="Options.php" hash="cf5e67f36e394f96d5aeffb200107136"/></dir></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="967355066370bf77f9f6e688fc2ed732"/><file name="config.xml" hash="df7ddfcdf0651914c6e776cc38166f7f"/><file name="system.xml" hash="bdd3979342f275d238aa904bc2080dcc"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="smdtwitter.xml" hash="e8148381f49b99adc388f8d6d59791c7"/></dir><dir name="template"><dir name="smdtwitter"><file name="twitter.phtml" hash="34178263ea1b228a2cd701acd9755c7c"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="SMDesign_SMDTwitter.xml" hash="8fcffa15dab837a2eedc8b4323cc343c"/></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
+
</package>
|