[09:29:23] [1/2] man, I'm so annoyed by these Timeless changes, I need to re do stuff on my other wiki too [09:29:23] [2/2] that's my fave skin smh [10:19:52] hello! i am part of the team for a wiki that wants to have dynamically-calculated values in infoboxes - namely, we want the ages of characters in a book series to update when we update `[CURRENT YEAR]` for the most recently-published book [10:20:49] we have nearly fifty character pages and growing, and it'd be a HUGE pain to go in and update everyone each time the story advances forward in the calendar [10:21:29] it seems like it should be possible to have the Age value in each page's infobox to update based on a master value, calculating their current age relative to it? [10:26:09] it should be [10:32:08] awesome, do you know how we can implement that? [10:32:20] the most i know is basic HTML [10:33:39] look at how infoboxes handle age now [10:33:47] change the year to current year [10:38:54] what do you mean? [10:39:15] have you seen how on enwiki they display the age of people? [10:39:16] our infoboxes just have a blank field [10:39:22] i have not, no [10:39:35] they do [10:43:21] they do what? [10:43:39] work out age [10:43:45] ah [10:43:49] i will take a look then [10:43:52] thanks [10:48:00] where can i find enwiki? [10:48:18] en.wikipedia.org [10:48:30] ahh, you mean actual english wikipedia [10:48:32] gotcha [11:02:41] jesus fuck [11:03:58] what language is this [11:04:02] where can i find the syntax [11:04:49] a mix of wikitext & lua [11:07:22] you need the simplified version tho [11:07:39] half of this most likely isn't needed, like the gregorian stuff [11:08:21] but yeah, I don't really understand it now too [11:08:29] i can just about read the nested brackets thanks to my excel work [11:08:49] it's apparent to me that this is a bunch of conditional boxes taking apart the input and processing it depending on the detected format [11:09:11] but i don't understand any of these commands, and don't know how to write new ones [11:09:29] the `#invoke:` parts is Lua [11:09:46] ah jesus, and that's what Miraheze uses too for raw programming? [11:09:53] oh no [11:10:29] it's just a programming language on its which is used to make very complex templates on MediaWiki, and particularly Wikimedia projects [11:11:02] oh yeah i'm familliar with its' famous use in adventure games [11:11:12] [1/2] Lua is stored in Module: pages [11:11:12] [2/2] FANDOM sometimes uses them too [11:11:25] alrighty, i guess we gotta learn Lua lmfao [11:12:11] not really [11:12:24] first need to understand if it really needed [11:13:13] [1/3] things like `#iferror` and `#ifexpr` are simpler, usual parser functions [11:13:14] [2/3] [[mw:Help:xtension:ParserFunctions]] [11:13:14] https://www.mediawiki.org/wiki/Help:xtension:ParserFunctions [11:13:14] [3/3] and you can tell there are subtemplates [11:13:15] [11:14:01] typo [11:14:04] Extension [11:14:17] thx [11:14:25] I'm not feeling like learning js or Lua anytime soon lol [11:17:22] how do I define a custom variable? [11:18:04] it looks like the variable documentation is only concerned with wiki statistics and IRL conditions [11:19:36] i want to be able to define a variable `{{BOOKYEAR}}` containing an integer representing the current calendar year of the series [11:19:36] https://meta.miraheze.org/wiki/Template:BOOKYEAR [11:20:15] then all we have to do to update a character's age is simply update `{{BOOKYEAR}}` [11:20:15] https://meta.miraheze.org/wiki/Template:BOOKYEAR [12:15:19] alright we've figured out that we can just create Template:BookYear and do it that way [12:15:46] but we've run into a problem where we need to do math to BookYear [12:15:54] we can't figure out the syntax [12:16:19] {{Template:BookYear + 1}} doesn't work so i'm trying to find the docs on math operators [12:16:19] https://meta.miraheze.org/wiki/Template:Template:BookYear_%2b_1 [12:16:20] [12:31:28] nevermind we did it lmao [12:32:10] ``{{#expr: {{Template:BookYear}} + N}}`` where N is the offset between the character's age and the current year [12:32:10] https://meta.miraheze.org/wiki/%23expr:Template:_%7b%7bTemplate:BookYear [12:32:25] 🥳 [12:40:31] Sadly, I'm late to this party, but that is the solution I was going to recommend. So I think you've found the easiest answer. [12:59:03] thanks [18:56:40] When referencing file paths (like in css), is there a better way to reference an image locally versus using the static https path? [19:10:13] No. You need to use the full file path to static.miraheze.org