function drawLink(&$node, &$link, $last = false) { $linkname = 'l' . $link->id; echo '<div class="link" id="' . $linkname . '"' . ' onclick="return SB_lnk(event,this)"' . ' oncontextmenu="return SB_menuOn(event,this)"' . ' x_acl="' . $node->aclstr . '"' . '>'; $ifavicon = ''; if ($link->favicon && $this->um->getParam('user', 'use_favicons')) { if ($link->favicon && $this->um->getParam('config', 'use_favicon_cache')) { $favurl = SB_Page::cdnBaseUrl() . 'favicon.php?'; if (substr($link->favicon, 0, 7) == 'binary:') { $favurl .= $link->favicon; } else { $favurl .= md5($link->favicon) . '=' . $link->id; } $link->favicon = $favurl; } // No height=16 width=16 - we want to keep the file small. $ifavicon = '<img class="favicon" alt="" src="' . $link->favicon . '" onerror="SB_WFI(this);">'; } else { $ifavicon = $link->private ? $this->ilinkp : ($link->is_feed ? $this->ifeed : $this->ilink); } if (!$this->switches['flat']) { echo implode("", $this->treearr) . ($last ? $this->ijoinl : $this->ijoin); } $target = ''; if ($link->target) { $target = ' target="' . $link->target . '"'; } else { if (!$link->ignoreHits) { $target = $link->target ? $link->target : SB_Page::target(); } } $sort_info = ''; if (strlen($link->sort_info)) { $sort_info = '<span class="sort_info">' . $link->sort_info . ' </span>'; } $class = ''; if ($link->private) { $class .= ' private'; } if ($link->is_dead) { $class .= ' dead'; } $toolTip = $link->comment ? substr($link->comment, 0, 255) . (strlen($link->comment) > 255 ? '...' : '') : $link->origURL; echo ($this->lmenu ? $ifavicon . $this->lmenu . $sort_info : '') . '<a id="a' . $linkname . '" ' . ($this->useToolTips ? 'x_' : '') . 'title="' . $this->quoteAtt($toolTip) . '" ' . ($class ? " class=\"{$class}\"" : '') . 'href="' . $this->quoteAtt($link->url) . '" ' . 'onmousedown="return SB_go(this,' . $link->id . ')" ' . ($this->useToolTips ? SB_Page::toolTip() : '') . $target . (!$this->switches['flat'] ? SB_Page::dragDropLink($link->id_parent, $link->id) : '') . '>' . ($this->lmenu ? '' : $ifavicon . $sort_info) . $this->quoteText($link->name) . '</a></div>' . "\r"; $this->linkCount++; }