Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
sidebar [2019/11/04 23:45]
muaddib
sidebar [2020/02/15 01:24] (current)
muaddib
Line 1: Line 1:
 +~~NOCACHE~~
 <html> <html>
 +<style>
 +/* Workaround to stop the Flat template from overriding link colors when inside a Bootstrap button. */
 +.btn-default:link, .btn-default:visited {
 +  color:#fff;
 +}
 +.btn-primary:link, .btn-primary:visited {
 +  color:#fff;
 +}
 +.btn-success:link, .btn-success:visited {
 +  color:#fff;
 +}
 +.btn-info:link, .btn-info:visited {
 +  color:#fff;
 +}
 +.btn-warning:link, .btn-warning:visited {
 +  color:#fff;
 +}
 +.btn-danger:link, .btn-danger:visited {
 +  color:#fff;
 +}
 +.btn-link:link, .btn-link:visited {
 +  color:#3699dc;
 +}
  
 +/* Workaround to stop Bootstrap button from overriding font-weight of a link. */
 +.bs-wrap-button strong a {
 +  font-weight: bold;
 +}
 +
 +/* Workaround to stop Apache's mod_pagespeed from interfering with media styles. */
 +script:first-child + .media {
 +  margin-top: 0;
 +}
 +</style>
 <script> <script>
-// Workaround to prevent auto-expand / auto-collapse menus in the flat template.+// Workaround to prevent auto-expand / auto-collapse menus in the Flat template.
 jQuery(document).ready(function() { jQuery(document).ready(function() {
- if ("ontouchstart" in window) { + jQuery("#site-navigation .menu-item-has-children .fa, #site-navigation .page_item_has_children .fa").off("click");
- jQuery("#site-navigation .menu-item-has-children .fa, #site-navigation .page_item_has_children .fa").off("click"); +
- }+
  jQuery("#site-navigation .menu-item-has-children .fa, #site-navigation .page_item_has_children .fa").click(function() {  jQuery("#site-navigation .menu-item-has-children .fa, #site-navigation .page_item_has_children .fa").click(function() {
  jQuery(this).toggleClass("open").next("ul").slideToggle(300);  jQuery(this).toggleClass("open").next("ul").slideToggle(300);
Line 12: Line 44:
  jQuery("#site-navigation .menu-item-has-children, #site-navigation .page_item_has_children").not(".current-menu-parent, .current_page_parent, .current_page_ancestor, .current-menu-ancestor").off("mouseenter mouseleave");  jQuery("#site-navigation .menu-item-has-children, #site-navigation .page_item_has_children").not(".current-menu-parent, .current_page_parent, .current_page_ancestor, .current-menu-ancestor").off("mouseenter mouseleave");
 }); });
 +
 +// Workaround to make RefNotes work well with the Flat template.
 +var dokuwikiElement = document.createElement("div");
 +dokuwikiElement.className = "dokuwiki";
 +document.body.appendChild(dokuwikiElement);
 </script> </script>
 +</html>
 +<php>
  
-<li class="fa fa-home menu-item menu-item-type-custom menu-item-home"> +global $ID; 
-  </html>[[:|Home]]<html> +global $INFO;
-</li>+
  
-<li class="fa fa-keyboard-o menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children current-menu-ancestor"> +// Edit the following page to modify the menu. 
-  </html>[[vampire:|Vampire Boards]]<html> +$controlPage = "navigationmenu";
-  <ul class="sub-menu"> +
-    <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children"> +
-      </html>[[vampire:vsa-v4:|Vampire Standalone (V4)]]<html> +
-      <ul class="sub-menu"> +
-        <li class="menu-item menu-item-type-custom"+
-          </html>[[vampire:vsa-v4:peripherals|Peripherals]]<html> +
-        </li> +
-        <li class="menu-item menu-item-type-custom"> +
-          </html>[[vampire:vsa-v4:troubleshooting|Troubleshooting]]<html> +
-        </li> +
-        <li class="menu-item menu-item-type-custom"> +
-          </html>[[vampire:vsa-v4:updates|Updates]]<html> +
-        </li> +
-      </ul> +
-    </li> +
-    <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children"> +
-      </html>[[vampire:v500-v2plus:|Vampire 500 (V2+)]]<html> +
-      <ul class="sub-menu"> +
-        <li class="menu-item menu-item-type-custom"> +
-          </html>[[vampire:v500-v2plus:peripherals|Peripherals]]<html> +
-        </li> +
-        <li class="menu-item menu-item-type-custom"> +
-          </html>[[vampire:v500-v2plus:troubleshooting|Troubleshooting]]<html> +
-        </li> +
-        <li class="menu-item menu-item-type-custom"> +
-          </html>[[vampire:v500-v2plus:updates|Updates]]<html> +
-        </li> +
-      </ul> +
-    </li> +
-    <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children"> +
-      </html>[[vampire:v600-v2:|Vampire 600 (V2)]]<html> +
-      <ul class="sub-menu"> +
-        <li class="menu-item menu-item-type-custom"> +
-          </html>[[vampire:v600-v2:peripherals|Peripherals]]<html> +
-        </li> +
-        <li class="menu-item menu-item-type-custom"> +
-          </html>[[vampire:v600-v2:troubleshooting|Troubleshooting]]<html> +
-        </li> +
-        <li class="menu-item menu-item-type-custom"> +
-          </html>[[vampire:v600-v2:updates|Updates]]<html> +
-        </li> +
-      </ul> +
-    </li> +
-    <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children"> +
-      </html>[[vampire:v1200:|Vampire 1200]]<html> +
-      <ul class="sub-menu"> +
-      </ul> +
-    </li> +
-    <li class="menu-item menu-item-type-custom"> +
-      </html>[[http://www.apollo-core.com/index.htm?page=reseller|Where To Buy]]<html> +
-    </li> +
-  </ul> +
-</li>+
  
-<li class="fa fa-calculator menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children"> +$instructions = p_cached_instructions(wikiFN($controlPage), false, $controlPage); 
-  </html>[[apollo_core:start|68080 CPU]]<html> +$max = count($instructions); 
-  <ul class="sub-menu"> +$pre = true; 
-    <li class="menu-item menu-item-type-custom"+$lvl = 0; 
-      </html>[[apollo_core:fpu|FPU]]<html+$parents = array(); 
-    </li+$page = ''; 
-  </ul+// build a lookup table 
-</li>+for ($i = 0; $i $max; $i++) { 
 + if ($instructions[$i][0] == 'listu_open') { 
 + $pre = false; 
 + $lvl++; 
 + if ($page) { 
 + array_push($parents, $page); 
 +
 + } elseif ($instructions[$i][0] == 'listu_close') { 
 + $lvl--; 
 + array_pop($parents); 
 + } elseif ($pre || $lvl == 0) { 
 + unset($instructions[$i]); 
 + } elseif ($instructions[$i][0== 'internallink') { 
 + $foo true; 
 + $page = $instructions[$i][1][0]; 
 + $isExternal = TRUE; 
 + if ($page[0] != '?') { 
 + resolve_pageid(getNS($ID), $page, $foo); // resolve relative to sidebar ID 
 + $isExternal = FALSE; 
 +
 + $details = explode("|", $instructions[$i][1][1]); 
 + $title = $details[0]; 
 + $options = array(); 
 + if (count($details) 1) { 
 + parse_str($details[1], $options); 
 +
 + $list[$page] = array( 
 + 'parents' => $parents, 
 + 'page' =$page, 
 + 'title' => $title, 
 + 'options' => $options, 
 + 'lvl' => $lvl, 
 + 'isExternal' => $isExternal, 
 + 'hasChildren' => FALSE 
 + ); 
 + } elseif ($instructions[$i][0] == 'externallink') { 
 + $page = $instructions[$i][1][0]; 
 + $details = explode("|", $instructions[$i][1][1]); 
 + $title = $details[0]; 
 + $options = array(); 
 + if (count($details) 1) { 
 + parse_str($details[1], $options); 
 +
 + $list[$page] = array( 
 + 'parents' =$parents, 
 + 'page' =$page, 
 + 'title' =$title, 
 + 'options' => $options, 
 + 'lvl' => $lvl, 
 + 'isExternal' => TRUE, 
 + 'hasChildren' => FALSE 
 + ); 
 +
 +
 +foreach ((array) $list as $pid => $info) { 
 + $parents = $info['parents']; 
 + $parentCount = count($parents); 
 + for ($i = 0; $i < $parentCount; $i++) { 
 + $list[$parents[$i]]['hasChildren'] = TRUE; 
 +
 +}
  
-<li class="fa fa-gamepad menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children"> +$openPath array(); 
-  </html>[[saga:|SAGA]]<html> +if (isset($list[$INFO['id']])) { 
-  <ul class="sub-menu"> + $openPath (array) $list[$INFO['id']]['parents']; // get the "pathof the page we're on currently 
-    <li class="menu-item menu-item-type-custom"> + array_push($openPath, $INFO['id']); 
-      </html>[[saga:video|Video]]<html> +} else { 
-    </li> + $ns $INFO['id']; 
-    <li class="menu-item menu-item-type-custom"> + // traverse up for matching namespaces 
-      </html>[[saga:sdcard|SDCard]]<html> + if ($list) do { 
-    </li> + $ns = getNS($ns); 
-    <li class="menu-item menu-item-type-custom"> + $try = "$ns:"; 
-      </html>[[saga:flash|SPI Flash]]<html> + resolve_pageid('', $try, $foo); 
-    </li> + if (isset($list[$try])) { 
-    <li class="menu-item menu-item-type-custom"> + // got a start page 
-      </html>[[saga_clock_counter|Clock-Cycle Counter]]<html> + $openPath (array) $list[$try]['parents']; 
-    </li> + array_push($openPath, $try); 
-    <li class="menu-item menu-item-type-custom"> + break; 
-      </html>[[saga:registers|All Registers]]<html> + } else { 
-    </li> + // search for the first page matching the namespace 
-    <li class="menu-item menu-item-type-custom"+ foreach ($list as $key => $junk) { 
-      </html>[[saga:updates|Updates]]<html> + if (getNS($key) == $ns) { 
-    </li> + $openPath = (array) $list[$key]['parents']; 
-  </ul> + array_push($openPath, $key); 
-</li>+ break 2; 
 +
 +
 +
 + } while ($ns); 
 +}
  
-<!--li class="fa fa-floppy-o menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children"> +$listItemClasses = array(); 
-  </html>[[os:|Operating Systems]]<html> +foreach ((array) $list as $pid => $info) { 
-</li-->+ $faOption = $info['options']['fa']; 
 + if ($faOption) { 
 + $listItemClass = "fa " . $faOption . " "; 
 + } else { 
 + $listItemClass = ""; 
 +
 + $listItemClass .= "menu-item menu-item-object-page menu-item-type-post_type"; 
 + if ($info['hasChildren']) { 
 + $listItemClass .= " menu-item-has-children"; 
 +
 + if ($info['page'] == "start") { 
 + $listItemClass .= " menu-item-home"; 
 +
 + $homepageexpandOption = $info['options']['homepageexpand']; 
 + if ($homepageexpandOption && $homepageexpandOption == "true" && $INFO['id'] == 'start') { 
 + if (!in_array($pid, $openPath)) { 
 + $listItemClass .= " current-menu-ancestor current-post_type-ancestor"; 
 +
 +
 + $listItemClasses[$pid] = $listItemClass; 
 +}
  
-<li class="fa fa-rocket menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children"> +$openPathCount = count($openPath); 
-  </html>[[system_tools:|System Tools]]<html> +for ($openPathIndex = 0; $openPathIndex $openPathCount; $openPathIndex++) { 
-</li>+ if ($openPathIndex + 1 == $openPathCount) { 
 + $listItemClass = "current-menu-item current-menu-parent current-post_type-parent"; 
 + } elseif ($openPathIndex + 2 == $openPathCount) { 
 + $listItemClass = "current-menu-parent current-post_type-parent"; 
 + } else { 
 + $listItemClass = "current-menu-ancestor current-post_type-ancestor"; 
 +
 + $pid = $openPath[$openPathIndex]; 
 + $listItemClasses[$pid.= " " . $listItemClass; 
 +}
  
-<li class="fa fa-star menu-item menu-item-type-custom"> +$open = false; 
-    <a href="?do=index">Sitemap</a> +$lvl = 1; 
-</li>+$R = new Doku_Renderer_xhtml(); 
 +foreach ((array) $list as $pid => $info) { 
 + // skip every non readable page 
 + if (auth_quickaclcheck(cleanID($info['page'])) < AUTH_READ) { 
 + continue; 
 +
 + $listItemClass = $listItemClasses[$pid]; 
 + if ($info['lvl'] == $lvl) { 
 + if ($open) { 
 + $R->doc .= "</li>\n"; 
 +
 + $R->doc .= "<li class=\"" . $listItemClass . "\">\n"; 
 + $open = true; 
 + } elseif ($lvl > $info['lvl']) { 
 + for ($lvl; $lvl > $info['lvl']; --$lvl) { 
 + $R->doc .= "</li>\n"; 
 + $R->doc .= "</ul>\n"; 
 +
 + $R->doc .= "</li>\n"; 
 + $R->doc .= "<li class=\"" . $listItemClass . "\">\n"; 
 + } elseif ($lvl < $info['lvl']) { 
 + // more than one run is bad nesting! 
 + for ($lvl; $lvl < $info['lvl']; ++$lvl) { 
 + $R->doc .= "<ul class=\"sub-menu\">\n"; 
 + $R->doc .= "<li class=\"" . $listItemClass . "\">\n"; 
 + $open = true; 
 +
 +
 + if ($info['isExternal']) { 
 + $externalPage = $info['page']; 
 + if ($externalPage[0] == '?') { 
 + $R->doc .= "<a href=\"" . $externalPage . "\" class=\"wikilink1\" title=\"" . $externalPage . "\">" . $info['title'] . "</a>"; 
 + } else { 
 + $R->externallink($externalPage, $info['title']); 
 +
 + } else { 
 + $R->internallink(':' . $info['page'], $info['title']); 
 +
 +
 +while ($lvl > 0) { 
 + $R->doc .= "</li>\n"; 
 + if ($lvl > 1) { 
 + $R->doc .= "</ul>\n"; 
 +
 + --$lvl; 
 +
 + 
 +echo $R->doc; 
 + 
 +</php>
  
-</html> 
Last modified: le 2019/11/04 23:45