Re: [Wikitech-l] AJAX sharing of Commons data/metadata

2012-09-14 Thread Daniel Friesen
On Wed, 29 Aug 2012 12:03:05 -0700, Mark Holmquist wrote: Has there been any discussion of CORS support in Mediawiki / WMF sites anywhere? There was some talk of it in bug 32890 [0] in UploadWizard, and I tried to throw together code for it in a patchset [1], but I didn't spend much time

Re: [Wikitech-l] AJAX sharing of Commons data/metadata

2012-09-14 Thread Daniel Friesen
On Wed, 29 Aug 2012 12:03:05 -0700, Mark Holmquist wrote: Has there been any discussion of CORS support in Mediawiki / WMF sites anywhere? There was some talk of it in bug 32890 [0] in UploadWizard, and I tried to throw together code for it in a patchset [1], but I didn't spend much time

Re: [Wikitech-l] AJAX sharing of Commons data/metadata

2012-09-04 Thread Alex Brollo
Just to give a final feedback to this talk, that has been very useful for my tries: woks are going on fastly, and are presently focused on alignement of some structures templates whose data are shared between Commons and Wikisource: Creator vs. Author; Book vs MediaWiki:Proofreadpage_index_templat

Re: [Wikitech-l] AJAX sharing of Commons data/metadata

2012-08-30 Thread Alex Brollo
Thanks again Brion, it runs perfectly and - strange to say - I got no hard difficulty, just a little bit of review of API calls and of structure of resulting formidable objects. It's really much simpler to parse original template contents than resulting html from their expansion ;-) and AJAX AP

Re: [Wikitech-l] AJAX sharing of Commons data/metadata

2012-08-30 Thread Alex Brollo
2012/8/30 Brion Vibber > > > Luckily, if you're using jQuery much of the low-level stuff can be taken > care of for you. Something like this should work for API calls, > automatically using the callback behind the scenes: > Thanks! really I tested some interproject AJAX API call with no luck; b

Re: [Wikitech-l] AJAX sharing of Commons data/metadata

2012-08-29 Thread Brion Vibber
On Wed, Aug 29, 2012 at 6:03 PM, Alex Brollo wrote: > Ouch this is a little bit above my skill & understanding (really I > discovered AJAX not far ago). . Where can I find some examples of API > inter-project data exchage wth callback parameter? > > I.e: I'd like to get the raw content and th

Re: [Wikitech-l] AJAX sharing of Commons data/metadata

2012-08-29 Thread Alex Brollo
No it doesn't violate the same origin policy. Same origin policy only >> prevents reading information from other websites, it does not stop you >> from executing content from other websites (Which always seemed an odd >> distinction to me...). Thus you can use the api with a callback >> parameter t

Re: [Wikitech-l] AJAX sharing of Commons data/metadata

2012-08-29 Thread Alex Brollo
2012/8/29 bawolff > On Wed, Aug 29, 2012 at 2:24 PM, Alex Brollo > wrote: > > Thanks for comments. > [..] > > > > Thanks for API suggestion, but the question is: does it violates "same > > origin" AJAX policy? I can read anything by a bot from any project, but > > AJAX is great to enhance intera

Re: [Wikitech-l] AJAX sharing of Commons data/metadata

2012-08-29 Thread bawolff
On Wed, Aug 29, 2012 at 2:24 PM, Alex Brollo wrote: > Thanks for comments. [..] > > Thanks for API suggestion, but the question is: does it violates "same > origin" AJAX policy? I can read anything by a bot from any project, but > AJAX is great to enhance interactivity and to help user just when u

Re: [Wikitech-l] AJAX sharing of Commons data/metadata

2012-08-29 Thread Alex Brollo
Thanks for comments. Relationship between wikisource and Commons is very strict, and there's a large 1:1 match between structured wikisource data stored into well-formed templates (used into nsIndex and ns0) and Book template; there's too a 1:1 relationship between nsCreator into Commons and nsAu

Re: [Wikitech-l] AJAX sharing of Commons data/metadata

2012-08-29 Thread Brion Vibber
On Wed, Aug 29, 2012 at 2:55 PM, Chris Steipp wrote: > As mentioned in those bugs, mediawiki support a basic CORS > implementation already. It looks like we haven't authorized any domain > for wmf projects though. > Looks like Roan is taking charge on it on bug 20814, yay. :) There are also ope

Re: [Wikitech-l] AJAX sharing of Commons data/metadata

2012-08-29 Thread Chris Steipp
As mentioned in those bugs, mediawiki support a basic CORS implementation already. It looks like we haven't authorized any domain for wmf projects though. On Wed, Aug 29, 2012 at 12:03 PM, Mark Holmquist wrote: >> Has there been any discussion of CORS support in Mediawiki / WMF sites >> anywhere?

Re: [Wikitech-l] AJAX sharing of Commons data/metadata

2012-08-29 Thread Mark Holmquist
Has there been any discussion of CORS support in Mediawiki / WMF sites anywhere? There was some talk of it in bug 32890 [0] in UploadWizard, and I tried to throw together code for it in a patchset [1], but I didn't spend much time on it (the effort was mostly to put the code into a workable p

Re: [Wikitech-l] AJAX sharing of Commons data/metadata

2012-08-29 Thread Yuvi Panda
On Thu, Aug 30, 2012 at 12:25 AM, bawolff wrote: > You can also do this more directly using JSON with callback - Define a > function foo, and put > http://commons.wikimedia.org/w/api.php?action=parse&page=Main_Page&format=json&callback=foo > as the src of the script tag. This works for certain "sa

Re: [Wikitech-l] AJAX sharing of Commons data/metadata

2012-08-29 Thread bawolff
On Wed, Aug 29, 2012 at 12:39 AM, Alex Brollo wrote: > As you know, wikisource needs robust, well-defined data, and there's a > strict, deep relationship between wikisource and Commons since Commons > hosts images of books, in .djvu or .pdf files. Commons shares both images > and contents fo infor

[Wikitech-l] AJAX sharing of Commons data/metadata

2012-08-28 Thread Alex Brollo
As you know, wikisource needs robust, well-defined data, and there's a strict, deep relationship between wikisource and Commons since Commons hosts images of books, in .djvu or .pdf files. Commons shares both images and contents fo information page of images, so that any wiki project can visualize