Exemplo n.º 1
0
        /// <summary>
        /// 初始化插件
        /// </summary>
        /// <param name="_app"></param>
        /// <returns></returns>
        public PluginConnectionResult Connect(IPluginHost _app)
        {
            IExtendApp app = _app as IExtendApp;

            if (app != null)
            {
                //注册
                app.Register(this, app_OnExtendModuleRequest, app_OnExtendModulePost);
                Cms.Plugins.MapExtendPluginRoute("xmlrpc", app.GetAttribute(this).WorkIndent);
            }

            blogService = new WeblogRPCService();

            //初始化设置
            attr = this.GetAttribute();
            bool isChanged = false;

            if (attr.Settings.Contains("enable_base64_image"))
            {
                WeblogRPCService.EnableBase64Images = attr.Settings["enable_base64_image"] == "yes";
            }
            else
            {
                WeblogRPCService.EnableBase64Images = false;
                attr.Settings.Set("enable_base64_image", "no");
                isChanged = true;
            }

            if (isChanged)
            {
                attr.Settings.Flush();
            }

            return(PluginConnectionResult.Success);
        }
Exemplo n.º 2
0
        public PluginConnectionResult Connect(IPluginHost _app)
        {
            IExtendApp app = _app as IExtendApp;

            if (app != null)
            {
                //注册
                app.Register(this, app_OnExtendModuleRequest, app_OnExtendModulePost);
                Cms.Plugins.MapExtendPluginRoute("admin/dpicker", app.GetAttribute(this).WorkIndent);
            }

            return(PluginConnectionResult.Success);
        }
Exemplo n.º 3
0
        public PluginConnectionResult Connect(IPluginHost app)
        {
            IExtendApp _app = app as IExtendApp;

            if (_app != null)
            {
                RequestProxry req = new RequestProxry(_app);
                _app.Register(this, req.HandleGet, req.HandlePost);
                // Cms.Plugins.MapExtendPluginRoute(this);
            }

            return(PluginConnectionResult.Success);
        }
Exemplo n.º 4
0
        public PluginConnectionResult Connect(IPluginHost app)
        {
            IExtendApp _app = app as IExtendApp;

            if (_app != null)
            {
                Config.Init(this);

                RequestProxry req = new RequestProxry(_app, this);
                _app.Register(this, req.HandleGet, req.HandlePost);
                _app.MapExtendPluginRoute(this);
                _app.MapExtendPluginRoute(this, "wxm");
                this.init();
            }


            return(PluginConnectionResult.Success);
        }