Ejemplo n.º 1
0
        bottom: 5px;
        left: 250px;
    }
</style>

<h2 class="H"><?php 
echo $this->data('Title');
?>
</h2>

<div class="Hero">
    <h3><?php 
echo t("What's This?");
?>
</h3>

    <p>
        <?php 
echo Gdn_Format::Markdown(t('Connect your profile to social networks.', "Connect your profile to social networks to be notified of activity here and share your activity with your friends and followers."));
?>
    </p>
</div>

<ul class="DataList DataList-Connections">
    <?php 
foreach ($this->data('Connections') as $Key => $Row) {
    WriteConnection($Row);
}
?>
</ul>
 /**
  * Turn on a social plugin.
  *
  * @param $Plugin
  * @throws Exception
  * @throws Gdn_UserException
  */
 public function enable($Plugin)
 {
     $this->permission('Garden.Settings.Manage');
     $Connections = $this->GetConnections();
     if (!array_key_exists($Plugin, $Connections)) {
         throw notFoundException('SocialConnect Plugin');
     }
     Gdn::pluginManager()->EnablePlugin($Plugin, null);
     $Connections = $this->GetConnections();
     $Connection = val($Plugin, $Connections);
     require_once $this->fetchViewLocation('connection_functions');
     ob_start();
     WriteConnection($Connection);
     $Row = ob_get_clean();
     $this->jsonTarget("#Provider_{$Connection['Index']}", $Row);
     $this->informMessage(t("Plugin enabled."));
     unset($this->Data['Connections']);
     $this->render('blank', 'utility');
 }