Re: Installing CuteEditor 6.3 in Forum YetAnotherForum

  •  03-07-2011, 12:05 PM

    Re: Installing CuteEditor 6.3 in Forum YetAnotherForum

    I've been running the add-on editor CuteEditor for a couple of years now. I'm having trouble getting it operable in 1.9.5.5.

    Currently running 1.9.4 final, with /App_Code/YAF/Editors folder content:

    file name is CuteEditor.cs
    namespace YAF.Editors
    {
    using System;
    using System.Reflection;
    using System.Web.UI.WebControls;
    using System.Web.UI;
    using YAF.Core;

    public class CuteEditor1 : RichClassEditor, INamingContainer
    {

    CuteEditor.Editor _editor = new CuteEditor.Editor();

    public CuteEditor1()
    {

    }
    protected override void OnInit(EventArgs e)
    {
    _editor.ID = "CE";
    _editor.Width = Unit.Pixel(800);
    _editor.Height = Unit.Pixel(325);
    this.Controls.Add(_editor);
    base.OnInit(e);
    }
    public override bool Active
    {
    get
    {
    return true;
    }
    }
    public override int ModuleId
    {
    get
    {
    return 9;
    }
    }
    public override string Description
    {
    get
    {
    return "CuteEditor Editor(HTML)";
    }
    }
    public override string Text
    {
    get
    {
    return _editor.Text;
    }
    set
    {
    _editor.Text = value;
    }
    }
    }
    }
     
    which works fine under YAF 1.9.4
    with 1.9.5.5 I get the following error.
     
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0234: The type or namespace name 'Core' does not exist in the namespace 'YAF.Classes' (are you missing an assembly reference?)

    Source Error:



    Line 5: using System.Web.UI.WebControls;
    Line 6: using System.Web.UI;
    Line 7: using YAF.Classes.Core;
    Line 8:
    Line 9: public class CuteEditor1 : RichClassEditor, INamingContainer
     
     
    YAF 1.9.5.5 changes YAF.Classes.Core to YAF.Core; I made the change in line 7 and get the following error.
     
     
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS1715: 'YAF.Editors.CuteEditor1.ModuleId': type must be 'string' to match overridden member 'YAF.Core.ForumEditor.ModuleId'

    Source Error:



    Line 31: }
    Line 32: }
    Line 33: public override int ModuleId
    Line 34: {
    Line 35: get


    Source File: d:\hosting\3543807\html\yetanotherforum\App_Code\YAF\Editors\CuteEditor.cs Line: 33
     
    I changed line 33 to read public override string Moduleid  and get the following error.
     
     
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0029: Cannot implicitly convert type 'int' to 'string'

    Source Error:



    Line 35: get
    Line 36: {
    Line 37: return 9;
    Line 38: }
    Line 39: }


    Source File: d:\hosting\3543807\html\yetanotherforum\App_Code\YAF\Editors\CuteEditor.cs Line: 37
     
    I change line 37 to read                 return 9.ToString();
    and no longer get any errors, but CuteEditor is still not listed as a choice when trying to change editors under host>host administration>host settings>editors
     
     
     
    Can you please explain what I need to do to get back CE functionality?

    Running CuteEditor in YetanotherForum at http://thecarversite.com
View Complete Thread