|
|
|
@ -5,19 +5,16 @@ using System.Text; |
|
|
|
|
using PJonDevelopment.BBCode; |
|
|
|
|
|
|
|
|
|
namespace FLocal.Common.BBCodes { |
|
|
|
|
class Thread : BBCode { |
|
|
|
|
class Thread : AbstractLocalLink { |
|
|
|
|
|
|
|
|
|
public Thread() |
|
|
|
|
: base("thread") { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public override string Format(ITextFormatter formatter) { |
|
|
|
|
var thread = dataobjects.Thread.LoadById(int.Parse(this.DefaultOrValue)); |
|
|
|
|
var name = this.Safe(thread.title); |
|
|
|
|
if(this.Default != null) { |
|
|
|
|
name = this.GetInnerHTML(formatter); |
|
|
|
|
protected override FLocal.Common.URL.AbstractUrl url { |
|
|
|
|
get { |
|
|
|
|
return new URL.forum.board.thread.Posts(this.DefaultOrValue, null); |
|
|
|
|
} |
|
|
|
|
return "<a href=\"/Thread/" + thread.id.ToString() + "/\">" + name + "</a>"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|