Changeset 15997 for extensions/SmiliesSupport
- Timestamp:
- Jun 24, 2012, 3:07:53 PM (12 years ago)
- Location:
- extensions/SmiliesSupport
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/SmiliesSupport/main.inc.php
r14526 r15997 23 23 24 24 // if BBCodeBar is installed let him manage smilies 25 if ( isset($page['body_id']) AND $page['body_id'] == 'thePicturePage' 26 AND !isset($pwg_loaded_plugins['bbcode_bar']) 27 ) { 28 set_smiliessupport(); 25 if (isset($pwg_loaded_plugins['bbcode_bar'])) return; 26 27 if (isset($page['body_id']) AND $page['body_id'] == 'thePicturePage') 28 { 29 $prefilter = 'picture'; 30 } 31 else if ( 32 script_basename() == 'index' and isset($pwg_loaded_plugins['Comments_on_Albums']) 33 and isset($page['section']) and $page['section'] == 'categories' and isset($page['category']) 34 ) 35 { 36 $prefilter = 'comments_on_albums'; 37 } 38 else if (isset($_GET['/guestbook'])) 39 { 40 $prefilter = 'index'; 41 } 42 43 if (isset($prefilter)) 44 { 45 set_smiliessupport($prefilter); 29 46 } 30 47 } -
extensions/SmiliesSupport/smiliessupport.inc.php
r14526 r15997 3 3 4 4 // add smilies button to the comment field 5 function set_smiliessupport( )5 function set_smiliessupport($prefilter='picture') 6 6 { 7 7 global $conf, $template, $page; … … 16 16 )); 17 17 18 $template->set_prefilter( 'picture', 'set_smiliessupport_prefilter');18 $template->set_prefilter($prefilter, 'set_smiliessupport_prefilter'); 19 19 } 20 20 21 21 function set_smiliessupport_prefilter($content, &$smarty) 22 22 { 23 $search = ' <div id="commentAdd">';24 $replace = file_get_contents(SMILIES_PATH.'/template/smiliessupport_page.tpl'). $search;25 return str_replace($search, $replace, $content);23 $search = '#(<div id="guestbookAdd">|<div id="commentAdd">)#'; 24 $replace = file_get_contents(SMILIES_PATH.'/template/smiliessupport_page.tpl').'$1'; 25 return preg_replace($search, $replace, $content); 26 26 } 27 27 -
extensions/SmiliesSupport/template/markitup/style.markitup.css
r15110 r15997 19 19 font:12px 'Courier New', Courier, monospace; 20 20 padding:5px; 21 clear:both;22 21 overflow:auto; 23 22 }
Note: See TracChangeset
for help on using the changeset viewer.