Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Updating the settings file

edited February 2007 in Vanilla 1.0 Help
I'm just looking for the correct procedure to correct my conf/settings file. I'm writing an extension and adding things to the settings file. In the first version of the extension, I have 3 settings. They are written to the settings file and I can access them okay.

In my second version of my extension, I have added 2 more settings. However my code comes up with an index error because it's trying to get settings that don't exist yet. What is the correct way to make these adjustments to the settings?

I hope that I am making myself clear.

Comments

  • Options
    I think you can check to make sure a setting exists with isset:

    if (isset($whatever->Context->Configuration['setting']))
  • Options
    ur using EasySetting? you have to change the version number whenever you change settings so that it updates with the new options.
  • Options
    have a look in Framework.Class.ConfigurationManager.php ...
  • Options
    You know, this is really weird. I made a comment before Vincent did a couple of hours or so ago. I added it. I looked at it. I returned to the discussion page and saw that I made the last comment. Now, it is gone. This is not the first time this has happened. I don't want to be paranoid, but what is going on?
  • Options
    Are you sure about that jimw? I kinda thought that had been happening a couple of times but i wasnt sure if i was forgetting to add it...
  • Options
    edited February 2007
    I could of sworn Mark made a post in that setup page thread... Mini: Care to turn on 'make deleted comments visible?'... I see you still are an master admin.
  • Options
    I already have them visible...they aint there.
  • Options
    In the past, I have clicked the Back to Discussions without commenting, but not these times. Oh well, I'll just take my sanity pill and everything will be alright.
  • Options
    Well I dont really see how it could be a bug or anything...I do know what you mean though.
  • Options
    @WallPhone: Thanks for the idea. I'll do that. For now, I've just been editing the settings file and deleting the entries and then let them all be regenerated after I add new ones. That's okay for me during development, but not for the end user.
This discussion has been closed.