SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: Carsten K. <car...@us...> - 2001年12月03日 23:12:07
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv20953/phpwiki/lib
Modified Files:
	stdlib.php 
Log Message:
Linkimages now show for unbracketed urls. Optimized linkimage code.
Index: stdlib.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/stdlib.php,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -r1.50 -r1.51
*** stdlib.php	2001年12月02日 07:53:59	1.50
--- stdlib.php	2001年12月03日 23:12:04	1.51
***************
*** 123,129 ****
 }
 
! return QElement('a',
! array('href' => $url, 'class' => $class),
! $linktext);
 }
 
--- 123,149 ----
 }
 
! if (!defined('USE_LINK_ICONS')) {
! return QElement('a',
! array('href' => $url, 'class' => $class),
! $linktext);
! } else {
! //ideally the link image would be specified by a map file
! //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),
! Element('img', array('src' => DATA_PATH . $linkimg, 'alt' => $linkproto)) ." ". $linktext);
! }
 }
 
***************
*** 140,146 ****
 if (empty($linktext)) {
 $linktext = $wikiword;
! if (defined("autosplit_wikiwords"))
! $linktext=split_pagename($linktext);
! $class = 'wiki';
 }
 else
--- 160,166 ----
 if (empty($linktext)) {
 $linktext = $wikiword;
! if (defined("autosplit_wikiwords"))
! $linktext=split_pagename($linktext);
! $class = 'wiki';
 }
 else
***************
*** 155,160 ****
 if (empty($linktext)) {
 $linktext = $wikiword;
! if (defined("autosplit_wikiwords"))
! $linktext=split_pagename($linktext);
 $class = 'wikiunknown';
 }
--- 175,180 ----
 if (empty($linktext)) {
 $linktext = $wikiword;
! if (defined("autosplit_wikiwords"))
! $linktext=split_pagename($linktext);
 $class = 'wikiunknown';
 }
***************
*** 371,393 ****
 $link['link'] = LinkURL($URL, $linkname);
 
! if (!defined("USE_LINK_ICONS")) {
 $link['link'] = LinkURL($URL, $linkname);
! } else {
! //preg_split((.*?):(.*),ドル $URL, $matches);
! //preg_split("[:]", $URL, $matches);
! //$protoc = $matches[0] . "-" . $matches[1];
! $protoc = substr($URL, 0, strrpos($URL, ":"));
! if ($protoc == "mailto") {
! $link['link'] = "<img src=\"" . DATA_PATH . "/images/mailto.png\"> " . LinkURL($URL, $linkname);
! } elseif ($protoc == "http") { 
! $link['link'] = "<img src=\"" . DATA_PATH . "/images/http.png\"> " . LinkURL($URL, $linkname);
! } elseif ($protoc == "https") { 
! $link['link'] = "<img src=\"" . DATA_PATH . "/images/https.png\"> " . LinkURL($URL, $linkname);
! } elseif ($protoc == "ftp") { 
! $link['link'] = "<img src=\"" . DATA_PATH . "/images/ftp.png\"> " . LinkURL($URL, $linkname);
! } else {
! $link['link'] = LinkURL($URL, $linkname);
! }
! }
 
 	 }
--- 391,397 ----
 $link['link'] = LinkURL($URL, $linkname);
 
! 
 $link['link'] = LinkURL($URL, $linkname);
! 
 
 	 }
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /