Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to translate the Search Engine Friendly URLs structure?

edited April 2008 in Vanilla 1.0 Help
Hi!
I want to translate the structure of a vanilla forum, change ../discussion/1/... to ../mensaje/1/... ../categories/ to ../categorias/..

I know I have to change it in the .htaccess, but what is the other file that I have to change?

Thank you in advance,

Comments

  • lechlech Chicagoland
    You'll also want the Friendly URLs extension installed to handle this: http://lussumo.com/addons/?PostBackAction=AddOn&AddOnID=30
  • Thank you for your answer but I'm not asking for this. I'm only want to translate the default urls
  • lechlech Chicagoland
    edited May 2006
    Hmmm, this would require gutting into Vanilla and renaming all the strings in there to read differently, which I'm guessing is quite difficult to do unless mark says otherwise. Mark? The only other alternative is having a conditional rewrite rule that follows the previous ones which points requests to what you want to what it references within Vanilla. That's the only other alternative I can think of.
  • Actually, (assuming you're using version 1 beta,) there are configuration options which control the mod_rewrite urls. Just change these, stick them in conf/settings.php, and change your .htaccess file to match the new rewrites.

    $Configuration['REWRITE_categories.php'] = 'categories/'; $Configuration['REWRITE_index.php'] = 'discussions/'; $Configuration['REWRITE_comments.php'] = 'discussion/'; $Configuration['REWRITE_search.php'] = 'search/'; $Configuration['REWRITE_account.php'] = 'account/'; $Configuration['REWRITE_settings.php'] = 'settings/'; $Configuration['REWRITE_post.php'] = 'post/'; $Configuration['REWRITE_people.php'] = 'people/';
  • @a_magical_me: thanks, it seems to work nicely.
  • edited May 2006
    It works Thanks :-)
  • MarkMark Vanilla Staff
    Yay! I love it when people figure out my wacky methods.
  • Hey! Thanks for a fantastic product. I have set up friendly urls in my Vanilla 1 installation. It works well on the threads and categories pages, but on search and account I get the error: Notice: Undefined index: REWRITE_account in /hsphere/local/home/tools/tools.web.surftown.se/storaa/forum/library/Framework/Framework.Functions.php on line 415 My forum is at: http://tools.web.surftown.se/storaa/forum/search/ I appreciate all the help!
  • There is also an isse with the Guest Welcome link - the link only points to the login page when viewed from the fron t page. When clicked from within a thread, the link leads to "...forum/10/people.php" instead of the correct "...forum/people.php". Any ideas?
  • Thomas, I changed the link in the guest welcome string to read:
    <a href=\"".GetUrl($Configuration['BASE_URL'], "people.php", "", "", "", "", "PostBackAction=ApplyForm")."\">hier registrieren</a>
  • Thanks, jakob_r, you inspired me to the following solution to the Guest Welcome / Friendly Urls incompatibility issue: To conf/settings.php I added: $Configuration['SIGNIN_URL'] = 'http://.../forum/people.php'; $Configuration['REGISTER_URL'] = 'http://.../forum/people.php?PostBackAction=ApplyForm'; (where the ... is an abbreviation of the real url) In the extensions/GuestWelcome/default.php file I made the urls look like this: <a href=\"".$Configuration['SIGNIN_URL']."\">log in</a> <a href=\"".$Configuration['REGISTER_URL']."\">register</a> If I'd known any php I'm sure I could have done it without defining RREGISTER_URL separately, as it calls SIGNIN_URL with a suffix.
  • The remaining problem is the error message "Notice: Undefined index: REWRITE_search in /hsphere/local/home/tools/tools.web.surftown.se/storaa/forum/library/Framework/Framework.Functions.php on line 415" which comes up in lots of places. Is the Friendly Urls extension written for a pre-Vanilla 1 edition? Any thoughts on how to solve the problem?
  • oooowww... It works Thanks ::D
This discussion has been closed.