@inherits Umbraco.Web.Macros.PartialViewMacroPage @using System.Drawing @using OurUmbraco.Forum.Extensions @using OurUmbraco.Forum.Services @using OurUmbraco.Our @{ var topicService = new TopicService(ApplicationContext.DatabaseContext); Image avatarImage = null; if (Members.IsLoggedIn()) { avatarImage = Utils.GetMemberAvatarImage(Members.GetCurrentMember()); } }
@if (Members.IsLoggedIn() && Members.GetCurrentMember() != null) { var member = Members.GetCurrentMember(); var roles = member.GetRoles(); var latestTopics = topicService.GetLatestTopicsForMember(member.Id, maxCount: 100);
Close
@Html.Raw(Utils.GetMemberAvatar(member, 100))
if (avatarImage != null && (avatarImage.Width < 400 || avatarImage.Height < 400)) { }
Activity in threads you participated in @foreach (var topic in latestTopics) { var forum = Umbraco.TypedContent(topic.ParentId); // if forum == null then it's been hidden/unpublished (example: v5 forum) // if this is the case: don't show forum post in list if (forum != null) {

@topic.Title

@if (topic.Replies != 0 && !string.IsNullOrEmpty(topic.LastReplyAuthorName)) { last edited by @topic.LastReplyAuthorName } else { created by @topic.AuthorName } @topic.Updated.ConvertToRelativeTime()

@forum.Name
} }
} else { Sign in Register }