m_helper = plugin_load('helper', 'autotooltip'); $this->m_exclude = $this->m_helper->isExcluded($ID); } /** * @param $format * @return bool */ function canRender($format) { return $format == 'xhtml'; } /** * Intercept Doku_Renderer_xhtml:internallink to give every wikilink a tooltip! * * @param string $id * @param null $name * @param null $search * @param bool $returnonly * @param string $linktype * @return string */ function internallink($id, $name = null, $search = null, $returnonly = false, $linktype = 'content') { global $ID; $fullId = $id; $id = preg_replace('/\#.*$/', '', $id); if (!$this->m_exclude && page_exists($id) && $id != $ID) { $link = parent::internallink($fullId, $name, $search, true, $linktype); $meta = $this->m_helper->read_meta_fast($id); $abstract = $meta['abstract']; $link = $this->m_helper->stripNativeTooltip($link); $link = $this->m_helper->forText($link, $abstract, $meta['title']); if (!$returnonly) { $this->doc .= $link; } return $link; } return parent::internallink($fullId, $name, $search, $returnonly, $linktype); } }