]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add OpenID doc menu item and doc page
authorEvan Prodromou <evan@controlyourself.ca>
Fri, 21 Aug 2009 21:01:48 +0000 (17:01 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Fri, 21 Aug 2009 21:01:48 +0000 (17:01 -0400)
plugins/OpenID/OpenIDPlugin.php

index 87b25d42a5eab08d49db92a636579028ee2e8c43..eb450fc5e5e29f73f840649df04419dbf7dd72ec 100644 (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;
+    }
 }