Hello everyone,
I have modified the isAllowed() function in the includes/User.php file
(tested with MediaWiki 1.6.5). It provides the possibility to restrain user
groups to read or edit specific namespaces only.
For instance I have a namespace named 'MyProject' and I want a set of users
only to be able to access it. Then I create a dedicated group
'MyProjectEditors'.
Here is how the LocalSettings.php file looks like:
$wgExtraNamespaces =
array(100 => "MyProject",
101 => "MyProject_Talk",
);
unset($wgGroupPermissions['user' ]);
$wgGroupPermissions['*' ]['createaccount'] = false;
$wgGroupPermissions['*' ]['read'] = false;
$wgGroupPermissions['*' ]['edit'] = false;
$wgGroupPermissions['*' ]['minoredit'] = false;
$wgGroupPermissions['*' ]['createpage'] = false;
$wgGroupPermissions['*' ]['createtalk'] = false;
$wgGroupPermissions['user' ]['readable'] = array(NS_MAIN, NS_TALK,
NS_CATEGORY, NS_USER, NS_SPECIAL);
$wgGroupPermissions['MyProjectEditors']['readable'] = array(100, 101);
$wgGroupPermissions['MyProjectEditors']['editable'] = array(100, 101);
$wgWhitelistRead = array( "Main Page", "Special:Userlogin", "-",
"MediaWiki:Monobook.css" );
Here is the isAllowed() function:
function isAllowed($action='') {
global $wgTitle, $wgGroupPermissions;
if ( $action === '' )
// In the spirit of DWIM
return true;
$editable = array();
$readable = array();
foreach($this->getEffectiveGroups() as $group) {
isset($wgGroupPermissions[$group]['editable'])
and $editable = array_merge($editable,
$wgGroupPermissions[$group]['editable']);
isset($wgGroupPermissions[$group]['readable'])
and $readable = array_merge($readable,
$wgGroupPermissions[$group]['readable']);
}
if ( $action === 'edit' || $action == 'createpage' ) {
return in_array($wgTitle->getNamespace(), $editable) ||
in_array($action, $this->mRights);
}
if ( $action === 'read' ) {
return in_array($wgTitle->getNamespace(), $readable) ||
in_array($action, $this->mRights);
}
$this->loadFromDatabase();
return in_array( $action , $this->mRights );
}
Note that you can allow groups to read-only access as well (set 'readable'
and not 'editable').
Best Regards,
Fabien.
--
DISCLAIMER:
This e-mail contains proprietary information some or all of which may be
legally privileged. It is for the intended recipient only. If an addressing
or transmission error has misdirected this e-mail, please notify the author
by replying to this e-mail. If you are not the intended recipient you must
not use, disclose, distribute, copy, print, or rely on this e-mail.
Is there any security risk in showing an article's ID number to the
public?
I'm working on a quick and dirty hack to add forum style discussions
to my wiki. It's a temporary solution until we see what happens with
Liquid Threads. I am putting all of the threads in their own
namespace 'Discussion' and I'm trying to decide on the naming
convention for the page titles ...
Discussion:RelatedAritcleID/Topic title ... ie: 4018/Something
or
Discussion:RelatedPageTitle/Topic Title ... ie: Big round things/
Something
I was leaning towards articleID because its shorter and will continue
to work even after a related article has been moved. But i don't know
if there is any risk in showing the articleID to users.
thanks in advance
I am trying to set up a trilingual wiki (www.treekee.com). Gosh, what a lot
of grief the multi-lingual wiki setup is; really is a design disaster.
Anyway, no point crying over spilt milk:
a) is there a way I can have single signon. It's a right pain for me (and
even worse for users) to have to have 3 signons.
b) I heard rumour that there are plans to completely revamp multi-lingual
wiki design - can somebody point me to the right spot to follow this please.
Thanks.
What is the usual activity level of the bugcheckers at the MediaWiki
bugzilla site? Is there a whole boatload of people going through the
new bug reports, looking for things they can help with, or is there one
guy that goes through them every second tuesday? :-)
In short, how many days is normal to expect between posting a bug and
seeing a response?
Would I be better off bringing the relevant discussion (that was posted
in the bug report) back to the list here, or waiting for something to
happen on the Bugzilla site?
--
Nomad of Norad (David C. Hall) --- *TeamAmiga*
nomad(a)joshua-wopr.com --- http://www.joshua-wopr.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
For a dementedly wacky sci-fi continue-the-story project,
join my WebBBS. http://www.joshua-wopr.com/phpBB/index.php
----------------------------------------------------------
This is the Emergency Backup .Signature File, it kicks in
if the Regular Backup .Signature File fails to load.
> -----Original Message-----
> From: mediawiki-l-bounces(a)Wikimedia.org
> [mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Brion Vibber
> Sent: Wednesday, 24 May 2006 6:00 PM
> To: MediaWiki announcements and site admin list
> Subject: Re: [Mediawiki-l] Placing Google Earth *.kml, *.kmz
> files within a wiki page
>
> Andrew Lowe wrote:
> > One of my users wishes to be able to place Google Earth, GE,
> > *.kml/*.kmz files within a wiki page. In turn he wants to
> be able to
> > click on the link and have it load up GE, GE moving to the
> coordinates
> > etc within the file. Any ideas as to how I would do this? I've done
> > some googling and not found anything like this.
>
> You mean, how to create a URL that links to a file? Same as
> any other file...
>
> http://example.com/my-cool-file.ext
>
> [http://example.com/my-cool-file.ext A text link]
>
> [[Media:my-cool-file.ext|Text link to a file that was
> uploaded to the wiki]]
>
> -- brion vibber (brion @ pobox.com)
This is what happens when you try and do something 10 minutes
before knock off and it doesn't work - hence the post. This morning I've
tried some other things and what follows is my experience:
Placed the following line in LocalSettings.php:
$wgFileExtensions = array(...defaults...., 'kml', 'kmz');
Then I logged in and hit the "Upload File" link. This dropped me in the
Special:Upload page. I hit the browse button and selected a *.kml file.
I filled in the destination name and description, hit Upload and get a
page with:
This file contains HTML or script code that may be erroneously be
interpreted by a web browser.
in big red text across it - but no mention of it not uploading. I then
entered the [[media... link, saved my page and then hit the link.
Instead of GE firing up, I instead get directed to the Special:Upload
page again. Rummaging around in the db I only found the reference to the
uploaded file in the imagelinks table, due to my page reference. Posted
to list and went home.
This morning tried the same thing again with another *.kml file
and once again got the red text. Next I tried a *.kmz file and lo and
behold, it worked. I uploaded the file, no red text warning this time,
although there is a warning about:
Warning: This file may contain malicious code, by executing it your
system may be compromised.
in its description page. I linked to file in my test page, saved, then
hit the link. Next thing I know GE is firing up moving to the
appropriate place.
I've subsequently added entries for *.kmz/*.kml to the
mime.types/mime.info files.
mime.types:
multimedia/kmz kmz kml
mime.info
multimedia/kmz [MULTIMEDIA]
Should I have added this mime info? Whilst looking through the mime info
I noticed that IGES was there so I thought that if IGES is there , then
kmz should be as well. One thing that I did notice is that after adding
this stuff, that after uploading another *.kmz file that it still
reports the mime type as unknown/unknown - shouldn't this be
multimedia/kmz?
If you've got this far, my observations are as follows:
1) For some reason MediaWiki does not like *.kml file, the ASCII version
of the GE files. Should it?
2) *.kmz files are reported as being unknown/unknown MIME types even
though I think I've added the mime info in all the correct places.
Should this info be placed somewhere else as well?
Well that's my experience with adding Google Earth data to a
MediaWiki installation. I think things are now working from the wiki's
point of view. Now I've just got to work out why Firefox is asking me
everytime I click on one of these links if I want to open it using GE -
even though I've got the "Do this automatically..." button checked!!!!
Regards,
Andrew Lowe
I would like to know what way of the MW development will be chosen:
to integrate some wysiwyg editor into MW and forget about wiki text,
not to integrate editors at all or to combine that approaches.
I've RTFM & STFW. All I've found:
-The proposed next-generation incarnation of MediaWiki:
http://meta.wikimedia.org/wiki/MediaWiki_2.0
- The proposed wiki-like database for various types of content for it
http://meta.wikimedia.org/wiki/Wikidata
and
http://mail.wikipedia.org/pipermail/wikitech-l/2004-October/025763.html
{WYSIWYG: Easy to do if you break wikitext editability, hard to do if you
want to maintain both. Not sure if they have tried to solve the hard
problem - if so, maybe something worth looking into. Otherwise not.}
Hi all,
One of my users wishes to be able to place Google Earth, GE,
*.kml/*.kmz files within a wiki page. In turn he wants to be able to
click on the link and have it load up GE, GE moving to the coordinates
etc within the file. Any ideas as to how I would do this? I've done some
googling and not found anything like this.
Any thoughts greatly appreciated,
Andrew Lowe
Jitse,
Thanks for that, it was a permissions/users/group thingy that I
eventually worked out.
Regards,
Andrew Lowe
> -----Original Message-----
> From: mediawiki-l-bounces(a)Wikimedia.org
> [mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Jitse Niesen
> Sent: Tuesday, 23 May 2006 10:24 PM
> To: MediaWiki announcements and site admin list
> Subject: Re: [Mediawiki-l] Mathematics not being rendered to images
>
> On 5/23/06, Andrew Lowe <andrew.lowe(a)quantm.net> wrote:
> > [...]
> > I've subsequently set $whUseTex to true and then installed
> > imagemagick etc. I next loaded one of his pages and get in red text:
> >
> > Failed to parse (PNG conversion failed; check for correct
> installation
> > of latex, dvips, gs, and convert):
> > [...]
> > If I go into the ....../mediawiki/math directory view the
> README file
> > and grab the bit of example code for texvc and run it:
> >
> > texvc /tmp /home/samba/public "y=x+2" iso-8859-1
[snip]
...
...
In our wiki a user is complaining about not being able to search for
the word "-crtcA_cfg" in a wiki page.
If they search for ctrcA_cfg the wiki finds it, but if they search for
-crtcA_cfg it does not.
Anyone know if there is a way to solve this?
I am not very familiar with full text searching but it appears the
following works.
Broken version, what mediawiki does.
mysql> select si_title from searchindex where MATCH(si_text) AGAINST
('+\-crtcA_cfg' IN BOOLEAN MODE);
Empty set (0.00 sec)
What appears to work.
mysql> select si_title from searchindex where MATCH(si_text) AGAINST
('+*-crtcA_cfg' IN BOOLEAN MODE);
+---------------------+
| si_title |
+---------------------+
| know crtfiles |
| know displayfaq |
| know mdiagarguments |
| know scalingclocks |
+---------------------+
4 rows in set (0.00 sec)
Is this the proper thing to do?
Thanks,
Chris McIntosh
iPowerWeb as my web-provider. I am attempting to install MediaWiki on
my website. I am getting the following when I try to finalise the thing
from my browser:
- PHP 4.4.1 installed
- Warning: PHP's register globals option is enabled. Disable it in you
can. MediaWiki will work, but your server is more exposed to PHP-based
security vulnerabilities.
- PHP server API is apache; ok, using pretty URLs (index.php/Page_Title)
- Have XML / Latin-UTF-8 conversion support.
- PHP is configured with no memory_limit
- Have zlib support; enabled output compression.
- Neither Turck MMCache nor eAccelerator are installed, can't use
object caching functions
- GNU diff3 not found.
- Found ImageMagick: /usr/local/nin/convert; image thumbnailing will
be enabled if you enable uploads.
- Found GD graphics library built-in.
- Installation directory: /home/joshua-w/public_html/wiki
- Script URI path: /wiki
- Environment checked. You can install MediaWiki
Generating configuration file...
- Database type: mysql
Fatal error: Class languageen: Cannot inherit from undefined class
languageutf8 in /home/joshua-w/public_html/wiki/languages/LanguageEn.php
on line 12
--
Nomad of Norad (David C. Hall) --- *TeamAmiga*
nomad(a)joshua-wopr.com --- http://www.joshua-wopr.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
For a dementedly wacky sci-fi continue-the-story project,
join my WebBBS. http://www.joshua-wopr.com/phpBB/index.php
----------------------------------------------------------
This is the Emergency Backup .Signature File, it kicks in
if the Regular Backup .Signature File fails to load.