Hi,
I've just uploaded a new extension, UnitsFormatter. This extension does two
things:
* allows article authors to use a simple markup to enter quantities.
Quantities can be entered in a single unit; authors don't need to
worry about conversions.
* allows users to select what style of units these quantities are
displayed in. Users can select between metric and non-metric units,
or both; for non-metric, they can select between British and US units.
The extension displays quantities with measures according to Wikipedia
standards, including non-breaking spaces, wikilinks to unit definitions, etc.
For example, instead of writing this:
My car burns 7.2 [[wikipedia:gallon|U.S. gallons]]
(27.3 [[wikipedia:litre|l]]) of gas every
100 [[wikipedia:kilometre|kilometres]]
(62 [[wikipedia:mile|mi]]).
you can write this:
My car burns <unit>7.2 usgal</unit> of gas every <unit>100 km!</unit>.
and the user can elect to see the output like any of these, or more:
My car burns 7.2 US gallons (27.3 l) of gas every 100 kilometres (62 mi).
My car burns 6.0 British gallons of gas every 100 kilometres.
My car burns 27.3 litres (6.0 Br gal) of gas every 100 kilometres (62 mi).
Hopefully people dealing with units a lot will find this helpful; maybe even
Wikipedia can benefit from it.
Right now it's tagged as experimental; check it out and let me know what you
think:
http://www.mediawiki.org/wiki/Extension:UnitsFormatter
All comments welcome at the talk page.
Ian
Hi All,
I am trying to customise the Special:Preferences page to remove tabs and
change certain form fields. My amendments are relatively simple to achieve
but editing includes/SpecialPreferences.php. However I would rather use an
extension and keep the core code intact. I have tried using the
SpecialPageExecuteBeforePage hook, but this seems not to work as expected
(see my extension code below). The following note in the core code,
includes/SpecialPage.php, stating that the SpecialPageExecuteBeforePage hook
needs to be fixed:
# FIXME: these hooks are broken for extensions and anything else that
subclasses SpecialPage.
If this hook is not due to be fixed soon will someone please offer another
way to amend the Special:Preferences page without hacking the core code?
My extension code:
$wgHooks['SpecialPageExecuteBeforePage'][] = 'CustomUserPreferencesPage';
function CustomUserPreferencesPage($specialpage, $par, $func) {
// Check if this hook has been called from the correct page
if ($specialpage->mName == 'Preferences') {
global $IP ;
$specialpage->file($IP .
"/extensions/CustomUserPreferencesPage/templates/CustomSpecialPreferences.php")
;
}
return true ;
}
Many thanks in advance,
Matthew
MediaWiki version 1.10.0
PHP version 5.2.2
Hi Gordon,
On 6/20/07, Gordon Joly <gordon.joly(a)pobox.com> wrote:
>
>
> It appears to be failing to stop non logged in users from editing.
>
> Here is the code I have on the live site.
Yikes. Remove this line:
$wgGroupPermissions = array();
This will remove all the rights set up in DefaultSettings.php
$wgGroupPermissions['*' ]['createaccount'] = true;
> $wgGroupPermissions['*' ]['read'] = true;
> $wgGroupPermissions['*' ]['edit'] = false;
>
> $wgGroupPermissions['user' ]['move'] = true;
> $wgGroupPermissions['user' ]['read'] = true;
> $wgGroupPermissions['user' ]['edit'] = true;
> $wgGroupPermissions['user' ]['upload'] = true;
>
The rest of it looks fine. Try removing that line and see if it fixes your
problem.
--
Daniel Cannon (AmiDaniel)
http://amidaniel.com
cannon.danielc(a)gmail.com
I'm using 1.9.3 on Linux (at Dreamhost). What is the best way to
notify all my registered users via email? I'm sure there's an
extension out there.
Thanks!
......................................................... ! ............
.................................................
Tim Ware .. HyperArts .. 201 4th Street, Ste 404 .. Oakland CA 94607
t: (510) 339-6084 .. f: (510) 339-6086 .. e: tim(a)hyperarts.com
http://www.hyperarts.com
Map
I think I will answer my own question in hopes that someone finds it
usefull.
The answer was as simple as setting $wgUseAjax to false in my
localsettings.php file. Somehow the java used in the search application
conflicts with the Ajax when it is turned on.
Since we only needed the ajax for an experimental extension that we
couldnt get to work, we have no need to use ajax anymore.
________________________________
From: Getzke, John
Sent: Wednesday, June 20, 2007 12:21 PM
To: 'mediawiki-l(a)lists.wikimedia.org'
Subject: Help: Search Error
Greetings all,
We recently upgraded from mediawiki1.8 to mediawiki1.10. When we type
more than 2 characters into the searchbar we see this error message:
DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
Bad Request
unknown function wfSajaxSearch
wfSajaxSearch is listed under the AjaxFunctions.php file and the message
does not interfear with the actual search in anyway, but it is an
eyesore to look at. Has anyone ever encountered this error and if so
how can I identify wfSajaxSearch?
Thanks,
John Getzke
Greetings all,
We recently upgraded from mediawiki1.8 to mediawiki1.10. When we type
more than 2 characters into the searchbar we see this error message:
DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
Bad Request
unknown function wfSajaxSearch
wfSajaxSearch is listed under the AjaxFunctions.php file and the message
does not interfear with the actual search in anyway, but it is an
eyesore to look at. Has anyone ever encountered this error and if so
how can I identify wfSajaxSearch?
Thanks,
John Getzke
Hi,
When PNG images are resized (and saved) my my mediawiki (1.10) on IIS,
transparency is changed to black color!
I've used no external app for resizing PNG. PHP does this automatically.
Thanks.
Works for me? Why, what's happening?
On 20/06/07, Gordon Joly <gordon.joly(a)pobox.com> wrote:
>
>
> I am used to setting permissions as follows:
>
> $wgGroupPermissions ['*'] ['edit'] = false;
> $wgGroupPermissions ['user'] ['edit'] = true;
>
> Has this changed in 1.10.0 and higher?
>
>
> Gordo
>
>
> --
> "Think Feynman"/////////
> http://pobox.com/~gordo/
> gordon.joly(a)pobox.com///
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l(a)lists.wikimedia.org
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
--
Gary Kirk
We are finding that if we PREVIEW a page that has pre tags all the
spacing goes out of the text and the preview shows left justified.
If we SAVE the page the correct formatting exists. Of course the next
time you try to edit it rips out the spacing.
Is this correct behavior?
DSig
David Tod Sigafoos | SANMAR Corporation
PICK Guy
206-770-5585
davesigafoos(a)sanmar.com