Changeset 14525
- Timestamp:
- Apr 29, 2012, 4:58:53 PM (13 years ago)
- Location:
- extensions/bbcode_bar
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/bbcode_bar/bbcode_bar.inc.php
r11377 r14525 1 1 <?php 2 2 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 3 3 4 // add BBCodeBar to textarea 4 5 function set_bbcode_bar() 5 6 { … … 14 15 if ($conf_bbcode_bar[$key]) $template->assign('BBC_'.$key, true); 15 16 } 16 17 // edit field has different id18 // if (19 // (isset($_GET['action']) AND $_GET['action'] == 'edit_comment')20 // OR (isset($page['body_id']) AND $page['body_id'] == 'theCommentsPage')21 // ) {22 // $template->assign('bbcode_texarea', 'contenteditid');23 // } else {24 // $template->assign('bbcode_texarea', 'contentid');25 // }26 $template->assign('bbcode_texarea', 'contentid');27 28 // smilies29 if (isset($pwg_loaded_plugins['SmiliesSupport']))30 {31 $template->assign('BBC_smilies', true);32 }33 17 34 18 $template->assign('BBCODE_PATH', BBcode_PATH); 35 19 $template->set_prefilter('picture', 'set_bbcode_bar_prefilter'); 36 20 37 // smilies support > 2. 2.f## must be parsed after bbcode_bar, because the javascript must be after bbc's one21 // smilies support > 2.3 ## must be parsed after bbcode_bar, because the javascript must be after bbc's one 38 22 if (isset($pwg_loaded_plugins['SmiliesSupport'])) 39 23 { 24 $template->assign('BBC_smilies', true); 40 25 set_smiliessupport(); 41 26 } … … 44 29 function set_bbcode_bar_prefilter($content, &$smarty) 45 30 { 46 $search = "<label>{'Comment'|@translate}";31 $search = '<div id="commentAdd">'; 47 32 $replace = file_get_contents(BBcode_PATH.'/template/bbcode_bar.tpl').$search; 48 33 return str_replace($search, $replace, $content); … … 50 35 51 36 52 // Check tags and eventually close malformed tags, return BBCoded String37 // check tags and eventually close malformed tags, return BBCoded String 53 38 function CheckTags($str) 54 39 { -
extensions/bbcode_bar/language/en_UK/plugin.lang.php
r11873 r14525 1 1 <?php 2 3 $lang['Available options'] = 'Available options'; 2 4 3 5 $lang['Paragraph : [p]Paragraph[/p]'] = 'Paragraph : [p]Paragraph[/p]'; -
extensions/bbcode_bar/language/fr_FR/plugin.lang.php
r11873 r14525 1 1 <?php 2 3 $lang['Available options'] = 'Options disponibles'; 2 4 3 5 $lang['Paragraph : [p]Paragraph[/p]'] = 'Paragraphe : [p]Paragraphe[/p]'; -
extensions/bbcode_bar/maintain.inc.php
r10983 r14525 26 26 if (!isset($conf['bbcode_bar'])) 27 27 { 28 $q = "INSERT INTO " . CONFIG_TABLE . " (param,value,comment) 29 VALUES ('bbcode_bar','" . serialize($BBcode_default) . "','Parametres BBCode Bar');"; 30 pwg_query($q); 28 conf_update_param('bbcode_bar',serialize($BBcode_default)); 31 29 } 32 30 } … … 58 56 ); 59 57 60 $q = "UPDATE " . CONFIG_TABLE . " 61 SET value='" . serialize($new_bbcode_bar) . "' 62 WHERE param='bbcode_bar';"; 63 pwg_query($q); 58 conf_update_param('bbcode_bar', serialize($new_bbcode_bar)); 64 59 } 65 60 } … … 67 62 function plugin_uninstall() 68 63 { 69 global $conf; 70 71 if (isset($conf['bbcode_bar'])) 72 { 73 pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param="bbcode_bar";'); 74 } 64 pwg_query('DELETE FROM ' . CONFIG_TABLE . ' WHERE param="bbcode_bar";'); 75 65 } 76 66 -
extensions/bbcode_bar/template/bbcode_bar.tpl
r11873 r14525 63 63 64 64 jQuery(document).ready(function() {ldelim} 65 jQuery('# {$bbcode_texarea}').markItUp(BBCodeBar);65 jQuery('#contentid').markItUp(BBCodeBar); 66 66 }); 67 67 {/footer_script} -
extensions/bbcode_bar/template/bbcode_bar_admin.tpl
r11873 r14525 1 {html_head} 2 {literal} 1 {html_head}{literal} 3 2 <style type="text/css"> 4 3 form.properties span.property { 5 width:60%; 4 width:55%; 5 font-weight:normal; 6 6 } 7 7 </style> 8 {/literal} 9 {/html_head} 8 {/literal}{/html_head} 10 9 11 10 <div class="titrePage"> … … 15 14 <form method="post" action="" class="properties" ENCTYPE="multipart/form-data"> 16 15 <fieldset> 17 <legend>{' Parameters'|@translate}</legend>16 <legend>{'Available options'|@translate}</legend> 18 17 <ul> 19 18 <li>
Note: See TracChangeset
for help on using the changeset viewer.