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.
General modularity downside
Vanilla's modularity is brilliant. It's very easy to download and activate an extension.
However, there's no way to ensure that any two extensions will work together. I've experienced conflicts between Friendly URLs and Search Saving. Also the quoting and formatting extensions don't ensure that the quotations are handled correctly: that if an experienced user chooses text formatter and html quoting, the HTML isn't interpreted.
Extension translation is another problem. Every extension needs it's definitions to be cut & pasted into the languages/LanguageName.php file, which effectively flaws the download-and-activate extension beauty.
Do you think that there could be a general solution? Or at least a way to display a warning that some extensions are in conflict?
0
This discussion has been closed.
Comments
One strange thing is, however, I've got friendly urls and search saving enabled on here, and they work together perfectly...
/LANGUAGE/EXTENSION/
or
/EXTENSION/LANGUAGE/
which doesn't really make much difference. The point is to have separate files for each language-extension combination and do not mess with the main translation file.
As for bundling, I believe that having all the translations bundled into the extension is acceptable. You say it's waste of space, but I say the space is cheap and time is expensive. I'd rather sacrifice few hundreds if kilobytes on the server than my time spent looking for the translation file, downloading it separately and installing. If somebody values space more than time, she/he can always spend time deleting unnecessary files.
However, with the user-definable "change language" add-on, 'hard-commenting' the language strings would mean languages don't change for add-ons. If the language strings are in the main language/defintions.php, then it would work, but only if the english-language strings are commented out in the extension (or these override any other definitions). That would imply moving the english-language add-on strings to the english/definitions.php, and that's probably a nightmare to manage.
I think this needs more thought. Perhaps the add-ons could include the language-strings in the extension itself and test for the current language, else use English (also test for personal overrides in conf/languages.php file first). So that one doesn't have to test for each language, perhaps the language strings variables get a language prefix, and add-ons test to see if the prefix matches the current language setting (or xml lang def). That way it would remain extensible for new languages. Translation authors would just have to make sure that the vanilla language setting or the xml lang def and the language string prefixes match. Just a suggestion.
If the extension just included the language file of the same name as the one the forum itself is using (or default to english otherwise) wouldnt that make life slightly easier?
If we were to stick with the 'must copy extension defintions into main defintions.php file' i do think that should be a system managed and not a user managed thing. Asking people to copy and paste stuff into different places as part of the installation process is a no go in my opinion. For better or worse i believe it should be possible for the user to dump all the vanilla files into a dir on the server, set permissions and necessary, and forget that FTP ever exists (i did have a theory whereby the user uploaded a single file to their server and part of the install script was to grab the remaining files from the repository but that's really not necessary)
And yeah automatthias, the reason i suggested bundling was working on the basis that translators and extension makers wernt the same people, and it wouldnt always be possible (in the short term) to get the extension creator to add a translated file into their extension zip and re-upload it as soon as a translation was finished. Perhaps the neatest way (alas also the most complex for mark) would be to let translators upload their translations to the addons dir and attach them to an extension - then when people downloaded the extension the addon dir asked which language you wanted it in and gave you both the files for download (or a zip of both the files).
It's difficult for me to keep suggesting stuff when i have no means of even attempting to put it into practice (particularly at the moment when i have much more important things to worry about than learning OOPhp)
On a slightly different strand (though i really shouldnt get into it now we're in the heart of working through the language issues - and as mark says there will always be conflicts with extensionisable software) - another issue to consider is how extensions can be made to work with each other but not rely on each other - i just remembered the bug there is with the cleanup extension as present which means it tries to clean out the clipboard for users it's deleting but fails if the clipboard hasnt been installed. In such a case the extension needs to know not to try but it still needs to do it if the clipboard had been installed.
I suppose really what we're getting into is the addition of delegates or hooks into extensions like they've been inserted into the core. But that really relies on good practice by the extension developers.
// if definitions of "Extension" version1 are not translated in language package // Set these default definitions if (!array_key_exists('EXTENSION_VERSION1_TRANSLATED', $Configuration)) { $Context->Dictionary['ExtensionString1] = "String1"; $Context->Dictionary['ExtensionString2] = "String2"; ... } // if definitions of "Extension" added in version1.1 are not in translated in language package // Set these default definitions if (!array_key_exists('EXTENSION_VERSION1.1_TRANSLATED', $Configuration)) { $Context->Dictionary['ExtensionString10] = "String10"; };
And the translator (here, a french one) would just have to update his langage package that way:
// Definitions d' "Extension" version 1 traduites $Context->Configuration[EXTENSION_VERSION1_TRANSLATED] = 1; // Definitions d' "Extension" ajoute dans la version 1.1 traduites $Context->Configuration[EXTENSION_VERSION1.1_TRANSLATED] = 1; // Definitions pour "Extension" $Context->Dictionary['ExtensionString1] = "Chaine1"; $Context->Dictionary['ExtensionString2] = "Chaine2"; ... Context->Dictionary['ExtensionString10] = "Chaine10";
and you know what that means ->
* it is no longer that simple (vanilla is awesome because of its simplicity)
* people are more likely to make mistakes
* more need for support
this might sound a bit exaggerated but i think it is true. not every person who uses the board will be as experienced as the early adaptors. and eventually there are going to be more and more people who chose vanilla over other systems. complexity can become a supporting nightmare very fast.
i think the idea of putting a languages file into the folder of the certain extension is a good idea. though then the translation relies on the developer as he is the only one who can update the extension and therefore the only one who can update the language definition file inside the extension (which is still a better idea than providing extension and language definition seperately because of version conflicts)
how do other forum systems cope with that problem? or do they just dont mind?
is it possible to provide language definition files like "English", "Deutsch".. in the folder of the extension and make vanilla automatically chose the langauge definition file which has the same name as the current default language of the forum? and if it doesnt exist fall back to English or any other language definition that exists? well sounds a bit complicated and probably is. just random thinking here. i guess its a bad idea.
cheers
edit: Minisweeper's suggestion of adjusting the lussumo.com/addons system so that translators are able to provide translation files and translation file updates independent from the extension author is a very nice idea i think. that might really solve the problem of relying on the extension author.
As I need the ability for vanilla to switch language on per user basis, I must choose between Dinoboff solution and balti's one, as suggested in the thread started by jacob_r : http://lussumo.com/vanilladev/discussion/54/#Item_4
Dibonoff's does not modify core files, balti's has the advantage of a more structured way opening for translation of extension definition as well (http://lussumo.com/vanilladev/discussion/140/)
To cope with the location of translation files, what about a simple include from the main language_name/definitions.php of all extensions/*/language_name.php
I'm setting all my stuff in an SVN tree to be able to follow future direction but I'd like to know if we (Mark) have a favourite way.
I am not sure Mark have read the post of Balti. Would be a good idea to ask him before he release vanilla 1.0.1
// Can be used by extensions to define new definitions. This way, if a // translation exists in the translation file, the definition in the // extension will not override it. function SetDefinition($Code, $Definition) { if (!array_key_exists($Code, $this->Dictionary)) { $this->Dictionary[$Code] = $Definition; } }
Man, what a bad sentence. I've got to change that.