1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'XenForo Questions and Support' started by Marcus, Oct 18, 2011.

  1. Marcus

    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?
  2. Robbo

    Robbo Well-Known Member

    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?
  3. Kier

    Kier XenForo Developer Staff Member

    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.
  4. Marcus

    Marcus Well-Known Member

    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.
  5. Robbo

    Robbo Well-Known Member

    Changing how a link reads doesn't do anything to SEO... That's a myth.
  6. Enigma

    Enigma Well-Known Member

    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.
    Marcus likes this.
  7. Marcus

    Marcus Well-Known Member

    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.
  8. Marcus

    Marcus Well-Known Member

    Jake Bounce released an addon for this on xenforo for free.
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Marcus likes this.

Share This Page