Skip to content

Commit

Permalink
Add secret config directive that enables public Twitter username search
Browse files Browse the repository at this point in the history
  • Loading branch information
ginatrapani committed Aug 14, 2012
1 parent f764e36 commit dcd783f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Expand Up @@ -133,6 +133,8 @@ public function authControl() {
$this->addInfoMessage('Please complete plugin setup to start using it.', 'setup');
$this->addToView('is_configured', false);
}
// Secret config file value enables public Twitter name search
$this->addToView('enable_twitter_search', $config->getValue('enable_twitter_search'));
// add plugin options from
$this->addOptionForm();

Expand Down
Expand Up @@ -199,8 +199,8 @@ public function parseJSON($data) {
'author_username'=>$p->from_user, 'user_name'=>$p->from_user,
'in_reply_to_user_id'=>$p->to_user_id,
'author_avatar'=>$p->profile_image_url, 'avatar'=>$p->profile_image_url,
'in_reply_to_post_id'=>'', 'author_fullname'=>'', 'full_name'=>'', 'source'=>'twitter',
'location'=>'', 'url'=>'',
'in_reply_to_post_id'=>$p->in_reply_to_status_id_str, 'author_fullname'=>'', 'full_name'=>'',
'source'=>'twitter', 'location'=>'', 'url'=>'',
'description'=>'', 'is_protected'=>0, 'follower_count'=>0, 'post_count'=>0, 'joined'=>'');
}
return $parsed_payload;
Expand Down
6 changes: 4 additions & 2 deletions webapp/plugins/twitter/view/twitter.account.index.tpl
Expand Up @@ -50,8 +50,10 @@
{include file="_plugin.admin-request.tpl"}
</div>

<!--<p>Alternately, add a public Twitter username for ThinkUp capture data about:</p>
<form method="get" action="index.php"><input type="hidden" name="p" value="twitter"><input name="twitter_username" /> <input type="submit" value="Add this Public User to ThinkUp"></form>-->
{if $enable_twitter_search}
<p>Alternately, add a public Twitter username for ThinkUp capture data about:</p>
<form method="get" action="index.php"><input type="hidden" name="p" value="twitter"><input name="twitter_username" /> <input class="linkbutton emphasized" type="submit" value="Add this Public User to ThinkUp"></form>
{/if}

{if $user_is_admin}
{include file="_plugin.showhider.tpl"}
Expand Down

0 comments on commit dcd783f

Please sign in to comment.