--- Comment #18 from Krinkle <> ---
(In reply to JaGa from comment #15)
> I saw the suggestion to covert Dab Solver to a Gadget. Not only that is tail
> wagging the dog, but it wouldn't be reasonable for DPL bot to ask users to
> opt into a Gadget just to fix dablinks. (Not to mention that many of the
> people I message are newbies that would be scared off by the instructions.)

I was not suggesting converting anything to a Gadget. You misunderstood.

(Citing Krinkle from comment #7)
> This bug is in the right place.
> To come back at the issue at hand: You can work around this problem by
> offering your service via a Gadget instead of a Toolserver tool. The only
> down-side is that it is opt-in and users need to enable the gadget via the
> preferences.
> The advantage is as follows: instead of having the user go to the Toolserver
> and submit back to the wiki, you can make a JSONP request to the toolserver,
> get the data you need, and insert it in the text-area and submit to
> preview/diff whatever.

I didn't explain it in great detail, but I think the author of the Dab Solver
tool knows what I meant.

So instead of making a link on the wiki to the Toolserver tool, using the
interface there, and then having the tool submit POST back to action=edit.

Instead, the gadget goes to action=edit, it makes a request to the Toolserver
tool for all the data (all the logic and stuff is at the Toolserver, the Gadget
is merely a gateway and your ticket of authorisation to send and receive
information) using a JSON-P request that responds with the content you want to
put it), and then the javascript gadget puts it in the edit field.

So you'd refactor your tool slightly to (if not already) have a pure data API,
and use that from the Gadget. If you want you can even keep the user interface
on the Toolserver as well and pop it up in an iframe in a jQuery UI dialog,
though I'd recommend moving that little bit of code to the gadget, using a
<form> created by javascript and some input fields, and on submit, in your
callback you make that request to your API on the Toolserver (or Tool Labs now)
and get back the data you ask for and use it.

This has the added benefit of the user not "leaving" their wiki during this
experience, it's a more integrated experience and encourages good practices.

You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
Wikibugs-l mailing list

Reply via email to