对未登录用户隐藏mediawiki页面按钮
2011/10/21 16:481. 隐藏“阅读”、“查看源代码”、“历史”,修改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’; ?>”>
转载请注明来自:jijian91与小z - mediawiki
永久链接:https://jijian91.com/blog20111021/mediawiki-remove-button.html