Is there a way to give a plugin some parameters?

Hi, here’s my problem:

I got a plugin which acts differently according to a certain paramether, till now I made this through a final variable:

public class MyPlugin implements Plugin{

public static final int par = 1; //example

public void initPlugin(){

//do something according to par value

}

}

Now, if I want to change plugin’s behaviour I have to edit the sources and re-compile the plugin. Is there a way to give plugin the paramether, maybe through admin console?How?

Hi,

take a look at the broadcast plugin. It uses “System Parameters” like “plugin.broadcast.allowedUsers”=“admin”.

If you want to make things a little bit more complicated you can also write a nice UI to allow one to enter values.

LG

I think I understood mechanism: you set and get a JiveGlobals property, so my function could be something like this:

public void initPlugin(){

JiveGlobals.getProperty(“myProperty”,"");

//do something according to property

}

right?

But now I have another problem: how to set the property?It would be nice to make this throught admin console, in my plugin’s tab, but I don’t know how to create tabs, buttons or anything…do you have any guide?