aboutsummaryrefslogtreecommitdiff
path: root/mod/twitter_api/views/default/plugins
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2013-04-19 22:17:01 -0400
committercash <cash.costello@gmail.com>2013-04-19 22:17:01 -0400
commit5b0b6f28dd224861e216c1a9279a9115b5a5b87a (patch)
tree25d3342bc2e812e31b6ed0632651f946e20d9e9b /mod/twitter_api/views/default/plugins
parent90ca61146bfd4eabaa6fce7506390f554fc4c44b (diff)
downloadelgg-5b0b6f28dd224861e216c1a9279a9115b5a5b87a.tar.gz
elgg-5b0b6f28dd224861e216c1a9279a9115b5a5b87a.tar.bz2
Fixes #5382 admins can turn off posting to twitter
Diffstat (limited to 'mod/twitter_api/views/default/plugins')
-rw-r--r--mod/twitter_api/views/default/plugins/twitter_api/settings.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/mod/twitter_api/views/default/plugins/twitter_api/settings.php b/mod/twitter_api/views/default/plugins/twitter_api/settings.php
index 0b9afd4cf..3a3ec93a2 100644
--- a/mod/twitter_api/views/default/plugins/twitter_api/settings.php
+++ b/mod/twitter_api/views/default/plugins/twitter_api/settings.php
@@ -39,12 +39,27 @@ $new_users_with_twitter_view = elgg_view('input/dropdown', array(
'value' => $vars['entity']->new_users ? $vars['entity']->new_users : 'no',
));
+$post_to_twitter = '';
+if (elgg_is_active_plugin('thewire')) {
+ $post_to_twitter_string = elgg_echo('twitter_api:post_to_twitter');
+ $post_to_twitter_view = elgg_view('input/dropdown', array(
+ 'name' => 'params[wire_posts]',
+ 'options_values' => array(
+ 'yes' => elgg_echo('option:yes'),
+ 'no' => elgg_echo('option:no'),
+ ),
+ 'value' => $vars['entity']->wire_posts ? $vars['entity']->wire_posts : 'no',
+ ));
+ $post_to_twitter = "<div>$post_to_twitter_string $post_to_twitter_view</div>";
+}
+
$settings = <<<__HTML
<div class="elgg-content-thin mtm"><p>$instructions</p></div>
<div><label>$consumer_key_string</label><br /> $consumer_key_view</div>
<div><label>$consumer_secret_string</label><br /> $consumer_secret_view</div>
<div>$sign_on_with_twitter_string $sign_on_with_twitter_view</div>
<div>$new_users_with_twitter $new_users_with_twitter_view</div>
+$post_to_twitter
__HTML;
echo $settings;