plugin_openid:

* Added AOL shortcut
* Added description about the shortcuts to the configuration screen.
This commit is contained in:
Grischa Brockhaus 2012-03-26 03:08:31 +02:00
parent d122867175
commit 922e908908
9 changed files with 46 additions and 5 deletions

View file

@ -1,3 +1,8 @@
Version 0.8 (brockhaus)
---------------------------------
* Added AOL shortcut
* Added description about the shortcuts to the configuration screen.
Version 0.7 (brockhaus)
---------------------------------
* Was not able to change users OpenID url, if logged in with another external login (like BrowserID)

View file

@ -12,7 +12,9 @@
'<h3>OpenID benutzen, um in Dein Blog einzuloggen</h3>' .
'<p>Das Plugin benötigt keinerlei Konfiguration, um ein OpenID Login zu implementieren (OpenID konfiguriert sich selbstständig)</p>' .
'<p>Aber Benutzer, die OpenID als Login verwenden wollen, müssen einmal angeben, welche OpenID URL sie identifizieren soll. ' .
'Wenn Du also OpenID als Login Option benutzen möchtest, gehe zu Deiner <a href="serendipity_admin.php?serendipity[adminModule]=personal">Profilseite in Serendipity</a> und konfiguriere Deine OpenID URL (im unteren Bereich der Seite).</p>'
'Wenn Du also OpenID als Login Option benutzen möchtest, gehe zu Deiner <a href="serendipity_admin.php?serendipity[adminModule]=personal">Profilseite in Serendipity</a> und konfiguriere Deine OpenID URL (im unteren Bereich der Seite).</p>' .
'<p>Hier findest Du auch Knöpfe für <b>Google</b>, <b>Yahoo</b> und <b>Aol</b> Accounts. Diese Services sind ebenfalls OpenID Provider und die Knöpfe helfen Dir beim Setup der Verbindung.<br/>' .
'Es kann jedoch immer <b>nur eine OpenID Verbindung pro Benutzer</b> aktiviert werden.</p>'
);
@define('PLUGIN_OPENID_DELEGATION_DESCRIPTION',
@ -41,3 +43,5 @@
@define('PLUGIN_OPENID_SET_GOOGLE_OID', 'Deinen Google Account als OpenID setzen');
@define('PLUGIN_OPENID_LOGIN_WITH_YAHOO', 'Mit Deinem Yahoo Account einloggen');
@define('PLUGIN_OPENID_SET_YAHOO_OID', 'Deinen Yahoo Account als OpenID setzen');
@define('PLUGIN_OPENID_LOGIN_WITH_AOL', 'Mit Deinem Aol Account einloggen');
@define('PLUGIN_OPENID_SET_AOL_OID', 'Deinen Aol Account als OpenID setzen');

View file

@ -207,6 +207,8 @@ class serendipity_common_openid {
$imgopenid = $serendipity['baseURL'] . 'index.php?/plugin/openid.png';
$imggoogle = $serendipity['baseURL'] . 'index.php?/plugin/oid_google.png';
$imgyahoo = $serendipity['baseURL'] . 'index.php?/plugin/oid_yahoo.png';
$imgaol = $serendipity['baseURL'] . 'index.php?/plugin/oid_aol.png';
$form = '';
if (! empty($instructions)) {
$form = $instructions . '<br /><br />';
@ -229,6 +231,7 @@ class serendipity_common_openid {
}
$form .= '<input name="openIDLoginGoogle" type="image" src="' . $imggoogle . '" alt="' . PLUGIN_OPENID_LOGIN_WITH_GOOGLE . '" title="' . PLUGIN_OPENID_LOGIN_WITH_GOOGLE .'"/> ';
$form .= '<input name="openIDLoginYahoo" type="image" src="' . $imgyahoo . '" alt="' . PLUGIN_OPENID_LOGIN_WITH_YAHOO . '" title="' . PLUGIN_OPENID_LOGIN_WITH_YAHOO .'"/> ';
$form .= '<input name="openIDLoginAol" type="image" src="' . $imgaol . '" alt="' . PLUGIN_OPENID_LOGIN_WITH_AOL . '" title="' . PLUGIN_OPENID_LOGIN_WITH_AOL .'"/> ';
$form .= '</form>';
return $form;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View file

@ -12,7 +12,9 @@
'<h3>OpenID benutzen, um in Dein Blog einzuloggen</h3>' .
'<p>Das Plugin benötigt keinerlei Konfiguration, um ein OpenID Login zu implementieren (OpenID konfiguriert sich selbstständig)</p>' .
'<p>Aber Benutzer, die OpenID als Login verwenden wollen, müssen einmal angeben, welche OpenID URL sie identifizieren soll. ' .
'Wenn Du also OpenID als Login Option benutzen möchtest, gehe zu Deiner <a href="serendipity_admin.php?serendipity[adminModule]=personal">Profilseite in Serendipity</a> und konfiguriere Deine OpenID URL (im unteren Bereich der Seite).</p>'
'Wenn Du also OpenID als Login Option benutzen möchtest, gehe zu Deiner <a href="serendipity_admin.php?serendipity[adminModule]=personal">Profilseite in Serendipity</a> und konfiguriere Deine OpenID URL (im unteren Bereich der Seite).</p>' .
'<p>Hier findest Du auch Knöpfe für <b>Google</b>, <b>Yahoo</b> und <b>Aol</b> Accounts. Diese Services sind ebenfalls OpenID Provider und die Knöpfe helfen Dir beim Setup der Verbindung.<br/>' .
'Es kann jedoch immer <b>nur eine OpenID Verbindung pro Benutzer</b> aktiviert werden.</p>'
);
@define('PLUGIN_OPENID_DELEGATION_DESCRIPTION',
@ -41,3 +43,5 @@
@define('PLUGIN_OPENID_SET_GOOGLE_OID', 'Deinen Google Account als OpenID setzen');
@define('PLUGIN_OPENID_LOGIN_WITH_YAHOO', 'Mit Deinem Yahoo Account einloggen');
@define('PLUGIN_OPENID_SET_YAHOO_OID', 'Deinen Yahoo Account als OpenID setzen');
@define('PLUGIN_OPENID_LOGIN_WITH_AOL', 'Mit Deinem Aol Account einloggen');
@define('PLUGIN_OPENID_SET_AOL_OID', 'Deinen Aol Account als OpenID setzen');

View file

@ -12,7 +12,9 @@
'<h3>Using OpenID to log into your blog</h3>' .
'<p>This plugin does not need any configuration to enable login into your blog using OpenID (OpenID is self configuring)</p>' .
'<p>But users, who want to use OpenID for login have to configure the OpenID URL they want to be identified with. ' .
'So if you want to use OpenID as a login option, go to your <a href="serendipity_admin.php?serendipity[adminModule]=personal">Serendipity profile page</a> and configure your OpenID URL (at the bottom of the page).</p>'
'So if you want to use OpenID as a login option, go to your <a href="serendipity_admin.php?serendipity[adminModule]=personal">Serendipity profile page</a> and configure your OpenID URL (at the bottom of the page).</p>' .
'<p>There are buttons for <b>Google</b>, <b>Yahoo</b> and <b>Aol</b> accounts, too. These services are also OpenID providers and the buttons will assist you while setting up.<br/>' .
'But there can <b>only be one OpenID connection for an account</b> configured at a time.</p>'
);
@define('PLUGIN_OPENID_DELEGATION_DESCRIPTION',
@ -41,3 +43,5 @@
@define('PLUGIN_OPENID_SET_GOOGLE_OID', 'Set your Google account as OpenID');
@define('PLUGIN_OPENID_LOGIN_WITH_YAHOO', 'Login with your Yahoo account');
@define('PLUGIN_OPENID_SET_YAHOO_OID', 'Set your Yahoo account as OpenID');
@define('PLUGIN_OPENID_LOGIN_WITH_AOL', 'Login with your Aol account');
@define('PLUGIN_OPENID_SET_AOL_OID', 'Set your Aol account as OpenID');

View file

@ -0,0 +1,8 @@
Known OpenID endpoints
Google : https://www.google.com/accounts/o8/id
Google profile : http://www.google.com/profiles/~YOURUSERNAME
Yahoo : https://me.yahoo.com
AOL : https://www.aol.com
Wordpress : http://YOURBLOG.wordpress.com
LiveJournal : http://www.livejournal.com/openid/server.bml

View file

@ -13,7 +13,7 @@ class serendipity_event_openid extends serendipity_event
$propbag->add('description', PLUGIN_OPENID_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Grischa Brockhaus, Rob Richards');
$propbag->add('version', '0.7');
$propbag->add('version', '0.8');
$propbag->add('requirements', array(
'serendipity' => '1.2',
'smarty' => '2.6.7',
@ -110,6 +110,14 @@ class serendipity_event_openid extends serendipity_event
header('Content-Type: image/png');
echo file_get_contents(dirname(__FILE__). '/img/yahoo_small.png');
}
elseif ($eventData=="oid_aol.png") {
header('Content-Type: image/png');
echo file_get_contents(dirname(__FILE__). '/img/aol.png');
}
elseif ($eventData=="oids_aol.png") {
header('Content-Type: image/png');
echo file_get_contents(dirname(__FILE__). '/img/aol_small.png');
}
break;
case 'frontend_header':
$server = $this->get_config('server');
@ -149,7 +157,10 @@ class serendipity_event_openid extends serendipity_event
$openidurl = "https://www.google.com/accounts/o8/id";
}
elseif (isset($_POST['openIDLoginYahoo_x']) || isset($_POST['openIDLoginYahoo_y'])) { // If the Google Button was pressed
$openidurl = "https://yahoo.com";
$openidurl = "https://me.yahoo.com";
}
elseif (isset($_POST['openIDLoginAol_x']) || isset($_POST['openIDLoginAol_y'])) { // If the Google Button was pressed
$openidurl = "https://www.aol.com";
}
if ($_SESSION['serendipityAuthedUser'] == true) {
@ -194,6 +205,7 @@ class serendipity_event_openid extends serendipity_event
$imgopenid = $serendipity['baseURL'] . 'index.php?/plugin/openid.png';
$imggoogle = $serendipity['baseURL'] . 'index.php?/plugin/oids_google.png';
$imgyahoo = $serendipity['baseURL'] . 'index.php?/plugin/oids_yahoo.png';
$imgaol = $serendipity['baseURL'] . 'index.php?/plugin/oids_aol.png';
echo '<div>';
echo '<strong>' . htmlspecialchars(PLUGIN_EVENT_OPENID_SELECT) . '</strong><br /><br />';
@ -213,6 +225,7 @@ class serendipity_event_openid extends serendipity_event
echo '<input type="hidden" name="serendipity[openidflag]" value="3" />';
echo '<input name="openIDLoginGoogle" type="image" src="' . $imggoogle . '" alt="' . PLUGIN_OPENID_SET_GOOGLE_OID .'" title="'. PLUGIN_OPENID_SET_GOOGLE_OID .'"/> ';
echo '<input name="openIDLoginYahoo" type="image" src="' . $imgyahoo . '" alt="' . PLUGIN_OPENID_SET_YAHOO_OID .'" title="'. PLUGIN_OPENID_SET_YAHOO_OID .'"/> ';
echo '<input name="openIDLoginAol" type="image" src="' . $imgaol . '" alt="' . PLUGIN_OPENID_SET_AOL_OID .'" title="'. PLUGIN_OPENID_SET_AOL_OID .'"/> ';
echo '</form>';
echo '</div><br /><hr />';