//---------------------------------------------------------------------------------------------------------------- public static String ToUserMicroblog(IMember user) { if (LinkHelper.IsMemberSubdomain(typeof(User).FullName)) { return(sys.Url.SchemeStr + user.Url + "." + SystemInfo.HostNoSubdomain + MvcConfig.Instance.UrlSeparator + "t" + MvcConfig.Instance.UrlExt); } else { return(LinkHelper.Join(_app, "t") + MvcConfig.Instance.UrlSeparator + user.Url + MvcConfig.Instance.UrlExt); } }
/// <summary> /// 获取某个注册用户的网址 /// </summary> /// <param name="friendUrl">用户的个性网址</param> /// <returns></returns> public static String ToUser(String friendUrl) { if (LinkHelper.IsMemberSubdomain(ConstString.UserTypeFullName)) { return(sys.Url.SchemeStr + friendUrl + "." + SystemInfo.HostNoSubdomain); } else { return(strUtil.Append(LinkHelper.Join(LinkHelper.AppPath, friendUrl), MvcConfig.Instance.UrlExt)); } }
private static string getAppLink(string ownerTypeFull, string ownerUrl, string appName, long appId) { String result = LinkHelper.GetMemberPathPrefix(ownerTypeFull, ownerUrl); result = LinkHelper.Join(result, appName); if (appId > 1) { result = result + appId; } result = LinkHelper.Join(result, appName); if (MvcConfig.Instance.IsUrlToLower) { return(LinkHelper.Join(result, "index") + MvcConfig.Instance.UrlExt); } else { return(LinkHelper.Join(result, "Index") + MvcConfig.Instance.UrlExt); } }
/// <summary> /// 获取某个 member 的网址 /// </summary> /// <param name="memberType">member 的类型完整名</param> /// <param name="memberUrl">member 的个性网址</param> /// <returns></returns> public static String ToMember(String memberType, String memberUrl) { if (MvcConfig.Instance.CheckDomainMap()) { String ownerPath = MemberPath.GetPath(strUtil.GetTypeName(memberType)); return(LinkHelper.GetMemberUrl(memberUrl, ownerPath, memberType)); } else { if (memberType.Equals(ConstString.SiteTypeFullName)) { return(LinkHelper.GetRootPath()); } if (memberType.Equals(ConstString.UserTypeFullName)) { return(ToUser(memberUrl)); } String ownerPath = MemberPath.GetPath(strUtil.GetTypeName(memberType)); return(strUtil.Append(LinkHelper.Join(LinkHelper.Join(LinkHelper.AppPath, ownerPath), memberUrl), MvcConfig.Instance.UrlExt)); } }
public static String ToTag(String tagName) { return(LinkHelper.Join(_app, "tag") + MvcConfig.Instance.UrlSeparator + tagName + MvcConfig.Instance.UrlExt); }
public static string ToMicroblog() { return(LinkHelper.Join(_app, "t") + MvcConfig.Instance.UrlExt); }