2011年10月21日

1. 隐藏“阅读”、“查看源代码”、“历史”,修改vector.php的735行:

<div id=”p-views” class=”vectorTabs<?php if  count( $this->data[‘view_urls’] ) == 0 ) echo ‘ emptyPortlet’; ?>”>

改为:

<div id=”p-views” class=”vectorTabs<?php if ( !($this->data[‘loggedin’]) || count( $this->data[‘view_urls’] ) == 0 ) echo ‘ emptyPortlet’; ?>”>

2. 隐藏“编辑”、“讨论”,修改vector.php的700行:

<div id=”p-namespaces” class=”vectorTabs<?php if ( count( $this->data[‘namespace_urls’] ) == 0 ) echo ‘ emptyPortlet’; ?>”>

改为:

<div id=”p-namespaces” class=”vectorTabs<?php if ( !($this->data[‘loggedin’]) || count( $this->data[‘namespace_urls’] ) == 0 ) echo ‘ emptyPortlet’; ?>”>

3. 隐藏ip、ip讨论页、登录,修改761行:

<div id=”p-personal” class=”<?php if ( count( $this->data[‘personal_urls’] ) == 0 ) echo ‘ emptyPortlet’; ?>”>

改为: 

<div id=”p-personal” class=”<?php if ( !($this->data[‘loggedin’]) || count( $this->data[‘personal_urls’] ) == 0 ) echo ‘ emptyPortlet’; ?>”>

原文永久链接:https://jijian91.com/blog20111021/mediawiki-remove-button.html