提供各種蟲害防治諮詢、專營居家環境消毒清潔
除蟲消毒一通電話服務到家
台北油漆粉刷專業廢棄物清運、大型廢棄家具,政府立案
正派經營,作業快速、合法可靠

首頁  •  tw 論壇 • 程式設計討論     • 

PHPNuke + FCKeditor 的實做與體驗

房東:小馬
發表時間:2007-07-28
[檢舉]


 










PHPNuke + FCKeditor 的實做與體驗(一)

PHPNuke + FCKeditor 的實做與體驗(二)

PHPNuke + FCKeditor 的實做與體驗(三)

PHPNuke + FCKeditor 的實做與體驗(四)














1】在這裡下載最新版的檔案;

SourceForge.net: FCKeditor






The world\'s largest development and download repository of Open Source code and applications.

sourceforge.net/projects/fckeditor/ - 35k - 頁庫存檔 - 類似網頁
















2】解開壓縮檔,把紅色的檔案、資料夾通通刪除; 

FCKeditor/editor/lang/ 這個資料夾底下,只要保留少數的語言檔,其他都刪除

FCKeditor/editor/skins/ 只要保留一個,其他都刪除


  • FCKeditor/

  • _documentation.html

  • _whatsnew.html

  • fckconfig.js

  • fckeditor.afp

  • fckeditor.asp

  • fckeditor.cfc

  • fckeditor.cfm

  • fckeditor.js

  • fckeditor.lasso

  • fckeditor.php

  • fckeditor.pl

  • fckeditor.py

  • fckstyles.xml

  • fcktemplates.xml

  • htaccess.txt

  • license.txt

    • FCKeditor/_samples/



    • FCKeditor/_testcases/



    • FCKeditor/editor/





  • fckblank.html

  • fckdebug.html

  • fckdialog.html

  • fckeditor.html

  • fckeditor.original.html

    • FCKeditor/editor/_source/



    • FCKeditor/editor/css/



    • FCKeditor/editor/dialog/



    • FCKeditor/editor/filemanager/

      • FCKeditor/editor/filemanager/browser/

        • FCKeditor/editor/filemanager/browser/default/

        • browser.css

        • browser.html

        • frmactualfolder.html

        • frmcreatefolder.html

        • frmfolders.html

        • frmresourceslist.html

        • frmresourcetype.html

        • frmupload.html

          • FCKeditor/editor/filemanager/browser/default/connectors/

          • test.html

            • FCKeditor/editor/filemanager/browser/default/connectors/asp/



            • FCKeditor/editor/filemanager/browser/default/connectors/aspx/



            • FCKeditor/editor/filemanager/browser/default/connectors/cfm/



            • FCKeditor/editor/filemanager/browser/default/connectors/lasso/



            • FCKeditor/editor/filemanager/browser/default/connectors/perl/



            • FCKeditor/editor/filemanager/browser/default/connectors/php/

            • basexml.php

            • commands.php

            • config.php

            • connector.php

            • io.php

            • util.php



            • FCKeditor/editor/filemanager/browser/default/connectors/py/





          • FCKeditor/editor/filemanager/browser/default/images/



          • FCKeditor/editor/filemanager/browser/default/js/







      • FCKeditor/editor/filemanager/upload/

      • test.html

        • FCKeditor/editor/filemanager/upload/asp/



        • FCKeditor/editor/filemanager/upload/aspx/



        • FCKeditor/editor/filemanager/upload/cfm/



        • FCKeditor/editor/filemanager/upload/lasso/



        • FCKeditor/editor/filemanager/upload/php/

        • config.php

        • upload.php

        • util.php







    • FCKeditor/editor/images/

      • FCKeditor/editor/images/smiley/





    • FCKeditor/editor/js/



    • FCKeditor/editor/lang/

    • en.js

    • zh-cn.js

    • zh.js



    • FCKeditor/editor/plugins/



    • FCKeditor/editor/skins/

    • _fckviewstrips.html

      • FCKeditor/editor/skins/default/



      • FCKeditor/editor/skins/office2003/



      • FCKeditor/editor/skins/silver/



















  • 3】fckconfig.js 配置











    139 行附近,找到這個:

    FCKConfig.ToolbarSets[\"Basic\"] = [

     [\'Bold\',\'Italic\',\'-\',\'OrderedList\',\'UnorderedList\',\'-\',\'Link\',\'Unlink\',\'-\',\'About\']

    ] ;
















    在上方新增兩個工具列定義,像這樣:

    FCKConfig.ToolbarSets[\"PHPNukeAdmin\"] = [

     [\'Source\',\'-\',\'Preview\',\'-\',\'Templates\'],

     [\'Cut\',\'Copy\',\'Paste\',\'PasteText\',\'PasteWord\'],

     [\'Undo\',\'Redo\',\'SelectAll\',\'-\',\'RemoveFormat\'],

     [\'Bold\',\'Italic\',\'Underline\',\'StrikeThrough\',\'-\',\'Subscript\',\'Superscript\',\'Image\'],

     [\'OrderedList\',\'UnorderedList\',\'-\',\'Outdent\',\'Indent\'],

     [\'JustifyLeft\',\'JustifyCenter\',\'JustifyRight\',\'JustifyFull\'],

     [\'Link\',\'Unlink\'],

     [\'Table\',\'Rule\',\'Smiley\',\'SpecialChar\',\'UniversalKey\'],

     [\'TextColor\',\'BGColor\',\'FitWindow\']

    ] ;


    FCKConfig.ToolbarSets[\"NukeUser\"] = [

     [\'Cut\',\'Copy\',\'Paste\',\'PasteText\',\'PasteWord\'],

     [\'Undo\',\'Redo\',\'SelectAll\',\'-\',\'RemoveFormat\'],

     [\'Bold\',\'Italic\',\'Underline\',\'StrikeThrough\'],

     [\'Link\',\'Unlink\'],

     [\'SpecialChar\',\'UniversalKey\']

    ] ;





    FCKConfig.ToolbarSets[\"Basic\"] = [

     [\'Bold\',\'Italic\',\'-\',\'OrderedList\',\'UnorderedList\',\'-\',\'Link\',\'Unlink\',\'-\',\'About\']

    ] ;







    第一個是網管工具列:PHPNukeAdmin

    \"\"



    第二個是會員工具列:NukeUser

    \"\"



    NukeUser
    會員工具列,使用者比較多,為了減輕網路負載加快速度,項目可以盡量簡化

    PHPNukeAdmin 網管使用的工具列項目,不怕多,盡量符合本身實際需求
















    4】在 FCKeditor主目錄底下,新增一個「特別設定檔」- nukeuserConfig.js,內容如下

    FCKConfig.ContextMenu = [\'Generic\',\'TableCell\',\'Table\'] ;

    FCKConfig.LinkBrowser = false ;

    FCKConfig.ImageBrowser = false ;

    FCKConfig.FlashBrowser = false ;

    FCKConfig.LinkUpload = false ;

    FCKConfig.ImageUpload = false ;

    FCKConfig.FlashUpload = false ;
















    5】按裝「檔案管理員」: MCPUK;

    修改紅字部分

    請到本站下載區拿檔案 mcpuk 

    解壓縮之後,通通送進這裡:FCKeditor/editor/filemanager/browser/



    開啟 config.php







    FCKeditor/editor/filemanager/browser/mcpuk/connectors/php/config.php



    有兩處需要設定

    50行附近,填入圖片資料夾的路徑

    $fckphp_config[\'UserFilesPath\'] = \"/image\" ;



    76行附近,你自己定一個「安全驗證碼」.........簡單的說,就是你的通關密碼、「一堆別人不容易猜中的亂碼」。字數不拘,但不要太短

    $fckphp_config[\'auth\'][\'Handler\'][\'SharedKey\']=\"tyugiytityyrtytyr\";


















    5】初步測試........ 把這個測試程序和 FCKeditor 同時送入 localhost........試試看吧




    測試檔: http://localhost/test.php



    測試重點:

    1.透過這個測試檔,開啟圖片管理員,檢查是否功\能正常

    2.不經由這個測試檔.....透過其他任何方式,看看能不能單獨開啟「檔案管理員」並且上傳檔案;正常情況下,不經由這個測試檔是不能夠開啟「檔案管理員」的。關係網站安全,務必詳細檢測........



    紅色的部分,一定要修改.......





     

     

     

     



       Page Title:


      
        //Authentication, set these to appropriate values for you

        $s_LoggedInUser_IP=$_SERVER[\'REMOTE_ADDR\'];

        $s_LoggedInUser=\"admin\";

       

        //PHP Integration Pack

        require_once \'FCKeditor/fckeditor.php\';

       

        //把 mcpuk/config.php 裡面的安全驗證碼(通關密碼),複製到這裡來。類似這樣:

        $sharedKey=\"dsgtethgjhgkkljhlhjlhui@43\";

       

        //填寫編輯器的 url,後面有斜線

        $basePath=\"http://localhost/FCKeditor/\";

       

        //這是textarea 的名稱

        $editor=new FCKeditor(\"testpage\");

       

        //Set the base path for the editor

        $editor->BasePath=$basePath;

       

        //這是textarea 的寬度

        $editor->Width=\"90%\";

       

        //這是textarea 的高度

        $editor->Height=\"500px\";

       

        //  textarea 的內容及來源

        $editor->Value= \"測試一下,我的網頁內容\";

       

        //使用的工具列

        $editor->ToolbarSet=\"Default\";

       

        //Checksum and encode user authentication info to send to the file browser

        $myData=time().\"|^SEP^|\".$s_LoggedInUser_IP.\"|^SEP^|\".$s_LoggedInUser; $test=$myData.$sharedKey; $myData.=\"|^SEP^|\".md5($myData.$sharedKey);

        $myData_hex=\'\'; for ($i=0;$i
       

        //Set the path to the file browser

        $fbPath=\"${basePath}editor/filemanager/browser/mcpuk\";

       

        //Set the editor configuration for the path to the file browser

        // passing the encrypted authentication data too.

        $eq=urlencode(\"=\"); $amp=urlencode(\"&\");

        $editor->Config[\'ImageBrowser\']=\"true\";

        $editor->Config[\'ImageBrowserURL\']=\"$fbPath/browser.html?Type${eq}Image${amp}ExtraParams${eq}${myData_hex}${amp}Connector${eq}$fbPath/connectors/php/connector.php\";

        $editor->Config[\'LinkBrowserURL\']=\"$fbPath/browser.html?ExtraParams${eq}${myData_hex}${amp}Connector${eq}$fbPath/connectors/php/connector.php\";

       

        //Output the HTML/JS code for the editor.

        $editor->Create();

       ?>

      


      

     

     

     


     


     
      //If data has been posted to us from the editor

      if (isset($_POST[\'testpage\'])) {

       //Display the data posted to us

       echo $_POST[\'title\'].\"
    \".$_POST[\'testpage\'];

      }

      ?>

     













     >>>  PHPNuke + FCKeditor 的實做與體驗(二)








    PHPNuke + FCKeditor 的實做與體驗(一)

    PHPNuke + FCKeditor 的實做與體驗(二)

    PHPNuke + FCKeditor 的實做與體驗(三)

    PHPNuke + FCKeditor 的實做與體驗(四)





    http://www.aman.38.com/phpnuke/modules.php?name=EzPage&pid=108&tut=1



  • 贊助網站       

    廣利不動產-新板特區指名度最高、值得您信賴的好房仲
    您的托付,廣利用心為您服務
    廣利不動產-板橋在地生根最實在--新板特區指名度最高、值得您信賴的好房仲
    完整房訊,房屋、店面熱門精選物件,廣利不動產 優質仲介,房屋租賃、買賣資訊透明,交易真安心!



  •  共 0 人回應

    姓名:
    佈告內容: