Member
Member
hhm   25-03-2010, 08:35
#1

Before I start to dissect the code of available plugins:
I'm toying around with writing a plugin in which the admin can set preferences for the plugin which he would want to be persistently stored. Is there an established way of storing such things in the database?

Best regards,
Hans

Member
Member
wongm   25-03-2010, 09:30
#2

Have a look at any of the existing plugins - they use a 'hook' for saving and reading settings. May I suggest my 'image markup generator' plugin? ;-)
http://code.google.com/p/wongm-zenphoto-plugins/

Administrator
Administrator
acrylian   25-03-2010, 11:07
#3

It is a good idea to look at existing plugins as most all of theme contain preferences (we call options) right at the beginning. There is also a user guide article about plugins.

Member
Member
sbillard   25-03-2010, 17:37
#4

The best practice with regard to options is to include the plugin filename as part of the option name. This prevents duplication of options names (which would cause problems because only one of the same named options would be stored.)

Member
Member
hhm   26-03-2010, 08:47
#5

Thanks so far. I'll have a look at it and complain later if I can't get it working.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.