Ignore:
Timestamp:
Jan 6, 2010, 3:37:32 PM (14 years ago)
Author:
patdenice
Message:

[Plugin][FCK Editor]
Add editor to page banner edition.
Allow to add FCK Editor instance in any plugin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/FCKEditor/main.inc.php

    r4629 r4630  
    1717  include(FCK_PATH.'fckeditor.php');
    1818}
     19
     20function set_fckeditor_instance($areas=array(), $toolbar='Basic', $width='750px', $height='200px')
     21{
     22  global $template, $conf;
     23
     24  if (is_string($areas))
     25  {
     26    $areas = array($areas);
     27  }
     28  if (!($config = unserialize($conf['FCKEditor'])))
     29  {
     30    $config = array();
     31  }
     32  $template->set_filename('fckeditor', realpath(FCK_PATH.'fckeditor.tpl'));
     33    $template->assign(
     34      array(
     35        'FCK_PATH'    => FCK_PATH,
     36        'FCK_config'  => $config,
     37        'FCK_areas'   => $areas,
     38        'FCK_WIDTH'   => $width,
     39        'FCK_HEIGHT'  => $height,
     40        'FCK_TOOLBAR' => $toolbar,
     41        )
     42      );
     43    $template->parse('fckeditor');
     44}
    1945?>
Note: See TracChangeset for help on using the changeset viewer.