string wanted editor
* @param context string page context (post,page,comment,event,...)
* @param tags array array of ids into inject editor
* @param syntax string wanted syntax (xhtml)
*/
public static function adminPostEditor($editor='',$context='',array $tags=array(),$syntax='xhtml') {
if (empty($editor) || $editor != 'dcCKEditor' || $syntax != 'xhtml') { return;}
$config_js = self::$config_url;
if (!empty($context)) {
$config_js .= '&context='.$context;
}
$res =
'\n".
dcPage::jsLoad(self::$p_url.'/js/ckeditor/ckeditor.js').
dcPage::jsLoad(self::$p_url.'/js/ckeditor/adapters/jquery.js').
dcPage::jsLoad($config_js);
if ($GLOBALS['core']->auth->user_prefs->interface->htmlfontsize) {
$res .=
'\n";
}
return $res;
}
public static function adminPopupMedia($editor='') {
if (empty($editor) || $editor!='dcCKEditor') { return;}
return dcPage::jsLoad(self::$p_url.'/js/popup_media.js');
}
public static function adminPopupLink($editor='') {
if (empty($editor) || $editor!='dcCKEditor') { return;}
return dcPage::jsLoad(self::$p_url.'/js/popup_link.js');
}
public static function adminPopupPosts($editor='') {
if (empty($editor) || $editor!='dcCKEditor') { return;}
return dcPage::jsLoad(self::$p_url.'/js/popup_posts.js');
}
public static function adminMediaURLParams($p) {
if (!empty($_GET['editor'])) {
$p['editor'] = html::sanitizeURL($_GET['editor']);
}
}
public static function getTagsContext() {
return self::$tagsContext;
}
}