FlominatorTM / wikiblame

http://wikipedia.ramselehof.de/wikiblame.php
GNU General Public License v3.0
54 stars 13 forks source link

[Feature request] Support for custom mediawiki deployments #33

Open zypA13510 opened 3 years ago

zypA13510 commented 3 years ago

Can we please have this for MediaWiki other than those from Wikimedia Foundation, e.g. fandom.com / wikia.com?

I would imagine that instead of having a "Language" and a "Project" field, we would just have a single "Domain" field, in which we can provide "en.wikipedia.org" or "gta.fandom.com".

Correct me if I'm wrong, but if they are all powered by MediaWiki, I think most of the code would just work, right?

FlominatorTM commented 3 years ago

In theory should not be that much of a big deal: easiest would be an additional input field for the top level domain and then using that one in https://github.com/FlominatorTM/wikiblame/blob/9c21ec6d4dfec54920b51d6f954bd79fae3d9e3d/wikiblame.php#L393 (maybe with .org as fallback)

FlominatorTM commented 3 years ago

Works, just needs UI ...

http://wikipedia.ramselehof.de/wikiblame.php?user_lang=de&lang=gta&project=fandom&article=Radio+Stations+in+GTA+Online&needle=Soulwax+FM&skipversions=0&ignorefirst=0&limit=500&offtag=7&offmon=4&offjahr=2021&searchmethod=int&order=desc&user=&tld=com

FlominatorTM commented 2 years ago

Thank you. Default value was missing, that I included with 7cbab5adad30985958659272ebadcb939b303de4

ilmari-lauhakangas commented 2 years ago

Thanks for the work. Currently it adds /wiki/ in the path before the page name. I guess it is non-standard, but we omit this in page paths in https://wiki.documentfoundation.org/

Could logic or an option be added to take this into account?

FlominatorTM commented 2 years ago

Would that be sufficient as an URL parameter? Adding that to the UI feels weird somehow.

ilmari-lauhakangas commented 2 years ago

Maybe, as long as it would be somehow discoverable :)

zypA13510 commented 2 years ago

Would that be sufficient as an URL parameter? Adding that to the UI feels weird somehow.

One question, do we really need separate language, project, domain, etc.? Can we have a single field that just allow us to put in URL?

Or if we need to construct API endpoints from certain information such as a prefix path, can we have something like this? Field Example
origin https://en.wikipedia.org http://mywiki.example.com:8080
prefix path /wiki/
page name Main_Page

Seems more straightforward (and flexible) to me, also make sense in UI.

FlominatorTM commented 2 years ago

As you might have discovered, I'm currently lacking time and motivation for working on MediaWiki projects, especially because I'm not really active there anymore. If somebody provides a pull request, I'd be ok with it, though. What do we do with all the users who have known the current UI? Also: can't you just fork, change the parameters in code and run your own instance?