From: Carsten K. <car...@us...> - 2001-12-06 06:24:47
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory usw-pr-cvs1:/tmp/cvs-serv13790/phpwiki/lib Modified Files: stdlib.php Log Message: Cleaned up linkimage code. Index: stdlib.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/stdlib.php,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -r1.52 -r1.53 *** stdlib.php 2001/12/03 23:37:25 1.52 --- stdlib.php 2001/12/06 06:24:44 1.53 *************** *** 23,31 **** return $url; return SERVER_URL . DATA_PATH . "/$url"; - // Beginnings of theme support by Carsten Klapp: - /* - global $theme; - return SERVER_URL . DATA_PATH . "/templates/$theme/$url"; - */ } --- 23,26 ---- *************** *** 112,116 **** return Element('strong', QElement('u', array('class' => 'baduri'), ! 'BAD URL -- remove all of <, >, "')); } --- 107,111 ---- return Element('strong', QElement('u', array('class' => 'baduri'), ! 'BAD URL -- remove all of <, >, "')); //" } *************** *** 131,145 **** //similar to the interwiki.map $linkproto = substr($url, 0, strrpos($url, ":")); ! if ($linkproto == "mailto") { $linkimg = "/images/mailto.png"; ! } elseif ($linkproto == "http") { $linkimg = "/images/http.png"; ! } elseif ($linkproto == "https") { $linkimg = "/images/https.png"; ! } elseif ($linkproto == "ftp") { $linkimg = "/images/ftp.png"; ! } else { $linkimg = "/images/http.png"; ! } return Element('a', array('href' => $url, 'class' => $class), --- 126,141 ---- //similar to the interwiki.map $linkproto = substr($url, 0, strrpos($url, ":")); ! switch($linkproto) { ! case "mailto": $linkimg = "/images/mailto.png"; ! case "http": $linkimg = "/images/http.png"; ! case "https": $linkimg = "/images/https.png"; ! case "ftp": $linkimg = "/images/ftp.png"; ! else $linkimg = "/images/http.png"; ! } return Element('a', array('href' => $url, 'class' => $class), |