Page 1 of 3 123 LastLast
Results 1 to 15 of 40

Thread: FCKeditor implementation

  1. #1
    Join Date
    Nov 2004
    Posts
    1,822

    Default FCKeditor implementation

    as esm pointed out you can now markup listings. heres a tutorial to markup sponsored listings - basically it gives people who pay an easy method to make their listing look better than everyone else... maybe a good money spinner, certainly value added.



    1) get, and unzip FCKeditor, put it in a folder called fckeditor/ in the directory you store your local indexU files. http://www.fckeditor.net/download/default.html

    2) now upload it to public_html/FCKeditor/

    3) now load up add_form.html

    4) at the top of the file add this (first lines for context)

    Code:
    <%include file="header.html"
              title="Add a Listing"
              meta_keywords=""
              meta_description=""
    %>
    <script type="text/javascript" src="FCKeditor/fckeditor.js"></script>
    <script type="text/javascript">
    
    window.onload = function()
    {
    	// Automatically calculates the editor base path based on the _samples directory.
    	// This is usefull only for these samples. A real application should use something like this:
    	// oFCKeditor.BasePath = '/fckeditor/' ;	// '/fckeditor/' is the default value.
    
    	var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
    	oFCKeditor.BasePath	= 'FCKeditor/' ;
    	oFCKeditor.ReplaceTextarea() ;
    
    }
    
    		</script>
    5) go to the textbox you would like fckeditor to load into and type id=FCKeditor1

    Code:
    <textarea  class=text3 name="description" cols="80" rows="10" wrap="virtual" id="FCKeditor1"><%$description%>
    </textarea>
    6) now you need to be ruthless, go to FCKeditor/fckconfig.js you need to chop out all the functions that will be useless, it also helps to make the editor fir in the box nicer. lines from 78 lists the buttons it will load as the default tool set. heres mine :


    Code:
    FCKConfig.ToolbarSets["Default"] = [
    	['Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck'],
    	['Undo','Redo','-','SelectAll','RemoveFormat'],
    	['Bold','Italic','Underline','StrikeThrough'],
    	['OrderedList','UnorderedList','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
    	['Link','Unlink'],
    	['FontFormat','FontName','FontSize'],
    	['TextColor','BGColor']
    ] ;
    NOTE : their is a bug in the download file, you will need to edit the above section of code anyway to remove the comma after [about] for it to work in IE. Or copy what i have above

    7) upload, now CLEAR YOUR BROWSER CACHE else you wont see hte changes. test.

    8) this will be an editor for everyone, i suggested using it just for sponsored listings, its a simple <if> in smarty on the modify form to do that... at the top where it loads the javascript :

    IF link = sponsored load javascript
    ELSE <!-- dont bother -->


    Dody :
    this is what the wiki would be useful for, how do we add categories... I want to creat a cateogry called "fckeditor" but i dont see how...Attachment 197
    Attached Images Attached Images
    Last edited by inspireme; 05-12-2006 at 08:44 AM.
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  2. #2
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    This works better on the add form, gives you more room for the editor to load :

    Code:
      <tr><td colspan="2">Description : <br>
    <textarea  class=text3 name="description" cols="80" rows="10" wrap="virtual" id="FCKeditor1"><%$description%>
    </textarea></td>
            </tr>
    Last edited by inspireme; 05-12-2006 at 02:08 PM.
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  3. #3
    Join Date
    Jan 2005
    Posts
    164

    Default more than one field

    Is it possible to implement fkeditor on more than 1 field? have it working on 1 field "short description". I also have a 2nd description field "long description" I'd like to have it used on as well.

  4. #4
    Join Date
    Nov 2004
    Posts
    1,822

    Default

    yep, i think you repeat these 3 lines at the top :

    var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
    oFCKeditor.BasePath = 'FCKeditor/' ;
    oFCKeditor.ReplaceTextarea() ;

    change the first line from FCKeditor1 to FCKeditor2, then just change the id of the long description ot read FCKeditor2. Make sure you allow all the html tags from the admin panel, it can bse uesful to use the " |striptags" function in smarty to show unformated results in new listings etc


    Quote Originally Posted by lexpression
    Is it possible to implement fkeditor on more than 1 field? have it working on 1 field "short description". I also have a 2nd description field "long description" I'd like to have it used on as well.
    Main IndexU sites : | Campsite Directory | Tourist Guide | Places2B | AfterDirectory <-- Half price submission using coupon DP50 (from just $11 premium, and $10 basic permanent )

  5. #5
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    Interesting, I'll try for my next website

  6. #6
    Join Date
    Apr 2006
    Posts
    9

    Default fckeditor in custom fields

    Now how about using the fckEditor on a custom field generated by indexU??

    I suppose it would be pretty hard to track down which field that you added that would contain the "id" to make fckeditor work. Say you add the following custom fields:

    photo = image
    address = text
    detail = textfield

    and just want the new "detail" field to use fckeditor.

  7. #7
    Join Date
    Jan 2005
    Posts
    164

    Default can do

    No problem you can ad the FCKeditor to custom fields. Read this whole thread. The decription 2 was a custom field.
    Using INDEXU Version 5.4

  8. #8
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    yep I know this an old thread im replying to but for anyone trying to interagte this with indexu need more or all of the functions FCK editor provides here is a list for FCKs HTML tags

    HTML Code:
    <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite><embed> <object><strike>
    Add these to your "Allowed HTML Tags" under setup menu.

    The reason I have posted this is because the forum does not contain all the HTML Tags for this and it should help anyone in a struggle.

  9. #9
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default Nicedit.com

    i'm looking at this one for now. MUCH, MUCH MUCH smaller.

    http://nicedit.com/



    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  10. #10
    Join Date
    Sep 2006
    Posts
    167

    Default WYSIWYG jQuery Plugin

    Hotel Discount Web Search
    www.hotel-discount.com

  11. #11
    Join Date
    May 2007
    Location
    NJ, United States
    Posts
    1,651

    Default

    gspinny also released something similar to this....

    http://nicecoder.com/community/showthread.php?t=6146
    FSGDAG | IndexU Hosting | Owner
    Website | NiceCoder Script Hosting and More! | Web4URL is For Sale!
    Follow Us On Twitter | FaceBook Profile | YouTube Videos

  12. #12
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    Quote Originally Posted by Antony View Post
    I looked at this one some time back. while I like jquery and use several plugins, I didn't want to add the extra overhead. And it seemed very basic. almost too basic.



    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  13. #13
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    Quote Originally Posted by FSGDAG View Post
    gspinny also released something similar to this....
    I tried opening the php file in the zip file and Windows ended up closing down. not sure if the file caused that or something else


    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  14. #14
    Join Date
    Oct 2007
    Location
    UK Essex
    Posts
    591

    Default

    well i never got fck editor to work anyway.

    like brucekeeper says certain funcions inject css and indexu does not allow the link to be submited.

    So i have been trying tinymce but this does the same thing, (sucks)
    I have been very short of time latley and really havent found a fix to get tinymce to work.

    I wanted all the formatting functions to work and styling......


  15. #15
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    Quote Originally Posted by esm View Post
    i'm looking at this one for now. MUCH, MUCH MUCH smaller.

    http://nicedit.com/

    .
    I've got this one working nicely with INDEXU. VERY NICELY. I can add a link, an image, a clickable image. Headers, indents, bolds, fonts, colors. Nice.

    I did have to scrap the DIVs for the description field but bothers me not at all.

    This is the one you should use for INDEXU.


    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

Similar Threads

  1. Paying for Customization / Implementation
    By andmunn in forum Help Wanted/Job Request
    Replies: 0
    Last Post: 06-02-2004, 10:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •