Hi
I wish to get langlinks using a clientside js script from one wiki to another. (from ta.wiki to en.wiki).
Is there any settings needs to be enabled in localsettings.php in ta.wiki?
Also, i got this page http://stackoverflow.com/questions/3123327/read-wikipedia-urls-content-using...
DO i need proxy call for this?
Thanks
If you don't need to do anything that requires you to login (ie: make an edit, view private data, make batch bot api calls to go over the 500 limit) then you can just use jsonp.
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]
On 11-02-13 10:16 PM, Mohamed Mahir Ahamed Ibrahim wrote:
Hi
I wish to get langlinks using a clientside js script from one wiki to another. (from ta.wiki to en.wiki).
Is there any settings needs to be enabled in localsettings.php in ta.wiki?
Also, i got this page http://stackoverflow.com/questions/3123327/read-wikipedia-urls-content-using...
DO i need proxy call for this?
Thanks
Thanks Daniel for quick reply.
I tried this code to fetch langlinks but failed
I used jquery, I never used callback functions, i supposed to use document.write to store the returned callback value?
I will be grateful if you can help me to fix this.
<script type='text/javascript'> function getLangLinks(){ temp_in=$j('#in').val(); if(temp_in!=''){
url=' http://en.wikipedia.org/w/api.php?action=query&format=jsonp&callback... ; $j('#result').load(url,function(data){ document.write(data);//is it correct? alert("success"); });
}//if }//fn
function callback_langlink(data){ //have to use each var parseddata=p.query.pages[0].langlinks[0].*; $j("#trans_out").val(parseddata); } thtm +="<br/><br/>Input (English):<br />"; thtm +="<textarea id='in' name='in' cols=80 rows=6></textarea>"; thtm +=" <br> <a href='javascript:void(0)' onclick='getLangLinks()' style='color:#0645AD'>LangLinks</a>)<br/>"; thtm +="<textarea id='trans_out' name='trans_out' cols=80 rows=6></textarea>"; document.write(thtm); </script> <div id='result'></div>
On Mon, Feb 14, 2011 at 12:11 PM, Daniel Friesen lists@nadir-seen-fire.comwrote:
If you don't need to do anything that requires you to login (ie: make an edit, view private data, make batch bot api calls to go over the 500 limit) then you can just use jsonp.
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]
On 11-02-13 10:16 PM, Mohamed Mahir Ahamed Ibrahim wrote:
Hi
I wish to get langlinks using a clientside js script from one wiki to another. (from ta.wiki to en.wiki).
Is there any settings needs to be enabled in localsettings.php in
ta.wiki?
Also, i got this page
http://stackoverflow.com/questions/3123327/read-wikipedia-urls-content-using...
DO i need proxy call for this?
Thanks
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
2011/2/14 Mohamed Mahir Ahamed Ibrahim mahir78@gmail.com:
Thanks Daniel for quick reply.
I tried this code to fetch langlinks but failed
I used jquery, I never used callback functions, i supposed to use document.write to store the returned callback value?
No. You also shouldn't use format=jsonp. Here's how it's done:
$j.getJSON( 'http://en.wikipedia.org/w/api.php?format=json&callback=?', { 'action': 'query', 'prop': 'langlinks', 'lllimit': 500, 'titles': temp_in }, function( data ) { ... do stuff with data here ... } );
For more information see the jQuery documentation: http://api.jquery.com/jQuery.getJSON/ and http://api.jquery.com/jQuery.ajax/
Roan Kattouw (Catrope)
mediawiki-api@lists.wikimedia.org