Page MenuHomePhabricator

allow removing impossible page-actions
Closed, ResolvedPublic


One notes that despite in LocalSettings.php having

foreach(array('createaccount','edit','createpage','createtalk','writeapi')as $i){$wgGroupPermissions['*'][$i]=false;}

etc., one still sees in mobile view the page-actions (ca-edit,
ca-upload, and watch-this-article) icons appearing each page.

On read-only wikis these waste a whole line of real estate and just add to user frustration (Why do they trick me into clicking things only to tell me they aren't allowed?)

It would be great if one could zap it via LocalSettings.php


  • Save a whole line on read-only wikis,
  • where users cannot edit, upload, discuss, etc. */

$wgMFNoPageActions = false;
Perhaps better would be an array of items to zap, and if one zaps them all, the whole line disappears.
$wgMFRemovedPageActions = array(); #Add example.

Version: unspecified
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:09 AM
bzimport set Reference to bz63458.

bingle-admin wrote:

Prioritization and scheduling of this bug is tracked on Mingle card

One notices


  • Make the classes, tags and ids stripped from page content configurable.
  • Each item will be stripped from the page. */

$wgMFRemovableClasses = array(
These rules will be used for all transformations
'base' => array(),
HTML view
'HTML' => array(),

Maybe this somehow could be/is related/employed?

One notices a
protected function renderPageActions( $data ) {

		?><ul id="page-actions" class="hlist"><?php
		foreach( $this->getPageActions() as $key => $val ):
			echo $this->makeListItem( $key, $val );


Maybe wrapping part of it in
might work.

I tried
function JZ(&$z){$z->data['page_actions']=array(); return true;}
but that didn't work. Maybe I'm barking up the wrong tree.

I'm confused. With the MinervaPreRender patch, are you writing a patch to fix this or looking for a short term fix? Short term fix would be to simply use css or hack the PHP (not advised :-)).

SOmething like $wgMFNoPageActions would be great - but even better if it was more granular

e.g. $wgMFPageActions = array( 'watch', 'talk', 'edit', 'upload' );

No page actions would then just be a case of:
$wgMFPageActions = array();

Yes please implement that find grained approach. And users could then also do
$wgMFPageActions = array();
in LocalSettings.php to prevent current and future page actions from appearing.

Is there even a hook to get at this?

I will try my luck and implement the solution as Jon has proposed :) Have we a look what i can :D

Change 135793 had a related patch set uploaded by Florianschmidtwelzow:
Allow customization of page action buttons

Change 135793 merged by jenkins-bot:
Allow customization of page action buttons