I am setting up a new wiki and don't want any of my pages to have spacing. If for example, someone wants to create a page called [Mac mini], I want it to automatically remove the space and turn it into MacMini (I'd settle for a hyphen even). Is this possible?
Your help is appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's possible, but it will take a small modification of the new page code to make it work. Probably the best way for us to handle it is to add a setting in the config file.
And to think, we just went through all the trouble of making sure that page names with spaces work properly. :)
BTW, why do you want that?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think you'd need to alter WikiPageName::_check() in lib/stdlib.php, for one. You can prevent the creation of any pages whose names contain whitespace by changing the ' ' to a '', in the first line.
One problem that leaves is that if I edit a page to contain
[contains spaces]
it still shows up with a '?' link, even if containsspaces already exists. So there's a second place where you want to remove whitespace, but I'm not sure yet where.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am setting up a new wiki and don't want any of my pages to have spacing. If for example, someone wants to create a page called [Mac mini], I want it to automatically remove the space and turn it into MacMini (I'd settle for a hyphen even). Is this possible?
Your help is appreciated.
Purely cosmetic reasons. It would match the structure of the rest of our website.
Also, what files am I going to have to edit to get this functionality implemented?
It's possible, but it will take a small modification of the new page code to make it work. Probably the best way for us to handle it is to add a setting in the config file.
And to think, we just went through all the trouble of making sure that page names with spaces work properly. :)
BTW, why do you want that?
I think you'd need to alter WikiPageName::_check() in lib/stdlib.php, for one. You can prevent the creation of any pages whose names contain whitespace by changing the ' ' to a '', in the first line.
One problem that leaves is that if I edit a page to contain
[contains spaces]
it still shows up with a '?' link, even if containsspaces already exists. So there's a second place where you want to remove whitespace, but I'm not sure yet where.