source: extensions/bbcode_bar/template/bbcode_bar.tpl @ 15998

Last change on this file since 15998 was 15998, checked in by mistic100, 12 years ago

-move some code from Comments on Albums
-compatible with GuestBook
-fix TextColor menu
-clean index.php

File size: 5.3 KB
Line 
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"}
3
4{footer_script require='jquery'}
5BBCodeBar = {strip}{ldelim}
6  markupSet: [
7    {counter start=0 print=false assign=bbc_counter}
8   
9    {if isset($BBC_b)}{counter}{ldelim}name:'{'Bold : [b]bold[/b]'|@translate}', key:'B', openWith:'[b]', closeWith:'[/b]', className:'markItUpBold'},{/if}
10    {if isset($BBC_i)}{counter}{ldelim}name:'{'Italic : [i]italic[/i]'|@translate}', key:'I', openWith:'[i]', closeWith:'[/i]', className:'markItUpItalic'},{/if}
11    {if isset($BBC_u)}{counter}{ldelim}name:'{'Underline : [u]underline[/u]'|@translate}', key:'U', openWith:'[u]', closeWith:'[/u]', className:'markItUpUnderline'},{/if}
12    {if isset($BBC_s)}{counter}{ldelim}name:'{'Striped  : [s]striped[/s]'|@translate}', key:'S', openWith:'[s]', closeWith:'[/s]', className:'markItUpStroke'},{/if}
13   
14    {if (isset($BBC_p) OR isset($BBC_center) OR isset($BBC_right) OR isset($BBC_quote)) AND $bbc_counter>0}{counter start=0 print=false assign=bbc_counter}{ldelim}separator:'|'},{/if}
15   
16    {if isset($BBC_p)}{counter}{ldelim}name:'{'Paragraph : [p]Paragraph[/p]'|@translate}', openWith:'[p]', closeWith:'[/p]', className:'markItUpParagraph'},{/if}
17    {if isset($BBC_center)}{counter}{ldelim}name:'{'Center : [center]center[/center]'|@translate}', openWith:'[center]', closeWith:'[/center]', className:'markItUpCenter'},{/if}
18    {if isset($BBC_right)}{counter}{ldelim}name:'{'Right : [right]right[/right]'|@translate}', openWith:'[right]', closeWith:'[/right]', className:'markItUpRight'},{/if}
19    {if isset($BBC_quote)}{counter}{ldelim}name:'{'Quote : [quote]quote[/quote]'|@translate}', openWith:'[quote]', closeWith:'[/quote]', className:'markItUpQuote'},{/if}
20   
21    {if (isset($BBC_ul) OR isset($BBC_ol) OR isset($BBC_li)) AND $bbc_counter>0}{counter start=0 print=false assign=bbc_counter}{ldelim}separator:'|'},{/if}
22   
23    {if isset($BBC_ul)}{counter}{ldelim}name:'{'Unordered list : [ul][li]element[/li][/ul]'|@translate}', openWith:'[ul]\n', closeWith:'\n[/ul]', className:'markItUpListUL'},{/if}
24    {if isset($BBC_ol)}{counter}{ldelim}name:'{'Ordered list : [ol][li]element[/li][/ol]'|@translate}', openWith:'[ol]\n', closeWith:'\n[/ol]', className:'markItUpListOL'},{/if}
25    {if isset($BBC_ul) OR isset($BBC_ol)}{counter}{ldelim}name:'{'List element : [li]element[/li]'|@translate}', openWith:'[li]', closeWith:'[/li]', className:'markItUpListLI'},{/if}
26   
27    {if (isset($BBC_img) OR isset($BBC_url) OR isset($BBC_mail)) AND $bbc_counter>0}{counter start=0 print=false assign=bbc_counter}{ldelim}separator:'|' },{/if}
28   
29    {if isset($BBC_img)}{counter}{ldelim}name:'{'Picture : [img]picture[/img]'|@translate}', key:'P', replaceWith:'[img][![Url]!][/img]', className:'markItUpPicture'},{/if}
30    {if isset($BBC_url)}{counter}{ldelim}name:'{'URL : [url=URL]Title[/url]'|@translate}', key:'L', openWith:'[url=[![Url]!]]', closeWith:'[/url]', className:'markItUpLink'},{/if}
31    {if isset($BBC_email)}{counter}{ldelim}name:'{'E-mail : [email]Email[/email]'|@translate}', key:'M', replaceWith:'[email][![Mail]!][/email]', className:'markItUpMail'},{/if}
32   
33    {if (isset($BBC_size) OR isset($BBC_color) OR isset($BBC_smilies)) AND $bbc_counter>0}{counter start=0 print=false assign=bbc_counter}{ldelim}separator:'|'},{/if}
34   
35    {if isset($BBC_size)}{counter}
36    {ldelim}name:'{'Font size : [size=X]text[/size]'|@translate}', className:'markItUpSize',
37      dropMenu :[
38        {ldelim}name:'{'tiny'|@translate}', openWith:'[size=7]', closeWith:'[/size]' },
39        {ldelim}name:'{'small'|@translate}', openWith:'[size=9]', closeWith:'[/size]' },
40        {ldelim}name:'{'normal'|@translate}', openWith:'[size=12]', closeWith:'[/size]' },
41        {ldelim}name:'{'large'|@translate}', openWith:'[size=18]', closeWith:'[/size]' },
42        {ldelim}name:'{'huge'|@translate}', openWith:'[size=24]', closeWith:'[/size]' },
43      ]
44    },
45    {/if}
46    {if isset($BBC_color)}{counter}
47    {ldelim}name:'{'Font color : [color=color]text[/color]'|@translate}', className:'markItUpColors', openWith:'[color=[![Color]!]]', closeWith:'[/color]',
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" },
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" },
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" }
60      ]
61    },
62    {/if}
63  ]
64};{/strip}
65
66jQuery(document).ready(function() {ldelim}
67  jQuery('#contentid').markItUp(BBCodeBar);
68});
69{/footer_script}
Note: See TracBrowser for help on using the repository browser.