8
recupsof:
The general procedure to use a field from a database table goes like this:
1) Either you add the field manually (as you did) or create the sql file to create it using XOOPS module installer. This just creates the field.
2) Modify whatever admin or site file is involved in the capture of data, so there's a form field whose content gets written in the relevant field in the database.
3) To retrieve and display the field, you need to:
a) Insert the retrieval logic in the PHP file, so there's a database query involved. This might have a syntax like:
$result = $xoopsDB->query('SELECT cid, title, url, homepage, test FROM '.$xoopsDB->prefix('xoops_mydownloads_downloads').' ORDER BY date ASC');
b) Once you retrieve the data, in the same PHP file create assignments so the PHP variable gets assigned to a Smarty variable. Something like
$xoopsTpl->assign('dl_test', $dl['test']);
(this, assuming you assigned the data to an array called $dl).
c) Make the necessary call in the template file. In this example, you'd need something like
<{$dl_test}>
This is all fictional, but the principle is correct. The steps are correct. It's just a matter of applying it to the real case.
Cheers.