SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: Arno H. <aho...@us...> - 2001年02月07日 17:21:26
Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv3958
Modified Files:
	stdlib.php transform.php 
Log Message:
removed references, added footnotes
Index: stdlib.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/stdlib.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** stdlib.php	2001年02月04日 18:19:30	1.22
--- stdlib.php	2001年02月07日 17:21:33	1.23
***************
*** 170,174 ****
 	 $link['link'] = "<a href=\"$ScriptUrl$match[1]\">$linkname</a>";
 } elseif (preg_match("#^\d+$#", $URL)) {
! $link['type'] = "reference-$linktype";
 	 $link['link'] = $URL;
 } else {
--- 170,174 ----
 	 $link['link'] = "<a href=\"$ScriptUrl$match[1]\">$linkname</a>";
 } elseif (preg_match("#^\d+$#", $URL)) {
! $link['type'] = "footnote-$linktype";
 	 $link['link'] = $URL;
 } else {
Index: transform.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/transform.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** transform.php	2001年02月07日 16:38:33	1.10
--- transform.php	2001年02月07日 17:21:33	1.11
***************
*** 266,269 ****
--- 266,271 ----
 function wtt_bracketlinks($line, &$trfrm)
 {
+ static $footnotes = array();
+ 
 // protecting [[
 $n = $ntok = $trfrm->tokencounter;
***************
*** 277,281 ****
 while ($n < $ntok) {
 	$link = ParseAndLink($trfrm->replacements[$n]);
! 	$trfrm->replacements[$n++] = $link['link'];
 }
 
--- 279,294 ----
 while ($n < $ntok) {
 	$link = ParseAndLink($trfrm->replacements[$n]);
! 	if (strpos($link['type'], 'footnote') === false) {
! 	 $trfrm->replacements[$n] = $link['link'];
! 	} else {
! 	 $ftnt = $link['link'];
! 	 if (isset($footnotes[$ftnt])) {
! 	 $trfrm->replacements[$n] = "<A NAME=\"footnote-$ftnt\"></A><A HREF=\"#footnote-rev-$ftnt\">[$ftnt]</A>";
! 	 } else { // first encounter of [x]
! 	 $trfrm->replacements[$n] = "<A NAME=\"footnote-rev-$ftnt\"></A><SUP><A HREF=\"#footnote-$ftnt\">[$ftnt]</A></SUP>";
! 	 $footnotes[$ftnt] = 1;
! 	 }
! 	}
! 	$n++;
 }
 
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 によって変換されたページ (->オリジナル) /