How to deploy a plugin on Razuna 1.6.2?

Hi guys,

This is related my previous question How to get the assetID and Customfields on a plugin hook.
I have found some sample code to scaffolding a new plugin under global/plugins. I copied the plugin’s folder global/plugins/metaform and placed it on the same directory. I further modified the copy to trigger on on_file_remove and it to call console.log("Hello World"); on the view, i.e. cfm file. Further I restarted Razuna (that is, I restarted the Tomcat) and removed a image, but nothing came out in the Javascript console.

This led my to the question: how do I deploy a Plugin on a running Razuna? Is add_action all I have to do to active my plugin? Is my code under plugins rightly place?

here is my code:

global/plugins/ltur/cfc/main.cfc :
<cfcomponent output="false" extends="global.cfc.api"> <cfset this.myID = getMyID("ltur")> <cffunction name="load" returntype="void"> <cfset add_action(pid="#this.myID#", action="on_file_remove", comp="notify", func="notifyremove")> </cffunction> </cfcomponent>

global/plugins/ltur/cfc/notify.cfc :
<cfcomponent output="false" extends="global.cfc.api"> <cffunction name="notifyremove" access="public" output="false"> <cfreturn now() /> </cffunction> </cfcomponent>

global/plugins/ltur/view/notify.cfm
<cfoutput> <script language="JavaScript" type="text/javascript"> console.log("Hello World"); </script> </cfoutput>

Here is my metadata:

Self-hosted
Razuna 1.6.2
Chrome Version 32.0.1700.77
MySQL 5.5.29
SUSE Linux

Thanks a bunch!

Hi,

First and foremost for a plugin to work, you have to register it in the backend administration. Additionally you will have to activate it for each host. See http://wiki.razuna.com/display/ecp/Installing+and+activating+a+plugin

Additionally, you have to have the main.cfc and the settings.cfc file in the plugin/myplugin/cfc folder. The main.cfc is being called when you register/activate your plugin in the administration and registers all the hooks of your plugin with the system.

Once this is done, you can access the plugin API ( http://wiki.razuna.com/display/ecp/Plugin+API ) and can access Razuna with all available hooks ( http://wiki.razuna.com/display/ecp/Plugin+Hooks ).

Hi Nitai,

Thanks a lot for answer! We got it running! :slight_smile: Let me know if I can get involved in improving the Razuna documentation on this particular topic with the experience we gathered building our little plugin.

1 Like

Awesome.

Any help is appreciated. the wiki is a great place to share your knowledge. Another place is also to add your experience to the know-how category on here.