From b339fd125870bb0b084cf54b03cdacd257cc560b Mon Sep 17 00:00:00 2001
From: Steve Clay
Date: Thu, 17 Jan 2013 10:24:54 -0500
Subject: Corrects encoding and other small tweaks in Twitter widget
---
mod/twitter/languages/en.php | 9 ++---
.../views/default/widgets/twitter/content.php | 41 ++++++++++++++--------
mod/twitter/views/default/widgets/twitter/edit.php | 34 +++++++++++-------
3 files changed, 54 insertions(+), 30 deletions(-)
(limited to 'mod/twitter')
diff --git a/mod/twitter/languages/en.php b/mod/twitter/languages/en.php
index 29700744a..11e745ba1 100644
--- a/mod/twitter/languages/en.php
+++ b/mod/twitter/languages/en.php
@@ -4,13 +4,14 @@
*/
$english = array(
-
'twitter:title' => 'Twitter',
'twitter:info' => 'Display your latest tweets',
- 'twitter:username' => 'Enter your twitter username.',
- 'twitter:num' => 'The number of tweets to show.',
+ 'twitter:username' => 'Your twitter username',
+ 'twitter:num' => 'Number of tweets to show*',
'twitter:visit' => 'visit my twitter',
- 'twitter:notset' => 'This Twitter widget is not yet set to go. To display your latest tweets, click on - edit - and fill in your details',
+ 'twitter:notset' => 'This widget needs to be configured. To display your latest tweets, click the customize icon and fill in your Twitter username.',
+ 'twitter:invalid' => 'This widget is configured with an invalid Twitter username. Click the customize icon to correct it.',
+ 'twitter:apibug' => "*Due to a bug in the Twitter 1.0 API, you may see fewer tweets than you ask for.",
);
add_translation("en", $english);
diff --git a/mod/twitter/views/default/widgets/twitter/content.php b/mod/twitter/views/default/widgets/twitter/content.php
index c616d944c..dd741745e 100644
--- a/mod/twitter/views/default/widgets/twitter/content.php
+++ b/mod/twitter/views/default/widgets/twitter/content.php
@@ -6,26 +6,39 @@
* @package ElggTwitter
*/
-//some required params
-
$username = $vars['entity']->twitter_username;
+
+if (empty($username)) {
+ echo "