TShopping

 找回密碼
 註冊
搜索
查看: 1891|回復: 0
打印 上一主題 下一主題

[教學] CKeditor 4.11.1 網頁編輯器與CKfinder 2.6.2.1 圖片上傳PHP5.4應用

[複製鏈接]
跳轉到指定樓層
1#
發表於 2018-11-30 21:09:55 | 只看該作者 |只看大圖 回帖獎勵 |倒序瀏覽 |閱讀模式
 
Push to Facebook
在搜尋引擎不停改版網頁不得不進入https
所以後台編輯器圖片上傳也變得不能用了
不得已又請教了谷哥大神
多方嘗試後,找到
CKeditor 4.11.1 網頁編輯器與CKfinder 2.6.2.1 圖片上傳可以用



檔案下載了以後,覆蓋之前檔案
找到 ckeditor/config.js
  1. CKEDITOR.editorConfig = function( config ) {
  2.         // Define changes to default configuration here. For example:
  3.         // config.language = 'fr';
  4.         // config.uiColor = '#AADC6E';
  5. }
複製代碼


內加入
  1. // Remove some buttons provided by the standard plugins, which are
  2.         // not needed in the Standard(s) toolbar.
  3.         config.removeButtons = 'Underline,Subscript,Superscript';

  4.         // Set the most common block elements.
  5.         config.format_tags = 'p;h1;h2;h3;pre';

  6.         // Simplify the dialog windows.
  7.         config.removeDialogTabs = 'image:advanced;link:advanced';
  8.         baseurl = 'https://'+window.location.hostname;
  9.         config.filebrowserBrowseUrl = baseurl+'/includes/ckfinder/ckfinder.html';
  10.         config.filebrowserImageBrowseUrl = baseurl+'/includes/ckfinder/ckfinder.html?Type=Images';
  11.         config.filebrowserFlashBrowseUrl = baseurl+'/includes/ckfinder/ckfinder.html?Type=Flash';
  12.         config.filebrowserUploadUrl = baseurl+'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'; //可上傳一般檔案
  13.         config.filebrowserImageUploadUrl = baseurl+'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images';//可上傳圖檔
  14.         config.filebrowserFlashUploadUrl = baseurl+'/includes/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash';//可上傳Flash檔案
  15. };
複製代碼


ckfinder/config.php
  1. function CheckAuthentication()
  2. {
  3.         return false;
  4. }
複製代碼


改成
  1. function CheckAuthentication()
  2. {
  3.         return true;
  4. }
複製代碼


路徑就改成妳要的路徑就可以了
  1. $baseUrl = 'https://'.$_SERVER['HTTP_HOST'].'/xxxx/';
複製代碼


文章出處:Netyea  NetYea, 新竹網頁設計, 竹北網頁設計, 苗栗網頁設計, 桃園網頁設計

 

臉書網友討論
*滑块验证:
您需要登錄後才可以回帖 登錄 | 註冊 |

本版積分規則



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2024-4-19 19:24 , Processed in 0.054508 second(s), 25 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表