Extension talk:Talkright
Any user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).
Nifty. I just installed this and it appears to work. What more can you ask for? :) --pfctdayelise 11:46, 1 August 2006 (UTC)
Bug: the extension uses the userCan hook, but returns always false (more accurately, doesn't return anything). this causes further processing to stop, thus preventing other extensions from working. it should return false when user is not allowed and true otherwise Ittayd 10:30, 11 January 2007 (UTC)
- Patched. Now should work. Platonides 13:10, 20 March 2007 (UTC)
Large bug: this extension makes it impossible to protect talk pages. If a user has the talk right, then userCan will say that they can edit talk pages, whether they're protected or not. The userCan hook should only ever set $result to false... setting it to true will break things like page protection, setting it to null can break other extensions that have userCan hooks by clobbering their results... it should set it to false if we want to restrict access, and leave it unchanged if we want to allow it, or don't care. I've taken the liberty of fixing this, since it smells like a security hole... Phlip 11:07, 26 March 2007 (UTC)
I think the closing ?> has been missed. 87.218.103.201 14:11, 23 September 2007 (UTC)
-
- Thank you! I've just found the omission extrange. 193.41.227.170 10:57, 24 September 2007 (UTC)
Contents |
[edit] Mediawiki 1.9.0 tweaks
Hi there, I found I had to change a couple of things to make this work in MediaWiki 1.9.0.
- In alternateEdit() replace "mRights" with "getRights()"
- In LocalSettings.php use
require_once("./extensions/talkright.php");
instead of
include_once("extensions/talkright.php");
Note that the above conversation may have been edited or added to since the transfer. If in doubt, check the edit history.
[edit] Does anyone have examples of what Extension:Talkright looks like when implemented?
I already have a few wikis setup where the global default in LocalSettings.php is that articles are only editable by admins, and therefor all talk pages are open for anyone else. That way we can publish our agency's "rules" and keep them sacrosanct on article pages, but allow discussions about them in the discussion/talk page behind each article (http://en.citizendium.org/ uses "draft" sub-pages to accomplish this goal). The goal is to consider those discussions when next updating the rules / articles pages. Thanks! -- Peter Blaise peterblaise 14:26, 17 July 2007 (UTC)
[edit] Edit tab in talk page
Hi, I found that after enabling this extension there was only a "view source" button on existing discussions. To fix this problem, modify includes/SkinTemplate.php on line 672 changing
if ( $this->mTitle->quickUserCan( 'edit' ) && ( $this->mTitle->exists() || $this->mTitle->quickUserCan( 'create' ) ) ) {
to
if ( ($this->mTitle->quickUserCan( 'edit' ) || ($this->mTitle->isTalkPage() && $wgUser->isAllowed('talk'))) && ( $this->mTitle->exists() || $this->mTitle->quickUserCan( 'create' ) ) ) {
--Mwlazlo 04:59, 1 April 2008 (UTC)
[edit] Mediawiki 1.12
Doesn't work with mediawiki 1.12 for me. And i don't think i can point out the problem myself. Anybody some ideas how to fix this? --Wupme 15:14, 21 April 2008 (UTC)
[edit] media wiki 1.14
Couldn't get this to work after upgrading from 1.13.3 to 1.14.
did get edit_talk rights to work using the other extension..
anyone else have problems with this as 1.14?
[edit] Edit tab in 1.16
If you use Vector skin, you have also change Skins/Vector.php in line 117 to
"( $this->mTitle->quickUserCan( 'edit' ) || ($this->mTitle->isTalkPage() && $wgUser->isAllowed('talk')) )"
Adjustment to talkright.php to fix errorTo get this extension to work in 1.16, I had to change the parameter passed to alternateEdit from reference to value. That is, remove the '&' in front of the parameter.
[edit] Cannot Edit in 1.16 with PHP 5.3.8
change line 59, by removeing '&'
from
function alternateEdit(&$editPage) {
to
function alternateEdit($editPage) {