baseforumsrsswriter.cs

来自「community server 源码」· CS 代码 · 共 47 行

CS
47
字号
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Collections;
using CommunityServer.Components;

namespace CommunityServer.Discussions.Components
{
	/// <summary>
	/// Summary description for BaseForumsRssWriter.
	/// </summary>
	public abstract class BaseForumsRssWriter : CommunityServer.Components.BaseRssWriter
	{
		public BaseForumsRssWriter(ArrayList posts, Section s, string baseUrl) : base(posts,s, baseUrl)
		{
			
		}

	    protected override string BuildLink(Post p)
	    {
	       return Globals.GetSiteUrls().Post(p.PostID);
	    }

        protected override string EnclosureUrl(PostAttachmentMetaData pa)
        {
            return pa.FileName;
        }

		protected override string GetUserName(Post p)
		{
			User u = p.User;
			if (u == null)
				u = Users.GetUser(p.UserID, p.Username, false, true);

			if (u != null)
				return u.DisplayName;
			else
				return p.Username;
		}

	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?