News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Justify BBCode

Started by Nibogo, April 16, 2008, 11:33:23 PM

Previous topic - Next topic

Grimedth


Hi :)

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


LiBen

Translation to Dutch:

$txt['justify'] = 'Uitvullen';


IvoLeite

Translation to Portuguese:
$txt['justify'] = 'Justificar';


shakaran

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.

<?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


shakaran

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

wladymeer

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? :)


JailsonBR

upgrade for SMF 2.0 RC2 please  :'(
o Sistema do meu Forum é: SMF 2.0.1


Yahmez

Quote from: JailsonBR on December 11, 2009, 05:32:23 AM
upgrade for SMF 2.0 RC2 please  :'(

Unzip the package, and edit two files

1) smf-2.x.xml

Find:
<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:
    <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:
<install for="2.0 - 2.0.99">

Replace with:
<install for="2.0 RC2">

Find:
<uninstall for="2.0 - 2.0.99">

Replace with:
<uninstall for="2.0 RC2">

Re zip the files and it works for 2.0 RC2  :)


mirahalo

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

Bugo

Russian translation:

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

mirahalo

thanks I will add it as soon as I can, does it work with russian-utf8 too?

Bugo

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)

mirahalo

ok, cool, I'll add it as soon as possible, thanks.

3wasef

Translation to Arabic


$txt['justify'] = 'تنسيق';

Attachment file included  :D

mirahalo

many thanks!   I will add it as son as I can ;)

Advertisement: