public static string ProcessMessageStatus(string statusId, UserViewModel curUser, string message, string[] imageNames)
        {
            // Get first Url Preview
            var firstLinkPreview = new LinkPreview().GetFirstLinkPreView(message);

            // Detect Url after replace it Achor tag
            string messageProcessed = ProcessComment.ProcessMessage(message);

            string htmlStatus = "<div class='status'>";

            htmlStatus += ProcessMessage.GetHtml_statusOwner(curUser);
            htmlStatus += ProcessMessage.GetHtml_statusContent(messageProcessed);

            if (firstLinkPreview != null)
            {
                htmlStatus += ProcessMessage.GetHtml_statusPreview(firstLinkPreview);
            }

            htmlStatus += ProcessMessage.GetHtml_statusBoxLikeShare(statusId, curUser.UserId);
            htmlStatus += ProcessMessage.GetHtml_statusListComment(statusId, curUser);

            htmlStatus += "</div>";

            return(htmlStatus);
        }
 public static LinkPreview GetFirstLinkPreview(string message)
 {
     // Get first Url Preview
     LinkPreview firstLinkPreview = new LinkPreview().GetFirstLinkPreView(message);
     if(firstLinkPreview != null)
     {
         return firstLinkPreview;
     }
     return null;
 }
        public static LinkPreview GetFirstLinkPreview(string message)
        {
            // Get first Url Preview
            LinkPreview firstLinkPreview = new LinkPreview().GetFirstLinkPreView(message);

            if (firstLinkPreview != null)
            {
                return(firstLinkPreview);
            }
            return(null);
        }
 public static string GetHtml_statusPreview(LinkPreview linkPreview)
 {
     return
         ("<a class='link-preview' href='" + linkPreview.url + "' target='_blank'>"
          + "<div class='preview'>"
          + "<div class='preview-image'>"
          + "<img src='" + linkPreview.src + "' class='img90x90' />"
          + "</div>"
          + "<div class='preview-description'>"
          + "<b>" + linkPreview.title + "</b>"
          + "<p>"
          + Regex.Match(linkPreview.url, @"://(.+?)/").Groups[1].Value + " <br />"
          + linkPreview.description
          + "</p>"
          + "</div>"
          + "<div class='clear-left'></div>"
          + "</div>"
          + "</a>");
 }
 public static string GetHtml_statusPreview(LinkPreview linkPreview)
 {
     return
             "<a class='link-preview' href='" + linkPreview.url + "' target='_blank'>"
                 +"<div class='preview'>"
                     +"<div class='preview-image'>"
                         +"<img src='" + linkPreview.src + "' class='img90x90' />"
                     +"</div>"
                     +"<div class='preview-description'>"
                         +"<b>" + linkPreview.title + "</b>"
                         +"<p>"
                             + Regex.Match(linkPreview.url, @"://(.+?)/").Groups[1].Value + " <br />"
                             + linkPreview.description
                         +"</p>"
                     +"</div>"
                     +"<div class='clear-left'></div>"
                 +"</div>"
             +"</a>";
 }
        public static string ProcessMessageStatus(string statusId, UserViewModel curUser, string message, string[] imageNames)
        {
            // Get first Url Preview
            var firstLinkPreview = new LinkPreview().GetFirstLinkPreView(message);

            // Detect Url after replace it Achor tag
            string messageProcessed = ProcessComment.ProcessMessage(message);

            string htmlStatus = "<div class='status'>";

            htmlStatus += ProcessMessage.GetHtml_statusOwner(curUser);
            htmlStatus += ProcessMessage.GetHtml_statusContent(messageProcessed);

            if(firstLinkPreview != null)
            {
                htmlStatus += ProcessMessage.GetHtml_statusPreview(firstLinkPreview);
            }

            htmlStatus += ProcessMessage.GetHtml_statusBoxLikeShare(statusId, curUser.UserId);
            htmlStatus += ProcessMessage.GetHtml_statusListComment(statusId, curUser);

            htmlStatus += "</div>";

            return htmlStatus;
        }