Changeset 26076
- Timestamp:
- Dec 21, 2013, 11:02:24 PM (10 years ago)
- Location:
- extensions/bbcode_bar
- Files:
-
- 3 added
- 5 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
extensions/bbcode_bar/admin.php
r10983 r26076 1 1 <?php 2 if (!defined('PHPWG_ROOT_PATH'))die('Hacking attempt!');2 defined('BBCODE_ID') or die('Hacking attempt!'); 3 3 4 4 global $conf, $template; 5 load_language('plugin.lang', BBcode_PATH);6 5 7 // Met à jour la configuration si necessaire 8 if (strpos($conf['bbcode_bar'],',') !== false) 6 if (isset($_POST['submit'])) 9 7 { 10 include(BBcode_PATH .'maintain.inc.php'); 11 plugin_activate(); 8 $conf['bbcode_bar'] = array(); 9 foreach ($conf['bbcode_bar_codes'] as $key) 10 { 11 $conf['bbcode_bar'][$key] = isset($_POST[$key]); 12 } 13 14 conf_update_param('bbcode_bar', serialize($conf['bbcode_bar'])); 15 $page['infos'][] = l10n('Information data registered in database'); 12 16 } 13 17 14 $conf_bbcode_bar = unserialize($conf['bbcode_bar']); 15 16 // Enregistrement de la configuration 17 if (isset($_POST['submit'])) 18 { 19 // nouveau tableau de config 20 unset($conf_bbcode_bar); 21 foreach(unserialize(BBcode_codes) as $key) { 22 $conf_bbcode_bar[$key] = (isset($_POST[$key])) ? true : false; 23 } 24 25 // enregistrement 26 conf_update_param('bbcode_bar', serialize($conf_bbcode_bar)); 27 array_push($page['infos'], l10n('Information data registered in database')); 18 foreach ($conf['bbcode_bar_codes'] as $key) 19 { 20 $template->assign(strtoupper($key).'_STATUS', $conf['bbcode_bar'][$key] ? 'checked="checked"' : ''); 28 21 } 29 22 30 // Parametrage du template 31 foreach(unserialize(BBcode_codes) as $key) { 32 $template->assign(strtoupper($key).'_STATUS', ($conf_bbcode_bar[$key] == 1) ? 'checked="checked"' : null); 33 } 34 35 $template->assign('BBCODE_PATH', BBcode_PATH); 36 $template->set_filename('bbcode_bar_conf', dirname(__FILE__) . '/template/bbcode_bar_admin.tpl'); 23 $template->assign('BBCODE_PATH', BBCODE_PATH); 24 $template->set_filename('bbcode_bar_conf', realpath(BBCODE_PATH . 'template/bbcode_bar_admin.tpl')); 37 25 $template->assign_var_from_handle('ADMIN_CONTENT', 'bbcode_bar_conf'); 38 39 ?> -
extensions/bbcode_bar/include/events.inc.php
r24342 r26076 1 1 <?php 2 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 3 4 // add BBCodeBar to textarea 5 function set_bbcode_bar($prefilter='picture', $textarea_id='contentid') 2 defined('BBCODE_ID') or die('Hacking attempt!'); 3 4 function bbcode_bar_admin_menu($menu) 6 5 { 7 global $template, $conf, $pwg_loaded_plugins, $page; 8 9 load_language('plugin.lang', dirname(__FILE__) . '/'); 10 $conf_bbcode_bar = unserialize($conf['bbcode_bar']); 11 12 13 // buttons 14 $tpl_codes = array(); 15 foreach (unserialize(BBcode_codes) as $key) 16 { 17 $tpl_codes[$key] = (bool)$conf_bbcode_bar[$key]; 18 } 19 $tpl_codes['smilies'] = isset($pwg_loaded_plugins['SmiliesSupport']); 20 6 $menu[] = array( 7 'NAME' => 'BBCode Bar', 8 'URL' => BBCODE_ADMIN, 9 ); 10 return $menu; 11 } 12 13 function add_bbcode_bar() 14 { 15 global $page, $pwg_loaded_plugins, $template, $conf; 16 17 if (script_basename() == 'picture') 18 { 19 $prefilter = 'picture'; 20 $textarea_id = 'contentid'; 21 } 22 else if (isset($page['section'])) 23 { 24 if ( 25 script_basename() == 'index' and isset($pwg_loaded_plugins['Comments_on_Albums']) 26 and $page['section'] == 'categories' and isset($page['category']) 27 ) 28 { 29 $prefilter = 'comments_on_albums'; 30 $textarea_id = 'contentid'; 31 } 32 else if ($page['section'] == 'guestbook') 33 { 34 $prefilter = 'guestbook'; 35 $textarea_id = 'contentid'; 36 } 37 else if ($page['section'] == 'contact') 38 { 39 $prefilter = 'contactform'; 40 $textarea_id = 'cf_content'; 41 } 42 } 43 44 if (!isset($prefilter)) 45 { 46 return; 47 } 48 49 $conf['bbcode_bar']['smilies'] = isset($pwg_loaded_plugins['SmiliesSupport']); 21 50 22 51 // calculate separators between groups … … 37 66 foreach ($groups[$i] as $code) 38 67 { 39 if ($ tpl_codes[$code]) $count++;68 if ($conf['bbcode_bar'][$code]) $count++; 40 69 } 41 70 if ($count>0) … … 43 72 foreach ($groups[$i+1] as $code) 44 73 { 45 if ($ tpl_codes[$code]) $separator = true;74 if ($conf['bbcode_bar'][$code]) $separator = true; 46 75 } 47 76 } … … 54 83 55 84 $template->assign(array( 56 'BBC' => $tpl_codes, 57 'SEP' => $tpl_groups, 58 'BBCODE_PATH' => BBcode_PATH, 59 'BBCODE_ID' => $textarea_id, 85 'BBCODE_PATH' => BBCODE_PATH, 86 'BBCODE' => array( 87 'codes' => $conf['bbcode_bar'], 88 'separators' => $tpl_groups, 89 'textarea_id' => $textarea_id, 90 ), 60 91 )); 61 62 $template->set_prefilter($prefilter, 'set_bbcode_bar_prefilter'); 63 64 // smilies support > 2.3 ## must be parsed after bbcode_bar, because the javascript must be after bbc's one 65 if (isset($pwg_loaded_plugins['SmiliesSupport'])) 66 { 67 set_smiliessupport($prefilter, $textarea_id); 68 } 69 } 70 71 function set_bbcode_bar_prefilter($content, &$smarty) 72 { 73 $search = '#(<div id="guestbookAdd">|<div id="commentAdd">|<div class="contact">)#'; 74 $replace = file_get_contents(BBcode_PATH.'/template/bbcode_bar.tpl').'$1'; 75 return preg_replace($search, $replace, $content); 76 } 77 78 79 // check tags and eventually close malformed tags, return BBCoded String 80 function CheckTags($str) 81 { 82 //storage stack 83 $tags = array(); 84 85 for ($pos = 0; $pos<strlen($str); $pos++) 86 { 87 if ($str{$pos} == '[') 88 { 89 $end_pos = strpos($str, ']', $pos); 90 $tag = substr($str, ++$pos, $end_pos-$pos); 91 //deals with tags which contains arguments (ie quote) 92 if ( ($equal_pos = strpos($tag, '=', 0)) !== FALSE) 93 $tag = substr($tag, 0, $equal_pos); 94 //check whether we have a defined tag or not. 95 if (in_array(strtolower($tag),unserialize(BBcode_codes)) || in_array(strtolower(substr($tag,1)),unserialize(BBcode_codes))) 96 { 97 //closing tag 98 if ($tag{0} == '/') 99 { 100 //cleaned tag 101 $tag = substr($tag, 1); 102 $before_tag = substr($str, 0, $pos-1); 103 $after_tag = substr($str, $end_pos+1); 104 //pop stack 105 while (($temp = array_pop($tags))) 106 { 107 if ($temp != $tag) { 108 $before_tag.='[/'.$temp.']'; 109 } else { 110 $before_tag.='[/'.$tag.']'; 111 break; 112 } 113 } 114 $end_pos += strlen($before_tag)+strlen($after_tag)-strlen($str); 115 $str = $before_tag.$after_tag; 116 } else { // push stack 117 array_push($tags,$tag); 118 } 119 } 120 $pos = $end_pos; 121 } 122 } 123 // empty stack and closing tags 124 while ($temp = array_pop($tags)) 125 { 126 $str.='[/'.$temp.']'; 127 } 128 return $str; 92 93 $template->set_filename('bbcodebar', realpath(BBCODE_PATH.'/template/bbcode_bar.tpl')); 94 $template->parse('bbcodebar'); 129 95 } 130 96 … … 134 100 global $conf; 135 101 136 $conf_bbcode_bar = unserialize($conf['bbcode_bar']); 137 $str = CheckTags(nl2br($str)); 102 $str = bbcode_checktags(nl2br($str)); 138 103 139 104 $patterns = array(); 140 105 $replacements = array(); 141 106 142 if ($conf _bbcode_bar['p'])107 if ($conf['bbcode_bar']['p']) 143 108 { 144 109 //Paragraph … … 146 111 $replacements[] = '<p>\\1</p>'; 147 112 } 148 if ($conf _bbcode_bar['b'])113 if ($conf['bbcode_bar']['b']) 149 114 { 150 115 // Bold … … 152 117 $replacements[] = '<b>\\1</b>'; 153 118 } 154 if ($conf _bbcode_bar['i'])119 if ($conf['bbcode_bar']['i']) 155 120 { 156 121 //Italic … … 158 123 $replacements[] = '<i>\\1</i>'; 159 124 } 160 if ($conf _bbcode_bar['u'])125 if ($conf['bbcode_bar']['u']) 161 126 { 162 127 //Underline … … 164 129 $replacements[] = '<u>\\1</u>'; 165 130 } 166 if ($conf _bbcode_bar['s'])131 if ($conf['bbcode_bar']['s']) 167 132 { 168 133 //Strikethrough … … 170 135 $replacements[] = '<s>\\1</s>'; 171 136 } 172 if ($conf _bbcode_bar['center'])137 if ($conf['bbcode_bar']['center']) 173 138 { 174 139 //Center 175 140 $patterns[] = '#\[center\](.*?)\[/center\]#is'; 176 $replacements[] = '<div align="center"> <p>\\1</p></div>';177 } 178 if ($conf _bbcode_bar['right'])141 $replacements[] = '<div align="center">\\1</div>'; 142 } 143 if ($conf['bbcode_bar']['right']) 179 144 { 180 145 //Right 181 146 $patterns[] = '#\[right\](.*?)\[/right\]#is'; 182 $replacements[] = '<div align="right"> <p>\\1</p></div>';183 } 184 if ($conf _bbcode_bar['ol'])147 $replacements[] = '<div align="right">\\1</div>'; 148 } 149 if ($conf['bbcode_bar']['ol']) 185 150 { 186 151 //Olist … … 188 153 $replacements[] = '<ol>\\1</ol>'; 189 154 } 190 if ($conf _bbcode_bar['ul'])155 if ($conf['bbcode_bar']['ul']) 191 156 { 192 157 //Ulist … … 194 159 $replacements[] = '<ul>\\1</ul>'; 195 160 } 196 if ($conf _bbcode_bar['ol'] || $conf_bbcode_bar['ul'])161 if ($conf['bbcode_bar']['ol'] || $conf['bbcode_bar']['ul']) 197 162 { 198 163 //List … … 200 165 $replacements[] = '<li>\\1</li>'; 201 166 } 202 if ($conf _bbcode_bar['quote'])167 if ($conf['bbcode_bar']['quote']) 203 168 { 204 169 // Quotes … … 214 179 $replacements[] = '<blockquote><span style="font-size:11px;line-height:normal"><b>\\1 : </b><br/>\\2</span></blockquote>'; 215 180 } 216 if ($conf _bbcode_bar['img'])181 if ($conf['bbcode_bar']['img']) 217 182 { 218 183 //Images … … 220 185 $replacements[] = '<img src="\\1" />'; 221 186 } 222 if ($conf _bbcode_bar['url'])187 if ($conf['bbcode_bar']['url']) 223 188 { 224 189 //[url]xxxx://www.zzzz.yyy[/url] … … 246 211 $replacements[] = '<a href="\\1" target="_blank">\\2</a>'; 247 212 } 248 if ($conf _bbcode_bar['email'])213 if ($conf['bbcode_bar']['email']) 249 214 { 250 215 //[email]samvure@gmail.com[/email] … … 252 217 $replacements[] = '<a href="mailto:\\1">\\1</a>'; 253 218 } 254 if ($conf _bbcode_bar['size'])219 if ($conf['bbcode_bar']['size']) 255 220 { 256 221 //Size … … 258 223 $replacements[] = '<span style="font-size: \\1px; line-height: normal">\\2</span>'; 259 224 } 260 if ($conf _bbcode_bar['color'])225 if ($conf['bbcode_bar']['color']) 261 226 { 262 227 //Colours … … 267 232 return preg_replace($patterns, $replacements, $str); 268 233 } 269 270 ?> -
extensions/bbcode_bar/main.inc.php
r23278 r26076 8 8 */ 9 9 10 if (!defined('PHPWG_ROOT_PATH'))die('Hacking attempt!');10 defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); 11 11 12 define('BBcode_DIR' , basename(dirname(__FILE__))); 13 define('BBcode_PATH' , PHPWG_PLUGINS_PATH . BBcode_DIR . '/'); 14 define('BBcode_codes', serialize(array('b','i','u','s','p','center','right','quote','ul','ol','img','url','email','size','color'))); 12 define('BBCODE_ID' , basename(dirname(__FILE__))); 13 define('BBCODE_PATH' , PHPWG_PLUGINS_PATH . BBCODE_ID . '/'); 14 define('BBCODE_ADMIN', get_root_url() . 'admin.php?page=plugin-' . BBCODE_ID); 15 define('BBCODE_VERSION', 'auto'); 15 16 16 include_once(BBcode_PATH.'bbcode_bar.inc.php'); 17 18 include_once(BBCODE_PATH.'include/functions.inc.php'); 19 include_once(BBCODE_PATH.'include/events.inc.php'); 20 21 17 22 add_event_handler('init', 'init_bbcode_bar'); 23 24 if (defined('IN_ADMIN')) 25 { 26 add_event_handler('get_admin_plugin_menu_links', 'bbcode_bar_admin_menu'); 27 } 28 else 29 { 30 add_event_handler('loc_after_page_header', 'add_bbcode_bar', EVENT_HANDLER_PRIORITY_NEUTRAL+1); 31 } 32 33 add_event_handler('render_comment_content', 'BBCodeParse'); 34 add_event_handler('render_contact_content', 'BBCodeParse'); 35 18 36 19 37 function init_bbcode_bar() 20 38 { 39 global $conf; 40 41 include_once(BBCODE_PATH . 'maintain.inc.php'); 42 $maintain = new bbcode_bar_maintain(BBCODE_ID); 43 $maintain->autoUpdate(BBCODE_VERSION, 'install'); 44 45 $conf['bbcode_bar'] = unserialize($conf['bbcode_bar']); 46 $conf['bbcode_bar_codes'] = array('b','i','u','s','p','center','right','quote','ul','ol','img','url','email','size','color'); 47 48 load_language('plugin.lang', BBCODE_PATH); 49 21 50 remove_event_handler('render_comment_content', 'render_comment_content'); 22 add_event_handler('render_comment_content', 'BBCodeParse');23 add_event_handler('render_contact_content', 'BBCodeParse');24 add_event_handler('loc_after_page_header', 'add_bbcode_bar');25 51 } 26 27 function add_bbcode_bar()28 {29 global $page, $pwg_loaded_plugins;30 31 if (isset($page['body_id']) AND $page['body_id'] == 'thePicturePage')32 {33 $prefilter = 'picture';34 $textarea_id = 'contentid';35 }36 else if (37 script_basename() == 'index' and isset($pwg_loaded_plugins['Comments_on_Albums'])38 and isset($page['section']) and $page['section'] == 'categories' and isset($page['category'])39 )40 {41 $prefilter = 'comments_on_albums';42 $textarea_id = 'contentid';43 }44 else if (isset($page['section']) and $page['section'] == 'guestbook')45 {46 $prefilter = 'index';47 $textarea_id = 'contentid';48 }49 else if (isset($page['section']) and $page['section'] == 'contact')50 {51 $prefilter = 'index';52 $textarea_id = 'cf_content';53 }54 55 if (isset($prefilter))56 {57 set_bbcode_bar($prefilter, $textarea_id);58 }59 }60 61 if (script_basename() == 'admin')62 {63 add_event_handler('get_admin_plugin_menu_links', 'bbcode_bar_admin_menu');64 function bbcode_bar_admin_menu($menu)65 {66 array_push($menu, array(67 'NAME' => 'BBCode Bar',68 'URL' => get_root_url().'admin.php?page=plugin-' . BBcode_DIR69 ));70 return $menu;71 }72 }73 74 ?> -
extensions/bbcode_bar/maintain.inc.php
r14525 r26076 1 1 <?php 2 if (!defined('PHPWG_ROOT_PATH'))die('Hacking attempt!');2 defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); 3 3 4 function plugin_install() 5 { 6 global $conf;4 class bbcode_bar_maintain extends PluginMaintain 5 { 6 private $installed = false; 7 7 8 $BBcode_default= array(8 private $default_conf = array( 9 9 'b' => true, 10 10 'i' => true, … … 22 22 'size' => true, 23 23 'color' => true, 24 );24 ); 25 25 26 if (!isset($conf['bbcode_bar']))26 function install($plugin_version, &$errors=array()) 27 27 { 28 conf_update_param('bbcode_bar',serialize($BBcode_default)); 28 global $conf; 29 30 if (isset($conf['bbcode_bar'])) 31 { 32 $conf['bbcode_bar'] = serialize($this->default_conf); 33 34 conf_update_param('bbcode_bar', $conf['bbcode_bar']); 35 } 36 37 $this->installed = true; 38 } 39 40 function activate($plugin_version, &$errors=array()) 41 { 42 if (!$this->installed) 43 { 44 $this->install($plugin_version, $errors); 45 } 46 } 47 48 function deactivate() 49 { 50 } 51 52 function uninstall() 53 { 54 conf_delete_param('bbcode_bar'); 29 55 } 30 56 } 31 32 function plugin_activate()33 {34 global $conf;35 36 if (strpos($conf['bbcode_bar'],',') !== false)37 {38 $conf_bbcode_bar = explode(',', $conf['bbcode_bar']);39 40 $new_bbcode_bar = array(41 'b' => $conf_bbcode_bar[1] == '1' ? true : false,42 'i' => $conf_bbcode_bar[2] == '1' ? true : false,43 'u' => $conf_bbcode_bar[3] == '1' ? true : false,44 's' => $conf_bbcode_bar[4] == '1' ? true : false,45 'p' => $conf_bbcode_bar[0] == '1' ? true : false,46 'center' => $conf_bbcode_bar[5] == '1' ? true : false,47 'right' => $conf_bbcode_bar[6] == '1' ? true : false,48 'quote' => $conf_bbcode_bar[9] == '1' ? true : false,49 'ul' => $conf_bbcode_bar[7] == '1' ? true : false,50 'ol' => $conf_bbcode_bar[8] == '1' ? true : false,51 'img' => $conf_bbcode_bar[10] == '1' ? true : false,52 'url' => $conf_bbcode_bar[11] == '1' ? true : false,53 'email' => $conf_bbcode_bar[12] == '1' ? true : false,54 'size' => $conf_bbcode_bar[13] == '1' ? true : false,55 'color' => $conf_bbcode_bar[14] == '1' ? true : false,56 );57 58 conf_update_param('bbcode_bar', serialize($new_bbcode_bar));59 }60 }61 62 function plugin_uninstall()63 {64 pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param="bbcode_bar";');65 }66 67 ?> -
extensions/bbcode_bar/template/bbcode_bar.tpl
r23489 r26076 1 {combine_script id='markitup' require='jquery' load='footer' path=$BBCODE_PATH| @cat:'template/markitup/jquery.markitup.js'}2 {combine_css path=$BBCODE_PATH|@cat:'template/markitup/style.markitup.css'}1 {combine_script id='markitup' require='jquery' load='footer' path=$BBCODE_PATH|cat:'template/markitup/jquery.markitup.js'} 2 {combine_css id='markitup' order=20 path=$BBCODE_PATH|cat:'template/markitup/style.markitup.css'} 3 3 4 4 {footer_script require='markitup'} … … 7 7 {counter start=0 print=false assign=bbc_counter} 8 8 9 {if $BBC .b}{counter}{ldelim}name:'{'Bold : [b]bold[/b]'|@translate}', key:'B', openWith:'[b]', closeWith:'[/b]', className:'miuIcon miuBold'},{/if}10 {if $BBC .i}{counter}{ldelim}name:'{'Italic : [i]italic[/i]'|@translate}', key:'I', openWith:'[i]', closeWith:'[/i]', className:'miuIcon miuItalic'},{/if}11 {if $BBC .u}{counter}{ldelim}name:'{'Underline : [u]underline[/u]'|@translate}', key:'U', openWith:'[u]', closeWith:'[/u]', className:'miuIcon miuUnderline'},{/if}12 {if $BBC .s}{counter}{ldelim}name:'{'Striped : [s]striped[/s]'|@translate}', key:'S', openWith:'[s]', closeWith:'[/s]', className:'miuIcon miuStroke'},{/if}9 {if $BBCODE.codes.b}{counter}{ldelim}name:'{'Bold : [b]bold[/b]'|translate}', key:'B', openWith:'[b]', closeWith:'[/b]', className:'miuIcon miuBold'},{/if} 10 {if $BBCODE.codes.i}{counter}{ldelim}name:'{'Italic : [i]italic[/i]'|translate}', key:'I', openWith:'[i]', closeWith:'[/i]', className:'miuIcon miuItalic'},{/if} 11 {if $BBCODE.codes.u}{counter}{ldelim}name:'{'Underline : [u]underline[/u]'|translate}', key:'U', openWith:'[u]', closeWith:'[/u]', className:'miuIcon miuUnderline'},{/if} 12 {if $BBCODE.codes.s}{counter}{ldelim}name:'{'Striped : [s]striped[/s]'|translate}', key:'S', openWith:'[s]', closeWith:'[/s]', className:'miuIcon miuStroke'},{/if} 13 13 14 {if $ SEP[0]}{counter}{ldelim}separator:'|'},{/if}14 {if $BBCODE.separators[0]}{counter}{ldelim}separator:'|'},{/if} 15 15 16 {if $BBC .p}{counter}{ldelim}name:'{'Paragraph : [p]Paragraph[/p]'|@translate}', openWith:'[p]', closeWith:'[/p]', className:'miuIcon miuParagraph'},{/if}17 {if $BBC .center}{counter}{ldelim}name:'{'Center : [center]center[/center]'|@translate}', openWith:'[center]', closeWith:'[/center]', className:'miuIcon miuCenter'},{/if}18 {if $BBC .right}{counter}{ldelim}name:'{'Right : [right]right[/right]'|@translate}', openWith:'[right]', closeWith:'[/right]', className:'miuIcon miuRight'},{/if}19 {if $BBC .quote}{counter}{ldelim}name:'{'Quote : [quote]quote[/quote]'|@translate}', openWith:'[quote]', closeWith:'[/quote]', className:'miuIcon miuQuote'},{/if}16 {if $BBCODE.codes.p}{counter}{ldelim}name:'{'Paragraph : [p]Paragraph[/p]'|translate}', openWith:'[p]', closeWith:'[/p]', className:'miuIcon miuParagraph'},{/if} 17 {if $BBCODE.codes.center}{counter}{ldelim}name:'{'Center : [center]center[/center]'|translate}', openWith:'[center]', closeWith:'[/center]', className:'miuIcon miuCenter'},{/if} 18 {if $BBCODE.codes.right}{counter}{ldelim}name:'{'Right : [right]right[/right]'|translate}', openWith:'[right]', closeWith:'[/right]', className:'miuIcon miuRight'},{/if} 19 {if $BBCODE.codes.quote}{counter}{ldelim}name:'{'Quote : [quote]quote[/quote]'|translate}', openWith:'[quote]', closeWith:'[/quote]', className:'miuIcon miuQuote'},{/if} 20 20 21 {if $ SEP[1]}{counter}{ldelim}separator:'|'},{/if}21 {if $BBCODE.separators[1]}{counter}{ldelim}separator:'|'},{/if} 22 22 23 {if $BBC .ul}{counter}{ldelim}name:'{'Unordered list : [ul][li]element[/li][/ul]'|@translate}', openWith:'[ul]\n', closeWith:'\n[/ul]', className:'miuIcon miuListUL'},{/if}24 {if $BBC .ol}{counter}{ldelim}name:'{'Ordered list : [ol][li]element[/li][/ol]'|@translate}', openWith:'[ol]\n', closeWith:'\n[/ol]', className:'miuIcon miuListOL'},{/if}25 {if $BBC .ul OR $BBC.ol}{counter}{ldelim}name:'{'List element : [li]element[/li]'|@translate}', multiline:true, openWith:'[li]', closeWith:'[/li]', className:'miuIcon miuListLI'},{/if}23 {if $BBCODE.codes.ul}{counter}{ldelim}name:'{'Unordered list : [ul][li]element[/li][/ul]'|translate}', openWith:'[ul]\n', closeWith:'\n[/ul]', className:'miuIcon miuListUL'},{/if} 24 {if $BBCODE.codes.ol}{counter}{ldelim}name:'{'Ordered list : [ol][li]element[/li][/ol]'|translate}', openWith:'[ol]\n', closeWith:'\n[/ol]', className:'miuIcon miuListOL'},{/if} 25 {if $BBCODE.codes.ul OR $BBCODE.codes.ol}{counter}{ldelim}name:'{'List element : [li]element[/li]'|translate}', multiline:true, openWith:'[li]', closeWith:'[/li]', className:'miuIcon miuListLI'},{/if} 26 26 27 {if $ SEP[2]}{counter}{ldelim}separator:'|' },{/if}27 {if $BBCODE.separators[2]}{counter}{ldelim}separator:'|' },{/if} 28 28 29 {if $BBC .img}{counter}{ldelim}name:'{'Picture : [img]picture[/img]'|@translate}', key:'P', replaceWith:'[img][![Source:!:http://]!][/img]', className:'miuIcon miuPicture'},{/if}30 {if $BBC .url}{counter}{ldelim}name:'{'URL : [url=URL]Title[/url]'|@translate}', key:'L', openWith:'[url=[![Url:!:http://]!]]', closeWith:'[/url]', className:'miuIcon miuLink'},{/if}31 {if $BBC .email}{counter}{ldelim}name:'{'E-mail : [email]Email[/email]'|@translate}', key:'M', replaceWith:'[email][![Mail]!][/email]', className:'miuIcon miuMail'},{/if}29 {if $BBCODE.codes.img}{counter}{ldelim}name:'{'Picture : [img]picture[/img]'|translate}', key:'P', replaceWith:'[img][![Source:!:http://]!][/img]', className:'miuIcon miuPicture'},{/if} 30 {if $BBCODE.codes.url}{counter}{ldelim}name:'{'URL : [url=URL]Title[/url]'|translate}', key:'L', openWith:'[url=[![Url:!:http://]!]]', closeWith:'[/url]', className:'miuIcon miuLink'},{/if} 31 {if $BBCODE.codes.email}{counter}{ldelim}name:'{'E-mail : [email]Email[/email]'|translate}', key:'M', replaceWith:'[email][![Mail]!][/email]', className:'miuIcon miuMail'},{/if} 32 32 33 {if $ SEP[3]}{counter}{ldelim}separator:'|'},{/if}33 {if $BBCODE.separators[3]}{counter}{ldelim}separator:'|'},{/if} 34 34 35 {if $BBC .size}{counter}36 {ldelim}name:'{'Font size : [size=X]text[/size]'| @translate}', className:'miuIcon miuSize',35 {if $BBCODE.codes.size}{counter} 36 {ldelim}name:'{'Font size : [size=X]text[/size]'|translate}', className:'miuIcon miuSize', 37 37 dropMenu :[ 38 {ldelim}name:'{'tiny font'| @translate}', openWith:'[size=7]', closeWith:'[/size]', className:'miuSizeTiny' },39 {ldelim}name:'{'small font'| @translate}', openWith:'[size=9]', closeWith:'[/size]', className:'miuSizeSmall' },40 {ldelim}name:'{'normal font'| @translate}', openWith:'[size=12]', closeWith:'[/size]', className:'miuSizeNormal' },41 {ldelim}name:'{'large font'| @translate}', openWith:'[size=18]', closeWith:'[/size]', className:'miuSizeLarge' },42 {ldelim}name:'{'huge font'| @translate}', openWith:'[size=24]', closeWith:'[/size]', className:'miuSizeHuge' },38 {ldelim}name:'{'tiny font'|translate}', openWith:'[size=7]', closeWith:'[/size]', className:'miuSizeTiny' }, 39 {ldelim}name:'{'small font'|translate}', openWith:'[size=9]', closeWith:'[/size]', className:'miuSizeSmall' }, 40 {ldelim}name:'{'normal font'|translate}', openWith:'[size=12]', closeWith:'[/size]', className:'miuSizeNormal' }, 41 {ldelim}name:'{'large font'|translate}', openWith:'[size=18]', closeWith:'[/size]', className:'miuSizeLarge' }, 42 {ldelim}name:'{'huge font'|translate}', openWith:'[size=24]', closeWith:'[/size]', className:'miuSizeHuge' }, 43 43 ] 44 44 }, 45 45 {/if} 46 {if $BBC .color}{counter}47 {ldelim}name:'{'Font color : [color=color]text[/color]'| @translate}', className:'miuIcon miuColors', openWith:'[color=[![Color]!]]', closeWith:'[/color]',46 {if $BBCODE.codes.color}{counter} 47 {ldelim}name:'{'Font color : [color=color]text[/color]'|translate}', className:'miuIcon miuColors', openWith:'[color=[![Color]!]]', closeWith:'[/color]', 48 48 dropMenu: [ 49 {ldelim}name:'{'Yellow'| @translate}', openWith:'[color=yellow]', closeWith:'[/color]', className:"col1-1" },50 {ldelim}name:'{'Orange'| @translate}', openWith:'[color=orange]', closeWith:'[/color]', className:"col1-2" },51 {ldelim}name:'{'Red'| @translate}', openWith:'[color=red]', closeWith:'[/color]', className:"col1-3" },49 {ldelim}name:'{'Yellow'|translate}', openWith:'[color=yellow]', closeWith:'[/color]', className:"col1-1" }, 50 {ldelim}name:'{'Orange'|translate}', openWith:'[color=orange]', closeWith:'[/color]', className:"col1-2" }, 51 {ldelim}name:'{'Red'|translate}', openWith:'[color=red]', closeWith:'[/color]', className:"col1-3" }, 52 52 53 {ldelim}name:'{'Blue'| @translate}', openWith:'[color=blue]', closeWith:'[/color]', className:"col2-1" },54 {ldelim}name:'{'Purple'| @translate}', openWith:'[color=purple]', closeWith:'[/color]', className:"col2-2" },55 {ldelim}name:'{'Green'| @translate}', openWith:'[color=green]', closeWith:'[/color]', className:"col2-3" },53 {ldelim}name:'{'Blue'|translate}', openWith:'[color=blue]', closeWith:'[/color]', className:"col2-1" }, 54 {ldelim}name:'{'Purple'|translate}', openWith:'[color=purple]', closeWith:'[/color]', className:"col2-2" }, 55 {ldelim}name:'{'Green'|translate}', openWith:'[color=green]', closeWith:'[/color]', className:"col2-3" }, 56 56 57 {ldelim}name:'{'White'| @translate}', openWith:'[color=white]', closeWith:'[/color]', className:"col3-1" },58 {ldelim}name:'{'Grey'| @translate}', openWith:'[color=gray]', closeWith:'[/color]', className:"col3-2" },59 {ldelim}name:'{'Black'| @translate}', openWith:'[color=black]', closeWith:'[/color]', className:"col3-3" }57 {ldelim}name:'{'White'|translate}', openWith:'[color=white]', closeWith:'[/color]', className:"col3-1" }, 58 {ldelim}name:'{'Grey'|translate}', openWith:'[color=gray]', closeWith:'[/color]', className:"col3-2" }, 59 {ldelim}name:'{'Black'|translate}', openWith:'[color=black]', closeWith:'[/color]', className:"col3-3" } 60 60 ] 61 61 }, 62 62 {/if} 63 63 64 {if $ SEP[4]}{counter}{ldelim}separator:'|'},{/if}64 {if $BBCODE.separators[4]}{counter}{ldelim}separator:'|'},{/if} 65 65 ] 66 66 };{/strip} 67 67 68 68 69 jQuery('#{$BBCODE _ID}').markItUp(BBCodeBar);69 jQuery('#{$BBCODE.textarea_id}').markItUp(BBCodeBar); 70 70 jQuery('.markItUpHeader>ul').css('width', {$bbc_counter}*22); 71 71 {/footer_script} -
extensions/bbcode_bar/template/bbcode_bar_admin.tpl
r23278 r26076 1 {html_style} {literal}1 {html_style} 2 2 .miuIcon a { 3 3 display:inline-block; … … 9 9 border-radius:2px; 10 10 } 11 {/ literal}{/html_style}11 {/html_style} 12 12 13 {combine_css path=$BBCODE_PATH| @cat:"template/markitup/style.markitup.css"}13 {combine_css path=$BBCODE_PATH|cat:'template/markitup/style.markitup.css'} 14 14 15 15 <div class="titrePage"> … … 17 17 </div> 18 18 19 <form method="post" action="" class="properties" ENCTYPE="multipart/form-data">19 <form method="post" action="" class="properties"> 20 20 <fieldset> 21 <legend>{'Available options'| @translate}</legend>21 <legend>{'Available options'|translate}</legend> 22 22 <ul class="markItUp"> 23 23 <li><label> 24 24 <span class="miuIcon miuBold"><a> </a></span> 25 25 <input type="checkbox" name="b" {$B_STATUS} value="1"/> 26 {'Bold : [b]bold[/b]'| @translate}26 {'Bold : [b]bold[/b]'|translate} 27 27 </label></li> 28 28 <li><label> 29 29 <span class="miuIcon miuItalic"><a> </a></span> 30 30 <input type="checkbox" name="i" {$I_STATUS} value="1"/> 31 {'Italic : [i]italic[/i]'| @translate}31 {'Italic : [i]italic[/i]'|translate} 32 32 </label></li> 33 33 <li><label> 34 34 <span class="miuIcon miuUnderline"><a> </a></span> 35 35 <input type="checkbox" name="u" {$U_STATUS} value="1"/> 36 {'Underline : [u]underline[/u]'| @translate}36 {'Underline : [u]underline[/u]'|translate} 37 37 </label></li> 38 38 <li><label> 39 39 <span class="miuIcon miuStroke"><a> </a></span> 40 40 <input type="checkbox" name="s" {$S_STATUS} value="1"/> 41 {'Striped : [s]striped[/s]'| @translate}41 {'Striped : [s]striped[/s]'|translate} 42 42 </label></li> 43 43 <li><label> 44 44 <span class="miuIcon miuParagraph"><a> </a></span> 45 45 <input type="checkbox" name="p" {$P_STATUS} value="1"/> 46 {'Paragraph : [p]Paragraph[/p]'| @translate}46 {'Paragraph : [p]Paragraph[/p]'|translate} 47 47 </label></li> 48 48 <li><label> 49 49 <span class="miuIcon miuCenter"><a> </a></span> 50 50 <input type="checkbox" name="center" {$CENTER_STATUS} value="1"/> 51 {'Center : [center]center[/center]'| @translate}51 {'Center : [center]center[/center]'|translate} 52 52 </label></li> 53 53 <li><label> 54 54 <span class="miuIcon miuRight"><a> </a></span> 55 55 <input type="checkbox" name="right" {$RIGHT_STATUS} value="1"/> 56 {'Right : [right]right[/right]'| @translate}56 {'Right : [right]right[/right]'|translate} 57 57 </label></li> 58 58 <li><label> 59 59 <span class="miuIcon miuQuote"><a> </a></span> 60 60 <input type="checkbox" name="quote" {$QUOTE_STATUS} value="1"/> 61 {'Quote : [quote]quote[/quote]'| @translate}61 {'Quote : [quote]quote[/quote]'|translate} 62 62 </label></li> 63 63 <li><label> 64 64 <span class="miuIcon miuListUL"><a> </a></span> 65 65 <input type="checkbox" name="ul" {$UL_STATUS} value="1"/> 66 {'Unordered list : [ul][li]element[/li][/ul]'| @translate}66 {'Unordered list : [ul][li]element[/li][/ul]'|translate} 67 67 </label></li> 68 68 <li><label> 69 69 <span class="miuIcon miuListOL"><a> </a></span> 70 70 <input type="checkbox" name="ol" {$OL_STATUS} value="1"/> 71 {'Ordered list : [ol][li]element[/li][/ol]'| @translate}71 {'Ordered list : [ol][li]element[/li][/ol]'|translate} 72 72 </label></li> 73 73 <li><label> 74 74 <span class="miuIcon miuPicture"><a> </a></span> 75 75 <input type="checkbox" name="img" {$IMG_STATUS} value="1"/> 76 {'Picture : [img]picture[/img]'| @translate}76 {'Picture : [img]picture[/img]'|translate} 77 77 </label></li> 78 78 <li><label> 79 79 <span class="miuIcon miuLink"><a> </a></span> 80 80 <input type="checkbox" name="url" {$URL_STATUS} value="1"/> 81 {'URL : [url=URL]Title[/url]'| @translate}81 {'URL : [url=URL]Title[/url]'|translate} 82 82 </label></li> 83 83 <li><label> 84 84 <span class="miuIcon miuMail"><a> </a></span> 85 85 <input type="checkbox" name="email" {$EMAIL_STATUS} value="1"/> 86 {'E-mail : [email]Email[/email]'| @translate}86 {'E-mail : [email]Email[/email]'|translate} 87 87 </label></li> 88 88 <li><label> 89 89 <span class="miuIcon miuSize"><a> </a></span> 90 90 <input type="checkbox" name="size" {$SIZE_STATUS} value="1"/> 91 {'Font size : [size=X]text[/size]'| @translate}91 {'Font size : [size=X]text[/size]'|translate} 92 92 </label></li> 93 93 <li><label> 94 94 <span class="miuIcon miuColors"><a> </a></span> 95 95 <input type="checkbox" name="color" {$COLOR_STATUS} value="1"/> 96 {'Font color : [color=color]text[/color]'| @translate}96 {'Font color : [color=color]text[/color]'|translate} 97 97 </label></li> 98 98 </ul> 99 99 </fieldset> 100 100 101 <p class="formButtons"><input class="submit" type="submit" value="{'Submit'| @translate}" name="submit"/></p>101 <p class="formButtons"><input class="submit" type="submit" value="{'Submit'|translate}" name="submit"/></p> 102 102 </form>
Note: See TracChangeset
for help on using the changeset viewer.