Le 20/09/2017 à 14:56, Brad Jorsch (Anomie) a écrit :
On Tue, Sep 19, 2017 at 8:12 PM, mathieu stumpf guntz <
psychosl...@culture-libre.org> wrote:

Well, actually, depending on what you mean with  have page parses make
edits to the wiki, I'm not sure what I'm looking for fall under this
umbrella.

What I would like is a way to do something like

local data = mw.loadData( 'Module:Name/data/entry' )
-- do some stuff with `data`
mw.saveData( 'Module:Name/data/entry', data)

That's it.

And that, like all Scribunto modules, would run during the parse of the
page.
Ok. Probably I miss knowledge about the page generation pipeline, so if there are information you think I should be aware of to understand problems it might generate, please provide them, links are appropriate answer so far as I'm concerned.

If you do think it's an horrible akward awfully disgusting idea , I would
be interested to know more technical details on what problems it might lead
to (not the global result of nightmarish hell on earth that I'm obviously
targeting )

Confusion for users when purging a page results in edits somewhere else.
How would purging a page lead to such a result ? Since, in my proposal, templates with an updating parameter would actually never be recorded in the wikitext, but removed through a inplace template replacement.
Misattribution of the resulting edits.
That sounds more like a point of specification that an implementation must respect than a technical impossibility, or maybe I miss something.
Opportunities for vandals to misuse
it.
Sure but vandals can misuse anything, including bots which on this regard offer far more latitude.
  Performance issues.
Well, it's hard to gauge on mere specification, isn't it?
  And T67258.
Shoul be discussed on the ticket itself.


Your initial idea of somehow hooking into the editor (whether that's the
wikitext editor or VE) with JavaScript to allow humans to make edits to the
data module while editing another page was much better.

I didn't even thought about JS actually. For the wikitext removal of
updating parameter, I had in mind some inplace template substitution.
Does javascript allow to change an other page on the wiki, especially a
data module, at some point when the user edit/save an article?

That's what your original message sounded like you were talking about. A
JavaScript gadget of whatever sort could make edits by using the action API.
Ok, then that might be an avenue worth exploring for me. I guess https://www.mediawiki.org/wiki/Manual:Interface/JavaScript is a good starting point but any documentation link is welcome.





_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to