Posted by: RichP714 - Monday, 7 March 2011 02:17:16
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;
}
}
}
}
Posted by: tha_watcha - Monday, 7 March 2011 11:38:41
You need to convert the 9 to string.
[code=csharp]
public override string ModuleId
{
get
{
return 9.ToString();
}
}
[/code]
P.S: take a look at the other Editor Classes how its done (For example the CKEditor classes).
Posted by: RichP714 - Monday, 7 March 2011 18:53:19
I couldn't find the example you have listed for CKE (couldn't find the CDEditor.cs file)
but, I replace return "9"; with [b]return 9.ToString();[/b]
Still no error, still CuteEditor not listed in dropdown..........
Posted by: bbobb - Monday, 7 March 2011 19:58:26
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();
}
}
Posted by: RichP714 - Monday, 7 March 2011 22:23:15
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)
Posted by: bbobb - Tuesday, 8 March 2011 08:55:06
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.
Posted by: RichP714 - Tuesday, 8 March 2011 14:19:30
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
Posted by: logan - Tuesday, 8 March 2011 19:11:12
Comment out this section :) Rebuild YAF
[code=csharp]
public override int ModuleId
{
get
{
return 9;
}
[/code]
Posted by: tha_watcha - Wednesday, 9 March 2011 12:25:53
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.
Posted by: RichP714 - Thursday, 10 March 2011 02:58:28
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)
I'm also having a theme problem 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
Posted by: tha_watcha - Thursday, 10 March 2011 07:48:23
[quote=RichP714;47346]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)
I'm also having a theme problem 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[/quote]
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
Posted by: RichP714 - Friday, 11 March 2011 00:09:33
[quote=tha_watcha;47348][quote=RichP714;47346]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)
I'm also having a theme problem 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[/quote]
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[/quote]
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?
Posted by: RichP714 - Friday, 11 March 2011 00:13:59
here's what VS 2008 is giving me for the build order
Posted by: RichP714 - Friday, 11 March 2011 01:00:49
I just saw the requirement for Studio Express 2010; downloading that now
Posted by: RichP714 - Friday, 11 March 2011 01:50:31
Visual c# Express 2010 says it can't open yaf,csproj. Type is not supported error.....
Posted by: RichP714 - Friday, 11 March 2011 02:19:01
Is visual c# 2010 express the right version or should I use visual Basic, C++, or web developer?
Posted by: RichP714 - Friday, 11 March 2011 04:37:15
[quote=tha_watcha;47326]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.
[/quote]
OK, I downloaded Visual web developer 2010 and it recognizes the solution file. I made a minor change to search.ascx.cs (defaults to 50 results per page) so I know a rebuild works.
I'm still not getting the CuteEditor to show up.
here's what I've done.
the bin files from CuteEditor are in the YAF bin folder.
The rest of the CE files are in a subfolder off of YAF called CuteSoft_Client
the .cs file you sent me is in the YetAnotherForum.NET/Classes/Editors folder
I do a rebuild (one error "The target "Package" does not exist in the project for YAF.csproj)
I push the /bin folder contents to the website.
Results:
My search page change works (now defaults to 50 results per page)
CuteEditor is still not available as an editor.
Any ideas?
Posted by: RichP714 - Friday, 11 March 2011 05:15:03
Success!
instead of just dropping the .cs file into the folder, I had to add it to the solution (I bet you guys already knew that eh?)
MANY MANY THANKS FOR YOUR HELP!!!