コード例 #1
0
 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);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
ファイル: CKFinderTest.php プロジェクト: ade24/vcorner
 /**
  * Tests CKFinder->_BuildUrl()
  */
 public function test_BuildUrl()
 {
     // TODO Auto-generated CKFinderTest->test_BuildUrl()
     $this->markTestIncomplete("_BuildUrl test not implemented");
     $this->cKFinder->_BuildUrl();
 }