public static void WriteTopicTagsCacheFile(int topicid) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(BaseConfigs.GetForumPath); stringBuilder.Append("cache/topic/magic/"); stringBuilder.Append((topicid / 1000 + 1).ToString()); stringBuilder.Append("/"); string mapPath = Utils.GetMapPath(stringBuilder.ToString() + topicid.ToString() + "_tags.config"); List <TagInfo> tagsListByTopic = ForumTags.GetTagsListByTopic(topicid); Tags.WriteTagsCacheFile(mapPath, tagsListByTopic, string.Empty, false); }
public static string GetTagsByTopicId(int topicid) { List <TagInfo> tagsListByTopic = ForumTags.GetTagsListByTopic(topicid); string text = ""; foreach (TagInfo current in tagsListByTopic) { if (Utils.StrIsNullOrEmpty(text)) { text = current.Tagname; } else { text = text + "," + current.Tagname; } } return(text); }