Example #1
0
        static string ProfileImg(string email)
        {
            var pf = AuthorProfile.GetProfileByEmail(email) ?? new AuthorProfile();

            if (string.IsNullOrEmpty(pf.PhotoUrl))
            {
                return("");
            }

            return(pf.PhotoUrl.StartsWith("http://") || pf.PhotoUrl.StartsWith("https://") ? pf.PhotoUrl :
                   Utils.ApplicationRelativeWebRoot + "image.axd?picture=/avatars/" + pf.PhotoUrl);
        }
Example #2
0
 public FoafPerson(string id, BlogEngine.Core.AuthorProfile ap)
 {
     ID    = "#me";
     Name  = ap.FullName;
     Email = ap.EmailAddress;
     // no homepage
     // this website = blog
     Blog      = Utils.AbsoluteWebRoot.ToString();
     Rdf       = Utils.AbsoluteWebRoot.ToString() + "foaf_" + ap.UserName + ".axd";
     Firstname = ap.FirstName;
     Lastname  = ap.LastName;
     Image     = ap.PhotoURL;
     Birthday  = ap.Birthday.ToString("yyyy-MM-dd");
     Phone     = ap.PhoneMain;
     PhotoUrl  = ap.PhotoURL;
 }