本文整理汇总了PHP中CKFinder类的典型用法代码示例。如果您正苦于以下问题:PHP CKFinder类的具体用法?PHP CKFinder怎么用?PHP CKFinder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CKFinder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doRender
public function doRender($rowIndex = null)
{
$ctx = parent::$settings->getContextPath();
$finder = new CKFinder("{$ctx}/lib/component/input/ckfinder/");
//$finder->SelectFunction = 'ShowFileInfo';
return $finder->CreateHtml();
}
示例2: SetupFCKeditor
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);
}
示例3: indexAction
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;
}
示例4: SetupFCKeditor
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);
}
示例5: init
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;
}
示例6: FCKeditor
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>
示例7: CKEditor
<?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设置皮肤
示例8: printNotFound
$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>
示例9: SetupFCKeditor
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);
}
示例10: FCKeditor
<?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() 動作完成設計步驟
示例11: CKEditor
<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))
示例12: testSetupCKEditorObject
/**
* Tests CKFinder->SetupCKEditorObject()
*/
public function testSetupCKEditorObject()
{
// TODO Auto-generated CKFinderTest->testSetupCKEditorObject()
$this->markTestIncomplete("SetupCKEditorObject test not implemented");
$this->cKFinder->SetupCKEditorObject();
}
示例13: CKEditor
<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;
?>
示例14: CKeditor
<?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);
示例15: updateHTML
/**
* 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>");
}
}