Last modified: 2014-06-02 20:42:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T65458, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63458 - allow removing impossible page-actions
allow removing impossible page-actions
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
unspecified
All All
: Unprioritized enhancement
: ---
Assigned To: Florian
http://lists.wikimedia.org/pipermail/...
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-03 04:21 UTC by Dan Jacobson
Modified: 2014-06-02 20:42 UTC (History)
10 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dan Jacobson 2014-04-03 04:21:53 UTC
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.
Comment 1 Bingle 2014-04-03 04:25:12 UTC
Prioritization and scheduling of this bug is tracked on Mingle card https://wikimedia.mingle.thoughtworks.com/projects/mobile/cards/1895
Comment 2 Dan Jacobson 2014-04-03 05:36:34 UTC
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?
Comment 3 Dan Jacobson 2014-04-07 02:53:11 UTC
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 );
		endforeach;
		?></ul><?php
	}

Maybe wrapping part of it in
if(!$wgMFNoPageActions){}
might work.

I tried
function JZ(&$z){$z->data['page_actions']=array(); return true;}
$wgHooks['MinervaPreRender'][]='JZ';
but that didn't work. Maybe I'm barking up the wrong tree.
Comment 4 Jon 2014-04-07 17:24:43 UTC
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();
Comment 5 Dan Jacobson 2014-04-08 05:08:11 UTC
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.
Comment 6 Dan Jacobson 2014-04-13 03:38:20 UTC
Is there even a hook to get at this?
Comment 7 Florian 2014-05-28 12:20:37 UTC
I will try my luck and implement the solution as Jon has proposed :) Have we a look what i can :D
Comment 8 Gerrit Notification Bot 2014-05-28 17:08:52 UTC
Change 135793 had a related patch set uploaded by Florianschmidtwelzow:
Allow customization of page action buttons

https://gerrit.wikimedia.org/r/135793
Comment 9 Gerrit Notification Bot 2014-06-02 20:38:52 UTC
Change 135793 merged by jenkins-bot:
Allow customization of page action buttons

https://gerrit.wikimedia.org/r/135793

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links