Using $config_vars

Started by tyty1234, September 12, 2009, 02:20:16 AM

Previous topic - Next topic

tyty1234

Is there a doc, or thread on how $config_vars work? I've seen it in the comments in the ModSettings.php file for SMF 1.1.x, but in ManageSettings.php, it's not there. :(

It seems that $config_vars has changed a bit between concerning the fact that the disabled key is only seen in SMF 2.x. Can anyone provide me with a detailed description for working with $config_vars?

Thanks
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

Arantor

Basically you add items to the array concerning what you want to add. (In 1.1, it's built in ModSettings.php)

It covers the generic configuration pages where they are simple lists of variable-value key that apply to everything, and are for values that enter $modSettings and live in the {$db_prefix}settings table.

I've used it in a couple of mods; my Disable Template Eval mod adds items in just that way - look at where it's adding it, and it should become clear (sorry I'm so vague, I just woke up)
Holder of controversial views, all of which my own.


tyty1234

Well, I'm familiar with how its used and all, but it would be nice if there was a reference thread I could refer to so that I know its complete features. :)
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

Arantor

The only reference to it is in the source itself at the moment. There should be a fair number of notes in the source as to how to use it, which is how I learned how to use it.

We do need more coding-related docs, e.g. how to add permissions, how to add this and more.
Holder of controversial views, all of which my own.


tyty1234

I agree with you Arantor. And who knows? Maybe Jade might come across this thread....maybe, maybe not.
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

Arantor

Well, the problem is that it needs to be someone with a strong coding experience and at least a reasonable knowledge of the more inner-bits of the source - and that pretty much limits it to the devs, customizers and the strong modders.

I did write a guide a bit back on how to create new scheduled tasks in 2.0, I will see about writing some more guides that the Doc team can make all nice and readable, but it's dependent on the time it takes - just writing how to make a new scheduled task (which is a simpler job) took about 3 hours to write.
Holder of controversial views, all of which my own.


tyty1234

That's pretty true. Hopefully, I'll learn more about $config_vars. Maybe one of the devs will see this topic and reply to it?
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

Arantor

Well, the devs are pretty busy at cranking out RC2, but I'll see what I can come up with in the meantime.
Holder of controversial views, all of which my own.


Advertisement: