Community Server2.0のBlogにトラックバックURLを表示する

Community Server2.0のBlogにトラックバックURLを表示するようにSkinを修正してみました。
適当に作ってテストもしてませんが。
実運用でテストと言うことで(^^;
ひょっとして同じような事やってる人いるのかなぁ。
対象はSkin-EntryView.ascxです。

private string GetTrackBackUrl() {
 string strResult = string.Empty;
    CSContext csContext = CSContext.Current;

    BlogThreadQuery query = new BlogThreadQuery();
    query.PostID = csContext.PostID;

    string name = Context.Request.QueryString["PostName"];
    if(!Globals.IsNullorEmpty(name))
        query.PostName = name;

    query.IncludeCategories = true;
    query.ReturnFullThread = true;
    query.SectionID =  Weblogs.GetWeblog(CSContext.Current.ApplicationKey).SectionID;

    PostSet ps =  WeblogPosts.GetPosts(query,true);
    if(ps != null)
    {
  WeblogPost we = ps.ThreadStarter as WeblogPost;
  strResult = "この記事へのTrackBack URL<br/>" + Globals.HostPath(Context.Request.Url) + BlogUrls.Instance().TrackbackPingUrl(we.PostID);
 }

    return strResult;
}
void Page_Load(object sender, System.EventArgs e)
{
 TrackBack.Text = GetTrackBackUrl();
}

Published 2006年5月30日 21:40 by Hayase
Filed under:

Comments

# re: Community Server2.0のBlogにトラックバックURLを表示する

2006年5月30日 22:02 by Hayase
最初はhttp://manoli.net/csharpformat/
でソースの体裁を整えて記事の中にソースを書いて投稿してたのですが、ページのレイアウトがめちゃくちゃに崩れてしまうので、添付ファイルという形にしました。
なんかいい方法無いかな、、、

# re: Community Server2.0のBlogにトラックバックURLを表示する

2008年10月4日 20:00 by qukvgq

YYBNBl  <a href="fpqhcizsovwa.com/.../a>, [url=http://mvtrnyosbrdw.com/]mvtrnyosbrdw[/url], [link=http://jazevxdoeuqi.com/]jazevxdoeuqi[/link], http://awbzrpwjwevb.com/

# re: Community Server2.0のBlogにトラックバックURLを表示する

2008年10月11日 4:24 by ibsfow

ZEOara  <a href="shqgeisrfclf.com/.../a>, [url=http://qwvbgpeflkph.com/]qwvbgpeflkph[/url], [link=http://axonwzcylsod.com/]axonwzcylsod[/link], http://txyrwciydxjl.com/

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Powered by Community Server (Non-Commercial Edition), by Telligent Systems