「MediaWiki:MainPage」の版間の差分

提供: 組込みシステム学講座
ナビゲーションに移動 検索に移動
(ページの作成:「組み込みシステム学講座」)
 
1行目: 1行目:
組み込みシステム学講座
+
/* Change the main page url used in things like the logo to an absolute url */
 +
$wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfChangeMainPageURL';
 +
function lfChangeMainPageURL( $sk, &$tpl ) {
 +
$tpl->data['nav_urls']['mainpage']['href'] = "http://www.your-desired-url.com/"; // Point the main page url to an absolute url
 +
return true;
 +
}
 +
 
 +
/* Change the main page url used in things like the logo to a url of another page on the wiki */
 +
$wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfChangeMainPageURL';
 +
function lfChangeMainPageURL( $sk, &$tpl ) {
 +
$tpl->data['nav_urls']['mainpage']['href'] = Title::newFromText('ThePage')->getLocalURL(); // Point the main page url to a wiki page's url
 +
return true;
 +
}

2017年11月1日 (水) 20:49時点における版

/* Change the main page url used in things like the logo to an absolute url */ $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfChangeMainPageURL'; function lfChangeMainPageURL( $sk, &$tpl ) { $tpl->data['nav_urls']['mainpage']['href'] = "http://www.your-desired-url.com/"; // Point the main page url to an absolute url return true; }

/* Change the main page url used in things like the logo to a url of another page on the wiki */ $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfChangeMainPageURL'; function lfChangeMainPageURL( $sk, &$tpl ) { $tpl->data['nav_urls']['mainpage']['href'] = Title::newFromText('ThePage')->getLocalURL(); // Point the main page url to a wiki page's url return true; }