Exemplo n.º 1
0
$validationGroupStyle = 'hide';
// New channel, not even saved
if ($this->item->id == 0) {
    $message = JText::_('COM_AUTOTWEET_CHANNEL_GPLUS_NEWCHANNEL_NOAUTHORIZATION');
    include_once 'auth_button.php';
} else {
    $gplusChannelHelper = new GplusChannelHelper($this->item);
    $isAuth = $gplusChannelHelper->isAuth();
    // New channel, but saved
    if ($isAuth) {
        // We have an access Token!
        $accessToken = $gplusChannelHelper->getAccessToken();
        $user = $gplusChannelHelper->getUser();
        $userId = $user['id'];
        $this->item->xtform->set('social_url', $user['url']);
        $expiresIn = $gplusChannelHelper->getExpiresIn();
        $validationGroupStyle = null;
        include_once 'validation_button.php';
    } else {
        $message = JText::_('COM_AUTOTWEET_CHANNEL_GPLUS_NEWCHANNEL_AUTHORIZATION');
        $authUrl = $gplusChannelHelper->getAuthorizationUrl();
        $authUrlButtonStyle = null;
        include_once 'auth_button.php';
        include_once 'validation_button.php';
    }
}
?>

<div class="alert">
	<button type="button" class="close" data-dismiss="alert">&times;</button>