Link al mod (http://custom.simplemachines.org/mods/index.php?mod=3918)
Language On Register v1.0
by Kaero Webs (http://www.kaerowebs.com)
Demo (http://demo1.kaerowebs.com/index.php?action=register) || Support Board (http://www.kaerowebs.com/index.php?board=9.0) || Online Manual (http://wiki.kaerowebs.com/kw/Language_On_Register:Main_Page) || Changelog (http://wiki.kaerowebs.com/kw/Language_On_Register:Main_Page#Changelog)
(https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif) (https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=9LXCEDBQZSVT6&lc=MX&item_name=Language%20On%20Register¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)
DescriptionLanguage On Register (or LORegister) is a modification that allows the new users to select their prefered language when they register.
CompatibilityLORegister is compatible with SMF 2.0.X, any previous version is not supported.
Languages
- English
- English-utf8
- Spanish
- Spanish-utf8
- Spanish_latin
- Spanish_latin-utf8
Features
- Use of integration hooks.
- It can be disabled from administration.
- The language field can be displayed on the "Required Information" or "Additional Information" section.
- The language list have selected by default the default language on your forum.
- If you have installed a language in its utf-8 and non-utf8 version, the mod will prioritize the utf8 version.
Changelog v1.0 (18/08/2014)
Legend: !Bugfix +New -Removed *Modified* Initial release.
(http://i.creativecommons.org/l/by-sa/4.0/88x31.png) (http://creativecommons.org/licenses/by-sa/4.0/)
Fanfics System by Kaero Webs (http://www.kaerowebs.com) is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (http://creativecommons.org/licenses/by-sa/4.0/).
I can't manage to make the 2nd edit to this file successfully, it fails, I tried to edit it but I got a blank screen O:) would you kindly help me please? :) The code to be added is this one:
echo '
</fieldset>
<span class="botslice"><span></span></span>
</div>';
// If we have either of these, show the extra group.
if (!empty($modSettings['userLanguage']) && !empty($modSettings['loregister_show']) && $modSettings['loregister_show'] == 1)
{
loadlanguage('Profile');
echo '
<dl class="register_form" id="language_group">
<dt>
<strong><label for="lngfile">', $txt['preferred_language'], ':</label></strong>
</dt>
<dd>
<select id="lngfile" name="lngfile">';
if (empty($context['languages']))
getLanguages();
foreach ($context['languages'] as $key => $lang)
echo '
<option value="', $key, '" ', ($key == $language) ? 'selected="selected" ' : '', '>', str_replace('-utf8', '', $lang['name']), '</option>';
echo '
</select>
</dd>
</dl>';
}
It's at line 268 of the file you submitted
..............................And then I realize that I posted the file I had edited to match the default theme and then again I realize that the mod works with the edited file... Ok, I need more sleep. Thanks Shambles for letting me know xD
So you owe me 45 seconds of my life.
I want it back now.
Right Now. I take paypal.
(http://www.katzy.dsl.pipex.com/Smileys/a043.gif)
Ninja-Shambles
:P
Nice Work
when Update dont forget portuguese files
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['loregister_show'] = 'Solicite idioma no registo';
$txt['loregister_disabled'] = 'Desactivado';
$txt['loregister_required'] = 'Informações necessárias na Secção';
$txt['loregister_additional'] = 'Informações adicionais na Secção';
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['loregister_show'] = 'Solicite idioma no registo';
$txt['loregister_disabled'] = 'Desactivado';
$txt['loregister_required'] = 'Informações necessárias na Secção';
$txt['loregister_additional'] = 'Informações adicionais na Secção';
]]></add>
</operation>
</file>
Quote from: Joomlamz on November 09, 2014, 11:21:48 AM
Nice Work
when Update dont forget portuguese files
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['loregister_show'] = 'Solicite idioma no registo';
$txt['loregister_disabled'] = 'Desactivado';
$txt['loregister_required'] = 'Informações necessárias na Secção';
$txt['loregister_additional'] = 'Informações adicionais na Secção';
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['loregister_show'] = 'Solicite idioma no registo';
$txt['loregister_disabled'] = 'Desactivado';
$txt['loregister_required'] = 'Informações necessárias na Secção';
$txt['loregister_additional'] = 'Informações adicionais na Secção';
]]></add>
</operation>
</file>
Thanks Joomlamz, I'll include it on the next update. ;D
It would be quite cool to list the languages in alphabetical order, especially if there are many... I just realized that they are all ordered in a way that I can't understand.
EDIT: nvm I got it.
Yes, the languages are in alphabetical order based on english language.
They weren't at all, actually. I had to add one more string (a ksort) to make them show up like that.
Ref: http://www.italiansmf.net/forum/index.php?topic=1231.0
Oh, ok. I'll fix this on the next version. Thanks for appoint this. :D
Np :) oh btw to be clear I added the first string mentioned before the second mentioned in that topic, since it's italian it might have been unclear ;)
Yep it's good especially if you have all languages installed like me ;D
Yeah, I don't understand italian but only for the code I interpretdd it has to be before the foreach. (the php coding is an universal language :P)