Questions about the API

Creating and modifying plugins.
Post Reply
Maliuta
Regular
Posts: 6
Joined: Tue Jul 20, 2004 7:27 pm
Location: Brisbane, Australia
Contact:

Questions about the API

Post by Maliuta »

I note in the get_config() method there is a parameter for default value. How does this work? If I want a default value of 30 do I just pass is like get_config('my_config', 30)?

I would really like to be able to code the default values in like that.

I am also interested in what types I can put in the configuration ... everyone uses "text", but I also see "select" used in one plugin.

Nikolai
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Questions about the API

Post by garvinhicking »

Yes. Exactly like you wrote it, it works. :-)

The available types are: seperator, select, boolean, radio, string, html, hidden. Grep through the plugins to see examples for plugins using that methods. Some of them need an extra bag value 'select_values' to be set.

Regards,
Garvin.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply