Advertisement:

Author Topic: Justify BBCode  (Read 24892 times)

Offline Grimedth

  • Semi-Newbie
  • *
  • Posts: 16
  • Gender: Male
Re: Justify BBCode
« Reply #20 on: March 14, 2009, 03:16:21 PM »

Hi :)

Translation to Hungarian:
Code: [Select]
$txt['justify'] = 'Sorkizárt';

Offline Nibogo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,433
  • Gender: Male
    • smfpacks on Facebook
    • @smfpacks on Twitter
    • SMFPacks
Re: Justify BBCode
« Reply #21 on: March 14, 2009, 06:35:59 PM »
Thanks

Offline www.filippijnen.org

  • Semi-Newbie
  • *
  • Posts: 21
Re: Justify BBCode
« Reply #22 on: June 11, 2009, 07:02:11 AM »
Translation to Dutch:
Code: [Select]
$txt['justify'] = 'Uitvullen';

Offline IvoLeite

  • Semi-Newbie
  • *
  • Posts: 84
Re: Justify BBCode
« Reply #23 on: August 04, 2009, 08:23:22 AM »
Translation to Portuguese:
Code: [Select]
$txt['justify'] = 'Justificar';

Offline Nibogo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,433
  • Gender: Male
    • smfpacks on Facebook
    • @smfpacks on Twitter
    • SMFPacks
Re: Justify BBCode
« Reply #24 on: August 04, 2009, 03:12:26 PM »
Thanks both, I will add the translations in the next release

Offline shakaran

  • Semi-Newbie
  • *
  • Posts: 57
  • Gender: Male
    • .::ApogeusOne::.
Re: Justify BBCode
« Reply #25 on: August 25, 2009, 11:24:31 PM »
Hi, I made the translations for the mod Minimun Characters or Words  with spanish, spanish-utf8, spanish_es, spanish_es-utf8.

I attached a file.

Code: [Select]
<?xml version="1.0"?>

<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">

<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">

<id>NIBOGO:mincharwordsmod</id>

<version>1.0</version>

<file name="$languagedir/Modifications.english-utf8.php"error="skip">

<operation>

<search position="end" />

<add><![CDATA[//Minimun Characters or Words Mod

$txt['minWordLen'] = 'Minimum words per post';

$txt['minwords_mod'] = 'words';

$txt['minChar'] = 'Minimum characters per post';

$txt['minchars_mod'] = 'characters';

$txt['minmod_zero'] = '0 for no minimum.';

$txt['minAdminLen'] = 'Ignore the minimun characters or words of Admins';

$txt['error_minWordLen'] = 'The message does not meet the minimum word requirements (' . $modSettings['minWordLen'] . ' words).';

$txt['error_minChar'] = 'The message does not meet the minimum character requirements (' . $modSettings['minChar'] . ' characters).';]]></add>

</operation>

</file>

<file name="$languagedir/Modifications.english.php">

<operation>

<search position="end" />

<add><![CDATA[//Minimun Characters or Words Mod

$txt['minWordLen'] = 'Minimum words per post';

$txt['minwords_mod'] = 'words';

$txt['minChar'] = 'Minimum characters per post';

$txt['minchars_mod'] = 'characters';

$txt['minmod_zero'] = '0 for no minimum.';

$txt['minAdminLen'] = 'Ignore the minimun characters or words of Admins';

$txt['error_minWordLen'] = 'The message does not meet the minimum word requirements (' . $modSettings['minWordLen'] . ' words).';

$txt['error_minChar'] = 'The message does not meet the minimum character requirements (' . $modSettings['minChar'] . ' characters).';]]></add>

</operation>

</file>

<file name="$languagedir/Modifications.spanish_latin-utf8.php" error="skip">

<operation>

<search position="end" />

<add><![CDATA[//Minimun Characters or Words Mod

$txt['minWordLen'] = 'M&iacute;nima cantidad de palabras por post';

$txt['minwords_mod'] = 'palabras';

$txt['minChar'] = 'M&iacute;nima cantidad de caracteres por post';

$txt['minchars_mod'] = 'caracteres';

$txt['minmod_zero'] = '0 para no poner l&iacute;mite.';

$txt['minAdminLen'] = 'Ignorar el m&iacute;nimo de caracteres o palabras de administradores';

$txt['error_minWordLen'] = 'El mensaje no tiene la cantidad m&iacute;nima de palabras requeridas: (' . $modSettings['minWordLen'] . ' palabras).';

$txt['error_minChar'] = 'El mensaje no tiene la cantidad m&iacute;nima de caracteres requeridos (' . $modSettings['minChar'] . ' caracteres).';]]></add>

</operation>

</file>

<file name="$languagedir/Modifications.spanish_latin.php" error="skip">

<operation>

<search position="end" />

<add><![CDATA[//Minimun Characters or Words Mod

$txt['minWordLen'] = 'Mínima cantidad de palabras por post';

$txt['minwords_mod'] = 'palabras';

$txt['minChar'] = 'Mínima cantidad de caracteres por post';

$txt['minchars_mod'] = 'caracteres';

$txt['minmod_zero'] = '0 para no poner límite.';

$txt['minAdminLen'] = 'Ignorar el mínimo de caracteres o palabras de administradores';

$txt['error_minWordLen'] = 'El mensaje no tiene la cantidad mínima de palabras requeridas: (' . $modSettings['minWordLen'] . ' palabras).';

$txt['error_minChar'] = 'El mensaje no tiene la cantidad mínima de caracteres requeridos (' . $modSettings['minChar'] . ' caracteres).';]]></add>

</operation>

</file>

    <file name="$languagedir/Modifications.spanish-utf8.php" error="skip">

<operation>

<search position="end" />

<add><![CDATA[//Minimun Characters or Words Mod

$txt['minWordLen'] = 'M&iacute;nima cantidad de palabras por post';

$txt['minwords_mod'] = 'palabras';

$txt['minChar'] = 'M&iacute;nima cantidad de caracteres por post';

$txt['minchars_mod'] = 'caracteres';

$txt['minmod_zero'] = '0 para no poner l&iacute;mite.';

$txt['minAdminLen'] = 'Ignorar el m&iacute;nimo de caracteres o palabras de administradores';

$txt['error_minWordLen'] = 'El mensaje no tiene la cantidad m&iacute;nima de palabras requeridas: (' . $modSettings['minWordLen'] . ' palabras).';

$txt['error_minChar'] = 'El mensaje no tiene la cantidad m&iacute;nima de caracteres requeridos (' . $modSettings['minChar'] . ' caracteres).';]]>

</add>

</operation>

</file>

<file name="$languagedir/Modifications.spanish.php" error="skip">

<operation>

<search position="end" />

<add><![CDATA[//Minimun Characters or Words Mod

$txt['minWordLen'] = 'Mínima cantidad de palabras por post';

$txt['minwords_mod'] = 'palabras';

$txt['minChar'] = 'Mínima cantidad de caracteres por post';

$txt['minchars_mod'] = 'caracteres';

$txt['minmod_zero'] = '0 para no poner límite.';

$txt['minAdminLen'] = 'Ignorar el mínimo de caracteres o palabras de administradores';

$txt['error_minWordLen'] = 'El mensaje no tiene la cantidad mínima de palabras requeridas: (' . $modSettings['minWordLen'] . ' palabras).';

$txt['error_minChar'] = 'El mensaje no tiene la cantidad mínima de caracteres requeridos (' . $modSettings['minChar'] . ' caracteres).';]]></add>

</operation>

</file>

    <file name="$languagedir/Modifications.spanish_es-utf8.php"error="skip">

<operation>

<search position="end" />

<add><![CDATA[//Minimun Characters or Words Mod

$txt['minWordLen'] = 'M&iacute;nima cantidad de palabras por post';

$txt['minwords_mod'] = 'palabras';

$txt['minChar'] = 'M&iacute;nima cantidad de caracteres por post';

$txt['minchars_mod'] = 'caracteres';

$txt['minmod_zero'] = '0 para no poner l&iacute;mite.';

$txt['minAdminLen'] = 'Ignorar el m&iacute;nimo de caracteres o palabras de administradores';

$txt['error_minWordLen'] = 'El mensaje no tiene la cantidad m&iacute;nima de palabras requeridas: (' . $modSettings['minWordLen'] . ' palabras).';

$txt['error_minChar'] = 'El mensaje no tiene la cantidad m&iacute;nima de caracteres requeridos (' . $modSettings['minChar'] . ' caracteres).';]]></add>

</operation>

</file>

<file name="$languagedir/Modifications.spanish_es.php"error="skip">

<operation>

<search position="end" />

<add><![CDATA[//Minimun Characters or Words Mod

$txt['minWordLen'] = 'Mínima cantidad de palabras por post';

$txt['minwords_mod'] = 'palabras';

$txt['minChar'] = 'Mínima cantidad de caracteres por post';

$txt['minchars_mod'] = 'caracteres';

$txt['minmod_zero'] = '0 para no poner límite.';

$txt['minAdminLen'] = 'Ignorar el mínimo de caracteres o palabras de administradores';

$txt['error_minWordLen'] = 'El mensaje no tiene la cantidad mínima de palabras requeridas: (' . $modSettings['minWordLen'] . ' palabras).';

$txt['error_minChar'] = 'El mensaje no tiene la cantidad mínima de caracteres requeridos (' . $modSettings['minChar'] . ' caracteres).';]]></add>

</operation>

</file>

<file name="$sourcedir/ManagePosts.php">

<operation>

<search position="replace"><![CDATA[// All, next/prev...

array('int', 'enableAllMessages', 'postinput' => $txt['manageposts_posts'], 'subtext' => $txt['enableAllMessages_zero']),

array('check', 'disableCustomPerPage'),

array('check', 'enablePreviousNext'),]]></search>

<add><![CDATA[// All, next/prev...

array('int', 'enableAllMessages', 'postinput' => $txt['manageposts_posts'], 'subtext' => $txt['enableAllMessages_zero']),

array('check', 'disableCustomPerPage'),

array('check', 'enablePreviousNext'),

'',

        array('int', 'minWordLen', 'postinput' => $txt['minwords_mod'], 'subtext' => $txt['minmod_zero']),

    array('int', 'minChar', 'postinput' => $txt['minchars_mod'], 'subtext' => $txt['minmod_zero']),

                array('check', 'minAdminLen'),]]></add>

</operation>

</file>

<file name="$sourcedir/Post.php">

<operation>

<search position="replace"><![CDATA[// Check the subject and message.

if (!isset($_POST['subject']) || $smcFunc['htmltrim']($smcFunc['htmlspecialchars']($_POST['subject'])) === '')

$post_errors[] = 'no_subject';

if (!isset($_POST['message']) || $smcFunc['htmltrim']($smcFunc['htmlspecialchars']($_POST['message']), ENT_QUOTES) === '')

$post_errors[] = 'no_message';

elseif (!empty($modSettings['max_messageLength']) && $smcFunc['strlen']($_POST['message']) > $modSettings['max_messageLength'])

$post_errors[] = 'long_message';]]></search>

<add><![CDATA[if (!empty($modSettings['minWordLen']) && (!empty($modSettings['minAdminLen'])))

        {

        $Temp = trim(preg_replace('~[^a-z0-9 ]~si', '', $_POST['message']));

        $Temp = preg_replace('~(( )+)~si', ' ', $Temp);

        $WordArr = explode(' ', $Temp);

        if ((count($WordArr) < (int)$modSettings['minWordLen']) && (!$context['user']['is_admin']))

        $post_errors[] = 'minWordLen';

        }

        elseif (!empty($modSettings['minWordLen']) && (empty($modSettings['minAdminLen'])))

         {

        $Temp = trim(preg_replace('~[^a-z0-9 ]~si', '', $_POST['message']));

        $Temp = preg_replace('~(( )+)~si', ' ', $Temp);

        $WordArr = explode(' ', $Temp);

        if (count($WordArr) < (int)$modSettings['minWordLen'])

        $post_errors[] = 'minWordLen';

        }   



        if (!empty($modSettings['minChar']) && (!empty($modSettings['minAdminLen'])))

        {

        if (($smcFunc['strlen']($_POST['message']) < (int)$modSettings['minChar']) && (!$context['user']['is_admin']))

           $post_errors[] = 'minChar';

}

        elseif (!empty($modSettings['minChar']) && (empty($modSettings['minAdminLen'])))

        {

        if (($smcFunc['strlen']($_POST['message']) < (int)$modSettings['minChar']))

           $post_errors[] = 'minChar';



 

// Check the subject and message.

if (!isset($_POST['subject']) || $smcFunc['htmltrim']($smcFunc['htmlspecialchars']($_POST['subject'])) === '')

$post_errors[] = 'no_subject';

if (!isset($_POST['message']) || $smcFunc['htmltrim']($smcFunc['htmlspecialchars']($_POST['message']), ENT_QUOTES) === '')

$post_errors[] = 'no_message';

elseif (!empty($modSettings['max_messageLength']) && $smcFunc['strlen']($_POST['message']) > $modSettings['max_messageLength'])

$post_errors[] = 'long_message';]]></add>

</operation>

</file>

</modification>

My blog: http://www.shakaran.net
Quijost: professional & reliable webhosting (with SMF support) http://www.quijost.com
Tivion: a player for streaming TV and Radio channels http://www.shakaran.net/blog/tivion
Spanish RPG game: http://www.apogeus.es & http://www.apogeus.es/ao

Offline Nibogo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,433
  • Gender: Male
    • smfpacks on Facebook
    • @smfpacks on Twitter
    • SMFPacks
Re: Justify BBCode
« Reply #26 on: August 26, 2009, 03:33:01 PM »
This isn't the topic for that mod and thanks

Offline shakaran

  • Semi-Newbie
  • *
  • Posts: 57
  • Gender: Male
    • .::ApogeusOne::.
Re: Justify BBCode
« Reply #27 on: August 26, 2009, 07:13:53 PM »
Oh sorry NIBOGO! But the link on http://custom.simplemachines.org/mods/index.php?mod=1528 with the text "support topic" just link here. Maybe you should check it.

Regards
My blog: http://www.shakaran.net
Quijost: professional & reliable webhosting (with SMF support) http://www.quijost.com
Tivion: a player for streaming TV and Radio channels http://www.shakaran.net/blog/tivion
Spanish RPG game: http://www.apogeus.es & http://www.apogeus.es/ao

Offline wladymeer

  • Jr. Member
  • **
  • Posts: 142
  • Gender: Male
Re: Justify BBCode
« Reply #28 on: August 29, 2009, 06:40:12 AM »
Is it somehow possible to make all posts justified even before they start typing anything?

In other words, which files I should edit to make posts auto-justified? :)

Offline Nibogo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,433
  • Gender: Male
    • smfpacks on Facebook
    • @smfpacks on Twitter
    • SMFPacks
Re: Justify BBCode
« Reply #29 on: August 29, 2009, 11:25:43 AM »
Is it somehow possible to make all posts justified even before they start typing anything?

In other words, which files I should edit to make posts auto-justified? :)

Display.template.php or Display.php

Offline JailsonBR

  • Jr. Member
  • **
  • Posts: 157
  • Gender: Male
    • Informatizando
Re: Justify BBCode
« Reply #30 on: December 11, 2009, 05:32:23 AM »
upgrade for SMF 2.0 RC2 please  :'(
o Sistema do meu Forum é: SMF 2.0.1


Offline Yahmez

  • Sr. Member
  • ****
  • Posts: 788
  • -_-
Re: Justify BBCode
« Reply #31 on: December 22, 2009, 08:37:36 PM »
upgrade for SMF 2.0 RC2 please  :'(

Unzip the package, and edit two files

1) smf-2.x.xml

Find:
Code: [Select]
<file name="$sourcedir/Subs-Editor.php">
    <operation>
        <search position="after"><![CDATA['left' => array('code' => 'left', 'before' => '[left]', 'after' => '[/left]', 'description' => $txt['left_align']),]]></search>
        <add><![CDATA[
            'justify' => array('code' => 'justify', 'before' => '[justify]', 'after' => '[/justify]', 'description' => $txt['justify']),
]]></add>
    </operation>
</file>

Replace with:
Code: [Select]
    <file name="$sourcedir/Subs-Editor.php">
        <operation>
            <search position="after"><![CDATA[            array(
                'image' => 'left',
                'code' => 'left',
                'before' => '[left]',
                'after' => '[/left]',
                'description' => $txt['left_align']
            ),]]></search>
            <add><![CDATA[            array(
                'image' => 'justify',
                'code' => 'justify',
                'before' => '[justify]',
                'after' => '[/justify]',
                'description' => $txt['justify']
            ),]]></add>
        </operation>
       </file>

2) package-info.xml

Find:
Code: [Select]
<install for="2.0 - 2.0.99">
Replace with:
Code: [Select]
<install for="2.0 RC2">
Find:
Code: [Select]
<uninstall for="2.0 - 2.0.99">
Replace with:
Code: [Select]
<uninstall for="2.0 RC2">
Re zip the files and it works for 2.0 RC2  :)

Offline Nibogo

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,433
  • Gender: Male
    • smfpacks on Facebook
    • @smfpacks on Twitter
    • SMFPacks
Re: Justify BBCode
« Reply #32 on: December 29, 2009, 01:25:15 PM »
The Yahmez code works but anyway I'll update the package as soon as I have some time

Offline mirahalo

  • SMF Hero
  • ******
  • Posts: 7,705
Re: Justify BBCode
« Reply #33 on: January 21, 2010, 04:49:15 PM »
this mod has been officially taken by me, here's the change log:

Change logs:

2.3 - 21 January 2010
o  Take over by 130860
o Added support for SMF 2.0RC2 and 1.1.11
o Added the following languages:
-Dutch
-Hungarian
-Brazilian/utf8
-Portuguese/utf8


2.2 - 08 October 2009
o Added support for SMF 1.1.10

2.1.2 - 12 Febraury 2008
o Added support for SMF 2.0 RC1 and above versions
o Added a new readme layout :P

2.1 - 08 October 2008
o Added support for SMF 2.0 BETA 4 & SMF 1.1.6
o Fixed a readme text error

2.0 - 16 July 2008
o Added support for SMF 2.0

1.1 - 15 April 2008
o French and spanish translations
o Added an instructions page for manual edit
o NIBOGO take the mod , originally developed by karlbenson

1.0 - 3rd October 2007
o Initial Release per request

Offline Bugo

  • Customizer
  • SMF Hero
  • *
  • Posts: 1,418
  • Gender: Male
    • @dragomano on Twitter
    • Review of SMF mods + translation for these mods
Re: Justify BBCode
« Reply #34 on: January 22, 2010, 12:33:01 PM »
Russian translation:

Code: [Select]
// Justify BBCode
$txt['justify'] = 'По ширине';

Offline mirahalo

  • SMF Hero
  • ******
  • Posts: 7,705
Re: Justify BBCode
« Reply #35 on: January 22, 2010, 01:01:21 PM »
thanks I will add it as soon as I can, does it work with russian-utf8 too?

Offline Bugo

  • Customizer
  • SMF Hero
  • *
  • Posts: 1,418
  • Gender: Male
    • @dragomano on Twitter
    • Review of SMF mods + translation for these mods
Re: Justify BBCode
« Reply #36 on: January 22, 2010, 02:00:29 PM »
Of course but you need to make 2 files to install - one in utf8 without BOM (e.z. russian-utf8.xml), another in windows 1251 (simple russian.xml)

Offline mirahalo

  • SMF Hero
  • ******
  • Posts: 7,705
Re: Justify BBCode
« Reply #37 on: January 22, 2010, 08:21:04 PM »
ok, cool, I'll add it as soon as possible, thanks.

Offline 3wasef

  • Semi-Newbie
  • *
  • Posts: 11
  • Gender: Male
    • 3wasef
Re: Justify BBCode
« Reply #38 on: January 28, 2010, 09:31:41 AM »
Translation to Arabic

Code: [Select]
$txt['justify'] = 'تنسيق';
Attachment file included  :D

Offline mirahalo

  • SMF Hero
  • ******
  • Posts: 7,705
Re: Justify BBCode
« Reply #39 on: January 28, 2010, 10:05:08 AM »
many thanks!   I will add it as son as I can ;)