Lines Matching refs:link

197      * @param string $id the hash link
489 // output the footnote reference and link
822 * Render a CamelCase link
824 * @param string $link The link name
830 public function camelcaselink($link, $returnonly = false)
833 return $this->internallink($link, $link, null, true);
835 $this->internallink($link, $link);
840 * Render a page local link
842 * @param string $hash hash link identifier
843 * @param string $name name for the link
872 * @param string|null $name link name
907 $link = [];
914 $link['rel'] = 'nofollow';
925 $link['target'] = $conf['target']['wiki'];
926 $link['style'] = '';
927 $link['pre'] = '';
928 $link['suf'] = '';
929 $link['more'] = 'data-wiki-id="' . $id . '"'; // id is already cleaned
930 $link['class'] = $class;
934 $link['url'] = wl($id, $params);
935 $link['name'] = $name;
936 $link['title'] = $id;
939 ($conf['userewrite']) ? $link['url'] .= '?' : $link['url'] .= '&';
942 $link['url'] .= 's[]=' . implode('&s[]=', $search);
944 $link['url'] .= 's=' . rawurlencode($search);
949 if ($hash) $link['url'] .= '#' . $hash;
953 return $this->_formatLink($link);
955 $this->doc .= $this->_formatLink($link);
960 * Render an external link
963 * @param string|array $name name for the link, array for media file
997 $link = [];
998 $link['target'] = $conf['target']['extern'];
999 $link['style'] = '';
1000 $link['pre'] = '';
1001 $link['suf'] = '';
1002 $link['more'] = '';
1003 $link['class'] = $class;
1004 $link['url'] = $url;
1005 $link['rel'] = '';
1007 $link['name'] = $name;
1008 $link['title'] = $this->_xmlEntities($url);
1009 if ($conf['relnofollow']) $link['rel'] .= ' ugc nofollow';
1010 if ($conf['target']['extern']) $link['rel'] .= ' noopener';
1014 return $this->_formatLink($link);
1016 $this->doc .= $this->_formatLink($link);
1021 * Render an interwiki link
1025 * @param string $match original link - probably not much use
1026 * @param string|array $name name for the link, array for media file
1028 * @param string $wikiUri the fragment parsed from the original link
1036 $link = [];
1037 $link['target'] = $conf['target']['interwiki'];
1038 $link['pre'] = '';
1039 $link['suf'] = '';
1040 $link['more'] = '';
1041 $link['name'] = $this->_getLinkTitle($name, $wikiUri, $isImage);
1042 $link['rel'] = '';
1050 $link['class'] = "interwiki iw_$class";
1052 $link['class'] = 'media';
1057 $link['target'] = $conf['target']['wiki'];
1061 $link['class'] .= ' wikilink1';
1063 $link['class'] .= ' wikilink2';
1064 $link['rel'] .= ' nofollow';
1067 if ($conf['target']['interwiki']) $link['rel'] .= ' noopener';
1069 $link['url'] = $url;
1070 $link['title'] = $this->_xmlEntities($link['url']);
1074 if ($url == '') return $link['name'];
1075 return $this->_formatLink($link);
1077 $this->doc .= $link['name'];
1078 } else $this->doc .= $this->_formatLink($link);
1084 * @param string $url the link
1085 * @param string|array $name name for the link, array for media file
1094 $link = [];
1095 $link['target'] = $conf['target']['windows'];
1096 $link['pre'] = '';
1097 $link['suf'] = '';
1098 $link['style'] = '';
1100 $link['name'] = $this->_getLinkTitle($name, $url, $isImage);
1102 $link['class'] = 'windows';
1104 $link['class'] = 'media';
1107 $link['title'] = $this->_xmlEntities($url);
1110 $link['url'] = $url;
1114 return $this->_formatLink($link);
1116 $this->doc .= $this->_formatLink($link);
1126 * @param string|array $name name for the link, array for media file
1134 $link = [];
1135 $link['target'] = '';
1136 $link['pre'] = '';
1137 $link['suf'] = '';
1138 $link['style'] = '';
1139 $link['more'] = '';
1143 $link['class'] = 'mail';
1145 $link['class'] = 'media';
1159 $link['url'] = 'mailto:' . $address;
1160 $link['name'] = $name;
1161 $link['title'] = $title;
1165 return $this->_formatLink($link);
1167 $this->doc .= $this->_formatLink($link);
1203 $link = $this->_getMediaLinkConf($src, $title, $align, $width, $height, $cache, $render);
1207 $link['url'] = ml(
1217 // don't link movies
1222 $link['class'] .= ' mediafile mf_' . $class;
1223 $link['url'] = ml(
1232 if ($exists) $link['title'] .= ' (' . filesize_h(filesize(mediaFN($src))) . ')';
1235 if (!empty($hash)) $link['url'] .= '#' . $hash;
1239 $link['class'] .= ' wikilink2';
1245 return $link['name'];
1247 return $this->_formatLink($link);
1250 $this->doc .= $link['name'];
1252 $this->doc .= $this->_formatLink($link);
1291 // only output plaintext without link if there is no src
1295 $link = $this->_getMediaLinkConf($src, $title, $align, $width, $height, $cache, $render);
1297 $link['url'] = ml($src, ['cache' => $cache]);
1301 // link only jpeg images
1304 // don't link movies
1309 $link['class'] .= ' mediafile mf_' . $class;
1312 if ($hash) $link['url'] .= '#' . $hash;
1316 if ($linking == 'nolink' || $noLink) return $link['name'];
1317 else return $this->_formatLink($link);
1319 $this->doc .= $link['name'];
1320 } else $this->doc .= $this->_formatLink($link);
1618 * Build a link
1620 * Assembles all parts defined in $link returns HTML for the link
1622 * @param array $link attributes of a link
1627 public function _formatLink($link)
1630 if (!str_starts_with($link['url'], 'mailto:')) {
1631 $link['url'] = str_replace('&', '&', $link['url']);
1632 $link['url'] = str_replace('&', '&', $link['url']);
1635 $link['title'] = str_replace('&', '&', $link['title']);
1639 $link['url'] = strtr($link['url'], ['>' => '%3E', '<' => '%3C', '"' => '%22']);
1640 $link['title'] = strtr($link['title'], ['>' => '&gt;', '<' => '&lt;', '"' => '&quot;']);
1643 $ret .= $link['pre'];
1644 $ret .= '<a href="' . $link['url'] . '"';
1645 if (!empty($link['class'])) $ret .= ' class="' . $link['class'] . '"';
1646 if (!empty($link['target'])) $ret .= ' target="' . $link['target'] . '"';
1647 if (!empty($link['title'])) $ret .= ' title="' . $link['title'] . '"';
1648 if (!empty($link['style'])) $ret .= ' style="' . $link['style'] . '"';
1649 if (!empty($link['rel'])) $ret .= ' rel="' . trim($link['rel']) . '"';
1650 if (!empty($link['more'])) $ret .= ' ' . $link['more'];
1652 $ret .= $link['name'];
1654 $ret .= $link['suf'];
1836 * Returns HTML code for images used in link titles
1864 * helperfunction to return a basic link to a media
1875 * @return array associative array with link config
1882 $link = [];
1883 $link['class'] = 'media';
1884 $link['style'] = '';
1885 $link['pre'] = '';
1886 $link['suf'] = '';
1887 $link['more'] = '';
1888 $link['target'] = $conf['target']['media'];
1889 if ($conf['target']['media']) $link['rel'] = 'noopener';
1890 $link['title'] = $this->_xmlEntities($src);
1891 $link['name'] = $this->_media($src, $title, $align, $width, $height, $cache, $render);
1893 return $link;
1958 // alternative content (just a link to the file)
2026 // alternative content (just a link to the file)