オフィスプロシード : なんでも備忘録
PHP/PukiWiki/外部リンクのrel=nofollowをはずす方法
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
*[[PukiWiki 外部リンクのrel=nofollowをはずす方法:http://w...
lib/make_link.phpは、PukiWikiでリンクのHTMLコードを生成し...
このクラスのtoStringメソッドを修正します。
>
function toString()
{
// if (FALSE) {
if( preg_match( '/example.com/', $this->name ) )
{
$rel = '';
} else {
$rel = ' rel="nofollow"';
}
return '<a href="' . $this->name . '"' . $rel . '>' .
$this->alias . '</a>';
}
[[PHP/PukiWiki]]
終了行:
*[[PukiWiki 外部リンクのrel=nofollowをはずす方法:http://w...
lib/make_link.phpは、PukiWikiでリンクのHTMLコードを生成し...
このクラスのtoStringメソッドを修正します。
>
function toString()
{
// if (FALSE) {
if( preg_match( '/example.com/', $this->name ) )
{
$rel = '';
} else {
$rel = ' rel="nofollow"';
}
return '<a href="' . $this->name . '"' . $rel . '>' .
$this->alias . '</a>';
}
[[PHP/PukiWiki]]
ページ名:
[PR]