where are the module settings data saved? [solved]

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
pumuklee

where are the module settings data saved? [solved]

Post by pumuklee »

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
Last edited by pumuklee on Thu May 31, 2007 2:00 pm, edited 1 time in total.
calguy1000
Support Guru
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?

Post by calguy1000 »

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.
pumuklee

Re: where are the module settings data saved?

Post by pumuklee »

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
calguy1000
Support Guru
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?

Post by calguy1000 »

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.
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.
pumuklee

Re: where are the module settings data saved?

Post by pumuklee »

ok thanks
i do in this way
Locked

Return to “Modules/Add-Ons”