The Serendipity Handbook

You can now read the (german) handbook here: PDF - https://github.com/s9y/Book (LaTeX source).

Forum-Information

Before posting about errors, make sure that the answer cannot already be found in our FAQ or by searching this forum!
Posting is restricted to registered users (registering is free and simple!) due to recent spam attacks. When having trouble with this board, contact garvin(-at)s9y(-dot)org.

Board index Plugins Questions about the API

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

Postby Maliuta » Fri Jul 23, 2004 1:28 am

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

User avatar
garvinhicking
Core Developer
 
Posts: 28944
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Fri Jul 23, 2004 1:59 pm

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/



Return to Plugins

Who is online

Users browsing this forum: Bing [Bot] and 0 guests