Advertisement:

Author Topic: Language On Register  (Read 6506 times)

Offline Tokzu

  • Jr. Member
  • **
  • Posts: 282
  • Gender: Female
    • @Kaero_Webs on Twitter
    • Kaero Webs
Language On Register
« on: September 02, 2014, 09:48:36 PM »
Link al mod

Language On Register v1.0
by Kaero Webs

Demo || Support Board || Online Manual || Changelog




Description
Language On Register (or LORegister) is a modification that allows the new users to select their prefered language when they register.



Compatibility
LORegister 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
Code: [Select]
* Initial release.




« Last Edit: December 30, 2014, 03:29:49 AM by Tokzu »
"I don't need a knight in a shinny armor, I need a angel in a trench coat"

My mods:

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,233
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: Language On Register
« Reply #1 on: October 23, 2014, 02:58:29 PM »
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:
Code: (find, but there isn't anymore, maybe for updates idk) [Select]
echo '
</fieldset>
<span class="botslice"><span></span></span>
</div>';

// If we have either of these, show the extra group.

Code: (add before) [Select]
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>';
}

Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.
♥ Jess ♥

STOP EDITING MY PROFILE

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,629
  • Gender: Male
    • i30 Owners Club
Re: Language On Register
« Reply #2 on: October 23, 2014, 03:20:47 PM »
It's at line 268 of the file you submitted

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,233
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: Language On Register
« Reply #3 on: October 23, 2014, 04:30:45 PM »
..............................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
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.
♥ Jess ♥

STOP EDITING MY PROFILE

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,629
  • Gender: Male
    • i30 Owners Club
Re: Language On Register
« Reply #4 on: October 23, 2014, 05:30:07 PM »
So you owe me 45 seconds of my life.

I want it back now.

Right Now. I take paypal.

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,233
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: Language On Register
« Reply #5 on: October 23, 2014, 05:30:52 PM »

        Ninja-Shambles

:P
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.
♥ Jess ♥

STOP EDITING MY PROFILE

Offline Apllicmz

  • SMF Hero
  • ******
  • Posts: 2,641
  • Gender: Male
  • Suporte SmfPT
    • apllicmz on Facebook
    • apllicmz on GitHub
    • https://www.linkedin.com/in/aplic on LinkedIn
    • @aplichosting on Twitter
    • Webdesign
Re: Language On Register
« Reply #6 on: November 09, 2014, 11:21:48 AM »
Nice Work
when Update dont forget portuguese files

Code: [Select]
<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&ccedil;&otilde;es necess&aacute;rias na Sec&ccedil;&atilde;o';
$txt['loregister_additional'] = 'Informa&ccedil;&otilde;es adicionais na Sec&ccedil;&atilde;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&ccedil;&otilde;es necess&aacute;rias na Sec&ccedil;&atilde;o';
$txt['loregister_additional'] = 'Informa&ccedil;&otilde;es adicionais na Sec&ccedil;&atilde;o';
]]></add>
        </operation>
    </file>




Offline Tokzu

  • Jr. Member
  • **
  • Posts: 282
  • Gender: Female
    • @Kaero_Webs on Twitter
    • Kaero Webs
Re: Language On Register
« Reply #7 on: November 09, 2014, 11:33:10 AM »
Nice Work
when Update dont forget portuguese files

Code: [Select]
<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&ccedil;&otilde;es necess&aacute;rias na Sec&ccedil;&atilde;o';
$txt['loregister_additional'] = 'Informa&ccedil;&otilde;es adicionais na Sec&ccedil;&atilde;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&ccedil;&otilde;es necess&aacute;rias na Sec&ccedil;&atilde;o';
$txt['loregister_additional'] = 'Informa&ccedil;&otilde;es adicionais na Sec&ccedil;&atilde;o';
]]></add>
        </operation>
    </file>


Thanks Joomlamz, I'll include it on the next update. ;D
"I don't need a knight in a shinny armor, I need a angel in a trench coat"

My mods:

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,233
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: Language On Register
« Reply #8 on: December 05, 2014, 05:07:12 PM »
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.
« Last Edit: December 05, 2014, 05:27:30 PM by ♦ Ninja ZX-10RR ♦ »
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.
♥ Jess ♥

STOP EDITING MY PROFILE

Offline Tokzu

  • Jr. Member
  • **
  • Posts: 282
  • Gender: Female
    • @Kaero_Webs on Twitter
    • Kaero Webs
Re: Language On Register
« Reply #9 on: December 07, 2014, 10:49:04 AM »
Yes, the languages are in alphabetical order based on english language.
"I don't need a knight in a shinny armor, I need a angel in a trench coat"

My mods:

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,233
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: Language On Register
« Reply #10 on: December 07, 2014, 11:20:25 AM »
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
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.
♥ Jess ♥

STOP EDITING MY PROFILE

Offline Tokzu

  • Jr. Member
  • **
  • Posts: 282
  • Gender: Female
    • @Kaero_Webs on Twitter
    • Kaero Webs
Re: Language On Register
« Reply #11 on: December 07, 2014, 11:33:25 AM »
Oh, ok. I'll fix this on the next version. Thanks for appoint this. :D
"I don't need a knight in a shinny armor, I need a angel in a trench coat"

My mods:

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,233
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: Language On Register
« Reply #12 on: December 07, 2014, 11:35:16 AM »
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
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.
♥ Jess ♥

STOP EDITING MY PROFILE

Offline Tokzu

  • Jr. Member
  • **
  • Posts: 282
  • Gender: Female
    • @Kaero_Webs on Twitter
    • Kaero Webs
Re: Language On Register
« Reply #13 on: December 07, 2014, 11:45:03 AM »
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)
"I don't need a knight in a shinny armor, I need a angel in a trench coat"

My mods: