2011-06-25, 01:55:42
Hi eline,
For example to add one field called 'myfield', you have to do 3 things:
1) In guestbook.php: in function myform (...), line +-512, add 1 row (tr) and 2 columns (td) for each field
2) In guestbook/comprueba.php: in line +- 168 to 200, add enter lines, (these lines save data)
3) In guestbook/lang/yourlanguage.php: add each field into array,
If you want change some colour in the table of comments, you can to do it, in guestbook.php, line +-1900 in <STYLE TYPE="text/css">.....
Regards.
For example to add one field called 'myfield', you have to do 3 things:
1) In guestbook.php: in function myform (...), line +-512, add 1 row (tr) and 2 columns (td) for each field
Code:
echo '<tr>';
echo '<td align="right" style="vertical-align: middle;">';
echo '<p style="margin-bottom: 3px;"><label>'.i18n_r('guestbook/myfield').':</label></p></td>';
echo '<td><input style="margin-left:2px; width: 444px;" type="text" name="guest[myfield]" />';
echo '</td></tr>';
2) In guestbook/comprueba.php: in line +- 168 to 200, add enter lines, (these lines save data)
Code:
$cdata = $thislog->addChild('myfield');
$cdata->addCData(htmlentities($temp['myfield'], ENT_QUOTES, 'UTF-8'));
3) In guestbook/lang/yourlanguage.php: add each field into array,
Code:
....
"myfield" => 'Field added',
....
If you want change some colour in the table of comments, you can to do it, in guestbook.php, line +-1900 in <STYLE TYPE="text/css">.....
Regards.