add OpenID doc menu item and doc page

This commit is contained in:
Evan Prodromou 2009-08-21 17:01:48 -04:00
parent fbe99bbd18
commit 209486d3be
1 changed files with 26 additions and 0 deletions

View File

@ -196,4 +196,30 @@ class OpenIDPlugin extends Plugin
$action->raw($output);
return true;
}
function onStartLoadDoc(&$title, &$output)
{
if ($title == 'openid')
{
$filename = INSTALLDIR.'/plugins/OpenID/doc-src/openid';
$c = file_get_contents($filename);
$output = common_markup_to_html($c);
return false; // success!
}
return true;
}
function onEndLoadDoc($title, &$output)
{
if ($title == 'help')
{
$menuitem = '* [OpenID](%%doc.openid%%) - what OpenID is and how to use it with this service';
$output .= common_markup_to_html($menuitem);
}
return true;
}
}