diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-14 02:06:04 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-14 02:06:04 +0000 |
commit | 444611b49a56b2b282d0f9b9290d17aecd9ae321 (patch) | |
tree | accdc8b21c5b6c3612bad4c78512c5a7b23c9f3a /mod/twitter_api/views/default/usersettings | |
parent | e62ce5cca46c015629b39c3356bdb5df65f1369e (diff) | |
download | elgg-444611b49a56b2b282d0f9b9290d17aecd9ae321.tar.gz elgg-444611b49a56b2b282d0f9b9290d17aecd9ae321.tar.bz2 |
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
Diffstat (limited to 'mod/twitter_api/views/default/usersettings')
-rw-r--r-- | mod/twitter_api/views/default/usersettings/twitter_api/edit.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mod/twitter_api/views/default/usersettings/twitter_api/edit.php b/mod/twitter_api/views/default/usersettings/twitter_api/edit.php new file mode 100644 index 000000000..77dd5cc5d --- /dev/null +++ b/mod/twitter_api/views/default/usersettings/twitter_api/edit.php @@ -0,0 +1,22 @@ +<?php +/** + * + */ + +$user_id = elgg_get_logged_in_user_guid(); +$twitter_name = get_plugin_usersetting('twitter_name', $user_id, 'twitter_api'); +$access_key = get_plugin_usersetting('access_key', $user_id, 'twitter_api'); +$access_secret = get_plugin_usersetting('access_secret', $user_id, 'twitter_api'); + +$site_name = elgg_get_site_entity()->name; +echo '<div>' . elgg_echo('twitter_api:usersettings:description', array($site_name)) . '</div>'; + +if (!$access_key || !$access_secret) { + // send user off to validate account + $request_link = twitter_api_get_authorize_url(); + echo '<div>' . elgg_echo('twitter_api:usersettings:request', array($request_link, $site_name)) . '</div>'; +} else { + $url = elgg_get_site_url() . "twitter_api/revoke"; + echo '<div class="twitter_anywhere">' . elgg_echo('twitter_api:usersettings:authorized', array($site_name, $twitter_name)) . '</div>'; + echo '<div>' . sprintf(elgg_echo('twitter_api:usersettings:revoke'), $url) . '</div>'; +} |