public function doRender($rowIndex = null) { $ctx = parent::$settings->getContextPath(); $finder = new CKFinder("{$ctx}/lib/component/input/ckfinder/"); //$finder->SelectFunction = 'ShowFileInfo'; return $finder->CreateHtml(); }
public static function SetupFCKeditor(&$editorObj, $basePath = CKFINDER_DEFAULT_BASEPATH, $imageType = null, $flashType = null) { if (empty($basePath)) { $basePath = CKFINDER_DEFAULT_BASEPATH; } // If it is a path relative to the current page. if ($basePath[0] != '/') { $basePath = substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], '/') + 1) . $basePath; } $ckfinder = new CKFinder($basePath); $url = $ckfinder->_BuildUrl(); $editorObj->Config['LinkBrowserURL'] = $url; $editorObj->Config['ImageBrowserURL'] = $url . '?type=' . (empty($imageType) ? 'Images' : $imageType); $editorObj->Config['FlashBrowserURL'] = $url . '?type=' . (empty($flashType) ? 'Flash' : $flashType); }
public function indexAction() { $config = $this->getServiceLocator()->get('CKFinderModule\\Config'); $ckFinderPath = realpath($config['ckfinder_vendor_path']) . '/'; if (!file_exists($ckFinderPath . 'ckfinder.php')) { throw new \Exception('The ckfinder path "' . $ckFinderPath . '" does not seem to be valid'); } // Otherwise, we're going to need the CKFinder class require_once $ckFinderPath . 'ckfinder.php'; // You can use the "CKFinder" class to render CKFinder in a page: $finder = new \CKFinder(); // The path for the installation of CKFinder (default = "/ckfinder/"). $finder->BasePath = $config['ckfinder_basepath']; $finder->Width = $config['ckfinder_width']; $finder->Height = $config['ckfinder_height']; $finder->Create(); return $this->response; }
public static function SetupFCKeditor(&$editorObj, $basePath = CKFINDER_DEFAULT_BASEPATH, $imageType = null, $flashType = null) { if (empty($basePath)) { $basePath = CKFINDER_DEFAULT_BASEPATH; } // If it is a path relative to the current page. if ($basePath[0] != '/') { $basePath = substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], '/') + 1) . $basePath; } $ckfinder = new CKFinder($basePath); $url = $ckfinder->_BuildUrl(); $editorObj->Config['LinkBrowserURL'] = $url; $editorObj->Config['ImageBrowserURL'] = $url . '?type=' . (empty($imageType) ? 'Images' : $imageType); $editorObj->Config['FlashBrowserURL'] = $url . '?type=' . (empty($flashType) ? 'Flash' : $flashType); $dir = substr($url, 0, strrpos($url, "/") + 1); $editorObj->Config['LinkUploadURL'] = $dir . urlencode('core/connector/php/connector.php?command=QuickUpload&type=Files'); $editorObj->Config['ImageUploadURL'] = $dir . urlencode('core/connector/php/connector.php?command=QuickUpload&type=') . (empty($imageType) ? 'Images' : $imageType); $editorObj->Config['FlashUploadURL'] = $dir . urlencode('core/connector/php/connector.php?command=QuickUpload&type=') . (empty($flashType) ? 'Flash' : $flashType); }
public function init($content = null) { require_once $this->ckeditor_path . "ckeditor.php"; require_once $this->ckfinder_path . "ckfinder.php"; $ckeditor = new CKEditor(); $ckeditor->returnOutput = true; $ckeditor->basePath = $this->ckeditor_webpath; CKFinder::SetupCKEditor($ckeditor, $this->ckfinder_webpath); //die($this->_content); $contentarea = $ckeditor->editor("editor_content", $content); return $contentarea; }
the "Image" or "Link" icons and then the "<strong>Browse Server</strong>" button.</div> <p> <?php include_once '../../../fckeditor/fckeditor.php'; require_once '../../ckfinder.php'; // This is a check for the FCKeditor class. If not defined, the paths must be checked. if (!class_exists('FCKeditor')) { echo '<br><strong><span class="error">Error</span>: FCKeditor not found</strong>. ' . 'This sample assumes that FCKeditor (not included with CKFinder) is installed in ' . 'the "fckeditor" sibling folder of the CKFinder installation folder. If you have it installed in ' . 'a different place, just edit this file, changing the wrong paths in the include ' . '(line 31) and the "BasePath" values (line 47).'; } else { $fckeditor = new FCKeditor('FCKeditor1'); $fckeditor->BasePath = '../../../fckeditor/'; $fckeditor->Value = '<p>Just click the <b>Image</b> or <b>Link</b> button, and then <b>"Browse Server"</b>.</p>'; // Just call CKFinder::SetupFCKeditor before calling Create() or CreateHtml() // in FCKeditor. The second parameter (optional), is the path for the // CKFinder installation (default = "/ckfinder/"). CKFinder::SetupFCKeditor($fckeditor, '../../'); $fckeditor->Create(); } ?> </p> <div id="footer"> <hr /> <p> CKFinder - Ajax File Manager - <a class="samples" href="http://cksource.com/ckfinder/">http://cksource.com/ckfinder</a> </p> <p id="copy"> Copyright © 2007-2014, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved. </p> </div> </body> </html>
<?php include_once "../ckeditor_ckfinder/ckeditor/ckeditor.php"; //引用关键文件 include_once "../ckeditor_ckfinder/ckfinder/ckfinder.php"; //引用关键文件 $initialValue = ''; //编辑区域显示的默认值 $CKEditor = new CKEditor(); //实例化 $CKEditor->basePath = '../ckeditor_ckfinder/ckeditor/'; //设定ckeditor的目录 $CKEditor->config['width'] = 1200; //宽度 $CKEditor->config['height'] = 350; //高度 $config['skin'] = 'office2003'; //kama,office2003,v2 CKFinder::SetupCKEditor($CKEditor, '../ckeditor_ckfinder/ckfinder/'); //定义ckfinder的目录 $CKEditor->editor("content", $initialValue, $config); //建立editor1窗口,editor1的名字,$initialValue默认值,$config设置皮肤
$warned = true; } // This is a check for the CKEditor PHP integration file. If not found, the paths must be checked. // Usually you'll not include it in your site and use correct path in line 57 and basePath in line 70 instead. // Remove this code after correcting the include_once statement. if (!@file_exists('../../../ckeditor/ckeditor.php')) { if (@file_exists('../../../ckeditor/ckeditor.js') || @file_exists('../../../ckeditor/ckeditor_source.js')) { printNotFound('CKEditor 3.1+'); } else { printNotFound('CKEditor'); } } include_once '../../../ckeditor/ckeditor.php'; require_once '../../ckfinder.php'; // This is a check for the CKEditor class. If not defined, the paths in lines 57 and 70 must be checked. if (!class_exists('CKEditor')) { printNotFound('CKEditor'); } else { $initialValue = '<p>Just click the <b>Image</b> or <b>Link</b> button, and then <b>"Browse Server"</b>.</p>'; $ckeditor = new CKEditor(); $ckeditor->basePath = '../../../ckeditor/'; // Just call CKFinder::SetupCKEditor before calling editor(), replace() or replaceAll() // in CKEditor. The second parameter (optional), is the path for the // CKFinder installation (default = "/ckfinder/"). CKFinder::SetupCKEditor($ckeditor, '../../'); $ckeditor->editor('CKEditor1', $initialValue); } ?> </body> </html>
function SetupFCKeditor(&$editorObj, $basePath = CKFINDER_DEFAULT_BASEPATH, $imageType = null, $flashType = null) { if (empty($basePath)) { $basePath = CKFINDER_DEFAULT_BASEPATH; } // If it is a path relative to the current page. if ($basePath[0] != '/') { $basePath = substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], '/') + 1) . $basePath; } $ckfinder = new CKFinder($basePath); $ckfinder->SetupFCKeditorObject($editorObj, $imageType, $flashType); }
<?php require_once $_SERVER['SRVROOT'] . '/cms/admin/config/ini.php'; require_once $_SERVER['SRVROOT'] . FCK . 'fckeditor.php'; // 1. 以正確的絕對路徑 include fckeditor.php 主程式 require_once $_SERVER['SRVROOT'] . '/cms/lib/editor/ckfinder/ckfinder.php'; $oFCKeditor = new FCKeditor('content'); //2. FCKeditor 元件 具現化 new FCKeditor('表單欄位名稱') $oFCKeditor->Width = '100%'; $oFCKeditor->Height = '200px'; $oFCKeditor->BasePath = WEBROOT . FCK; //3.重要參數: 以 url路徑指定 FCKeditor 主程式所在位置 $oFCKeditor->ToolbarSet = 'myBasic'; //載入內容 $oFCKeditor->Value = $content; CKFinder::SetupFCKeditor($oFCKeditor, WEBROOT . '/cms/lib/editor/ckfinder/'); $oFCKeditor->Create(); //4. 執行 Create() 動作完成設計步驟
<td width="313" class="desc">Título:</td> <td colspan="3" class="campo"><input name="titulo" type="text" class="form" size="50" maxlength="80" /> *</td> </tr> <tr> <td class="desc">Sub Título:</td> <td colspan="3" class="campo"><input name="subtitulo" type="text" class="form" size="50" maxlength="55" /></td> </tr> <tr> <td class="desc">Descripción:</td> <td colspan="3" class="campo"><?php include_once "admini/ckeditor/ckeditor.php"; include_once 'admini/ckfinder/ckfinder.php'; $CKEditor = new CKEditor(); $CKEditor->basePath = '/admini/ckeditor/'; $CKFinder = new CKFinder(); $CKFinder->BasePath = '/admini/ckfinder/'; $CKFinder->SetupCKEditorObject($CKEditor); $CKEditor->config["width"] = 650; $CKEditor->config["height"] = 300; $CKEditor->editor("descripcion", " "); ?> </td> </tr> <tr class="tabla"> <!-- <td>Estado de Ubicación:</td> <td colspan="3"><select class="form" name="id_estado" onChange="cargar_ciudad(this.value,0);"> <option value="0">Seleccione</option> <?php /*$sql_edo=mysql_query("SELECT * FROM estado ORDER BY nombre ASC"); while($edo=mysql_fetch_array($sql_edo))
/** * Tests CKFinder->SetupCKEditorObject() */ public function testSetupCKEditorObject() { // TODO Auto-generated CKFinderTest->testSetupCKEditorObject() $this->markTestIncomplete("SetupCKEditorObject test not implemented"); $this->cKFinder->SetupCKEditorObject(); }
<textarea name="txtWarranty_offer<?php echo $ln; ?> " cols="80" rows="6" id="txtWarranty_offer<?php echo $ln; ?> "><?php echo $warranty_offer; ?> </textarea> <?php $ckeditor = new CKEditor(); $ckeditor->basePath = 'ckeditor/'; CKFinder::SetupCKEditor($ckeditor, 'ckfinder/'); $ckeditor->replace("txtWarranty_offer" . $ln); ?> </td> </tr> <tr> <td width="15%" class="smallfont" align="right"><?php echo TNOTSHOW; ?> </td> <td width="1%" class="smallfont" align="center"></td> <td width="83%" class="smallfont"> <input type="checkbox" name="chkStatus<?php echo $ln; ?>
<?php require_once $ckEditor; require_once $ckFinder; $oCKeditor = new CKeditor(get_class($model) . '[' . $attribute . ']'); $oCKeditor->basePath = $ckBasePath; if (isset($config) && is_array($config)) { foreach ($config as $key => $value) { $oCKeditor->config[$key] = $value; } } CKFinder::SetupCKEditor($oCKeditor, Yii::app()->request->baseUrl . '/ckfinder/'); $oCKeditor->editor(get_class($model) . '[' . $attribute . ']', $defaultValue);
/** * Updates the AdminFrontendObject */ private function updateHTML() { $content = "<form action=\"" . $this->action . "\" method = \"" . $this->method . "\">"; foreach ($this->inputs as $input) { $content .= "<fieldset>"; $content .= "<label>" . $input['label'] . "</label>"; if ($input['type'] == "ckeditor") { $content .= "<br/><br/>"; $ckeditor = new CKEditor(); if ($input['readonly']) { $ckeditor->config['readOnly'] = true; } $ckeditor->basePath = '../lib/ckeditor/'; $ckfinder = new CKFinder(); $ckfinder->BasePath = '../lib/ckfinder/'; $ckfinder->SetupCKEditorObject($ckeditor); $ckeditor->returnOutput = true; $content .= $ckeditor->editor($input['name'], $input['value']); } else { if ($input['type'] == "radio") { foreach ($input["radios"] as $radio => $value) { $content .= '<input type="radio" name="' . $input['name'] . '" value="' . $value . '" '; if ($radio == $input['selected']) { $content .= ' checked'; } $content .= '> ' . $radio; } } else { if ($input['type'] == "textarea") { $content .= "<textarea rows=\"20\" name=\"" . $input['name'] . "\" "; if ($input['readonly']) { $content .= 'disabled="disabled" '; } if ($input['required']) { $content .= 'required="required" '; } $content .= ">" . $input['value'] . "</textarea>"; } else { $content .= "<input type=\"" . $input['type'] . "\" name=\"" . $input['name'] . "\" value=\"" . $input['value'] . "\" "; if ($input['required']) { $content .= " required=\"required\" "; } if ($input['readonly']) { $content .= 'disabled="disabled" '; } $content .= '>'; } } } $content .= "</fieldset>"; } parent::setContent($content); if (count($this->buttons) > 0) { $footer = "<div class=\"submit_link\">"; foreach ($this->selects as $name => $items) { if (!is_array($items)) { continue; } $footer .= '<select name="' . $name . '">'; foreach ($items as $optionname => $optionvalue) { $footer .= '<option value="' . $optionvalue . '">' . $optionname . '</option>'; } $footer .= '</select>'; } foreach ($this->buttons as $button) { if ($button['url'] != null) { $footer .= '<a href="' . $button['url'] . '">'; $footer .= "<input type=\"button\" value=\"" . $button['text'] . "\" "; if ($button['blue']) { $footer .= 'class="alt_btn" >'; } else { $footer .= ">"; } $footer .= '</a>'; } else { $footer .= "<input type=\"submit\" value=\"" . $button['text'] . "\" "; if ($button['blue']) { $footer .= 'class="alt_btn" >'; } else { $footer .= ">"; } } } $footer .= "</div></form>"; parent::setFooter($footer); } else { parent::setContent(parent::getContent() . "</form>"); } }
} } $isList = true; for ($i = 0, reset($val); $i < count($val); $i++, next($val)) { if (key($val) !== $i) { $isList = false; break; } } $result = array(); if ($isList) { foreach ($val as $v) { $result[] = $this->jsEncode($v); } return '[ ' . join(', ', $result) . ' ]'; } else { foreach ($val as $k => $v) { $result[] = $this->jsEncode($k) . ': ' . $this->jsEncode($v); } return '{ ' . join(', ', $result) . ' }'; } } } include_once 'ckfinder/ckfinder.php'; $ckeditor = new CKEditor(); $ckeditor->basePath = '/ckeditor/'; $ckfinder = new CKFinder(); $ckfinder->BasePath = '/ckfinder/'; // Note: BasePath property in CKFinder class starts with capital letter $ckfinder->SetupCKEditorObject($ckeditor); $ckeditor->editor('CKEditor1', htmlspecialchars_decode($postedValue));
require '../startOrongo.php'; startOrongo('admin_media'); Security::promptAuth(); if (getUser()->getRank() != RANK_ADMIN) { header("Location: " . orongoURL("orongo-admin/index.php?msg=0")); exit; } if (isset($_SERVER['QUERY_STRING'])) { $type = $_SERVER['QUERY_STRING']; } else { $type = null; } $types = array("files", "images"); if ($type != null) { if (!in_array($type, $types)) { $type = null; } $type = strtoupper(substr($type, 0, 1)) . substr($type, 1); $pageTitle = "Gallery"; } if ($type == null) { $pageTitle = "Media"; } $media = new AdminFrontend(); $media->main(array("time" => time(), "page_title" => $pageTitle, "page_template" => "dashboard")); $ckfinder = new CKFinder(orongoURL("lib/ckfinder/")); if ($type != null) { $ckfinder->ResourceType = $type; } $media->addObject(new AdminFrontendObject(100, l("Media Manager") . " - " . l("Powered by") . " CKFinder", $ckfinder->CreateHTML(), null, false)); $media->render();
</script> </head> <body> <h1 class="samples"> CKFinder - Sample - Standalone </h1> <div class="description"> CKFinder may be used in standalone mode inside any page, to create a repository manager with ease. You may define a custom JavaScript function to be called when an image is selected (double-clicked).</div> <p style="padding-left: 30px; padding-right: 30px;"> <?php require_once '../../ckfinder.php'; // You can use the "CKFinder" class to render CKFinder in a page: $finder = new CKFinder(); $finder->BasePath = '../../'; // The path for the installation of CKFinder (default = "/ckfinder/"). $finder->SelectFunction = 'ShowFileInfo'; // The default height is 400. $finder->Height = 600; $finder->Create(); // It can also be done in a single line, calling the "static" // Create( basePath, width, height, selectFunction ) function: // CKFinder::CreateStatic( '../../', null, null, 'ShowFileInfo' ) ; ?> </p> <div id="footer"> <hr /> <p> CKFinder - Ajax File Manager - <a class="samples" href="http://cksource.com/ckfinder/">http://cksource.com/ckfinder</a>
//prints($currency); exit; if (isset($arr[0]['vCurrency']) && trim($arr[0]['vCurrency']) != '') { $arr[0]['vCurrency'] = @explode(',', $arr[0]['vCurrency']); } else { if (!isset($arr[0]['vCurrency']) || trim($arr[0]['vCurrency']) == '') { $arr[0]['vCurrency'] = array(); } } $arr[0]['eCryptAlgo'] = isset($arr[0]['eCryptAlgo']) ? $arr[0]['eCryptAlgo'] : ''; $cryptAlgo = $gdbobj->getEnumSelect("" . PRJ_DB_PREFIX . "_organization_default_settings", "eCryptAlgo", "Data[eCryptAlgo]", "eCryptAlgo", "", "" . $arr[0]['eCryptAlgo'] . "", " class='' title='" . $smarty->get_template_vars('LBL_SELECT') . " " . $smarty->get_template_vars('LBL_ENCRYPTION_METHOD') . "' ", "", "Select Encryption Method"); //------------------ TO CONVERT CKEDITOR FROM TEXTAREA --------------------------------------// include_once CK_EDITOR_PATH . 'ckeditor.php'; include_once CK_EDITOR_PATH . 'ckfinder/ckfinder.php'; $ckeditor = new CKEditor(); $ckeditor->basePath = CK_EDITOR_URL; $ckfinder = new CKFinder(); $ckfinder->BasePath = SITE_FOLDER . 'components/ckeditor/ckfinder/'; // Note: BasePath property in CKFinder class starts with capital letter $ckfinderpath = SITE_FOLDER . 'components/ckeditor/ckfinder/'; $ckfinder->SetupCKEditorObject($ckeditor); if (isset($ENABLE_AUCTION) && $ENABLE_AUCTION == 'Yes') { $awardStatus = $stMstrObj->getDetails('*, vStatus_' . LANG . ' as vStatus', " AND vForAuction LIKE '%RFQ2 Award,%' AND vStatus_en LIKE 'Auth%' ", " iDisplayOrder ASC "); $awardAcceptStatus = $stMstrObj->getDetails('*, vStatus_' . LANG . ' as vStatus', " AND vForAuction LIKE '%RFQ2 Award Acceptance%' AND vStatus_en LIKE 'Auth%' ", " iDisplayOrder ASC "); // pr($awardAcceptStatus); exit; $smarty->assign('awardStatus', $awardStatus); $smarty->assign('awardAcceptStatus', $awardAcceptStatus); } $rfq2awrdacptsel = array(); $rfq2awrdstssel = array(); if ($orgdtls[0]['eOrganizationType'] == 'Buyer2') { if (trim($arr[0]['vRFQ2AwardAcceptLevel']) != '') {
public static function SetupCKEditor(&$editorObj, $basePath = CKFINDER_DEFAULT_BASEPATH, $imageType = null, $flashType = null) { if (empty($basePath)) { $basePath = CKFINDER_DEFAULT_BASEPATH; } $ckfinder = new CKFinder($basePath); $ckfinder->SetupCKEditorObject($editorObj, $imageType, $flashType); }
function show_fckeditor($name, $toolbarset = 'Admin', $expand_toolbar = true, $height = "200", $value = "", $width = null) { include_once ROOT_DIR . 'ckeditor/ckeditor_php5.php'; include_once ROOT_DIR . 'ckfinder/ckfinder.php'; $editor = new CKEditor(ROOT_DIR . 'ckeditor'); $editor->config['toolbar'] = $toolbarset; $editor->config['toolbarStartupExpanded'] = $expand_toolbar; $editor->config['height'] = $height; CKFinder::SetupCKEditor($editor, '/ckfinder/'); if ($width) { $editor->config['width'] = $width; } $editor->editor($name, $value); }