Changeset 14525 for extensions/bbcode_bar/bbcode_bar.inc.php
- Timestamp:
- Apr 29, 2012, 4:58:53 PM (12 years ago)
- File:
-
- 1 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 {
Note: See TracChangeset
for help on using the changeset viewer.