From 42e02f03c306717002aac0d36f0e2b48bf369fed Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 23 Jun 2011 21:15:37 -0400 Subject: cleaned up the twitter api plugin settings so instructions are correct. Need to verify that login works. --- mod/twitter_api/languages/en.php | 2 +- mod/twitter_api/start.php | 3 ++- mod/twitter_api/views/default/settings/twitter_api/edit.php | 11 ++++------- mod/twitter_api/views/default/twitter_api/css.php | 7 ++++--- 4 files changed, 11 insertions(+), 12 deletions(-) (limited to 'mod/twitter_api') diff --git a/mod/twitter_api/languages/en.php b/mod/twitter_api/languages/en.php index 940a49d9b..3a422b043 100644 --- a/mod/twitter_api/languages/en.php +++ b/mod/twitter_api/languages/en.php @@ -11,7 +11,7 @@ $english = array( 'twitter_api:consumer_key' => 'Consumer Key', 'twitter_api:consumer_secret' => 'Consumer Secret', - 'twitter_api:settings:instructions' => 'You must obtain a consumer key and secret from Twitter. Most of the fields are self explanatory, the one piece of data you will need is the callback url which takes the form http://[yoursite]/action/twitterlogin/return - [yoursite] is the url of your Elgg network.', + 'twitter_api:settings:instructions' => 'You must obtain a consumer key and secret from Twitter. Fill out the new app application. Select "Browser" as the application type and "Read & Write" for the access type. The callback url is %stwitter_api/authorize', 'twitter_api:usersettings:description' => "Link your %s account with Twitter.", 'twitter_api:usersettings:request' => "You must first authorize %s to access your Twitter account.", diff --git a/mod/twitter_api/start.php b/mod/twitter_api/start.php index 8a49db719..ce0054eed 100644 --- a/mod/twitter_api/start.php +++ b/mod/twitter_api/start.php @@ -19,7 +19,8 @@ function twitter_api_init() { // extend site views elgg_extend_view('metatags', 'twitter_api/metatags'); - elgg_extend_view('css', 'twitter_api/css'); + elgg_extend_view('css/elgg', 'twitter_api/css'); + elgg_extend_view('css/admin', 'twitter_api/css'); // sign on with twitter if (twitter_api_allow_sign_on_with_twitter()) { diff --git a/mod/twitter_api/views/default/settings/twitter_api/edit.php b/mod/twitter_api/views/default/settings/twitter_api/edit.php index 467637147..4e52a5c9d 100644 --- a/mod/twitter_api/views/default/settings/twitter_api/edit.php +++ b/mod/twitter_api/views/default/settings/twitter_api/edit.php @@ -3,9 +3,7 @@ * Twitter API plugin settings */ -$instructions = elgg_echo('twitter_api:settings:instructions'); - -$insert_view = elgg_view('twittersettings/extend'); +$instructions = elgg_echo('twitter_api:settings:instructions', array(elgg_get_site_url())); $consumer_key_string = elgg_echo('twitter_api:consumer_key'); $consumer_key_view = elgg_view('input/text', array( @@ -18,7 +16,7 @@ $consumer_secret_string = elgg_echo('twitter_api:consumer_secret'); $consumer_secret_view = elgg_view('input/text', array( 'name' => 'params[consumer_secret]', 'value' => $vars['entity']->consumer_secret, - 'class' => 'text_input', + 'class' => 'text_input twitter-secret', )); $sign_on_with_twitter_string = elgg_echo('twitter_api:login'); @@ -43,9 +41,8 @@ $new_users_with_twitter_view = elgg_view('input/dropdown', array( $settings = <<<__HTML

$instructions

-
$insert_view
-
$consumer_key_string $consumer_key_view
-
$consumer_secret_string $consumer_secret_view
+

$consumer_key_view
+

$consumer_secret_view
$sign_on_with_twitter_string $sign_on_with_twitter_view
$new_users_with_twitter $new_users_with_twitter_view
__HTML; diff --git a/mod/twitter_api/views/default/twitter_api/css.php b/mod/twitter_api/views/default/twitter_api/css.php index 140ce6a52..04bbed668 100644 --- a/mod/twitter_api/views/default/twitter_api/css.php +++ b/mod/twitter_api/views/default/twitter_api/css.php @@ -4,9 +4,10 @@ */ ?> -#twitter_api_site_settings .text_input { - width: 350px; -} #login_with_twitter { padding: 10px 0 0 0; } + +.twitter-secret { + width: 400px; +} \ No newline at end of file -- cgit v1.2.3