本文整理汇总了PHP中FCKeditor类的典型用法代码示例。如果您正苦于以下问题:PHP FCKeditor类的具体用法?PHP FCKeditor怎么用?PHP FCKeditor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FCKeditor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: CreateEmail
function CreateEmail($mailto = '', $subject = '', $text = '')
{
$this->AddStrings($row);
if ($mailto == 'use_client_selection' && $_SESSION['use_client_selection']) {
$client_selection = join(' AND ', $_SESSION['use_client_selection']);
$row['use_client_selection'] = '1';
$emails = $this->GetValue("SELECT COUNT(*) FROM clients AS c WHERE subscribe=1 AND " . $client_selection);
$row['mailto'] = sprintf($this->str('client_selection'), $emails);
$row['mailto_readonly'] = 'READONLY';
} else {
$row['mailto'] = htmlspecialchars($mailto);
$row['use_client_selection'] = '0';
$row['client_selector']['value'] = ' ';
}
$row['subject'] = htmlspecialchars($subject);
$managers = sql_getRows("SELECT id, CONCAT(fullname,' <',email,'>') FROM admins WHERE email<>'' " . (is_root() ? '' : "AND id IN (" . join(',', $this->user['subst']) . ") AND fullname!=''") . " ORDER BY fullname", true);
$row['managers'] = $this->GetArrayOptions($managers, $this->user['id'], true);
###
include "editor/fckeditor.php";
$oFCKeditor = new FCKeditor();
$oFCKeditor->ToolbarSet = 'Common';
$oFCKeditor->Value = $text;
$row['editor'] = $oFCKeditor->ReturnFCKeditor('editor[html]', '100%', '100%');
###
return Parse($row, $this->name . '.tmpl');
}
开发者ID:romlg,项目名称:cms36,代码行数:26,代码来源:create_email.php
示例2: htmlEdit
/**
* @param $name 隐藏字段名
* @param $value 隐藏字段值
* @param $toolbar 工具栏样式,可选值 Basic Default
* @param $skin 面板,可选值 default office2003 silver
* @param $Lang 语言,可选值 zh-cn zh e
*
*/
public function htmlEdit($name, $value, $height = 420, $width = 720, $toolbar = 'Default', $skin = 'office2003', $Lang = 'en')
{
require_once __SITE_ROOT__ . DS . "www/js/FCKeditor/fckeditor.php";
$sBasePath = "/js/FCKeditor/";
$oFCKeditor = new FCKeditor($name);
$oFCKeditor->BasePath = $sBasePath;
if ($Lang) {
$oFCKeditor->Config['AutoDetectLanguage'] = false;
}
if ($Lang) {
$oFCKeditor->Config['DefaultLanguage'] = $Lang;
}
if ($skin) {
$oFCKeditor->Config['SkinPath'] = $sBasePath . 'editor/skins/' . $skin . '/';
}
if ($toolbar) {
$oFCKeditor->ToolbarSet = $toolbar;
}
if ($width) {
$oFCKeditor->Width = $width;
}
if ($height) {
$oFCKeditor->Height = $height;
}
$oFCKeditor->Value = $value;
return $oFCKeditor->CreateHtml();
}
开发者ID:dalinhuang,项目名称:ice-sanky,代码行数:35,代码来源:Controller.php
示例3: editor
function editor($fieldname, $content)
{
if (!is_file($this->coderoot . '/fckeditor/fckeditor.php')) {
return '<textarea name="' . $fieldname . '">' . htmlspecialchars($content) . '</textarea>';
}
include_once $this->coderoot . '/fckeditor/fckeditor.php';
if (!class_exists('FCKeditor')) {
return 'Editor class not found';
}
$oFCKeditor = new FCKeditor($fieldname);
$fckPath = getConfig("fckeditor_path");
$oFCKeditor->BasePath = $fckPath;
$oFCKeditor->ToolbarSet = 'Default';
$oFCKeditor->Value = $content;
$w = getConfig("fckeditor_width");
$h = getConfig("fckeditor_height");
if (isset($_SESSION["fckeditor_height"])) {
$h = sprintf('%d', $_SESSION["fckeditor_height"]);
}
# for version 2.0
if ($h < 400) {
$h = 400;
}
$oFCKeditor->Height = $h;
$oFCKeditor->Width = $w;
return $oFCKeditor->CreateHtml();
}
开发者ID:juvenal,项目名称:PHPlist,代码行数:27,代码来源:fckphplist.php
示例4: form_fckeditor
function form_fckeditor($data = '', $value = '', $extra = '')
{
$CI =& get_instance();
$fckeditor_basepath = $CI->config->item('fckeditor_basepath');
require_once $_SERVER["DOCUMENT_ROOT"] . '/' . $fckeditor_basepath . 'fckeditor.php';
$instanceName = is_array($data) && isset($data['name']) ? $data['name'] : $data;
$fckeditor = new FCKeditor($instanceName);
if ($fckeditor->IsCompatible()) {
$fckeditor->Value = html_entity_decode($value);
$fckeditor->BasePath = $fckeditor_basepath;
if ($fckeditor_toolbarset = $CI->config->item('fckeditor_toolbarset_default')) {
$fckeditor->ToolbarSet = $fckeditor_toolbarset;
}
if (is_array($data)) {
if (isset($data['value'])) {
$fckeditor->Value = html_entity_decode($data['value']);
}
if (isset($data['basepath'])) {
$fckeditor->BasePath = $data['basepath'];
}
if (isset($data['toolbarset'])) {
$fckeditor->ToolbarSet = $data['toolbarset'];
}
if (isset($data['width'])) {
$fckeditor->Width = $data['width'];
}
if (isset($data['height'])) {
$fckeditor->Height = $data['height'];
}
}
return $fckeditor->CreateHtml();
} else {
return form_textarea($data, $value, $extra);
}
}
开发者ID:abosmond,项目名称:simanis,代码行数:35,代码来源:MY_form_helper.php
示例5: editor
function editor($input_name, $input_value, $height = "480", $upfile = true)
{
$prefix = Swoole\Auth::$session_prefix;
$editor = new FCKeditor($input_name);
if (substr(WEBPATH, -1, 1) == '/') {
$editor->BasePath = WEBROOT . "/swoole_plugin/fckeditor/";
//指定编辑器路径
} else {
$editor->BasePath = WEBROOT . "swoole_plugin/fckeditor/";
//指定编辑器路径
}
$editor->ToolbarSet = "Default";
//编辑器工具栏有Basic(基本工具),Default(所有工具)选择
$editor->Width = "100%";
$editor->Height = $height;
$editor->Value = $input_value;
$editor->Config['AutoDetectLanguage'] = true;
$editor->Config['DefaultLanguage'] = 'en';
$FCKeditor = $editor->CreateHtml();
$ext = <<<HTML
<script language="javascript">
function upfile_success(filepath)
{
\tvar fck = FCKeditorAPI.GetInstance("content");
\tfck.InsertHtml("<img src='"+ filepath +"' />");
}
</script>
<iframe src="{$editor->BasePath}plus/upload_image.php?prefix={$prefix}" height="40" width="100%" frameborder="0" scrolling="no"></iframe>
HTML;
if ($upfile) {
$FCKeditor .= $ext;
}
return $FCKeditor;
}
开发者ID:netstao,项目名称:swoole.com,代码行数:34,代码来源:Swoole.plugin.php
示例6: FCKEditor
/**
* Get the current user
*
* @return NovemberUser
*/
public function FCKEditor($name, $value = '', $basePath = '')
{
$oFCKeditor = new FCKeditor($name);
$oFCKeditor->BasePath = $basePath . '/';
$oFCKeditor->Value = $value;
$oFCKeditor->Create();
}
开发者ID:nyeholt,项目名称:relapse,代码行数:12,代码来源:FCKEditor.php
示例7: cmsEditor
public function cmsEditor($name, $value, $options = null, $width = '100%', $height = '350')
{
//1. Nhung tap tin fckeditor vao file chay
require_once SCRIPTS_PATH . "/fckeditor/fckeditor_php5.php";
//2. Khai bao duong dan URL den thu muc fckeditor
$sBasePath = SRCIPTS_URL . '/fckeditor/';
//3. Khoi tao doi tuong FCKeditor
$oFCKeditor = new FCKeditor($name);
//4. Thiet lap duong den cho thuong BasePath
$oFCKeditor->BasePath = $sBasePath;
//Dua gia tri vao Editor
$oFCKeditor->Value = $value;
//Thay doi kich thuoc cua Editor
$oFCKeditor->Width = $width;
$oFCKeditor->Height = $height;
if (!isset($options['toolbar'])) {
$oFCKeditor->ToolbarSet = 'Default';
} else {
$oFCKeditor->ToolbarSet = $options['toolbar'];
}
if (!isset($options['language'])) {
$oFCKeditor->Config['AutoDetectLanguage'] = false;
$oFCKeditor->Config['DefaultLanguage'] = 'en';
} else {
$oFCKeditor->Config['AutoDetectLanguage'] = false;
$oFCKeditor->Config['DefaultLanguage'] = $options['language'];
}
//5. Tao FCKeditor
return $oFCKeditor->Create();
}
开发者ID:brianbui171,项目名称:website_zend_1.11,代码行数:30,代码来源:CmsEditor.php
示例8: FckEditor
/**
* i know it is not well liked to output this here, but for integration purposes it makes sense
*/
public function FckEditor($instance = 'content', $value = 'Enter text here', $height = 600, $width = 600, $fullToolbar = true)
{
$view = $this->view;
include 'Digitalus/editor/fckeditor.php';
?>
<script>
function FCKeditor_OnComplete( editorInstance )
{
}
</script>
<?php
$sBasePath = '/scripts/fckeditor/';
$oFCKeditor = new FCKeditor($instance);
$oFCKeditor->BasePath = $sBasePath;
$oFCKeditor->Config['SkinPath'] = $sBasePath . 'editor/skins/office2003/';
$oFCKeditor->Width = $width;
$oFCKeditor->Height = $height;
if ($fullToolbar) {
$oFCKeditor->ToolbarSet = 'Digitalus';
} else {
$oFCKeditor->ToolbarSet = 'Basic';
}
$oFCKeditor->Value = $value;
$oFCKeditor->Create();
}
开发者ID:ngukho,项目名称:ducbui-cms,代码行数:29,代码来源:FckEditor.php
示例9: Send_Email
function Send_Email($mailto = '', $subject = '', $text = '')
{
$this->AddStrings($row);
// Берем из сессии
$use_client_selection = get('use_client_selection', array(), 's');
if ($mailto == 'use_client_selection' && $use_client_selection) {
$client_selection = join(' AND ', $use_client_selection);
$row['use_client_selection'] = '1';
$emails = $this->GetValue("SELECT COUNT(*) FROM auth_users AS c WHERE subscribe=1 AND " . $client_selection);
$row['mailto'] = sprintf($this->str('client_selection'), $emails);
$row['mailto_readonly'] = 'READONLY';
} else {
$row['mailto'] = h($mailto);
$row['use_client_selection'] = '0';
$row['client_selector']['value'] = ' ';
}
$row['subject'] = h($subject);
$managers = sql_getRows("SELECT id, CONCAT(fullname,' <',email,'>') FROM admins WHERE email<>'' " . " AND fullname!='' ORDER BY fullname", true);
$row['managers'] = $this->GetArrayOptions($managers, $this->user['id'], true);
###
include_fckeditor();
$oFCKeditor = new FCKeditor();
$oFCKeditor->ToolbarSet = 'Common';
$oFCKeditor->Value = $text;
$row['editor'] = $oFCKeditor->ReturnFCKeditor('editor[html]', '100%', '100%');
###
return $this->Parse($row, $this->name . '.tmpl');
}
开发者ID:romlg,项目名称:cms36,代码行数:28,代码来源:send_email.php
示例10: SpGetEditor
function SpGetEditor($fname,$fvalue,$nheight="350",$etype="Basic",$gtype="print",$isfullpage="false")
{
if(!isset($GLOBALS['cfg_html_editor'])) $GLOBALS['cfg_html_editor']='fck';
if($gtype=="") $gtype = "print";
if($GLOBALS['cfg_html_editor']=='fck'){
require_once(dirname(__FILE__)."/../FCKeditor/fckeditor.php");
$fck = new FCKeditor($fname);
$fck->BasePath = $GLOBALS['cfg_cmspath'].'/include/FCKeditor/' ;
$fck->Width = '100%' ;
$fck->Height = $nheight ;
$fck->ToolbarSet = $etype ;
$fck->Config['FullPage'] = $isfullpage;
if($GLOBALS['cfg_fck_xhtml']=='Y'){
$fck->Config['EnableXHTML'] = 'true';
$fck->Config['EnableSourceXHTML'] = 'true';
}
$fck->Value = $fvalue ;
if($gtype=="print") $fck->Create();
else return $fck->CreateHtml();
}else{
require_once(dirname(__FILE__)."/../htmledit/dede_editor.php");
$ded = new DedeEditor($fname);
$ded->BasePath = $GLOBALS['cfg_cmspath'].'/include/htmledit/' ;
$ded->Width = '100%' ;
$ded->Height = $nheight ;
$ded->ToolbarSet = strtolower($etype);
$ded->Value = $fvalue ;
if($gtype=="print") $ded->Create();
else return $ded->CreateHtml();
}
}
开发者ID:BGCX262,项目名称:zyyhong-svn-to-git,代码行数:31,代码来源:inc_fun_funAdmin.php
示例11: getContent
function getContent()
{
$data = array();
$func = get('func', '', 'pg');
if (!empty($func)) {
$func = get('func', '', 'pg');
if (!empty($func)) {
$data = $this->{$func}();
}
} else {
global $user;
$data['current_user'] = $user['id'];
$data['managers'] = sql_getRows("SELECT id, CONCAT(login,' (',email,') ') as name FROM admins", true);
$this->AddStrings($data);
include_fckeditor();
$oFCKeditor = new FCKeditor();
$oFCKeditor->ToolbarSet = 'Common';
$oFCKeditor->Value = '';
$data['editor'] = $oFCKeditor->ReturnFCKeditor('fld[html]', '100%', '100%');
$this->AddStrings($data);
}
$tpl = strtolower($this->dir . '/' . $this->name . (!empty($func) ? '.' . $func : '') . '.tmpl');
if (is_file($tpl)) {
return Parse($data, $tpl);
} else {
return $data;
}
}
开发者ID:romlg,项目名称:cms36,代码行数:28,代码来源:email.php
示例12: render
function render()
{
include_once JIEQI_ROOT_PATH . '/lib/html/form/fckeditor/fckeditor.php';
$editor = new FCKeditor();
$editor->Value = $this->getValue();
return $editor->ReturnFCKeditor($this->getName(), $this->getWidth(), $this->getHeight());
}
开发者ID:thu0ng91,项目名称:jmc,代码行数:7,代码来源:formhtmleditor.php
示例13: smarty_function_editor
/**
* -------------------------------------------------------------
* @param InstanceName Editor instance name (form field name)
* @param Width optional width (css units)
* @param Height optional height (css units)
* @param CheckBrowser optional check the browser compatibility when rendering the editor
* @param DisplayErrors optional show error messages on errors while rendering the editor
*
*/
function smarty_function_editor($params, &$smarty)
{
global $ari;
require_once $ari->filesdir . DIRECTORY_SEPARATOR . 'scripts' . DIRECTORY_SEPARATOR . 'editor' . DIRECTORY_SEPARATOR . 'fckeditor.php';
if (!isset($params['InstanceName']) || empty($params['InstanceName'])) {
$smarty->trigger_error('fckeditor: required parameter "InstanceName" missing');
}
$oFCKeditor = new FCKeditor($params['InstanceName']);
if ($ari->mode == 'admin') {
$oFCKeditor->BasePath = $ari->adminaddress . '/scripts/editor/';
} else {
$oFCKeditor->BasePath = $ari->webaddress . '/scripts/editor/';
}
if (isset($params['Value'])) {
$oFCKeditor->Value = $params['Value'];
}
/* if (isset ($params['Width']))
$oFCKeditor->Width = $params['Width'];
if (isset ($params['Height']))
$oFCKeditor->Height = $params['Height']; */
$oFCKeditor->Config['DefaultLanguage'] = substr($ari->agent->getSelectedLang(), 0, 2);
$oFCKeditor->Config['CustomConfigurationsPath'] = $oFCKeditor->BasePath . 'config.js';
if (isset($params['simple']) && $params['simple'] == true) {
$oFCKeditor->ToolbarSet = 'Small';
}
//$oFCKeditor->Create() ;
return $oFCKeditor->CreateHtml();
}
开发者ID:pablius,项目名称:oob-n1,代码行数:38,代码来源:function.editor.php
示例14: EditForm
function EditForm()
{
$id = get('id');
if ($id) {
$row = $this->GetRow($id);
} else {
$row['visible'] = 1;
$row['content_type'] = 'html';
$row['text'] = '';
$row['user_id'] = '';
}
$row['private_checked'] = $row['user_id'] ? 'checked' : '';
$row['user_id'] = $GLOBALS['user']['id'];
$row['options'] = $this->getSetOptions('content_type', $row['content_type']);
$row['vis_etext'] = $row['content_type'] == 'text' ? 'show' : 'hide';
$row['vis_ehtml'] = $row['content_type'] == 'html' ? 'show' : 'hide';
###
include_fckeditor();
$oFCKeditor = new FCKeditor();
$oFCKeditor->ToolbarSet = 'Common';
$oFCKeditor->Value = $row['text'];
$row['editor'] = $oFCKeditor->ReturnFCKeditor('editor[html]', '100%', '100%');
###
$this->AddStrings($row);
return $this->Parse($row, $this->name . '.editform.tmpl');
}
开发者ID:romlg,项目名称:cms36,代码行数:26,代码来源:email_templates.php
示例15: get_edit_page
function get_edit_page()
{
$list = "";
if ($this->session->justloggedin == 1) {
$query = "select id, content from mdl_about where id=1";
$result = $this->db->query($query);
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$content = $row['content'];
}
$list = $list . "<table class='table table-hover' border='0'>";
$list = $list . "<tr>";
$oFCKeditor = new FCKeditor('editor');
$oFCKeditor->BasePath = $this->editor_path;
$oFCKeditor->Value = $content;
$editor = $oFCKeditor->Create(false);
$list = $list . "</td > {$editor}</td>";
$list = $list . "</tr>";
$list = $list . "<tr>";
$list = $list . "<td align='left' style='padding-left:0px'><button type='button' id='save_about' class='btn btn-primary' style='spacing-left:0px;'>Save</button></td>";
$list = $list . "</tr>";
$list = $list . "</table>";
} else {
$list .= "<p>You are not authenticated. <a href='https://medical2.com/login'><button class='btn btn-primary' id='relogin'>Login</button></a></p>";
}
return $list;
}
开发者ID:sirromas,项目名称:medical,代码行数:26,代码来源:About.php
示例16: _newsletterFckObjectCreate
/**
* Метод создания объекта FCKeditor
*
* @param string $val значение поля ввода
* @param int $height высота поля ввода
* @param string $name наименование поля ввода
* @param string $toolbar панель управления
* @return object объект FCKeditor
*/
function _newsletterFckObjectCreate($val, $height = 300, $name, $toolbar = 'Default')
{
$oFCKeditor = new FCKeditor($name);
$oFCKeditor->Height = $height;
$oFCKeditor->ToolbarSet = $toolbar;
$oFCKeditor->Value = $val;
$obj = $oFCKeditor->Create();
return $obj;
}
开发者ID:laiello,项目名称:avecms,代码行数:18,代码来源:class.newsletter.php
示例17: render_editor
function render_editor()
{
include_once FCKeditor_DIR . 'fckeditor.php';
$editor = new FCKeditor($this->_process_name_attribute($this->get_attribute('name')));
$editor->BasePath = FCKeditor_BasePath;
$editor->Value = $this->get_value();
$editor->Width = $this->get_attribute('width');
$editor->Height = $this->get_attribute('height');
$editor->Create();
}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:10,代码来源:fckeditor_component.class.php
示例18: createEditer
function createEditer($inputName, $inputValue = '', $width = '550', $height = '400', $toolbarSet = 'Basic')
{
$editor = new FCKeditor($inputName);
$editor->BasePath = "../FCKeditor/";
$editor->ToolbarSet = $toolbarSet;
$editor->Width = $width;
$editor->Height = $height;
$editor->Value = $inputValue;
$GLOBALS['smarty']->assign("editor", $editor->CreateHtml());
}
开发者ID:boxiansoft,项目名称:chuhan,代码行数:10,代码来源:FCKediter.php
示例19: create_html_editor
function create_html_editor($input_name, $input_value = '')
{
$editor = new FCKeditor($input_name);
$editor->BasePath = '../includes/fckeditor/';
$editor->ToolbarSet = 'Normal';
$editor->Width = '100%';
$editor->Height = '320';
$editor->Value = $input_value;
return $editor->CreateHtml();
}
开发者ID:reake,项目名称:share-travel,代码行数:10,代码来源:lib_main.php
示例20: getFckeditor
/**
* 创建 FCKeditor 编辑器
* @param $initInfo :初始化的值
* @param $fckName :Fckeditor提交后的表单域名称
* @param $width :Fckeditor编辑器的宽度
* @param $height :Fckeditor编辑器的高度
*/
function getFckeditor($initInfo = '', $fckName = 'fckEditInfo', $width = '100%', $height = '600')
{
include_once SITEWEB_PATH . "/fckeditor/fckeditor.php";
$oFCKeditor = new FCKeditor($fckName);
$oFCKeditor->BasePath = "fckeditor/";
$oFCKeditor->Width = $width;
$oFCKeditor->Height = $height;
$oFCKeditor->Value = $initInfo;
//默认的内容
return $oFCKeditor->Create();
}
开发者ID:laiello,项目名称:quickbug,代码行数:18,代码来源:Function.inc.php
注:本文中的FCKeditor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论