Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
 public static void CreateTopicTags(string[] tagArray, int topicId, int userId, string currentDateTime)
 {
     BBX.Data.ForumTags.CreateTopicTags(string.Join(" ", tagArray), topicId, userId, currentDateTime);
     ForumTags.WriteTopicTagsCacheFile(topicId);
     XCache.Remove("/Forum/ShowTopic/Tag/" + topicId + "/");
 }