aboutsummaryrefslogtreecommitdiff
path: root/mod/twitterservice/views/default/usersettings
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-26 00:51:28 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-26 00:51:28 +0000
commit16539579880fbdc0136b815ea5d26c57f2399cb1 (patch)
tree7ed00311c0c31835377c73076f10e17671c1c1a1 /mod/twitterservice/views/default/usersettings
parent2a81ce2acb9548220d02d47394158712d395ad34 (diff)
downloadelgg-16539579880fbdc0136b815ea5d26c57f2399cb1.tar.gz
elgg-16539579880fbdc0136b815ea5d26c57f2399cb1.tar.bz2
moved twitterservice into core
git-svn-id: http://code.elgg.org/elgg/trunk@7930 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/twitterservice/views/default/usersettings')
-rw-r--r--mod/twitterservice/views/default/usersettings/twitterservice/edit.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/mod/twitterservice/views/default/usersettings/twitterservice/edit.php b/mod/twitterservice/views/default/usersettings/twitterservice/edit.php
new file mode 100644
index 000000000..95a2a2fd6
--- /dev/null
+++ b/mod/twitterservice/views/default/usersettings/twitterservice/edit.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ *
+ */
+
+$user_id = get_loggedin_userid();
+$twitter_name = get_plugin_usersetting('twitter_name', $user_id, 'twitterservice');
+$access_key = get_plugin_usersetting('access_key', $user_id, 'twitterservice');
+$access_secret = get_plugin_usersetting('access_secret', $user_id, 'twitterservice');
+
+echo '<p>' . elgg_echo('twitterservice:usersettings:description') . '</p>';
+
+if (!$access_key || !$access_secret) {
+ // send user off to validate account
+ $request_link = twitterservice_get_authorize_url();
+ echo '<p>' . sprintf(elgg_echo('twitterservice:usersettings:request'), $request_link) . '</p>';
+} else {
+ $url = "{$CONFIG->site->url}pg/twitterservice/revoke";
+ echo '<p class="twitter_anywhere">' . sprintf(elgg_echo('twitterservice:usersettings:authorized'), $twitter_name) . '</p>';
+ echo '<p>' . sprintf(elgg_echo('twitterservice:usersettings:revoke'), $url) . '</p>';
+}