Posted by: leonhart2207 - Saturday, 10 March 2012 15:18:59 |
---|
Hi, I am using YAF Forum 1.9.5.5, the forum work very well, at this time I want to create my custom page for user management and document management (I also add more table in YAF Forum database), but I can't find a way to add YAF build-in html editor to my usermanagement.aspx and documentmanagement.aspx page :( a lot of error about RegisterClientScript, I try to fix but It still dont' work :( Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error: Line 382: } Line 383: Line 384: ScriptManager.RegisterClientScriptInclude(thisControl, thisControl.GetType(), name, url); Line 385: this.AddPageElement(name); Line 386: } Does anyone know how to add build-in html editor to custom page :( |
Posted by: tha_watcha - Saturday, 10 March 2012 16:07:11 |
---|
If you want to use custom pages inside yaf use the correct way ([url=http://forum.yetanotherforum.net/yaf_postsm52957_Create-a-custom-page.aspx#post52957]How to Add Custom Page Guide provided by Dave Burke[/url]). Then you can use yaf controls without any problems. |
Posted by: leonhart2207 - Saturday, 10 March 2012 16:12:20 |
---|
Thanks for your reply, I already success in create custom page inside YAF Forum before, but in this case, I want to create custom page outside YAF Forum :cry: :cry: |
Posted by: tha_watcha - Saturday, 10 March 2012 17:08:42 |
---|
[quote=leonhart2207;53622]Thanks for your reply, I already success in create custom page inside YAF Forum before, but in this case, I want to create custom page outside YAF Forum :cry: :cry: [/quote] If that is not an option, you need to change the code that causes the exception change the line from... [code=csharp]YafContext.Current.PageElements.RegisterJsResourceInclude("yafjs", "js/yaf.js");[/code] to... [code=csharp]YafContext.Current.PageElements.RegisterJsResourceInclude(this, "yafjs", "js/yaf.js");[/code] in the file Classes\Editors\BBCodeEditor.cs |
Posted by: Maas - Monday, 15 April 2013 04:48:47 |
---|
Hello, I have a similar problem with embedding the BBCodeEditor into a custom page outside the forum. [quote]System.Object.GetType() +0 YAF.Core.Services.PageElementRegister.RegisterJsResourceInclude(Control thisControl, String name, String relativeResourceUrl) +82 System.Web.UI.Control.InitRecursive(Control namingContainer) +186 System.Web.UI.Control.AddedControl(Control control, Int32 index) +189 YAF.Editors.BBCodeEditor.OnInit(EventArgs e) +205 ...[/quote] I already changed the code in BBCodeEditor.cs, but the problem is still there. Do you have any suggestions? What is the origin of the problem here? Thanks in advance! Maas |