Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 8

G_MUnderDogericgillettelucsandino +3 guests

JQuery plugin updated to v19-1.4.2, gets CKEditor 3.1

Read about the v19-1.4.2 update

Hey everyone, long time no see. I've just updated my JQuery extension for Vanilla 1 to jQuery 1.4.1 and added CKEditor to it. Please everyone have a go and break it, I'm sure it's a little rough around the edges, but it worked for me on Vanilla 1.1.10 so have at it!

CKEditor require HTML Formatter to be installed and enabled, you should also save your sanity and formatting by turning the HTML_CONVERT_NEWLINES option to "0" (zero).

Please let me know what you guys think.
«1

Comments

  • Posts: 657
    It looks good. The input size changer button overlaps it, though. Maybe add this to it:

    #CommentBoxController{display:none;}
  • Posts: 2,610
    Yeah I spotted that just after I uploaded, but thanks for letting me know it works anyway ;)

    Is there a better way of hiding it with PHP in the Vanilla code?
  • Okay...I'm lost. I'm a Vanilla noob, so bare with me.

    I see no admin option for CK. If I enable CKEditor through conf/settings.php, I lose the comment form altogether. HTML Formatter is enabled.

    I'll be happy to answer any questions you may have for me.
  • Posts: 2,610
    Another quick release. I've replaced the ancient ThickBox with ColorBox and put some notes in the admin section. Also that fix that SubJunk mentioned.

    v18-1.4.1 Released 2010-02-19

    + Hid the comment box resizer thanks SubJunk
    + Added ColorBox 1.3.6.
    - Removed ThickBox 3.1 - it's very old and is no longer maintained
    ! Couple of CKEditor CSS tweaks (Vanilla overrides a lot by default with annoying CSS * selectors)
    ! General code tidy up, can still be better, but...

    HOWTO for CKEditor coming...
  • Everything is working great. Thanks for your time and effort.
  • Posts: 2,610
    Thank YOU for giving some feedback! Out of interest, what was it that you were doing wrong? Perhaps I can write better instructions in the readme to prevent other people having the same problems?
  • I never resolved the CK problem.

    Shortly after posting here, I began reading posts associated with your addon. It was then that I realized I needed Set List. Admin problem solved. As for CK not showing and the form disappearing, I never could figure out why it wasn't working. I installed this new version and everything worked out of the box.

    Your instructions are fine. That's how I was doing it all along.

    Edit: FYI...When JQuery is enabled, Panel Re-Order stops working. The rearrange area in the admin section ceases to function. I unchecked all of the JQuery options to see if there was a conflict with the plugins. There wasn't. I took disabling JQuery for the re-order function to work again.

    Would you prefer posting issues here or in the addon section?
  • Posts: 657
    @[-Stash-]: I can add a config option to allow the disabling of the input size option if you'd like, but I don't see any benefits in doing that as opposed to the CSS option.
    Great job.
  • Posts: 2,610
    Thank! :D

    Hmm, I guess it was mostly just curiosity that made me ask... I've been thinking about having the option to automatically disable CK when you having something other than "HTML" selected as your formatter and then reenabled when you click back onto "HTML" - does this seem like a good idea to you, or do you think it will confuse people?

    @Cablespider, I'll have a look at Panel Order and see what's going on. It's entirely possible that I've broken the jQuery compatibility mode somewhere along the line...
  • Posts: 657
    That makes sense, I think it would be a good feature
  • Posts: 657
    Also, would you like me to make HTML Formatter automatically make HTML_CONVERT_NEWLINES to 0 if this extension is enabled? That way people have one less step on installation
  • Posts: 2,610
    If you have the ability to edit/update HTML formatter, yes please :D
  • Posts: 657
    Cool, it's done now in the SVN repository, r942. So it will be released with Vanilla 1.2.
    I'll also get ownership of the HTML Formatter extension on this website so I can update it.
  • Posts: 2,610
    Excellent news!

    Now I guess I'd better update the extension again with jQuery 1.4.2 since it seems to be a pretty good improved in speed over even 1.4.1!
  • Posts: 2,610
    Please shout if this breaks anything...

    v19-1.4.2 Released 2010-02-24

    Updated the JS library to jQuery 1.4.2.
    + Added some more config to CKEditor to force it to display nicer raw HTML
    + Added "Previous Release" option in the admin settings so people can roll back even minor version updates.
    ! Reworded some of the admin options to try and make it clearer.
    ! Bit more general code tidy up.

  • Posts: 657
    The new version looks good.
    I suggest removing the changelog from the extension options page though, or maybe have a link to show it. It pushes the "save" button off the page.

    Also, I noticed on a fresh install that it only works properly if HTML_CONVERT_NEWLINES is always set to "1". Can you confirm it?
    It is on a fresh install of 1.1.10 with only Set List, HTML Formatter and jQuery extensions.
  • Posts: 2,610
    I'll check in the morning, but it's entirely possible that some of the CKEditor options I changed means it now prefers the oposite setting! Will check and come back on that.

    They're not a changelog on the options page, they're notes on how to use each plugin. Perhaps if you can convince squirrel to add a 'help' option to Set List I could add that info to popup upon clicking a (admin configurable) '?' at the end of each line? I know it's not ideal with pushing down the save button, but it does mean people will see it... I'm open to suggestions.
  • Posts: 657
    Ah I see, my bad.
    Another option would be to make the tickboxes save automatically, like with the Notifi Account Options menu.
  • Posts: 2,610
    You're running into my cut'n'paste coder limitations again! I completely agree with you, but Set List is the only reason I got an admin page in there at all in the first place :)

    I probably could figure it out given enough time, but the nice thing about Set List is that it's very easy to modify the admin stuff and maintain the plugin. I suppose I could have a look at modifying Set List to incorporate some of these improvements, but I have a feeling that it may be totally beyond my ability right now.
  • ckeditor not work on Internet explorer 8.
  • Posts: 2,610
    Hmm yes, bugger :/ It's actually not working in IE6, 7,8, Safari, Chrome, Opera or Safari! I'm sure it was at some point...

    Just did some bug testing and it seems that CKEditor conflicts with line 248 of global.js
    function Wait(Sender, WaitText) {
    Sender.disabled = true;
    Sender.value = WaitText;

    var el = Sender.parentNode;
    while(el != null) {
    if (el.tagName == "FORM") {
    el.submit();
    break;
    }
    el = el.parentNode;
    }
    }
    I have no idea what this does, but commenting it out makes CK work in all of the above...

    Any Vanilla 1 gurus out there that can tell me what this little function is and does? And can we kill itrewrite it to not conflict? :D
  • Posts: 657
    That's the function that disables the submit buttons after pushing them so users can't push them twice.
    Removing the first line inside the function seems to work, so I guess CKEditor doesn't like having its submit button disabled.
  • Posts: 2,610
    Is there a way, in JS, that when CK is active that function is disabled?
  • Any idea if we should set HTML_CONVERT_NEWLINES back to "1"?
  • Posts: 657
    I don't think there is a way, Stash. I'll have a quick play around to see if there's an easy way to make it work.

    @Cablespider: I'd like to know that as well. When I tested it, it seemed to be the best setting. With it set to 0 the lines weren't breaking.
  • Posts: 1,880
    @[-Stash-] How did you find out that line was the problem?
  • Posts: 2,610
    I commented everything out and then uncommented out each function one at a time and tested. I'm sure there's a more high tech way to find js conflicts but this way worked...
  • Has anyone come across the problem of Colorbox handling the lightbox image as the wrong media type?

    See:

    http://www.nqscots.com/discussion/136/ayr-water-festival-parade-news-story/?Focus=1576#Comment_1576

    When you click on the thumbnail, colorbox appears to be handling the content type as text?

    Have tried the minified and uncompressed versions of the included colorbox js.
  • Partially fixed problem by changing global variable "photo" in colorbox.js to true to force the script to handle the object as an image. See function isImage().

    Now need to figure out how to change the inline images plugin to set this variable on an image by image basis (which would be more useful).
Sign In or Register to comment.