From: Evan Prodromou Date: Fri, 21 Aug 2009 21:01:48 +0000 (-0400) Subject: add OpenID doc menu item and doc page X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=209486d3be877d85b3e241797e6042283d0f66d6;p=quix0rs-gnu-social.git add OpenID doc menu item and doc page --- diff --git a/plugins/OpenID/OpenIDPlugin.php b/plugins/OpenID/OpenIDPlugin.php index 87b25d42a5..eb450fc5e5 100644 --- a/plugins/OpenID/OpenIDPlugin.php +++ b/plugins/OpenID/OpenIDPlugin.php @@ -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; + } }