source: extensions/FCKEditor/main.inc.php

Last change on this file was 32426, checked in by ddtddt, 3 years ago

[FCKEditor] piwigo 11

File size: 1.2 KB
Line 
1<?php
2/*
3Plugin Name: FCK Editor
4Version: auto
5Description: WYSIWYG editor.
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=264
7Author: P@t
8Author URI: http://www.gauchon.com
9*/
10
11if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
12
13define('FCK_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
14
15add_event_handler('loading_lang', 'FCK_loading_lang');   
16function FCK_loading_lang(){
17  load_language('plugin.lang', FCK_PATH);
18}
19
20
21if (script_basename() == 'admin')
22{
23  include(FCK_PATH.'fckeditor.php');
24}
25
26function set_fckeditor_instance($areas=array(), $toolbar='Basic', $width='750px', $height='200px')
27{
28  global $template, $conf;
29
30  if (is_string($areas))
31  {
32    $areas = array($areas);
33  }
34  if (!($config = unserialize($conf['FCKEditor'])))
35  {
36    $config = array();
37  }
38  $template->set_filename('fckeditor', realpath(FCK_PATH.'fckeditor.tpl'));
39    $template->assign(
40      array(
41        'FCK_PATH'    => FCK_PATH,
42        'FCK_config'  => $config,
43        'FCK_areas'   => $areas,
44        'FCK_WIDTH'   => $width,
45        'FCK_HEIGHT'  => $height,
46        'FCK_TOOLBAR' => $toolbar,
47        )
48      );
49    $template->parse('fckeditor');
50}
51?>
Note: See TracBrowser for help on using the repository browser.