YAFLogo

RichP714
  • RichP714
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
14 years ago
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.

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

I changed line 7 to YAF.Core 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 changed line 37 to "9"; and no more errors, BUT CuteEditor doen't appear in the dropdown list of available editors either.

Am I missing something obvious? Is there a way to revert ModuleID to int?


Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com 

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
14 years ago
You need to convert the 9 to string.



public override string ModuleId
    {
      get
      {
          return 9.ToString();
      }
    }

P.S: take a look at the other Editor Classes how its done (For example the CKEditor classes).

RichP714
  • RichP714
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
14 years ago
I couldn't find the example you have listed for CKE (couldn't find the CDEditor.cs file)

but, I replace return "9"; with return 9.ToString();

Still no error, still CuteEditor not listed in dropdown..........


Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com 

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
14 years ago
So you'll get unique Id(for this case) it will be Int32 converted to string.

public override string ModuleId

{

get

{

return this.Description.GetHashCode().ToString();

}

}

RichP714
  • RichP714
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
14 years ago
same behavior....no error, but also no entry in dropdown list.

I've sent a trouble ticket into CuteSoft about this; I at first thought the plug-in architectire for YAF had changed, and you guys could clear it for me.

Now I'm thinking the CuteSoft guys need to make their product work with the new YAF.

I'll keep you posted, and thanks for BOTH ideas (bbobb and tha_watcha)


Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com 

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
14 years ago
It can't solve the problem. I don't think that problem is in Cute too. You should take as a sample one of the editors like CKEditor or TynyMCS in \Classes\Editors and verify your code.
RichP714
  • RichP714
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
14 years ago
It's a bit beyond my skill level;

At first thought it mught be a change in YAF plug-in behavior, and asked here on the forum.

Now, I'm thinking that CuteEditor devs can work up a solution. I notified them, and they are working on one.

Thanks again for all your help


Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com 

logan
  • logan
  • 100% (Exalted)
  • YAF Leader
14 years ago
Comment out this section 🙂 Rebuild YAF


public override int ModuleId
 {
 get
 {
 return 9;
 }

test
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
14 years ago
Ok i got the editor working. I attached my Class File.

Installation is very simple

1. Download .NET Version

2. Copy the bin folder to the yaf bin folder (From the "Framework 2.0" folder)

3. Copy the CuteSoft_Client to the root yaf folder.

The only problem whats left is i wasnt able to change the path of the cutesoft_client to editors/CuteEditor. That is the Problem of the editor.

RichP714
  • RichP714
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
14 years ago
I evidently have a problem with my install then, as it still doesn't work with your .cs file (no error, but CE not populated into the dropdown list)

http://forum.yetanotherforum.net/yaf_postsm47307_1-9-5-5-theme-style-for-FORUM-JUMP-and-since.aspx#post47307 

so It looks like I'll have to clear my test install and redo it.

Thanks for all the efforts, I'll restart and try again


Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com 

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
14 years ago

I evidently have a problem with my install then, as it still doesn't work with your .cs file (no error, but CE not populated into the dropdown list)

http://forum.yetanotherforum.net/yaf_postsm47307_1-9-5-5-theme-style-for-FORUM-JUMP-and-since.aspx#post47307 

so It looks like I'll have to clear my test install and redo it.

Thanks for all the efforts, I'll restart and try again

Originally Posted by: RichP714 

Where did you put the cs file?

Did you add this to the classes/editors folder of the main yaf project and recompile the the yaf.dll?

The app_code folder isnt used anymore in yaf 1.9.5.5

RichP714
  • RichP714
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
14 years ago

I evidently have a problem with my install then, as it still doesn't work with your .cs file (no error, but CE not populated into the dropdown list)

http://forum.yetanotherforum.net/yaf_postsm47307_1-9-5-5-theme-style-for-FORUM-JUMP-and-since.aspx#post47307 

so It looks like I'll have to clear my test install and redo it.

Thanks for all the efforts, I'll restart and try again

Originally Posted by: tha_watcha 

Where did you put the cs file?

Did you add this to the classes/editors folder of the main yaf project and recompile the the yaf.dll?

The app_code folder isnt used anymore in yaf 1.9.5.5

Originally Posted by: RichP714 

I didn't know that the app_code folder was no longer used.

I'm trying to recompile (with VS 2008) and I get 763 errors (web.config is in the yetanotherforum folder).

You can tell I don't know what I'm doing. can you tell from the errors what's going wrong?


Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com 

RichP714
  • RichP714
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
14 years ago
here's what VS 2008 is giving me for the build order


Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com 

RichP714
  • RichP714
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
14 years ago
I just saw the requirement for Studio Express 2010; downloading that now
Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com 

RichP714
  • RichP714
  • 100% (Exalted)
  • YAF All-the-Time Topic Starter
14 years ago
Visual c# Express 2010 says it can't open yaf,csproj. Type is not supported error.....
Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com