Rotating Tweets (Twitter widget and shortcode) - Version 0.700

Version Description

Important upgrade needed for Rotating Tweets to keep working after March 2013. Supports version 1.1 of the Twitter API.

=

Download this release

Release Info

Developer mpntod
Plugin Icon wp plugin Rotating Tweets (Twitter widget and shortcode)
Version 0.700
Comparing to
See all releases

Code changes from version 0.625 to 0.700

languages/rotatingtweets-de_DE.mo CHANGED
Binary file
languages/rotatingtweets-de_DE.po CHANGED
@@ -5,7 +5,7 @@ msgstr ""
5
  "Project-Id-Version: Rotating Tweets (Twitter widget & shortcode) 0.505\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/rotatingtweets\n"
7
  "POT-Creation-Date: 2013-02-22 17:45:21+00:00\n"
8
- "PO-Revision-Date: 2013-02-22 17:53-0000\n"
9
  "Last-Translator: Martin Tod <martin@martintod.org.uk>\n"
10
  "Language-Team: \n"
11
  "Language: de_DE\n"
@@ -13,7 +13,7 @@ msgstr ""
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
- "X-Generator: Poedit 1.5.4\n"
17
 
18
  #: rotatingtweets.php:41
19
  msgid "A widget to show tweets for a particular user in rotation."
5
  "Project-Id-Version: Rotating Tweets (Twitter widget & shortcode) 0.505\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/rotatingtweets\n"
7
  "POT-Creation-Date: 2013-02-22 17:45:21+00:00\n"
8
+ "PO-Revision-Date: 2013-02-23 13:11-0000\n"
9
  "Last-Translator: Martin Tod <martin@martintod.org.uk>\n"
10
  "Language-Team: \n"
11
  "Language: de_DE\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
+ "X-Generator: Poedit 1.5.5\n"
17
 
18
  #: rotatingtweets.php:41
19
  msgid "A widget to show tweets for a particular user in rotation."
languages/rotatingtweets-en_GB.mo CHANGED
Binary file
languages/rotatingtweets-en_GB.po CHANGED
@@ -4,8 +4,8 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: Rotating Tweets (Twitter widget & shortcode) 0.504\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/rotatingtweets\n"
7
- "POT-Creation-Date: 2013-02-22 17:45:21+00:00\n"
8
- "PO-Revision-Date: 2013-02-22 17:52-0000\n"
9
  "Last-Translator: Martin Tod <martin@martintod.org.uk>\n"
10
  "Language-Team: Martin Tod <martin@martintod.org.uk>\n"
11
  "Language: en_GB\n"
@@ -14,93 +14,93 @@ msgstr ""
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Generator: Poedit 1.5.4\n"
18
 
19
  #: rotatingtweets.php:41
20
  msgid "A widget to show tweets for a particular user in rotation."
21
  msgstr "A widget to show tweets for a particular user in rotation."
22
 
23
- #: rotatingtweets.php:135
24
  msgid "Title:"
25
  msgstr "Title:"
26
 
27
- #: rotatingtweets.php:136
28
  msgid "Twitter name:"
29
  msgstr "Twitter name:"
30
 
31
- #: rotatingtweets.php:137
32
  msgid "Include retweets?"
33
  msgstr "Include retweets?"
34
 
35
- #: rotatingtweets.php:138
36
  msgid "Exclude replies?"
37
  msgstr "Exclude replies?"
38
 
39
- #: rotatingtweets.php:139
40
  msgid "Open all links in new window or tab?"
41
  msgstr "Open all links in new window or tab?"
42
 
43
- #: rotatingtweets.php:140
44
  msgid "How many tweets?"
45
  msgstr "How many tweets?"
46
 
47
- #: rotatingtweets.php:148
48
  msgid "Speed"
49
  msgstr "Speed"
50
 
51
- #: rotatingtweets.php:151
52
  msgid "Faster (3 seconds)"
53
  msgstr "Faster (3 seconds)"
54
 
55
- #: rotatingtweets.php:152
56
  msgid "Normal (4 seconds)"
57
  msgstr "Normal (4 seconds)"
58
 
59
- #: rotatingtweets.php:153
60
  msgid "Slower (5 seconds)"
61
  msgstr "Slower (5 seconds)"
62
 
63
- #: rotatingtweets.php:154
64
  msgid "Slowest (6 seconds)"
65
  msgstr "Slowest (6 seconds)"
66
 
67
- #: rotatingtweets.php:155
68
  msgid "Ultra slow (20 seconds)"
69
  msgstr "Ultra slow (20 seconds)"
70
 
71
- #: rotatingtweets.php:167
72
  msgid "Scroll Up"
73
  msgstr "Scroll Up"
74
 
75
- #: rotatingtweets.php:168
76
  msgid "Scroll Down"
77
  msgstr "Scroll Down"
78
 
79
- #: rotatingtweets.php:169
80
  msgid "Scroll Left"
81
  msgstr "Scroll Left"
82
 
83
- #: rotatingtweets.php:170
84
  msgid "Scroll Right"
85
  msgstr "Scroll Right"
86
 
87
- #: rotatingtweets.php:171
88
  msgid "Fade"
89
  msgstr "Fade"
90
 
91
- #: rotatingtweets.php:175
92
  msgid "Type of rotation"
93
  msgstr "Type of rotation"
94
 
95
- #: rotatingtweets.php:184
96
  msgid "Display format"
97
  msgstr "Display format"
98
 
99
- #: rotatingtweets.php:187
100
  msgid "Original rotating tweets layout"
101
  msgstr "Original rotating tweets layout"
102
 
103
- #: rotatingtweets.php:188
104
  msgid ""
105
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
106
  "guidelines'>Official Twitter guidelines</a> (regular)"
@@ -108,7 +108,7 @@ msgstr ""
108
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
109
  "guidelines'>Official Twitter guidelines</a> (regular)"
110
 
111
- #: rotatingtweets.php:189
112
  msgid ""
113
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
114
  "guidelines'>Official Twitter guidelines</a> (wide)"
@@ -116,206 +116,288 @@ msgstr ""
116
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
117
  "guidelines'>Official Twitter guidelines</a> (wide)"
118
 
119
- #: rotatingtweets.php:199
120
  msgid "Show tweet details?"
121
  msgstr "Show tweet details?"
122
 
123
- #: rotatingtweets.php:202
124
  msgid "Time/date of tweet"
125
  msgstr "Time/date of tweet"
126
 
127
- #: rotatingtweets.php:203
128
  msgid "Name of person tweeting"
129
  msgstr "Name of person tweeting"
130
 
131
- #: rotatingtweets.php:204
132
  msgid "Source of tweet"
133
  msgstr "Source of tweet"
134
 
135
- #: rotatingtweets.php:205
136
  msgid "'reply &middot; retweet &middot; favorite' links"
137
  msgstr "'reply &middot; retweet &middot; favourite' links"
138
 
139
- #: rotatingtweets.php:215
140
  msgid "Show follow button?"
141
  msgstr "Show follow button?"
142
 
143
- #: rotatingtweets.php:218
144
  msgctxt "Show follow button?"
145
  msgid "None"
146
  msgstr "None"
147
 
148
- #: rotatingtweets.php:219
149
  msgid "Show name and number of followers"
150
  msgstr "Show name and number of followers"
151
 
152
- #: rotatingtweets.php:220
153
  msgid "Show name only"
154
  msgstr "Show name only"
155
 
156
- #: rotatingtweets.php:221
157
  msgid "Show followers only"
158
  msgstr "Show followers only"
159
 
160
- #: rotatingtweets.php:222
161
  msgid "Show button only"
162
  msgstr "Show button only"
163
 
164
- #: rotatingtweets.php:247
165
  msgid "less than a second ago"
166
  msgstr "less than a second ago"
167
 
168
- #: rotatingtweets.php:248
169
  msgid "%d seconds ago"
170
  msgstr "%d seconds ago"
171
 
172
- #: rotatingtweets.php:249
173
  msgid "about a minute ago"
174
  msgid_plural "about %d minutes ago"
175
  msgstr[0] "about a minute ago"
176
  msgstr[1] "about %d minutes ago"
177
 
178
- #: rotatingtweets.php:250 rotatingtweets.php:252
179
  msgid "about an hour ago"
180
  msgid_plural "about %d hours ago"
181
  msgstr[0] "about an hour ago"
182
  msgstr[1] "about %d hours ago"
183
 
184
- #: rotatingtweets.php:251
185
  msgid "yesterday"
186
  msgstr "yesterday"
187
 
188
- #: rotatingtweets.php:253
189
  msgid "about a day ago"
190
  msgid_plural "about %d days ago"
191
  msgstr[0] "about a day ago"
192
  msgstr[1] "about %d days ago"
193
 
194
- #: rotatingtweets.php:254
195
  msgid "last week"
196
  msgstr "last week"
197
 
198
- #: rotatingtweets.php:255
199
  msgid "about a week ago"
200
  msgid_plural "about %d weeks ago"
201
  msgstr[0] "about a week ago"
202
  msgstr[1] "about %d weeks ago"
203
 
204
- #: rotatingtweets.php:256
205
  msgid "last month"
206
  msgstr "last month"
207
 
208
- #: rotatingtweets.php:257
209
  msgid "about a month ago"
210
  msgid_plural "about %d months ago"
211
  msgstr[0] "about a month ago"
212
  msgstr[1] "about %d months ago"
213
 
214
- #: rotatingtweets.php:258
215
  msgid "last year"
216
  msgstr "last year"
217
 
218
- #: rotatingtweets.php:259
219
  msgid "about a year ago"
220
  msgid_plural "about %d years ago"
221
  msgstr[0] "about a year ago"
222
  msgstr[1] "about %d years ago"
223
 
224
- #: rotatingtweets.php:266
225
  msgctxt "abbreviated timestamp in seconds"
226
  msgid "%ds"
227
  msgstr "%ds"
228
 
229
- #: rotatingtweets.php:267
230
  msgctxt "abbreviated timestamp in minutes"
231
  msgid "%dm"
232
  msgstr "%dm"
233
 
234
- #: rotatingtweets.php:268
235
  msgctxt "abbreviated timestamp in hours"
236
  msgid "%dh"
237
  msgstr "%dh"
238
 
239
- #: rotatingtweets.php:269
240
  msgctxt ""
241
  "short date format as per http://uk.php.net/manual/en/function.date.php"
242
  msgid "j M"
243
  msgstr "j M"
244
 
245
- #: rotatingtweets.php:270
246
  msgctxt ""
247
  "slightly longer date format as per http://uk.php.net/manual/en/function.date."
248
  "php"
249
  msgid "j M Y"
250
  msgstr "j M Y"
251
 
252
- #: rotatingtweets.php:276
253
  msgid "reply"
254
  msgstr "reply"
255
 
256
- #: rotatingtweets.php:277
257
  msgid "retweet"
258
  msgstr "retweet"
259
 
260
- #: rotatingtweets.php:278
261
  msgid "favorite"
262
  msgstr "favourite"
263
 
264
- #: rotatingtweets.php:551
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  msgid "Problem retrieving data from Twitter"
266
  msgstr "Problem retrieving data from Twitter"
267
 
268
- #: rotatingtweets.php:555
269
  msgid "This website is currently <a href='%s'>rate-limited by Twitter</a>."
270
  msgstr "This website is currently <a href='%s'>rate-limited by Twitter</a>."
271
 
272
- #: rotatingtweets.php:557 rotatingtweets.php:576
273
  msgid "Next attempt to get data will be in %d minute"
274
  msgid_plural "Next attempt to get data will be in %d minutes"
275
  msgstr[0] "Next attempt to get data will be in %d minute"
276
  msgstr[1] "Next attempt to get data will be in %d minutes"
277
 
278
- #: rotatingtweets.php:558
279
  msgid "Next attempt to get data will be in less than a minute"
280
  msgstr "Next attempt to get data will be in less than a minute"
281
 
282
- #: rotatingtweets.php:564
283
  msgid "Wordpress error message"
284
  msgstr "Wordpress error message"
285
 
286
- #: rotatingtweets.php:567
287
  msgid "Please check the Twitter name used in the settings."
288
  msgstr "Please check the Twitter name used in the settings."
289
 
290
- #: rotatingtweets.php:683
291
  msgid "from <a href='%1$s' title='%2$s'>%2$s's Twitter</a>"
292
  msgstr "from <a href='%1$s' title='%2$s'>%2$s's Twitter</a>"
293
 
294
- #: rotatingtweets.php:687
295
  msgid "via %s"
296
  msgstr "via %s"
297
 
298
- #: rotatingtweets.php:698
299
  msgid "Twitter"
300
  msgstr "Twitter"
301
 
302
- #: rotatingtweets.php:707 rotatingtweets.php:723
303
  msgid "Retweeted by %s"
304
  msgstr "Retweeted by %s"
305
 
306
- #: rotatingtweets.php:725
307
  msgid "Expand"
308
  msgstr "Expand"
309
 
310
- #: rotatingtweets.php:737
311
  msgid "Problem retrieving data from Twitter."
312
  msgstr "Problem retrieving data from Twitter."
313
 
314
- #: rotatingtweets.php:739
315
  msgid "Please check the comments on this page's HTML to understand more."
316
  msgstr "Please check the comments on this page's HTML to understand more."
317
 
318
- #: rotatingtweets.php:759
319
  msgid "Follow @%s"
320
  msgstr "Follow @%s"
321
 
4
  msgstr ""
5
  "Project-Id-Version: Rotating Tweets (Twitter widget & shortcode) 0.504\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/rotatingtweets\n"
7
+ "POT-Creation-Date: 2013-02-23 13:09:04+00:00\n"
8
+ "PO-Revision-Date: 2013-02-23 13:12-0000\n"
9
  "Last-Translator: Martin Tod <martin@martintod.org.uk>\n"
10
  "Language-Team: Martin Tod <martin@martintod.org.uk>\n"
11
  "Language: en_GB\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Generator: Poedit 1.5.5\n"
18
 
19
  #: rotatingtweets.php:41
20
  msgid "A widget to show tweets for a particular user in rotation."
21
  msgstr "A widget to show tweets for a particular user in rotation."
22
 
23
+ #: rotatingtweets.php:149
24
  msgid "Title:"
25
  msgstr "Title:"
26
 
27
+ #: rotatingtweets.php:150
28
  msgid "Twitter name:"
29
  msgstr "Twitter name:"
30
 
31
+ #: rotatingtweets.php:151
32
  msgid "Include retweets?"
33
  msgstr "Include retweets?"
34
 
35
+ #: rotatingtweets.php:152
36
  msgid "Exclude replies?"
37
  msgstr "Exclude replies?"
38
 
39
+ #: rotatingtweets.php:153
40
  msgid "Open all links in new window or tab?"
41
  msgstr "Open all links in new window or tab?"
42
 
43
+ #: rotatingtweets.php:154
44
  msgid "How many tweets?"
45
  msgstr "How many tweets?"
46
 
47
+ #: rotatingtweets.php:162
48
  msgid "Speed"
49
  msgstr "Speed"
50
 
51
+ #: rotatingtweets.php:165
52
  msgid "Faster (3 seconds)"
53
  msgstr "Faster (3 seconds)"
54
 
55
+ #: rotatingtweets.php:166
56
  msgid "Normal (4 seconds)"
57
  msgstr "Normal (4 seconds)"
58
 
59
+ #: rotatingtweets.php:167
60
  msgid "Slower (5 seconds)"
61
  msgstr "Slower (5 seconds)"
62
 
63
+ #: rotatingtweets.php:168
64
  msgid "Slowest (6 seconds)"
65
  msgstr "Slowest (6 seconds)"
66
 
67
+ #: rotatingtweets.php:169
68
  msgid "Ultra slow (20 seconds)"
69
  msgstr "Ultra slow (20 seconds)"
70
 
71
+ #: rotatingtweets.php:181
72
  msgid "Scroll Up"
73
  msgstr "Scroll Up"
74
 
75
+ #: rotatingtweets.php:182
76
  msgid "Scroll Down"
77
  msgstr "Scroll Down"
78
 
79
+ #: rotatingtweets.php:183
80
  msgid "Scroll Left"
81
  msgstr "Scroll Left"
82
 
83
+ #: rotatingtweets.php:184
84
  msgid "Scroll Right"
85
  msgstr "Scroll Right"
86
 
87
+ #: rotatingtweets.php:185
88
  msgid "Fade"
89
  msgstr "Fade"
90
 
91
+ #: rotatingtweets.php:189
92
  msgid "Type of rotation"
93
  msgstr "Type of rotation"
94
 
95
+ #: rotatingtweets.php:198
96
  msgid "Display format"
97
  msgstr "Display format"
98
 
99
+ #: rotatingtweets.php:201
100
  msgid "Original rotating tweets layout"
101
  msgstr "Original rotating tweets layout"
102
 
103
+ #: rotatingtweets.php:202
104
  msgid ""
105
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
106
  "guidelines'>Official Twitter guidelines</a> (regular)"
108
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
109
  "guidelines'>Official Twitter guidelines</a> (regular)"
110
 
111
+ #: rotatingtweets.php:203
112
  msgid ""
113
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
114
  "guidelines'>Official Twitter guidelines</a> (wide)"
116
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
117
  "guidelines'>Official Twitter guidelines</a> (wide)"
118
 
119
+ #: rotatingtweets.php:213
120
  msgid "Show tweet details?"
121
  msgstr "Show tweet details?"
122
 
123
+ #: rotatingtweets.php:216
124
  msgid "Time/date of tweet"
125
  msgstr "Time/date of tweet"
126
 
127
+ #: rotatingtweets.php:217
128
  msgid "Name of person tweeting"
129
  msgstr "Name of person tweeting"
130
 
131
+ #: rotatingtweets.php:218
132
  msgid "Source of tweet"
133
  msgstr "Source of tweet"
134
 
135
+ #: rotatingtweets.php:219
136
  msgid "'reply &middot; retweet &middot; favorite' links"
137
  msgstr "'reply &middot; retweet &middot; favourite' links"
138
 
139
+ #: rotatingtweets.php:229
140
  msgid "Show follow button?"
141
  msgstr "Show follow button?"
142
 
143
+ #: rotatingtweets.php:232
144
  msgctxt "Show follow button?"
145
  msgid "None"
146
  msgstr "None"
147
 
148
+ #: rotatingtweets.php:233
149
  msgid "Show name and number of followers"
150
  msgstr "Show name and number of followers"
151
 
152
+ #: rotatingtweets.php:234
153
  msgid "Show name only"
154
  msgstr "Show name only"
155
 
156
+ #: rotatingtweets.php:235
157
  msgid "Show followers only"
158
  msgstr "Show followers only"
159
 
160
+ #: rotatingtweets.php:236
161
  msgid "Show button only"
162
  msgstr "Show button only"
163
 
164
+ #: rotatingtweets.php:261
165
  msgid "less than a second ago"
166
  msgstr "less than a second ago"
167
 
168
+ #: rotatingtweets.php:262
169
  msgid "%d seconds ago"
170
  msgstr "%d seconds ago"
171
 
172
+ #: rotatingtweets.php:263
173
  msgid "about a minute ago"
174
  msgid_plural "about %d minutes ago"
175
  msgstr[0] "about a minute ago"
176
  msgstr[1] "about %d minutes ago"
177
 
178
+ #: rotatingtweets.php:264 rotatingtweets.php:266
179
  msgid "about an hour ago"
180
  msgid_plural "about %d hours ago"
181
  msgstr[0] "about an hour ago"
182
  msgstr[1] "about %d hours ago"
183
 
184
+ #: rotatingtweets.php:265
185
  msgid "yesterday"
186
  msgstr "yesterday"
187
 
188
+ #: rotatingtweets.php:267
189
  msgid "about a day ago"
190
  msgid_plural "about %d days ago"
191
  msgstr[0] "about a day ago"
192
  msgstr[1] "about %d days ago"
193
 
194
+ #: rotatingtweets.php:268
195
  msgid "last week"
196
  msgstr "last week"
197
 
198
+ #: rotatingtweets.php:269
199
  msgid "about a week ago"
200
  msgid_plural "about %d weeks ago"
201
  msgstr[0] "about a week ago"
202
  msgstr[1] "about %d weeks ago"
203
 
204
+ #: rotatingtweets.php:270
205
  msgid "last month"
206
  msgstr "last month"
207
 
208
+ #: rotatingtweets.php:271
209
  msgid "about a month ago"
210
  msgid_plural "about %d months ago"
211
  msgstr[0] "about a month ago"
212
  msgstr[1] "about %d months ago"
213
 
214
+ #: rotatingtweets.php:272
215
  msgid "last year"
216
  msgstr "last year"
217
 
218
+ #: rotatingtweets.php:273
219
  msgid "about a year ago"
220
  msgid_plural "about %d years ago"
221
  msgstr[0] "about a year ago"
222
  msgstr[1] "about %d years ago"
223
 
224
+ #: rotatingtweets.php:280
225
  msgctxt "abbreviated timestamp in seconds"
226
  msgid "%ds"
227
  msgstr "%ds"
228
 
229
+ #: rotatingtweets.php:281
230
  msgctxt "abbreviated timestamp in minutes"
231
  msgid "%dm"
232
  msgstr "%dm"
233
 
234
+ #: rotatingtweets.php:282
235
  msgctxt "abbreviated timestamp in hours"
236
  msgid "%dh"
237
  msgstr "%dh"
238
 
239
+ #: rotatingtweets.php:283
240
  msgctxt ""
241
  "short date format as per http://uk.php.net/manual/en/function.date.php"
242
  msgid "j M"
243
  msgstr "j M"
244
 
245
+ #: rotatingtweets.php:284
246
  msgctxt ""
247
  "slightly longer date format as per http://uk.php.net/manual/en/function.date."
248
  "php"
249
  msgid "j M Y"
250
  msgstr "j M Y"
251
 
252
+ #: rotatingtweets.php:290
253
  msgid "reply"
254
  msgstr "reply"
255
 
256
+ #: rotatingtweets.php:291
257
  msgid "retweet"
258
  msgstr "retweet"
259
 
260
+ #: rotatingtweets.php:292
261
  msgid "favorite"
262
  msgstr "favourite"
263
 
264
+ #: rotatingtweets.php:435
265
+ msgid ""
266
+ "Please update <a href=\"%2$s\">your settings for Rotating Tweets</a>. The "
267
+ "Twitter API <a href=\"%1$s\">changed in March 2013</a> and new settings are "
268
+ "needed for Rotating Tweets to continue working."
269
+ msgstr ""
270
+
271
+ #: rotatingtweets.php:437
272
+ msgid ""
273
+ "Please update <a href=\"%2$s\">your settings for Rotating Tweets</a>. The "
274
+ "Twitter API will <a href=\"%1$s\">be changing in March 2013</a> and new "
275
+ "settings are needed for Rotating Tweets to continue working after the API "
276
+ "changes."
277
+ msgstr ""
278
+
279
+ #: rotatingtweets.php:443
280
+ msgid ""
281
+ "Please update <a href=\"%1$s\">your settings for Rotating Tweets</a>. "
282
+ "Currently Twitter cannot authenticate you with the details you have given."
283
+ msgstr ""
284
+
285
+ #: rotatingtweets.php:451 rotatingtweets.php:457
286
+ msgid "Rotating Tweets: Twitter API settings"
287
+ msgstr "Rotating Tweets: Twitter API settings"
288
+
289
+ #: rotatingtweets.php:459
290
+ msgid "You do not have sufficient permissions to access this page."
291
+ msgstr ""
292
+
293
+ #: rotatingtweets.php:461
294
+ msgid ""
295
+ "<p>Twitter <a href=\"%3$s\">recently announced</a> that they will be "
296
+ "changing the way that they allow people to use the information in their "
297
+ "tweets.</p><p>Please take the following steps to make sure that Rotating "
298
+ "Tweets continues working:</p><h3>Step 1:</h3><p>Go to the <a href=\"%1$s"
299
+ "\">My applications page</a> on the Twitter website to set up your website as "
300
+ "a new Twitter 'application'. You may need to log-in using your Twitter user "
301
+ "name and password.</p><h3>Step 2:</h3><p>If you don't already have a "
302
+ "suitable 'application' that you can use for your website, set one up on the "
303
+ "<a href=\"%2$s\">Create an Application page</a>.</p> <p>It's normally best "
304
+ "to use the name, description and website URL of the website where you plan "
305
+ "to use Rotating Tweets.</p><p>You don't need a Callback URL.</p><h3>Step 3:</"
306
+ "h3><p>After clicking <strong>Create your Twitter application</strong>, on "
307
+ "the following page, click on <strong>Create my access token</strong>.</"
308
+ "p><h3>Step 4:</h3><p>Copy the <strong>Consumer key</strong>, "
309
+ "<strong>Consumer secret</strong>, <strong>Access token</strong> and "
310
+ "<strong>Access token secret</strong> from your Twitter application page into "
311
+ "the settings below.</p><h3>Step 5:</h3><p>Click on <strong>Save Changes</"
312
+ "strong>. If there are any problems, you will get an error message from "
313
+ "Twitter which should help diagnose the problem.</p>"
314
+ msgstr ""
315
+
316
+ #: rotatingtweets.php:465
317
+ msgid "Save Changes"
318
+ msgstr ""
319
+
320
+ #: rotatingtweets.php:472
321
+ msgid "Twitter API Settings"
322
+ msgstr ""
323
+
324
+ #: rotatingtweets.php:473
325
+ msgid "Twitter API Consumer Key"
326
+ msgstr ""
327
+
328
+ #: rotatingtweets.php:474
329
+ msgid "Twitter API Consumer Secret"
330
+ msgstr ""
331
+
332
+ #: rotatingtweets.php:475
333
+ msgid "Twitter API Access Token"
334
+ msgstr ""
335
+
336
+ #: rotatingtweets.php:476
337
+ msgid "Twitter API Access Token Secret"
338
+ msgstr ""
339
+
340
+ #: rotatingtweets.php:525
341
+ msgid ""
342
+ "Error message received from Twitter: %1$s. <a href=\"%2$s\">Please check "
343
+ "your API key, secret, token and secret token on the Twitter website</a>."
344
+ msgstr ""
345
+
346
+ #: rotatingtweets.php:746
347
  msgid "Problem retrieving data from Twitter"
348
  msgstr "Problem retrieving data from Twitter"
349
 
350
+ #: rotatingtweets.php:750
351
  msgid "This website is currently <a href='%s'>rate-limited by Twitter</a>."
352
  msgstr "This website is currently <a href='%s'>rate-limited by Twitter</a>."
353
 
354
+ #: rotatingtweets.php:752 rotatingtweets.php:771
355
  msgid "Next attempt to get data will be in %d minute"
356
  msgid_plural "Next attempt to get data will be in %d minutes"
357
  msgstr[0] "Next attempt to get data will be in %d minute"
358
  msgstr[1] "Next attempt to get data will be in %d minutes"
359
 
360
+ #: rotatingtweets.php:753
361
  msgid "Next attempt to get data will be in less than a minute"
362
  msgstr "Next attempt to get data will be in less than a minute"
363
 
364
+ #: rotatingtweets.php:759
365
  msgid "Wordpress error message"
366
  msgstr "Wordpress error message"
367
 
368
+ #: rotatingtweets.php:762
369
  msgid "Please check the Twitter name used in the settings."
370
  msgstr "Please check the Twitter name used in the settings."
371
 
372
+ #: rotatingtweets.php:882
373
  msgid "from <a href='%1$s' title='%2$s'>%2$s's Twitter</a>"
374
  msgstr "from <a href='%1$s' title='%2$s'>%2$s's Twitter</a>"
375
 
376
+ #: rotatingtweets.php:886
377
  msgid "via %s"
378
  msgstr "via %s"
379
 
380
+ #: rotatingtweets.php:897
381
  msgid "Twitter"
382
  msgstr "Twitter"
383
 
384
+ #: rotatingtweets.php:906 rotatingtweets.php:922
385
  msgid "Retweeted by %s"
386
  msgstr "Retweeted by %s"
387
 
388
+ #: rotatingtweets.php:924
389
  msgid "Expand"
390
  msgstr "Expand"
391
 
392
+ #: rotatingtweets.php:936
393
  msgid "Problem retrieving data from Twitter."
394
  msgstr "Problem retrieving data from Twitter."
395
 
396
+ #: rotatingtweets.php:938
397
  msgid "Please check the comments on this page's HTML to understand more."
398
  msgstr "Please check the comments on this page's HTML to understand more."
399
 
400
+ #: rotatingtweets.php:958
401
  msgid "Follow @%s"
402
  msgstr "Follow @%s"
403
 
languages/rotatingtweets-es_ES.mo CHANGED
Binary file
languages/rotatingtweets-es_ES.po CHANGED
@@ -4,8 +4,8 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: Rotating Tweets (Twitter widget & shortcode) 0.600\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/rotatingtweets\n"
7
- "POT-Creation-Date: 2013-02-22 17:45:21+00:00\n"
8
- "PO-Revision-Date: 2013-02-22 17:53-0000\n"
9
  "Last-Translator: Martin Tod <martin@martintod.org.uk>\n"
10
  "Language-Team: \n"
11
  "Language: es_ES\n"
@@ -14,304 +14,386 @@ msgstr ""
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Generator: Poedit 1.5.4\n"
18
 
19
  #: rotatingtweets.php:41
20
  msgid "A widget to show tweets for a particular user in rotation."
21
  msgstr ""
22
 
23
- #: rotatingtweets.php:135
24
  msgid "Title:"
25
  msgstr ""
26
 
27
- #: rotatingtweets.php:136
28
  msgid "Twitter name:"
29
  msgstr ""
30
 
31
- #: rotatingtweets.php:137
32
  msgid "Include retweets?"
33
  msgstr ""
34
 
35
- #: rotatingtweets.php:138
36
  msgid "Exclude replies?"
37
  msgstr ""
38
 
39
- #: rotatingtweets.php:139
40
  msgid "Open all links in new window or tab?"
41
  msgstr ""
42
 
43
- #: rotatingtweets.php:140
44
  msgid "How many tweets?"
45
  msgstr ""
46
 
47
- #: rotatingtweets.php:148
48
  msgid "Speed"
49
  msgstr ""
50
 
51
- #: rotatingtweets.php:151
52
  msgid "Faster (3 seconds)"
53
  msgstr ""
54
 
55
- #: rotatingtweets.php:152
56
  msgid "Normal (4 seconds)"
57
  msgstr ""
58
 
59
- #: rotatingtweets.php:153
60
  msgid "Slower (5 seconds)"
61
  msgstr ""
62
 
63
- #: rotatingtweets.php:154
64
  msgid "Slowest (6 seconds)"
65
  msgstr ""
66
 
67
- #: rotatingtweets.php:155
68
  msgid "Ultra slow (20 seconds)"
69
  msgstr ""
70
 
71
- #: rotatingtweets.php:167
72
  msgid "Scroll Up"
73
  msgstr ""
74
 
75
- #: rotatingtweets.php:168
76
  msgid "Scroll Down"
77
  msgstr ""
78
 
79
- #: rotatingtweets.php:169
80
  msgid "Scroll Left"
81
  msgstr ""
82
 
83
- #: rotatingtweets.php:170
84
  msgid "Scroll Right"
85
  msgstr ""
86
 
87
- #: rotatingtweets.php:171
88
  msgid "Fade"
89
  msgstr ""
90
 
91
- #: rotatingtweets.php:175
92
  msgid "Type of rotation"
93
  msgstr ""
94
 
95
- #: rotatingtweets.php:184
96
  msgid "Display format"
97
  msgstr ""
98
 
99
- #: rotatingtweets.php:187
100
  msgid "Original rotating tweets layout"
101
  msgstr ""
102
 
103
- #: rotatingtweets.php:188
104
  msgid ""
105
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
106
  "guidelines'>Official Twitter guidelines</a> (regular)"
107
  msgstr ""
108
 
109
- #: rotatingtweets.php:189
110
  msgid ""
111
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
112
  "guidelines'>Official Twitter guidelines</a> (wide)"
113
  msgstr ""
114
 
115
- #: rotatingtweets.php:199
116
  msgid "Show tweet details?"
117
  msgstr ""
118
 
119
- #: rotatingtweets.php:202
120
  msgid "Time/date of tweet"
121
  msgstr ""
122
 
123
- #: rotatingtweets.php:203
124
  msgid "Name of person tweeting"
125
  msgstr ""
126
 
127
- #: rotatingtweets.php:204
128
  msgid "Source of tweet"
129
  msgstr ""
130
 
131
- #: rotatingtweets.php:205
132
  msgid "'reply &middot; retweet &middot; favorite' links"
133
  msgstr ""
134
 
135
- #: rotatingtweets.php:215
136
  msgid "Show follow button?"
137
  msgstr ""
138
 
139
- #: rotatingtweets.php:218
140
  msgctxt "Show follow button?"
141
  msgid "None"
142
  msgstr ""
143
 
144
- #: rotatingtweets.php:219
145
  msgid "Show name and number of followers"
146
  msgstr ""
147
 
148
- #: rotatingtweets.php:220
149
  msgid "Show name only"
150
  msgstr ""
151
 
152
- #: rotatingtweets.php:221
153
  msgid "Show followers only"
154
  msgstr ""
155
 
156
- #: rotatingtweets.php:222
157
  msgid "Show button only"
158
  msgstr ""
159
 
160
- #: rotatingtweets.php:247
161
  msgid "less than a second ago"
162
  msgstr ""
163
 
164
- #: rotatingtweets.php:248
165
  msgid "%d seconds ago"
166
  msgstr ""
167
 
168
- #: rotatingtweets.php:249
169
  msgid "about a minute ago"
170
  msgid_plural "about %d minutes ago"
171
  msgstr[0] ""
172
  msgstr[1] ""
173
 
174
- #: rotatingtweets.php:250 rotatingtweets.php:252
175
  msgid "about an hour ago"
176
  msgid_plural "about %d hours ago"
177
  msgstr[0] ""
178
  msgstr[1] ""
179
 
180
- #: rotatingtweets.php:251
181
  msgid "yesterday"
182
  msgstr ""
183
 
184
- #: rotatingtweets.php:253
185
  msgid "about a day ago"
186
  msgid_plural "about %d days ago"
187
  msgstr[0] ""
188
  msgstr[1] ""
189
 
190
- #: rotatingtweets.php:254
191
  msgid "last week"
192
  msgstr ""
193
 
194
- #: rotatingtweets.php:255
195
  msgid "about a week ago"
196
  msgid_plural "about %d weeks ago"
197
  msgstr[0] ""
198
  msgstr[1] ""
199
 
200
- #: rotatingtweets.php:256
201
  msgid "last month"
202
  msgstr ""
203
 
204
- #: rotatingtweets.php:257
205
  msgid "about a month ago"
206
  msgid_plural "about %d months ago"
207
  msgstr[0] ""
208
  msgstr[1] ""
209
 
210
- #: rotatingtweets.php:258
211
  msgid "last year"
212
  msgstr ""
213
 
214
- #: rotatingtweets.php:259
215
  msgid "about a year ago"
216
  msgid_plural "about %d years ago"
217
  msgstr[0] ""
218
  msgstr[1] ""
219
 
220
- #: rotatingtweets.php:266
221
  msgctxt "abbreviated timestamp in seconds"
222
  msgid "%ds"
223
  msgstr ""
224
 
225
- #: rotatingtweets.php:267
226
  msgctxt "abbreviated timestamp in minutes"
227
  msgid "%dm"
228
  msgstr ""
229
 
230
- #: rotatingtweets.php:268
231
  msgctxt "abbreviated timestamp in hours"
232
  msgid "%dh"
233
  msgstr ""
234
 
235
- #: rotatingtweets.php:269
236
  msgctxt ""
237
  "short date format as per http://uk.php.net/manual/en/function.date.php"
238
  msgid "j M"
239
  msgstr ""
240
 
241
- #: rotatingtweets.php:270
242
  msgctxt ""
243
  "slightly longer date format as per http://uk.php.net/manual/en/function.date."
244
  "php"
245
  msgid "j M Y"
246
  msgstr ""
247
 
248
- #: rotatingtweets.php:276
249
  msgid "reply"
250
  msgstr "Responder"
251
 
252
- #: rotatingtweets.php:277
253
  msgid "retweet"
254
  msgstr "Retwittear"
255
 
256
- #: rotatingtweets.php:278
257
  msgid "favorite"
258
  msgstr "Favorito"
259
 
260
- #: rotatingtweets.php:551
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
261
  msgid "Problem retrieving data from Twitter"
262
  msgstr ""
263
 
264
- #: rotatingtweets.php:555
265
  msgid "This website is currently <a href='%s'>rate-limited by Twitter</a>."
266
  msgstr ""
267
 
268
- #: rotatingtweets.php:557 rotatingtweets.php:576
269
  msgid "Next attempt to get data will be in %d minute"
270
  msgid_plural "Next attempt to get data will be in %d minutes"
271
  msgstr[0] ""
272
  msgstr[1] ""
273
 
274
- #: rotatingtweets.php:558
275
  msgid "Next attempt to get data will be in less than a minute"
276
  msgstr ""
277
 
278
- #: rotatingtweets.php:564
279
  msgid "Wordpress error message"
280
  msgstr ""
281
 
282
- #: rotatingtweets.php:567
283
  msgid "Please check the Twitter name used in the settings."
284
  msgstr ""
285
 
286
- #: rotatingtweets.php:683
287
  msgid "from <a href='%1$s' title='%2$s'>%2$s's Twitter</a>"
288
  msgstr ""
289
 
290
- #: rotatingtweets.php:687
291
  msgid "via %s"
292
  msgstr ""
293
 
294
- #: rotatingtweets.php:698
295
  msgid "Twitter"
296
  msgstr ""
297
 
298
- #: rotatingtweets.php:707 rotatingtweets.php:723
299
  msgid "Retweeted by %s"
300
  msgstr ""
301
 
302
- #: rotatingtweets.php:725
303
  msgid "Expand"
304
  msgstr "Abrir"
305
 
306
- #: rotatingtweets.php:737
307
  msgid "Problem retrieving data from Twitter."
308
  msgstr ""
309
 
310
- #: rotatingtweets.php:739
311
  msgid "Please check the comments on this page's HTML to understand more."
312
  msgstr ""
313
 
314
- #: rotatingtweets.php:759
315
  msgid "Follow @%s"
316
  msgstr "Seguir a @%s"
317
 
4
  msgstr ""
5
  "Project-Id-Version: Rotating Tweets (Twitter widget & shortcode) 0.600\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/rotatingtweets\n"
7
+ "POT-Creation-Date: 2013-02-23 13:09:04+00:00\n"
8
+ "PO-Revision-Date: 2013-02-23 13:13-0000\n"
9
  "Last-Translator: Martin Tod <martin@martintod.org.uk>\n"
10
  "Language-Team: \n"
11
  "Language: es_ES\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Generator: Poedit 1.5.5\n"
18
 
19
  #: rotatingtweets.php:41
20
  msgid "A widget to show tweets for a particular user in rotation."
21
  msgstr ""
22
 
23
+ #: rotatingtweets.php:149
24
  msgid "Title:"
25
  msgstr ""
26
 
27
+ #: rotatingtweets.php:150
28
  msgid "Twitter name:"
29
  msgstr ""
30
 
31
+ #: rotatingtweets.php:151
32
  msgid "Include retweets?"
33
  msgstr ""
34
 
35
+ #: rotatingtweets.php:152
36
  msgid "Exclude replies?"
37
  msgstr ""
38
 
39
+ #: rotatingtweets.php:153
40
  msgid "Open all links in new window or tab?"
41
  msgstr ""
42
 
43
+ #: rotatingtweets.php:154
44
  msgid "How many tweets?"
45
  msgstr ""
46
 
47
+ #: rotatingtweets.php:162
48
  msgid "Speed"
49
  msgstr ""
50
 
51
+ #: rotatingtweets.php:165
52
  msgid "Faster (3 seconds)"
53
  msgstr ""
54
 
55
+ #: rotatingtweets.php:166
56
  msgid "Normal (4 seconds)"
57
  msgstr ""
58
 
59
+ #: rotatingtweets.php:167
60
  msgid "Slower (5 seconds)"
61
  msgstr ""
62
 
63
+ #: rotatingtweets.php:168
64
  msgid "Slowest (6 seconds)"
65
  msgstr ""
66
 
67
+ #: rotatingtweets.php:169
68
  msgid "Ultra slow (20 seconds)"
69
  msgstr ""
70
 
71
+ #: rotatingtweets.php:181
72
  msgid "Scroll Up"
73
  msgstr ""
74
 
75
+ #: rotatingtweets.php:182
76
  msgid "Scroll Down"
77
  msgstr ""
78
 
79
+ #: rotatingtweets.php:183
80
  msgid "Scroll Left"
81
  msgstr ""
82
 
83
+ #: rotatingtweets.php:184
84
  msgid "Scroll Right"
85
  msgstr ""
86
 
87
+ #: rotatingtweets.php:185
88
  msgid "Fade"
89
  msgstr ""
90
 
91
+ #: rotatingtweets.php:189
92
  msgid "Type of rotation"
93
  msgstr ""
94
 
95
+ #: rotatingtweets.php:198
96
  msgid "Display format"
97
  msgstr ""
98
 
99
+ #: rotatingtweets.php:201
100
  msgid "Original rotating tweets layout"
101
  msgstr ""
102
 
103
+ #: rotatingtweets.php:202
104
  msgid ""
105
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
106
  "guidelines'>Official Twitter guidelines</a> (regular)"
107
  msgstr ""
108
 
109
+ #: rotatingtweets.php:203
110
  msgid ""
111
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
112
  "guidelines'>Official Twitter guidelines</a> (wide)"
113
  msgstr ""
114
 
115
+ #: rotatingtweets.php:213
116
  msgid "Show tweet details?"
117
  msgstr ""
118
 
119
+ #: rotatingtweets.php:216
120
  msgid "Time/date of tweet"
121
  msgstr ""
122
 
123
+ #: rotatingtweets.php:217
124
  msgid "Name of person tweeting"
125
  msgstr ""
126
 
127
+ #: rotatingtweets.php:218
128
  msgid "Source of tweet"
129
  msgstr ""
130
 
131
+ #: rotatingtweets.php:219
132
  msgid "'reply &middot; retweet &middot; favorite' links"
133
  msgstr ""
134
 
135
+ #: rotatingtweets.php:229
136
  msgid "Show follow button?"
137
  msgstr ""
138
 
139
+ #: rotatingtweets.php:232
140
  msgctxt "Show follow button?"
141
  msgid "None"
142
  msgstr ""
143
 
144
+ #: rotatingtweets.php:233
145
  msgid "Show name and number of followers"
146
  msgstr ""
147
 
148
+ #: rotatingtweets.php:234
149
  msgid "Show name only"
150
  msgstr ""
151
 
152
+ #: rotatingtweets.php:235
153
  msgid "Show followers only"
154
  msgstr ""
155
 
156
+ #: rotatingtweets.php:236
157
  msgid "Show button only"
158
  msgstr ""
159
 
160
+ #: rotatingtweets.php:261
161
  msgid "less than a second ago"
162
  msgstr ""
163
 
164
+ #: rotatingtweets.php:262
165
  msgid "%d seconds ago"
166
  msgstr ""
167
 
168
+ #: rotatingtweets.php:263
169
  msgid "about a minute ago"
170
  msgid_plural "about %d minutes ago"
171
  msgstr[0] ""
172
  msgstr[1] ""
173
 
174
+ #: rotatingtweets.php:264 rotatingtweets.php:266
175
  msgid "about an hour ago"
176
  msgid_plural "about %d hours ago"
177
  msgstr[0] ""
178
  msgstr[1] ""
179
 
180
+ #: rotatingtweets.php:265
181
  msgid "yesterday"
182
  msgstr ""
183
 
184
+ #: rotatingtweets.php:267
185
  msgid "about a day ago"
186
  msgid_plural "about %d days ago"
187
  msgstr[0] ""
188
  msgstr[1] ""
189
 
190
+ #: rotatingtweets.php:268
191
  msgid "last week"
192
  msgstr ""
193
 
194
+ #: rotatingtweets.php:269
195
  msgid "about a week ago"
196
  msgid_plural "about %d weeks ago"
197
  msgstr[0] ""
198
  msgstr[1] ""
199
 
200
+ #: rotatingtweets.php:270
201
  msgid "last month"
202
  msgstr ""
203
 
204
+ #: rotatingtweets.php:271
205
  msgid "about a month ago"
206
  msgid_plural "about %d months ago"
207
  msgstr[0] ""
208
  msgstr[1] ""
209
 
210
+ #: rotatingtweets.php:272
211
  msgid "last year"
212
  msgstr ""
213
 
214
+ #: rotatingtweets.php:273
215
  msgid "about a year ago"
216
  msgid_plural "about %d years ago"
217
  msgstr[0] ""
218
  msgstr[1] ""
219
 
220
+ #: rotatingtweets.php:280
221
  msgctxt "abbreviated timestamp in seconds"
222
  msgid "%ds"
223
  msgstr ""
224
 
225
+ #: rotatingtweets.php:281
226
  msgctxt "abbreviated timestamp in minutes"
227
  msgid "%dm"
228
  msgstr ""
229
 
230
+ #: rotatingtweets.php:282
231
  msgctxt "abbreviated timestamp in hours"
232
  msgid "%dh"
233
  msgstr ""
234
 
235
+ #: rotatingtweets.php:283
236
  msgctxt ""
237
  "short date format as per http://uk.php.net/manual/en/function.date.php"
238
  msgid "j M"
239
  msgstr ""
240
 
241
+ #: rotatingtweets.php:284
242
  msgctxt ""
243
  "slightly longer date format as per http://uk.php.net/manual/en/function.date."
244
  "php"
245
  msgid "j M Y"
246
  msgstr ""
247
 
248
+ #: rotatingtweets.php:290
249
  msgid "reply"
250
  msgstr "Responder"
251
 
252
+ #: rotatingtweets.php:291
253
  msgid "retweet"
254
  msgstr "Retwittear"
255
 
256
+ #: rotatingtweets.php:292
257
  msgid "favorite"
258
  msgstr "Favorito"
259
 
260
+ #: rotatingtweets.php:435
261
+ msgid ""
262
+ "Please update <a href=\"%2$s\">your settings for Rotating Tweets</a>. The "
263
+ "Twitter API <a href=\"%1$s\">changed in March 2013</a> and new settings are "
264
+ "needed for Rotating Tweets to continue working."
265
+ msgstr ""
266
+
267
+ #: rotatingtweets.php:437
268
+ msgid ""
269
+ "Please update <a href=\"%2$s\">your settings for Rotating Tweets</a>. The "
270
+ "Twitter API will <a href=\"%1$s\">be changing in March 2013</a> and new "
271
+ "settings are needed for Rotating Tweets to continue working after the API "
272
+ "changes."
273
+ msgstr ""
274
+
275
+ #: rotatingtweets.php:443
276
+ msgid ""
277
+ "Please update <a href=\"%1$s\">your settings for Rotating Tweets</a>. "
278
+ "Currently Twitter cannot authenticate you with the details you have given."
279
+ msgstr ""
280
+
281
+ #: rotatingtweets.php:451 rotatingtweets.php:457
282
+ msgid "Rotating Tweets: Twitter API settings"
283
+ msgstr ""
284
+
285
+ #: rotatingtweets.php:459
286
+ msgid "You do not have sufficient permissions to access this page."
287
+ msgstr ""
288
+
289
+ #: rotatingtweets.php:461
290
+ msgid ""
291
+ "<p>Twitter <a href=\"%3$s\">recently announced</a> that they will be "
292
+ "changing the way that they allow people to use the information in their "
293
+ "tweets.</p><p>Please take the following steps to make sure that Rotating "
294
+ "Tweets continues working:</p><h3>Step 1:</h3><p>Go to the <a href=\"%1$s"
295
+ "\">My applications page</a> on the Twitter website to set up your website as "
296
+ "a new Twitter 'application'. You may need to log-in using your Twitter user "
297
+ "name and password.</p><h3>Step 2:</h3><p>If you don't already have a "
298
+ "suitable 'application' that you can use for your website, set one up on the "
299
+ "<a href=\"%2$s\">Create an Application page</a>.</p> <p>It's normally best "
300
+ "to use the name, description and website URL of the website where you plan "
301
+ "to use Rotating Tweets.</p><p>You don't need a Callback URL.</p><h3>Step 3:</"
302
+ "h3><p>After clicking <strong>Create your Twitter application</strong>, on "
303
+ "the following page, click on <strong>Create my access token</strong>.</"
304
+ "p><h3>Step 4:</h3><p>Copy the <strong>Consumer key</strong>, "
305
+ "<strong>Consumer secret</strong>, <strong>Access token</strong> and "
306
+ "<strong>Access token secret</strong> from your Twitter application page into "
307
+ "the settings below.</p><h3>Step 5:</h3><p>Click on <strong>Save Changes</"
308
+ "strong>. If there are any problems, you will get an error message from "
309
+ "Twitter which should help diagnose the problem.</p>"
310
+ msgstr ""
311
+
312
+ #: rotatingtweets.php:465
313
+ msgid "Save Changes"
314
+ msgstr ""
315
+
316
+ #: rotatingtweets.php:472
317
+ msgid "Twitter API Settings"
318
+ msgstr ""
319
+
320
+ #: rotatingtweets.php:473
321
+ msgid "Twitter API Consumer Key"
322
+ msgstr ""
323
+
324
+ #: rotatingtweets.php:474
325
+ msgid "Twitter API Consumer Secret"
326
+ msgstr ""
327
+
328
+ #: rotatingtweets.php:475
329
+ msgid "Twitter API Access Token"
330
+ msgstr ""
331
+
332
+ #: rotatingtweets.php:476
333
+ msgid "Twitter API Access Token Secret"
334
+ msgstr ""
335
+
336
+ #: rotatingtweets.php:525
337
+ msgid ""
338
+ "Error message received from Twitter: %1$s. <a href=\"%2$s\">Please check "
339
+ "your API key, secret, token and secret token on the Twitter website</a>."
340
+ msgstr ""
341
+
342
+ #: rotatingtweets.php:746
343
  msgid "Problem retrieving data from Twitter"
344
  msgstr ""
345
 
346
+ #: rotatingtweets.php:750
347
  msgid "This website is currently <a href='%s'>rate-limited by Twitter</a>."
348
  msgstr ""
349
 
350
+ #: rotatingtweets.php:752 rotatingtweets.php:771
351
  msgid "Next attempt to get data will be in %d minute"
352
  msgid_plural "Next attempt to get data will be in %d minutes"
353
  msgstr[0] ""
354
  msgstr[1] ""
355
 
356
+ #: rotatingtweets.php:753
357
  msgid "Next attempt to get data will be in less than a minute"
358
  msgstr ""
359
 
360
+ #: rotatingtweets.php:759
361
  msgid "Wordpress error message"
362
  msgstr ""
363
 
364
+ #: rotatingtweets.php:762
365
  msgid "Please check the Twitter name used in the settings."
366
  msgstr ""
367
 
368
+ #: rotatingtweets.php:882
369
  msgid "from <a href='%1$s' title='%2$s'>%2$s's Twitter</a>"
370
  msgstr ""
371
 
372
+ #: rotatingtweets.php:886
373
  msgid "via %s"
374
  msgstr ""
375
 
376
+ #: rotatingtweets.php:897
377
  msgid "Twitter"
378
  msgstr ""
379
 
380
+ #: rotatingtweets.php:906 rotatingtweets.php:922
381
  msgid "Retweeted by %s"
382
  msgstr ""
383
 
384
+ #: rotatingtweets.php:924
385
  msgid "Expand"
386
  msgstr "Abrir"
387
 
388
+ #: rotatingtweets.php:936
389
  msgid "Problem retrieving data from Twitter."
390
  msgstr ""
391
 
392
+ #: rotatingtweets.php:938
393
  msgid "Please check the comments on this page's HTML to understand more."
394
  msgstr ""
395
 
396
+ #: rotatingtweets.php:958
397
  msgid "Follow @%s"
398
  msgstr "Seguir a @%s"
399
 
languages/rotatingtweets-it_IT.mo CHANGED
Binary file
languages/rotatingtweets-it_IT.po CHANGED
@@ -4,8 +4,8 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: Rotating Tweets (Twitter widget & shortcode) 0.600\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/rotatingtweets\n"
7
- "POT-Creation-Date: 2013-02-22 17:45:21+00:00\n"
8
- "PO-Revision-Date: 2013-02-22 17:53-0000\n"
9
  "Last-Translator: Martin Tod <martin@martintod.org.uk>\n"
10
  "Language-Team: \n"
11
  "Language: Italian\n"
@@ -14,304 +14,386 @@ msgstr ""
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Generator: Poedit 1.5.4\n"
18
 
19
  #: rotatingtweets.php:41
20
  msgid "A widget to show tweets for a particular user in rotation."
21
  msgstr ""
22
 
23
- #: rotatingtweets.php:135
24
  msgid "Title:"
25
  msgstr ""
26
 
27
- #: rotatingtweets.php:136
28
  msgid "Twitter name:"
29
  msgstr ""
30
 
31
- #: rotatingtweets.php:137
32
  msgid "Include retweets?"
33
  msgstr ""
34
 
35
- #: rotatingtweets.php:138
36
  msgid "Exclude replies?"
37
  msgstr ""
38
 
39
- #: rotatingtweets.php:139
40
  msgid "Open all links in new window or tab?"
41
  msgstr ""
42
 
43
- #: rotatingtweets.php:140
44
  msgid "How many tweets?"
45
  msgstr ""
46
 
47
- #: rotatingtweets.php:148
48
  msgid "Speed"
49
  msgstr ""
50
 
51
- #: rotatingtweets.php:151
52
  msgid "Faster (3 seconds)"
53
  msgstr ""
54
 
55
- #: rotatingtweets.php:152
56
  msgid "Normal (4 seconds)"
57
  msgstr ""
58
 
59
- #: rotatingtweets.php:153
60
  msgid "Slower (5 seconds)"
61
  msgstr ""
62
 
63
- #: rotatingtweets.php:154
64
  msgid "Slowest (6 seconds)"
65
  msgstr ""
66
 
67
- #: rotatingtweets.php:155
68
  msgid "Ultra slow (20 seconds)"
69
  msgstr ""
70
 
71
- #: rotatingtweets.php:167
72
  msgid "Scroll Up"
73
  msgstr ""
74
 
75
- #: rotatingtweets.php:168
76
  msgid "Scroll Down"
77
  msgstr ""
78
 
79
- #: rotatingtweets.php:169
80
  msgid "Scroll Left"
81
  msgstr ""
82
 
83
- #: rotatingtweets.php:170
84
  msgid "Scroll Right"
85
  msgstr ""
86
 
87
- #: rotatingtweets.php:171
88
  msgid "Fade"
89
  msgstr ""
90
 
91
- #: rotatingtweets.php:175
92
  msgid "Type of rotation"
93
  msgstr ""
94
 
95
- #: rotatingtweets.php:184
96
  msgid "Display format"
97
  msgstr ""
98
 
99
- #: rotatingtweets.php:187
100
  msgid "Original rotating tweets layout"
101
  msgstr ""
102
 
103
- #: rotatingtweets.php:188
104
  msgid ""
105
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
106
  "guidelines'>Official Twitter guidelines</a> (regular)"
107
  msgstr ""
108
 
109
- #: rotatingtweets.php:189
110
  msgid ""
111
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
112
  "guidelines'>Official Twitter guidelines</a> (wide)"
113
  msgstr ""
114
 
115
- #: rotatingtweets.php:199
116
  msgid "Show tweet details?"
117
  msgstr ""
118
 
119
- #: rotatingtweets.php:202
120
  msgid "Time/date of tweet"
121
  msgstr ""
122
 
123
- #: rotatingtweets.php:203
124
  msgid "Name of person tweeting"
125
  msgstr ""
126
 
127
- #: rotatingtweets.php:204
128
  msgid "Source of tweet"
129
  msgstr ""
130
 
131
- #: rotatingtweets.php:205
132
  msgid "'reply &middot; retweet &middot; favorite' links"
133
  msgstr ""
134
 
135
- #: rotatingtweets.php:215
136
  msgid "Show follow button?"
137
  msgstr ""
138
 
139
- #: rotatingtweets.php:218
140
  msgctxt "Show follow button?"
141
  msgid "None"
142
  msgstr ""
143
 
144
- #: rotatingtweets.php:219
145
  msgid "Show name and number of followers"
146
  msgstr ""
147
 
148
- #: rotatingtweets.php:220
149
  msgid "Show name only"
150
  msgstr ""
151
 
152
- #: rotatingtweets.php:221
153
  msgid "Show followers only"
154
  msgstr ""
155
 
156
- #: rotatingtweets.php:222
157
  msgid "Show button only"
158
  msgstr ""
159
 
160
- #: rotatingtweets.php:247
161
  msgid "less than a second ago"
162
  msgstr ""
163
 
164
- #: rotatingtweets.php:248
165
  msgid "%d seconds ago"
166
  msgstr ""
167
 
168
- #: rotatingtweets.php:249
169
  msgid "about a minute ago"
170
  msgid_plural "about %d minutes ago"
171
  msgstr[0] ""
172
  msgstr[1] ""
173
 
174
- #: rotatingtweets.php:250 rotatingtweets.php:252
175
  msgid "about an hour ago"
176
  msgid_plural "about %d hours ago"
177
  msgstr[0] ""
178
  msgstr[1] ""
179
 
180
- #: rotatingtweets.php:251
181
  msgid "yesterday"
182
  msgstr ""
183
 
184
- #: rotatingtweets.php:253
185
  msgid "about a day ago"
186
  msgid_plural "about %d days ago"
187
  msgstr[0] ""
188
  msgstr[1] ""
189
 
190
- #: rotatingtweets.php:254
191
  msgid "last week"
192
  msgstr ""
193
 
194
- #: rotatingtweets.php:255
195
  msgid "about a week ago"
196
  msgid_plural "about %d weeks ago"
197
  msgstr[0] ""
198
  msgstr[1] ""
199
 
200
- #: rotatingtweets.php:256
201
  msgid "last month"
202
  msgstr ""
203
 
204
- #: rotatingtweets.php:257
205
  msgid "about a month ago"
206
  msgid_plural "about %d months ago"
207
  msgstr[0] ""
208
  msgstr[1] ""
209
 
210
- #: rotatingtweets.php:258
211
  msgid "last year"
212
  msgstr ""
213
 
214
- #: rotatingtweets.php:259
215
  msgid "about a year ago"
216
  msgid_plural "about %d years ago"
217
  msgstr[0] ""
218
  msgstr[1] ""
219
 
220
- #: rotatingtweets.php:266
221
  msgctxt "abbreviated timestamp in seconds"
222
  msgid "%ds"
223
  msgstr ""
224
 
225
- #: rotatingtweets.php:267
226
  msgctxt "abbreviated timestamp in minutes"
227
  msgid "%dm"
228
  msgstr ""
229
 
230
- #: rotatingtweets.php:268
231
  msgctxt "abbreviated timestamp in hours"
232
  msgid "%dh"
233
  msgstr ""
234
 
235
- #: rotatingtweets.php:269
236
  msgctxt ""
237
  "short date format as per http://uk.php.net/manual/en/function.date.php"
238
  msgid "j M"
239
  msgstr ""
240
 
241
- #: rotatingtweets.php:270
242
  msgctxt ""
243
  "slightly longer date format as per http://uk.php.net/manual/en/function.date."
244
  "php"
245
  msgid "j M Y"
246
  msgstr ""
247
 
248
- #: rotatingtweets.php:276
249
  msgid "reply"
250
  msgstr "Risposta"
251
 
252
- #: rotatingtweets.php:277
253
  msgid "retweet"
254
  msgstr "Retweet"
255
 
256
- #: rotatingtweets.php:278
257
  msgid "favorite"
258
  msgstr "Preferiti"
259
 
260
- #: rotatingtweets.php:551
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
261
  msgid "Problem retrieving data from Twitter"
262
  msgstr ""
263
 
264
- #: rotatingtweets.php:555
265
  msgid "This website is currently <a href='%s'>rate-limited by Twitter</a>."
266
  msgstr ""
267
 
268
- #: rotatingtweets.php:557 rotatingtweets.php:576
269
  msgid "Next attempt to get data will be in %d minute"
270
  msgid_plural "Next attempt to get data will be in %d minutes"
271
  msgstr[0] ""
272
  msgstr[1] ""
273
 
274
- #: rotatingtweets.php:558
275
  msgid "Next attempt to get data will be in less than a minute"
276
  msgstr ""
277
 
278
- #: rotatingtweets.php:564
279
  msgid "Wordpress error message"
280
  msgstr ""
281
 
282
- #: rotatingtweets.php:567
283
  msgid "Please check the Twitter name used in the settings."
284
  msgstr ""
285
 
286
- #: rotatingtweets.php:683
287
  msgid "from <a href='%1$s' title='%2$s'>%2$s's Twitter</a>"
288
  msgstr ""
289
 
290
- #: rotatingtweets.php:687
291
  msgid "via %s"
292
  msgstr ""
293
 
294
- #: rotatingtweets.php:698
295
  msgid "Twitter"
296
  msgstr ""
297
 
298
- #: rotatingtweets.php:707 rotatingtweets.php:723
299
  msgid "Retweeted by %s"
300
  msgstr ""
301
 
302
- #: rotatingtweets.php:725
303
  msgid "Expand"
304
  msgstr "Espandi"
305
 
306
- #: rotatingtweets.php:737
307
  msgid "Problem retrieving data from Twitter."
308
  msgstr ""
309
 
310
- #: rotatingtweets.php:739
311
  msgid "Please check the comments on this page's HTML to understand more."
312
  msgstr ""
313
 
314
- #: rotatingtweets.php:759
315
  msgid "Follow @%s"
316
  msgstr "Segui @%s"
317
 
4
  msgstr ""
5
  "Project-Id-Version: Rotating Tweets (Twitter widget & shortcode) 0.600\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/rotatingtweets\n"
7
+ "POT-Creation-Date: 2013-02-23 13:09:04+00:00\n"
8
+ "PO-Revision-Date: 2013-02-23 13:11-0000\n"
9
  "Last-Translator: Martin Tod <martin@martintod.org.uk>\n"
10
  "Language-Team: \n"
11
  "Language: Italian\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Generator: Poedit 1.5.5\n"
18
 
19
  #: rotatingtweets.php:41
20
  msgid "A widget to show tweets for a particular user in rotation."
21
  msgstr ""
22
 
23
+ #: rotatingtweets.php:149
24
  msgid "Title:"
25
  msgstr ""
26
 
27
+ #: rotatingtweets.php:150
28
  msgid "Twitter name:"
29
  msgstr ""
30
 
31
+ #: rotatingtweets.php:151
32
  msgid "Include retweets?"
33
  msgstr ""
34
 
35
+ #: rotatingtweets.php:152
36
  msgid "Exclude replies?"
37
  msgstr ""
38
 
39
+ #: rotatingtweets.php:153
40
  msgid "Open all links in new window or tab?"
41
  msgstr ""
42
 
43
+ #: rotatingtweets.php:154
44
  msgid "How many tweets?"
45
  msgstr ""
46
 
47
+ #: rotatingtweets.php:162
48
  msgid "Speed"
49
  msgstr ""
50
 
51
+ #: rotatingtweets.php:165
52
  msgid "Faster (3 seconds)"
53
  msgstr ""
54
 
55
+ #: rotatingtweets.php:166
56
  msgid "Normal (4 seconds)"
57
  msgstr ""
58
 
59
+ #: rotatingtweets.php:167
60
  msgid "Slower (5 seconds)"
61
  msgstr ""
62
 
63
+ #: rotatingtweets.php:168
64
  msgid "Slowest (6 seconds)"
65
  msgstr ""
66
 
67
+ #: rotatingtweets.php:169
68
  msgid "Ultra slow (20 seconds)"
69
  msgstr ""
70
 
71
+ #: rotatingtweets.php:181
72
  msgid "Scroll Up"
73
  msgstr ""
74
 
75
+ #: rotatingtweets.php:182
76
  msgid "Scroll Down"
77
  msgstr ""
78
 
79
+ #: rotatingtweets.php:183
80
  msgid "Scroll Left"
81
  msgstr ""
82
 
83
+ #: rotatingtweets.php:184
84
  msgid "Scroll Right"
85
  msgstr ""
86
 
87
+ #: rotatingtweets.php:185
88
  msgid "Fade"
89
  msgstr ""
90
 
91
+ #: rotatingtweets.php:189
92
  msgid "Type of rotation"
93
  msgstr ""
94
 
95
+ #: rotatingtweets.php:198
96
  msgid "Display format"
97
  msgstr ""
98
 
99
+ #: rotatingtweets.php:201
100
  msgid "Original rotating tweets layout"
101
  msgstr ""
102
 
103
+ #: rotatingtweets.php:202
104
  msgid ""
105
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
106
  "guidelines'>Official Twitter guidelines</a> (regular)"
107
  msgstr ""
108
 
109
+ #: rotatingtweets.php:203
110
  msgid ""
111
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
112
  "guidelines'>Official Twitter guidelines</a> (wide)"
113
  msgstr ""
114
 
115
+ #: rotatingtweets.php:213
116
  msgid "Show tweet details?"
117
  msgstr ""
118
 
119
+ #: rotatingtweets.php:216
120
  msgid "Time/date of tweet"
121
  msgstr ""
122
 
123
+ #: rotatingtweets.php:217
124
  msgid "Name of person tweeting"
125
  msgstr ""
126
 
127
+ #: rotatingtweets.php:218
128
  msgid "Source of tweet"
129
  msgstr ""
130
 
131
+ #: rotatingtweets.php:219
132
  msgid "'reply &middot; retweet &middot; favorite' links"
133
  msgstr ""
134
 
135
+ #: rotatingtweets.php:229
136
  msgid "Show follow button?"
137
  msgstr ""
138
 
139
+ #: rotatingtweets.php:232
140
  msgctxt "Show follow button?"
141
  msgid "None"
142
  msgstr ""
143
 
144
+ #: rotatingtweets.php:233
145
  msgid "Show name and number of followers"
146
  msgstr ""
147
 
148
+ #: rotatingtweets.php:234
149
  msgid "Show name only"
150
  msgstr ""
151
 
152
+ #: rotatingtweets.php:235
153
  msgid "Show followers only"
154
  msgstr ""
155
 
156
+ #: rotatingtweets.php:236
157
  msgid "Show button only"
158
  msgstr ""
159
 
160
+ #: rotatingtweets.php:261
161
  msgid "less than a second ago"
162
  msgstr ""
163
 
164
+ #: rotatingtweets.php:262
165
  msgid "%d seconds ago"
166
  msgstr ""
167
 
168
+ #: rotatingtweets.php:263
169
  msgid "about a minute ago"
170
  msgid_plural "about %d minutes ago"
171
  msgstr[0] ""
172
  msgstr[1] ""
173
 
174
+ #: rotatingtweets.php:264 rotatingtweets.php:266
175
  msgid "about an hour ago"
176
  msgid_plural "about %d hours ago"
177
  msgstr[0] ""
178
  msgstr[1] ""
179
 
180
+ #: rotatingtweets.php:265
181
  msgid "yesterday"
182
  msgstr ""
183
 
184
+ #: rotatingtweets.php:267
185
  msgid "about a day ago"
186
  msgid_plural "about %d days ago"
187
  msgstr[0] ""
188
  msgstr[1] ""
189
 
190
+ #: rotatingtweets.php:268
191
  msgid "last week"
192
  msgstr ""
193
 
194
+ #: rotatingtweets.php:269
195
  msgid "about a week ago"
196
  msgid_plural "about %d weeks ago"
197
  msgstr[0] ""
198
  msgstr[1] ""
199
 
200
+ #: rotatingtweets.php:270
201
  msgid "last month"
202
  msgstr ""
203
 
204
+ #: rotatingtweets.php:271
205
  msgid "about a month ago"
206
  msgid_plural "about %d months ago"
207
  msgstr[0] ""
208
  msgstr[1] ""
209
 
210
+ #: rotatingtweets.php:272
211
  msgid "last year"
212
  msgstr ""
213
 
214
+ #: rotatingtweets.php:273
215
  msgid "about a year ago"
216
  msgid_plural "about %d years ago"
217
  msgstr[0] ""
218
  msgstr[1] ""
219
 
220
+ #: rotatingtweets.php:280
221
  msgctxt "abbreviated timestamp in seconds"
222
  msgid "%ds"
223
  msgstr ""
224
 
225
+ #: rotatingtweets.php:281
226
  msgctxt "abbreviated timestamp in minutes"
227
  msgid "%dm"
228
  msgstr ""
229
 
230
+ #: rotatingtweets.php:282
231
  msgctxt "abbreviated timestamp in hours"
232
  msgid "%dh"
233
  msgstr ""
234
 
235
+ #: rotatingtweets.php:283
236
  msgctxt ""
237
  "short date format as per http://uk.php.net/manual/en/function.date.php"
238
  msgid "j M"
239
  msgstr ""
240
 
241
+ #: rotatingtweets.php:284
242
  msgctxt ""
243
  "slightly longer date format as per http://uk.php.net/manual/en/function.date."
244
  "php"
245
  msgid "j M Y"
246
  msgstr ""
247
 
248
+ #: rotatingtweets.php:290
249
  msgid "reply"
250
  msgstr "Risposta"
251
 
252
+ #: rotatingtweets.php:291
253
  msgid "retweet"
254
  msgstr "Retweet"
255
 
256
+ #: rotatingtweets.php:292
257
  msgid "favorite"
258
  msgstr "Preferiti"
259
 
260
+ #: rotatingtweets.php:435
261
+ msgid ""
262
+ "Please update <a href=\"%2$s\">your settings for Rotating Tweets</a>. The "
263
+ "Twitter API <a href=\"%1$s\">changed in March 2013</a> and new settings are "
264
+ "needed for Rotating Tweets to continue working."
265
+ msgstr ""
266
+
267
+ #: rotatingtweets.php:437
268
+ msgid ""
269
+ "Please update <a href=\"%2$s\">your settings for Rotating Tweets</a>. The "
270
+ "Twitter API will <a href=\"%1$s\">be changing in March 2013</a> and new "
271
+ "settings are needed for Rotating Tweets to continue working after the API "
272
+ "changes."
273
+ msgstr ""
274
+
275
+ #: rotatingtweets.php:443
276
+ msgid ""
277
+ "Please update <a href=\"%1$s\">your settings for Rotating Tweets</a>. "
278
+ "Currently Twitter cannot authenticate you with the details you have given."
279
+ msgstr ""
280
+
281
+ #: rotatingtweets.php:451 rotatingtweets.php:457
282
+ msgid "Rotating Tweets: Twitter API settings"
283
+ msgstr ""
284
+
285
+ #: rotatingtweets.php:459
286
+ msgid "You do not have sufficient permissions to access this page."
287
+ msgstr ""
288
+
289
+ #: rotatingtweets.php:461
290
+ msgid ""
291
+ "<p>Twitter <a href=\"%3$s\">recently announced</a> that they will be "
292
+ "changing the way that they allow people to use the information in their "
293
+ "tweets.</p><p>Please take the following steps to make sure that Rotating "
294
+ "Tweets continues working:</p><h3>Step 1:</h3><p>Go to the <a href=\"%1$s"
295
+ "\">My applications page</a> on the Twitter website to set up your website as "
296
+ "a new Twitter 'application'. You may need to log-in using your Twitter user "
297
+ "name and password.</p><h3>Step 2:</h3><p>If you don't already have a "
298
+ "suitable 'application' that you can use for your website, set one up on the "
299
+ "<a href=\"%2$s\">Create an Application page</a>.</p> <p>It's normally best "
300
+ "to use the name, description and website URL of the website where you plan "
301
+ "to use Rotating Tweets.</p><p>You don't need a Callback URL.</p><h3>Step 3:</"
302
+ "h3><p>After clicking <strong>Create your Twitter application</strong>, on "
303
+ "the following page, click on <strong>Create my access token</strong>.</"
304
+ "p><h3>Step 4:</h3><p>Copy the <strong>Consumer key</strong>, "
305
+ "<strong>Consumer secret</strong>, <strong>Access token</strong> and "
306
+ "<strong>Access token secret</strong> from your Twitter application page into "
307
+ "the settings below.</p><h3>Step 5:</h3><p>Click on <strong>Save Changes</"
308
+ "strong>. If there are any problems, you will get an error message from "
309
+ "Twitter which should help diagnose the problem.</p>"
310
+ msgstr ""
311
+
312
+ #: rotatingtweets.php:465
313
+ msgid "Save Changes"
314
+ msgstr ""
315
+
316
+ #: rotatingtweets.php:472
317
+ msgid "Twitter API Settings"
318
+ msgstr ""
319
+
320
+ #: rotatingtweets.php:473
321
+ msgid "Twitter API Consumer Key"
322
+ msgstr ""
323
+
324
+ #: rotatingtweets.php:474
325
+ msgid "Twitter API Consumer Secret"
326
+ msgstr ""
327
+
328
+ #: rotatingtweets.php:475
329
+ msgid "Twitter API Access Token"
330
+ msgstr ""
331
+
332
+ #: rotatingtweets.php:476
333
+ msgid "Twitter API Access Token Secret"
334
+ msgstr ""
335
+
336
+ #: rotatingtweets.php:525
337
+ msgid ""
338
+ "Error message received from Twitter: %1$s. <a href=\"%2$s\">Please check "
339
+ "your API key, secret, token and secret token on the Twitter website</a>."
340
+ msgstr ""
341
+
342
+ #: rotatingtweets.php:746
343
  msgid "Problem retrieving data from Twitter"
344
  msgstr ""
345
 
346
+ #: rotatingtweets.php:750
347
  msgid "This website is currently <a href='%s'>rate-limited by Twitter</a>."
348
  msgstr ""
349
 
350
+ #: rotatingtweets.php:752 rotatingtweets.php:771
351
  msgid "Next attempt to get data will be in %d minute"
352
  msgid_plural "Next attempt to get data will be in %d minutes"
353
  msgstr[0] ""
354
  msgstr[1] ""
355
 
356
+ #: rotatingtweets.php:753
357
  msgid "Next attempt to get data will be in less than a minute"
358
  msgstr ""
359
 
360
+ #: rotatingtweets.php:759
361
  msgid "Wordpress error message"
362
  msgstr ""
363
 
364
+ #: rotatingtweets.php:762
365
  msgid "Please check the Twitter name used in the settings."
366
  msgstr ""
367
 
368
+ #: rotatingtweets.php:882
369
  msgid "from <a href='%1$s' title='%2$s'>%2$s's Twitter</a>"
370
  msgstr ""
371
 
372
+ #: rotatingtweets.php:886
373
  msgid "via %s"
374
  msgstr ""
375
 
376
+ #: rotatingtweets.php:897
377
  msgid "Twitter"
378
  msgstr ""
379
 
380
+ #: rotatingtweets.php:906 rotatingtweets.php:922
381
  msgid "Retweeted by %s"
382
  msgstr ""
383
 
384
+ #: rotatingtweets.php:924
385
  msgid "Expand"
386
  msgstr "Espandi"
387
 
388
+ #: rotatingtweets.php:936
389
  msgid "Problem retrieving data from Twitter."
390
  msgstr ""
391
 
392
+ #: rotatingtweets.php:938
393
  msgid "Please check the comments on this page's HTML to understand more."
394
  msgstr ""
395
 
396
+ #: rotatingtweets.php:958
397
  msgid "Follow @%s"
398
  msgstr "Segui @%s"
399
 
languages/rotatingtweets.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Rotating Tweets (Twitter widget & shortcode) package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Rotating Tweets (Twitter widget & shortcode) 0.625\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/rotatingtweets\n"
7
- "POT-Creation-Date: 2013-02-22 17:45:21+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -16,298 +16,380 @@ msgstr ""
16
  msgid "A widget to show tweets for a particular user in rotation."
17
  msgstr ""
18
 
19
- #: rotatingtweets.php:135
20
  msgid "Title:"
21
  msgstr ""
22
 
23
- #: rotatingtweets.php:136
24
  msgid "Twitter name:"
25
  msgstr ""
26
 
27
- #: rotatingtweets.php:137
28
  msgid "Include retweets?"
29
  msgstr ""
30
 
31
- #: rotatingtweets.php:138
32
  msgid "Exclude replies?"
33
  msgstr ""
34
 
35
- #: rotatingtweets.php:139
36
  msgid "Open all links in new window or tab?"
37
  msgstr ""
38
 
39
- #: rotatingtweets.php:140
40
  msgid "How many tweets?"
41
  msgstr ""
42
 
43
- #: rotatingtweets.php:148
44
  msgid "Speed"
45
  msgstr ""
46
 
47
- #: rotatingtweets.php:151
48
  msgid "Faster (3 seconds)"
49
  msgstr ""
50
 
51
- #: rotatingtweets.php:152
52
  msgid "Normal (4 seconds)"
53
  msgstr ""
54
 
55
- #: rotatingtweets.php:153
56
  msgid "Slower (5 seconds)"
57
  msgstr ""
58
 
59
- #: rotatingtweets.php:154
60
  msgid "Slowest (6 seconds)"
61
  msgstr ""
62
 
63
- #: rotatingtweets.php:155
64
  msgid "Ultra slow (20 seconds)"
65
  msgstr ""
66
 
67
- #: rotatingtweets.php:167
68
  msgid "Scroll Up"
69
  msgstr ""
70
 
71
- #: rotatingtweets.php:168
72
  msgid "Scroll Down"
73
  msgstr ""
74
 
75
- #: rotatingtweets.php:169
76
  msgid "Scroll Left"
77
  msgstr ""
78
 
79
- #: rotatingtweets.php:170
80
  msgid "Scroll Right"
81
  msgstr ""
82
 
83
- #: rotatingtweets.php:171
84
  msgid "Fade"
85
  msgstr ""
86
 
87
- #: rotatingtweets.php:175
88
  msgid "Type of rotation"
89
  msgstr ""
90
 
91
- #: rotatingtweets.php:184
92
  msgid "Display format"
93
  msgstr ""
94
 
95
- #: rotatingtweets.php:187
96
  msgid "Original rotating tweets layout"
97
  msgstr ""
98
 
99
- #: rotatingtweets.php:188
100
  msgid ""
101
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
102
  "guidelines'>Official Twitter guidelines</a> (regular)"
103
  msgstr ""
104
 
105
- #: rotatingtweets.php:189
106
  msgid ""
107
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
108
  "guidelines'>Official Twitter guidelines</a> (wide)"
109
  msgstr ""
110
 
111
- #: rotatingtweets.php:199
112
  msgid "Show tweet details?"
113
  msgstr ""
114
 
115
- #: rotatingtweets.php:202
116
  msgid "Time/date of tweet"
117
  msgstr ""
118
 
119
- #: rotatingtweets.php:203
120
  msgid "Name of person tweeting"
121
  msgstr ""
122
 
123
- #: rotatingtweets.php:204
124
  msgid "Source of tweet"
125
  msgstr ""
126
 
127
- #: rotatingtweets.php:205
128
  msgid "'reply &middot; retweet &middot; favorite' links"
129
  msgstr ""
130
 
131
- #: rotatingtweets.php:215
132
  msgid "Show follow button?"
133
  msgstr ""
134
 
135
- #: rotatingtweets.php:218
136
  msgctxt "Show follow button?"
137
  msgid "None"
138
  msgstr ""
139
 
140
- #: rotatingtweets.php:219
141
  msgid "Show name and number of followers"
142
  msgstr ""
143
 
144
- #: rotatingtweets.php:220
145
  msgid "Show name only"
146
  msgstr ""
147
 
148
- #: rotatingtweets.php:221
149
  msgid "Show followers only"
150
  msgstr ""
151
 
152
- #: rotatingtweets.php:222
153
  msgid "Show button only"
154
  msgstr ""
155
 
156
- #: rotatingtweets.php:247
157
  msgid "less than a second ago"
158
  msgstr ""
159
 
160
- #: rotatingtweets.php:248
161
  msgid "%d seconds ago"
162
  msgstr ""
163
 
164
- #: rotatingtweets.php:249
165
  msgid "about a minute ago"
166
  msgid_plural "about %d minutes ago"
167
  msgstr[0] ""
168
  msgstr[1] ""
169
 
170
- #: rotatingtweets.php:250 rotatingtweets.php:252
171
  msgid "about an hour ago"
172
  msgid_plural "about %d hours ago"
173
  msgstr[0] ""
174
  msgstr[1] ""
175
 
176
- #: rotatingtweets.php:251
177
  msgid "yesterday"
178
  msgstr ""
179
 
180
- #: rotatingtweets.php:253
181
  msgid "about a day ago"
182
  msgid_plural "about %d days ago"
183
  msgstr[0] ""
184
  msgstr[1] ""
185
 
186
- #: rotatingtweets.php:254
187
  msgid "last week"
188
  msgstr ""
189
 
190
- #: rotatingtweets.php:255
191
  msgid "about a week ago"
192
  msgid_plural "about %d weeks ago"
193
  msgstr[0] ""
194
  msgstr[1] ""
195
 
196
- #: rotatingtweets.php:256
197
  msgid "last month"
198
  msgstr ""
199
 
200
- #: rotatingtweets.php:257
201
  msgid "about a month ago"
202
  msgid_plural "about %d months ago"
203
  msgstr[0] ""
204
  msgstr[1] ""
205
 
206
- #: rotatingtweets.php:258
207
  msgid "last year"
208
  msgstr ""
209
 
210
- #: rotatingtweets.php:259
211
  msgid "about a year ago"
212
  msgid_plural "about %d years ago"
213
  msgstr[0] ""
214
  msgstr[1] ""
215
 
216
- #: rotatingtweets.php:266
217
  msgctxt "abbreviated timestamp in seconds"
218
  msgid "%ds"
219
  msgstr ""
220
 
221
- #: rotatingtweets.php:267
222
  msgctxt "abbreviated timestamp in minutes"
223
  msgid "%dm"
224
  msgstr ""
225
 
226
- #: rotatingtweets.php:268
227
  msgctxt "abbreviated timestamp in hours"
228
  msgid "%dh"
229
  msgstr ""
230
 
231
- #: rotatingtweets.php:269
232
  msgctxt ""
233
  "short date format as per http://uk.php.net/manual/en/function.date.php"
234
  msgid "j M"
235
  msgstr ""
236
 
237
- #: rotatingtweets.php:270
238
  msgctxt ""
239
  "slightly longer date format as per http://uk.php.net/manual/en/function.date."
240
  "php"
241
  msgid "j M Y"
242
  msgstr ""
243
 
244
- #: rotatingtweets.php:276
245
  msgid "reply"
246
  msgstr ""
247
 
248
- #: rotatingtweets.php:277
249
  msgid "retweet"
250
  msgstr ""
251
 
252
- #: rotatingtweets.php:278
253
  msgid "favorite"
254
  msgstr ""
255
 
256
- #: rotatingtweets.php:551
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  msgid "Problem retrieving data from Twitter"
258
  msgstr ""
259
 
260
- #: rotatingtweets.php:555
261
  msgid "This website is currently <a href='%s'>rate-limited by Twitter</a>."
262
  msgstr ""
263
 
264
- #: rotatingtweets.php:557 rotatingtweets.php:576
265
  msgid "Next attempt to get data will be in %d minute"
266
  msgid_plural "Next attempt to get data will be in %d minutes"
267
  msgstr[0] ""
268
  msgstr[1] ""
269
 
270
- #: rotatingtweets.php:558
271
  msgid "Next attempt to get data will be in less than a minute"
272
  msgstr ""
273
 
274
- #: rotatingtweets.php:564
275
  msgid "Wordpress error message"
276
  msgstr ""
277
 
278
- #: rotatingtweets.php:567
279
  msgid "Please check the Twitter name used in the settings."
280
  msgstr ""
281
 
282
- #: rotatingtweets.php:683
283
  msgid "from <a href='%1$s' title='%2$s'>%2$s's Twitter</a>"
284
  msgstr ""
285
 
286
- #: rotatingtweets.php:687
287
  msgid "via %s"
288
  msgstr ""
289
 
290
- #: rotatingtweets.php:698
291
  msgid "Twitter"
292
  msgstr ""
293
 
294
- #: rotatingtweets.php:707 rotatingtweets.php:723
295
  msgid "Retweeted by %s"
296
  msgstr ""
297
 
298
- #: rotatingtweets.php:725
299
  msgid "Expand"
300
  msgstr ""
301
 
302
- #: rotatingtweets.php:737
303
  msgid "Problem retrieving data from Twitter."
304
  msgstr ""
305
 
306
- #: rotatingtweets.php:739
307
  msgid "Please check the comments on this page's HTML to understand more."
308
  msgstr ""
309
 
310
- #: rotatingtweets.php:759
311
  msgid "Follow @%s"
312
  msgstr ""
313
 
2
  # This file is distributed under the same license as the Rotating Tweets (Twitter widget & shortcode) package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Rotating Tweets (Twitter widget & shortcode) 0.700\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/rotatingtweets\n"
7
+ "POT-Creation-Date: 2013-02-23 13:09:04+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
16
  msgid "A widget to show tweets for a particular user in rotation."
17
  msgstr ""
18
 
19
+ #: rotatingtweets.php:149
20
  msgid "Title:"
21
  msgstr ""
22
 
23
+ #: rotatingtweets.php:150
24
  msgid "Twitter name:"
25
  msgstr ""
26
 
27
+ #: rotatingtweets.php:151
28
  msgid "Include retweets?"
29
  msgstr ""
30
 
31
+ #: rotatingtweets.php:152
32
  msgid "Exclude replies?"
33
  msgstr ""
34
 
35
+ #: rotatingtweets.php:153
36
  msgid "Open all links in new window or tab?"
37
  msgstr ""
38
 
39
+ #: rotatingtweets.php:154
40
  msgid "How many tweets?"
41
  msgstr ""
42
 
43
+ #: rotatingtweets.php:162
44
  msgid "Speed"
45
  msgstr ""
46
 
47
+ #: rotatingtweets.php:165
48
  msgid "Faster (3 seconds)"
49
  msgstr ""
50
 
51
+ #: rotatingtweets.php:166
52
  msgid "Normal (4 seconds)"
53
  msgstr ""
54
 
55
+ #: rotatingtweets.php:167
56
  msgid "Slower (5 seconds)"
57
  msgstr ""
58
 
59
+ #: rotatingtweets.php:168
60
  msgid "Slowest (6 seconds)"
61
  msgstr ""
62
 
63
+ #: rotatingtweets.php:169
64
  msgid "Ultra slow (20 seconds)"
65
  msgstr ""
66
 
67
+ #: rotatingtweets.php:181
68
  msgid "Scroll Up"
69
  msgstr ""
70
 
71
+ #: rotatingtweets.php:182
72
  msgid "Scroll Down"
73
  msgstr ""
74
 
75
+ #: rotatingtweets.php:183
76
  msgid "Scroll Left"
77
  msgstr ""
78
 
79
+ #: rotatingtweets.php:184
80
  msgid "Scroll Right"
81
  msgstr ""
82
 
83
+ #: rotatingtweets.php:185
84
  msgid "Fade"
85
  msgstr ""
86
 
87
+ #: rotatingtweets.php:189
88
  msgid "Type of rotation"
89
  msgstr ""
90
 
91
+ #: rotatingtweets.php:198
92
  msgid "Display format"
93
  msgstr ""
94
 
95
+ #: rotatingtweets.php:201
96
  msgid "Original rotating tweets layout"
97
  msgstr ""
98
 
99
+ #: rotatingtweets.php:202
100
  msgid ""
101
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
102
  "guidelines'>Official Twitter guidelines</a> (regular)"
103
  msgstr ""
104
 
105
+ #: rotatingtweets.php:203
106
  msgid ""
107
  "<a target='_blank' href='https://dev.twitter.com/terms/display-"
108
  "guidelines'>Official Twitter guidelines</a> (wide)"
109
  msgstr ""
110
 
111
+ #: rotatingtweets.php:213
112
  msgid "Show tweet details?"
113
  msgstr ""
114
 
115
+ #: rotatingtweets.php:216
116
  msgid "Time/date of tweet"
117
  msgstr ""
118
 
119
+ #: rotatingtweets.php:217
120
  msgid "Name of person tweeting"
121
  msgstr ""
122
 
123
+ #: rotatingtweets.php:218
124
  msgid "Source of tweet"
125
  msgstr ""
126
 
127
+ #: rotatingtweets.php:219
128
  msgid "'reply &middot; retweet &middot; favorite' links"
129
  msgstr ""
130
 
131
+ #: rotatingtweets.php:229
132
  msgid "Show follow button?"
133
  msgstr ""
134
 
135
+ #: rotatingtweets.php:232
136
  msgctxt "Show follow button?"
137
  msgid "None"
138
  msgstr ""
139
 
140
+ #: rotatingtweets.php:233
141
  msgid "Show name and number of followers"
142
  msgstr ""
143
 
144
+ #: rotatingtweets.php:234
145
  msgid "Show name only"
146
  msgstr ""
147
 
148
+ #: rotatingtweets.php:235
149
  msgid "Show followers only"
150
  msgstr ""
151
 
152
+ #: rotatingtweets.php:236
153
  msgid "Show button only"
154
  msgstr ""
155
 
156
+ #: rotatingtweets.php:261
157
  msgid "less than a second ago"
158
  msgstr ""
159
 
160
+ #: rotatingtweets.php:262
161
  msgid "%d seconds ago"
162
  msgstr ""
163
 
164
+ #: rotatingtweets.php:263
165
  msgid "about a minute ago"
166
  msgid_plural "about %d minutes ago"
167
  msgstr[0] ""
168
  msgstr[1] ""
169
 
170
+ #: rotatingtweets.php:264 rotatingtweets.php:266
171
  msgid "about an hour ago"
172
  msgid_plural "about %d hours ago"
173
  msgstr[0] ""
174
  msgstr[1] ""
175
 
176
+ #: rotatingtweets.php:265
177
  msgid "yesterday"
178
  msgstr ""
179
 
180
+ #: rotatingtweets.php:267
181
  msgid "about a day ago"
182
  msgid_plural "about %d days ago"
183
  msgstr[0] ""
184
  msgstr[1] ""
185
 
186
+ #: rotatingtweets.php:268
187
  msgid "last week"
188
  msgstr ""
189
 
190
+ #: rotatingtweets.php:269
191
  msgid "about a week ago"
192
  msgid_plural "about %d weeks ago"
193
  msgstr[0] ""
194
  msgstr[1] ""
195
 
196
+ #: rotatingtweets.php:270
197
  msgid "last month"
198
  msgstr ""
199
 
200
+ #: rotatingtweets.php:271
201
  msgid "about a month ago"
202
  msgid_plural "about %d months ago"
203
  msgstr[0] ""
204
  msgstr[1] ""
205
 
206
+ #: rotatingtweets.php:272
207
  msgid "last year"
208
  msgstr ""
209
 
210
+ #: rotatingtweets.php:273
211
  msgid "about a year ago"
212
  msgid_plural "about %d years ago"
213
  msgstr[0] ""
214
  msgstr[1] ""
215
 
216
+ #: rotatingtweets.php:280
217
  msgctxt "abbreviated timestamp in seconds"
218
  msgid "%ds"
219
  msgstr ""
220
 
221
+ #: rotatingtweets.php:281
222
  msgctxt "abbreviated timestamp in minutes"
223
  msgid "%dm"
224
  msgstr ""
225
 
226
+ #: rotatingtweets.php:282
227
  msgctxt "abbreviated timestamp in hours"
228
  msgid "%dh"
229
  msgstr ""
230
 
231
+ #: rotatingtweets.php:283
232
  msgctxt ""
233
  "short date format as per http://uk.php.net/manual/en/function.date.php"
234
  msgid "j M"
235
  msgstr ""
236
 
237
+ #: rotatingtweets.php:284
238
  msgctxt ""
239
  "slightly longer date format as per http://uk.php.net/manual/en/function.date."
240
  "php"
241
  msgid "j M Y"
242
  msgstr ""
243
 
244
+ #: rotatingtweets.php:290
245
  msgid "reply"
246
  msgstr ""
247
 
248
+ #: rotatingtweets.php:291
249
  msgid "retweet"
250
  msgstr ""
251
 
252
+ #: rotatingtweets.php:292
253
  msgid "favorite"
254
  msgstr ""
255
 
256
+ #: rotatingtweets.php:435
257
+ msgid ""
258
+ "Please update <a href=\"%2$s\">your settings for Rotating Tweets</a>. The "
259
+ "Twitter API <a href=\"%1$s\">changed in March 2013</a> and new settings are "
260
+ "needed for Rotating Tweets to continue working."
261
+ msgstr ""
262
+
263
+ #: rotatingtweets.php:437
264
+ msgid ""
265
+ "Please update <a href=\"%2$s\">your settings for Rotating Tweets</a>. The "
266
+ "Twitter API will <a href=\"%1$s\">be changing in March 2013</a> and new "
267
+ "settings are needed for Rotating Tweets to continue working after the API "
268
+ "changes."
269
+ msgstr ""
270
+
271
+ #: rotatingtweets.php:443
272
+ msgid ""
273
+ "Please update <a href=\"%1$s\">your settings for Rotating Tweets</a>. "
274
+ "Currently Twitter cannot authenticate you with the details you have given."
275
+ msgstr ""
276
+
277
+ #: rotatingtweets.php:451 rotatingtweets.php:457
278
+ msgid "Rotating Tweets: Twitter API settings"
279
+ msgstr ""
280
+
281
+ #: rotatingtweets.php:459
282
+ msgid "You do not have sufficient permissions to access this page."
283
+ msgstr ""
284
+
285
+ #: rotatingtweets.php:461
286
+ msgid ""
287
+ "<p>Twitter <a href=\"%3$s\">recently announced</a> that they will be "
288
+ "changing the way that they allow people to use the information in their "
289
+ "tweets.</p><p>Please take the following steps to make sure that Rotating "
290
+ "Tweets continues working:</p><h3>Step 1:</h3><p>Go to the <a href=\"%1$s"
291
+ "\">My applications page</a> on the Twitter website to set up your website as "
292
+ "a new Twitter 'application'. You may need to log-in using your Twitter user "
293
+ "name and password.</p><h3>Step 2:</h3><p>If you don't already have a "
294
+ "suitable 'application' that you can use for your website, set one up on the "
295
+ "<a href=\"%2$s\">Create an Application page</a>.</p> <p>It's normally best "
296
+ "to use the name, description and website URL of the website where you plan "
297
+ "to use Rotating Tweets.</p><p>You don't need a Callback URL.</p><h3>Step 3:</"
298
+ "h3><p>After clicking <strong>Create your Twitter application</strong>, on "
299
+ "the following page, click on <strong>Create my access token</strong>.</"
300
+ "p><h3>Step 4:</h3><p>Copy the <strong>Consumer key</strong>, "
301
+ "<strong>Consumer secret</strong>, <strong>Access token</strong> and "
302
+ "<strong>Access token secret</strong> from your Twitter application page into "
303
+ "the settings below.</p><h3>Step 5:</h3><p>Click on <strong>Save Changes</"
304
+ "strong>. If there are any problems, you will get an error message from "
305
+ "Twitter which should help diagnose the problem.</p>"
306
+ msgstr ""
307
+
308
+ #: rotatingtweets.php:465
309
+ msgid "Save Changes"
310
+ msgstr ""
311
+
312
+ #: rotatingtweets.php:472
313
+ msgid "Twitter API Settings"
314
+ msgstr ""
315
+
316
+ #: rotatingtweets.php:473
317
+ msgid "Twitter API Consumer Key"
318
+ msgstr ""
319
+
320
+ #: rotatingtweets.php:474
321
+ msgid "Twitter API Consumer Secret"
322
+ msgstr ""
323
+
324
+ #: rotatingtweets.php:475
325
+ msgid "Twitter API Access Token"
326
+ msgstr ""
327
+
328
+ #: rotatingtweets.php:476
329
+ msgid "Twitter API Access Token Secret"
330
+ msgstr ""
331
+
332
+ #: rotatingtweets.php:525
333
+ msgid ""
334
+ "Error message received from Twitter: %1$s. <a href=\"%2$s\">Please check "
335
+ "your API key, secret, token and secret token on the Twitter website</a>."
336
+ msgstr ""
337
+
338
+ #: rotatingtweets.php:746
339
  msgid "Problem retrieving data from Twitter"
340
  msgstr ""
341
 
342
+ #: rotatingtweets.php:750
343
  msgid "This website is currently <a href='%s'>rate-limited by Twitter</a>."
344
  msgstr ""
345
 
346
+ #: rotatingtweets.php:752 rotatingtweets.php:771
347
  msgid "Next attempt to get data will be in %d minute"
348
  msgid_plural "Next attempt to get data will be in %d minutes"
349
  msgstr[0] ""
350
  msgstr[1] ""
351
 
352
+ #: rotatingtweets.php:753
353
  msgid "Next attempt to get data will be in less than a minute"
354
  msgstr ""
355
 
356
+ #: rotatingtweets.php:759
357
  msgid "Wordpress error message"
358
  msgstr ""
359
 
360
+ #: rotatingtweets.php:762
361
  msgid "Please check the Twitter name used in the settings."
362
  msgstr ""
363
 
364
+ #: rotatingtweets.php:882
365
  msgid "from <a href='%1$s' title='%2$s'>%2$s's Twitter</a>"
366
  msgstr ""
367
 
368
+ #: rotatingtweets.php:886
369
  msgid "via %s"
370
  msgstr ""
371
 
372
+ #: rotatingtweets.php:897
373
  msgid "Twitter"
374
  msgstr ""
375
 
376
+ #: rotatingtweets.php:906 rotatingtweets.php:922
377
  msgid "Retweeted by %s"
378
  msgstr ""
379
 
380
+ #: rotatingtweets.php:924
381
  msgid "Expand"
382
  msgstr ""
383
 
384
+ #: rotatingtweets.php:936
385
  msgid "Problem retrieving data from Twitter."
386
  msgstr ""
387
 
388
+ #: rotatingtweets.php:938
389
  msgid "Please check the comments on this page's HTML to understand more."
390
  msgstr ""
391
 
392
+ #: rotatingtweets.php:958
393
  msgid "Follow @%s"
394
  msgstr ""
395
 
lib/OAuth.php ADDED
@@ -0,0 +1,874 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // vim: foldmethod=marker
3
+
4
+ /* Generic exception class
5
+ */
6
+ class OAuthException extends Exception {
7
+ // pass
8
+ }
9
+
10
+ class OAuthConsumer {
11
+ public $key;
12
+ public $secret;
13
+
14
+ function __construct($key, $secret, $callback_url=NULL) {
15
+ $this->key = $key;
16
+ $this->secret = $secret;
17
+ $this->callback_url = $callback_url;
18
+ }
19
+
20
+ function __toString() {
21
+ return "OAuthConsumer[key=$this->key,secret=$this->secret]";
22
+ }
23
+ }
24
+
25
+ class OAuthToken {
26
+ // access tokens and request tokens
27
+ public $key;
28
+ public $secret;
29
+
30
+ /**
31
+ * key = the token
32
+ * secret = the token secret
33
+ */
34
+ function __construct($key, $secret) {
35
+ $this->key = $key;
36
+ $this->secret = $secret;
37
+ }
38
+
39
+ /**
40
+ * generates the basic string serialization of a token that a server
41
+ * would respond to request_token and access_token calls with
42
+ */
43
+ function to_string() {
44
+ return "oauth_token=" .
45
+ OAuthUtil::urlencode_rfc3986($this->key) .
46
+ "&oauth_token_secret=" .
47
+ OAuthUtil::urlencode_rfc3986($this->secret);
48
+ }
49
+
50
+ function __toString() {
51
+ return $this->to_string();
52
+ }
53
+ }
54
+
55
+ /**
56
+ * A class for implementing a Signature Method
57
+ * See section 9 ("Signing Requests") in the spec
58
+ */
59
+ abstract class OAuthSignatureMethod {
60
+ /**
61
+ * Needs to return the name of the Signature Method (ie HMAC-SHA1)
62
+ * @return string
63
+ */
64
+ abstract public function get_name();
65
+
66
+ /**
67
+ * Build up the signature
68
+ * NOTE: The output of this function MUST NOT be urlencoded.
69
+ * the encoding is handled in OAuthRequest when the final
70
+ * request is serialized
71
+ * @param OAuthRequest $request
72
+ * @param OAuthConsumer $consumer
73
+ * @param OAuthToken $token
74
+ * @return string
75
+ */
76
+ abstract public function build_signature($request, $consumer, $token);
77
+
78
+ /**
79
+ * Verifies that a given signature is correct
80
+ * @param OAuthRequest $request
81
+ * @param OAuthConsumer $consumer
82
+ * @param OAuthToken $token
83
+ * @param string $signature
84
+ * @return bool
85
+ */
86
+ public function check_signature($request, $consumer, $token, $signature) {
87
+ $built = $this->build_signature($request, $consumer, $token);
88
+ return $built == $signature;
89
+ }
90
+ }
91
+
92
+ /**
93
+ * The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104]
94
+ * where the Signature Base String is the text and the key is the concatenated values (each first
95
+ * encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&'
96
+ * character (ASCII code 38) even if empty.
97
+ * - Chapter 9.2 ("HMAC-SHA1")
98
+ */
99
+ class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod {
100
+ function get_name() {
101
+ return "HMAC-SHA1";
102
+ }
103
+
104
+ public function build_signature($request, $consumer, $token) {
105
+ $base_string = $request->get_signature_base_string();
106
+ $request->base_string = $base_string;
107
+
108
+ $key_parts = array(
109
+ $consumer->secret,
110
+ ($token) ? $token->secret : ""
111
+ );
112
+
113
+ $key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
114
+ $key = implode('&', $key_parts);
115
+
116
+ return base64_encode(hash_hmac('sha1', $base_string, $key, true));
117
+ }
118
+ }
119
+
120
+ /**
121
+ * The PLAINTEXT method does not provide any security protection and SHOULD only be used
122
+ * over a secure channel such as HTTPS. It does not use the Signature Base String.
123
+ * - Chapter 9.4 ("PLAINTEXT")
124
+ */
125
+ class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod {
126
+ public function get_name() {
127
+ return "PLAINTEXT";
128
+ }
129
+
130
+ /**
131
+ * oauth_signature is set to the concatenated encoded values of the Consumer Secret and
132
+ * Token Secret, separated by a '&' character (ASCII code 38), even if either secret is
133
+ * empty. The result MUST be encoded again.
134
+ * - Chapter 9.4.1 ("Generating Signatures")
135
+ *
136
+ * Please note that the second encoding MUST NOT happen in the SignatureMethod, as
137
+ * OAuthRequest handles this!
138
+ */
139
+ public function build_signature($request, $consumer, $token) {
140
+ $key_parts = array(
141
+ $consumer->secret,
142
+ ($token) ? $token->secret : ""
143
+ );
144
+
145
+ $key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
146
+ $key = implode('&', $key_parts);
147
+ $request->base_string = $key;
148
+
149
+ return $key;
150
+ }
151
+ }
152
+
153
+ /**
154
+ * The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in
155
+ * [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for
156
+ * EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a
157
+ * verified way to the Service Provider, in a manner which is beyond the scope of this
158
+ * specification.
159
+ * - Chapter 9.3 ("RSA-SHA1")
160
+ */
161
+ abstract class OAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod {
162
+ public function get_name() {
163
+ return "RSA-SHA1";
164
+ }
165
+
166
+ // Up to the SP to implement this lookup of keys. Possible ideas are:
167
+ // (1) do a lookup in a table of trusted certs keyed off of consumer
168
+ // (2) fetch via http using a url provided by the requester
169
+ // (3) some sort of specific discovery code based on request
170
+ //
171
+ // Either way should return a string representation of the certificate
172
+ protected abstract function fetch_public_cert(&$request);
173
+
174
+ // Up to the SP to implement this lookup of keys. Possible ideas are:
175
+ // (1) do a lookup in a table of trusted certs keyed off of consumer
176
+ //
177
+ // Either way should return a string representation of the certificate
178
+ protected abstract function fetch_private_cert(&$request);
179
+
180
+ public function build_signature($request, $consumer, $token) {
181
+ $base_string = $request->get_signature_base_string();
182
+ $request->base_string = $base_string;
183
+
184
+ // Fetch the private key cert based on the request
185
+ $cert = $this->fetch_private_cert($request);
186
+
187
+ // Pull the private key ID from the certificate
188
+ $privatekeyid = openssl_get_privatekey($cert);
189
+
190
+ // Sign using the key
191
+ $ok = openssl_sign($base_string, $signature, $privatekeyid);
192
+
193
+ // Release the key resource
194
+ openssl_free_key($privatekeyid);
195
+
196
+ return base64_encode($signature);
197
+ }
198
+
199
+ public function check_signature($request, $consumer, $token, $signature) {
200
+ $decoded_sig = base64_decode($signature);
201
+
202
+ $base_string = $request->get_signature_base_string();
203
+
204
+ // Fetch the public key cert based on the request
205
+ $cert = $this->fetch_public_cert($request);
206
+
207
+ // Pull the public key ID from the certificate
208
+ $publickeyid = openssl_get_publickey($cert);
209
+
210
+ // Check the computed signature against the one passed in the query
211
+ $ok = openssl_verify($base_string, $decoded_sig, $publickeyid);
212
+
213
+ // Release the key resource
214
+ openssl_free_key($publickeyid);
215
+
216
+ return $ok == 1;
217
+ }
218
+ }
219
+
220
+ class OAuthRequest {
221
+ private $parameters;
222
+ private $http_method;
223
+ private $http_url;
224
+ // for debug purposes
225
+ public $base_string;
226
+ public static $version = '1.0';
227
+ public static $POST_INPUT = 'php://input';
228
+
229
+ function __construct($http_method, $http_url, $parameters=NULL) {
230
+ @$parameters or $parameters = array();
231
+ $parameters = array_merge( OAuthUtil::parse_parameters(parse_url($http_url, PHP_URL_QUERY)), $parameters);
232
+ $this->parameters = $parameters;
233
+ $this->http_method = $http_method;
234
+ $this->http_url = $http_url;
235
+ }
236
+
237
+
238
+ /**
239
+ * attempt to build up a request from what was passed to the server
240
+ */
241
+ public static function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) {
242
+ $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on")
243
+ ? 'http'
244
+ : 'https';
245
+ @$http_url or $http_url = $scheme .
246
+ '://' . $_SERVER['HTTP_HOST'] .
247
+ ':' .
248
+ $_SERVER['SERVER_PORT'] .
249
+ $_SERVER['REQUEST_URI'];
250
+ @$http_method or $http_method = $_SERVER['REQUEST_METHOD'];
251
+
252
+ // We weren't handed any parameters, so let's find the ones relevant to
253
+ // this request.
254
+ // If you run XML-RPC or similar you should use this to provide your own
255
+ // parsed parameter-list
256
+ if (!$parameters) {
257
+ // Find request headers
258
+ $request_headers = OAuthUtil::get_headers();
259
+
260
+ // Parse the query-string to find GET parameters
261
+ $parameters = OAuthUtil::parse_parameters($_SERVER['QUERY_STRING']);
262
+
263
+ // It's a POST request of the proper content-type, so parse POST
264
+ // parameters and add those overriding any duplicates from GET
265
+ if ($http_method == "POST"
266
+ && @strstr($request_headers["Content-Type"],
267
+ "application/x-www-form-urlencoded")
268
+ ) {
269
+ $post_data = OAuthUtil::parse_parameters(
270
+ file_get_contents(self::$POST_INPUT)
271
+ );
272
+ $parameters = array_merge($parameters, $post_data);
273
+ }
274
+
275
+ // We have a Authorization-header with OAuth data. Parse the header
276
+ // and add those overriding any duplicates from GET or POST
277
+ if (@substr($request_headers['Authorization'], 0, 6) == "OAuth ") {
278
+ $header_parameters = OAuthUtil::split_header(
279
+ $request_headers['Authorization']
280
+ );
281
+ $parameters = array_merge($parameters, $header_parameters);
282
+ }
283
+
284
+ }
285
+
286
+ return new OAuthRequest($http_method, $http_url, $parameters);
287
+ }
288
+
289
+ /**
290
+ * pretty much a helper function to set up the request
291
+ */
292
+ public static function from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters=NULL) {
293
+ @$parameters or $parameters = array();
294
+ $defaults = array("oauth_version" => OAuthRequest::$version,
295
+ "oauth_nonce" => OAuthRequest::generate_nonce(),
296
+ "oauth_timestamp" => OAuthRequest::generate_timestamp(),
297
+ "oauth_consumer_key" => $consumer->key);
298
+ if ($token)
299
+ $defaults['oauth_token'] = $token->key;
300
+
301
+ $parameters = array_merge($defaults, $parameters);
302
+
303
+ return new OAuthRequest($http_method, $http_url, $parameters);
304
+ }
305
+
306
+ public function set_parameter($name, $value, $allow_duplicates = true) {
307
+ if ($allow_duplicates && isset($this->parameters[$name])) {
308
+ // We have already added parameter(s) with this name, so add to the list
309
+ if (is_scalar($this->parameters[$name])) {
310
+ // This is the first duplicate, so transform scalar (string)
311
+ // into an array so we can add the duplicates
312
+ $this->parameters[$name] = array($this->parameters[$name]);
313
+ }
314
+
315
+ $this->parameters[$name][] = $value;
316
+ } else {
317
+ $this->parameters[$name] = $value;
318
+ }
319
+ }
320
+
321
+ public function get_parameter($name) {
322
+ return isset($this->parameters[$name]) ? $this->parameters[$name] : null;
323
+ }
324
+
325
+ public function get_parameters() {
326
+ return $this->parameters;
327
+ }
328
+
329
+ public function unset_parameter($name) {
330
+ unset($this->parameters[$name]);
331
+ }
332
+
333
+ /**
334
+ * The request parameters, sorted and concatenated into a normalized string.
335
+ * @return string
336
+ */
337
+ public function get_signable_parameters() {
338
+ // Grab all parameters
339
+ $params = $this->parameters;
340
+
341
+ // Remove oauth_signature if present
342
+ // Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.")
343
+ if (isset($params['oauth_signature'])) {
344
+ unset($params['oauth_signature']);
345
+ }
346
+
347
+ return OAuthUtil::build_http_query($params);
348
+ }
349
+
350
+ /**
351
+ * Returns the base string of this request
352
+ *
353
+ * The base string defined as the method, the url
354
+ * and the parameters (normalized), each urlencoded
355
+ * and the concated with &.
356
+ */
357
+ public function get_signature_base_string() {
358
+ $parts = array(
359
+ $this->get_normalized_http_method(),
360
+ $this->get_normalized_http_url(),
361
+ $this->get_signable_parameters()
362
+ );
363
+
364
+ $parts = OAuthUtil::urlencode_rfc3986($parts);
365
+
366
+ return implode('&', $parts);
367
+ }
368
+
369
+ /**
370
+ * just uppercases the http method
371
+ */
372
+ public function get_normalized_http_method() {
373
+ return strtoupper($this->http_method);
374
+ }
375
+
376
+ /**
377
+ * parses the url and rebuilds it to be
378
+ * scheme://host/path
379
+ */
380
+ public function get_normalized_http_url() {
381
+ $parts = parse_url($this->http_url);
382
+
383
+ $port = @$parts['port'];
384
+ $scheme = $parts['scheme'];
385
+ $host = $parts['host'];
386
+ $path = @$parts['path'];
387
+
388
+ $port or $port = ($scheme == 'https') ? '443' : '80';
389
+
390
+ if (($scheme == 'https' && $port != '443')
391
+ || ($scheme == 'http' && $port != '80')) {
392
+ $host = "$host:$port";
393
+ }
394
+ return "$scheme://$host$path";
395
+ }
396
+
397
+ /**
398
+ * builds a url usable for a GET request
399
+ */
400
+ public function to_url() {
401
+ $post_data = $this->to_postdata();
402
+ $out = $this->get_normalized_http_url();
403
+ if ($post_data) {
404
+ $out .= '?'.$post_data;
405
+ }
406
+ return $out;
407
+ }
408
+
409
+ /**
410
+ * builds the data one would send in a POST request
411
+ */
412
+ public function to_postdata() {
413
+ return OAuthUtil::build_http_query($this->parameters);
414
+ }
415
+
416
+ /**
417
+ * builds the Authorization: header
418
+ */
419
+ public function to_header($realm=null) {
420
+ $first = true;
421
+ if($realm) {
422
+ $out = 'Authorization: OAuth realm="' . OAuthUtil::urlencode_rfc3986($realm) . '"';
423
+ $first = false;
424
+ } else
425
+ $out = 'Authorization: OAuth';
426
+
427
+ $total = array();
428
+ foreach ($this->parameters as $k => $v) {
429
+ if (substr($k, 0, 5) != "oauth") continue;
430
+ if (is_array($v)) {
431
+ throw new OAuthException('Arrays not supported in headers');
432
+ }
433
+ $out .= ($first) ? ' ' : ',';
434
+ $out .= OAuthUtil::urlencode_rfc3986($k) .
435
+ '="' .
436
+ OAuthUtil::urlencode_rfc3986($v) .
437
+ '"';
438
+ $first = false;
439
+ }
440
+ return $out;
441
+ }
442
+
443
+ public function __toString() {
444
+ return $this->to_url();
445
+ }
446
+
447
+
448
+ public function sign_request($signature_method, $consumer, $token) {
449
+ $this->set_parameter(
450
+ "oauth_signature_method",
451
+ $signature_method->get_name(),
452
+ false
453
+ );
454
+ $signature = $this->build_signature($signature_method, $consumer, $token);
455
+ $this->set_parameter("oauth_signature", $signature, false);
456
+ }
457
+
458
+ public function build_signature($signature_method, $consumer, $token) {
459
+ $signature = $signature_method->build_signature($this, $consumer, $token);
460
+ return $signature;
461
+ }
462
+
463
+ /**
464
+ * util function: current timestamp
465
+ */
466
+ private static function generate_timestamp() {
467
+ return time();
468
+ }
469
+
470
+ /**
471
+ * util function: current nonce
472
+ */
473
+ private static function generate_nonce() {
474
+ $mt = microtime();
475
+ $rand = mt_rand();
476
+
477
+ return md5($mt . $rand); // md5s look nicer than numbers
478
+ }
479
+ }
480
+
481
+ class OAuthServer {
482
+ protected $timestamp_threshold = 300; // in seconds, five minutes
483
+ protected $version = '1.0'; // hi blaine
484
+ protected $signature_methods = array();
485
+
486
+ protected $data_store;
487
+
488
+ function __construct($data_store) {
489
+ $this->data_store = $data_store;
490
+ }
491
+
492
+ public function add_signature_method($signature_method) {
493
+ $this->signature_methods[$signature_method->get_name()] =
494
+ $signature_method;
495
+ }
496
+
497
+ // high level functions
498
+
499
+ /**
500
+ * process a request_token request
501
+ * returns the request token on success
502
+ */
503
+ public function fetch_request_token(&$request) {
504
+ $this->get_version($request);
505
+
506
+ $consumer = $this->get_consumer($request);
507
+
508
+ // no token required for the initial token request
509
+ $token = NULL;
510
+
511
+ $this->check_signature($request, $consumer, $token);
512
+
513
+ // Rev A change
514
+ $callback = $request->get_parameter('oauth_callback');
515
+ $new_token = $this->data_store->new_request_token($consumer, $callback);
516
+
517
+ return $new_token;
518
+ }
519
+
520
+ /**
521
+ * process an access_token request
522
+ * returns the access token on success
523
+ */
524
+ public function fetch_access_token(&$request) {
525
+ $this->get_version($request);
526
+
527
+ $consumer = $this->get_consumer($request);
528
+
529
+ // requires authorized request token
530
+ $token = $this->get_token($request, $consumer, "request");
531
+
532
+ $this->check_signature($request, $consumer, $token);
533
+
534
+ // Rev A change
535
+ $verifier = $request->get_parameter('oauth_verifier');
536
+ $new_token = $this->data_store->new_access_token($token, $consumer, $verifier);
537
+
538
+ return $new_token;
539
+ }
540
+
541
+ /**
542
+ * verify an api call, checks all the parameters
543
+ */
544
+ public function verify_request(&$request) {
545
+ $this->get_version($request);
546
+ $consumer = $this->get_consumer($request);
547
+ $token = $this->get_token($request, $consumer, "access");
548
+ $this->check_signature($request, $consumer, $token);
549
+ return array($consumer, $token);
550
+ }
551
+
552
+ // Internals from here
553
+ /**
554
+ * version 1
555
+ */
556
+ private function get_version(&$request) {
557
+ $version = $request->get_parameter("oauth_version");
558
+ if (!$version) {
559
+ // Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.
560
+ // Chapter 7.0 ("Accessing Protected Ressources")
561
+ $version = '1.0';
562
+ }
563
+ if ($version !== $this->version) {
564
+ throw new OAuthException("OAuth version '$version' not supported");
565
+ }
566
+ return $version;
567
+ }
568
+
569
+ /**
570
+ * figure out the signature with some defaults
571
+ */
572
+ private function get_signature_method(&$request) {
573
+ $signature_method =
574
+ @$request->get_parameter("oauth_signature_method");
575
+
576
+ if (!$signature_method) {
577
+ // According to chapter 7 ("Accessing Protected Ressources") the signature-method
578
+ // parameter is required, and we can't just fallback to PLAINTEXT
579
+ throw new OAuthException('No signature method parameter. This parameter is required');
580
+ }
581
+
582
+ if (!in_array($signature_method,
583
+ array_keys($this->signature_methods))) {
584
+ throw new OAuthException(
585
+ "Signature method '$signature_method' not supported " .
586
+ "try one of the following: " .
587
+ implode(", ", array_keys($this->signature_methods))
588
+ );
589
+ }
590
+ return $this->signature_methods[$signature_method];
591
+ }
592
+
593
+ /**
594
+ * try to find the consumer for the provided request's consumer key
595
+ */
596
+ private function get_consumer(&$request) {
597
+ $consumer_key = @$request->get_parameter("oauth_consumer_key");
598
+ if (!$consumer_key) {
599
+ throw new OAuthException("Invalid consumer key");
600
+ }
601
+
602
+ $consumer = $this->data_store->lookup_consumer($consumer_key);
603
+ if (!$consumer) {
604
+ throw new OAuthException("Invalid consumer");
605
+ }
606
+
607
+ return $consumer;
608
+ }
609
+
610
+ /**
611
+ * try to find the token for the provided request's token key
612
+ */
613
+ private function get_token(&$request, $consumer, $token_type="access") {
614
+ $token_field = @$request->get_parameter('oauth_token');
615
+ $token = $this->data_store->lookup_token(
616
+ $consumer, $token_type, $token_field
617
+ );
618
+ if (!$token) {
619
+ throw new OAuthException("Invalid $token_type token: $token_field");
620
+ }
621
+ return $token;
622
+ }
623
+
624
+ /**
625
+ * all-in-one function to check the signature on a request
626
+ * should guess the signature method appropriately
627
+ */
628
+ private function check_signature(&$request, $consumer, $token) {
629
+ // this should probably be in a different method
630
+ $timestamp = @$request->get_parameter('oauth_timestamp');
631
+ $nonce = @$request->get_parameter('oauth_nonce');
632
+
633
+ $this->check_timestamp($timestamp);
634
+ $this->check_nonce($consumer, $token, $nonce, $timestamp);
635
+
636
+ $signature_method = $this->get_signature_method($request);
637
+
638
+ $signature = $request->get_parameter('oauth_signature');
639
+ $valid_sig = $signature_method->check_signature(
640
+ $request,
641
+ $consumer,
642
+ $token,
643
+ $signature
644
+ );
645
+
646
+ if (!$valid_sig) {
647
+ throw new OAuthException("Invalid signature");
648
+ }
649
+ }
650
+
651
+ /**
652
+ * check that the timestamp is new enough
653
+ */
654
+ private function check_timestamp($timestamp) {
655
+ if( ! $timestamp )
656
+ throw new OAuthException(
657
+ 'Missing timestamp parameter. The parameter is required'
658
+ );
659
+
660
+ // verify that timestamp is recentish
661
+ $now = time();
662
+ if (abs($now - $timestamp) > $this->timestamp_threshold) {
663
+ throw new OAuthException(
664
+ "Expired timestamp, yours $timestamp, ours $now"
665
+ );
666
+ }
667
+ }
668
+
669
+ /**
670
+ * check that the nonce is not repeated
671
+ */
672
+ private function check_nonce($consumer, $token, $nonce, $timestamp) {
673
+ if( ! $nonce )
674
+ throw new OAuthException(
675
+ 'Missing nonce parameter. The parameter is required'
676
+ );
677
+
678
+ // verify that the nonce is uniqueish
679
+ $found = $this->data_store->lookup_nonce(
680
+ $consumer,
681
+ $token,
682
+ $nonce,
683
+ $timestamp
684
+ );
685
+ if ($found) {
686
+ throw new OAuthException("Nonce already used: $nonce");
687
+ }
688
+ }
689
+
690
+ }
691
+
692
+ class OAuthDataStore {
693
+ function lookup_consumer($consumer_key) {
694
+ // implement me
695
+ }
696
+
697
+ function lookup_token($consumer, $token_type, $token) {
698
+ // implement me
699
+ }
700
+
701
+ function lookup_nonce($consumer, $token, $nonce, $timestamp) {
702
+ // implement me
703
+ }
704
+
705
+ function new_request_token($consumer, $callback = null) {
706
+ // return a new token attached to this consumer
707
+ }
708
+
709
+ function new_access_token($token, $consumer, $verifier = null) {
710
+ // return a new access token attached to this consumer
711
+ // for the user associated with this token if the request token
712
+ // is authorized
713
+ // should also invalidate the request token
714
+ }
715
+
716
+ }
717
+
718
+ class OAuthUtil {
719
+ public static function urlencode_rfc3986($input) {
720
+ if (is_array($input)) {
721
+ return array_map(array('OAuthUtil', 'urlencode_rfc3986'), $input);
722
+ } else if (is_scalar($input)) {
723
+ return str_replace(
724
+ '+',
725
+ ' ',
726
+ str_replace('%7E', '~', rawurlencode($input))
727
+ );
728
+ } else {
729
+ return '';
730
+ }
731
+ }
732
+
733
+
734
+ // This decode function isn't taking into consideration the above
735
+ // modifications to the encoding process. However, this method doesn't
736
+ // seem to be used anywhere so leaving it as is.
737
+ public static function urldecode_rfc3986($string) {
738
+ return urldecode($string);
739
+ }
740
+
741
+ // Utility function for turning the Authorization: header into
742
+ // parameters, has to do some unescaping
743
+ // Can filter out any non-oauth parameters if needed (default behaviour)
744
+ public static function split_header($header, $only_allow_oauth_parameters = true) {
745
+ $pattern = '/(([-_a-z]*)=("([^"]*)"|([^,]*)),?)/';
746
+ $offset = 0;
747
+ $params = array();
748
+ while (preg_match($pattern, $header, $matches, PREG_OFFSET_CAPTURE, $offset) > 0) {
749
+ $match = $matches[0];
750
+ $header_name = $matches[2][0];
751
+ $header_content = (isset($matches[5])) ? $matches[5][0] : $matches[4][0];
752
+ if (preg_match('/^oauth_/', $header_name) || !$only_allow_oauth_parameters) {
753
+ $params[$header_name] = OAuthUtil::urldecode_rfc3986($header_content);
754
+ }
755
+ $offset = $match[1] + strlen($match[0]);
756
+ }
757
+
758
+ if (isset($params['realm'])) {
759
+ unset($params['realm']);
760
+ }
761
+
762
+ return $params;
763
+ }
764
+
765
+ // helper to try to sort out headers for people who aren't running apache
766
+ public static function get_headers() {
767
+ if (function_exists('apache_request_headers')) {
768
+ // we need this to get the actual Authorization: header
769
+ // because apache tends to tell us it doesn't exist
770
+ $headers = apache_request_headers();
771
+
772
+ // sanitize the output of apache_request_headers because
773
+ // we always want the keys to be Cased-Like-This and arh()
774
+ // returns the headers in the same case as they are in the
775
+ // request
776
+ $out = array();
777
+ foreach( $headers AS $key => $value ) {
778
+ $key = str_replace(
779
+ " ",
780
+ "-",
781
+ ucwords(strtolower(str_replace("-", " ", $key)))
782
+ );
783
+ $out[$key] = $value;
784
+ }
785
+ } else {
786
+ // otherwise we don't have apache and are just going to have to hope
787
+ // that $_SERVER actually contains what we need
788
+ $out = array();
789
+ if( isset($_SERVER['CONTENT_TYPE']) )
790
+ $out['Content-Type'] = $_SERVER['CONTENT_TYPE'];
791
+ if( isset($_ENV['CONTENT_TYPE']) )
792
+ $out['Content-Type'] = $_ENV['CONTENT_TYPE'];
793
+
794
+ foreach ($_SERVER as $key => $value) {
795
+ if (substr($key, 0, 5) == "HTTP_") {
796
+ // this is chaos, basically it is just there to capitalize the first
797
+ // letter of every word that is not an initial HTTP and strip HTTP
798
+ // code from przemek
799
+ $key = str_replace(
800
+ " ",
801
+ "-",
802
+ ucwords(strtolower(str_replace("_", " ", substr($key, 5))))
803
+ );
804
+ $out[$key] = $value;
805
+ }
806
+ }
807
+ }
808
+ return $out;
809
+ }
810
+
811
+ // This function takes a input like a=b&a=c&d=e and returns the parsed
812
+ // parameters like this
813
+ // array('a' => array('b','c'), 'd' => 'e')
814
+ public static function parse_parameters( $input ) {
815
+ if (!isset($input) || !$input) return array();
816
+
817
+ $pairs = explode('&', $input);
818
+
819
+ $parsed_parameters = array();
820
+ foreach ($pairs as $pair) {
821
+ $split = explode('=', $pair, 2);
822
+ $parameter = OAuthUtil::urldecode_rfc3986($split[0]);
823
+ $value = isset($split[1]) ? OAuthUtil::urldecode_rfc3986($split[1]) : '';
824
+
825
+ if (isset($parsed_parameters[$parameter])) {
826
+ // We have already recieved parameter(s) with this name, so add to the list
827
+ // of parameters with this name
828
+
829
+ if (is_scalar($parsed_parameters[$parameter])) {
830
+ // This is the first duplicate, so transform scalar (string) into an array
831
+ // so we can add the duplicates
832
+ $parsed_parameters[$parameter] = array($parsed_parameters[$parameter]);
833
+ }
834
+
835
+ $parsed_parameters[$parameter][] = $value;
836
+ } else {
837
+ $parsed_parameters[$parameter] = $value;
838
+ }
839
+ }
840
+ return $parsed_parameters;
841
+ }
842
+
843
+ public static function build_http_query($params) {
844
+ if (!$params) return '';
845
+
846
+ // Urlencode both keys and values
847
+ $keys = OAuthUtil::urlencode_rfc3986(array_keys($params));
848
+ $values = OAuthUtil::urlencode_rfc3986(array_values($params));
849
+ $params = array_combine($keys, $values);
850
+
851
+ // Parameters are sorted by name, using lexicographical byte value ordering.
852
+ // Ref: Spec: 9.1.1 (1)
853
+ uksort($params, 'strcmp');
854
+
855
+ $pairs = array();
856
+ foreach ($params as $parameter => $value) {
857
+ if (is_array($value)) {
858
+ // If two or more parameters share the same name, they are sorted by their value
859
+ // Ref: Spec: 9.1.1 (1)
860
+ natsort($value);
861
+ foreach ($value as $duplicate_value) {
862
+ $pairs[] = $parameter . '=' . $duplicate_value;
863
+ }
864
+ } else {
865
+ $pairs[] = $parameter . '=' . $value;
866
+ }
867
+ }
868
+ // For each parameter, the name is separated from the corresponding value by an '=' character (ASCII code 61)
869
+ // Each name-value pair is separated by an '&' character (ASCII code 38)
870
+ return implode('&', $pairs);
871
+ }
872
+ }
873
+
874
+ ?>
lib/wp_twitteroauth.php ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Abraham Williams (abraham@abrah.am) http://abrah.am
5
+ *
6
+ * The first PHP Library to support OAuth for Twitter's REST API.
7
+ *
8
+ * Updated to reflect v 1.1 of the Twitter API by Liam Gladdy at Storm Consultancy (hello@stormconsultancy) http://www.stormconsultancy.co.uk
9
+ *
10
+ * Further tweaked for Wordpress to cope with (likely) multiple installations of OAuth and use the wp_remote_request() function by Martin Tod (martin@martintod.org.uk) http://www.martintod.org.uk
11
+ *
12
+ */
13
+
14
+ /* Load OAuth lib. You can find it at http://oauth.net */
15
+ if(!class_exists('OAuthException')) require_once('OAuth.php');
16
+
17
+ /**
18
+ * Twitter OAuth class
19
+ */
20
+ class wp_TwitterOAuth {
21
+ /* Contains the last HTTP status code returned. */
22
+ public $http_code;
23
+ /* Contains the last API call. */
24
+ public $url;
25
+ /* Set up the API root URL. */
26
+ public $host = "https://api.twitter.com/1.1/";
27
+ /* Set timeout default. */
28
+ public $timeout = 3;
29
+ /* Set connect timeout. */
30
+ public $connecttimeout = 2;
31
+ /* Verify SSL Cert. */
32
+ public $ssl_verifypeer = FALSE;
33
+ /* Respons format. */
34
+ public $format = 'json';
35
+ /* Decode returned json data. */
36
+ public $decode_json = FALSE;
37
+ /* Contains the last HTTP headers returned. */
38
+ public $http_info;
39
+ /* Set the useragnet. */
40
+ public $useragent = 'Twitter Feed for Wordpress Developers 1.0';
41
+ /* Immediately retry the API call if the response was not successful. */
42
+ //public $retry = TRUE;
43
+
44
+
45
+
46
+
47
+ /**
48
+ * Set API URLS
49
+ */
50
+ function accessTokenURL() { return 'https://api.twitter.com/oauth/access_token'; }
51
+ function authenticateURL() { return 'https://twitter.com/oauth/authenticate'; }
52
+ function authorizeURL() { return 'https://twitter.com/oauth/authorize'; }
53
+ function requestTokenURL() { return 'https://api.twitter.com/oauth/request_token'; }
54
+
55
+ /**
56
+ * Debug helpers
57
+ */
58
+ function lastStatusCode() { return $this->http_status; }
59
+ function lastAPICall() { return $this->last_api_call; }
60
+
61
+ /**
62
+ * construct TwitterOAuth object
63
+ */
64
+ function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) {
65
+ $this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1();
66
+ $this->consumer = new OAuthConsumer($consumer_key, $consumer_secret);
67
+ if (!empty($oauth_token) && !empty($oauth_token_secret)) {
68
+ $this->token = new OAuthConsumer($oauth_token, $oauth_token_secret);
69
+ } else {
70
+ $this->token = NULL;
71
+ }
72
+ }
73
+
74
+
75
+ /**
76
+ * Get a request_token from Twitter
77
+ *
78
+ * @returns a key/value array containing oauth_token and oauth_token_secret
79
+ */
80
+ function getRequestToken($oauth_callback = NULL) {
81
+ $parameters = array();
82
+ if (!empty($oauth_callback)) {
83
+ $parameters['oauth_callback'] = $oauth_callback;
84
+ }
85
+ $request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters);
86
+ $token = OAuthUtil::parse_parameters($request);
87
+ $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
88
+ return $token;
89
+ }
90
+
91
+ /**
92
+ * Get the authorize URL
93
+ *
94
+ * @returns a string
95
+ */
96
+ function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) {
97
+ if (is_array($token)) {
98
+ $token = $token['oauth_token'];
99
+ }
100
+ if (empty($sign_in_with_twitter)) {
101
+ return $this->authorizeURL() . "?oauth_token={$token}";
102
+ } else {
103
+ return $this->authenticateURL() . "?oauth_token={$token}";
104
+ }
105
+ }
106
+
107
+ /**
108
+ * Exchange request token and secret for an access token and
109
+ * secret, to sign API calls.
110
+ *
111
+ * @returns array("oauth_token" => "the-access-token",
112
+ * "oauth_token_secret" => "the-access-secret",
113
+ * "user_id" => "9436992",
114
+ * "screen_name" => "abraham")
115
+ */
116
+ function getAccessToken($oauth_verifier = FALSE) {
117
+ $parameters = array();
118
+ if (!empty($oauth_verifier)) {
119
+ $parameters['oauth_verifier'] = $oauth_verifier;
120
+ }
121
+ $request = $this->oAuthRequest($this->accessTokenURL(), 'GET', $parameters);
122
+ $token = OAuthUtil::parse_parameters($request);
123
+ $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
124
+ return $token;
125
+ }
126
+
127
+ /**
128
+ * One time exchange of username and password for access token and secret.
129
+ *
130
+ * @returns array("oauth_token" => "the-access-token",
131
+ * "oauth_token_secret" => "the-access-secret",
132
+ * "user_id" => "9436992",
133
+ * "screen_name" => "abraham",
134
+ * "x_auth_expires" => "0")
135
+ */
136
+ function getXAuthToken($username, $password) {
137
+ $parameters = array();
138
+ $parameters['x_auth_username'] = $username;
139
+ $parameters['x_auth_password'] = $password;
140
+ $parameters['x_auth_mode'] = 'client_auth';
141
+ $request = $this->oAuthRequest($this->accessTokenURL(), 'POST', $parameters);
142
+ $token = OAuthUtil::parse_parameters($request);
143
+ $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
144
+ return $token;
145
+ }
146
+
147
+ /**
148
+ * GET wrapper for oAuthRequest.
149
+ */
150
+ function get($url, $parameters = array()) {
151
+ $response = $this->oAuthRequest($url, 'GET', $parameters);
152
+ if ($this->format === 'json' && $this->decode_json) {
153
+ return json_decode($response,true);
154
+ }
155
+ return $response;
156
+ }
157
+
158
+ /**
159
+ * POST wrapper for oAuthRequest.
160
+ */
161
+ function post($url, $parameters = array()) {
162
+ $response = $this->oAuthRequest($url, 'POST', $parameters);
163
+ if ($this->format === 'json' && $this->decode_json) {
164
+ return json_decode($response,true);
165
+ }
166
+ return $response;
167
+ }
168
+
169
+ /**
170
+ * DELETE wrapper for oAuthReqeust.
171
+ */
172
+ function delete($url, $parameters = array()) {
173
+ $response = $this->oAuthRequest($url, 'DELETE', $parameters);
174
+ if ($this->format === 'json' && $this->decode_json) {
175
+ return json_decode($response,true);
176
+ }
177
+ return $response;
178
+ }
179
+
180
+ /**
181
+ * Format and sign an OAuth / API request
182
+ */
183
+ function oAuthRequest($url, $method, $parameters) {
184
+ if (strrpos($url, 'https://') !== 0 && strrpos($url, 'http://') !== 0) {
185
+ $url = "{$this->host}{$url}.{$this->format}";
186
+ }
187
+ $request = OAuthRequest::from_consumer_and_token($this->consumer, $this->token, $method, $url, $parameters);
188
+ $request->sign_request($this->sha1_method, $this->consumer, $this->token);
189
+ switch ($method) {
190
+ case 'GET':
191
+ return $this->http($request->to_url(), 'GET');
192
+ default:
193
+ return $this->http($request->get_normalized_http_url(), $method, $request->to_postdata());
194
+ }
195
+ }
196
+
197
+ /**
198
+ * Make an HTTP request
199
+ *
200
+ * @return API results
201
+ */
202
+ function http($url, $method, $postfields = NULL) {
203
+ $args['method']=$method;
204
+ if(!empty($args)):
205
+ $args['body'] = $postfields;
206
+ endif;
207
+ $response = wp_remote_request($url,$args);
208
+ return($response);
209
+ /*
210
+ $this->http_info = array();
211
+ $ci = curl_init();
212
+ # Curl settings
213
+ curl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);
214
+ curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);
215
+ curl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);
216
+ curl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);
217
+ curl_setopt($ci, CURLOPT_HTTPHEADER, array('Expect:'));
218
+ curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);
219
+ curl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));
220
+ curl_setopt($ci, CURLOPT_HEADER, FALSE);
221
+
222
+ switch ($method) {
223
+ case 'POST':
224
+ curl_setopt($ci, CURLOPT_POST, TRUE);
225
+ if (!empty($postfields)) {
226
+ curl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);
227
+ }
228
+ break;
229
+ case 'DELETE':
230
+ curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');
231
+ if (!empty($postfields)) {
232
+ $url = "{$url}?{$postfields}";
233
+ }
234
+ }
235
+
236
+ curl_setopt($ci, CURLOPT_URL, $url);
237
+ $response = curl_exec($ci);
238
+ $this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);
239
+ $this->http_info = array_merge($this->http_info, curl_getinfo($ci));
240
+ $this->url = $url;
241
+ curl_close ($ci);
242
+ return $response;
243
+ */
244
+ }
245
+
246
+ /**
247
+ * Get the header info to store.
248
+ */
249
+ function getHeader($ch, $header) {
250
+ $i = strpos($header, ':');
251
+ if (!empty($i)) {
252
+ $key = str_replace('-', '_', strtolower(substr($header, 0, $i)));
253
+ $value = trim(substr($header, $i + 2));
254
+ $this->http_header[$key] = $value;
255
+ }
256
+ return strlen($header);
257
+ }
258
+ }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: shortcode,widget,twitter,rotating,rotate,rotator,tweet,tweets,animation,jquery,jquery cycle,cycle,multilingual
5
  Requires at least: 2.6
6
  Tested up to: 3.5
7
- Stable tag: 0.625
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,6 +12,7 @@ Twitter widget and shortcode to show your latest tweets one at a time an animate
12
 
13
  == Description ==
14
  * **Replaces a [shortcode](http://codex.wordpress.org/Shortcode) such as `[rotatingtweets screen_name='your_twitter']`, or a [widget](http://codex.wordpress.org/WordPress_Widgets), with a rotating display of your most recent tweets**
 
15
  * **Space efficient** - instead of showing all your tweets at once, shows one at a time and then smoothly replaces it with the next one. After showing all your tweets, loops back to the beginning again.
16
  * **Reliable** - keeps showing your latest Tweets even if the Twitter website is down.
17
  * **Customisable** - you decide whose tweets to show, how many to show, whether to include retweets and replies, and whether to show a follow button. You can also decide how quickly the tweets rotate and what type of animation to use.
@@ -29,6 +30,10 @@ If you'd like to see what the plug-in looks like in action, you can [see the plu
29
  = Installation =
30
  1. Upload the contents of `rotatingtweets.zip` to the `/wp-content/plugins/` directory or use the Wordpress installer
31
  1. Activate the plugin through the 'Plugins' menu in WordPress
 
 
 
 
32
  1. Place a shortcode such `[rotatingtweets screen_name='mpntod']` in your post or page, or use a widget
33
 
34
  = Set-up =
@@ -68,10 +73,13 @@ In most cases, each use (or "instance") of this plug-in gets data from Twitter e
68
  You can do this by going to the `rotatingtweets/css` directory and renaming `yourstyle-sample.css` to `yourstyle.css`. This displays a Twitter bird to the left of your tweets. Any CSS you put into `yourstyle.css` won't be overwritten when the plug-in is upgraded to the latest version.
69
 
70
  == Upgrade notice ==
71
- = 0.625 =
72
- Enables users to make all links open in a new tab or window
73
 
74
  == Changelog ==
 
 
 
75
  = 0.625 =
76
  Enabled users to make all links open in a new tab or window
77
 
@@ -179,3 +187,12 @@ First published version
179
  1. This animation shows rotating tweets inserted into a blog-post via a short code. It is slightly faster than the default setting, but gives a sense of what you get.
180
  2. You can add rotating tweets via a Widget:
181
  3. Or by using a shortcode:
 
 
 
 
 
 
 
 
 
4
  Tags: shortcode,widget,twitter,rotating,rotate,rotator,tweet,tweets,animation,jquery,jquery cycle,cycle,multilingual
5
  Requires at least: 2.6
6
  Tested up to: 3.5
7
+ Stable tag: 0.700
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
12
 
13
  == Description ==
14
  * **Replaces a [shortcode](http://codex.wordpress.org/Shortcode) such as `[rotatingtweets screen_name='your_twitter']`, or a [widget](http://codex.wordpress.org/WordPress_Widgets), with a rotating display of your most recent tweets**
15
+ * **Supports v 1.1 of the API** - yes! it will keep working after March 2013
16
  * **Space efficient** - instead of showing all your tweets at once, shows one at a time and then smoothly replaces it with the next one. After showing all your tweets, loops back to the beginning again.
17
  * **Reliable** - keeps showing your latest Tweets even if the Twitter website is down.
18
  * **Customisable** - you decide whose tweets to show, how many to show, whether to include retweets and replies, and whether to show a follow button. You can also decide how quickly the tweets rotate and what type of animation to use.
30
  = Installation =
31
  1. Upload the contents of `rotatingtweets.zip` to the `/wp-content/plugins/` directory or use the Wordpress installer
32
  1. Activate the plugin through the 'Plugins' menu in WordPress
33
+ 1. Go to the [My applications page](https://dev.twitter.com/apps) on the Twitter website to set up your website as a new Twitter 'application'. You may need to log-in using your Twitter user name and password.
34
+ 1. If you don't already have a suitable 'application' to use for your website, set one up on the [Create an Application page](https://dev.twitter.com/apps/new). It's normally best to use the name, description and website URL of the website where you plan to use Rotating Tweets. You don't need a Callback URL.
35
+ 1. After clicking **Create your Twitter application**, on the following page, click on **Create my access token**.
36
+ 1. Copy the **Consumer key**, **Consumer secret**, **Access token** and **Access token secret** from your Twitter application page into the Rotating Tweets settings page. Hit save. If there is a problem, you will see an error message.
37
  1. Place a shortcode such `[rotatingtweets screen_name='mpntod']` in your post or page, or use a widget
38
 
39
  = Set-up =
73
  You can do this by going to the `rotatingtweets/css` directory and renaming `yourstyle-sample.css` to `yourstyle.css`. This displays a Twitter bird to the left of your tweets. Any CSS you put into `yourstyle.css` won't be overwritten when the plug-in is upgraded to the latest version.
74
 
75
  == Upgrade notice ==
76
+ = 0.700 =
77
+ Important upgrade needed for Rotating Tweets to keep working after March 2013. Supports version 1.1 of the Twitter API.
78
 
79
  == Changelog ==
80
+ = 0.700 =
81
+ Supports version 1.1 of the Twitter API
82
+
83
  = 0.625 =
84
  Enabled users to make all links open in a new tab or window
85
 
187
  1. This animation shows rotating tweets inserted into a blog-post via a short code. It is slightly faster than the default setting, but gives a sense of what you get.
188
  2. You can add rotating tweets via a Widget:
189
  3. Or by using a shortcode:
190
+
191
+ == Credits ==
192
+ Most of this is my own work, but special thanks are owed to:
193
+
194
+ * The [jQuery](http://jquery.com/) team
195
+ * [Mike Alsup](http://jquery.malsup.com/cycle/) for [jQuery.Cycle](http://jquery.malsup.com/cycle/)
196
+ * [Abraham Williams](http://abrah.am) for [TwitterOAuth](https://github.com/abraham/twitteroauth)
197
+ * [Liam Gaddy](http://profiles.wordpress.org/lgladdy/) at [Storm Consultancy](http://www.stormconsultancy.co.uk/) for [his work](http://www.stormconsultancy.co.uk/blog/development/tools-plugins/oauth-twitter-feed-for-developers-library-and-wordpress-plugin/) on [oAuth Twitter Feed for Developers](http://wordpress.org/extend/plugins/oauth-twitter-feed-for-developers/) (although I ended up using it for inspiration rather than plugging it in directly).
198
+ * All the people who have given advice and suggested improvements
rotatingtweets.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Rotating Tweets (Twitter widget & shortcode)
4
  Description: Replaces a shortcode such as [rotatingtweets screen_name='your_twitter_name'], or a widget, with a rotating tweets display
5
- Version: 0.625
6
  Text Domain: rotatingtweets
7
  Author: Martin Tod
8
  Author URI: http://www.martintod.org.uk
@@ -30,7 +30,7 @@ License: GPL2
30
  * @since 3.3.2
31
  *
32
  */
33
-
34
  /**
35
  * rotatingtweets_Widget_Class
36
  * Shows tweets sequentially for a given user
@@ -45,21 +45,16 @@ class rotatingtweets_Widget extends WP_Widget {
45
 
46
  /** @see WP_Widget::widget */
47
  function widget($args, $instance) {
48
- extract( $args );
49
  $title = apply_filters('widget_title', $instance['title']);
50
- $newargs['screen_name'] = $instance['tw_screen_name'];
51
- $newargs['include_rts'] = $instance['tw_include_rts'];
52
- $newargs['exclude_replies'] = $instance['tw_exclude_replies'];
53
- $newargs['links_in_new_window'] = $instance['tw_links_in_new_window'];
54
- $newargs['tweet_count'] = $instance['tw_tweet_count'];
55
- $newargs['show_follow'] = $instance['tw_show_follow'];
56
- $newargs['timeout'] = $instance['tw_timeout'];
57
- $newargs['show_meta_timestamp'] = !$instance['tw_hide_meta_timestamp'];
58
- $newargs['show_meta_screen_name'] = !$instance['tw_hide_meta_screen_name'];
59
- $newargs['show_meta_via'] = !$instance['tw_hide_meta_via'];
60
- $newargs['rotation_type'] = $instance['tw_rotation_type'];
61
- $newargs['show_meta_reply_retweet_favorite'] = $instance['tw_show_meta_reply_retweet_favorite'];
62
- $newargs['official_format'] = $instance['tw_official_format'];
63
  switch($newargs['show_follow']) {
64
  case 2:
65
  $newargs['no_show_count'] = TRUE;
@@ -278,7 +273,7 @@ function rotatingtweets_intents($twitter_object,$lang, $icons = 1,$targetvalue='
278
  array ( 'link'=>'https://twitter.com/intent/favorite?tweet_id=', 'icon'=>'images/favorite.png', 'text' => __('favorite', 'rotatingtweets'))
279
  );
280
  foreach($types as $type) {
281
- $string = "\n\t\t\t<a href='".$type['link'].$twitter_object->id_str."' title='".esc_attr($type['text'])."' lang='{$lang}'{$targetvalue}>";
282
  switch($icons) {
283
  case 2:
284
  $addstring[] = $string."<img src='".plugins_url($type['icon'],__FILE__)."' width='16' height='16' alt='".esc_attr($type['text'])."' /> {$type['text']}</a>";
@@ -300,16 +295,16 @@ function rotatingtweets_intents($twitter_object,$lang, $icons = 1,$targetvalue='
300
  }
301
  // Produces a link to someone's name, icon or screen name (or to the text of your choice) using the 'intent' format for linking
302
  function rotatingtweets_user_intent($person,$lang,$linkcontent,$targetvalue='') {
303
- $return = "<a href='https://twitter.com/intent/user?user_id={$person->id}' title='".esc_attr($person->name)."' lang='{$lang}'{$targetvalue}>";
304
  switch($linkcontent){
305
  case 'icon':
306
- $return .= "<img src='{$person->profile_image_url}' alt='".esc_attr($person->name)."' /></a>";
307
  break;
308
  case 'name':
309
- $return .= $person->name."</a>";
310
  break;
311
  case 'screen_name':
312
- $return .= "@".$person->screen_name."</a>";
313
  break;
314
  default:
315
  $return .= $linkcontent."</a>";
@@ -319,9 +314,9 @@ function rotatingtweets_user_intent($person,$lang,$linkcontent,$targetvalue='')
319
  }
320
  // Produces a linked timestamp for including in the tweet
321
  function rotatingtweets_timestamp_link($twitter_object,$timetype = 'default',$targetvalue='') {
322
- $string = '<a '.$targetvalue.' href="https://twitter.com/twitterapi/status/'.$twitter_object->id_str.'">';
323
- $tweettimestamp = strtotime($twitter_object->created_at );
324
- // echo "<!-- ".$twitter_object->created_at . " | " .get_option('timezone_string') ." | $tweettimestamp -->";
325
  switch($timetype) {
326
  case 'short':
327
  $string .= rotatingtweets_contextualtime_short($tweettimestamp);
@@ -373,8 +368,6 @@ function rotatingtweets_display_shortcode( $atts, $content=null, $code="", $prin
373
  'ratelimit' => FALSE
374
  ), $atts ) ;
375
  extract($args);
376
- # Enables you to trigger rate limiting to test the plug-in - not recommended!
377
- if($ratelimit) rotatingtweets_trigger_rate_limiting();
378
  # Makes sure the scripts are listed
379
  rotatingtweets_enqueue_scripts();
380
  $tweets = rotatingtweets_get_tweets($screen_name,$include_rts,$exclude_replies);
@@ -383,6 +376,152 @@ function rotatingtweets_display_shortcode( $atts, $content=null, $code="", $prin
383
  }
384
  add_shortcode( 'rotatingtweets', 'rotatingtweets_display_shortcode' );
385
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
386
  # Get the latest data from Twitter (or from a cache if it's been less than 2 minutes since the last load)
387
  function rotatingtweets_get_tweets($tw_screen_name,$tw_include_rts,$tw_exclude_replies) {
388
  # Clear up variables
@@ -394,10 +533,11 @@ function rotatingtweets_get_tweets($tw_screen_name,$tw_include_rts,$tw_exclude_r
394
  $optionname = "rotatingtweets-cache";
395
  $option = get_option($optionname);
396
  # Attempt to deal with 'Cannot use string offset as an array' error
397
- if(is_array($option)):
398
  $latest_json = $option[$stringname]['json'];
399
  $latest_json_date = $option[$stringname]['datetime'];
400
  $timegap = time()-$latest_json_date;
 
401
  else:
402
  # Clears the cache and forces a reload
403
  $timegap = $cache_delay + 1;
@@ -405,32 +545,33 @@ function rotatingtweets_get_tweets($tw_screen_name,$tw_include_rts,$tw_exclude_r
405
  endif;
406
  # Checks if it is time to call Twitter directly yet or if it should use the cache
407
  if($timegap > $cache_delay):
408
- $callstring = "http://api.twitter.com/1/statuses/user_timeline.json?screen_name=".urlencode($tw_screen_name)."&include_entities=1&count=70&include_rts=".$tw_include_rts."&exclude_replies=".$tw_exclude_replies;
409
- $twitterdata = wp_remote_request($callstring);
410
  if(!is_wp_error($twitterdata)):
411
- $twitterjson = json_decode($twitterdata['body']);
412
  else:
413
  set_transient('rotatingtweets_wp_error',$twitterdata->get_error_messages(), 120);
414
  endif;
415
  endif;
416
  # Checks for errors in the reply
417
- if(!empty($twitterjson->errors)):
418
  # If there's an error, reset the cache timer to make sure we don't hit Twitter too hard and get rate limited.
 
419
  $option[$stringname]['datetime']=time();
420
  update_option($optionname,$option);
421
- elseif(!empty($twitterjson->error)):
422
  # If Twitter is being rate limited, delays the next load until the reset time
423
  # For some reason the rate limiting error has a different error variable!
424
  $rate = rotatingtweets_get_rate_data();
425
- if($rate && $rate->remaining_hits == 0):
426
- $option[$stringname]['datetime']= $rate->reset_time_in_seconds - $cache_delay + 1;
427
  update_option($optionname,$option);
428
  endif;
429
  elseif(!empty($twitterjson)):
430
  # If there's regular data, then update the cache and return the data
431
  unset($firstentry);
432
  if(is_array($twitterjson)) $firstentry = $twitterjson[0];
433
- if(!empty($firstentry->text)):
434
  $latest_json = $twitterjson;
435
  $option[$stringname]['json']=$latest_json;
436
  $option[$stringname]['datetime']=time();
@@ -442,11 +583,20 @@ function rotatingtweets_get_tweets($tw_screen_name,$tw_include_rts,$tw_exclude_r
442
 
443
  # Gets the rate limiting data to see how long it will be before we can tweet again
444
  function rotatingtweets_get_rate_data() {
445
- $callstring = "http://api.twitter.com/1/account/rate_limit_status.json";
446
- $ratedata = wp_remote_request($callstring);
 
 
447
  if(!is_wp_error($ratedata)):
448
- $rate = json_decode($ratedata['body']);
449
- return($rate);
 
 
 
 
 
 
 
450
  else:
451
  set_transient('rotatingtweets_wp_error',$ratedata->get_error_messages(), 120);
452
  return(FALSE);
@@ -472,11 +622,12 @@ function rotatingtweets_get_twitter_language() {
472
  $option['datetime'] = time();
473
  endif;
474
  if($timegap > $cache_delay):
475
- $callstring = "https://api.twitter.com/1/help/languages.json";
476
- $twitterdata = wp_remote_request($callstring);
 
477
  if(!is_wp_error($twitterdata)):
478
- $twitterjson = json_decode($twitterdata['body']);
479
- if(!empty($twitterjson->errors)||!empty($twitterjson->error)):
480
  # If there's an error, reset the cache timer to make sure we don't hit Twitter too hard and get rate limited.
481
  $option['datetime']=time();
482
  update_option($optionname,$option);
@@ -485,7 +636,7 @@ function rotatingtweets_get_twitter_language() {
485
  $latest_languages = array();
486
  if(is_array($twitterjson)):
487
  foreach($twitterjson as $langarray):
488
- $latest_languages[] = $langarray->code;
489
  endforeach;
490
  endif;
491
  if(!empty($latest_languages)):
@@ -505,9 +656,11 @@ function rotatingtweets_get_twitter_language() {
505
 
506
  # This function is used for debugging what happens when the site is rate-limited - best not used otherwise!
507
  function rotatingtweets_trigger_rate_limiting() {
508
- $callstring = "http://api.twitter.com/1/statuses/user_timeline.json?screen_name=twitter";
 
509
  for ($i=1; $i<150; $i++) {
510
- $ratedata = wp_remote_request($callstring);
 
511
  }
512
  }
513
 
@@ -551,9 +704,9 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
551
  $result .= "\n\t<div class = 'rotatingtweet'><p class='rtw_main'>". __('Problem retrieving data from Twitter','rotatingtweets'). "</p></div>";
552
  $rate = rotatingtweets_get_rate_data();
553
  # Check if the problem is rate limiting
554
- if($rate && $rate->remaining_hits == 0):
555
  $result .= "\n\t<div class = 'rotatingtweet' style='display:none'><p class='rtw_main'>". sprintf(__('This website is currently <a href=\'%s\'>rate-limited by Twitter</a>.','rotatingtweets'),'https://dev.twitter.com/docs/rate-limiting-faq') . "</p></div>";
556
- $waittimevalue = intval(($rate->reset_time_in_seconds - time())/60);
557
  $waittime = sprintf(_n('Next attempt to get data will be in %d minute','Next attempt to get data will be in %d minutes',$waittimevalue,'rotatingtweets'),$waittimevalue);
558
  if($waittimevalue == 0) $waittime = __("Next attempt to get data will be in less than a minute",'rotatingtweets');
559
  $result .= "\n\t<div class = 'rotatingtweet' style='display:none'><p class='rtw_main'>{$waittime}.</p></div>";
@@ -570,8 +723,8 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
570
  $tweet_counter = 0;
571
  $rate = rotatingtweets_get_rate_data();
572
  # Check if the problem is rate limiting
573
- if($rate && $rate->remaining_hits == 0):
574
- $waittimevalue = intval(($rate->reset_time_in_seconds - time())/60);
575
  $result .= "<!-- Rate limited -- ";
576
  $result .= sprintf(_n('Next attempt to get data will be in %d minute','Next attempt to get data will be in %d minutes',$waittimevalue,'rotatingtweets'),$waittimevalue)." -->";
577
  endif;
@@ -590,44 +743,45 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
590
  $result .= "\n\t<div class = 'rotatingtweet' style='display:none'>";
591
  endif;
592
  # Now to process the text
593
- $main_text = $twitter_object->text;
 
594
  if(!empty($main_text)):
595
- $user = $twitter_object->user;
596
  $tweetuser = $user;
597
  # Now the substitutions
598
- $entities = $twitter_object->entities;
599
  # Fix up retweets, links, hashtags and use names
600
  unset($before);
601
  unset($after);
602
  unset($retweeter);
603
  # First clean up the retweets
604
- if(isset($twitter_object->retweeted_status)):
605
- $rt_data = $twitter_object->retweeted_status;
606
  else:
607
  unset($rt_data);
608
  endif;
609
  if(!empty($rt_data)):
610
- $rt_user = $rt_data->user;
611
  if($args['official_format']):
612
- $main_text = $rt_data->text;
613
  $retweeter = $user;
614
  $tweetuser = $rt_user;
615
  else:
616
- $main_text = "RT @".$rt_user->screen_name . " " . $rt_data->text;
617
  endif;
618
- $before[] = "*@".$rt_user->screen_name."\b*i";
619
  $after[] = rotatingtweets_user_intent($rt_user,$twitterlocale,'screen_name',$targetvalue);
620
- $entities = $rt_data->entities;
621
  endif;
622
  # First the user mentions
623
- if(isset($entities->user_mentions)):
624
- $user_mentions = $entities->user_mentions;
625
  else:
626
  unset($user_mentions);
627
  endif;
628
  if(!empty($user_mentions)):
629
  foreach($user_mentions as $user_mention):
630
- $before[] = "*@".$user_mention->screen_name."\b*i";
631
  $after[] = rotatingtweets_user_intent($user_mention,$twitterlocale,'screen_name',$targetvalue);
632
  endforeach;
633
  # Clearing up duplicates to avoid strange result (possibly risky?)
@@ -635,34 +789,37 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
635
  $after = array_unique($after);
636
  endif;
637
  # Now the URLs
638
- if(isset($entities->urls)):
639
- $urls = $entities->urls;
640
  else:
641
  unset($urls);
642
  endif;
643
  if(!empty($urls)):
644
  foreach($urls as $url):
645
- $before[] = "*".$url->url."*";
646
- $displayurl = $url->display_url;
647
  if(strlen($displayurl)>$urllength):
648
  # PHP sometimes has a really hard time with unicode characters - this one removes the ellipsis
649
  $displayurl = str_replace(json_decode('"\u2026"'),"",$displayurl);
650
  $displayurl = substr($displayurl,0,$urllength)."&hellip;";
651
  endif;
652
- $after[] = "<a href='".$url->url."' title='".$url->expanded_url."'".$targetvalue.">".esc_html($displayurl)."</a>";
653
  endforeach;
654
  endif;
655
- if(isset($entities->media)):
656
- $media = $entities->media;
657
  else:
658
  unset($media);
659
  endif;
660
  if(!empty($media)):
661
  foreach($media as $medium):
662
- $before[] = "*".$medium->url."*";
663
- $displayurl = $medium->display_url;
664
- if(strlen($displayurl)>30) $displayurl = substr($displayurl,0,30)."&hellip;";
665
- $after[] = "<a href='".$medium->url."' title='".$medium->expanded_url."'".$targetvalue.">".esc_html($displayurl)."</a>";
 
 
 
666
  endforeach;
667
  endif;
668
  $before[]="%#([0-9]*[a-zA-Z]+\w*)%";
@@ -680,11 +837,11 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
680
  endif;
681
  if($args['show_meta_screen_name']):
682
  if(!empty($meta)) $meta .= ' ';
683
- $meta .= sprintf(__('from <a href=\'%1$s\' title=\'%2$s\'>%2$s\'s Twitter</a>','rotatingtweets'),'https://twitter.com/intent/user?user_id='.$user->id,$user->name);
684
  endif;
685
  if($args['show_meta_via']):
686
  if(!empty($meta)) $meta .= ' ';
687
- $meta .=sprintf(__("via %s",'rotatingtweets'),$twitter_object->source);
688
  endif;
689
  if($args['show_meta_reply_retweet_favorite']):
690
  if(!empty($meta)) $meta .= ' &middot; ';
@@ -704,7 +861,7 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
704
  $result .= "\n\t<div class='rtw_meta'><div class='rtw_intents'>".rotatingtweets_intents($twitter_object,$twitterlocale, 1,$targetvalue).'</div>';
705
  $result .= rotatingtweets_timestamp_link($twitter_object,'long',$targetvalue);
706
  if(isset($retweeter)) {
707
- $result .= " &middot; ".rotatingtweets_user_intent($retweeter,$twitterlocale,sprintf(__('Retweeted by %s','rotatingtweets'),$retweeter->name),$targetvalue);
708
  }
709
  $result .= "\n</div>";
710
  break;
@@ -720,7 +877,7 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
720
  $result .= "\n\t\t<p class='rtw_main'>".$main_text."</p>";
721
  // $result .= "\n\t\t<div class='rtw_meta'><div class='rtw_intents'>".rotatingtweets_intents($twitter_object,$twitterlocale, 1).'</div>';
722
  if(isset($retweeter)) {
723
- $result .= "\n\t\t<div class='rtw_rt_meta'>".rotatingtweets_user_intent($retweeter,$twitterlocale,"<img src='".plugins_url('images/retweet_on.png',__FILE__)."' width='16' height='16' alt='".sprintf(__('Retweeted by %s','rotatingtweets'),$retweeter->name)."' />".sprintf(__('Retweeted by %s','rotatingtweets'),$retweeter->name),$targetvalue)."</div>";
724
  }
725
  $result .= "\n\t\t<div class='rtw_meta'><span class='rtw_expand' style='display:none;'>".__('Expand','rotatingtweets')."</span><span class='rtw_intents'>".rotatingtweets_intents($twitter_object,$twitterlocale, 2,$targetvalue).'</span>';
726
  $result .= "</div></div></div>";
@@ -729,7 +886,7 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
729
  # This one uses the twitter standard approach for embedding via their javascript API - unfortunately I can't work out how to make it work with the rotating tweet javascript! If anyone can work out how to calculate the height of a oEmbed Twitter tweet, I will be very grateful! :-)
730
  $result .= '<blockquote class="twitter-tweet">';
731
  $result .= "<p>".$main_text."</p>";
732
- $result .= '&mdash; '.$user->name.' (@'.$user->screen_name.') <a href="https://twitter.com/twitterapi/status/'.$twitter_object->id_str.'" data-datetime="'.date('c',strtotime($twitter_object->created_at)).'"'.$targetvalue.'>'.date_i18n(get_option('date_format') ,strtotime($twitter_object->created_at)).'</a>';
733
  $result .= '</blockquote>';
734
  break;
735
  }
@@ -752,12 +909,12 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
752
  $result .= "</div>";
753
  endif;
754
  */
755
- if($args['show_follow'] && !empty($user->screen_name)):
756
  $shortenvariables = '';
757
  if($args['no_show_count']) $shortenvariables = ' data-show-count="false"';
758
  if($args['no_show_screen_name']) $shortenvariables .= ' data-show-screen-name="false"';
759
- $followUserText = sprintf(__('Follow @%s','rotatingtweets'),$user->screen_name);
760
- $result .= "\n<div class='rtw_follow follow-button'><a href='http://twitter.com/".$user->screen_name."' class='twitter-follow-button'{$shortenvariables} title='".$followUserText."' data-lang='{$twitterlocale}'>".$followUserText."</a></div>";
761
  endif;
762
  rotatingtweets_enqueue_scripts();
763
  if($print) echo $result;
2
  /*
3
  Plugin Name: Rotating Tweets (Twitter widget & shortcode)
4
  Description: Replaces a shortcode such as [rotatingtweets screen_name='your_twitter_name'], or a widget, with a rotating tweets display
5
+ Version: 0.700
6
  Text Domain: rotatingtweets
7
  Author: Martin Tod
8
  Author URI: http://www.martintod.org.uk
30
  * @since 3.3.2
31
  *
32
  */
33
+ require_once('lib/wp_twitteroauth.php');
34
  /**
35
  * rotatingtweets_Widget_Class
36
  * Shows tweets sequentially for a given user
45
 
46
  /** @see WP_Widget::widget */
47
  function widget($args, $instance) {
48
+ extract( $args );
49
  $title = apply_filters('widget_title', $instance['title']);
50
+ $positive_variables = array('screen_name','include_rts','exclude_replies','links_in_new_window','tweet_count','show_follow','timeout','rotation_type','show_meta_reply_retweet_favorite','official_format');
51
+ foreach($positive_variables as $var) {
52
+ $newargs[$var] = $instance['tw_'.$var];
53
+ }
54
+ $negative_variables = array('meta_timestamp','meta_screen_name','meta_via');
55
+ foreach($negative_variables as $var) {
56
+ $newargs['show_'.$var] = !$instance['tw_hide_'.$var];
57
+ }
 
 
 
 
 
58
  switch($newargs['show_follow']) {
59
  case 2:
60
  $newargs['no_show_count'] = TRUE;
273
  array ( 'link'=>'https://twitter.com/intent/favorite?tweet_id=', 'icon'=>'images/favorite.png', 'text' => __('favorite', 'rotatingtweets'))
274
  );
275
  foreach($types as $type) {
276
+ $string = "\n\t\t\t<a href='".$type['link'].$twitter_object['id_str']."' title='".esc_attr($type['text'])."' lang='{$lang}'{$targetvalue}>";
277
  switch($icons) {
278
  case 2:
279
  $addstring[] = $string."<img src='".plugins_url($type['icon'],__FILE__)."' width='16' height='16' alt='".esc_attr($type['text'])."' /> {$type['text']}</a>";
295
  }
296
  // Produces a link to someone's name, icon or screen name (or to the text of your choice) using the 'intent' format for linking
297
  function rotatingtweets_user_intent($person,$lang,$linkcontent,$targetvalue='') {
298
+ $return = "<a href='https://twitter.com/intent/user?user_id={$person['id']}' title='".esc_attr($person['name'])."' lang='{$lang}'{$targetvalue}>";
299
  switch($linkcontent){
300
  case 'icon':
301
+ $return .= "<img src='{$person['profile_image_url']}' alt='".esc_attr($person['name'])."' /></a>";
302
  break;
303
  case 'name':
304
+ $return .= $person['name']."</a>";
305
  break;
306
  case 'screen_name':
307
+ $return .= "@".$person['screen_name']."</a>";
308
  break;
309
  default:
310
  $return .= $linkcontent."</a>";
314
  }
315
  // Produces a linked timestamp for including in the tweet
316
  function rotatingtweets_timestamp_link($twitter_object,$timetype = 'default',$targetvalue='') {
317
+ $string = '<a '.$targetvalue.' href="https://twitter.com/twitterapi/status/'.$twitter_object['id_str'].'">';
318
+ $tweettimestamp = strtotime($twitter_object['created_at'] );
319
+ // echo "<!-- ".$twitter_object['created_at'] . " | " .get_option('timezone_string') ." | $tweettimestamp -->";
320
  switch($timetype) {
321
  case 'short':
322
  $string .= rotatingtweets_contextualtime_short($tweettimestamp);
368
  'ratelimit' => FALSE
369
  ), $atts ) ;
370
  extract($args);
 
 
371
  # Makes sure the scripts are listed
372
  rotatingtweets_enqueue_scripts();
373
  $tweets = rotatingtweets_get_tweets($screen_name,$include_rts,$exclude_replies);
376
  }
377
  add_shortcode( 'rotatingtweets', 'rotatingtweets_display_shortcode' );
378
 
379
+ /*
380
+
381
+ Management page for the Twitter API options
382
+
383
+ */
384
+ function rotatingtweets_settings_check() {
385
+ $api = get_option('rotatingtweets-api-settings');
386
+ $error = get_option('rotatingtweets_api_error');
387
+ if(!empty($api)):
388
+ $apistring = implode('',$api);
389
+ endif;
390
+ $optionslink = 'options-general.php?page=rotatingtweets';
391
+ if(empty($apistring)):
392
+ if(time() > strtotime('1-Apr-2013')):
393
+ $msgString = __('Please update <a href="%2$s">your settings for Rotating Tweets</a>. The Twitter API <a href="%1$s">changed in March 2013</a> and new settings are needed for Rotating Tweets to continue working.','rotatingtweets');
394
+ else:
395
+ $msgString = __('Please update <a href="%2$s">your settings for Rotating Tweets</a>. The Twitter API will <a href="%1$s">be changing in March 2013</a> and new settings are needed for Rotating Tweets to continue working after the API changes.','rotatingtweets');
396
+ endif;
397
+ // add_settings_error( 'rotatingtweets_settings_needed', esc_attr('rotatingtweets_settings_needed'), sprintf($msgString,'https://dev.twitter.com/calendar',$optionslink), 'error');
398
+ echo "<div class='error'><p>".sprintf($msgString,'https://dev.twitter.com/calendar',$optionslink)."</p></div>";
399
+ elseif($error[0]['code'] == 32 ):
400
+ // add_settings_error( 'rotatingtweets_settings_needed', esc_attr('rotatingtweets_settings_needed'), sprintf(__('Please update <a href="%1$s">your settings for Rotating Tweets</a>. Currently Twitter cannot authenticate you with the details you have given.','rotatingtweets'),$optionslink), 'error');
401
+ echo "<div class='error'><p>".sprintf(__('Please update <a href="%1$s">your settings for Rotating Tweets</a>. Currently Twitter cannot authenticate you with the details you have given.','rotatingtweets'),$optionslink)."</p></div>";
402
+ endif;
403
+ };
404
+ add_action( 'admin_notices', 'rotatingtweets_settings_check' );
405
+
406
+ add_action( 'admin_menu', 'rotatingtweets_menu' );
407
+
408
+ function rotatingtweets_menu() {
409
+ add_options_page( __('Rotating Tweets: Twitter API settings','rotatingtweets'), 'Rotating Tweets', 'manage_options', 'rotatingtweets', 'rotatingtweets_call_twitter_API_options' );
410
+ }
411
+
412
+ function rotatingtweets_call_twitter_API_options() {
413
+ echo '<div class="wrap">';
414
+ screen_icon();
415
+ echo '<h2>'.__('Rotating Tweets: Twitter API settings','rotatingtweets').'</h2>';
416
+ if ( !current_user_can( 'manage_options' ) ) {
417
+ wp_die( __( 'You do not have sufficient permissions to access this page.','rotatingtweets' ) );
418
+ }
419
+ echo sprintf(__('<p>Twitter <a href="%3$s">recently announced</a> that they will be changing the way that they allow people to use the information in their tweets.</p><p>Please take the following steps to make sure that Rotating Tweets continues working:</p><h3>Step 1:</h3><p>Go to the <a href="%1$s">My applications page</a> on the Twitter website to set up your website as a new Twitter \'application\'. You may need to log-in using your Twitter user name and password.</p><h3>Step 2:</h3><p>If you don\'t already have a suitable \'application\' that you can use for your website, set one up on the <a href="%2$s">Create an Application page</a>.</p> <p>It\'s normally best to use the name, description and website URL of the website where you plan to use Rotating Tweets.</p><p>You don\'t need a Callback URL.</p><h3>Step 3:</h3><p>After clicking <strong>Create your Twitter application</strong>, on the following page, click on <strong>Create my access token</strong>.</p><h3>Step 4:</h3><p>Copy the <strong>Consumer key</strong>, <strong>Consumer secret</strong>, <strong>Access token</strong> and <strong>Access token secret</strong> from your Twitter application page into the settings below.</p><h3>Step 5:</h3><p>Click on <strong>Save Changes</strong>. If there are any problems, you will get an error message from Twitter which should help diagnose the problem.</p>','rotatingtweets'),'https://dev.twitter.com/apps','https://dev.twitter.com/apps/new','https://dev.twitter.com/blog/changes-coming-to-twitter-api');
420
+ echo '<form method="post" action="options.php">';
421
+ settings_fields( 'rotatingtweets_options' );
422
+ do_settings_sections('rotatingtweets_api_settings');
423
+ submit_button(__('Save Changes','rotatingtweets'));
424
+ echo '</form></div>';
425
+ }
426
+ add_action('admin_init', 'rotatingtweets_admin_init');
427
+
428
+ function rotatingtweets_admin_init(){
429
+ register_setting( 'rotatingtweets_options', 'rotatingtweets-api-settings', 'rotatingtweets_api_validate' );
430
+ add_settings_section('rotatingtweets_api_main', __('Twitter API Settings','rotatingtweets'), 'rotatingtweets_api_explanation', 'rotatingtweets_api_settings');
431
+ add_settings_field('rotatingtweets_key', __('Twitter API Consumer Key','rotatingtweets'), 'rotatingtweets_option_show_key', 'rotatingtweets_api_settings', 'rotatingtweets_api_main');
432
+ add_settings_field('rotatingtweets_secret', __('Twitter API Consumer Secret','rotatingtweets'), 'rotatingtweets_option_show_secret', 'rotatingtweets_api_settings', 'rotatingtweets_api_main');
433
+ add_settings_field('rotatingtweets_token', __('Twitter API Access Token','rotatingtweets'), 'rotatingtweets_option_show_token', 'rotatingtweets_api_settings', 'rotatingtweets_api_main');
434
+ add_settings_field('rotatingtweets_token_secret', __('Twitter API Access Token Secret','rotatingtweets'), 'rotatingtweets_option_show_token_secret', 'rotatingtweets_api_settings', 'rotatingtweets_api_main');
435
+ }
436
+ function rotatingtweets_option_show_key() {
437
+ $options = get_option('rotatingtweets-api-settings');
438
+ echo "<input id='rotatingtweets_api_key_input' name='rotatingtweets-api-settings[key]' size='70' type='text' value='{$options['key']}' />";
439
+ }
440
+ function rotatingtweets_option_show_secret() {
441
+ $options = get_option('rotatingtweets-api-settings');
442
+ echo "<input id='rotatingtweets_api_secret_input' name='rotatingtweets-api-settings[secret]' size='70' type='text' value='{$options['secret']}' />";
443
+ }
444
+ function rotatingtweets_option_show_token() {
445
+ $options = get_option('rotatingtweets-api-settings');
446
+ echo "<input id='rotatingtweets_api_token_input' name='rotatingtweets-api-settings[token]' size='70' type='text' value='{$options['token']}' />";
447
+ }
448
+ function rotatingtweets_option_show_token_secret() {
449
+ $options = get_option('rotatingtweets-api-settings');
450
+ echo "<input id='rotatingtweets_api_token_secret_input' name='rotatingtweets-api-settings[token_secret]' size='70' type='text' value='{$options['token_secret']}' />";
451
+ }
452
+ // Explanatory text
453
+ function rotatingtweets_api_explanation() {
454
+
455
+ };
456
+ // validate our options
457
+ function rotatingtweets_api_validate($input) {
458
+ $options = get_option('rotatingtweets-api-settings');
459
+ // Check 'key'
460
+ $options['key'] = trim($input['key']);
461
+ if(!preg_match('/^[a-z0-9]+$/i', $options['key'])) {
462
+ $options['key'] = '';
463
+ }
464
+ // Check 'secret'
465
+ $options['secret'] = trim($input['secret']);
466
+ if(!preg_match('/^[a-z0-9]+$/i', $options['secret'])) {
467
+ $options['secret'] = '';
468
+ }
469
+ // Check 'token'
470
+ $options['token'] = trim($input['token']);
471
+ if(!preg_match('/^[0-9]+\-[a-z0-9]+$/i', $options['token'])) {
472
+ $options['token'] = '';
473
+ }
474
+ // Check 'token_secret'
475
+ $options['token_secret'] = trim($input['token_secret']);
476
+ if(!preg_match('/^[a-z0-9]+$/i', $options['token_secret'])) {
477
+ $options['token_secret'] = '';
478
+ }
479
+ // Now a proper test
480
+ $test = rotatingtweets_call_twitter_API('statuses/user_timeline',NULL,$options);
481
+ $error = get_option('rotatingtweets_api_error');
482
+ if(!empty($error)):
483
+ add_settings_error( 'rotatingtweets', esc_attr('rotatingtweets-api-'.$error[0]['code']), sprintf(__('Error message received from Twitter: %1$s. <a href="%2$s">Please check your API key, secret, token and secret token on the Twitter website</a>.','rotatingtweets'),$error[0]['message'],'https://dev.twitter.com/apps'), 'error' );
484
+ endif;
485
+
486
+ return $options;
487
+ }
488
+ /*
489
+ And now the Twitter API itself!
490
+ */
491
+
492
+ function rotatingtweets_call_twitter_API($command,$options = NULL,$api = NULL ) {
493
+ if(empty($api)) $api = get_option('rotatingtweets-api-settings');
494
+ if(!empty($api)):
495
+ $connection = new wp_TwitterOAuth($api['key'], $api['secret'], $api['token'], $api['token_secret'] );
496
+ // $result = $connection->get('statuses/user_timeline', $options);
497
+ if(WP_DEBUG) echo "\n<!-- Using OAuth - version 1.1 of API -->\n";
498
+ $result = $connection->get($command , $options);
499
+ else:
500
+ // Construct old style API command
501
+ unset($string);
502
+ if($command == 'application/rate_limit_status'):
503
+ $command = 'account/rate_limit_status';
504
+ unset($options);
505
+ endif;
506
+ if(is_array($options)):
507
+ foreach($options as $name => $val) {
508
+ $string[] = $name . "=" . urlencode($val);
509
+ }
510
+ endif;
511
+ $apicall = "http://api.twitter.com/1/".$command.".json";
512
+ if(!empty($string)) $apicall .= "?".implode('&',$string);
513
+ if(WP_DEBUG) echo "<!-- Using version 1 of API - calling string $apicall -->";
514
+ $result = wp_remote_request($apicall);
515
+ endif;
516
+ $data = json_decode($result['body'],true);
517
+ if(!empty($data['errors'])):
518
+ update_option('rotatingtweets_api_error',$data['errors']);
519
+ else:
520
+ delete_option('rotatingtweets_api_error');
521
+ endif;
522
+ return($result);
523
+ }
524
+
525
  # Get the latest data from Twitter (or from a cache if it's been less than 2 minutes since the last load)
526
  function rotatingtweets_get_tweets($tw_screen_name,$tw_include_rts,$tw_exclude_replies) {
527
  # Clear up variables
533
  $optionname = "rotatingtweets-cache";
534
  $option = get_option($optionname);
535
  # Attempt to deal with 'Cannot use string offset as an array' error
536
+ if(is_array($option) && is_array($option[$stringname]['json'][0])):
537
  $latest_json = $option[$stringname]['json'];
538
  $latest_json_date = $option[$stringname]['datetime'];
539
  $timegap = time()-$latest_json_date;
540
+ # Now check that it's got arrays and not objects
541
  else:
542
  # Clears the cache and forces a reload
543
  $timegap = $cache_delay + 1;
545
  endif;
546
  # Checks if it is time to call Twitter directly yet or if it should use the cache
547
  if($timegap > $cache_delay):
548
+ $apioptions = array('screen_name'=>$tw_screen_name,'include_entities'=>1,'count'=>70,'include_rts'=>$tw_include_rts,'exclude_replies'=>$tw_exclude_replies);
549
+ $twitterdata = rotatingtweets_call_twitter_API('statuses/user_timeline',$apioptions);
550
  if(!is_wp_error($twitterdata)):
551
+ $twitterjson = json_decode($twitterdata['body'],TRUE);
552
  else:
553
  set_transient('rotatingtweets_wp_error',$twitterdata->get_error_messages(), 120);
554
  endif;
555
  endif;
556
  # Checks for errors in the reply
557
+ if(!empty($twitterjson['errors'])):
558
  # If there's an error, reset the cache timer to make sure we don't hit Twitter too hard and get rate limited.
559
+ // print_r($twitterjson);
560
  $option[$stringname]['datetime']=time();
561
  update_option($optionname,$option);
562
+ elseif(!empty($twitterjson['error'])):
563
  # If Twitter is being rate limited, delays the next load until the reset time
564
  # For some reason the rate limiting error has a different error variable!
565
  $rate = rotatingtweets_get_rate_data();
566
+ if($rate && $rate['remaining_hits'] == 0):
567
+ $option[$stringname]['datetime']= $rate['reset_time_in_seconds'] - $cache_delay + 1;
568
  update_option($optionname,$option);
569
  endif;
570
  elseif(!empty($twitterjson)):
571
  # If there's regular data, then update the cache and return the data
572
  unset($firstentry);
573
  if(is_array($twitterjson)) $firstentry = $twitterjson[0];
574
+ if(!empty($firstentry['text'])):
575
  $latest_json = $twitterjson;
576
  $option[$stringname]['json']=$latest_json;
577
  $option[$stringname]['datetime']=time();
583
 
584
  # Gets the rate limiting data to see how long it will be before we can tweet again
585
  function rotatingtweets_get_rate_data() {
586
+ // $callstring = "http://api.twitter.com/1/account/rate_limit_status.json";
587
+ // $command = 'account/rate_limit_status';
588
+ $ratedata = rotatingtweets_call_twitter_API('application/rate_limit_status',array('resources'=>'statuses'));
589
+ // $ratedata = wp_remote_request($callstring);
590
  if(!is_wp_error($ratedata)):
591
+ $rate = json_decode($ratedata['body'],TRUE);
592
+ if($rate['resources']['statuses']['/statuses/user_timeline']['limit']>0):
593
+ $newrate['hourly_limit']=$rate['resources']['statuses']['/statuses/user_timeline']['limit'];
594
+ $newrate['remaining_hits']=$rate['resources']['statuses']['/statuses/user_timeline']['remaining'];
595
+ $newrate['reset_time_in_seconds']=$rate['resources']['statuses']['/statuses/user_timeline']['reset'];
596
+ return($newrate);
597
+ else:
598
+ return($rate);
599
+ endif;
600
  else:
601
  set_transient('rotatingtweets_wp_error',$ratedata->get_error_messages(), 120);
602
  return(FALSE);
622
  $option['datetime'] = time();
623
  endif;
624
  if($timegap > $cache_delay):
625
+ // $callstring = "https://api.twitter.com/1/help/languages.json";
626
+ // $twitterdata = wp_remote_request($callstring);
627
+ $twitterdata = rotatingtweets_call_twitter_API('help/languages');
628
  if(!is_wp_error($twitterdata)):
629
+ $twitterjson = json_decode($twitterdata['body'],TRUE);
630
+ if(!empty($twitterjson['errors'])||!empty($twitterjson['error'])):
631
  # If there's an error, reset the cache timer to make sure we don't hit Twitter too hard and get rate limited.
632
  $option['datetime']=time();
633
  update_option($optionname,$option);
636
  $latest_languages = array();
637
  if(is_array($twitterjson)):
638
  foreach($twitterjson as $langarray):
639
+ $latest_languages[] = $langarray['code'];
640
  endforeach;
641
  endif;
642
  if(!empty($latest_languages)):
656
 
657
  # This function is used for debugging what happens when the site is rate-limited - best not used otherwise!
658
  function rotatingtweets_trigger_rate_limiting() {
659
+ // $callstring = "http://api.twitter.com/1/statuses/user_timeline.json?screen_name=twitter";
660
+ $apidata = array('screen_name'=>'twitter');
661
  for ($i=1; $i<150; $i++) {
662
+ // $ratedata = wp_remote_request($callstring);
663
+ $ratedata = rotatingtweets_call_twitter_API('statuses/user_timeline',$apidata);
664
  }
665
  }
666
 
704
  $result .= "\n\t<div class = 'rotatingtweet'><p class='rtw_main'>". __('Problem retrieving data from Twitter','rotatingtweets'). "</p></div>";
705
  $rate = rotatingtweets_get_rate_data();
706
  # Check if the problem is rate limiting
707
+ if($rate['hourly_limit']>0 && $rate['remaining_hits'] == 0):
708
  $result .= "\n\t<div class = 'rotatingtweet' style='display:none'><p class='rtw_main'>". sprintf(__('This website is currently <a href=\'%s\'>rate-limited by Twitter</a>.','rotatingtweets'),'https://dev.twitter.com/docs/rate-limiting-faq') . "</p></div>";
709
+ $waittimevalue = intval(($rate['reset_time_in_seconds'] - time())/60);
710
  $waittime = sprintf(_n('Next attempt to get data will be in %d minute','Next attempt to get data will be in %d minutes',$waittimevalue,'rotatingtweets'),$waittimevalue);
711
  if($waittimevalue == 0) $waittime = __("Next attempt to get data will be in less than a minute",'rotatingtweets');
712
  $result .= "\n\t<div class = 'rotatingtweet' style='display:none'><p class='rtw_main'>{$waittime}.</p></div>";
723
  $tweet_counter = 0;
724
  $rate = rotatingtweets_get_rate_data();
725
  # Check if the problem is rate limiting
726
+ if($rate['hourly_limit']>0 && $rate['remaining_hits'] == 0):
727
+ $waittimevalue = intval(($rate['reset_time_in_seconds'] - time())/60);
728
  $result .= "<!-- Rate limited -- ";
729
  $result .= sprintf(_n('Next attempt to get data will be in %d minute','Next attempt to get data will be in %d minutes',$waittimevalue,'rotatingtweets'),$waittimevalue)." -->";
730
  endif;
743
  $result .= "\n\t<div class = 'rotatingtweet' style='display:none'>";
744
  endif;
745
  # Now to process the text
746
+ // print_r($twitter_object);
747
+ $main_text = $twitter_object['text'];
748
  if(!empty($main_text)):
749
+ $user = $twitter_object['user'];
750
  $tweetuser = $user;
751
  # Now the substitutions
752
+ $entities = $twitter_object['entities'];
753
  # Fix up retweets, links, hashtags and use names
754
  unset($before);
755
  unset($after);
756
  unset($retweeter);
757
  # First clean up the retweets
758
+ if(isset($twitter_object['retweeted_status'])):
759
+ $rt_data = $twitter_object['retweeted_status'];
760
  else:
761
  unset($rt_data);
762
  endif;
763
  if(!empty($rt_data)):
764
+ $rt_user = $rt_data['user'];
765
  if($args['official_format']):
766
+ $main_text = $rt_data['text'];
767
  $retweeter = $user;
768
  $tweetuser = $rt_user;
769
  else:
770
+ $main_text = "RT @".$rt_user['screen_name'] . " " . $rt_data['text'];
771
  endif;
772
+ $before[] = "*@".$rt_user['screen_name']."\b*i";
773
  $after[] = rotatingtweets_user_intent($rt_user,$twitterlocale,'screen_name',$targetvalue);
774
+ $entities = $rt_data['entities'];
775
  endif;
776
  # First the user mentions
777
+ if(isset($entities['user_mentions'])):
778
+ $user_mentions = $entities['user_mentions'];
779
  else:
780
  unset($user_mentions);
781
  endif;
782
  if(!empty($user_mentions)):
783
  foreach($user_mentions as $user_mention):
784
+ $before[] = "*@".$user_mention['screen_name']."\b*i";
785
  $after[] = rotatingtweets_user_intent($user_mention,$twitterlocale,'screen_name',$targetvalue);
786
  endforeach;
787
  # Clearing up duplicates to avoid strange result (possibly risky?)
789
  $after = array_unique($after);
790
  endif;
791
  # Now the URLs
792
+ if(isset($entities['urls'])):
793
+ $urls = $entities['urls'];
794
  else:
795
  unset($urls);
796
  endif;
797
  if(!empty($urls)):
798
  foreach($urls as $url):
799
+ $before[] = "*".$url['url']."*";
800
+ $displayurl = $url['display_url'];
801
  if(strlen($displayurl)>$urllength):
802
  # PHP sometimes has a really hard time with unicode characters - this one removes the ellipsis
803
  $displayurl = str_replace(json_decode('"\u2026"'),"",$displayurl);
804
  $displayurl = substr($displayurl,0,$urllength)."&hellip;";
805
  endif;
806
+ $after[] = "<a href='".$url['url']."' title='".$url['expanded_url']."'".$targetvalue.">".esc_html($displayurl)."</a>";
807
  endforeach;
808
  endif;
809
+ if(isset($entities['media'])):
810
+ $media = $entities['media'];
811
  else:
812
  unset($media);
813
  endif;
814
  if(!empty($media)):
815
  foreach($media as $medium):
816
+ $before[] = "*".$medium['url']."*";
817
+ $displayurl = $medium['display_url'];
818
+ if(strlen($displayurl)>$urllength):
819
+ $displayurl = str_replace(json_decode('"\u2026"'),"",$displayurl);
820
+ $displayurl = substr($displayurl,0,$urllength)."&hellip;";
821
+ endif;
822
+ $after[] = "<a href='".$medium['url']."' title='".$medium['expanded_url']."'".$targetvalue.">".esc_html($displayurl)."</a>";
823
  endforeach;
824
  endif;
825
  $before[]="%#([0-9]*[a-zA-Z]+\w*)%";
837
  endif;
838
  if($args['show_meta_screen_name']):
839
  if(!empty($meta)) $meta .= ' ';
840
+ $meta .= sprintf(__('from <a href=\'%1$s\' title=\'%2$s\'>%2$s\'s Twitter</a>','rotatingtweets'),'https://twitter.com/intent/user?user_id='.$user['id'],$user['name']);
841
  endif;
842
  if($args['show_meta_via']):
843
  if(!empty($meta)) $meta .= ' ';
844
+ $meta .=sprintf(__("via %s",'rotatingtweets'),$twitter_object['source']);
845
  endif;
846
  if($args['show_meta_reply_retweet_favorite']):
847
  if(!empty($meta)) $meta .= ' &middot; ';
861
  $result .= "\n\t<div class='rtw_meta'><div class='rtw_intents'>".rotatingtweets_intents($twitter_object,$twitterlocale, 1,$targetvalue).'</div>';
862
  $result .= rotatingtweets_timestamp_link($twitter_object,'long',$targetvalue);
863
  if(isset($retweeter)) {
864
+ $result .= " &middot; ".rotatingtweets_user_intent($retweeter,$twitterlocale,sprintf(__('Retweeted by %s','rotatingtweets'),$retweeter['name']),$targetvalue);
865
  }
866
  $result .= "\n</div>";
867
  break;
877
  $result .= "\n\t\t<p class='rtw_main'>".$main_text."</p>";
878
  // $result .= "\n\t\t<div class='rtw_meta'><div class='rtw_intents'>".rotatingtweets_intents($twitter_object,$twitterlocale, 1).'</div>';
879
  if(isset($retweeter)) {
880
+ $result .= "\n\t\t<div class='rtw_rt_meta'>".rotatingtweets_user_intent($retweeter,$twitterlocale,"<img src='".plugins_url('images/retweet_on.png',__FILE__)."' width='16' height='16' alt='".sprintf(__('Retweeted by %s','rotatingtweets'),$retweeter['name'])."' />".sprintf(__('Retweeted by %s','rotatingtweets'),$retweeter->name),$targetvalue)."</div>";
881
  }
882
  $result .= "\n\t\t<div class='rtw_meta'><span class='rtw_expand' style='display:none;'>".__('Expand','rotatingtweets')."</span><span class='rtw_intents'>".rotatingtweets_intents($twitter_object,$twitterlocale, 2,$targetvalue).'</span>';
883
  $result .= "</div></div></div>";
886
  # This one uses the twitter standard approach for embedding via their javascript API - unfortunately I can't work out how to make it work with the rotating tweet javascript! If anyone can work out how to calculate the height of a oEmbed Twitter tweet, I will be very grateful! :-)
887
  $result .= '<blockquote class="twitter-tweet">';
888
  $result .= "<p>".$main_text."</p>";
889
+ $result .= '&mdash; '.$user['name'].' (@'.$user['screen_name'].') <a href="https://twitter.com/twitterapi/status/'.$twitter_object['id_str'].'" data-datetime="'.date('c',strtotime($twitter_object['created_at'])).'"'.$targetvalue.'>'.date_i18n(get_option('date_format') ,strtotime($twitter_object['created_at'])).'</a>';
890
  $result .= '</blockquote>';
891
  break;
892
  }
909
  $result .= "</div>";
910
  endif;
911
  */
912
+ if($args['show_follow'] && !empty($user['screen_name'])):
913
  $shortenvariables = '';
914
  if($args['no_show_count']) $shortenvariables = ' data-show-count="false"';
915
  if($args['no_show_screen_name']) $shortenvariables .= ' data-show-screen-name="false"';
916
+ $followUserText = sprintf(__('Follow @%s','rotatingtweets'),$user['screen_name']);
917
+ $result .= "\n<div class='rtw_follow follow-button'><a href='http://twitter.com/".$user['screen_name']."' class='twitter-follow-button'{$shortenvariables} title='".$followUserText."' data-lang='{$twitterlocale}'>".$followUserText."</a></div>";
918
  endif;
919
  rotatingtweets_enqueue_scripts();
920
  if($print) echo $result;