Author Topic: How to setup parameter input for a plugin?  (Read 8585 times)

Kareed

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
How to setup parameter input for a plugin?
« on: March 14, 2016, 03:02:12 AM »
Hi,
I want to start playing with making plugins.  I have created a tab to display a external webpage but I would like to have the website configurable from the settings panel without it being hard coded into the plugin.  How would I go about doing that?  I can't find any information on adding this type of capability.

Thanks
Kareed

conrado

  • Administrator
  • Hero Member
  • *****
  • Posts: 1000
  • Conrado
    • View Profile
    • Feng Office
    • Email
Re: How to setup parameter input for a plugin?
« Reply #1 on: March 15, 2016, 02:48:59 PM »
Hi Kareed,

Please do share the info here once you figure it out.

I have seen others do it so it shouldn't be too hard.

Cheers!
Get Official Support for your Feng Office. Support the development team. Sign up for a Free Trial here.

Kareed

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: How to setup parameter input for a plugin?
« Reply #2 on: March 18, 2016, 01:50:55 AM »
I figured it out and it was easy.  It just took a long time to figure that out.

All you need to do is add a new value into the config_options table.  The category name appears to be where the item will show in the settings.  I used general and it showed up under the general settings.  Create a name for the variable, I used timeclock_url.  Specify the type of interface, I used StringConfigHandler to get a textfield.  The text for the field is specified in the language lang.php file.

I was adding a timeclock tab so in the lang.php file I put the following information.
   'config option name timeclock_url'=>'Time Clock URL',
   'config option desc timeclock_url'=>'Enter in the url for the timeclock.',

I created a file mysql_initial_data.php in the folder install/sql to add the config_options entry on the installation of the plugin.  This file added the entry to the database.

Hope this helps.

conrado

  • Administrator
  • Hero Member
  • *****
  • Posts: 1000
  • Conrado
    • View Profile
    • Feng Office
    • Email
Re: How to setup parameter input for a plugin?
« Reply #3 on: April 13, 2016, 04:44:35 PM »
I am sure it will help many others.

Just FYI: Feng Office has a time tab for time tracking, and a clock for tasks on the tasks tab. I don't know if you mean that when you say you added a "timeclock" tab.

Cheers!
Get Official Support for your Feng Office. Support the development team. Sign up for a Free Trial here.

Larry378

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: How to setup parameter input for a plugin?
« Reply #4 on: January 12, 2019, 04:11:53 AM »
Select multiple columns among the columns of an input dataset. Plugin-level configuration allows you to have a centralized configuration.

Trunganh3112

  • Freshman
  • *
  • Posts: 13
    • View Profile
    • http//:ungdungngon.com
    • Email
Re: How to setup parameter input for a plugin?
« Reply #5 on: May 22, 2019, 11:22:10 PM »
In my opinion, Feng has a time and clock tab for task tabs. You may add timeclock

 

anything