「利用者:Nijcadmin/FY2013」の版間の差分

 
(同じ利用者による、間の2版が非表示)
1行目: 1行目:
= 2014年2月12日(水) =
===  Wikiflvタグ中に指定した.mp4ファイルが再生できない ===
*一時的に開始タグ「<」を削除して、再生できない状態にしてある。
**ファイル名末尾に「|」があったため、削除し再生確認
= 2013年5月6日(月) =
= 2013年5月6日(月) =


210行目: 216行目:
**UTF-8なページであれば WORD 境界を検索条件にしないように改造
**UTF-8なページであれば WORD 境界を検索条件にしないように改造
**一文字目を抜き出す処理はマルチバイト関数を利用
**一文字目を抜き出す処理はマルチバイト関数を利用
**XMLタグは delimiter として扱うよう改造
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
--- LinkTitles.body.php.orig 2013-05-03 22:26:22.000000000 +0900
--- LinkTitles.body.php.orig 2013-05-03 22:26:22.000000000 +0900
+++ LinkTitles.body.php 2013-05-10 15:55:15.475792240 +0900
+++ LinkTitles.body.php 2013-05-10 18:36:10.138947085 +0900
@@ -162,6 +162,8 @@
@@ -120,6 +120,9 @@
// optional. Note that in order to use preg_split(), it is important to have only one
// capturing subpattern (which precludes the use of conditional subpatterns).
( $wgLinkTitlesParseHeadings ) ? $delimiter = '' : $delimiter = '=+.+?=+|';
+ // NIJC: append XML tag to delimiter
+ $xmlPattern = '(?:<\/?\S+(?:\s+\S+=(?:\"[^\"]*\"|\'[^\']*\'))*\s*\/?>)|';
+ $delimiter = $delimiter . $xmlPattern;
$urlPattern = '[a-z]+?\:\/\/(?:\S+\.)+\S+(?:\/.*)?';
$delimiter = '/(' . $delimiter . '\[\[.*?\]\]|' . $templatesDelimiter .
'|\[' . $urlPattern . '\s.+?\]|'. $urlPattern .
@@ -162,6 +165,8 @@
   
   
  if ( $title != $myTitle ) {
  if ( $title != $myTitle ) {
222行目: 239行目:
  // split the string by [[...]] groups
  // split the string by [[...]] groups
  // credits to inhan @ StackOverflow for suggesting preg_split
  // credits to inhan @ StackOverflow for suggesting preg_split
@@ -173,17 +175,25 @@
@@ -173,17 +178,25 @@
  // way, or in a 'fuzzy' way where the first letter of the title may
  // way, or in a 'fuzzy' way where the first letter of the title may
  // be either case.
  // be either case.
250行目: 267行目:
  break;  
  break;  
  };
  };
@@ -201,9 +211,16 @@
@@ -201,9 +214,16 @@
   
   
  for ( $i = 0; $i < count( $arr ); $i+=2 ) {
  for ( $i = 0; $i < count( $arr ); $i+=2 ) {
267行目: 284行目:
  break;  
  break;  
  };
  };
@@ -216,7 +233,8 @@
@@ -216,7 +236,8 @@
  }
  }
   
   
277行目: 294行目:
  } else  {
  } else  {
  return '[[' . LinkTitles::$safeTitle . '|' . $matches[0] . ']]';
  return '[[' . LinkTitles::$safeTitle . '|' . $matches[0] . ']]';
@@ -224,7 +242,8 @@
@@ -224,7 +245,8 @@
  }
  }