sys_options kateg explanation?

I am trying to make a 'simple' admin module page to provide settings for a script.

I am working with the bloggie example to experiment.

Can someone explain how the sys_options work? Especially kateg.

~

As an example, I found these two 'settings':

INSERT INTO `sys_options` (`Name`, `VALUE`, `kateg`, `desc`, `Type`, `check`, `err_text`, `order_in_kateg`, `AvailableValues`) VALUES

('me_blgg_permalinks', 'on', 26, 'Enable friendly permalinks in Bloggie', 'checkbox', '', '', '0', ''),

('me_blgg_max_posts_to_show', '10', @iCategId, 'Max number of posts to show', 'digit', '', '', '1', '');


Two questions regarding this. First why don't I see the first setting in the module admin page? Second what is needs to be changed to add additional options?

Will the following work?

INSERT INTO `sys_options` (`Name`, `VALUE`, `kateg`, `desc`, `Type`, `check`, `err_text`, `order_in_kateg`, `AvailableValues`) VALUES

('me_blgg_permalinks', 'on', 26, 'Enable friendly permalinks in Bloggie', 'checkbox', '', '', '0', ''),

('me_blgg_max_posts_to_show', '10', @iCategId, 'Max number of posts to show', 'digit', '', '', '1', ''),

('me_blgg_checkbox', 'on', @iCategId, 'Max number of posts to show', 'checkbox', '', '', '2', '');

Thanks for any help.

Light man a fire keep him warm for a night, light him ON fire & he will be warm the rest of his life
Quote · 15 Jul 2010

Hi,

kateg is just a category id.

You don't see the first one as it's kind of hidden field but for the rest you will see them as you keep adding them e.g.

SET @iCategId = (SELECT LAST_INSERT_ID());

INSERT INTO `sys_options` (`Name`, `VALUE`, `kateg`, `desc`, `Type`, `check`, `err_text`, `order_in_kateg`, `AvailableValues`) VALUES

('me_blgg_permalinks', 'on', 26, 'Enable friendly permalinks in Bloggie', 'checkbox', '', '', '0', ''),

('me_blgg_max_posts_to_show', '10', @iCategId, 'Max number of posts to show', 'digit', '', '', '1', ''),

('me_blgg_checkbox', 'on', @iCategId, 'Max number of posts to show', 'checkbox', '', '', '2', ''),

('me_blgg_max_logs', 'on', @iCategId, 'Max number of logs', 'checkbox', '', '', '3', ''),

('me_blgg_max_views', 'on', @iCategId, 'Max number of views', 'checkbox', '', '', '4', '');

And then to read the value in your code, just do this:

$max_views = getParam('me_blgg_max_views');

HTH

Mods4Dolphin

Facebook, Twitter & Instagram Combo - http://bit.ly/1h5CarP
Quote · 26 Jul 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.