public static string GetStoreHost(bool UseSSL, int PortalID) { string result = "http://" + ServerVariables("HTTP_HOST"); if (!result.EndsWith("/")) { result += "/"; } if (UseSSL) { string str = dbSetting.sp_SettingPortalBySettingID((int)SettingKey.Common_SharedSSL, PortalID).SingleOrDefault().Value; if (!String.IsNullOrEmpty(str)) { result = str; } else { result = result.Replace("http:/", "https:/"); result = result.Replace("www.www", "www"); } } if (!result.EndsWith("/")) { result += "/"; } return(result); }
/// <summary> /// Renders page title /// </summary> /// <param name="page">Page instance</param> /// <param name="title">Page title</param> /// <param name="OverwriteExisting">Overwrite existing content if exists</param> public static void RenderTitle(Page page, string title, bool OverwriteExisting, int PortalID) { //bool includeStoreNameInTitle = SettingManager.GetSettingValueBoolean("SEO.IncludeStoreNameInTitle"); bool includeStoreNameInTitle = bool.Parse(dbSetting.sp_SettingPortalBySettingID((int)SettingKey.SEO_IncludeStoreNameInTitle, PortalID).SingleOrDefault().Value); RenderTitle(page, title, includeStoreNameInTitle, OverwriteExisting, PortalID); }
public static string CreateCategoryMediumThumnail(string strImage, int PortalID, string prefix, string localImagePath) { string SavePath = string.Empty; SavePath = GetImagePathWithFileName(1, prefix, localImagePath); SavePath += strImage.Substring(strImage.LastIndexOf(".")); int imageSidge = Int32.Parse(dbSetting.sp_SettingPortalBySettingID((int)SettingKey.Media_Category_Medium_ThumbnailImageSize, PortalID).SingleOrDefault().Value); CreateThmnail(strImage, imageSidge, SavePath); return(SavePath); }