WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] FCKeditor Plugin ChenPress (89 posts)

  1. chweifly
    Member
    Posted 8 years ago #

    Q: What's ChenPress?
    A: It's a WordPress WYSIWYG plugin which replace the default editor with FCKeditor 2.0 FC.

    Q: What's the meaning of the plugin name?
    A: "ChenPress" just the combine of my name ChenWei and WordPress.

    Q: Download?
    A: Click here to download ChenPress

    Q: install?
    A: 

    • Download the zip file and extract the file 'chenpress.php' and folder 'chenpress' from it.
    • Upload these files to your server and make sure it goes into the ‘wp-content/plugins' directory.
    • Visit your WordPress administration interface's Plugins page and activate the plugin.
    • Creat files foders under 'wp-content', just like the following structure: 
      • wp-content\files
      • wp-content\files\File
      • wp-content\files\Flash
      • wp-content\files\Image
      • wp-content\files\Media
    • Change the files foders' properties to 777 use FTP

    Q: Which files have been modified to the default FCKeditor 2.0 FC?
    A: I modified only three files:

    • /fckconfig.js
    • /fckeditor.js
    • /editor/filemanager/browser/mcpuk/connectors/php/config.php

    Q: So, what's the creative work of ChenPress?
    A: Just the file "chenpress.php", whick combine FCKeditor 2.0 FC to WordPress.

    Q: How could I make ChenPress suitalbe?
    A: Just configuring the following three files:

    • chenpress.php
    • chenpress\fckconfig.js
    • chenpress\editor\filemanager\browser\mcpuk\connectors\php\config.php

    ==================================
    ==== Detail Function Configuration

    Q: Can I change the default location of upload files?
    A: Just open the file: "chenpress\editor\filemanager\browser\mcpuk\connectors\php"
    And modify the parameter: $fckphp_config['UserFilesPath'] = "/wordpress/wp-content/files" ;

    Q: Can I change the toolbar?
    A: Just open the file: "chenpress\fckconfig.js"
    And modify the parameter: FCKConfig.ToolbarSets["CPToolbar"] = ...

    Q: Can I change the smiley?
    A: Just open the file: "chenpress\fckconfig.js"
    And modify the parameter: FCKConfig.SmileyPath and FCKConfig.SmileyImages

    Q: Where is "quicktags"?
    A: Just open the file: "chenpress.php", and delete the following code:

    // Nuke Quicktages
    ob_start('nuke_the_quicktags');
    function nuke_the_quicktags( $lookmanoqtags ) {
    $lookmanoqtags = preg_replace('|<div id="quicktags">.*?</div>|s', '', $lookmanoqtags);
    return $lookmanoqtags;}

    Q: Support?
    A: Here :-)

  2. chweifly
    Member
    Posted 8 years ago #

    I install my WP under the root folder /wordpress/, so maybe you need to change the setting:

    $fckphp_config['UserFilesPath'] = "/wordpress/wp-content/files" ;

  3. chweifly
    Member
    Posted 8 years ago #

    I also announce ChenPress to WordPress Plugin Competition Blog, but one day has gone, and it still have not been approved:-(

  4. chweifly
    Member
    Posted 8 years ago #

    Need more languages?

    Just open the file: "chenpress\fckconfig.js"
    And modify the parameter: FCKConfig.AutoDetectLanguage = true ;

  5. zz85
    Member
    Posted 8 years ago #

    Does QuickTags work with ChenPress?

    Is there anyway to toggle between the FCKEditor and usual textarea? (Using javascript)

    If not, it wont work with the WP SpellCheck Plugin.

  6. galfn
    Member
    Posted 8 years ago #

    Can you make it work with bookmarklet?

  7. zz85
    Member
    Posted 8 years ago #

    A bug. Back button doesnt work

  8. chweifly
    Member
    Posted 8 years ago #

    ChenPress has a SpellCheck tool.

  9. chweifly
    Member
    Posted 8 years ago #

    IE's back or ChenPress' back?

  10. chweifly
    Member
    Posted 8 years ago #

    ChenPress doesn't work with QuickTags together.
    You can deactivate ChenPress if you need QuickTags.

  11. zz85
    Member
    Posted 8 years ago #

    FireFox's back. I feel that if there should be a way to disable the editor thru javacript it would be better.

  12. chweifly
    Member
    Posted 8 years ago #

    FireFox's back may generate seveal "new post" back because the ChenPress need to replace QuickTags.

    But you can click the dropdown menu to select the page what you need.

  13. zz85
    Member
    Posted 8 years ago #

    You are right, and wrong. The multiple backs are actually caused by FCEeditor.

    Here's what I did for myself.

    Under chenpress.php,
    1. Remove "Nuke Quicktages" codes.
    2. Edit onload javascript function. Starting line 44.
    <script type="text/javascript">
    function loadfce(){
    var oFCKeditor = new FCKeditor( 'content' ) ;
    oFCKeditor.BasePath = "<?php echo $chenpress_path; ?>" ;
    oFCKeditor.Height = "<?php echo $chenpress_size; ?>" ;
    oFCKeditor.ToolbarSet = "Default" ; //CPToolbar
    oFCKeditor.ReplaceTextarea() ;
    document.getElementById("quicktags").style.display = "none";
    }
    var wisi_tags;

    quicktag = document.getElementById("quicktags");
    if (quicktag!=null) {
    quicktag.innerHTML += '<input type="button" name="zz" value="Use Editor!" onclick="javascript:loadfce();" />';
    }

    </script>

    What it does it that instead of "nuking", quicktags now have a "Start Editor!" button for using the FCEeditor. Why? Pages loads faster for u to start editing and try editing comments use FCEedtior and you'll get what I mean.

    That's all for now. Thanks for packaging chenpress, it should have some nice use for me ;)

  14. chweifly
    Member
    Posted 8 years ago #

    WOW! Thanks, zz85! It's great!

  15. chweifly
    Member
    Posted 8 years ago #

    There is another great javascript writed by Josef WO which can switch Wisi ON and OFF. But it is just about "WYSIWYG Plugin For WordPress" which use TinyMCE editor. I didn't know how to use it in FCKeditor.

    http://mudbomb.com/archives/2005/02/02/wysiwyg-plugin-for-wordpress/

    Comment by Josef WO � Apr. 6, 2005 @ 5:30 pm

    Hello Joe, thank you to accept my hack of ibrowser - I'm not sure if it is univesal solution but it can help somebody. Now there is a question how to switch Wisi ON and OFF. I have it solved on my site, unfortunatelly there is necessary to hack some wp files:

    Folder: wp-admin, Files edit-form, edit-form-page, edit-form-advanced. Look for row beginning

    <textarea rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="5"

    and add just before it the code:

    <b>WYSIWYG</b>
    <input type="button" name="wyson" value="Yes" onclick="javascript:tinyMCE.execCommand('mceAddControl',false,'content');" />   
    <input type="button" name="wysoff" value="No" onclick="javascript:tinyMCE.execCommand('mceRemoveControl',false,'content');" />
    <br>

    Advantages: After switch OFF you can use Quicktags as usually. You can add –more– and –nextpage– tags as well as edit HTML directly. Next you can switch back to WYSIWYG and complete your work.

    There is a picture how it looks: http://wordpress.site.cz/images/wpadmin.gif

    In Josef WO blog: http://wordpress.site.cz/, there also have some discussion, but I can't understand the language, Czech.

  16. chweifly
    Member
    Posted 8 years ago #

    Update: ChenPress 2.0!

    change log:
    Repack ChenPress using zz85's code.

  17. ablewave
    Member
    Posted 8 years ago #

    Anyone have the file uploading feature working here? It doesn't seem to be finding the file structure properly. My WP installation is in the web root (www.mydomain.com/index.php). I've gone through those config files, and that doesn't seem to do it.

  18. chweifly
    Member
    Posted 8 years ago #

    Creat foders under 'wp-content' yourself!
    But not find in the config files.

  19. jpepper
    Member
    Posted 8 years ago #

    Is there a way to toggle the editor? I see that zz85 code starts the editor, but is there a way to switch back?

  20. chweifly
    Member
    Posted 8 years ago #

    Q: How to switch FCKeditor and Quicktags?
    A: Switch to FCKeditor: click the button "FCKeditor ChenPress"
    Switch to Quicktags: click the button "Save and Continue Editing"

  21. ablewave
    Member
    Posted 8 years ago #

    "Creat foders under 'wp-content' yourself! But not find in the config files."

    I had created and properly permissioned the folders, but the script does not appear to be finding them correctly. Even if I FTP files into them, they are not browsable through the wysiwyg. Anyone else?

  22. chweifly
    Member
    Posted 8 years ago #

    Open the file:"chenpress\editor\filemanager\browser\mcpuk\connectors\php\config.php"

    and modify UserFilesPath to meet your need: $fckphp_config[’UserFilesPath’] = "/wp-content/files" ;

  23. hinke
    Member
    Posted 8 years ago #

    Im trying to download the chenpress-plugin with no success... Can someone that has it please mirror it for download or send it to me with yousendit.com. thanks in advance.

  24. wootwoot2
    Member
    Posted 8 years ago #

    How to customize my own ToolbarSet in the FCKeditor?

    I try to remove certain features in the Toolbarset (for example the spell check) from the file 'fckconfig.js'

    -FCKConfig.ToolbarSets["CPToolbar"]

    i get java script error on IE -> Error: 'FCKConfig.CustomConfigurationsPath.lenght' is null or not an object

    Thanks in advance..

  25. program_geek
    Member
    Posted 8 years ago #

    Oh, the file is available, unfortunately the download is going only a few hundreds bytes per second (perhaps he is running a server through a phone modem?).

    If I don't post back here, it probably means I gave up on this plugin (I'm searching for a decent WYSIWYG) :-P

    <3 tony

  26. kaat
    Member
    Posted 8 years ago #

    Hi chweifly - thanks for great work making this.

    I have two little issues:

    (1) Like ablewave above, even though file structure is created, permissions done, and config set, no uploads show in ChenPress browser.

    (2) I would like to always show ChenPress, not Quicktags - can you tell me how?

    Thanks!

  27. kaat
    Member
    Posted 8 years ago #

    I just fixed my problem (1) above ...

    A change is needed in the config.php file - same file that holds $fckphp_config[’UserFilesPath’]

    At line 32, change:
    $fckphp_config['basedir']=$_SERVER['DOCUMENT_ROOT'];

    To:
    $fckphp_config['basedir']=substr($_SERVER['PATH_TRANSLATED'], 0, strlen($_SERVER['SCRIPT_NAME']) * - 1);

    Reason it wasn't working: I use mass virtual hosting, so DocumentRoot holds wrong base path. The change above uses 2 different server variables to achieve it reliably. This problem would also occur for certain non-Apache servers too.

  28. kiamuse
    Member
    Posted 8 years ago #

    �完上述所有步骤,但是并�显示这个编辑器啊�?
    我是最新的1.5的版本,éƒ?闷,作者的å??字看起æ?¥æ˜¯ä¸­å?Žäººæ°‘共和国的。

  29. kaat
    Member
    Posted 8 years ago #

    General question:

    When using quicktags and typing in the textarea, hitting the enter key twice produces a blank line, as expected. But switching to ChenPress, the blank line is ignored, squeezing text together. So switching between the two messes up formatting - unless you use
    in quicktags mode.

    Is this right, or am I missing something?

    Thanks!

  30. kaat
    Member
    Posted 8 years ago #

    Sorry - sentence above should read:

    So switching between the two messes up formatting - unless you use the break HTML tag in quicktags mode.

Topic Closed

This topic has been closed to new replies.

About this Topic