Пример #1
0
        public string ResolveHyperlink(string hyperlink)
        {
            var conv = new SexyContentValueConverter();

            return(conv.Convert(ConversionScenario.GetFriendlyValue, "Hyperlink", hyperlink));
            // return SexyContent.ResolveHyperlinkValues(hyperlink, Dnn.Portal);
        }
Пример #2
0
        private void InitDialogOpener()
        {
            InitEditorProvider();

            #region Get View, Update, DeletePaths
            if (Paths.Contains(".."))
            {
                throw new Exception("Invalid Paths parameter provided.");
            }
            var      homeDirectory = PortalSettings.Current.HomeDirectory;
            string[] paths;
            if (!String.IsNullOrEmpty(Paths))
            {
                paths = Paths.Split(',').Select(p => homeDirectory + p.Trim()).ToArray();
            }
            else
            {
                paths = _imageManagerConfiguration.ViewPaths;
            }

            #endregion

            DialogOpener1.DialogDefinitions.Add("ImageManager", GetImageManagerDefinition(paths));
            DialogOpener1.DialogDefinitions.Add("ImageEditor", GetImageEditorDefinition(paths));
            DialogOpener1.DialogDefinitions.Add("DocumentManager", GetDocumentManagerDefinition(paths));

            DialogOpener1.HandlerUrl = "~/DesktopModules/Admin/RadEditorProvider/DialogHandler.aspx?portalid=" + PortalSettings.Current.PortalId + "&tabid=" + PortalSettings.Current.ActiveTab.TabID;

            if (!String.IsNullOrWhiteSpace(CurrentValue) && CurrentValue.StartsWith("file:", StringComparison.InvariantCultureIgnoreCase))
            {
                var conv     = new SexyContentValueConverter();
                var realPath = conv.Convert(ConversionScenario.GetFriendlyValue, "Hyperlink", CurrentValue);

                DialogOpener1.AdditionalQueryString = "&PreselectedItemUrl=" +
                                                      HttpUtility.UrlEncode(realPath

                                                                            /*SexyContent.ResolveHyperlinkValues(CurrentValue,
                                                                             *      PortalSettings.Current)*/);
            }

            DialogOpener1.EnableEmbeddedSkins = _editorProvider._editor.EnableEmbeddedSkins;
            DialogOpener1.Skin = _editorProvider._editor.Skin;
        }