- 追加された行はこの色です。
- 削除された行はこの色です。
*xpwiki [#re0305fa]
[[xpwiki>+http://xoops.hypweb.net/modules/xpwiki/]]
*Strict Standards [#q4a873d9]
&size(16){&font(b){Strict Standards: Non-static method XoopsErrorHandler::getInstance() should not be called statically in /home/apache/html/digimoog_member/digixoops/class/errorhandler.php on line 202};};
~
*xpwiki別窓リンク [#t839c3c8]
ファイルの編集箇所は[[PukiWikiでの別窓リンク方法>PukiWiki/改良/別窓リンク]]と似ているのだが、編集箇所の一部が違うのでメモ
使い方はPukiWikiでの場合と同じでURLの先頭に”+”を付加する
# cd [XOOPS_TRUST_PATH]/modules/xpwiki/class
# cp make_link.php make_link.php-
# chown root.root make_link.php-
# chmod 400 make_link.php-
# vi make_link.php
php5.4を使用してxoopsを構築した際に発生。
php5.3の仕様とphp5.4の仕様では大きな違いがある為に発生する。(←インスタンスを“public static”にする必要がある為?)
一番楽なのはphp5.3を使用する事だが、それが出来ない場合には以下のxoopsソースの一部(具体的にはgetInstance()を使用する関数指定を変更)を書き換える事でエラーが出なくなる。
~
以後の書き換える場所は、バージョン毎によって変化
[[ver 4.x>#vc76c24f]]
[[ver 5.x>#g5d8add3]]
~
*xpwiki別窓リンク - ver 4.x [#mcc538e0]
-&size(16){&font(b){クラス名:XpWikiLink_url extends XpWikiLink};};
-メソッド名:function get_pattern()
-( # (3) url
- (?:(?:https?|ftp|news):\/\/|mailto:)[\w\/\@\$()!?&%#:;.,~'=*+-]+
-)
# vi [XOOPS_ROOT_PATH]/class/errorhandler.php
-&size(16){&font(b){クラス名:XoopsErrorHandler};};
- function &getInstance()
- {
- static $instance = null;
- if (empty($instance)) {
- $instance = new XoopsErrorHandler;
- }
- return $instance;
- }
_/_/_/_/_/
+( # (3) url
+ (?:(?:\+?https?|\+?ftp|\+?news):\/\/|mailto:)[\w\/\@\$()!?&%#:;.,~'=*+-]+
+)
~
-メソッド名:function toString()
- $img = ($this->is_image)? ' type="img"' : '';
- return '<a href="'.$this->name.'"'.$title.$rel.$class.$img.$target.'>'.$this->alias.'</a>';
_/_/_/_/_/
+ $img = ($this->is_image)? ' type="img"' : '';
+ if (ereg("^(\+)(.*)", $this->name, $regs)) {
+ return '<a href="' . $regs[2] . '" target="_blank" ' . $title.$rel.$class.$img.$target . '>' . $this->alias . '</a>';
+ }else{
+ return '<a href="' . $this->name . '"' . $title.$rel.$class.$img.$target . '>' . $this->alias . '</a>';
+ public static function &getInstance()
+ {
+ static $instance = null;
+ if (empty($instance)) {
+ $instance = new XoopsErrorHandler;
+ }
+ return $instance;
+ }
----
-&size(16){&font(b){クラス名:XpWikiLink_url_i18n extends XpWikiLink};};
-メソッド名:function get_pattern()
-( # (3) scheme
- (?:(?:https?|ftp|news):\/\/|mailto:)
-)
_/_/_/_/_/
+( # (3) scheme
+ (?:(?:\+?https?|\+?ftp|\+?news):\/\/|mailto:)
+)
~
-メソッド名:function toString()
- return '<a href="'.$this->name.'"'.$title.$rel.$class.$img.$target.'>'.$this->alias.'</a>'.$host;
# vi [XOOPS_ROOT_PATH]/class/database/database.php
-&size(16){&font(b){クラス名:Database};};
- function &getInstance()
- {
- $instance =& XoopsDatabaseFactory::getDatabaseConnection();
- return $instance;
- }
_/_/_/_/_/
+ if (ereg("^(\+)(.*)", $this->name, $regs)) {
+ return '<a href="' . $regs[2] . '" target="_blank" ' . $title.$rel.$class.$img.$target . '>' . $this->alias . '</a>' . $host;
+ }else{
+ return '<a href="' . $this->name . '"' . $title.$rel.$class.$img.$target . '>' . $this->alias . '</a>' . $host;
+ }
~
*xpwiki別窓リンク - ver 5.x [#he9a391a]
-&size(16){&font(b){クラス名:XpWikiLink_url extends XpWikiLink};};
-メソッド名:function get_pattern()
-( # (3) url
- (?:(?:https?|ftp|news|site):\/\/|mailto:)[\w\/\@\$()!?&%#:;.,~'=*+-]+
-)
_/_/_/_/_/
+( # (3) url
+ (?:(?:\+?https?|\+?ftp|\+?news|\+?site):\/\/|mailto:)[\w\/\@\$()!?&%#:;.,~'=*+-]+
+)
~
-メソッド名:function toString()
- $img = ($this->is_image)? ' type="img"' : '';
- return '<a href="'.$this->name.'"'.$title.$rel.$class.$img.$target.'>'.$this->alias.'</a>';
_/_/_/_/_/
+ $img = ($this->is_image)? ' type="img"' : '';
+ if (ereg("^(\+)(.*)", $this->name, $regs)) {
+ return '<a href="' . $regs[2] . '" target="_blank" ' . $title.$rel.$class.$img.$target . '>' . $this->alias . '</a>';
+ }else{
+ return '<a href="' . $this->name . '"' . $title.$rel.$class.$img.$target . '>' . $this->alias . '</a>';
+ public static function &getInstance()
+ {
+ $instance =& XoopsDatabaseFactory::getDatabaseConnection();
+ return $instance;
+ }
----
-&size(16){&font(b){クラス名:XpWikiLink_url_i18n extends XpWikiLink};};
-メソッド名:function get_pattern()
-( # (3) scheme
- (?:(?:https?|ftp|news|site):\/\/|mailto:)
-)
_/_/_/_/_/
+( # (3) scheme
+ (?:(?:\+?https?|\+?ftp|\+?news|\+?site):\/\/|mailto:)
+)
~
-メソッド名:function toString()
- return '<a href="'.$this->name.'"'.$title.$rel.$class.$img.$target.'>'.$this->alias.'</a>'.$host;
_/_/_/_/_/
+ if (ereg("^(\+)(.*)", $this->name, $regs)) {
+ return '<a href="' . $regs[2] . '" target="_blank" ' . $title.$rel.$class.$img.$target . '>' . $this->alias . '</a>' . $host;
+ }else{
+ return '<a href="' . $this->name . '"' . $title.$rel.$class.$img.$target . '>' . $this->alias . '</a>' . $host;
+ }
~