[00:57:25] is anyone able to provide a character template? i cant make templates for crap lol [00:59:46] guess didn't want template assistance [01:00:11] was fetching my generic infoboxes [01:07:30] noooo wait i dooo [01:07:35] lmao [01:08:41] i was gonna like search through wikis using the approved wiki requests to see if i could snatch one but its gonna take foreverrrrr [01:10:57] lol why did you delete the ask? [01:11:05] sent to DM [01:11:53] [1/2] thank you!! [01:11:53] [2/2] i deleted the ask mostly because im terrified about putting things in the right places lol [01:12:39] don't worry about right or wrong channels, if it fits better in a different channel we can tell you :) [01:13:54] alright thanks! [01:14:40] i'll probably be create more generic use template soon once a couple high priority tasks are finished [01:14:49] you guys dont bite but my conscious does [01:15:26] don't blame ya, I feel the same sometimes [02:06:21] <.guardianx.> [1/5] I'm looking to understand if this is a good idea. [02:06:21] <.guardianx.> [2/5] I have some data, I want to store it in an array and extract it via template for formatting from another page [02:06:21] <.guardianx.> [3/5] so like DataPage - Template - Page A {{Template|DataPage|ArrayKey}} [02:06:21] <.guardianx.> [4/5] I can access the array locally on the same page and use the template to format it by simply doing {{Template|{{PAGENAME}}}} but I can't do the one above. [02:06:22] <.guardianx.> [5/5] Anyone have insight on doing something like this? [02:34:01] first question: where is this data being stored? [02:44:04] <.guardianx.> On a wiki template [02:53:24] <.guardianx.> [1/27] My original method only really added formatting via template on data stored on page. [02:53:24] <.guardianx.> [2/27] `{| class="wikitable" [02:53:24] <.guardianx.> [3/27] ! {{#arrayindex:{{{1}}}|0|}} [02:53:25] <.guardianx.> [4/27] |- [02:53:25] <.guardianx.> [5/27] | {{#arrayindex:{{{1}}}|1|}} [02:53:25] <.guardianx.> [6/27] |- [02:53:25] <.guardianx.> [7/27] | {{#arrayindex:{{{1}}}|2|}} [02:53:26] <.guardianx.> [8/27] |- [02:53:26] <.guardianx.> [9/27] | {{#arrayindex:{{{1}}}|3|}} [02:53:26] <.guardianx.> [10/27] |- [02:53:27] <.guardianx.> [11/27] | {{#arrayindex:{{{1}}}|4|}} [02:53:27] <.guardianx.> [12/27] |- [02:53:28] <.guardianx.> [13/27] | {{#arrayindex:{{{1}}}|5|}} [02:53:28] <.guardianx.> [14/27] |- [02:53:29] <.guardianx.> [15/27] | {{#arrayindex:{{{1}}}|6|}} [02:53:29] <.guardianx.> [16/27] |- [02:53:30] <.guardianx.> [17/27] | {{#arrayindex:{{{1}}}|7|}} [02:53:30] <.guardianx.> [18/27] |- [02:53:31] <.guardianx.> [19/27] | {{#arrayindex:{{{1}}}|8|}} [02:53:31] <.guardianx.> [20/27] |}` [02:53:32] <.guardianx.> [21/27] The data: [02:53:32] <.guardianx.> [22/27] `{{#arraydefine:Dezi Amandine|1237294211^"Eh? What'cha want? You lookin' for me fee-on-seh/color/link?! [02:53:33] <.guardianx.> [23/27] I be t'inking he still in the Bluesnail buyin' himself some of them fancy pants!"^"Yeh! That Piligree guy I'm gonna marry. Muh pop's idea. [02:53:33] <.guardianx.> [24/27] Poor Edmond/color/link. I can tell the lad be takin' it hard."^"He be the boy who always been crushin' on me. That kid always be sulkin' at the dock by the lake outside of town."^"M'ebbe you go 'an cheer him up some?"^"And while yer at it, tell muh fee-on-seh to just get whatever fancy pants he finds. Such a picky little snoot he is!"^"Eh? Oh it' [02:53:34] <.guardianx.> [25/27] s you again. Me'bbe you can do me a favor 'an check in on the boys fer me?"^"I'm guessin' Edmond still be sulkin' by them docks on the lake outside of town..."^"and I still ain't seen fancy Fernand come outta the Blue Snail!"^"What's 'dis? Fenla's footjam! 'Dis be the snootiest buncha words I ever did read!"^"Yet... That snoot may be annoyin' but ya can't deny he sure is fancy."^ [02:53:34] <.guardianx.> [26/27] "Can't be backin' outta that wedding now."^"Mebbe' you'll have better luck in love than me!"^"Here's some pocket change! Take someone out on a date ya hear!?"|^}}` [02:53:35] <.guardianx.> [27/27] My goal is to "remotely" pull the data from a centralized location for several pages and fill the content. I'm not sure if this is a good idea though. [02:54:10] <.guardianx.> Ya I know there are constraints on the count on that specific array vs the template fields. [07:57:43] [1/5] You have multiple ways you can do this: [07:57:43] [2/5] A. Use a "data" template made with a `#switch` parser function. This way you can call it with a parameter to get certain data. It won't scale to more than let's say 100 entries, but it's the simpliest. [07:57:44] [3/5] B. Use a lua module that holds data in a table, and another module to store a few functions used for getting the data. Then you'd get it by calling the module on a page with `#invoke` (pretty similar to templates). It has a steeper learning curve but is much more flexible. If you want to see an example of this, we use that on my wiki [4/5] aheze.org/wiki/Module:Dragon_Data> [07:57:44] [5/5] C. Use an extension like Cargo. Most of these are heavy on performance so to enable them you have to do a request on phabricator, and they also require some amount of learning. I haven't used this approach myself so cannot provide examples [11:11:03] Can another SRE or maybe @rodejong / @pixldev test https://issue-tracker.miraheze.org/T12049 on brandonwm.miraheze.org [11:11:07] I deployed it there [11:11:18] cause I'm not bothered about breaking @brandon.wm 's wiki [11:11:47] https://cdn.discordapp.com/attachments/1006789349498699827/1234824516543188992/Screenshot_2024-04-30_at_12.11.41.png?ex=66322372&is=6630d1f2&hm=0f90686646fe00a080058daa8fb82e1952af5091cbddbf35d7f829a57bcdc7e2& [11:11:50] ^ is my logic [11:11:56] if it works, I'll roll it out [11:13:28] @reception123 you're online ^ [11:22:55] Unfortunately I'm busy now so can't look until the evening [11:26:06] @reception123 it's only the screenshot [11:26:12] I can't see how it would break [11:26:25] but should change /index.php to /w/index.php [11:26:34] i'm around next 90 minutes so I can watch close [11:39:59] [1/3] I copied `/index.php/The_Mana_World:Home` on it, and it redirected it to `/wiki/The_Mana_World:Home` [11:39:59] [2/3] `/wiki/index.php/The_Mana_World:Home` stayed `/wiki/index.php/The_Mana_World:Home` and gave `File not found.` [11:40:00] [3/3] I'm no technical guy, but I hope that that was what you wer looking for? [11:40:43] yes, that matches what I see [11:40:52] I see no reason why it shouldn't work [11:40:58] i'm going to roll it out [11:41:26] done [11:42:55] 👍🏻 [11:43:36] i added it temp for now [11:43:47] i'll make it a 301 if it works later [11:47:59] <.guardianx., replying to xenareee> TY, for option b, do I need any additional extensions? For some reason, I was thinking that Lua required staff to enable [11:50:58] I'm fairly sure Scribuntu is default. [11:51:30] Global 🙂 [11:51:34] so already enabled [11:52:32] LUA is enabled by default [11:53:54] <.guardianx.> Cool, I will have to check it out when I get to my desk! TY! For some reason, I thought that most all programming and scripting languages were locked til requested. [11:54:17] nope [11:54:27] we allow you to self manage a fair amount [11:54:46] No there are actually quite few extensions you need to request. Like Cargo and Semantic Media Wiki. [11:54:57] The rest you can enable your self. [11:57:16] @pixldev phab permissions are wonderfuk since the security bug [11:57:22] you need a degree in it [12:01:00] [1/2] But, please be careful by copying Lua module dependent templates. Especially those from Wikipedia. They have so many dependencies, that it might be hard to find the error when one appears. [12:01:01] [2/2] You can use [[dev:Category:Templates]] to brows simpler, less dependent templates. Just copy them to your wiki. These are the most used templates. [12:01:01] [12:08:11] @pixldev [12:08:12] https://secure.phabricator.com/T13683 [12:15:04] Wonderful [12:19:42] it's also somehow been nearly 2.5 years since phab went EOL [12:19:51] <.guardianx., replying to rodejong> Will do, I plan on making my own module more than likely so it fits my use case. [12:19:58] Wow [12:22:59] 1st June 2021 [12:24:08] I can’t tell if I’m dumb or if this is specifically built for skins. I’ll look closer into cosmos’ repo ig. ~~worst case I go back to duct tape, I see cosmos makes a json file in /cache so that may work for what I need if reading a json file from disk isn’t a horrible idea in a r loader hook [12:56:28] [1/2] Yeah, I doubt it's possible to use someone else's setup for this as the kind of data to store can vary wildly haha :pupCoffeeMH: [12:56:28] [2/2] If you run into problems implementing this, feel free to create a #support thread and ping me [12:58:18] <.guardianx.> Sure thing, ty! [14:06:50] .....doh [14:07:19] Morning [14:07:35] morning! [14:07:40] we breaking my wiki today? [14:08:21] @brandon.wm I was earlier ye [14:08:30] Was testing a change on your wiki [14:08:42] Can't use beta as it's not on cf [14:08:46] Nor are custom domains [14:08:49] So you got it [14:08:54] Change worked though [14:08:55] I hope [14:09:01] Cause it's all on wikis now [14:10:04] ah okay [14:11:12] @brandon.wm you will now get a redirect if you do wiki.mh.o/index.php instead of /w/index.php [14:11:19] Could do it for the other end points too [14:11:21] Like api [14:11:26] wait I'm confused [14:11:28] sample it? [14:11:31] About to board train now [14:11:47] @brandon.wm try BrandonWM.miraheze.org/index.php/Test [14:11:58] That's will send you to the right page [14:12:04] got iy [14:12:04] It didn't this morning [14:12:08] You needed /w/ [14:12:16] ahh [14:12:19] it now works yeah [14:14:12] Only index.php does at moment [14:14:19] I could add the other endpoints too [14:14:53] got i [14:14:59] what are the others? [14:15:40] api.php and rest.php [14:15:45] Most people don't use rest [14:15:48] ah yeah [14:15:49] But api might be cool [14:16:17] if you have the time [14:16:20] install them [14:16:28] would be interesting [14:16:52] It would take seconds [14:17:07] One line change in cloudflare [14:17:32] oh could you? [14:17:38] or would someone else need to do it [14:17:44] I can [14:17:47] Not now [14:17:53] I'm about to get a train [14:18:01] Later I can [14:18:37] got it [14:19:34] You’re having a blast playing with CloudFlare aren’t you lol [14:21:23] Cloudflare is nice to deal with [14:31:01] He who hold the fate of hundreds of thousands of IPs in his hand [14:31:07] Or keyboard [14:42:39] I can do a lot [14:42:45] Mostly without review [14:42:51] There is an audit log though [14:44:32] I sometimes forget if you’re a software engineer or security [14:50:13] Both [14:51:34] May wanna update [[SRE]] [14:51:35] [14:54:06] Security is temp to help with cf onboarding [14:54:10] But probably [16:30:07] whats the usefulness of this? I'm not seeing it [16:30:59] Migrating wiki wants to not break existing links [16:31:06] They have mediawiki installed at the root [16:31:36] smh [16:31:39] silly silly [16:32:16] They only asked for index.php [22:44:41] @rhinosf1 can you check you're phorge notifications rq [22:58:41] <.guardianx.> [1/4] So I dunno if asking questions here is the right path, let me know if so, I saw the offer to open a support ticket and I dunno if I need that much help just yet, plus, it's fun to do things I'm not familiar in doing. [22:58:41] <.guardianx.> [2/4] I saw Xena's dragon page and had some questions about caching and using LUA to build things. Would yall say it's best practice to do something like load the JSON fields i want into variables using a template before loading it on a given page? [22:58:42] <.guardianx.> [3/4] For example, I have a ton of quest text from NPC's in addition to a filenumber i can use to make adding NPC profiles to their page a ton easier. Currently I'm pulling the NPC name from the page itself to the template to use as a filter for the LUA script, that returns values, when asked, for the FileNumber and, currently, the first line of text you hear from an NPC. [22:58:42] <.guardianx.> [4/4] Would doing it this way be the best practice? I don't wanna be the odd person out when usage reports hit peoples inboxes LOL