オープンソース・ソフトウェアの開発とダウンロード

CVS リポジトリの参照

Annotation of /pukiwiki/pukiwiki/plugin/anchor.inc.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (hide annotations) (download) (as text)
Mon Jan 27 05:16:04 2003 UTC (21 years, 3 months ago) by panda
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
File MIME type: application/x-httpd-php
FILE REMOVED
コマンドのプラグイン化

1 panda 1.3 <?php
2 panda 1.4 // $Id: anchor.inc.php,v 1.3 2002/11/29 00:09:01 panda Exp $
3 masui 1.2
4 masui 1.1 function plugin_anchor_convert()
5     {
6     global $WikiName,$BracketName,$script,$vars;
7    
8     if(func_num_args() == 1)
9     $aryargs = func_get_args();
10     else
11     return FALSE;
12    
13     list($wbn,$aname) = explode("#",$aryargs[0]);
14    
15     if(!$aname) return FALSE;
16    
17     if(!preg_match("/^$WikiName|$BracketName$/",$wbn) && $wbn)
18     $wbn = "[[$wbn]]";
19    
20     if(!preg_match("/^$WikiName|$BracketName$/",$aryargs[0]))
21     $page = "[[$aryargs[0]]]";
22     else
23     $page = $aryargs[0];
24    
25     $page = strip_bracket($page);
26    
27     if($wbn) $wbn = "$script?".rawurlencode($wbn);
28    
29     return "<a href=\"$wbn#$aname\">$page</a>";
30     }
31     ?>

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26