GetInfoUrl() public static method

public static GetInfoUrl ( string name ) : string
name string
return string
Example #1
0
        public string GetNotFoundMessage(string messageName)
        {
            const string messageFormat =
                "<a class='m' href='{0}' title='{1}'>{1}</a>&nbsp;" + _imageLinkFormat;

            var styleImageManager = _serviceProvider.GetRequiredService <IStyleImageManager>();
            var externalLink      = string.Format(messageFormat,
                                                  SiteUrlHelper.GetInfoUrl(messageName),
                                                  SR.MsgExtBrowserLinkTitle,
                                                  styleImageManager.GetImageUri("ExtBrowser", StyleImageType.Small));

            return(string.Format(
                       GetStringTemplate(_templateMessageNotFound),
                       string.Format(SR.MessageNotFound, messageName),
                       externalLink));
        }
Example #2
0
        private static string ProcessRsdnLinkInternal(
            IServiceProvider provider,
            string name,
            string text)
        {
            string link;
            string imageUrl;

            var msg =
                string.IsNullOrEmpty(name)
                                        ? null
                                        : DatabaseManager
                .GetMessageByName(
                    provider,
                    name,
                    m => new { m.ID, m.Subject, m.Date, m.UserNick });

            if (msg == null)
            {
                link     = SiteUrlHelper.GetInfoUrl(name);
                imageUrl = GetImageUri(provider, @"ForumImages\webref", StyleImageType.ConstSize);
            }
            else
            {
                link     = FormatUri(JanusProtocolResourceType.Message, msg.ID.ToString());
                imageUrl = GetImageUri(provider, "NameGroup", StyleImageType.ConstSize);
            }

            const string format =
                "<a class='m' href='{0}' title='{4}'><img border='0' align='absmiddle' src='{1}'></a>" +
                "&nbsp;<a class='m' href='{0}' title='{4}'>{2}</a>{3}";

            return
                (string.Format(
                     format,
                     link,
                     imageUrl,
                     text,
                     msg != null ? GetMsgInDbLinkPostfix(provider, msg.ID) : string.Empty,
                     msg != null
                                                ? FormatMsgLinkTitle(msg.Subject, msg.Date, msg.UserNick)
                                                : link));
        }