Topic on Project:Support desk

"String Functions" do not exist?

10
AngeCI (talkcontribs)
Ciencia Al Poder (talkcontribs)
AngeCI (talkcontribs)

Though I'm not working on WMF wikis, my wiki currently seems to support Lua. However, I would avoid using it because I don't know when this functionality would be removed (since this did happen on other extensions, there's basically no way to have an effective communication between active users and the site administrator, and the site administrator is always randomly adding or removing extension) and there's no other Lua stuffs existing on my wiki currently.

Bawolff (talkcontribs)

Whether or not string functions are enabled depends on if $wgPFEnableStringFunctions = true; is set. It is not set by default. You would have to talk to your hosting provider for getting it set. I would generally recommend lua instead, which is much more flexible than string functions.

AngeCI (talkcontribs)

Well, I would probably use some JavaScript workaround for my project for portability reasons and prevent unintended modification or removal of extensions (since it is extremely hard for other users to communicate with the hosting provider).

Bawolff (talkcontribs)

Maybe you should get a new hosting provider. If they are randomly taking stuff away, what makes you think they wouldn't take away javascript access?

AngeCI (talkcontribs)

This is off topic, but this is indeed a persistent problem for our wiki. Almost all old users have already quit or disappeared, and mainly new users are contributing to the wiki nowadays. I am probably the only active member of the wiki who is able to deal with technical problems.

Bawolff (talkcontribs)

Oh i guess i never answered your question.

You can sort of use padleft as a work around - see manual:Magic words.

Basically padleft lets you get a left-most prefix of a string. For example to get the first three characters do:

{{padleft:|3|abcdefgh}}

There's some complex stuff you can do to get the right-most characters . it is much slower and less efficient than lua.

AngeCI (talkcontribs)

JavaScript is part of MediaWiki core, it can't be taken away, and I have a sysop right on that wiki. I'm just asking if there is any workaround as if my wiki have no Lua support.

Bawolff (talkcontribs)

> JavaScript is part of MediaWiki core, it can't be taken away,

That's definitely not true ($wgUseSiteJs), but i suppose that is neither here nor there.

Reply to ""String Functions" do not exist?"