UI for linking in the MediaWiki openid extension
Pat Felsted
pfelsted at novell.com
Tue Jul 25 21:01:09 UTC 2006
I created a little UI (not much) for Evans open id media wiki extension
To look at the UI go to:
http://www.bandit-project.org/images/4/47/Openidlogin.PNG
php for the UI:
function openIDLink( ) {
global $wgUser;
$sk =& $wgUser->getSkin();
$output = "<li id='pt-openidlogin'><a href='";
$output .= htmlspecialchars($sk->makeSpecialUrl('OpenIDLogin',
'returnto=' . $sk->thisurl ));
$output .= "' style='background:
url(http://www.openid.net/login-bg.gif) no-repeat; background-color:
#fff; background-position: 0 50%; color: #000; padding-left: 18px;'
>OpenID Login</a></li>";
return $output;
}
I just called this function in my monobook.php script where it
generates the personal tools:
<!-- BEGIN personal tools -->
<div class="portlet" id="p-personal">
<h5>
<?php $this->msg('personaltools') ?>
</h5>
<div class="pBody">
<ul>
<?php foreach($this->data['personal_urls'] as $key => $item)
{ ?>
<li id="pt-<?php echo htmlspecialchars($key) ?>"><a
href="<?php
echo htmlspecialchars($item['href']) ?>"<?php
if(!empty($item['class'])) { ?> class="<?php
echo htmlspecialchars($item['class']) ?>"<?php } ?>>
<?php
echo htmlspecialchars($item['text']) ?>
</a></li>
<?php } echo openIDLink(); ?>
</ul>
</div>
</div>
<!-- END personal tools -->
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/yadis/attachments/20060725/b0d6eef5/attachment.htm
More information about the yadis
mailing list