當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CKFinder類代碼示例

本文整理匯總了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();
 }
開發者ID:aeberh,項目名稱:php-movico,代碼行數:7,代碼來源:FileBrowser.php

示例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);
 }
開發者ID:kingwang317,項目名稱:it4fun-guam,代碼行數:15,代碼來源:ckfinder_php5.php

示例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;
 }
開發者ID:JaapMoolenaar,項目名稱:CKFinderModule,代碼行數:18,代碼來源:BrowseController.php

示例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);
 }
開發者ID:kingwang317,項目名稱:it4fun-guam,代碼行數:19,代碼來源:ckfinder_php5.php

示例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;
 }
開發者ID:baowzh,項目名稱:renfangbaosong,代碼行數:12,代碼來源:CKEditor.php

示例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>&quot;Browse Server&quot;</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 &copy; 2007-2014, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
		</p>
	</div>
</body>
</html>
開發者ID:pantasio,項目名稱:jollyany,代碼行數:31,代碼來源:fckeditor.php

示例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設置皮膚
開發者ID:ywang2014,項目名稱:WebSys,代碼行數:22,代碼來源:ckeditor_init.php

示例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>&quot;Browse Server&quot;</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>
開發者ID:nstungxd,項目名稱:F2CA5,代碼行數:30,代碼來源:ckeditor.php

示例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);
 }
開發者ID:laiello,項目名稱:tix-consultorios,代碼行數:12,代碼來源:ckfinder_php4.php

示例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() 動作完成設計步驟
開發者ID:kingwang317,項目名稱:it4fun-guam,代碼行數:18,代碼來源:ezEditor.php

示例11: CKEditor

  <td width="313" class="desc">T&iacute;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&iacute;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&oacute;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&oacute;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))
開發者ID:seven07ve,項目名稱:vendorepuestos,代碼行數:31,代碼來源:vende.php

示例12: testSetupCKEditorObject

 /**
  * Tests CKFinder->SetupCKEditorObject()
  */
 public function testSetupCKEditorObject()
 {
     // TODO Auto-generated CKFinderTest->testSetupCKEditorObject()
     $this->markTestIncomplete("SetupCKEditorObject test not implemented");
     $this->cKFinder->SetupCKEditorObject();
 }
開發者ID:ade24,項目名稱:vcorner,代碼行數:9,代碼來源:CKFinderTest.php

示例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;
    ?>
開發者ID:bestwishforyou95,項目名稱:congnghemoitruong,代碼行數:30,代碼來源:module_pro_m.php

示例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);
開發者ID:GsHatRed,項目名稱:Yiitest,代碼行數:13,代碼來源:CKEditorView.php

示例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>");
     }
 }
開發者ID:JacoRuit,項目名稱:orongocms,代碼行數:92,代碼來源:frontend_AdminFrontend.php


注:本文中的CKFinder類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。