From 16539579880fbdc0136b815ea5d26c57f2399cb1 Mon Sep 17 00:00:00 2001
From: cash
Date: Wed, 26 Jan 2011 00:51:28 +0000
Subject: moved twitterservice into core
git-svn-id: http://code.elgg.org/elgg/trunk@7930 36083f99-b078-4883-b0ff-0f9b5a30f544
---
.../views/default/settings/twitterservice/edit.php | 40 ++++++++++++++++++++++
.../views/default/twitterservice/css.php | 12 +++++++
.../views/default/twitterservice/login.php | 16 +++++++++
.../views/default/twitterservice/metatags.php | 21 ++++++++++++
.../default/usersettings/twitterservice/edit.php | 21 ++++++++++++
5 files changed, 110 insertions(+)
create mode 100644 mod/twitterservice/views/default/settings/twitterservice/edit.php
create mode 100644 mod/twitterservice/views/default/twitterservice/css.php
create mode 100644 mod/twitterservice/views/default/twitterservice/login.php
create mode 100644 mod/twitterservice/views/default/twitterservice/metatags.php
create mode 100644 mod/twitterservice/views/default/usersettings/twitterservice/edit.php
(limited to 'mod/twitterservice/views/default')
diff --git a/mod/twitterservice/views/default/settings/twitterservice/edit.php b/mod/twitterservice/views/default/settings/twitterservice/edit.php
new file mode 100644
index 000000000..01897db23
--- /dev/null
+++ b/mod/twitterservice/views/default/settings/twitterservice/edit.php
@@ -0,0 +1,40 @@
+ 'params[consumer_key]',
+ 'value' => $vars['entity']->consumer_key,
+ 'class' => 'text_input',
+));
+
+$consumer_secret_string = elgg_echo('twitterservice:consumer_secret');
+$consumer_secret_view = elgg_view('input/text', array(
+ 'internalname' => 'params[consumer_secret]',
+ 'value' => $vars['entity']->consumer_secret,
+ 'class' => 'text_input',
+));
+
+$sign_on_with_twitter_string = elgg_echo('twitterservice:login');
+$sign_on_with_twitter_view = elgg_view('input/pulldown', array(
+ 'internalname' => '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',
+));
+
+$settings = <<<__HTML
+
+__HTML;
+
+echo $settings;
diff --git a/mod/twitterservice/views/default/twitterservice/css.php b/mod/twitterservice/views/default/twitterservice/css.php
new file mode 100644
index 000000000..572144067
--- /dev/null
+++ b/mod/twitterservice/views/default/twitterservice/css.php
@@ -0,0 +1,12 @@
+
+
+#twitterservice_site_settings .text_input {
+ width: 350px;
+}
+#login_with_twitter {
+ padding: 10px 0 0 0;
+}
diff --git a/mod/twitterservice/views/default/twitterservice/login.php b/mod/twitterservice/views/default/twitterservice/login.php
new file mode 100644
index 000000000..8db63af36
--- /dev/null
+++ b/mod/twitterservice/views/default/twitterservice/login.php
@@ -0,0 +1,16 @@
+
+
+
+
+
+__HTML;
+
+echo $login;
diff --git a/mod/twitterservice/views/default/twitterservice/metatags.php b/mod/twitterservice/views/default/twitterservice/metatags.php
new file mode 100644
index 000000000..1335cd759
--- /dev/null
+++ b/mod/twitterservice/views/default/twitterservice/metatags.php
@@ -0,0 +1,21 @@
+
+
+__HTML;
+
+ echo $tags;
+}
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 @@
+' . elgg_echo('twitterservice:usersettings:description') . '
';
+
+if (!$access_key || !$access_secret) {
+ // send user off to validate account
+ $request_link = twitterservice_get_authorize_url();
+ echo '' . sprintf(elgg_echo('twitterservice:usersettings:request'), $request_link) . '
';
+} else {
+ $url = "{$CONFIG->site->url}pg/twitterservice/revoke";
+ echo '';
+ echo '' . sprintf(elgg_echo('twitterservice:usersettings:revoke'), $url) . '
';
+}
--
cgit v1.2.3