public static string ProcessMessage(string message) { var messageProcessed = Emotions.ReplaceEmotions(message); messageProcessed = Link.ReplaceAllLink(messageProcessed); return(messageProcessed); }
//public static string ReplaceEmotion(string specialKey, string image) //{ // return //} public static string ReplaceEmotions(string text) { return(text.Replace(":)", Emotions.InsertImage("happy.gif")) .Replace(":(", Emotions.InsertImage("sad.gif")) .Replace(";)", Emotions.InsertImage("winking.gif")) .Replace(";D", Emotions.InsertImage("big_grin.gif")) .Replace(":-c", Emotions.InsertImage("call_me.gif")) .Replace(":-*", Emotions.InsertImage("kiss.gif")) .Replace(":-SS", Emotions.InsertImage("applause.gif")) .Replace(":v", Emotions.InsertImage("pacman.png")) .Replace("^_^", Emotions.InsertImage("kiki.png")) .Replace("B|", Emotions.InsertImage("sunglasses.png"))); }
public static string ProcessNewComment(UserViewModel userComment, string message) { var messageProcessed = Emotions.ReplaceEmotions(message); messageProcessed = Link.ReplaceAllLink(messageProcessed); return ("<div class='comment'>" + "<div class='comment-user'>" + "<a href='#'>" + "<img src='" + userComment.Avatar + "' class='img-rounded img33x33'>" + "</a>" + "</div>" + "<div class='comment-content'>" + "<p>" + "<a href='#'>" + userComment.Displayname + "</a>" + " " + messageProcessed + "</p>" + "<p>" + DateTime.Now + " . <a href='#'>like</a></p>" + "</div>" + "<div class='clear-left'></div>" + "</div>"); }