hi
i create a new module
i need also a settings tab for this to set some colours, names, email address...
the question is where are these data saved normally in cmsms
because for other modules i didnt find this datas in DB and nor in config files
so the question is where the settings saved?(DB, file...)
thanks
where are the module settings data saved? [solved]
where are the module settings data saved? [solved]
Last edited by pumuklee on Thu May 31, 2007 2:00 pm, edited 1 time in total.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: where are the module settings data saved?
We use the GetPreference and SetPreference api methods to store the module preferences, which does store the data in the preferences table.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: where are the module settings data saved?
hi
i find something also
so that all the settings are saved in the cms_siteprefs table in the DB for all the modules
and if i need something i read it from this table?
and if i want to have some settings for a module than i create a new record in this table?
with the name and value which i want
thanks
i find something also
so that all the settings are saved in the cms_siteprefs table in the DB for all the modules
and if i need something i read it from this table?
and if i want to have some settings for a module than i create a new record in this table?
with the name and value which i want
thanks
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: where are the module settings data saved?
in a module I just call $this->SetPreference('preference_name',$value); and to retrieve the preference $this->GetPreference('preference_name')
That's all you need to do.
That's all you need to do.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.