void IInstallablePlugin.Uninstall() { #region Remove Widget Files FactoryDefaultScriptedContentFragmentProviderFiles.DeleteAllFiles(this); #endregion }
//notes on guids //evolutionGuid = "aa8056256ecb481bae92f2db9f87e893"; //fijiGuid = "7e987e474b714b01ba29b4336720c446"; //socialGuid = "3fc3f82483d14ec485ef92e206116d49"; //enterpriseGuid = "424eb7d9138d417b994b64bff44bf274"; //blogThemeTypeID = new Guid("a3b17ab0-af5f-11dd-a350-1fcf55d89593"); //groupThemeTypeID = new Guid("c6108064-af65-11dd-b074-de1a56d89593"); //siteThemeTypeID = new Guid("0c647246-6735-42f9-875d-c8b991fe739b"); void IInstallablePlugin.Install(Version lastInstalledVersion) { #region Install Widgets FactoryDefaultScriptedContentFragmentProviderFiles.DeleteAllFiles(this); //install default widgets and supplementary files var definitionFiles = new string[] { "SamlLoginAutoSelect-Widget.xml" , "SamlLogout-Widget.xml" }; foreach (var definitionFile in definitionFiles) { using (var stream = EmbeddedResources.GetStream("Telligent.Services.SamlAuthenticationPlugin.Resources.Widgets." + definitionFile)) FactoryDefaultScriptedContentFragmentProviderFiles.AddUpdateDefinitionFile(this, definitionFile, stream); } ContentFragments.Enable(ThemeTypes.Site, ContentFragments.GetScriptedContentFragmentTypeString(new Guid("63b5fbf0d2db41eaa165c27ac43ee0f7"))); //Login Auto Select ContentFragments.Enable(ThemeTypes.Site, ContentFragments.GetScriptedContentFragmentTypeString(new Guid("31728beb334e420e84200cc6f81d109c"))); //Logout #endregion #region Insert Widgets Into existing themes and pages foreach (var theme in Themes.List(ThemeTypes.Site)) { //add the saml auto select widget to the login page if (theme.Name == "3fc3f82483d14ec485ef92e206116d49") { //Add CaseList to User profile page after Activity List InsertWidget(theme , "common-login" , false , "Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.ScriptedContentFragments::b1db6b71c0be43b58925e469eb6315a4" , ContentFragmentPlacement.Before , "content" , "Telligent.Evolution.ScriptedContentFragments.ScriptedContentFragment, Telligent.Evolution.ScriptedContentFragments::63b5fbf0d2db41eaa165c27ac43ee0f7" , "" , "no-wrapper responsive-1"); } } #endregion #region Create Database Table if required InitializeScheama(); #endregion }
public virtual void Uninstall() { if (!Diagnostics.IsDebug(GetType().Assembly)) { //Only in release do we want to uninstall widgets, when in development we don't want this to happen try { FactoryDefaultScriptedContentFragmentProviderFiles.DeleteAllFiles(this); } catch (Exception exception) { new CSException(CSExceptionType.UnknownError, string.Format("Couldn't delete factory default widgets from provider ID: '{0}'.", ScriptedContentFragmentFactoryDefaultIdentifier), exception).Log(); } } }
public void Uninstall() { FactoryDefaultScriptedContentFragmentProviderFiles.DeleteAllFiles(this); }
private static void RemoveWidgets(IScriptedContentFragmentFactoryDefaultProvider provider) { FactoryDefaultScriptedContentFragmentProviderFiles.DeleteAllFiles(provider); }