Can I change the friendly urls "threads" > "t"?

Marcus

Well-known member
Can I change the friendly urls from "threads" to "t", from "forums" to "f"?

Where in the code would I have to make a change?
 
You would have to change /library/XenForo/Route/Prefix/Forums.php and Threads.php to replace those in buildLink(). And then create 2 new routes in development admin for t and f to go to those files.

Or so you don't edit those files you could create your own classes for each of them, edit the routes to point to it instead. Extend the original classes and and do what I said above. Either way it needs coding.

Also I don't see why? The URLS are currently readable. Adding this stuff would make them less so?
 
I remember you saying that you also want to remove the title element from URLs, so what you're now asking for is a URL structure like xenforo.com/community/t/21682/ ?

Why? o_O

What possible benefit could that confer? It's opaque to end users, and doesn't even describe the general area to which the link points.

If you really want to do it, you'll need to edit the route prefixes in debug mode. Not that I'd advise it.
 
Thanks very much for your answers! There are two reasons:

1. the words are not in my language. Having links with /форум/168 (serbia) is okay for all the audience in the world, but it is not as good as /forums/168 in your own language. It looks much more professional to have a system in one language. Users from my forum don't find it nice to have some parts not translated, there is also some older audience.

2. I could put a keyword inside these two links for seo reasons.
 
I don't know why you would change it from /threads/ to /t/ unless you have a fetish for short URLs, but it would certainly make sense to allow changing it, mainly for boards in other languages. If you have a board in Tok Pisin, then you may want to use the Tok Pisin word for threads instead of the English word.
 
If you really want to do it, you'll need to edit the route prefixes in debug mode. Not that I'd advise it.
With the exception of #post all the route prefixes are indeed very easy to change. With the MVC foundation you edit one prefix and it is changed everywhere. I am very impressed.
 
Top Bottom