Board Thread:Lua Help/@comment-23880286-20150814202613/@comment-24473195-20150815112837

Vogel100 wrote: Dessamator wrote: Vogel100 wrote: How would I get a simple table with all pages in the category? The categorytree is useful to view the pages yourself, but for Lua not so much. Oh I think you misunderstood. I meant that having a library that can show pages within lua may cause performance problems for the servers if not implemented correctly.

Your implementation will not cause any problems at all, although using preprocess is generally not recommended because it defeats the purpose of having lua in the first place. But because the lua library is incomplete there is no other way. No, I just don't really know how to implement it in the right way. The preprocess method returns a list with links, but what I want is just a table with the pages, and I don't think that'll work with categorytree. Except if just splitting it at the new lines would work, but I don't really think so, because they're links and not just regular text. Also, I found this thread that basically confirms that it won't work, because the preprocess doesn't even return the links inside Lua.

Has mw:Extension:DynamicPageListEngine been reviewed yet? That extension seems to do exactly what is needed. The reason it won't work is not that they are links, it is that the extension simply uses ajax to pick up the list. This could take 0.1 sec or 30 secs or who knows how long, so a marker is put in place until the information is obtained, and lua can't see this information at all (partly because it can only wait for 10 seconds).

I also sent a request to staff to review the extension they said they'd look into it, but it is probably a very low priority item considering that lua in currently underused in wikia, and this isn't even implemented in mediawiki's scribunto. You'd have better luck in proposing this library directly to the scribunto developers (https://phabricator.wikimedia.org/T49137), or finding a volunteer developer willing to create the extension.