Plugin/Application development

Former Member
Former Member

I downloaded some .Net code to implement a Plugin/Application from https://community.telligent.com/community/11/w/developer-training/65100/creating-custom-applications-and-content
I have compiled the application and copied the DLL to the bin directory of my Telligent Community, but the Application doesn't show up in the "Add Application" section of the Administration interface. Am I missing something?

Parents
  • Hi . Is your plugin enabled? It wouldn't be by default, as you'd need to enable it in Administration > Extensions first. And if it isn't listed in Administration > Extensions, there is likely an issue with the plugin being able to initialize and there should be an exception about it logged in Administration > Monitoring > Exceptions.

  • Former Member
    0 Former Member in reply to Michael Monteleone

    I have enabled it, but it still isn't showing. No recent exceptions logged either.

  • If the plugin is listed and enabled in Extensions, there is likely some other issue with the plugin implementation. Since you mentioned "Add Application", is this an IApplicationType plugin? If so, is the custom application type listed in Administration > Applications > Applications when the plugin is enabled in Administration > Extensions?

    If it's not listed there, it would be helpful to share some code.

  • Former Member
    0 Former Member in reply to Michael Monteleone

    using System;
    using Telligent.Evolution.Extensibility;
    using Telligent.Evolution.Extensibility.Administration.Version1;
    using Telligent.Evolution.Extensibility.Api.Version1;
    using Telligent.Evolution.Extensibility.Content.Version1;
    using Telligent.Evolution.Extensibility.Version1;
    
    namespace Samples.Links
    {
        public class LinksApplicationType : IApplicationType, ITranslatablePlugin, IAdministrationPanel
        {
            IApplicationStateChanges _applicationState = null;
            ITranslatablePluginController _translations = null;
    
            public Guid AdministrationPanelCategoryId { get; }
            public string CssClass { get; }
            public int? DisplayOrder { get; }
            public bool IsCacheable { get; }
            public string PanelDescription { get; }
            public Guid PanelId { get; }
            public string PanelName { get; }
            public bool VaryCacheByUser { get; }
    
            #region IPlugin Members
            string IPlugin.Name
            {
                get { return "Links"; }
            }
            string IPlugin.Description
            {
                get { return "Collections of Links"; }
            }
    
            void IPlugin.Initialize()
            {
    
            }
            #endregion
    
            #region IApplicationType Members
            Guid IApplicationType.ApplicationTypeId
            {
                get { return ContentTypes.LinksApplicationId; ; }
            }
    
            string IApplicationType.ApplicationTypeName
            {
                get { return _translations.GetLanguageResourceValue("ApplicationTypeName"); }
            }
    
            void IApplicationType.AttachChangeEvents(IApplicationStateChanges stateChanges)
            {
                _applicationState = stateChanges;
            }
    
            Guid[] IApplicationType.ContainerTypes
            {
                get { return new Guid[] { Apis.Get<IGroups>().ContentTypeId }; }
            }
    
            IApplication IApplicationType.Get(Guid applicationId)
            {
                return LinksData.GetApplication(applicationId);
            }
            #endregion
    
            #region ITranslatablePlugin Members
            Translation[] ITranslatablePlugin.DefaultTranslations
            {
                get
                {
                    var t = new Translation("en-US");
                    t.Set("ApplicationTypeName", "Links Application");
                    return new Translation[] { t };
                }
            }
    
            void ITranslatablePlugin.SetController(ITranslatablePluginController controller)
            {
                _translations = controller;
            }
            #endregion
    
            public string GetViewHtml()
            {
                return null;
            }
    
            public bool HasAccess(int userId)
            {
                return true;
            }
        }
    }
    
    Samples.Links.zip

    This is part of the code I downloaded. The full code is in the zip file.

    I added the implementation of IAdminstrationPanel as I thought that was the issue, but it hasn't fixed the problem

  • Thank you for sharing the code. I'm also able to compile and enable this plugin in Administration. To add an application of this type within a group's "Add Application" management panel (and subsequently manage the application through panels), it must also implement IManageableApplicationType. I haven't fully reviewed the application, but it would also need to define APIs, pages, factory default widgets, and more. And for being fully manageable within the contextual management shell, it would also need to implement IApplicationPanels for whatever manageable behavior you'd want to expose.

Reply
  • Thank you for sharing the code. I'm also able to compile and enable this plugin in Administration. To add an application of this type within a group's "Add Application" management panel (and subsequently manage the application through panels), it must also implement IManageableApplicationType. I haven't fully reviewed the application, but it would also need to define APIs, pages, factory default widgets, and more. And for being fully manageable within the contextual management shell, it would also need to implement IApplicationPanels for whatever manageable behavior you'd want to expose.

Children