Hi Mike, I amended the following parts: if( $this->iscontent ) { $subjpage = $this->mTitle->getSubjectPage(); $talkpage = $this->mTitle->getTalkPage();
$nskey = $this->mTitle->getNamespaceKey(); // $content_actions[$nskey] = $this->tabAction( // $subjpage, // $nskey, // !$this->mTitle->isTalkPage() && !$prevent_active_tabs, // '', true);
if ( $this->mTitle->getNamespace() == 102 ) { //then build a link to the main namespace $content_actions['nstab-main'] = $this->tabAction( Title::makeTitle( NS_MAIN, $this->mTitle->getText() ),'nstab-main',!$this->mTitle->isTalkPage() && !$prevent_active_tabs, '', true); }
elseif ( $this->mTitle->getNamespace() == 103 ) { //then build a link to the main namespace $content_actions['nstab-main'] = $this->tabAction( Title::makeTitle( NS_MAIN, $this->mTitle->getText() ),'nstab-main',!$this->mTitle->isTalkPage() && !$prevent_active_tabs, '', true); }
elseif ( $this->mTitle->getNamespace() == 104 ) { //then build a link to the main namespace $content_actions['nstab-main'] = $this->tabAction( Title::makeTitle( NS_MAIN, $this->mTitle->getText() ),'nstab-main',!$this->mTitle->isTalkPage() && !$prevent_active_tabs, '', true); }
elseif ( $this->mTitle->getNamespace() == 105) { //then build a link to the main namespace $content_actions['nstab-main'] = $this->tabAction( Title::makeTitle( NS_MAIN, $this->mTitle->getText() ),'nstab-main',!$this->mTitle->isTalkPage() && !$prevent_active_tabs, '', true); }
elseif ( $this->mTitle->getNamespace() == 106 ) { //then build a link to the main namespace $content_actions['nstab-main'] = $this->tabAction( Title::makeTitle( NS_MAIN, $this->mTitle->getText() ),'nstab-main',!$this->mTitle->isTalkPage() && !$prevent_active_tabs, '', true); }
elseif ( $this->mTitle->getNamespace() == 107 ) { //then build a link to the main namespace $content_actions['nstab-main'] = $this->tabAction( Title::makeTitle( NS_MAIN, $this->mTitle->getText() ),'nstab-main',!$this->mTitle->isTalkPage() && !$prevent_active_tabs, '', true); }
elseif ( $this->mTitle->getNamespace() == 108 ) { //then build a link to the main namespace $content_actions['nstab-main'] = $this->tabAction( Title::makeTitle( NS_MAIN, $this->mTitle->getText() ),'nstab-main',!$this->mTitle->isTalkPage() && !$prevent_active_tabs, '', true); }
elseif ( $this->mTitle->getNamespace() == 109 ) { //then build a link to the main namespace $content_actions['nstab-main'] = $this->tabAction( Title::makeTitle( NS_MAIN, $this->mTitle->getText() ),'nstab-main',!$this->mTitle->isTalkPage() && !$prevent_active_tabs, '', true); }
elseif ( $this->mTitle->getNamespace() == 110 ) { //then build a link to the main namespace $content_actions['nstab-main'] = $this->tabAction( Title::makeTitle( NS_MAIN, $this->mTitle->getText() ),'nstab-main',!$this->mTitle->isTalkPage() && !$prevent_active_tabs, '', true); }
elseif ( $this->mTitle->getNamespace() == 111 ) { //then build a link to the main namespace $content_actions['nstab-main'] = $this->tabAction( Title::makeTitle( NS_MAIN, $this->mTitle->getText() ),'nstab-main',!$this->mTitle->isTalkPage() && !$prevent_active_tabs, '', true); }
elseif ( $this->mTitle->getNamespace() == 112 ) { //then build a link to the main namespace $content_actions['nstab-main'] = $this->tabAction( Title::makeTitle( NS_MAIN, $this->mTitle->getText() ),'nstab-main',!$this->mTitle->isTalkPage() && !$prevent_active_tabs, '', true); }
elseif ( $this->mTitle->getNamespace() == 113 ) { //then build a link to the main namespace $content_actions['nstab-main'] = $this->tabAction( Title::makeTitle( NS_MAIN, $this->mTitle->getText() ),'nstab-main',!$this->mTitle->isTalkPage() && !$prevent_active_tabs, '', true); }
else { $content_actions[$nskey] = $this->tabAction( $subjpage, $nskey, !$this->mTitle->isTalkPage() && !$prevent_active_tabs, '', true); }
$content_actions['talk'] = $this->tabAction( $talkpage, 'talk', $this->mTitle->isTalkPage() && !$prevent_active_tabs, '', true);
if ( $ns == NS_MAIN || $ns == NS_TALK || $ns == 102) { $content_actions['blog'] = $this->tabAction( Title::makeTitle ( 102, $this->mTitle->getText() ), 'blog', $this->mTitle->getNamespace() == 102 && !$prevent_active_tabs,'', true); }
if ( $ns == NS_MAIN || $ns == NS_TALK || $ns == 110) { $content_actions['chrono'] = $this->tabAction( Title::makeTitle ( 110, $this->mTitle->getText() ), 'chrono', $this->mTitle->getNamespace() == 110 && !$prevent_active_tabs,'', true); }
if ( $ns == NS_MAIN || $ns == NS_TALK || $ns == 104) { $content_actions['how-to'] = $this->tabAction( Title::makeTitle ( 104, $this->mTitle->getText() ), 'how-to', $this->mTitle->getNamespace() == 104 && !$prevent_active_tabs,'', true); }
if ( $ns == NS_MAIN || $ns == NS_TALK || $ns == 106) { $content_actions['video'] = $this->tabAction( Title::makeTitle ( 106, $this->mTitle->getText() ), 'video', $this->mTitle->getNamespace() == 106 && !$prevent_active_tabs,'', true); }
if ( $ns == NS_MAIN || $ns == NS_TALK || $ns == 108) { $content_actions['gallery'] = $this->tabAction( Title::makeTitle ( 108, $this->mTitle->getText() ), 'gallery', $this->mTitle->getNamespace() == 108 && !$prevent_active_tabs,'', true); }
if ( $ns == NS_MAIN || $ns == NS_TALK || $ns == 112) { $content_actions['useful_links'] = $this->tabAction( Title::makeTitle ( 112, $this->mTitle->getText() ), 'useful_links', $this->mTitle->getNamespace() == 112 && !$prevent_active_tabs,'', true); }
PM Poon
On Mon, Aug 17, 2009 at 12:56 AM, Michael Daly michael.daly@kayakwiki.orgwrote:
Ekompute .info wrote:
Alternatively, how about having a second copy of SkinTemplate.php in the relevant skin folder and then redirecting the reference to point to the correct SkinTemplate?
I don't know what code changes you're referring to, however, you can probably take advantage of the fact that PHP is object oriented. Since functions are inherited and can be overridden in derived classes, you should be able to use a subclass to override the function in SkinTemplate.php. Conveniently, skins are subclasses of SkinTemplate. Since your skin need not be core code (you can easily copy an existing skin and rename it so it becomes your own skin), change it at will.
Mike
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l