From 444611b49a56b2b282d0f9b9290d17aecd9ae321 Mon Sep 17 00:00:00 2001 From: brettp Date: Mon, 14 Mar 2011 02:06:04 +0000 Subject: Refs #3115. Migrated twitterservice to twitter_api. Added upgrade to migrate plugin and user settings. git-svn-id: http://code.elgg.org/elgg/trunk@8699 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../views/default/settings/twitter_api/edit.php | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 mod/twitter_api/views/default/settings/twitter_api/edit.php (limited to 'mod/twitter_api/views/default/settings') diff --git a/mod/twitter_api/views/default/settings/twitter_api/edit.php b/mod/twitter_api/views/default/settings/twitter_api/edit.php new file mode 100644 index 000000000..9deac3989 --- /dev/null +++ b/mod/twitter_api/views/default/settings/twitter_api/edit.php @@ -0,0 +1,49 @@ + 'params[consumer_key]', + 'value' => $vars['entity']->consumer_key, + 'class' => 'text_input', +)); + +$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', +)); + +$sign_on_with_twitter_string = elgg_echo('twitter_api:login'); +$sign_on_with_twitter_view = elgg_view('input/dropdown', array( + 'name' => 'params[sign_on]', + 'options_values' => array( + 'yes' => elgg_echo('option:yes'), + 'no' => elgg_echo('option:no'), + ), + 'value' => $vars['entity']->sign_on ? $vars['entity']->sign_on : 'no', +)); + +$new_users_with_twitter = elgg_echo('twitter_api:new_users'); +$new_users_with_twitter_view = elgg_view('input/dropdown', array( + 'name' => 'params[new_users]', + 'options_values' => array( + 'yes' => elgg_echo('option:yes'), + 'no' => elgg_echo('option:no'), + ), + 'value' => $vars['entity']->new_users ? $vars['entity']->new_users : 'no', +)); + +$settings = <<<__HTML +
$insert_view
+
$consumer_key_string $consumer_key_view
+
$consumer_secret_string $consumer_secret_view
+
$sign_on_with_twitter_string $sign_on_with_twitter_view
+
$new_users_with_twitter $new_users_with_twitter_view
+__HTML; + +echo $settings; -- cgit v1.2.3