对未登录用户隐藏mediawiki页面按钮(查看源码、历史、编辑、讨论)
1. 隐藏“阅读”、“查看源代码”、“历史”,修改vector.php的:
<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的:
<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讨论页、登录,修改:
<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’; ?>”>
暂无评论