Lines Matching refs:link
115 $link = $this->create_external_link($src);
116 return $this->_formatLink($link);
174 function is_image($link,&$type) { argument
176 if(strpos($link['class'],'media') === false) {
177 $type=$link['class'];
181 $mime_type = mimetype($link['title']);
183 list($url,$rest) = explode('?', $link['url']);
208 function _formatLink($link){ argument
211 if($this->is_image($link,$type)) {
212 if(preg_match('#media\s*=\s*http#',$link['url'])) {
213 $name = $this->copy_media($link['title'],true);
219 elseif(strpos($link['name'],'<img') !== false) {
220 $name = $this->copy_media($link['title']);
221 if(strpos($link['name'],'fetch.php') !== false) {
222 $t = $link['title'];
223 $link['name'] = preg_replace("#src=.*?$t\"#", "src=\"$name\"",$link['name']);
224 if(strpos($link['name'],'alt=""') !==false) {
225 $link['name'] = str_replace('alt=""','alt="'. $link['title'] . '"', $link['name']);
227 return $this->clean_image_link($link['name']);
229 elseif(strpos($link['url'],'fetch.php') !== false) {
230 if(preg_match('/src=\"(.*?)\"/',$link['name'],$matches)) {
231 …$link['name'] = '<a href="' . $matches[1] .'">' . $link['title'] . '</a>'; …
232 return $this->clean_image_link($link['name']);
235 $link['name'] = $this->clean_image_link($link['name']);
237 return $link['name'];
240 $name = $this->copy_media($link['title']);
243 elseif($link['class'] == 'media' && strpos($link['name'],'<img') !== false) {
244 …$this->doc .= '<a href="' . $link['url'] .'" class="media" title="' . $link['title'] . '" rel=…
248 if((strpos($link['class'],'wikilink') !== false ) && $type!='media') { //internal link
250 $name = $this->local_name($link,$orig,$frag);
255 return $this->set_footnote($link,$fnote);
260 if($link['class'] == 'wikilink2') {
262 if( file_exists($wfn) ) $link['class'] = 'wikilink1';
268 $name = $this->local_name($link,$orig);
269 if(!empty($link['display'])) {
270 $link['name'] = $link['display'];
271 if(strpos($link['class'],'mp3') !== false) {
275 else if(strpos($link['class'],'mp4') !== false) {
281 $link['class'] = 'wikilink1';
282 $out = $this->set_footnote($link,$note_url);
286 elseif($link['class'] != 'media') { // or urlextern or samba share or . . .
287 …$out = $this->set_footnote($link,trim($link['url'])); // creates an entry in output for the link …
288 if(isset($link['type']) && $link['type'] == 'ext_media') {
295 $link['url'] = $name;
296 if($frag) $link['url'] .="#$frag";
297 return parent::_formatLink($link);
300 function clean_image_link($link) { argument
301 $link = str_replace('Images/Images',"Images",$link);
302 $link = preg_replace('#[\.\/]*Images#', "../Images", $link );
303 return $link;
305 function set_footnote($link, $note_url="") { argument
306 $out = $link['name'];
308 $link['name'] = "[$fn_id]";
309 … if(preg_match("/media\s*=\s*(http.*)/", $link['url'],$matches)) { //format external urls
312 $link['url'] = 'footnotes.html#' .$this->current_page;
313 $link['class'] = 'wikilink1';
316 $out .= $hash_link . parent::_formatLink($link); // . '</a>';
333 function local_name($link,&$orig="", &$frag ="") { argument
334 $base_name= basename($link['url']);
335 $title = $link['title']? ltrim($link['title'],':'): "";
336 list($starturl,$frag) = explode('#',$link['url']);