Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Combine Options Editing?

Quote Reply
Combine Options Editing?
With the combination of other "settings" on other parts of my site, the number of "option" settings in Gossamer Mail can be a little overwhelming to some.

I'd like to combine some of the options pages to make the entire setup a little more compact (in appearance, at least).. but there doesn't seem to be a way to do this that I can see.

Is there any way to feed a form to the options routines that will save *any* of the valid parameters you send it (as opposed to having to categorize theml; options-mailbox-save, options-display-save, etc).

If not - can anyone think of an alternative method for this? Code tweaks are fine, I can handle altering Perl.. writing from scratch is a bit beyond me.

I suppose I could write something in PHP which would save over the options file, but I'd rather feed things through the GT system so that everything is guarenteed to be in sync.

Thanks in Advance!
Quote Reply
Re: [AMJones] Combine Options Editing? In reply to
You can do this, but there's a few things you need to do:

- At the top of each options page, there's a function call like this: <%GMail::Options::Display::info%>
This needs to be added to your new options template for each options page included

- Near the <form> tag, there's something like:
<input type="hidden" name="do" value="options-display-save">
That also needs to be added to your options template for each options page included

- Lastly, you'll want:
<input type="hidden" name="page" value="options.htm">
Where options.htm is the name of the options page you're creating. This is the page the user will be sent to after they submit the changes.

I've attached a sample page, which saves the "Send deleted mail to Trash" option from the Mailbox options page, and the "Messages to display per page" option from the Display options page.

There is one catch with the way we're doing things here. The message displayed to the user after they submit the changes will be the message from the options page last listed in the <input type="hidden" name="do" value="options-display-save"> html.