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.
Options

LanguageSelector

edited January 2008 in Vanilla 1.0 Help
Hey guys! My forum is coming along well. I like the fact that it starts out bare and you add just what you want through the add-ons. Speaking of add-ons, I am a little confused with the LanguageSelector. The read-me file is not easy reading for someone with as little experience as I have. I wanted to confirm the meaning and put it in layman's terms before I nuke my forum with my ignorant mistakes. In addition to doing the normal installation proceedures of putting the file in the /extensions folder and activating it in the settings section, It says under the "notes" Every appg/init_*.php files should be edited to add one line as outlined in the following excerpt: // Start the session management $Context->StartSession(); //The following line added for LanguageSelector extension @include($Configuration['EXTENSIONS_PATH'].'LanguageSelector/LanguageSelector.php'); // DEFINE THE LANGUAGE DICTIONARY include($Configuration['APPLICATION_PATH'].'conf/language.php'); include($Configuration['LANGUAGES_PATH'].$Configuration['LANGUAGE'].'/definitions.php'); Does this mean put all of this: // Start the session management $Context->StartSession(); //The following line added for LanguageSelector extension @include($Configuration['EXTENSIONS_PATH'].'LanguageSelector/LanguageSelector.php'); // DEFINE THE LANGUAGE DICTIONARY include($Configuration['APPLICATION_PATH'].'conf/language.php'); include($Configuration['LANGUAGES_PATH'].$Configuration['LANGUAGE'].'/definitions.php'); into these 3 root files? /Vanilla/appg/init_ajax.php /Vanilla/appg/init_people.php /Vanilla/appg/init_vanilla.php I do not have very much programming experience [ yet :) ] but, is there any special place I should add those lines in the particular files? Thanks for your help guys, I hope I can return the favors some say!

Comments

  • Options
    edited October 2007
    I think that you understood correctly, though I didn't test this extension myself. Sometimes it's quite handy to have a way to test extensions on a draft Vanilla installation, maybe you could setting up one somewhere. This could prevent you from 'nuking' your real forum (didn't know this word!).
    Just a quick note: for code sections, please use the 'code' tag: <code>blabla</code>.
  • Options
    Hi,
    I wrote this (sort-of) extension.
    Nope, you didn't get the right meaning from my words. Only one line needs to be included ://The following line added for LanguageSelector extension @include($Configuration['EXTENSIONS_PATH'].'LanguageSelector/LanguageSelector.php');
    Yes, there are two lines in this snippet but the comment line doesn't count in.
    Other lines were added to the readme to show where to insert the snippet.
  • Options
    edited October 2007
    Thanks for your speedy reply. It seems I have an extra line in the init_ajax.php file. This is what it looks like now. // Start the session management $Context->StartSession(); $Context->Session->Check($Context); // DEFINE THE LANGUAGE DICTIONARY include($Configuration['LANGUAGES_PATH'].$Configuration['LANGUAGE'].'/definitions.php'); include($Configuration['APPLICATION_PATH'].'conf/language.php'); Should I replace the $Context->Session->Check($Context); part with //The following line added for LanguageSelector extension @include($Configuration['EXTENSIONS_PATH'].'LanguageSelector/LanguageSelector.php'); or should I put it below or above? Also, I should put it into these 3 root files, right? /Vanilla/appg/init_ajax.php /Vanilla/appg/init_people.php /Vanilla/appg/init_vanilla.php Thanks for breaking it down for me. I really appreciate it.
  • Options
    You should add the required line below the context check.
    The point is to include it before the language includes.
    And yes, do the mod to the three files to ensure everything is translated.
  • Options
    Thanks boss! I think it is really neat that you can write programs like that? I would like to run a web server with vanilla from my computer and understand more of the underlining programming languages running vanilla. What would be your suggestion as to what programming languages I should start studying? Thanks for your help.
  • Options
    Thank you people, this post have been really helpful for me, I was misunderstanding your explanation about the line to add. Thanks Max_B it´s a great add-on
This discussion has been closed.