1 ramadama May 18, 2014 02:25
3 ramadama May 18, 2014 20:03
Thanks Manuel, this hack works perfectly (used on a productive server, which might run on Linux).
One more question: if i work with this changes only for creating this posts (with capital letter containing URLs) and will get rid of the hack afterwards, will the by then generated URLs keep their capital letters?
4 mgsolipa May 20, 2014 05:40
@ramadama yes, the capital letters will remain unless you edit the post. In that case, if any of the slug that contains a capital letter is the canonical URL, a new lower-cased slug will be added and set as the canonical.
@ramadama Maybe this is not the main reason, but it's a way to standarize slugs behavior across case sensitive/insensitive systems.
If you really need to include capital letters in your item's slugs, here is a little hack that could be useful:
Note: the line numbers are included as a reference assuming that you are working with a 5.0.9 standard release, which means that none of the mentioned files have been touched before.
1) Go to the file
blogs/conf/_advanced.php
and add the following lines at the end of it (before the PHP closing tag?>
):2) Go to the file
blogs/inc/items/model/_item.funcs.php
, find the functionurltitle_validate
and replace the line:with
3) A little bit below in the same function, locate this line:
and replace it with the following block:
Please note that this might not work as expected in Windows environments. I only tested in a Linux box.