Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

DojoEditor

edited October 2006 in Vanilla 1.0 Help
Looks cool in the screenshot but when I click the Account tab I get this...
----------------------------------------------------------------------
Fatal error: Cannot redeclare kses() (previously declared in /path/to/forum/extensions/LatestBlog/kses-0.2.2/kses.php:33) in /path/to/forum/extensions/DojoEditor/library/kses.php on line 33
----------------------------------------------------------------------
«1

Comments

  • i don't think kses is needed for dojo, it doesn't allow html anyway. You have two kses files that are conflicting.
  • even if your js text editor valid the code, you still need a html formatter on the vanilla side, and I use kses for that. I will add a test to include kses only if it hasn't been declare before. But even with that the dojo extension is not ready for use wanderer, it is just for testing purpose, show how to add an editor with an extension.
  • edited September 2006
    Dino- I'm working on the fckeditor and used ur dojo editor as guide. So i will have to add the kses in it as well. I'll add it when u update ur dojo so i can see how do u detect the presence of it. :) right now i stripped everything from ur code, and will add one thing at a time and hopefully i will learn what it all does. what about that settings.php file u have. Do i need that as well PLus i didn't understand how can i make the default comment type as html, so fckeditor generated code works Lastly thanks for making dojo, Its a great help.
  • //Get ride of all Formatters, like the plain text one. $Context->StringManipulator->Formatters = array(); $Context->StringManipulator->GlobalFormatters = array(); //Add the html formatter $DojoEditorFormatter = $Context->ObjectFactory->NewObject($Context, "DojoEditorFormatter", $DojoEditor_allowed_tags, $DojoEditor_allowed_protocols); $Context->StringManipulator->AddManipulator("DojoEditor", $DojoEditorFormatter); //Make my html formatter the default formatter (In case you have some message previously made in plain text) $Context->Configuration['DEFAULT_FORMAT_TYPE'] = "DojoEditor";

    That is what I use, but I havn't test it yet with role that havn't html permission.
  • edited September 2006
    @Wanderer: I changed line 16 with that:if (!function_exists('kses')) require(DOJO_EDITOR_PATH . 'library/kses.php');
    I just uploaded the new package
  • edited October 2006
    ok update on DOJO editor to use the newer Editor2 widget. pretty slow and buggy. but worth testing. I wonder If all dojo widgets are of this quality?

    In default.php
    Look for this code
    $Head->AddString('<script type="text/javascript">dojo.require("dojo.widget.Editor");</script>');
    and replace it with
    $Head->AddString('<script type="text/javascript">dojo.require("dojo.widget.Editor2");</script>');

    then look for this code
    $DiscussionForm->CommentFormAttributes = ' dojoType="Editor" items="textGroup;|;justifyGroup;|;formatBlock;|;linkGroup;"'; $DiscussionForm->DiscussionFormAttributes = ' dojoType="Editor" items="textGroup;|;justifyGroup;|;formatBlock;|;linkGroup;"';

    and replace it with
    $DiscussionForm->CommentFormAttributes = ' dojoType="Editor2" htmlEditing="true" shareToolbar="false" toolbarAlwaysVisible="true" focusOnLoad="true" minHeight="15em"'; $DiscussionForm->DiscussionFormAttributes = ' dojoType="Editor2" htmlEditing="true" shareToolbar="false" toolbarAlwaysVisible="true" focusOnLoad="true" minHeight="15em"';

    the Editor2 has no way of adding images yet
  • Dinoboff, ur using kses formatter right. How to make it work with SirNots formatter so youtube support can be added to WYSIWYG.
    thanks in adavnce
  • edited October 2006
    Like for the bbcode parser: function Parse($String, $Object, $FormatPurpose) { if ($FormatPurpose == FORMAT_STRING_FOR_DISPLAY) { $String = kses($String, $this->allowed_tags, $this->allowed_protocols); return = preg_replace('/<youtube>([\d\w-_]+)<\/youtube>/i', ..... } return $String;
    And add to the list of allowed tag:$AllowedTag = array( 'youtube' => array(), ...
  • a_ja_j
    edited October 2006
    Is this extension compatible with 1.0 ?

    After installing, I get a blank screen (no source, nothing...) and have to manually go into conf/extension.php and delete the line for the extension to get the forum back. I'm wondering because I was getting the same exact error with fckeditor as it req'd. 1.1

    I followed the readme exactly.

    chmod -Rv 0777 DojoEditor/

    Extensions installed:


    Account Pictures 1.0 Maurice Krijtenberg www.krijtenberg.nl

    Attachments 1.4 Maurice (Jazzman) Krijtenberg

    Category Jumper 1.0 Mark O'Sullivan lussumo.com/docs

    Comment Protection 2.0 Mark O'Sullivan lussumo.com/docs

    Discussion Filters 1.0 Mark O'Sullivan lussumo.com/docs

    Discussion Overview 1.1 Maurice Krijtenberg www.krijtenberg.nl

    Hide Success 1.0 Mark O'Sullivan lussumo.com/addons

    Html Formatter 1.3 SirNotAppearingOnThisForum

    IP History 1.0 Mark O'Sullivan lussumo.com/docs

    Legends 1.0 Mark O'Sullivan lussumo.com/docs

    LiveSearch 1.0 Maurice Krijtenberg www.krijtenberg.nl

    New Applicants 1 Mark O'Sullivan lussumo.com/addons

    Page Management 2.3 SirNot lussumo.com/addons

    Panel Lists 1.0 Mark O'Sullivan lussumo.com/docs

    Quotations 1.5 Joel Bernstein lussumo.com/community/discussion/2069

    Role History 1.0 Mark O'Sullivan lussumo.com/docs

    SpellChecker 1.0 ithcy null

    Yshouter 0.1 aj lussumo.com/addons


    Does it need to change files outside of the DojoEditor folder? If so, which ones? (Might be a permission problem?)
    Thanks.
  • It should be compatible with 1.0 (why don't you upgrade to 1.0.1?) there no need for changing the mode of any directory. I you could get the php error message, that could help.
  • Yeah, that's the problem, I get no error. Just a blank screen. No errors, nothing in view>source. The forum just breaks.

    (I can't upgrade because if I do It breaks one of the extensions I have installed.)

    Thanks, Dinoboff .

    cheers
  • i know what ur talking about i get that too. totally blank page. I just start removing things untill i see something on the pae and then add em back one by one. btw are u running it on localhost. what are u using
  • yeah, not localhost.

    I listed all of the extensions I'm using above, think it's a conflict with one of those?

    I'd like to go through the list and start removing extensions, but a few of them gave me big trouble in little china getting them installed and working.

    I thought I read in another thread that it breaks with userinfo tooltip? Is that true?

    much thanks.
  • i don't think so. dojo should work with userinfo.
  • What could possibly be causing the blank pages?

    It's like once it's enabled, it prevents even the first parts of vanilla from firing. It's really strange that there are no errors or any notifications that something is wrong.

    Is there something I could add to up the error reporting level or something? It seems like that wouldn't work either, though, because no page events are getting fired...

    Sucks because this would be such a great addition to the forum for the non-techies to be able to spruce up their posts.

    I tried fck editor, but got the same result.
  • why don't u update to 1.0.1 no one of us has 1.0 for testing.
  • yeah, I absolutely would, but if I do it breaks one of the extensions I have installed (probably because I made it, and it's very n00bish and gross). It may also be what's breaking the editor.

    I keep hoping that ithcy will come about with his chatbox (chat in the panel, like shoutbox), so I can get rid of my crappy extension and update vanilla...

    :(
  • is ur chatbox absolutely essential. u have decide what is more imp. from my experience no one uses chatboxes ur experience might be different
  • Yeah, it was not only specifically requested, but also the most popular thing on the forum.

    I'm going to try to mirror the site, and setup a testing site to see if I can either get the chatbox to work with 1.0.1 or get the editor to work with 1.0 and the current extensions.

    Thank you.

    cheers
  • edited October 2006
    sorry a_j, I should have looked better yesterday.

    Go into DojoEdito/settings.php and replace:$Context->SetDefinition('DojoEditor', '(X)HTML');
    by:$Context->Dictionary['DojoEditor'] = '(X)HTML';
This discussion has been closed.