Example #1
0
    public string BlogFaveComment(int userID, string postGuid)
    {
        SueetieBlogComment sueetieBlogComment = SueetieBlogs.GetSueetieBlogComment(postGuid);

        if (userID > 0)
        {
            if (sueetieBlogComment.SueetieCommentID > 0)
            {
                string      result      = "You tagged this comment by " + sueetieBlogComment.Author + " as a favorite!";
                UserContent userContent = new UserContent
                {
                    ContentID = sueetieBlogComment.ContentID,
                    UserID    = userID
                };

                int favoriteID = SueetieUsers.CreateFavorite(userContent);
                if (favoriteID < 0)
                {
                    result = "You already tagged this comment as a favorite.";
                }

                return(result);
            }
            else
            {
                return("Sorry, we added favorites after this comment was written. Please consider tagging more recent comments as favorites.");
            }
        }
        else
        {
            return("Please login or become a member to tag this comment as a favorite");
        }
    }
Example #2
0
    public string BlogFavePost(int userID, string postGuid)
    {
        SueetieBlogPost sueetieBlogPost = SueetieBlogs.GetSueetieBlogPost(postGuid);

        if (userID > 0)
        {
            if (sueetieBlogPost.SueetiePostID > 0)
            {
                string      result      = "You have tagged " + sueetieBlogPost.Title + " as a favorite!";
                UserContent userContent = new UserContent
                {
                    ContentID = sueetieBlogPost.ContentID,
                    UserID    = userID
                };

                int favoriteID = SueetieUsers.CreateFavorite(userContent);
                if (favoriteID < 0)
                {
                    result = "You already tagged this post as a favorite.";
                }

                return(result);
            }
            else
            {
                return("Sorry, we added favorites after this post was published. Please consider tagging more recent posts as favorites.");
            }
        }
        else
        {
            return("Please login or become a member to tag this post as a favorite");
        }
    }
Example #3
0
    public string ForumFaveMessage(int userID, int messageID, int applicationID)
    {
        SueetieForumContent sueetieForumContent = new SueetieForumContent
        {
            MessageID     = messageID,
            ContentTypeID = (int)SueetieContentType.ForumMessage,
            ApplicationID = applicationID
        };

        SueetieForumMessage sueetieForumMessage = SueetieForums.GetSueetieForumMessage(sueetieForumContent);

        if (userID > 0)
        {
            if (sueetieForumMessage.ContentID > 0)
            {
                string      result      = "You tagged this message by " + sueetieForumMessage.DisplayName + " as a favorite!";
                UserContent userContent = new UserContent
                {
                    ContentID = sueetieForumMessage.ContentID,
                    UserID    = userID
                };

                int favoriteID = SueetieUsers.CreateFavorite(userContent);
                if (favoriteID < 0)
                {
                    result = "You already tagged this forums message as a favorite.";
                }

                return(result);
            }
            else
            {
                return("Dang it. This forums message cannot be tagged as a favorite for some reason.  Sorry.");
            }
        }
        else
        {
            return("Please login or become a member to tag this forums message as a favorite");
        }
    }