Ejemplo n.º 1
0
    /**
     * Displays the main connect form.
     */
    private function connectForm()
    {
        global $wgOut, $wgUser, $wgSitename, $wgJsMimeType, $wgExtensionsPath;
        $titleObj = Title::newFromText($this->mReturnTo);
        if ($titleObj) {
            $wgOut->redirect($titleObj->getFullURL($this->mReturnToQuery . "&fbconnected=2&cb=" . rand(1, 10000)));
        } else {
            // Outputs the canonical name of the special page at the top of the page
            $this->outputHeader();
            $wgOut->addScript("<script type=\"{$wgJsMimeType}\" src=\"{$wgExtensionsPath}/FBConnect/facebook.js\"></script>\n");
            // Render a humble Facebook Connect button
            $wgOut->addHTML('<div>' . wfMsgExt('fbconnect-intro', array('parse', 'content')) . '<br/>' . wfMsg('fbconnect-click-to-login', $wgSitename) . '
				<fb:login-button id="fbSpecialConnect" size="large" background="black" length="long"' . FBConnect::getPermissionsAttribute() . FBConnect::getOnLoginAttribute() . '></fb:login-button>
			</div>');
        }
    }
Ejemplo n.º 2
0
	<?php 
global $wgEnableFacebookConnectExt;
if (!empty($wgEnableFacebookConnectExt)) {
    ?>
<h1><?php 
    if ($isOasis) {
        // Don't mention Facebook in the h1 on Oasis (doesn't look right).
        print wfMsg("fbconnect-wikia-login-or-create");
    } else {
        print wfMsg("fbconnect-wikia-login-w-facebook");
    }
    ?>
</h1>
			<div id="AjaxLoginFBStart">
				<?php 
    print '<fb:login-button id="fbAjaxLoginConnect" size="large" length="short"' . FBConnect::getPermissionsAttribute() . FBConnect::getOnLoginAttribute() . '></fb:login-button>';
    ?>
			</div>
			<div class="or-div">
				<span><?php 
    print wfMsg('fbconnect-or');
    ?>
</span>
			</div>
			<?php 
}
?>

	<div class="<?php 
echo $isOasis ? 'modal-tabs' : 'wikia-tabs';
?>
Ejemplo n.º 3
0
 <a href="#"><?php 
        echo wfMsg('cnw-call-to-login');
        ?>
</a>
				<br>
				<?php 
        print '<fb:login-button id="fbAjaxSignupConnect" size="large" length="short"' . FBConnect::getPermissionsAttribute() . FBConnect::getOnLoginAttribute() . '>' . wfMsg('cnw-auth-facebook-signup') . '</fb:login-button>';
        ?>
			</p>
			<div class="facebook login">
				<span>- <?php 
        echo wfMsg('cnw-or');
        ?>
 -</span>
				<?php 
        print '<fb:login-button id="fbAjaxLoginConnect" size="large" length="short"' . FBConnect::getPermissionsAttribute() . FBConnect::getOnLoginAttribute() . '>' . wfMsg('cnw-auth-facebook-login') . '</fb:login-button>';
        ?>
			</div>
			<nav class="back-controls">
				<input type="button" value="<?php 
        echo wfMsg('cnw-back');
        ?>
" class="secondary back">
			</nav>
			<nav class="next-controls">
				<input type="button" value="<?php 
        echo wfMsg('cnw-login');
        ?>
" class="login">
				<input type="button" value="<?php 
        echo wfMsg('cnw-signup');
Ejemplo n.º 4
0
 /**
  * Create disconnect button and other things in pref
  *
  * @param $user User
  */
 static function GetPreferences($user, &$preferences)
 {
     global $wgOut, $wgJsMimeType, $wgExtensionsPath, $wgStyleVersion, $wgBlankImgUrl;
     $wgOut->addScript("<script type=\"{$wgJsMimeType}\" src=\"{$wgExtensionsPath}/FBConnect/prefs.js?{$wgStyleVersion}\"></script>\n");
     //$prefsection = 'fbconnect-prefstext';
     $id = FBConnectDB::getFacebookIDs($user, DB_MASTER);
     if (count($id) > 0) {
         $html = Xml::openElement("div", array("id" => "fbDisconnectLink"));
         $html .= wfMsg('fbconnect-disconnect-link');
         $html .= Xml::closeElement("div");
         $html .= Xml::openElement("div", array("style" => "display:none", "id" => "fbDisconnectProgress"));
         $html .= wfMsg('fbconnect-disconnect-done');
         $html .= Xml::openElement("img", array("id" => "fbDisconnectProgressImg", 'src' => $wgBlankImgUrl, "class" => "sprite progress"), true);
         $html .= Xml::closeElement("div");
         $html .= Xml::openElement("div", array("style" => "display:none", "id" => "fbDisconnectDone"));
         if ($user->getOption("fbFromExist")) {
             $html .= wfMsg('fbconnect-disconnect-info-existing');
         } else {
             $html .= wfMsg('fbconnect-disconnect-info');
         }
         $html .= Xml::closeElement("div");
         $preferences['fbconnect-prefstext'] = array('label' => "", 'type' => 'info', 'section' => 'fbconnect-prefstext/fbconnect-event-prefstext');
         $preferences['fbconnect-push-allow-never'] = array('type' => 'toggle', 'label-message' => 'tog-fbconnect-push-allow-never', 'section' => 'fbconnect-prefstext/fbconnect-event-prefstext');
         $preferences['fbconnect-connect'] = array('help' => $html, 'label' => "", 'type' => 'info', 'section' => 'fbconnect-prefstext/fbconnect-status-prefstext');
     } else {
         // User is a MediaWiki user but isn't connected yet.  Display a message and button to connect.
         $loginButton = '<fb:login-button id="fbPrefsConnect" ' . FBConnect::getPermissionsAttribute() . FBConnect::getOnLoginAttribute() . '></fb:login-button>';
         $html = wfMsg('fbconnect-convert') . '<br/>' . $loginButton;
         $html .= "<!-- Convert button -->\n";
         $preferences['fbconnect-disconnect'] = array('help' => $html, 'label' => "", 'type' => 'info', 'section' => 'fbconnect-prefstext/fbconnect-status-prefstext');
     }
     return true;
 }