Hello, I have the demo running fine with templates and now I need to customise the DB.
I did changes in the default.cfg
ID => [0, 'numer', 5, 8, 1, '', ''],
Nick => [1, 'alpha', 20, 50, 1, '', ''],
ICQ => [2, 'numer', 20, 20, 1, '', '\d{1}'],
Email => [3, 'alpha', 40, 50, 1, '', '.+@.+..+'],
URL => [4, 'alpha', 40, 75, 0, 'http://', '^http|news|mailto|ftp'],
Cidade => [5, 'alpha', 20, 30, 1, '', ''],
Date => [6, 'date', 15, 15, 1, &get_date, ''],
Status => [7, 'alpha', 20, 150, 1, '', ''],
Contribui => [8, 'alpha', 20, 150, 0, '', ''],
Micro => [9, 'alpha', 30, 50, 1, '', ''],
Conexao => [10, 'alpha', 20, 20, 1, '', ''],
Jogos => [11, 'alpha', 30, 50, 1, '', ''],
Fases => [12, 'alpha', 30, 50, 1, '', ''],
Armas => [13, 'alpha', 30, 50, 1, '', ''],
Descricao => [14, 'alpha', '40x3', 500, 1, '', ''],
'Contact Name' => [15, 'alpha', 40, 75, 1, '', ''],
'Contact Email' => [16, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
Hits => [17, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [18, 'alpha', 10, 5, 0, 'No', ''],
isPopular => [19, 'alpha', 10, 5, 0, 'No', ''],
Rating => [20, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [21, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [22, 'alpha', 10, 10, 1, 'Yes', 'No|Yes'],
Userid => [23, 'alpha', -2, 15, 0, '', '']
);
AnthroRules told that this would be ok, but I found out that I need to change also some html templates, and then I added those new fields in the folloing templates:
add_form.html
modify_form_record.html
html_record.html
record_form.html
what I did was just replace some variables and add others like this
<td width="73%">
<input type="text" name="Title" size="40" maxlength="75" value="<%Title%>">
to this
<td width="73%">
<input type="text" name="Title" size="20" maxlength="50" value="<%Nick%>">
</td>
Now I have some other problems:
When I'm going to add a new record some fields do not show up to be filled!:
Those ones:
%db_select_fields = (
Status => 'Player,Founder,Coordenador',
Contribui => 'Design,Moderador da Lista,WebMaster',
isNew => 'Yes,No',
isPopular => 'Yes,No',
ReceiveMail => 'Yes,No'
);
Only the ReceiveMail shows up! and I do not know why!
Other problem is that even this way I cannot add a record It says that
There were problems with the following fields:
Nick (Can not be left blank)
ICQ (Can not be left blank)
Email (Can not be left blank)
URL (Invalid format)
URL (Too long. Max length: 75)
Cidade (Can not be left blank)
Status (Can not be left blank)
Micro (Can not be left blank)
Conexao (Can not be left blank)
Jogos (Can not be left blank)
Fases (Can not be left blank)
Armas (Can not be left blank)
Descricao (Can not be left blank)
Contact Email (Invalid format)
What do I do??
Thanks
------------------
I'm not a programer, but I want to know more about computers to understand what is happening.
[This message has been edited by Oliver Prado (edited April 21, 2000).]
I did changes in the default.cfg
Code:
%db_def = ( ID => [0, 'numer', 5, 8, 1, '', ''],
Nick => [1, 'alpha', 20, 50, 1, '', ''],
ICQ => [2, 'numer', 20, 20, 1, '', '\d{1}'],
Email => [3, 'alpha', 40, 50, 1, '', '.+@.+..+'],
URL => [4, 'alpha', 40, 75, 0, 'http://', '^http|news|mailto|ftp'],
Cidade => [5, 'alpha', 20, 30, 1, '', ''],
Date => [6, 'date', 15, 15, 1, &get_date, ''],
Status => [7, 'alpha', 20, 150, 1, '', ''],
Contribui => [8, 'alpha', 20, 150, 0, '', ''],
Micro => [9, 'alpha', 30, 50, 1, '', ''],
Conexao => [10, 'alpha', 20, 20, 1, '', ''],
Jogos => [11, 'alpha', 30, 50, 1, '', ''],
Fases => [12, 'alpha', 30, 50, 1, '', ''],
Armas => [13, 'alpha', 30, 50, 1, '', ''],
Descricao => [14, 'alpha', '40x3', 500, 1, '', ''],
'Contact Name' => [15, 'alpha', 40, 75, 1, '', ''],
'Contact Email' => [16, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
Hits => [17, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [18, 'alpha', 10, 5, 0, 'No', ''],
isPopular => [19, 'alpha', 10, 5, 0, 'No', ''],
Rating => [20, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [21, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [22, 'alpha', 10, 10, 1, 'Yes', 'No|Yes'],
Userid => [23, 'alpha', -2, 15, 0, '', '']
);
AnthroRules told that this would be ok, but I found out that I need to change also some html templates, and then I added those new fields in the folloing templates:
add_form.html
modify_form_record.html
html_record.html
record_form.html
what I did was just replace some variables and add others like this
Code:
<td align="right" valign="top" width="27%"><font face="verdana,arial,helvetica" size="2">Title:</font></td> <td width="73%">
<input type="text" name="Title" size="40" maxlength="75" value="<%Title%>">
to this
Code:
<td align="right" valign="top" width="27%"><font face="verdana,arial,helvetica" size="2">Nick:</font></td> <td width="73%">
<input type="text" name="Title" size="20" maxlength="50" value="<%Nick%>">
</td>
Now I have some other problems:
When I'm going to add a new record some fields do not show up to be filled!:
Those ones:
Code:
# Select fields. Field name => 'comma seperated list of drop down options'. %db_select_fields = (
Status => 'Player,Founder,Coordenador',
Contribui => 'Design,Moderador da Lista,WebMaster',
isNew => 'Yes,No',
isPopular => 'Yes,No',
ReceiveMail => 'Yes,No'
);
Only the ReceiveMail shows up! and I do not know why!
Other problem is that even this way I cannot add a record It says that
There were problems with the following fields:
Nick (Can not be left blank)
ICQ (Can not be left blank)
Email (Can not be left blank)
URL (Invalid format)
URL (Too long. Max length: 75)
Cidade (Can not be left blank)
Status (Can not be left blank)
Micro (Can not be left blank)
Conexao (Can not be left blank)
Jogos (Can not be left blank)
Fases (Can not be left blank)
Armas (Can not be left blank)
Descricao (Can not be left blank)
Contact Email (Invalid format)
What do I do??
Thanks
------------------
I'm not a programer, but I want to know more about computers to understand what is happening.
[This message has been edited by Oliver Prado (edited April 21, 2000).]