Jump to content

Extension talk:RightFunctions

Add topic
From mediawiki.org
Latest comment: 1 year ago by Doma2c in topic Dysfonction with MediaWiki version 1.42


Great Extension! .. But where is "Usergroups"? (plural)

[edit]

There is a "userrights" function which returns all of rights of a given user, and there is a "usergroup" function that returns the highest group a user belongs to, but why isn't there a "usergroups" function that works like "userrights" and returns all of the groups that a user belongs to? ... Would that be hard to add? .. Is there a reason not to?.

Thank you!

-Rich Revansx (talk) 21:29, 9 November 2017 (UTC)Reply

I believe this would indeed be a convenient parserfunction. Currently I do checks like e.g. {{#ifgroup: coordinator |[[Is in user group::Coordinator| ]] | |{{FULLPAGENAME}} }} per existing user group on each user's page to get that information. [[kgh]] (talk) 22:35, 9 November 2017 (UTC)Reply
so.. if you're willing to teach me, I'll be happy to join the dev team for this extension and try my hand at adding this capability.. whatsayyou? :-)
(btw.. I fixed my typo in the OP.. it was certainly confusing to read.. sorry) Revansx (talk) 23:03, 9 November 2017 (UTC)Reply
I would if I could but I am a novice programmer if at all, basically I am not. Pinging @Skizzerz: who is the creator of this extension. [[kgh]] (talk) 08:25, 10 November 2017 (UTC)Reply
See How to become a MediaWiki hacker for details on how to set up a local MediaWiki install. Then you need to download the extension from git (using the developer clone via SSH), make your changes, and then submit them to gerrit using the git review command. See here for a tutorial on how to set up git and git-review on your machine.
Once submitted, I'll perform a code review and will either let you know of any issues, or I will merge in the change. Skizzerz 18:39, 11 November 2017 (UTC)Reply

extension.json is missing from the download page on here

[edit]

It causes issues when I use update.php.

I had to give a visit to Github in order to get the missing file. MarioSuperstar77 (talk) 22:11, 13 July 2021 (UTC)Reply

Dysfonction with MediaWiki version 1.42

[edit]

The use of this extension with Mediawiki version 1.42 causes dysfunction.

I found the 2 errors which are the same 2.

You must modify in the "extrightfunctions.php" file, line 140 and 170.

Initially these lines are:

-> Getsereffectivegroups ($ user, usergroupManager :: Read_normal,! $ wgrightfunctionsallowcaching);

And it must be replaced by:

-> Getsereffectivegroups ($ User, Idbaccessobject :: Read_normal,! $ wgrightfunctionsallowcaching);

Errors have disappeared and the extension works normally again.

There may be another solution, but I don't know Mediawiki correctly. Doma2c (talk) 07:00, 5 August 2024 (UTC)Reply