| 1 | <?php | 
|---|
| 2 | # -- BEGIN LICENSE BLOCK --------------------------------------- | 
|---|
| 3 | # | 
|---|
| 4 | # This file is part of Dotclear 2. | 
|---|
| 5 | # | 
|---|
| 6 | # Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear | 
|---|
| 7 | # Licensed under the GPL version 2.0 license. | 
|---|
| 8 | # See LICENSE file or | 
|---|
| 9 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | 
|---|
| 10 | # | 
|---|
| 11 | # -- END LICENSE BLOCK ----------------------------------------- | 
|---|
| 12 |  | 
|---|
| 13 | if (!defined('DC_CONTEXT_ADMIN')) { return; } | 
|---|
| 14 |  | 
|---|
| 15 | $_menu['Plugins']->addItem('dcCKEditor', | 
|---|
| 16 | $core->adminurl->get('admin.plugin.dcCKEditor'), | 
|---|
| 17 | dcPage::getPF('dcCKEditor/imgs/icon.png'), | 
|---|
| 18 | preg_match('/'.preg_quote($core->adminurl->get('admin.plugin.dcCKEditor')).'(&.*)?$/', $_SERVER['REQUEST_URI']), | 
|---|
| 19 | $core->auth->check('admin,contentadmin', $core->blog->id) | 
|---|
| 20 | ); | 
|---|
| 21 |  | 
|---|
| 22 | $self_ns = $core->blog->settings->addNamespace('dcckeditor'); | 
|---|
| 23 |  | 
|---|
| 24 | if ($self_ns->active) { | 
|---|
| 25 | $core->addEditorFormater('dcCKEditor','xhtml',create_function('$s','return $s;')); | 
|---|
| 26 |  | 
|---|
| 27 | $core->addBehavior('adminPostEditor',array('dcCKEditorBehaviors','adminPostEditor')); | 
|---|
| 28 | $core->addBehavior('adminPopupMedia',array('dcCKEditorBehaviors','adminPopupMedia')); | 
|---|
| 29 | $core->addBehavior('adminPopupLink',array('dcCKEditorBehaviors','adminPopupLink')); | 
|---|
| 30 | $core->addBehavior('adminPopupPosts',array('dcCKEditorBehaviors','adminPopupPosts')); | 
|---|
| 31 |  | 
|---|
| 32 | $core->addBehavior('adminMediaURL',array('dcCKEditorBehaviors','adminMediaURL')); | 
|---|
| 33 | } | 
|---|