$view_mode = !empty($_REQUEST['view_mode']) ? $_REQUEST['view_mode'] : ''; foreach ($qtlist as $name) { $tag = Toolbar::getTag($name); if (!$tag) { $tag = Toolbar::getTag($name, true); if (!$tag) { $tag = Toolbar::getTag($name, true, true); continue; } } $wys = strlen($tag->getWysiwygToken('dummy', false)) ? 'qt-wys' : ''; $wyswik = strlen($tag->getWysiwygWikiToken('dummy', false)) ? 'qt-wyswik' : ''; $test_html = $tag->getWikiHtml(''); $wiki = strlen($test_html) > 0 ? 'qt-wiki' : ''; $wiki = strpos($test_html, 'qt-sheet') !== false ? 'qt-sheet' : $wiki; $cust = Toolbar::isCustomTool($name) ? 'qt-custom' : ''; $avail = $tag->isAccessible() ? '' : 'qt-noaccess'; $icon = $tag->getIconHtml(); if (strpos($name, 'wikiplugin_') !== false) { $plug = 'qt-plugin'; $label = substr($name, 11); $qt_p_list[] = $name; } else { $plug = ''; $label = $name; if (empty($cust)) { $qt_w_list[] = $name; } } $label = htmlspecialchars($label); $label .= '<input type="hidden" name="token" value="' . $tag->getWysiwygToken('dummy', false) . '" />';