aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Helpindex.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-16 17:11:48 -0700
committerzotlabs <mike@macgirvin.com>2017-03-16 17:11:48 -0700
commit446b5550a2c2b52bb31db5b99602c42b9dfdade6 (patch)
treebc7cf06be9fe2561bddf29ee3d4a082241b75248 /Zotlabs/Widget/Helpindex.php
parent051759580dc7aff7d5b349b3b5271f054c7d3423 (diff)
downloadvolse-hubzilla-446b5550a2c2b52bb31db5b99602c42b9dfdade6.tar.gz
volse-hubzilla-446b5550a2c2b52bb31db5b99602c42b9dfdade6.tar.bz2
volse-hubzilla-446b5550a2c2b52bb31db5b99602c42b9dfdade6.zip
the rest of the standard widgets converted
Diffstat (limited to 'Zotlabs/Widget/Helpindex.php')
-rw-r--r--Zotlabs/Widget/Helpindex.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/Zotlabs/Widget/Helpindex.php b/Zotlabs/Widget/Helpindex.php
new file mode 100644
index 000000000..62cecce1f
--- /dev/null
+++ b/Zotlabs/Widget/Helpindex.php
@@ -0,0 +1,45 @@
+<?php
+
+namespace Zotlabs\Widget;
+
+class Helpindex {
+
+ function widget($arr) {
+
+ $o .= '<div class="widget">';
+
+ $level_0 = get_help_content('sitetoc');
+ if(! $level_0)
+ $level_0 = get_help_content('toc');
+
+ $level_0 = preg_replace('/\<ul(.*?)\>/','<ul class="nav nav-pills nav-stacked">',$level_0);
+
+ $levels = array();
+
+
+ if(argc() > 2) {
+ $path = '';
+ for($x = 1; $x < argc(); $x ++) {
+ $path .= argv($x) . '/';
+ $y = get_help_content($path . 'sitetoc');
+ if(! $y)
+ $y = get_help_content($path . 'toc');
+ if($y)
+ $levels[] = preg_replace('/\<ul(.*?)\>/','<ul class="nav nav-pills nav-stacked">',$y);
+ }
+ }
+
+ if($level_0)
+ $o .= $level_0;
+ if($levels) {
+ foreach($levels as $l) {
+ $o .= '<br /><br />';
+ $o .= $l;
+ }
+ }
+
+ $o .= '</div>';
+
+ return $o;
+ }
+}