[04:55:19] anyone around? [04:57:45] yes [07:19:22] Hi [07:19:41] is there a reason why it's not possible to use templates cross-wiki? [07:20:31] On Wikisource it's possible (but not easy) to do interwiki content pulling (typically used for translated works) [09:06:59] ShakespeareFan00: implementing link tracking (making cross-wiki usages show up on Special:WhatLinksHere) and cache invalidation (purging cross-wiki usages when the template changes) would be challenging to implement [09:07:18] Okay [09:07:32] So there was a technical reason [09:07:41] BUt Wikisource manages to do interwiki transclusion [09:07:46] So.. [09:08:44] if i had to guess, it either doesn't do those things, or the entire translusion is fake and done by displaying the other page in an iframe or something [09:09:23] True [09:09:36] which would explain the issues about referencing I had [09:09:46] and the fact that sometimes it doesn't dispaly fully [09:09:58] oh, another challenging thing would be handling any remote templates that the cross-wiki template uses. especially if they clash with local templates' names [09:10:19] MatmaRex: Challangeing but not impossible? [09:10:45] I was thinking of suggesting a prefix [09:11:05] {{r#emote:|params}} [09:11:31] So it'clear to the local praser it's to read any inclusion from the remote site, not the local one [09:11:36] (i'm assuming you'd want to allow passing parameters to the cross-wiki template usages, so they would have to be pulled in as wikitext and parsed on the calling wiki. otherwise the last thing would not be a problem) [09:11:55] MatmaRex: With templates yes [09:12:01] ShakespeareFan00: yes, i mean if the cross-wiki template's code uses another template in it [09:12:22] With LST style pulling you can pre-render to some extent... [09:12:31] BUt things like references would need to be deffered... [09:12:33] Hmm [09:12:35] but then you can't pass parameters i think [09:12:40] This needs more thought [09:12:57] MatmaRex: So the question would be how to pass paramaters to a template cross-wiki? [09:13:47] anyway, nothing is impossible. but i'd say this is several weeks of work at least, if you wanted it to work seamlessly and fast just like local templates [09:13:54] ShakespeareFan00: one of the questions, yeah [09:14:26] (and i mean it when i say "at least". this sounds like the kind of thing where you just keep running into more and more roadblocks) [09:14:57] are you sure that cross-wiki templates is wise from a security standpoint? [09:15:09] Quite [09:15:49] The Use Case was a template like the commons version of {{artwork}} [09:16:04] Very useful , but the local Wikipedia version is something else (or a redirect) [09:16:12] Aguyintobooks: tracking down cross-wiki vandalism is definitely another challenge, but we solved that one for Wikidata already so i'd be optimistic with this one in particular [09:16:27] An alternative is to ensure that local templates can't have the same name as Commons ones... [09:16:38] so that the relevant Commons template can be imported locally [09:17:01] Aguyintobooks: avoiding XSS issues etc. would not be a problem if it was parsed locally, and avoidable if it was parsed on the remote wiki and pulled in as HTML (we've got sanitizer libraries already) [09:17:41] Okay [09:17:43] so either clean it or parse it locally? that would seem to deal with the issue [09:18:01] Aguyintobooks: The problem is remote templates using templates that aren't local [09:18:22] At present you have to import and resolve all the underlying templates as well [09:18:31] For some templates this is minmal [09:18:39] its not possible to replicate them locally in bulk? [09:19:04] Aguyintobooks: It is, but it's a major hassle to do it when you have say 10 underlying templates.... [09:19:28] which is what happened with one template I wanted to take from Wikipedia over to Wikisource [09:19:36] like simply copy a whole set of templates and their dependent templates at once, perhaps with a script? [09:19:47] I'm not aware of such a script [09:20:00] If anything it should be something in the Trans-Wiki [09:20:22] (Import dependencies as well option.) [09:20:33] But that doesn't solve the local naming conflict option [09:20:58] Not sure how you_d do some kind of name_modfication on import so you don't get conflicts... [09:21:01] its essential to have some automation in it really [09:21:06] Quite [09:21:22] One template I found very useful at Wikisource is {{ts}} [09:21:25] imagine if a template needs to be renamed and all the other templates refer to it by its old name [09:21:46] Template redirects are a nightmare [09:21:57] some kind of script to identify such errors would be needed [09:21:57] and in some cases have to be ontained so 'old versions of pages' don't break [09:23:00] which isn't the ehole story given that I've had unused (but used in the past) templates get deleted via appropriate process at English Wikipedia [09:23:03] *w [09:23:40] its a pain though if its transculded on 1000 pages or so though [09:23:57] I suppose thats what autowikibrowser is for [09:24:12] I have considered (before I left Wikipedia) running a script to do template redirect bypass edits [09:24:26] not a bad idea [09:24:46] which is something thet acould be done with AWB /bots... Would need a bot flag and approaval though [09:25:05] Transwiking dependencies would need changes in Mediawiki [09:25:46] (and some-way of resolviing conflict between template with different functions/code but same name at different wikis) [09:26:13] The thought was on Transwiki of dependencies, you add prefixing [09:26:34] That said you have some really complex templates that are in fact wrappers to Module: code now as well.. [09:26:52] Especiallly on English Wikipedia and Wikisource [09:27:06] Arguably ALL really complex templates should actually be Module: [09:27:21] but that's a VERY controversial change to suggest [09:27:40] Mostly because Lua code is far more readable than convoluted markup... [09:27:52] (case in point being {{short-title}} at English Wikisource) [09:28:27] I had to ask someone to Module: it, as it had become un-maintainable in pure template markup [09:28:57] Having a central repository for Module: 's code that gets used cross wiki would be VERY useful... [09:29:07] I agree with you on that [09:29:17] but XSS secuirty issues would probably rule it out in the short term.. [09:29:33] Something like {{citation}} would be useufl on many many wikis [09:29:48] And ultimately that's using a Module: [09:29:52] I think now [09:29:58] part of the issue is that en-wiki has much more advanced templates than others [09:30:17] Many of which should really be Module: or core function [09:30:41] and as you have pointed out, other wikis that are more specific also use arcane parser functions [09:31:00] On en wikipedia there are templates that are pushing the limit of what template syntax can do... [09:31:47] Anotjher example English Wikisource is cl-act-paragarph... which in the end I had to gut and make very mcuh more simple because it simply would have never worked in it's original form [09:32:02] despite it being possible in Template syntax, it had also become un-maintainable [09:32:20] (side-titles themselves are something that needs to be re-examined) [09:32:48] Sidenotes are not even supported as such in HTML5 [09:32:51] :( [09:33:10] which means a lot of "cleverness" has to be used in implementing them [09:33:27] part of the issue is that people are trying to do things with wiki-markup that were never considered when it was developed [09:33:45] Quite, but that's true of any software... [09:34:17] Sopme of these concerns are why I asked for there to be a "Technical" meeting specfically to address some Wikisource arising tech issues... [09:34:31] thats a good idea [09:34:46] I know this channel is logged so my concerns/suggestions will get read at some point... [09:35:21] A template like {{ts}} is also very useful at Wikisource... [09:35:34] and to me it should really be core function... [09:35:39] I must be honest, although I am good at templates, some of this stretches the limit of my ability, some major simplification would be great [09:36:05] Well as I said, really complex templates SHOULD be module... [09:36:18] agreed [09:36:29] If you have more than 3 nested parser functions... Then you have to ask if a MODULE would be more appropriate [09:36:47] And the documentation for templates should be update to indicate that [09:37:11] I once wrote a template that had over 20 params [09:37:22] Granted most of these were DATA items vs format items [09:37:34] really there should also be a set of simplifier ones often used as sub-templates to cut down on transclusion chains [09:37:53] like a set of core modules that can be used to make easy templates [09:37:59] Also with a lot of nested template you hit Transclusion limts very quickly [09:38:01] and cut down on server time [09:38:29] Modules aren't without their overheads [09:38:45] and in some areas a template would still be faster [09:39:07] yes I actually hit the transclusion limit on my userpage once, its relatively easy, i suppose a module use limit would be needed if it doesn't already exist [09:39:28] Another template I am not happy with at English Wiksiource is {{statute_table}} [09:39:48] I wrote this, and it took forever to get it working properly with all the code for row-skipping [09:40:02] It should have been re-workked as a module ages ago... [09:40:13] albiet one specifc to one work [09:40:19] I think its fair to say anything which has a table it it needs looking at with this [09:40:41] tables are some of the most complex markup [09:41:09] There is a template at Wikisource called {{Aligned table}} but at present it cant do spanned rows/column entires [09:41:41] meaning that I have had to write in places a LOT of table syntax and {{ts}} calls... [09:41:57] Each call to {{ts}} makes about 10 or so sub-calls to it's parse backend :( [09:42:02] These can add up quickly [09:42:26] https://en.wikisource.org/wiki/Template:Table_style [09:42:33] This ought to be a module [09:42:43] It's WIDELY used on English Wikisource [09:42:50] And at present another consideration... [09:43:02] Adding a style-code means changing the template... [09:43:29] Whereas in a module it might be possible to have a core-engine, and a data-set page [09:43:47] Currently all the style/short code matchign is hard-coded... [09:44:00] That is NOT good programming practice.... [09:44:44] And before I continue did anyone else have something they needed to use this channel for? [09:45:19] The actual parse/matching is done in a really big Switch statement - https://en.wikisource.org/wiki/Template:Table_style/parse [09:45:32] It would to me be better to have a module [09:45:45] basically the whole system would be better with modules [09:46:01] and a page where the various short hand codes/expansions would be entered seperately from the core engine. [09:46:14] Aguyintobooks: in respect of table style - yes [09:46:34] or even as a core part of Mediawiki [09:46:46] making this stuff simple would no doubt allow even more complicated templates in the future if needed, so its a good way of progressing [09:46:48] You have a database table that stores short codes/expansions [09:47:08] Well the more code can be hidden from end-users the better [09:47:19] Abstraction being a key concept in program design IIRC [09:47:37] I don't know enough about Mediawiki but since so many other projects use it, it may be a tall order getting it changed [09:48:18] Well at the very least making TS into a module/script that isn't as hard-coded is certainly indicated to me [09:48:37] maybe it should be some kind of extension? [09:49:02] Noting that there are other places where using short codes over muitl-line runs of inline CSS would be preferable [09:49:17] It looks cleaner as well [09:49:33] It doesn't save on disc space, but... [09:50:56] not having to right "align:left: background:blue; text:white;" on every altenrnate cell in a table and instead writing {{ts|al|invblue}} is clearly better [09:50:59] *write [09:51:09] that's for sure [09:51:37] Also if CSS ever changes names, it's easier to cahnge the logic on ONE template than 5000 indvidual entries [09:51:42] ;) [09:52:50] Anyway I've got to get on with something at Wikisource... but I hope someone here is able to respond on my talk page at some point... [09:52:55] Lots of ideas... [09:53:02] No techncial skill to implement :( [09:53:06] * ShakespeareFan00 out