|
From: Jochen M. <ml...@om...> - 2003-12-28 13:39:37
|
Hi,
who did the concept for the gui?
Joe or Rene?
What I think about, is if it is possible to change the "list" item
in config.
The advantage would be, that one could seperate option and value,
which would be better if a option should be longer.
I am running into problems, creating another backup method in the
options.
At present:
<option value="rsync">rsync</option>
<option value="rsync_ssh">rsync_ssh</option>
Could be:
<option value="rsync">rsync (using daemon)</option>
<option value="rsync_ssh">rsync (using ssh)</option>
Only two changings would be necessary for this:
1. definition in config.php.in
now:
$server_defs["backup_method"]["list"]["0"] = "rsync";
then:
$server_defs["backup_method"]["list"]["rsync"] = "rsync (using
daemon)";
2. little changing in "html_list":
gui.pinc
now:
foreach ($options as $option){
$html .= "<option value=\"$option\"";
if ($value == $option) {
$html .= " selected";
}
$html .= ">$option\n";
}
then:
foreach ($options as $index => $option){
$html .= "<option value=\"$index\"";
if ($value == $index) {
$html .= " selected";
}
$html .= ">$option\n";
}
Advantages:
o Option could be more descriptive and independent from value
o Better support for probably multilanguage - support
Disadvantage:
o config.php.in not downwards compatible to 0.6.0
Looking forward to your feedback
|
|
From: Jochen M. <ml...@om...> - 2003-12-28 13:43:22
|
uups, > > At present: > <option value="rsync">rsync</option> > <option value="rsync_ssh">rsync_ssh</option> > > Could be: > <option value="rsync">rsync (using daemon)</option> > <option value="rsync_ssh">rsync (using ssh)</option> > > Only two changings would be necessary for this: ought to be changed. Well I'll first make a suggestion for the rsync_ssh version and then you can have a look at it. Think it would be nicer with the options the suggested way. Cheers Jochen |
|
From: Joe Z. <jz...@co...> - 2004-01-18 22:03:08
|
Jochen Metzger wrote: >What I think about, is if it is possible to change the "list" item >in config. > >The advantage would be, that one could seperate option and value, >which would be better if a option should be longer. > >Only two changings would be necessary for this: > >1. definition in config.php.in >now: >$server_defs["backup_method"]["list"]["0"] = "rsync"; >then: >$server_defs["backup_method"]["list"]["rsync"] = "rsync (using >daemon)"; > > > I'm thinking of doing it like this by adding a line to config.php: $server_defs["backup_method"]["list"]["0"] = "rsync" $server_defs["backup_method"]["list_text"]["0"] = "rsync (using daemon)" I like your method better because it's shorter and simpler, but I'm thinking this would be forward compatible for installing an upgrade of bobs. |
|
From: Joe Z. <jz...@co...> - 2004-01-19 01:21:49
|
Joe Zacky wrote: > Jochen Metzger wrote: > >> What I think about, is if it is possible to change the "list" item >> in config. >> >> The advantage would be, that one could seperate option and value, >> which would be better if a option should be longer. >> >> Only two changings would be necessary for this: >> >> 1. definition in config.php.in >> now: >> $server_defs["backup_method"]["list"]["0"] = "rsync"; >> then: >> $server_defs["backup_method"]["list"]["rsync"] = "rsync (using >> daemon)"; >> >> >> > I'm thinking of doing it like this by adding a line to config.php: > > $server_defs["backup_method"]["list"]["0"] = "rsync" > $server_defs["backup_method"]["list_text"]["0"] = "rsync (using daemon)" > > I like your method better because it's shorter and simpler, but I'm > thinking this would be forward compatible for installing an upgrade of > bobs. > I made the above change to config.php.in and gui.pinc but I'm waiting for cvs to come back online. Maybe I'll upload this stuff tomorrow. Joe |
|
From: Jochen M. <j.m...@om...> - 2004-01-19 10:11:36
|
Hi Joe, Am So, 2004-01-18 um 23.02 schrieb Joe Zacky: > Jochen Metzger wrote: > > > >1. definition in config.php.in > >now: > >$server_defs["backup_method"]["list"]["0"] = "rsync"; > >then: > >$server_defs["backup_method"]["list"]["rsync"] = "rsync (using > >daemon)"; > > > > > > > I'm thinking of doing it like this by adding a line to config.php: > > $server_defs["backup_method"]["list"]["0"] = "rsync" > $server_defs["backup_method"]["list_text"]["0"] = "rsync (using daemon)" > > I like your method better because it's shorter and simpler, but I'm thinking this would be forward compatible for installing an upgrade of bobs. > > Yes, you are right. To be downwards compatible is the best choice. When nothing is set in list_text the renderer (gui.pinc ?) should also still use "list", only when "list_text" is set this should be used Cheers |
|
From: Joe Z. <jz...@co...> - 2004-01-20 02:54:14
|
Jochen Metzger wrote: >>I'm thinking of doing it like this by adding a line to config.php: >> >>$server_defs["backup_method"]["list"]["0"] = "rsync" >>$server_defs["backup_method"]["list_text"]["0"] = "rsync (using daemon)" >> >>I like your method better because it's shorter and simpler, but I'm thinking this would be forward compatible for installing an upgrade of bobs. >> >> >> >> >Yes, you are right. To be downwards compatible is the best choice. >When nothing is set in list_text the renderer (gui.pinc ?) should also >still use "list", only when "list_text" is set this should be used > >Cheers > > Great minds think alike. That's the way I coded it. Joe |
|
From: Rene R. <re...@gr...> - 2004-01-18 23:44:48
|
On Sun, 2004-01-18 at 23:02, Joe Zacky wrote:
> >
> I'm thinking of doing it like this by adding a line to config.php:
>
> $server_defs["backup_method"]["list"]["0"] = "rsync"
> $server_defs["backup_method"]["list_text"]["0"] = "rsync (using daemon)"
>
> I like your method better because it's shorter and simpler, but I'm thinking this would be forward compatible for installing an upgrade of bobs.
I've been inspired by the way some other projects handle the userdata
issues.
Basically, we move config.php to a new file (eg. bobs.php ) and let the
users create config.php if they need to change a setting.
Then we include the files like this
include("bobs.php");
if (file_exists("config.php")) {
include("config.php");
}
Then the users config.php settings would override the settings in
static.php and we wouldn't have to worry about overwriting config.php
since we don't distribute it.
So if I wan't to change a setting I create a config.php file and create
the new setting there.
What do you think ?
Cheers
Rene
|
|
From: Joe Z. <jz...@co...> - 2004-01-19 00:04:04
|
Rene Rask wrote:
>On Sun, 2004-01-18 at 23:02, Joe Zacky wrote:
>
>
>>I'm thinking of doing it like this by adding a line to config.php:
>>
>>$server_defs["backup_method"]["list"]["0"] = "rsync"
>>$server_defs["backup_method"]["list_text"]["0"] = "rsync (using daemon)"
>>
>>I like your method better because it's shorter and simpler, but I'm thinking this would be forward compatible for installing an upgrade of bobs.
>>
>>
>
>
>I've been inspired by the way some other projects handle the userdata
>issues.
>Basically, we move config.php to a new file (eg. bobs.php ) and let the
>users create config.php if they need to change a setting.
>
>Then we include the files like this
>
>include("bobs.php");
>if (file_exists("config.php")) {
> include("config.php");
>}
>
>Then the users config.php settings would override the settings in
>static.php and we wouldn't have to worry about overwriting config.php
>since we don't distribute it.
>
>So if I wan't to change a setting I create a config.php file and create
>the new setting there.
>
>What do you think ?
>
>Cheers
>
>Rene
>
>
>
So they would only put the lines they want to change in config.php. For
instance I could create a config.php that contains only this:
<?php
$server_defs["server_ip"]["desc"] =
"IP Address of Server";
?>
And that would override only the text of the server ip input field on
the gui.
I've seen that concept recently configuring spamassassin at work. I like
it. It would let people customize bobs more easily if they want to. I
wonder if it will work this way.
Joe
|
|
From: Jochen M. <j.m...@om...> - 2004-01-19 10:13:25
|
Hi,
Am Mo, 2004-01-19 um 00.44 schrieb Rene Rask:
> On Sun, 2004-01-18 at 23:02, Joe Zacky wrote:
> > >
> > I'm thinking of doing it like this by adding a line to config.php:
> >
> > $server_defs["backup_method"]["list"]["0"] = "rsync"
> > $server_defs["backup_method"]["list_text"]["0"] = "rsync (using daemon)"
> >
> > I like your method better because it's shorter and simpler, but I'm thinking this would be forward compatible for installing an upgrade of bobs.
>
>
> I've been inspired by the way some other projects handle the userdata
> issues.
> Basically, we move config.php to a new file (eg. bobs.php ) and let the
> users create config.php if they need to change a setting.
>
> Then we include the files like this
>
> include("bobs.php");
> if (file_exists("config.php")) {
> include("config.php");
> }
>
> Then the users config.php settings would override the settings in
> static.php and we wouldn't have to worry about overwriting config.php
> since we don't distribute it.
>
> So if I wan't to change a setting I create a config.php file and create
> the new setting there.
>
Its fine to me. I am not sure if it really necessary. The thing is, that
it can be misleading for debugging having to configuration files.
Cheers
|