Changeset 9965


Ignore:
Timestamp:
Apr 1, 2011, 10:54:39 PM (13 years ago)
Author:
mistic100
Message:

[extentions] BBCode Bar

  • uses markItUp!
Location:
extensions/bbcode_bar
Files:
22 added
3 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • extensions/bbcode_bar/admin.php

    r9787 r9965  
    44global $conf, $template;
    55load_language('plugin.lang', BBcode_PATH);
    6 $conf_bbcode_bar = explode("," , $conf['bbcode_bar']);
     6
     7// Met à jour la configuration si necessaire
     8if (strpos($conf['bbcode_bar'],',') !== false)
     9{
     10        include(BBcode_PATH .'maintain.inc.php');
     11        plugin_activate();
     12}
     13
     14$conf_bbcode_bar = unserialize($conf['bbcode_bar']);
    715
    816// Enregistrement de la configuration
     
    1119        // nouveau tableau de config
    1220        unset($conf_bbcode_bar);
    13         for ($i=0; $i<=15; $i++) {
    14                 $conf_bbcode_bar[] = (isset($_POST['chkb'.sprintf("%02d", $i)])) ? $_POST['chkb'.sprintf("%02d", $i)] : 0;
     21        foreach(unserialize(BBcode_codes) as $key) {
     22                $conf_bbcode_bar[$key] = (isset($_POST[$key])) ? true : false;
    1523        }
    16         $conf_bbcode_bar[] = (isset($_POST['text17'])) ? rtrim($_POST['text17'],'/') : 'plugins/bbcode_bar/icon';
    1724       
    1825        // enregistrement
    19     $new_value_bbcode_bar = implode ("," , $conf_bbcode_bar);
    20     $query = 'UPDATE ' . CONFIG_TABLE . '
    21                 SET value="' . $new_value_bbcode_bar . '"
    22                 WHERE param="bbcode_bar"';
     26    $query = "UPDATE " . CONFIG_TABLE . "
     27                SET value='" . serialize($conf_bbcode_bar) . "'
     28                WHERE param='bbcode_bar'";
    2329    pwg_query($query);
    2430    array_push($page['infos'], l10n('Information data registered in database'));
     
    2632
    2733// Parametrage du template
    28 for ($i=0; $i<=15; $i++) {
    29         $template->assign('CHKB'.sprintf("%02d", $i).'_STATUS', ($conf_bbcode_bar[$i] == 1) ? 'checked="checked"' : null);
     34foreach(unserialize(BBcode_codes) as $key) {
     35        $template->assign(strtoupper($key).'_STATUS', ($conf_bbcode_bar[$key] == 1) ? 'checked="checked"' : null);
    3036}
    31 $template->assign('TEXT17_STATUS', $conf_bbcode_bar[16]);
    3237
    3338$template->assign('BBCODE_PATH', BBcode_PATH);
  • extensions/bbcode_bar/bbcode_bar.inc.php

    r9787 r9965  
    66        global $template, $conf, $lang, $user, $pwg_loaded_plugins, $page;
    77        load_language('plugin.lang', dirname(__FILE__) . '/');
    8         $conf_bbcode_bar = explode("," , $conf['bbcode_bar']);
     8        $conf_bbcode_bar = unserialize($conf['bbcode_bar']);
    99
    1010        // buttons
    11         for ($i=0; $i<=15; $i++) {
    12                 if ($conf_bbcode_bar[$i] == 1) $template->assign('BBCode_bar_button_'.sprintf("%02d", $i), true);
    13         }
    14         $template->assign('repicon', $conf_bbcode_bar[16]);
     11        foreach(unserialize(BBcode_codes) as $key) {
     12                if ($conf_bbcode_bar[$key]) $template->assign('BBC_'.$key, true);
     13        }
    1514       
    1615        // edit field has different id
    17         if (
    18                 (isset($_GET['action']) AND $_GET['action'] == 'edit_comment')
    19                 OR (isset($page['body_id']) AND $page['body_id'] == 'theCommentsPage')
    20         ) {
    21                 $template->assign('form_name', 'editComment');
    22         } else {
    23                 $template->assign('form_name', 'addComment');
    24         }
    25 
    26         // smilies support
    27         if (isset($pwg_loaded_plugins['SmiliesSupport'])) {
    28                 $template->assign('BBCode_bar_SmiliesSupport', array('SMILIESSUPPORT_PAGE' => SmiliesTable()));
    29         }
     16        // if (
     17                // (isset($_GET['action']) AND $_GET['action'] == 'edit_comment')
     18                // OR (isset($page['body_id']) AND $page['body_id'] == 'theCommentsPage')
     19        // ) {
     20                // $template->assign('form_name', 'editComment');
     21        // } else {
     22                // $template->assign('form_name', 'addComment');
     23        // }
     24        $template->assign('form_name', 'addComment');
    3025
    3126        $template->assign('BBCODE_PATH', BBcode_PATH);
    3227        $template->set_filename('bbcode_bar', dirname(__FILE__).'/template/bbcode_bar.tpl');
    33         $lang['Comment'] .= $template->parse('bbcode_bar', true);                       
     28        $template->parse('bbcode_bar', true);           
     29
     30        // smilies support ## must be parsed avec bbcode_bar, because the javascript must be after bbc's one
     31        if (isset($pwg_loaded_plugins['SmiliesSupport']))
     32        {
     33                set_smiliessupport();
     34        }       
    3435}
    3536
     
    3839function CheckTags($str)
    3940{
    40         //array of known tags
    41         $known = array('p','b','i','u','s','center','right','ol','ul','li','quote', 'img','url','email','color', 'size');
    4241        //storage stack
    4342        $tags = array();
     
    5352                        $tag = substr($tag, 0, $equal_pos);
    5453                        //check whether we have a defined tag or not.
    55                         if (in_array(strtolower($tag),$known) || in_array(strtolower(substr($tag,1)),$known))
     54                        if (in_array(strtolower($tag),unserialize(BBcode_codes)) || in_array(strtolower(substr($tag,1)),unserialize(BBcode_codes)))
    5655                        {
    5756                                //closing tag
     
    9493        global $conf;
    9594
    96         $conf_bbcode_bar = explode("," , $conf['bbcode_bar']);
     95        $conf_bbcode_bar = unserialize($conf['bbcode_bar']);
    9796        $str = CheckTags(nl2br($str));
    9897
     
    10099        $replacements = array();
    101100
    102         if ( $conf_bbcode_bar[0] == 1 )
     101        if ($conf_bbcode_bar['p'])
    103102        {
    104103                //Paragraph
     
    106105                $replacements[] = '<p>\\1</p>';
    107106        }
    108         if ( $conf_bbcode_bar[1] == 1 )
     107        if ($conf_bbcode_bar['b'])
    109108        {
    110109                // Bold
    111110                $patterns[] = '#\[b\](.*?)\[/b\]#is';
    112                 $replacements[] = '<strong>\\1</strong>';
    113         }
    114         if ( $conf_bbcode_bar[2] == 1 )
     111                $replacements[] = '<b>\\1</b>';
     112        }
     113        if ($conf_bbcode_bar['i'])
    115114        {
    116115                //Italic
    117116                $patterns[] = '#\[i\](.*?)\[/i\]#is';
    118                 $replacements[] = '<em>\\1</em>';
    119         }
    120         if ( $conf_bbcode_bar[3] == 1 )
     117                $replacements[] = '<i>\\1</i>';
     118        }
     119        if ($conf_bbcode_bar['u'])
    121120        {
    122121                //Underline     
     
    124123                $replacements[] = '<u>\\1</u>';
    125124        }
    126         if ( $conf_bbcode_bar[4] == 1 )
     125        if ($conf_bbcode_bar['s'])
    127126        {
    128127                //Strikethrough
    129128                $patterns[] = '#\[s\](.*?)\[/s\]#is';
    130                 $replacements[] = '<del>\\1</del>';
    131         }
    132         if ( $conf_bbcode_bar[5] == 1 )
     129                $replacements[] = '<s>\\1</s>';
     130        }
     131        if ($conf_bbcode_bar['center'])
    133132        {
    134133                //Center
     
    136135                $replacements[] = '<div align="center"><p>\\1</p></div>';
    137136        }
    138         if ( $conf_bbcode_bar[6] == 1 )
     137        if ($conf_bbcode_bar['right'])
    139138        {
    140139                //Right
     
    142141                $replacements[] = '<div align="right"><p>\\1</p></div>';
    143142        }
    144         if ( $conf_bbcode_bar[7] == 1 )
     143        if ($conf_bbcode_bar['ol'])
    145144        {
    146145                //Olist
     
    148147                $replacements[] = '<ol>\\1</ol>';
    149148        }
    150         if ( $conf_bbcode_bar[8] == 1 )
     149        if ($conf_bbcode_bar['ul'])
    151150        {
    152151                //Ulist
     
    154153                $replacements[] = '<ul>\\1</ul>';
    155154        }
    156         if (( $conf_bbcode_bar[7] == 1 ) || ( $conf_bbcode_bar[8] == 1 ))
     155        if ($conf_bbcode_bar['ol'] || $conf_bbcode_bar['ul'])
    157156        {
    158157                //List
     
    160159                $replacements[] = '<li>\\1</li>';
    161160        }
    162         if ( $conf_bbcode_bar[9] == 1 )
     161        if ($conf_bbcode_bar['quote'])
    163162        {
    164163                // Quotes
    165164                $patterns[] = "#\[quote\](.*?)\[/quote\]#is";
    166                 $replacements[] = '<blockquote><span style="font-size: 11px; line-height: normal">\\1</span></blockquote>';
     165                $replacements[] = '<blockquote><span style="font-size:11px;line-height:normal">\\1</span></blockquote>';
    167166
    168167                //Quotes with "user"
    169168                $patterns[] = "#\[quote=&quot;(.*?)&quot;\](.*?)\[/quote\]#is";
    170                 $replacements[] = '<blockquote><span style="font-size: 11px; line-height: normal"><b>\\1 : </b><br/>\\2</span></blockquote>';
     169                $replacements[] = '<blockquote><span style="font-size:11px;line-height:normal"><b>\\1 : </b><br/>\\2</span></blockquote>';
    171170
    172171                //Quotes with user
    173172                $patterns[] = "#\[quote=(.*?)\](.*?)\[/quote\]#is";
    174                 $replacements[] = '<blockquote><span style="font-size: 11px; line-height: normal"><b>\\1 : </b><br/>\\2</span></blockquote>';
    175         }
    176         if ( $conf_bbcode_bar[10] == 1 )
     173                $replacements[] = '<blockquote><span style="font-size:11px;line-height:normal"><b>\\1 : </b><br/>\\2</span></blockquote>';
     174        }
     175        if ($conf_bbcode_bar['img'])
    177176        {
    178177                //Images
     
    180179                $replacements[] = '<img src="\\1" />';
    181180        }
    182         if ( $conf_bbcode_bar[11] == 1 )
     181        if ($conf_bbcode_bar['url'])
    183182        {
    184183                //[url]xxxx://www.zzzz.yyy[/url]
     
    194193                $replacements[] = '<a href="\\1" target="_blank">\\2</a>';
    195194
    196                 // [url=www.zzzzz.yyy]zZzZz[/url]
     195                //[url=www.zzzzz.yyy]zZzZz[/url]
    197196                $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\](.*?)\[/url\]#is";
    198197                $replacements[] = '<a href="http://\\1" target="_blank">\\2</a>';
    199198
    200                 // [url="www.zzzzz.yyy"]zZzZz[/url]
     199                //[url="www.zzzzz.yyy"]zZzZz[/url]
    201200                $patterns[] = "#\[url=&quot;((www|ftp)\.[^ \n\r\t<]*?)&quot;\](.*?)\[/url\]#is";
    202201                $replacements[] = '<a href="http://\\1" target="_blank">\\3</a>';
     
    206205                $replacements[] = '<a href="\\1" target="_blank">\\2</a>';
    207206        }
    208         if ( $conf_bbcode_bar[12] == 1 )
     207        if ($conf_bbcode_bar['email'])
    209208        {
    210209                //[email]samvure@gmail.com[/email]
     
    212211                $replacements[] = '<a href="mailto:\\1">\\1</a>';
    213212        }
    214         if ( $conf_bbcode_bar[13] == 1 )
     213        if ($conf_bbcode_bar['size'])
    215214        {
    216215                //Size
     
    218217                $replacements[] = '<span style="font-size: \\1px; line-height: normal">\\2</span>';
    219218        }
    220         if ( $conf_bbcode_bar[14] == 1 )
     219        if ($conf_bbcode_bar['color'])
    221220        {
    222221                //Colours
  • extensions/bbcode_bar/language/cs_CZ/plugin.lang.php

    r9682 r9965  
    1111        $lang['ul_help']                = "Jednoduchý seznam : [ul][li]element[/li][/ul]";
    1212        $lang['ol_help']                = "Číslovaný seznam: [ol][li]element[/li][/ol]";
     13        $lang['li_help']                = "List element : [li]element[/li]";
    1314       
    1415        $lang['quote_help']     = "Citace : [quote]citát[/quote]";
     
    2425        $lang['huge']                   = "Obří";       
    2526       
    26         $lang['fc_help']                = "Barva písma : [color=color]text[/color]";
    27         $lang['default_help']   = "Defaultní";
    28         $lang['maroon_help']    = "Tmavě červená";             
     27        $lang['color_help']             = "Barva písma : [color=color]text[/color]";   
    2928        $lang['red_help']               = "Červená";                   
    3029        $lang['orange_help']    = "Oranžová";           
    31         $lang['brown_help']     = "Hnědá";
    3230        $lang['yellow_help']    = "Žlutá";             
    3331        $lang['green_help']     = "Zelená";     
    34         $lang['olive_help']     = "Olivová";           
    35         $lang['cyan_help']              = "Azurová";
    3632        $lang['blue_help']              = "Modrá";     
    37         $lang['darkblue_help']  = "Tmavá modrá";
    38         $lang['indigo_help']    = "Indigo";
    39         $lang['violet_help']    = "Fialková";
     33        $lang['purple_help']    = "Fialková";
    4034        $lang['white_help']     = "Bílá";
     35        $lang['grey_help']              = "Grey";
    4136        $lang['black_help']     = "Černá";
    42        
    43         $lang['help']                   = "Nejjednodušeji: formátování může být aplikováno jen na označený text.";
    44        
    45         $lang['repicon']                = "Složka ikon.";
    4637
    4738?>
  • extensions/bbcode_bar/language/de_DE/plugin.lang.php

    r9682 r9965  
    1111        $lang['ul_help']                = "Un-nummerierte Liste : [ul][li]Element[/li][/ul]";
    1212        $lang['ol_help']                = "Nummerierte Liste : [ol][li]Element[/li][/ol]";
     13        $lang['li_help']                = "List element : [li]element[/li]";
    1314       
    1415        $lang['quote_help']     = "Zitat : [quote]Zitat[/quote]";
     
    2425        $lang['huge']                   = "Riesig";     
    2526       
    26         $lang['fc_help']                = "Textfarbe : [color=farbe]Text[/color]";
    27         $lang['default_help']   = "Standard";
    28         $lang['maroon_help']    = "Dunkelrot";         
     27        $lang['color_help']             = "Textfarbe : [color=farbe]Text[/color]";     
    2928        $lang['red_help']               = "Rot";                       
    3029        $lang['orange_help']    = "Orange";             
    31         $lang['brown_help']     = "Braun";
    3230        $lang['yellow_help']    = "Gelb";               
    3331        $lang['green_help']     = "Grün";       
    34         $lang['olive_help']     = "Olive";             
    35         $lang['cyan_help']              = "Cyan";
    3632        $lang['blue_help']              = "Blau";       
    37         $lang['darkblue_help']  = "Dunkelblau";
    38         $lang['indigo_help']    = "Indigo";
    39         $lang['violet_help']    = "Violett";
     33        $lang['purple_help']    = "Violett";
    4034        $lang['white_help']     = "Weiß";
     35        $lang['grey_help']              = "Grey";
    4136        $lang['black_help']     = "Schwarz";
    42                
    43         $lang['help']                   = "Ein Kniff: Das Format kann dem ausgewählten Text zugewiesen werden.";
    44        
    45         $lang['repicon']                = "Iconverzeichnis.";
    4637
    4738?>
  • extensions/bbcode_bar/language/en_UK/plugin.lang.php

    r9682 r9965  
    55        $lang['i_help']                 = "Italic : [i]italic[/i]";
    66        $lang['u_help']                 = "Underline : [u]underline[/u]";       
    7         $lang['s_help']                 = "Striped  : [s]striped [/s]";
     7        $lang['s_help']                 = "Striped  : [s]striped[/s]";
    88       
    99        $lang['center_help']    = "Center : [center]center[/center]";
    1010        $lang['right_help']     = "Right : [right]right[/right]";
    11         $lang['ul_help']                = "Unordered List : [ul][li]element[/li][/ul]";
    12         $lang['ol_help']                = "Ordered List : [ol][li]element[/li][/ol]";
     11        $lang['ul_help']                = "Unordered list : [ul][li]element[/li][/ul]";
     12        $lang['ol_help']                = "Ordered list : [ol][li]element[/li][/ol]";
     13        $lang['li_help']                = "List element : [li]element[/li]";
    1314       
    1415        $lang['quote_help']     = "Quote : [quote]quote[/quote]";
    15         $lang['img_help']               = "Img : [img]img[/img]";
     16        $lang['img_help']               = "Picture : [img]picture[/img]";
    1617        $lang['url_help']               = "URL : [url=URL]Title[/url]";
    1718        $lang['mail_help']              = "E-mail : [email]Email[/email]";     
     
    2425        $lang['huge']                   = "Huge";       
    2526       
    26         $lang['fc_help']                = "Font color : [color=color]text[/color]";
    27         $lang['default_help']   = "Default";
    28         $lang['maroon_help']    = "Maroon";             
     27        $lang['color_help']     = "Font color : [color=color]text[/color]";
    2928        $lang['red_help']               = "Red";                       
    3029        $lang['orange_help']    = "Orange";             
    31         $lang['brown_help']     = "Brown";
    3230        $lang['yellow_help']    = "Yellow";             
    3331        $lang['green_help']     = "Green";     
    34         $lang['olive_help']     = "Olive";             
    35         $lang['cyan_help']              = "Cyan";
    3632        $lang['blue_help']              = "Blue";       
    37         $lang['darkblue_help']  = "Dark Blue";
    38         $lang['indigo_help']    = "Indigo";
    39         $lang['violet_help']    = "Violet";
     33        $lang['purple_help']    = "Purple";
    4034        $lang['white_help']     = "White";
     35        $lang['grey_help']              = "Grey";
    4136        $lang['black_help']     = "Black";
    42        
    43         $lang['help']                   = "Easy way: A formatting can be applied to the selected text.";
    44        
    45         $lang['repicon']                = "Icons directory.";
    4637
    4738?>
  • extensions/bbcode_bar/language/es_ES/plugin.lang.php

    r9682 r9965  
    1111        $lang['ul_help']      = "Lista : [ul][li]elemento[/li][/ul]";
    1212        $lang['ol_help']      = "Lista Numerada : [ol][li]elemento[/li][/ol]";
     13        $lang['li_help']          = "List element : [li]element[/li]";
    1314
    1415        $lang['quote_help']   = "Citada : [quote]Citación[/quote]";
     
    2425        $lang['huge']         = "Muy grande";
    2526
    26         $lang['fc_help']      = "Color de los carácteres  : [color=color]texto[/color]";
    27         $lang['default_help'] = "Defecto";
    28         $lang['maroon_help']  = "Rojo oscuro";
     27        $lang['color_help']      = "Color de los carácteres  : [color=color]texto[/color]";
    2928        $lang['red_help']     = "Rojo";
    3029        $lang['orange_help']  = "Naranja";
    31         $lang['brown_help']   = "Castaño";
    3230        $lang['yellow_help']  = "amarillo";
    3331        $lang['green_help']   = "Verde";
    34         $lang['olive_help']   = "Aceituna";
    35         $lang['cyan_help']    = "Cian";
    3632        $lang['blue_help']    = "Azul";
    37         $lang['darkblue_help']= "Azul oscuro";
    38         $lang['indigo_help']  = "Índigo";
    39         $lang['violet_help']  = "Morado";
     33        $lang['purple_help']  = "Morado";
    4034        $lang['white_help']   = "Blanco";
     35        $lang['grey_help']        = "Grey";
    4136        $lang['black_help']   = "Negro";
    4237
    43         $lang['help']         = "Astucia: un formato puede ser aplicado sobre el texto seleccionado.";
    44 
    45         $lang['repicon']      = "Repertorio de los iconos.";
    46 
    4738?>
  • extensions/bbcode_bar/language/fr_FR/plugin.lang.php

    r9682 r9965  
    1111        $lang['ul_help']                = "Liste : [ul][li]élément[/li][/ul]";
    1212        $lang['ol_help']                = "Liste Numéroté : [ol][li]élément[/li][/ol]";
     13        $lang['li_help']                = "Element de liste : [li]élément[/li]";
    1314       
    1415        $lang['quote_help']     = "Citation : [quote]Citation[/quote]";
     
    2425        $lang['huge']                   = "Très grand";
    2526       
    26         $lang['fc_help']                = "Couleur des caractères  : [color=couleur]texte[/color]";
    27         $lang['default_help']   = "Défaut";
    28         $lang['maroon_help']    = "Rouge foncé";               
     27        $lang['color_help']     = "Couleur : [color=couleur]texte[/color]";     
    2928        $lang['red_help']               = "Rouge";                     
    3029        $lang['orange_help']    = "Orange";             
    31         $lang['brown_help']     = "Marron";
    3230        $lang['yellow_help']    = "Jaune";             
    3331        $lang['green_help']     = "Vert";       
    34         $lang['olive_help']     = "Olive";             
    35         $lang['cyan_help']              = "Cyan";
    3632        $lang['blue_help']              = "Bleu";       
    37         $lang['darkblue_help']  = "Bleu Foncé";
    38         $lang['indigo_help']    = "Indigo";
    39         $lang['violet_help']    = "Violet";
     33        $lang['purple_help']    = "Violet";
    4034        $lang['white_help']     = "Blanc";
     35        $lang['grey_help']              = "Gris";
    4136        $lang['black_help']     = "Noir";
    42                
    43         $lang['help']                   = "Astuce : Une mise en forme peut être appliquée au texte sélectionné.";
    44        
    45         $lang['repicon']                = "Répertoire des icônes.";
    4637 
    4738?>
  • extensions/bbcode_bar/language/hu_HU/plugin.lang.php

    r9682 r9965  
    1111        $lang['ul_help']                = "Számozatlan lista : [ul][li]elem[/li][/ul]";
    1212        $lang['ol_help']                = "Számozott lista : [ol][li]elem[/li][/ol]";
     13        $lang['li_help']                = "List element : [li]element[/li]";
    1314       
    1415        $lang['quote_help']     = "Idézet : [quote]idézett szöveg[/quote]";
     
    2425        $lang['huge']                   = "Nagy";       
    2526       
    26         $lang['fc_help']                = "Betűszín : [color=szín]betű színe[/color]";
    27         $lang['default_help']   = "Alapértelmezett";
    28         $lang['maroon_help']    = "Gesztenyebarna";             
     27        $lang['color_help']     = "Betűszín : [color=szín]betű színe[/color]"; 
    2928        $lang['red_help']               = "Piros";                     
    3029        $lang['orange_help']    = "Narancssárga";               
    31         $lang['brown_help']     = "Barna";
    3230        $lang['yellow_help']    = "Sárga";             
    3331        $lang['green_help']     = "Zöld";       
    34         $lang['olive_help']     = "Olajzöld";           
    35         $lang['cyan_help']              = "Ciánkék";
    3632        $lang['blue_help']              = "Kék";       
    37         $lang['darkblue_help']  = "Sötétkék";
    38         $lang['indigo_help']    = "Indigó";
    39         $lang['violet_help']    = "Ibolya";
     33        $lang['purple_help']    = "Ibolya";
    4034        $lang['white_help']     = "Fehér";
     35        $lang['grey_help']              = "Grey";
    4136        $lang['black_help']     = "Fekete";
    42                
    43         $lang['help']                   = "Automatikus használat: A kód a kijelölt szövegre alkalmazható.";
    44        
    45         $lang['repicon']                = "Ikon könyvtár.";
    4637 
    4738?>
  • extensions/bbcode_bar/language/it_IT/plugin.lang.php

    r9682 r9965  
    1111        $lang['ul_help']                = "Elenco : [ul][li]elemento[/li][/ul]";
    1212        $lang['ol_help']                = "Elenco Numerica : [ol][li]elemento[/li][/ol]";
     13        $lang['li_help']                = "List element : [li]element[/li]";
    1314       
    1415        $lang['quote_help']     = "Citazione : [quote]citazione[/quote]";
     
    2425        $lang['huge']                   = "Grandissimo";       
    2526       
    26         $lang['fc_help']                = "Colore del testo  : [color=couleur]testo[/color]";
    27         $lang['default_help']   = "Default";
    28         $lang['maroon_help']    = "Rosso scuro";               
     27        $lang['color_help']             = "Colore del testo  : [color=couleur]testo[/color]";   
    2928        $lang['red_help']               = "Rosso";                     
    3029        $lang['orange_help']    = "Arancione";         
    31         $lang['brown_help']     = "Marrone";
    3230        $lang['yellow_help']    = "Giallo";             
    3331        $lang['green_help']     = "Verde";     
    34         $lang['olive_help']     = "Oliva";             
    35         $lang['cyan_help']              = "Ciano";
    3632        $lang['blue_help']              = "Blu";       
    37         $lang['darkblue_help']  = "Blu Scuro";
    38         $lang['indigo_help']    = "Indaco";
    39         $lang['violet_help']    = "Viola";
     33        $lang['purple_help']    = "Viola";
    4034        $lang['white_help']     = "Bianco";
     35        $lang['grey_help']              = "Grey";
    4136        $lang['black_help']     = "Nero";
    42        
    43         $lang['help']                   = "Trucco : Un formattaggio può essere applicato ad un testo selezionato.";
    44        
    45         $lang['repicon']                = "Directory delle icone";
    4637
    4738?>
  • extensions/bbcode_bar/language/lv_LV/plugin.lang.php

    r9682 r9965  
    1111        $lang['ul_help']         = "Nesakārtots saraksts : [ul][li]element[/li][/ul]";
    1212        $lang['ol_help']         = "Sakārtots Saraksts : [ol][li]element[/li][/ol]";
     13        $lang['li_help']                = "List element : [li]element[/li]";
    1314
    1415        $lang['quote_help']     = "Pēdiņas : [quote]quote[/quote]";
     
    2425        $lang['huge']         = "Milzīgs";
    2526
    26         $lang['fc_help']     = "Fonta krāsa : [color=color]text[/color]";
    27         $lang['default_help']    = "Pēc noklusējuma";
    28         $lang['maroon_help']     = "Kastaņbrūna";
     27        $lang['color_help']     = "Fonta krāsa : [color=color]text[/color]";
    2928        $lang['red_help']         = "Sarkana";
    3029        $lang['orange_help']     = "Oranža";
    31         $lang['brown_help']     = "Brūna";
    3230        $lang['yellow_help']     = "Dzeltena";
    3331        $lang['green_help']     = "Zaļa";
    34         $lang['olive_help']     = "Olīva";
    35         $lang['cyan_help']         = "Ciāna";
    3632        $lang['blue_help']         = "Zila";
    37         $lang['darkblue_help']    = "Tumši Zila";
    38         $lang['indigo_help']     = "Indigo";
    39         $lang['violet_help']     = "Violēta";
     33        $lang['purple_help']     = "Violēta";
    4034        $lang['white_help']     = "Balta";
     35        $lang['grey_help']              = "Grey";
    4136        $lang['black_help']     = "Melna";
    4237
    43         $lang['help']            = "Pavisam viegli: Formatējumu iespējams pielietot tieši izvēlētajam tekstam.";
    44        
    45         $lang['repicon']        = "Ikonu mape.";
    46 
    4738?>
  • extensions/bbcode_bar/language/no_NO/plugin.lang.php

    r9682 r9965  
    1111        $lang['ul_help']         = "Uordnet Liste : [ul][li]element[/li][/ul]";
    1212        $lang['ol_help']         = "Ordnet Liste : [ol][li]element[/li][/ol]";
     13        $lang['li_help']                = "List element : [li]element[/li]";
    1314
    1415        $lang['quote_help']     = "Spørring : [quote]spørring[/quote]";
     
    2425        $lang['huge']         = "Mega";
    2526
    26         $lang['fc_help']     = "Font farge : [color=color]tekst[/color]";
    27         $lang['default_help']    = "Standard";
    28         $lang['maroon_help']     = "Maroon";
     27        $lang['color_help']     = "Font farge : [color=color]tekst[/color]";
    2928        $lang['red_help']         = "Rød";
    3029        $lang['orange_help']     = "Orange";
    31         $lang['brown_help']     = "Brun";
    3230        $lang['yellow_help']     = "Gul";
    3331        $lang['green_help']     = "Grønn";
    34         $lang['olive_help']     = "Oliven";
    35         $lang['cyan_help']         = "Cyan";
    3632        $lang['blue_help']         = "Blå";
    37         $lang['darkblue_help']    = "Mørk Blå";
    38         $lang['indigo_help']     = "Indigo";
    39         $lang['violet_help']     = "Fiolett";
     33        $lang['purple_help']     = "Fiolett";
    4034        $lang['white_help']     = "Vit";
     35        $lang['grey_help']              = "Grey";
    4136        $lang['black_help']     = "Svart";
    4237
    43         $lang['help']            = "Enkel måte: En formatering kan gjøres på den valgte teksten.";
    44 
    45         $lang['repicon']        = "Ikon mappe.";
    46 
    4738?>
  • extensions/bbcode_bar/language/ru_RU/plugin.lang.php

    r9682 r9965  
    1111        $lang['ul_help']                = "Список ненумерованный: [ul][li]элемент[/li][/ul]";
    1212        $lang['ol_help']                = "Список нумерованный: [ol][li]элемент[/li][/ol]";
     13        $lang['li_help']                = "List element : [li]element[/li]";
    1314       
    1415        $lang['quote_help']     = "Цитата: [quote]цитата[/quote]";
     
    2425        $lang['huge']                   = "Громадный"; 
    2526       
    26         $lang['fc_help']                = "Цвет шрифта : [color=color]текст[/color]";
    27         $lang['default_help']   = "По умолчанию";
    28         $lang['maroon_help']    = "Бордовый";           
     27        $lang['color_help']     = "Цвет шрифта : [color=color]текст[/color]";   
    2928        $lang['red_help']               = "Красный";                   
    3029        $lang['orange_help']    = "Оранжевый";         
    31         $lang['brown_help']     = "Коричневый";
    3230        $lang['yellow_help']    = "Желтый";             
    3331        $lang['green_help']     = "Зеленый";   
    34         $lang['olive_help']     = "Оливковый";         
    35         $lang['cyan_help']              = "Небесно голубой";
    3632        $lang['blue_help']              = "Голубой";   
    37         $lang['darkblue_help']  = "Синий";
    38         $lang['indigo_help']    = "Индиго";
    39         $lang['violet_help']    = "Фиолетовый";
     33        $lang['purple_help']    = "Фиолетовый";
    4034        $lang['white_help']     = "Белый";
     35        $lang['grey_help']              = "Grey";
    4136        $lang['black_help']     = "Черный";
    42        
    43         $lang['help']                   = "Легко: Форматирование может быть применено к выбранному тексту.";
    44        
    45         $lang['repicon']                = "Директория с иконками";
    4637 
    4738?>
  • extensions/bbcode_bar/language/sk_SK/plugin.lang.php

    r9682 r9965  
    1111        $lang['ul_help'] = "Nezoradený zoznam : [ul][li]element[/li][/ul]";
    1212        $lang['ol_help'] = "Zoradený zoznam : [ol][li]element[/li][/ol]";
     13        $lang['li_help'] = "List element : [li]element[/li]";
    1314               
    1415        $lang['quote_help'] = "Citácia : [quote]Citácia[/quote]";
     
    2425        $lang['huge'] = "Najväčšie";   
    2526               
    26         $lang['fc_help']        = "Farba písma : [color=couleur]text[/color]";
    27         $lang['default_help']    = "Predvolená";
    28         $lang['maroon_help']     = "Gaštanovo hnedá";       
     27        $lang['color_help']     = "Farba písma : [color=couleur]text[/color]";   
    2928        $lang['red_help']         = "Červená";           
    3029        $lang['orange_help']     = "Oranžová";         
    31         $lang['brown_help']     = "Hnedá";
    3230        $lang['yellow_help']     = "Žltá";         
    3331        $lang['green_help']      = "Zelená";     
    34         $lang['olive_help']             = "Olivová";         
    35         $lang['cyan_help']         = "Zelenomodrá";
    3632        $lang['blue_help']         = "Modrá";   
    37         $lang['darkblue_help']    = "Dark Blue";
    38         $lang['indigo_help']     = "InTmavomodrá";
    39         $lang['violet_help']      = "Fialová";
     33        $lang['purple_help']      = "Fialová";
    4034        $lang['white_help']      = "Biela";
     35        $lang['grey_help']              = "Grey";
    4136        $lang['black_help']       = "Čierna";
    42            
    43         $lang['help']            = "Ľahko: Formátovanie môže byť použité na označený text.";
    44            
    45         $lang['repicon']        = "Adresár ikon.";
    46 
     37       
    4738?>
  • extensions/bbcode_bar/main.inc.php

    r9765 r9965  
    1212define('BBcode_DIR' , basename(dirname(__FILE__)));
    1313define('BBcode_PATH' , PHPWG_PLUGINS_PATH . BBcode_DIR . '/');
     14define('BBcode_codes', serialize(array('b','i','u','s','p','center','right','quote','ul','ol','img','url','email','size','color')));
    1415
    1516include_once(BBcode_PATH.'bbcode_bar.inc.php');
     
    2526function add_bbcode_bar() {
    2627        global $page;
    27         if ($page['body_id'] == 'theCommentsPage' OR $page['body_id'] == 'thePicturePage') {
     28       
     29        if (isset($page['body_id']) AND $page['body_id'] == 'thePicturePage') {
    2830                set_bbcode_bar();
    2931        }
     
    4345}
    4446
     47
    4548?>
  • extensions/bbcode_bar/maintain.inc.php

    r9682 r9965  
    11<?php
    2 
    32if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    43
    54function plugin_install()
    65
    7         global $conf;
     6        global $conf, $default;
     7       
     8        $BBcode_default = array(
     9                'b' => true,
     10                'i' => true,
     11                'u' => true,
     12                's' => true,
     13                'p' => true,
     14                'center' => true,
     15                'right' => true,
     16                'quote' => true,
     17                'ul' => true,
     18                'ol' => true,
     19                'img' => true,
     20                'url' => true,
     21                'email' => true,
     22                'size' => true,
     23                'color' => true,
     24        );
    825
    926        if (!isset($conf['bbcode_bar']))
    1027        {
    11                 $q = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
    12                         VALUES ("bbcode_bar","1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,plugins/bbcode_bar/icon","Parametres BBCode_bar");';
     28                $q = "INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
     29                        VALUES ('bbcode_bar','" . serialize($BBcode_default) . "','Parametres BBCode Bar');";
     30                pwg_query($q);
     31        }
     32}
     33
     34function plugin_activate()
     35{
     36        global $conf;
     37       
     38        if (strpos($conf['bbcode_bar'],',') !== false)
     39        {
     40                $conf_bbcode_bar = explode(',', $conf['bbcode_bar']);
     41               
     42                $new_bbcode_bar =  array(
     43                        'b' => $conf_bbcode_bar[1] == '1' ? true : false,
     44                        'i' => $conf_bbcode_bar[2] == '1' ? true : false,
     45                        'u' => $conf_bbcode_bar[3] == '1' ? true : false,
     46                        's' => $conf_bbcode_bar[4] == '1' ? true : false,
     47                        'p' => $conf_bbcode_bar[0] == '1' ? true : false,
     48                        'center' => $conf_bbcode_bar[5] == '1' ? true : false,
     49                        'right' => $conf_bbcode_bar[6] == '1' ? true : false,
     50                        'quote' => $conf_bbcode_bar[9] == '1' ? true : false,
     51                        'ul' => $conf_bbcode_bar[7] == '1' ? true : false,
     52                        'ol' => $conf_bbcode_bar[8] == '1' ? true : false,
     53                        'img' => $conf_bbcode_bar[10] == '1' ? true : false,
     54                        'url' => $conf_bbcode_bar[11] == '1' ? true : false,
     55                        'email' => $conf_bbcode_bar[12] == '1' ? true : false,
     56                        'size' => $conf_bbcode_bar[13] == '1' ? true : false,
     57                        'color' => $conf_bbcode_bar[14] == '1' ? true : false,
     58                );
     59               
     60                $q = "UPDATE " . CONFIG_TABLE . "
     61                        SET value='" . serialize($new_bbcode_bar) . "'
     62                        WHERE param='bbcode_bar';";
    1363                pwg_query($q);
    1464        }
     
    2171        if (isset($conf['bbcode_bar']))
    2272        {
    23                 pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param="bbcode_bar" LIMIT 1;');
     73                pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param="bbcode_bar";');
    2474        }
    2575}
  • extensions/bbcode_bar/template/bbcode_bar.tpl

    r9787 r9965  
    1 {combine_script id="bbcodebar" path=$BBCODE_PATH|@cat:"template/bbcode.js"}
    2 {combine_css path=$BBCODE_PATH|@cat:"template/bbcode_bar.css"}
     1{combine_script id="markitup" require='jquery' path=$BBCODE_PATH|@cat:"template/markitup/jquery.markitup.js"}
     2{combine_css path=$BBCODE_PATH|@cat:"template/markitup/style.markitup.css"}
    33
    4 <div id="outils" width="500pt">
    5         <table class="outils"> 
    6                 <tr>                   
    7                         {if isset($BBCode_bar_button_00)}
    8                         <td><img class="bbcbutton" title="{'p_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'p_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="p" src="{$repicon}/p.png" border="0"></td>
    9                         {/if}
    10                         {if isset($BBCode_bar_button_01)}
    11                         <td><img class="bbcbutton" title="{'b_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'b_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="b" src="{$repicon}/b.png" border="0"></td>
    12                         {/if}
    13                         {if isset($BBCode_bar_button_02)}
    14                         <td><img class="bbcbutton" title="{'i_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'i_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="i" src="{$repicon}/i.png" border="0"></td>
    15                         {/if}
    16                         {if isset($BBCode_bar_button_03)}
    17                         <td><img class="bbcbutton" title="{'u_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'u_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="u" src="{$repicon}/u.png" border="0"></td>
    18                         {/if}
    19                         {if isset($BBCode_bar_button_04)}
    20                         <td><img class="bbcbutton" title="{'s_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'s_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="s" src="{$repicon}/s.png" border="0"></td>
    21                         {/if}
    22                        
    23                         {if isset($BBCode_bar_button_05) OR isset($BBCode_bar_button_06) OR isset($BBCode_bar_button_07) OR isset($BBCode_bar_button_08)}
    24                         <td> &nbsp; &nbsp; </td>
    25                         {/if}
    26                        
    27                         {if isset($BBCode_bar_button_05)}
    28                         <td><img class="bbcbutton" title="{'center_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'center_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="center" src="{$repicon}/center.png" border="0"></td>
    29                         {/if}
    30                         {if isset($BBCode_bar_button_06)}
    31                         <td><img class="bbcbutton" title="{'right_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'right_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="right" src="{$repicon}/right.png" border="0"></td>
    32                         {/if}
    33                         {if isset($BBCode_bar_button_07)}
    34                         <td><img class="bbcbutton" title="{'ul_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'ul_help'|@translate}')" onclick="BBClist('{$form_name}','content',this)" name="ul" src="{$repicon}/ul.png" border="0"></td>
    35                         {/if}
    36                         {if isset($BBCode_bar_button_08)}
    37                         <td><img class="bbcbutton" title="{'ol_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'ol_help'|@translate}')" onclick="BBClist('{$form_name}','content',this)" name="ol" src="{$repicon}/ol.png" border="0"></td>
    38                         {/if}
    39                        
    40                         {if isset($BBCode_bar_SmiliesSupport)}
    41                         <td> &nbsp; &nbsp; </td>
    42                         <td>{$BBCode_bar_SmiliesSupport.SMILIESSUPPORT_PAGE}</td>
    43                         {/if}
    44                        
    45                         {if isset($BBCode_bar_button_09) OR isset($BBCode_bar_button_10) OR isset($BBCode_bar_button_11) OR isset($BBCode_bar_button_12)}
    46                         <td> &nbsp; &nbsp; </td>
    47                         {/if}
    48                        
    49                         {if isset($BBCode_bar_button_09)}       
    50                         <td><img class="bbcbutton" title="{'quote_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'quote_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="quote" src="{$repicon}/quote.png" border="0"></td>
    51                         {/if}
    52                         {if isset($BBCode_bar_button_10)}
    53                         <td><img class="bbcbutton" title="{'img_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'img_help'|@translate}')" onclick="BBCcode('{$form_name}','content',this)" name="img" src="{$repicon}/image.png" border="0"></td>
    54                         {/if}
    55                         {if isset($BBCode_bar_button_11)}
    56                         <td><img class="bbcbutton" title="{'url_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'url_help'|@translate}')" onclick="BBCurl('{$form_name}','content')" name="url" src="{$repicon}/link.png" border="0"></td>
    57                         {/if}
    58                         {if isset($BBCode_bar_button_12)}
    59                         <td><img class="bbcbutton" title="{'mail_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'mail_help'|@translate}')" onclick="BBCwmi('{$form_name}','content','email')" name="email" src="{$repicon}/mail.png" border="0"></td>
    60                         {/if}
    61                        
    62                         {if isset($BBCode_bar_button_13) OR isset($BBCode_bar_button_14)}
    63                         <td> &nbsp; &nbsp; </td>
    64                         {/if}
    65                        
    66                         {if isset($BBCode_bar_button_13)}
    67                         <td><select title="{'size_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'size_help'|@translate}')" onchange="BBCfs('{$form_name}','content',this)" title="{'size_help'|@translate}">
    68                                     <option class="genmed" value="7">{'tiny'|@translate}</option>
    69                                         <option class="genmed" value="9">{'small'|@translate}</option>
    70                                         <option class="genmed" value="12" selected="selected" >{'normal'|@translate}</option>
    71                                         <option class="genmed" value="18">{'large'|@translate}</option>
    72                                         <option class="genmed" value="24">{'huge'|@translate}</option>
    73                                 </select>
    74                         </td>
    75                         {/if}
    76                         {if isset($BBCode_bar_button_14)}
    77                         <td><select title="{'fc_help'|@translate}" onmouseout="helpline('{$form_name}','helpbox', '{'help'|@translate}')" onmouseover="helpline('{$form_name}','helpbox', '{'fc_help'|@translate}')" onchange="BBCfc('{$form_name}','content',this)" title="{'fc_help'|@translate}">
    78                                     <option class="genmed" value="" style="color: black;" selected="selected" >{'default_help'|@translate}</option>
    79                                         <option class="genmed" value="maroon" style="color: maroon;">{'maroon_help'|@translate}</option>
    80                                         <option class="genmed" value="red" style="color: red;">{'red_help'|@translate}</option>
    81                                         <option class="genmed" value="orange" style="color: orange;">{'orange_help'|@translate}</option>
    82                                         <option class="genmed" value="brown" style="color: brown;">{'brown_help'|@translate}</option>
    83                                         <option class="genmed" value="yellow" style="color: yellow; background-color:inherit;">{'yellow_help'|@translate}</option>
    84                                         <option class="genmed" value="green" style="color: green;">{'green_help'|@translate}</option>
    85                                         <option class="genmed" value="olive" style="color: olive;">{'olive_help'|@translate}</option>
    86                                         <option class="genmed" value="cyan" style="color: cyan;">{'cyan_help'|@translate}</option>
    87                                         <option class="genmed" value="blue" style="color: blue;">{'blue_help'|@translate}</option>
    88                                         <option class="genmed" value="darkblue" style="color: darkblue;">{'darkblue_help'|@translate}</option>
    89                                         <option class="genmed" value="indigo" style="color: indigo;">{'indigo_help'|@translate}</option>
    90                                         <option class="genmed" value="violet" style="color: violet;">{'violet_help'|@translate}</option>
    91                                         <option class="genmed" value="white" style="color: white; background-color:inherit;">{'white_help'|@translate}</option>
    92                                         <option class="genmed" value="black" style="color: black;">{'black_help'|@translate}</option>
    93                                 </select>
    94                         </td>                   
    95                         {/if}
    96                 </tr>
    97         </table>
    98         {if isset($BBCode_bar_button_15)}
    99         <input class="helpline" type="text" value="{'help'|@translate}" maxlength="150" size="80" name="helpbox"/>
    100         {/if}
    101 </div>
     4{footer_script require='jquery'}
     5BBCodeBar = {ldelim}
     6        markupSet: [
     7                {if isset($BBC_b)}{ldelim}name:'{'b_help'|@translate}', key:'B', openWith:'[b]', closeWith:'[/b]', className:'markItUpBold'},{/if}
     8                {if isset($BBC_i)}{ldelim}name:'{'i_help'|@translate}', key:'I', openWith:'[i]', closeWith:'[/i]', className:'markItUpItalic'},{/if}
     9                {if isset($BBC_u)}{ldelim}name:'{'u_help'|@translate}', key:'U', openWith:'[u]', closeWith:'[/u]', className:'markItUpUnderline'},{/if}
     10                {if isset($BBC_s)}{ldelim}name:'{'s_help'|@translate}', key:'S', openWith:'[s]', closeWith:'[/s]', className:'markItUpStroke'},{/if}
     11               
     12                {if isset($BBC_p) OR isset($BBC_center) OR isset($BBC_right) OR isset($BBC_quote)}{ldelim}separator:'|'},{/if}
     13               
     14                {if isset($BBC_p)}{ldelim}name:'{'p_help'|@translate}', openWith:'[p]', closeWith:'[/p]', className:'markItUpParagraph'},{/if}
     15                {if isset($BBC_center)}{ldelim}name:'{'center_help'|@translate}', openWith:'[center]', closeWith:'[/center]', className:'markItUpCenter'},{/if}
     16                {if isset($BBC_right)}{ldelim}name:'{'right_help'|@translate}', openWith:'[right]', closeWith:'[/right]', className:'markItUpRight'},{/if}
     17                {if isset($BBC_quote)}{ldelim}name:'{'quote_help'|@translate}', openWith:'[quote]', closeWith:'[/quote]', className:'markItUpQuote'},{/if}
     18               
     19                {if isset($BBC_ul) OR isset($BBC_ol) OR isset($BBC_li)}{ldelim}separator:'|'},{/if}
     20               
     21                {if isset($BBC_ul)}{ldelim}name:'{'ul_help'|@translate}', openWith:'[ul]\n', closeWith:'\n[/ul]', className:'markItUpListUL'},{/if}
     22                {if isset($BBC_ol)}{ldelim}name:'{'ol_help'|@translate}', openWith:'[ol]\n', closeWith:'\n[/ol]', className:'markItUpListOL'},{/if}
     23                {if isset($BBC_ul) OR isset($BBC_ol)}{ldelim}name:'{'li_help'|@translate}', openWith:'[li]', closeWith:'[/li]', className:'markItUpListLI'},{/if}
     24               
     25                {if isset($BBC_img) OR isset($BBC_url) OR isset($BBC_mail)}{ldelim}separator:'|' },{/if}
     26               
     27                {if isset($BBC_img)}{ldelim}name:'{'img_help'|@translate}', key:'P', replaceWith:'[img][![Url]!][/img]', className:'markItUpPicture'},{/if}
     28                {if isset($BBC_url)}{ldelim}name:'{'url_help'|@translate}', key:'L', openWith:'[url=[![Url]!]]', closeWith:'[/url]', className:'markItUpLink'},{/if}
     29                {if isset($BBC_email)}{ldelim}name:'{'mail_help'|@translate}', key:'M', replaceWith:'[email][![Mail]!][/email]', className:'markItUpMail'},{/if}
     30               
     31                {if isset($BBC_size) OR isset($BBC_color) OR isset($BBC_smilies)}{ldelim}separator:'|'},{/if}
     32               
     33                {if isset($BBC_size)}
     34                {ldelim}name:'{'size_help'|@translate}', className:'markItUpSize',
     35                        dropMenu :[
     36                                {ldelim}name:'{'tiny'|@translate}', openWith:'[size=7]', closeWith:'[/size]' },
     37                                {ldelim}name:'{'small'|@translate}', openWith:'[size=9]', closeWith:'[/size]' },
     38                                {ldelim}name:'{'normal'|@translate}', openWith:'[size=12]', closeWith:'[/size]' },
     39                                {ldelim}name:'{'large'|@translate}', openWith:'[size=18]', closeWith:'[/size]' },
     40                                {ldelim}name:'{'huge'|@translate}', openWith:'[size=24]', closeWith:'[/size]' },
     41                        ]
     42                },
     43                {/if}
     44                {if isset($BBC_color)}
     45                {ldelim}name:'{'color_help'|@translate}', className:'markItUpColors', openWith:'[color=[![Color]!]]', closeWith:'[/color]',
     46                        dropMenu: [
     47                                {ldelim}name:'{'yellow_help'|@translate}',      openWith:'[color=yellow]',      closeWith:'[/color]', className:"col1-1" },
     48                                {ldelim}name:'{'orange_help'|@translate}',      openWith:'[color=orange]',      closeWith:'[/color]', className:"col1-2" },
     49                                {ldelim}name:'{'red_help'|@translate}',         openWith:'[color=red]',         closeWith:'[/color]', className:"col1-3" },
     50                               
     51                                {ldelim}name:'{'blue_help'|@translate}',        openWith:'[color=blue]',        closeWith:'[/color]', className:"col2-1" },
     52                                {ldelim}name:'{'purple_help'|@translate}',      openWith:'[color=purple]',      closeWith:'[/color]', className:"col2-2" },
     53                                {ldelim}name:'{'green_help'|@translate}',       openWith:'[color=green]',       closeWith:'[/color]', className:"col2-3" },
     54                               
     55                                {ldelim}name:'{'white_help'|@translate}',       openWith:'[color=white]',       closeWith:'[/color]', className:"col3-1" },
     56                                {ldelim}name:'{'grey_help'|@translate}',        openWith:'[color=gray]',        closeWith:'[/color]', className:"col3-2" },
     57                                {ldelim}name:'{'black_help'|@translate}',       openWith:'[color=black]',       closeWith:'[/color]', className:"col3-3" }
     58                        ]
     59                },
     60                {/if}
     61        ]
     62};
     63
     64jQuery(document).ready(function() {ldelim}
     65        jQuery('#{$form_name} textarea').markItUp(BBCodeBar);
     66});
     67{/footer_script}
     68
     69{$BBC_smilies}
  • extensions/bbcode_bar/template/bbcode_bar_admin.tpl

    r9787 r9965  
    1 {combine_css path=$BBCODE_PATH|@cat:"template/bbcode_bar.css"}
     1{html_head}
     2{literal}
     3        <style type="text/css">
     4                form.properties span.property {
     5                        width:60%;
     6                }
     7        </style>
     8{/literal}
     9{/html_head}
    210
    311<div class="titrePage">
     
    1018                <ul>
    1119                        <li>
    12                                 <span class="property">{'p_help'|@translate}</span>
    13                                 <input type="checkbox" name="chkb00" {$CHKB00_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/p.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/p1.png" border="0">
     20                                <label><span class="property">{'b_help'|@translate}</span>
     21                                <input type="checkbox" name="b" {$B_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/bold.png"></label>
    1422                        </li>
    1523                        <li>
    16                                 <span class="property">{'b_help'|@translate}</span>
    17                                 <input type="checkbox" name="chkb01" {$CHKB01_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/b.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/b1.png" border="0">
     24                                <label><span class="property">{'i_help'|@translate}</span>
     25                                <input type="checkbox" name="i" {$I_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/italic.png"></label>
    1826                        </li>
    1927                        <li>
    20                                 <span class="property">{'i_help'|@translate}</span>
    21                                 <input type="checkbox" name="chkb02" {$CHKB02_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/i.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/i1.png" border="0">
     28                                <label><span class="property">{'u_help'|@translate}</span>
     29                                <input type="checkbox" name="u" {$U_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/underline.png"></label>
     30                        </li>                   
     31                        <li>
     32                                <label><span class="property">{'s_help'|@translate}</span>
     33                                <input type="checkbox" name="s" {$S_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/stroke.png"></label>
    2234                        </li>
    2335                        <li>
    24                                 <span class="property">{'u_help'|@translate}</span>
    25                                 <input type="checkbox" name="chkb03" {$CHKB03_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/u.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/u1.png" border="0">
    26                         </li>                   
    27                         <li>
    28                                 <span class="property">{'s_help'|@translate}</span>
    29                                 <input type="checkbox" name="chkb04" {$CHKB04_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/s.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/s1.png" border="0">
     36                                <label><span class="property">{'p_help'|@translate}</span>
     37                                <input type="checkbox" name="p" {$P_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/p.png"></label>
    3038                        </li>
    3139                        <li>
    32                                 <span class="property">{'center_help'|@translate}</span>
    33                                 <input type="checkbox" name="chkb05" {$CHKB05_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/center.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/center1.png" border="0">
     40                                <label><span class="property">{'center_help'|@translate}</span>
     41                                <input type="checkbox" name="center" {$CENTER_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/center.png"></label>
    3442                        </li>
    3543                        <li>
    36                                 <span class="property">{'right_help'|@translate}</span>
    37                                 <input type="checkbox" name="chkb06" {$CHKB06_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/right.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/right1.png" border="0">
     44                                <label><span class="property">{'right_help'|@translate}</span>
     45                                <input type="checkbox" name="right" {$RIGHT_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/right.png"></label>
    3846                        </li>
    3947                        <li>
    40                                 <span class="property">{'ul_help'|@translate}</span>
    41                                 <input type="checkbox" name="chkb07" {$CHKB07_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/ul.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/ul1.png" border="0">
     48                                <label><span class="property">{'quote_help'|@translate}</span>
     49                                <input type="checkbox" name="quote" {$QUOTE_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/quote.png"></label>
    4250                        </li>
    4351                        <li>
    44                                 <span class="property">{'ol_help'|@translate}</span>
    45                                 <input type="checkbox" name="chkb08" {$CHKB08_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/ol.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/ol1.png" border="0">
     52                                <label><span class="property">{'ul_help'|@translate}</span>
     53                                <input type="checkbox" name="ul" {$UL_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/list-bullet.png"></label>
    4654                        </li>
    4755                        <li>
    48                                 <span class="property">{'quote_help'|@translate}</span>
    49                                 <input type="checkbox" name="chkb09" {$CHKB09_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/quote.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/quote1.png" border="0">
     56                                <label><span class="property">{'ol_help'|@translate}</span>
     57                                <input type="checkbox" name="ol" {$OL_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/list-numeric.png"></label>
    5058                        </li>
    5159                        <li>
    52                                 <span class="property">{'img_help'|@translate}</span>
    53                                 <input type="checkbox" name="chkb10" {$CHKB10_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/image.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/image1.png" border="0">
     60                                <label><span class="property">{'img_help'|@translate}</span>
     61                                <input type="checkbox" name="img" {$IMG_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/picture.png"></label>
    5462                        </li>
    5563                        <li>
    56                                 <span class="property">{'url_help'|@translate}</span>
    57                                 <input type="checkbox" name="chkb11" {$CHKB11_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/link.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/link1.png" border="0">
     64                                <label><span class="property">{'url_help'|@translate}</span>
     65                                <input type="checkbox" name="url" {$URL_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/link.png"></label>
    5866                        </li>
    5967                        <li>
    60                                 <span class="property">{'mail_help'|@translate}</span>
    61                                 <input type="checkbox" name="chkb12" {$CHKB12_STATUS} value="1" /> <img src="{$TEXT17_STATUS}/mail.png" border="0"> &nbsp; <img src="{$TEXT17_STATUS}/mail1.png" border="0">
     68                                <label><span class="property">{'mail_help'|@translate}</span>
     69                                <input type="checkbox" name="email" {$EMAIL_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/mail.png"></label>
    6270                        </li>
    6371                        <li>
    64                                 <span class="property">{'size_help'|@translate}</span>
    65                                 <input type="checkbox" name="chkb13" {$CHKB13_STATUS} value="1" />
     72                                <label><span class="property">{'size_help'|@translate}</span>
     73                                <input type="checkbox" name="size" {$SIZE_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/fonts.png"></label>
    6674                        </li>
    6775                        <li>
    68                                 <span class="property">{'fc_help'|@translate}</span>
    69                                 <input type="checkbox" name="chkb14" {$CHKB14_STATUS} value="1" />
    70                         </li>     
    71                         <li>
    72                                 <span class="property">{'help'|@translate}</span>
    73                                 <input type="checkbox" name="chkb15" {$CHKB15_STATUS} value="1" />
    74                         </li>
    75                         <li>
    76                                 <span class="property">{'repicon'|@translate}</span>
    77                                 <input type="text" size="40" name="text17" value="{$TEXT17_STATUS}" />
     76                                <label><span class="property">{'color_help'|@translate}</span>
     77                                <input type="checkbox" name="color" {$COLOR_STATUS} value="1"/> <img src="{$BBCODE_PATH}template/markitup/images/colors.png"></label>
    7878                        </li>
    7979                </ul>
    8080        </fieldset>
    8181       
    82         <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" /></p>
     82        <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit"/></p>
    8383</form>
Note: See TracChangeset for help on using the changeset viewer.