Latest_Twitter_Tweets - Version 1.0.1

Version Notes

Version: 1.0.1
Feature Added:
*Twitter Feed With Feed Images.

Download this release

Release Info

Developer Team Vivacity
Extension Latest_Twitter_Tweets
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/local/Vivacity/Tweets/Block/Tweets.php CHANGED
@@ -132,11 +132,10 @@ class Vivacity_Tweets_Block_Tweets extends Mage_Core_Block_Template
132
  $t = array();
133
  $i = 0;
134
 
135
- //echo "<pre>";
136
- //print_r($tweets);
137
- //exit;
138
  foreach($tweets as $tweet)
139
- {
 
140
  $text = $tweet->text;
141
  $urls = $tweet->entities->urls;
142
  $mentions = $tweet->entities->user_mentions;
@@ -167,6 +166,7 @@ class Vivacity_Tweets_Block_Tweets extends Mage_Core_Block_Template
167
  $t[$i]["user_image"] = $tweet->user->profile_image_url;
168
  $t[$i]["tweet"] = trim($this->changeLink($text, $this->getTagPref(), $this->getNoFollow(), $this->getNewWindow()));
169
  $t[$i]["time"] = trim($this->getTimeAgo($tweet->created_at));
 
170
  $i++;
171
  }
172
  return $t;
132
  $t = array();
133
  $i = 0;
134
 
135
+
 
 
136
  foreach($tweets as $tweet)
137
+
138
+ {
139
  $text = $tweet->text;
140
  $urls = $tweet->entities->urls;
141
  $mentions = $tweet->entities->user_mentions;
166
  $t[$i]["user_image"] = $tweet->user->profile_image_url;
167
  $t[$i]["tweet"] = trim($this->changeLink($text, $this->getTagPref(), $this->getNoFollow(), $this->getNewWindow()));
168
  $t[$i]["time"] = trim($this->getTimeAgo($tweet->created_at));
169
+ $t[$i]["url"] = $tweet->entities->media[0]->media_url;
170
  $i++;
171
  }
172
  return $t;
app/code/local/Vivacity/Tweets/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Vivacity_Tweets>
5
- <version>1.0.0</version>
6
  </Vivacity_Tweets>
7
  </modules>
8
  <frontend>
2
  <config>
3
  <modules>
4
  <Vivacity_Tweets>
5
+ <version>1.0.1</version>
6
  </Vivacity_Tweets>
7
  </modules>
8
  <frontend>
app/code/local/Vivacity/Tweets/etc/config.xml~ ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Vivacity_Tweets>
5
+ <version>1.0.1</version>
6
+ </Vivacity_Tweets>
7
+ </modules>
8
+ <frontend>
9
+ <layout>
10
+ <updates>
11
+ <tweets>
12
+ <file>vivacity_tweets.xml</file>
13
+ </tweets>
14
+ </updates>
15
+ </layout>
16
+ </frontend>
17
+ <global>
18
+ <models>
19
+ <tweets>
20
+ <class>Vivacity_Tweets_Model</class>
21
+ <resourceModel>Tweets_mysql4</resourceModel>
22
+ </tweets>
23
+ <tweets_adminhtml>
24
+ <class>Vivacity_Tweets_Model_Adminhtml</class>
25
+ </tweets_adminhtml>
26
+ <tweets_mysql4>
27
+ <class>Vivacity_Tweets_Model_Mysql4</class>
28
+ <entities>
29
+ <tweets>
30
+ <table>tweets</table>
31
+ </tweets>
32
+ </entities>
33
+ </tweets_mysql4>
34
+ </models>
35
+ <resources>
36
+ <vivacity_tweets_setup>
37
+ <setup>
38
+ <module>Vivacity_Tweets</module>
39
+ </setup>
40
+ <connection>
41
+ <use>core_setup</use>
42
+ </connection>
43
+ </vivacity_tweets_setup>
44
+ </resources>
45
+ <blocks>
46
+ <tweets>
47
+ <class>Vivacity_Tweets_Block</class>
48
+ </tweets>
49
+ </blocks>
50
+ <helpers>
51
+ <tweets>
52
+ <class>Vivacity_Tweets_Helper</class>
53
+ </tweets>
54
+ </helpers>
55
+ </global>
56
+ <default>
57
+ <tweets>
58
+ <twittersettings>
59
+ <active>0</active>
60
+ <twitterid>vivacityIT</twitterid>
61
+ </twittersettings>
62
+ <displaysettings>
63
+ <showright>1</showright>
64
+ <numberoftweets>3</numberoftweets>
65
+ <showlinks>1</showlinks>
66
+ <usenofollow>1</usenofollow>
67
+ <opennew>1</opennew>
68
+ <attags>1</attags>
69
+ <hashtags>1</hashtags>
70
+ <showfollow>1</showfollow>
71
+ </displaysettings>
72
+ </tweets>
73
+ </default>
74
+ <adminhtml>
75
+ <acl>
76
+ <resources>
77
+ <all>
78
+ <title>Allow Everything</title>
79
+ </all>
80
+ <admin>
81
+ <children>
82
+ <system>
83
+ <children>
84
+ <config>
85
+ <children>
86
+ <tweets>
87
+ <title>vivacityGroup - Latest Tweets</title>
88
+ </tweets>
89
+ </children>
90
+ </config>
91
+ </children>
92
+ </system>
93
+ </children>
94
+ </admin>
95
+ </resources>
96
+ </acl>
97
+ </adminhtml>
98
+ </config>
app/design/frontend/base/default/template/vivacity/tweets/blank.phtml CHANGED
@@ -17,6 +17,9 @@
17
  <span style="float:left;padding-left:5px;"><?php echo (string) trim($tweet["user_name"]); ?><br/><?php echo $tweet["screen_name"]; ?></span></p>
18
  <p style="clear:both;padding-top:2px;">
19
  <?php echo (string) trim($tweet["tweet"]); ?></p>
 
 
 
20
  <span class="tweetSeprator"> - <?php echo (string) trim($tweet["time"]); ?></span>
21
  </li>
22
  <?php endforeach; ?>
17
  <span style="float:left;padding-left:5px;"><?php echo (string) trim($tweet["user_name"]); ?><br/><?php echo $tweet["screen_name"]; ?></span></p>
18
  <p style="clear:both;padding-top:2px;">
19
  <?php echo (string) trim($tweet["tweet"]); ?></p>
20
+ <?php if(isset($tweet["url"]) && !empty($tweet["url"])){ ?>
21
+ <img src="<?php echo $tweet["url"] ?>" >
22
+ <?php } ?>
23
  <span class="tweetSeprator"> - <?php echo (string) trim($tweet["time"]); ?></span>
24
  </li>
25
  <?php endforeach; ?>
app/design/frontend/base/default/template/vivacity/tweets/tweets.phtml CHANGED
@@ -19,7 +19,11 @@
19
  <span style="float:left;padding-left:5px;"><?php echo (string) trim($tweet["user_name"]); ?><br/><?php echo $tweet["screen_name"]; ?></span></p>
20
  <p style="clear:both;padding-top:2px;">
21
  <?php echo (string) trim($tweet["tweet"]); ?></p>
 
 
 
22
  <span class="tweetSeprator"> - <?php echo (string) trim($tweet["time"]); ?></span>
 
23
  </li>
24
  <?php endforeach; ?>
25
  </ul>
19
  <span style="float:left;padding-left:5px;"><?php echo (string) trim($tweet["user_name"]); ?><br/><?php echo $tweet["screen_name"]; ?></span></p>
20
  <p style="clear:both;padding-top:2px;">
21
  <?php echo (string) trim($tweet["tweet"]); ?></p>
22
+ <?php if(isset($tweet["url"]) && !empty($tweet["url"])){ ?>
23
+ <img src="<?php echo $tweet["url"] ?>" >
24
+ <?php } ?>
25
  <span class="tweetSeprator"> - <?php echo (string) trim($tweet["time"]); ?></span>
26
+
27
  </li>
28
  <?php endforeach; ?>
29
  </ul>
package.xml CHANGED
@@ -1,18 +1,20 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Latest_Twitter_Tweets</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
- <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Latest Tweets for your Magento store featuring with new oAuth standards for Twitter API 1.1</summary>
10
  <description>Latest Twitter Tweets Magento Extension will show your latest twitter feeds in your Magento Site with regular updates from your twitter account with the latest Twitter Auth Token Standard.</description>
11
- <notes>Initial release </notes>
 
 
12
  <authors><author><name>Team Vivacity</name><user>vivacityinfotec</user><email>vivacityinfotech.jaipur@gmail.com</email></author></authors>
13
- <date>2014-06-13</date>
14
- <time>13:14:11</time>
15
- <contents><target name="mageetc"><dir name="modules"><file name="Vivacity_Tweets.xml" hash="e3b450f28cf21ed1056cdf68d1d7811e"/></dir></target><target name="magelocal"><dir name="Vivacity"><dir name="Tweets"><dir><dir name="Block"><file name="Tweets.php" hash="da5feb63161bda3545bb84b9d799d2ef"/></dir><dir name="etc"><file name="adminhtml.xml" hash="b242f66673c5cd00bf581b0d7f4d88fa"/><file name="config.xml" hash="74a3722526786c19cb3a4165263b1c0d"/><file name="system.xml" hash="eec3bade8724fc810dc13e5ebfd25ced"/></dir><dir name="Helper"><file name="Data.php" hash="f959da36381aa0528fa2b5404626f942"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Display.php" hash="95b0b1b5732149238ec4edee9793ae7e"/><file name="Numbers.php" hash="23a9976e4de10cf24a584922700a7c4f"/></dir></dir></dir></dir><file name="Layout.php" hash="da2fce86bc98f9e6a4224199017f6fdb"/><dir name="System"><dir name="Config"><file name="Position.php" hash="10943070e8df75f53c1de073122572f5"/></dir></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="vivacity_tweets.xml" hash="861329ee0c4423e97c1f769adf57b40d"/></dir><dir name="template"><dir name="vivacity"><dir><dir name="tweets"><file name="blank.phtml" hash="ef77c64a5c6b27810e34e3729d690e79"/><file name="tweets.phtml" hash="52b8c2221e8d17477e81e0d863a2dbd4"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="vivacity_tweets.css" hash="9df156f870a8fb064d84f6d09ff2570a"/><file name="font-awesome.css" hash="e4e5f0ff7d97d2851d8f06c26a4e302b"/><file name="font-awesome.min.css" hash="bbfef9385083d307ad2692c0cf99f611"/></dir><dir name="fonts"><file name="FontAwesome.otf" hash="3f3a623e88cb5c62eaa2367195e98b67"/><file name="fontawesome-webfont.eot" hash="8b27bc96115c2d24350f0d09e6a9433f"/><file name="fontawesome-webfont.svg" hash="0a799148a50bb02c6f380eabd8d97559"/><file name="fontawesome-webfont.ttf" hash="dcb26c7239d850266941e80370e207c1"/><file name="fontawesome-webfont.woff" hash="3293616ec0c605c7c2db25829a0a509e"/></dir></dir></dir></dir></target><target name="magelib"><dir name="twitteroauth"><file name="OAuth.php" hash="d7b40029f9d61580663a04727d166156"/><file name="twitteroauth.php" hash="c329e25121783a292524acaea23bb28d"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>2.0.1</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Latest_Twitter_Tweets</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
+ <license>OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Latest Tweets for your Magento store featuring with new oAuth standards for Twitter API 1.1</summary>
10
  <description>Latest Twitter Tweets Magento Extension will show your latest twitter feeds in your Magento Site with regular updates from your twitter account with the latest Twitter Auth Token Standard.</description>
11
+ <notes>Version: 1.0.1&#xD;
12
+ Feature Added:&#xD;
13
+ *Twitter Feed With Feed Images.</notes>
14
  <authors><author><name>Team Vivacity</name><user>vivacityinfotec</user><email>vivacityinfotech.jaipur@gmail.com</email></author></authors>
15
+ <date>2015-10-17</date>
16
+ <time>13:01:48</time>
17
+ <contents><target name="magelocal"><dir name="Vivacity"><dir name="Tweets"><dir name="Block"><file name="Tweets.php" hash="d2970ee6c6ffef4dcaa0cd076e22c4c4"/></dir><dir name="etc"><file name="adminhtml.xml" hash="b242f66673c5cd00bf581b0d7f4d88fa"/><file name="config.xml" hash="8bc3dd170ccd3a9b4f1c8b34b5973dc8"/><file name="config.xml~" hash="8bc3dd170ccd3a9b4f1c8b34b5973dc8"/><file name="system.xml" hash="eec3bade8724fc810dc13e5ebfd25ced"/></dir><dir name="Helper"><file name="Data.php" hash="f959da36381aa0528fa2b5404626f942"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Display.php" hash="95b0b1b5732149238ec4edee9793ae7e"/><file name="Numbers.php" hash="23a9976e4de10cf24a584922700a7c4f"/></dir></dir></dir></dir><file name="Layout.php" hash="da2fce86bc98f9e6a4224199017f6fdb"/><dir name="System"><dir name="Config"><file name="Position.php" hash="10943070e8df75f53c1de073122572f5"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Vivacity_Tweets.xml" hash="e3b450f28cf21ed1056cdf68d1d7811e"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="vivacity_tweets.xml" hash="861329ee0c4423e97c1f769adf57b40d"/></dir><dir name="template"><dir name="vivacity"><dir name="tweets"><file name="blank.phtml" hash="80eab12fd0079339d0eec87e3c4d2ced"/><file name="tweets.phtml" hash="feb6fe4482dca73c3f008e7ba93fe7e1"/></dir></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="twitteroauth"><file name="OAuth.php" hash="d7b40029f9d61580663a04727d166156"/><file name="twitteroauth.php" hash="c329e25121783a292524acaea23bb28d"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="font-awesome.css" hash="e4e5f0ff7d97d2851d8f06c26a4e302b"/><file name="font-awesome.min.css" hash="bbfef9385083d307ad2692c0cf99f611"/><file name="vivacity_tweets.css" hash="e8deecb7e13982e1826347d848b221fe"/></dir><dir name="fonts"><file name="FontAwesome.otf" hash="3f3a623e88cb5c62eaa2367195e98b67"/><file name="fontawesome-webfont.eot" hash="8b27bc96115c2d24350f0d09e6a9433f"/><file name="fontawesome-webfont.svg" hash="0a799148a50bb02c6f380eabd8d97559"/><file name="fontawesome-webfont.ttf" hash="dcb26c7239d850266941e80370e207c1"/><file name="fontawesome-webfont.woff" hash="3293616ec0c605c7c2db25829a0a509e"/></dir></dir></dir></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>2.0.1</min><max>6.0.0</max></php></required></dependencies>
20
  </package>
skin/frontend/base/default/css/vivacity_tweets.css CHANGED
@@ -1,6 +1,7 @@
1
  .latest-twitter-block li { padding: 5px 10px; font-size: 11px; }
 
2
  .latest-twitter-block li span { display: block; font-weight: bold; }
3
- .latest-twitter-block { width:100%; float:left }
4
  .footerVivatweets { text-align:left !important; }
5
  .tweetHover { text-decoration:none !important; }
6
  .tweetHover:hover{ text-decoration:underline !important; }
1
  .latest-twitter-block li { padding: 5px 10px; font-size: 11px; }
2
+ .latest-twitter-block img { max-width: 100%; }
3
  .latest-twitter-block li span { display: block; font-weight: bold; }
4
+ .latest-twitter-block { width:100%;}
5
  .footerVivatweets { text-align:left !important; }
6
  .tweetHover { text-decoration:none !important; }
7
  .tweetHover:hover{ text-decoration:underline !important; }