#1



I replace with:

I want to ask. Does it compromise security and break the Trongate framework?
#2
Hello,
Where are you proposing to use this function?
#3
Hi @djnordeen



it's inside file url.php at location [project_trongate]/engine/tg_helpers/url.php
#4
If you change the name of the function, you would get an error on not finding the url_title not found.
If you want to change the function, then it is in every module you create with the Trongate Desktop app.
example: line 140 of a module: $data['url_string'] = strtolower(url_title($data['page_headline']));
also line 310 of fileazone module: $safe_file_name = url_title($file_name);

So I thing you will break the code.
Are you generating modules from the Code generator of the desktop app? If so, there is a url string that makes pretty urls.
#5
Haha, I didn't rename the function, but I put the new function below the url_title() function inside the framework file.
Yes, I just understood. My problem is a local one, Trongate is a global general purpose. I would separate the custom function from the framework function.
#6
Xin chào,

I know you have already awarded Dan and this is solved for you.

As you might be aware, any changes made in the engine folder will be overwritten if you update the framework via the Desktop app.

I would then suggest you create a utility class of your own and add the following


and invoke it anywhere in your code with:

output:
#7
Thank you @DaFa
All was clear.
And this full answer should be the answer.
#8
In my case... this is how i solve it and it works with all non latin characters.

I just replaced the url_title function with this one:

#9
Hi framex,

Very nice - I like it ?

I see when the 'intl' PHP extension is not being loaded, quangquoc returned string is:

otherwise - if it is being loaded in php.ini

the returned string is:

That is exactly what quangquoc was after - kudos to you!

And in my opinion, your code is worthy of a push request to replace the `url_title()` method in `engine/tg_helpers/url.php` in the framework, and quangquoc should shift the solution points to you ?.
#10
Hi framex,

Your code is great.
It saves ~20 lines.

And up to this point, as everyone can see, I believe this is the most concise and beautiful solution for my problem.

I will try with more text and report the results here

Thanks to @djnordeen, @DaFa, @framex again.