Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki

Javascript and Permissions?

 

 

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded


alessandra.bilardi at gmail

Oct 6, 2009, 10:04 AM

Post #1 of 3 (578 views)
Permalink
Javascript and Permissions?

Hi all,

I created a form with extension:Simple Forms. I use
extension:ExtAuthDB and extension:AdminWhiteList to read users and
their permission.
I'm using mediawiki 1.14 release. I created a javascript code that I
added into index.php so that it is always loaded.
Well, I tested that with admin this js code works instead, with simple
user this js code does not work.

I have got other mediawiki site with 1.14 release with wiki user and
permission system; so that I tested form with extension:Simple Forms
and javascript code. js code works with admin and simple user.

I tested form with extension:Simple Forms and javascript code (plus
extension:ExtAuthDB and extension:AdminWhiteList to read users and
their permission) in 1.15.1 release and js code works only with
administrator..

js code works with admin with $wgUseAjax = true; line and $wgUseAjax =
false; line.
Can you help me about where I could search error about permissions/js?

My js code is simple:

function multrtpcr(f,i) {
var A, B, C;
if (i == 0) {
A = document.forms[f].a.value;
B = document.forms[f].b.value;
C = (A * B);
document.forms[f].c.value = C;
} else if (i == 1) {
A = document.forms[f].d.value;
B = document.forms[f].e.value;
C = (A * B);
document.forms[f].f.value = C;
} else if (i == 2) {
A = document.forms[f].g.value;
B = document.forms[f].h.value;
C = (A * B);
document.forms[f].i.value = C;
}
document.forms[f].tipo_abb.value = 'RTA'+A;
}

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


Platonides at gmail

Oct 8, 2009, 2:58 PM

Post #2 of 3 (516 views)
Permalink
Re: Javascript and Permissions? [In reply to]

Alessandra wrote:
> Hi all,
>
> I created a form with extension:Simple Forms. I use
> extension:ExtAuthDB and extension:AdminWhiteList to read users and
> their permission.
> I'm using mediawiki 1.14 release. I created a javascript code that I
> added into index.php so that it is always loaded.
> Well, I tested that with admin this js code works instead, with simple
> user this js code does not work.
>
> I have got other mediawiki site with 1.14 release with wiki user and
> permission system; so that I tested form with extension:Simple Forms
> and javascript code. js code works with admin and simple user.
>
> I tested form with extension:Simple Forms and javascript code (plus
> extension:ExtAuthDB and extension:AdminWhiteList to read users and
> their permission) in 1.15.1 release and js code works only with
> administrator..
>
> js code works with admin with $wgUseAjax = true; line and $wgUseAjax =
> false; line.
> Can you help me about where I could search error about permissions/js?
>
> My js code is simple:
>
> function multrtpcr(f,i) {
> var A, B, C;
> if (i == 0) {
> A = document.forms[f].a.value;
> B = document.forms[f].b.value;
> C = (A * B);
> document.forms[f].c.value = C;
> } else if (i == 1) {
> A = document.forms[f].d.value;
> B = document.forms[f].e.value;
> C = (A * B);
> document.forms[f].f.value = C;
> } else if (i == 2) {
> A = document.forms[f].g.value;
> B = document.forms[f].h.value;
> C = (A * B);
> document.forms[f].i.value = C;
> }
> document.forms[f].tipo_abb.value = 'RTA'+A;
> }

I suspect that in the case where it doesn't works you're accessing a
different form.
Also note that accessing the fields as <form>.fieldname is deprecated.




_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


alessandra.bilardi at gmail

Oct 9, 2009, 2:05 AM

Post #3 of 3 (517 views)
Permalink
Re: Javascript and Permissions? [In reply to]

I resolved add search form:
Administrator user had got standard search wiki form whereas simple
user had not got standard search wiki form.. so that when I add
standard search wiki form to simple user vision, simple form works..


On Thu, Oct 8, 2009 at 11:58 PM, Platonides <Platonides [at] gmail> wrote:
> Alessandra wrote:
>> Hi all,
>>
>> I created a form with extension:Simple Forms. I use
>> extension:ExtAuthDB and extension:AdminWhiteList to read users and
>> their permission.
>> I'm using mediawiki 1.14 release. I created a javascript code that I
>> added into index.php so that it is always loaded.
>> Well, I tested that with admin this js code works instead, with simple
>> user this js code does not work.
>>
>> I have got other mediawiki site with 1.14 release with wiki user and
>> permission system; so that I tested form with extension:Simple Forms
>> and javascript code. js code works with admin and simple user.
>>
>> I tested form with extension:Simple Forms and javascript code (plus
>> extension:ExtAuthDB and extension:AdminWhiteList to read users and
>> their permission) in 1.15.1 release and js code works only with
>> administrator..
>>
>> js code works with admin with $wgUseAjax = true; line and $wgUseAjax =
>> false; line.
>> Can you help me about where I could search error about permissions/js?
>>
>> My js code is simple:
>>
>> function multrtpcr(f,i) {
>>  var A, B, C;
>>  if (i == 0) {
>>   A = document.forms[f].a.value;
>>   B = document.forms[f].b.value;
>>   C = (A * B);
>>   document.forms[f].c.value = C;
>>  } else if (i == 1) {
>>   A = document.forms[f].d.value;
>>   B = document.forms[f].e.value;
>>   C = (A * B);
>>   document.forms[f].f.value = C;
>>  } else if (i == 2) {
>>   A = document.forms[f].g.value;
>>   B = document.forms[f].h.value;
>>   C = (A * B);
>>   document.forms[f].i.value = C;
>>  }
>>  document.forms[f].tipo_abb.value = 'RTA'+A;
>> }
>
> I suspect that in the case where it doesn't works you're accessing a
> different form.
> Also note that accessing the fields as <form>.fieldname is deprecated.
>
>
>
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l [at] lists
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>



--
Alessandra Bilardi, Ph. D.
----
CRIBI, University of Padova, Italy
Via Ugo Bassi, 58/B - 35121 Padova
Tel +390498276165 Fax +390498276159
http://www.linkedin.com/in/bilardi
----
La semplicità è la più alta forma di perfezione (Leonardo Da Vinci)
Keep simple, stupid (KISS, IT)
----

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.