YAFLogo

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
10 years ago
I've added a topic status called, Blog. When a thread is started as Blog, I would like to grab it and display it on the first page.

I have the query all set, but the Blog.aspx page I've created doesn't understand the BBCode behaviors. What would you suggest the best way to get the post message to display outside of YAF (outside of YAF, but still within my ASP.NET app of course which has the DLL's) and maintain it's format?
Sponsor

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
10 years ago
I think I found the class that does this, but I can't use the MakeHtml method. I tried creating a new YafBBCode object, but without passing the proper values through the constructor, it's useless. And I can't seem to trace back what the constructor wants.

I'm thinking that what I believe was going to be rather simplistic is not as such, lol.

YAF.Core.BBCode.YafBBCode.cs is the class I think I need.

Maybe it'd be best to create my own BBCode to HTML class?
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
10 years ago
http://packershome.com/Blog.aspx  I have the fields where I'd like them and the links working, but I can't figure out how to get the BBCode translated into HTML.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
10 years ago
Dont use yafbbcode use format message instead...

sample ...

var message = YafContext.Current.Get<IFormatMessage>().FormatMessage("[B]test[/B]", new MessageFlags(MessageFlags.Flags.IsBBCode));

the result would be...

<strong>test</strong>

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader Topic Starter YAF Version: YAF 3.1.16
10 years ago
Bah, it was so easy! Thank you!
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button