Exemple #1
0
        public override CmsDependency[] getDependencies()
        {
            List <CmsDependency> ret = new List <CmsDependency>();

            // -- writable directories
            ret.Add(CmsWritableDirectoryDependency.UnderAppPath("UserFiles/Image"));
            ret.Add(CmsWritableDirectoryDependency.UnderAppPath("UserFiles/File"));

            // -- config
            if (CmsConfig.Languages.Length > 1)
            {
                ret.Add(new CmsConfigItemDependency("LinkMacrosIncludeLanguage"));
            }

            // -- ckeditor
            ret.AddRange(CKEditorHelpers.CKEditorDependencies);

            // -- Database tables
            ret.Add(new CmsDatabaseTableDependency(@"
                CREATE TABLE  `htmlcontent` (
                  `HtmlContentId` int(11) NOT NULL AUTO_INCREMENT,
                  `PageId` int(11) NOT NULL DEFAULT '0',
                  `Identifier` int(11) NOT NULL DEFAULT '0',
                  `langShortCode` varchar(255) NOT NULL DEFAULT '',
                  `RevisionNumber` int(11) NOT NULL DEFAULT '1',
                  `html` longtext NOT NULL,
                  `Deleted` datetime DEFAULT NULL,
                  PRIMARY KEY (`HtmlContentId`),
                  KEY `htmlcontent_secondary` (`PageId`,`Identifier`,`Deleted`,`langShortCode`) USING BTREE
                ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
            "));
            return(ret.ToArray());
        }
Exemple #2
0
 public override CmsDependency[] getDependencies()
 {
     return(new CmsDependency[] {
         CmsFileDependency.UnderAppPath("js/_system/GlossaryEditor.js", new DateTime(2010, 4, 22)),
         CmsFileDependency.UnderAppPath("js/_system/json2.js"),
         CmsWritableDirectoryDependency.UnderAppPath("_system/writable/Glossary"),
         new CmsDatabaseTableDependency(@"
             CREATE TABLE  `glossary` (
               `glossaryid` int(10) unsigned NOT NULL AUTO_INCREMENT,
               `pageid` int(10) unsigned NOT NULL,
               `identifier` int(10) unsigned NOT NULL,
               `langShortCode` varchar(255) NOT NULL,
               `sortOrder` varchar(255) NOT NULL,
               `ViewMode` varchar(255) NOT NULL,
               `deleted` datetime DEFAULT NULL,
               PRIMARY KEY (`glossaryid`)
             ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
         "),
         new CmsDatabaseTableDependency(@"
             CREATE TABLE  `glossarydata` (
               `GlossaryDataId` int(10) unsigned NOT NULL AUTO_INCREMENT,
               `phGlossaryId` int(10) unsigned NOT NULL,
               `isAcronym` int(10) unsigned NOT NULL,
               `word` varchar(255) NOT NULL,
               `description` text NOT NULL,
               `deleted` datetime DEFAULT NULL,
               PRIMARY KEY (`GlossaryDataId`)
             ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
         ")
     });
 }
        public CmsDependency[] getDependencies()
        {
            List <CmsDependency> ret = new List <CmsDependency>();

            ret.Add(CmsWritableDirectoryDependency.UnderAppPath("_system/writable/KeywordIndex"));
            ret.Add(CmsWritableDirectoryDependency.UnderAppPath("_system/writable/SpellCheckerIndex"));
            return(ret.ToArray());
        }
 public override CmsDependency[] getDependencies()
 {
     return(new CmsDependency[] {
         // -- javascript files are now embedded in this Assembly.
         CmsFileDependency.UnderAppPath("js/_system/GlossaryEditor.js", CmsDependency.ExistsMode.MustNotExist),
         CmsFileDependency.UnderAppPath("js/_system/json2.js", CmsDependency.ExistsMode.MustNotExist),
         // -- writable directories
         CmsWritableDirectoryDependency.UnderAppPath("_system/writable/Glossary")
     });
 }
        public override CmsDependency[] getDependencies()
        {
            List <CmsDependency> ret = new List <CmsDependency>();

            ret.Add(CmsFileDependency.UnderAppPath("_system/tools/FlashObject/PopupFlashObjectBrowser.aspx"));
            ret.Add(CmsWritableDirectoryDependency.UnderAppPath("UserFiles/Flash"));
            ret.Add(new CmsDatabaseTableDependency(@"
                CREATE TABLE  `flashobject` (
                  `FlashObjectId` int(10) unsigned NOT NULL AUTO_INCREMENT,
                  `PageId` int(10) unsigned NOT NULL,
                  `Identifier` int(10) unsigned NOT NULL,
                  `SWFPath` varchar(255) NOT NULL DEFAULT '',
                  `DisplayWidth` int(11) NOT NULL,
                  `DisplayHeight` int(11) NOT NULL,
                  `Deleted` datetime DEFAULT NULL,
                  PRIMARY KEY (`FlashObjectId`),
                  KEY `flashobject_secondary` (`PageId`,`Identifier`,`Deleted`)
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
            "));
            return(ret.ToArray());
        }
Exemple #6
0
        public override CmsDependency[] getDependencies()
        {
            List <CmsDependency> ret = new List <CmsDependency>();

            try
            {
                ret.Add(new CmsDatabaseTableDependency(@"
                CREATE TABLE  `userimagegallery` (
                  `PageId` int(10) unsigned NOT NULL,
                  `Identifier` int(10) unsigned NOT NULL,
                  `LangCode` varchar(5) NOT NULL,
                  `NumThumbsPerPage` int(10) NOT NULL,
                  `NumThumbsPerRow` int(10) NOT NULL,
                  `ThumbnailDisplayBoxWidth` int(10) NOT NULL,
                  `ThumbnailDisplayBoxHeight` int(10) NOT NULL,
                  `FullSizeDisplayBoxWidth` int(10) NOT NULL,
                  `FullSizeDisplayBoxHeight` int(10) NOT NULL,
                  `FullSizeLinkMode` varchar(255) NOT NULL,
                  `CaptionDisplayLocation` varchar(255) NOT NULL,
                  PRIMARY KEY (`PageId`,`Identifier`,`LangCode`)
                ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
            "));

                ret.AddRange(SWFUploadHelpers.SWFUploadDependencies);

                // -- writable directories
                ret.Add(CmsWritableDirectoryDependency.UnderAppPath("UserFiles/ImageGalleries"));

                // -- each placeholder directory should be writable.
                UserImageGalleryDb db = (new UserImageGalleryDb());
                UserImageGalleryPlaceholderData[] phs = db.getAllUserImageGalleryPlaceholderDatas();
                foreach (UserImageGalleryPlaceholderData ph in phs)
                {
                    CmsPage p = CmsContext.getPageById(ph.PageId);
                    if (p.ID >= 0)
                    {
                        string dir = ph.getImageStorageDirectory(p);
                        if (dir != String.Empty)
                        {
                            ret.Add(new CmsWritableDirectoryDependency(dir));
                            // -- check if the image gallery files on disk are in the database.
                            if (CmsLocalFileOnDisk.FetchAllFilesInDirectory(dir).Length > 0)
                            {
                                foreach (string fn in System.IO.Directory.GetFiles(dir))
                                {
                                    if (!fn.StartsWith(CmsLocalFileOnDisk.DeletedFileFilenamePrefix))
                                    {
                                        ret.Add(new CmsMessageDependency("The UserImageGallery directory '" + dir + "' has files, but are not in the database"));
                                        break;
                                    }
                                } // foreach
                            }
                        }
                    }
                }

                // -- REQUIRED config entries
                ret.Add(new CmsConfigItemDependency("UserImageGallery.PageXofYText"));
                ret.Add(new CmsConfigItemDependency("UserImageGallery.PrevLinkText"));
                ret.Add(new CmsConfigItemDependency("UserImageGallery.NextLinkText"));
                ret.Add(new CmsConfigItemDependency("UserImageGallery.ReturnToGalleryText"));
                ret.Add(new CmsConfigItemDependency("UserImageGallery.NoImageText"));
                ret.Add(new CmsConfigItemDependency("UserImageGallery.ImageRemovedText"));
                ret.Add(new CmsConfigItemDependency("UserImageGallery.SetCaptionButtonText"));
                ret.Add(new CmsConfigItemDependency("UserImageGallery.RemoveImageButtonText"));
                ret.Add(new CmsConfigItemDependency("UserImageGallery.SetCaptionButtonText"));
                ret.Add(new CmsConfigItemDependency("UserImageGallery.RemoveImageButtonText"));
                ret.Add(new CmsConfigItemDependency("UserImageGallery.UploadImageButtonText"));
            }
            catch (Exception ex)
            {
                ret.Add(new CmsMessageDependency("Error gathering UserImageGallery dependencies: " + ex.Message));
            }

            return(ret.ToArray());
        }
Exemple #7
0
        public override CmsDependency[] getDependencies()
        {
            string showLargerPagePath = CmsConfig.getConfigValue("SingleImage.FullSizeDisplayPath", "/_internal/showImage");

            List <CmsDependency> ret = new List <CmsDependency>();

            // -- writable directories
            ret.Add(CmsWritableDirectoryDependency.UnderAppPath("UserFiles/Image"));
            ret.Add(CmsWritableDirectoryDependency.UnderAppPath("_system/writable/ThumbnailCache"));

            // -- helpers
            ret.Add(CmsFileDependency.UnderAppPath("_system/tools/SingleImage/SingleImageEditor.aspx", new DateTime(2010, 4, 30)));
            ret.Add(CmsFileDependency.UnderAppPath("_system/tools/FCKHelpers/InlineImageBrowser2.aspx"));

            // -- pages
            ret.Add(new CmsPageDependency(showLargerPagePath, CmsConfig.Languages));

            // -- database tables
            ret.Add(new CmsDatabaseTableDependency(@"
                CREATE TABLE  `singleimage` (
                  `SingleImageId` int(10) unsigned NOT NULL AUTO_INCREMENT,
                  `PageId` int(10) unsigned NOT NULL,
                  `Identifier` int(10) unsigned NOT NULL,
                  `langShortCode` varchar(255) NOT NULL DEFAULT '',
                  `RevisionNumber` int(11) NOT NULL DEFAULT '1',
                  `ImagePath` varchar(255) NOT NULL,
                  `ThumbnailDisplayBoxWidth` int(11) NOT NULL DEFAULT '-1',
                  `ThumbnailDisplayBoxHeight` int(11) NOT NULL DEFAULT '-1',
                  `FullSizeDisplayBoxWidth` int(11) NOT NULL DEFAULT '-1',
                  `FullSizeDisplayBoxHeight` int(11) NOT NULL DEFAULT '-1',
                  `Caption` varchar(255) NOT NULL,
                  `Credits` varchar(255) NOT NULL,
                  `Tags` varchar(255) NOT NULL DEFAULT '',
                  `Deleted` datetime DEFAULT NULL,
                  PRIMARY KEY (`SingleImageId`),
                  KEY `singleimage_secondary` (`PageId`,`Identifier`,`Deleted`,`langShortCode`) USING BTREE
                ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
            "));

            // -- REQUIRED config entries
            ret.Add(new CmsConfigItemDependency("SingleImage.WithLinkTemplate"));
            ret.Add(new CmsConfigItemDependency("SingleImage.WithoutLinkTemplate"));

            ret.Add(new CmsConfigItemDependency("SingleImage.FullSizeDisplayPath"));
            ret.Add(new CmsConfigItemDependency("SingleImage.FullSizeDisplayWidth"));
            ret.Add(new CmsConfigItemDependency("SingleImage.FullSizeDisplayHeight"));

            ret.Add(new CmsConfigItemDependency("SingleImage.CreditsPromptPrefix")); // multilingual
            ret.Add(new CmsConfigItemDependency("SingleImage.ClickToEnlargeText"));  // multilingual
            ret.Add(new CmsConfigItemDependency("SingleImage.Tags"));
            ret.Add(new CmsConfigItemDependency("SingleImage.WithLinkTemplate"));
            ret.Add(new CmsConfigItemDependency("SingleImage.WithoutLinkTemplate"));
            ret.Add(new CmsConfigItemDependency("SingleImage.PopupPaddingWidth"));
            ret.Add(new CmsConfigItemDependency("SingleImage.PopupPaddingHeight"));
            ret.Add(new CmsConfigItemDependency("SingleImage.PopupMaxWidth"));
            ret.Add(new CmsConfigItemDependency("SingleImage.PopupMaxHeight"));
            ret.Add(new CmsConfigItemDependency("SingleImage.PopupMinWidth"));
            ret.Add(new CmsConfigItemDependency("SingleImage.PopupMinHeight"));

            // -- REMOVED config entries
            //          thumbnail size is always set in the template
            ret.Add(new CmsConfigItemDependency("SingleImagePlaceholderDefaultThumbBoxWidth", CmsDependency.ExistsMode.MustNotExist));
            ret.Add(new CmsConfigItemDependency("SingleImagePlaceholderDefaultThumbBoxHeight", CmsDependency.ExistsMode.MustNotExist));
            //          full display size is set by SingleImage.FullSizeDisplayWidth
            ret.Add(new CmsConfigItemDependency("SingleImagePlaceholderDefaultFullSizeBoxWidth", CmsDependency.ExistsMode.MustNotExist));
            ret.Add(new CmsConfigItemDependency("SingleImagePlaceholderDefaultFullSizeBoxHeight", CmsDependency.ExistsMode.MustNotExist));

            //          useSubModal and useMultibox now handled using display templates (ThumbDisplayTemplate and FullDisplayTemplate)
            ret.Add(new CmsConfigItemDependency("SingleImagePlaceHolderUseSubModal", CmsDependency.ExistsMode.MustNotExist));
            ret.Add(new CmsConfigItemDependency("SingleImagePlaceHolderUseMultibox", CmsDependency.ExistsMode.MustNotExist));

            //          SingleImageDisplayPath is now SingleImage.FullSizeDisplayPath
            ret.Add(new CmsConfigItemDependency("SingleImageDisplayPath", CmsDependency.ExistsMode.MustNotExist));

            //          SingleImagePlaceHolderCreditsPrefix is now SingleImage.CreditsPromptPrefix
            ret.Add(new CmsConfigItemDependency("SingleImagePlaceHolderCreditsPrefix", CmsDependency.ExistsMode.MustNotExist));
            //          SingleImagePlaceHolderClickToEnlargeText is now SingleImage.ClickToEnlargeText
            ret.Add(new CmsConfigItemDependency("SingleImagePlaceHolderClickToEnlargeText", CmsDependency.ExistsMode.MustNotExist));

            //          SingleImagePlaceHolderPopupPaddingWidth is now SingleImage.PopupPaddingWidth
            ret.Add(new CmsConfigItemDependency("SingleImagePlaceHolderPopupPaddingWidth", CmsDependency.ExistsMode.MustNotExist));
            //          SingleImagePlaceHolderPopupPaddingHeight is now SingleImage.PopupPaddingHeight
            ret.Add(new CmsConfigItemDependency("SingleImagePlaceHolderPopupPaddingHeight", CmsDependency.ExistsMode.MustNotExist));
            //          SingleImagePlaceHolderPopupMaxWidth is now SingleImage.PopupMaxWidth
            ret.Add(new CmsConfigItemDependency("SingleImagePlaceHolderPopupMaxWidth", CmsDependency.ExistsMode.MustNotExist));
            //          SingleImagePlaceHolderPopupMaxWidth is now SingleImage.PopupMaxWidth
            ret.Add(new CmsConfigItemDependency("SingleImagePlaceHolderPopupMaxHeight", CmsDependency.ExistsMode.MustNotExist));
            //          SingleImagePlaceHolderPopupMinHeight is now SingleImage.PopupMinHeight
            ret.Add(new CmsConfigItemDependency("SingleImagePlaceHolderPopupMinHeight", CmsDependency.ExistsMode.MustNotExist));
            ret.Add(new CmsConfigItemDependency("SingleImagePlaceHolderPopupMinWidth", CmsDependency.ExistsMode.MustNotExist));

            return(ret.ToArray());
        }