forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: AK_CCM on June 22, 2006, 05:58:53 am
-
Hello all,
our mushroom club manages pictures with CPG (http://www.pilze-augsburg.de/galerie/index.php) in the future. For that I want to give the uploaders some little instructions how to arrange the content in the file-information-textfields of the upload form as is to be seen at the screenshot. I think that the changes are to be made in upload.php, but I don't know, how I can do this. ???
Could anyone help me please, to insert the explanations below the textfields?
Thanks before!
Regards, AK
-
Edit upload.php
Add
function form_textfield_desc($text) {
echo <<<EOT
<tr>
<td class="tableb">
</td>
<td class="tableb" colspan="2">
$text
</td>
</tr>
EOT;
}
just before
// The form statement creation function. Takes a non-array element form $data as its argument.
function form_statement($text) {
then Add
case 5 :
form_textfield_desc($element[0]);
break;
just before
// If the type is not present, kill the script.
default:
cpg_die(ERROR, $lang_upload_php['reg_instr_1'], __FILE__, __LINE__);
then Add
array("description for pic title", "", 5),
just before
array($captionLabel, 'caption', 3, $CONFIG['max_img_desc_length'], (isset($iptc['Caption'])) ? $iptc['Caption'] : ''),
and lastly Replace
if(!empty($CONFIG['user_field1_name'])) {
$form_array[] = array($CONFIG['user_field1_name'], 'user1', 0, 255, 1);
}
with
if(!empty($CONFIG['user_field1_name'])) {
$form_array[] = array($CONFIG['user_field1_name'], 'user1', 0, 255, 1);
$form_array[] = array("description for first user field", "", 5);
}
There are 4 blocks for 4 user fields. You can add
$form_array[] = array("description for first user field", "", 5);
in all 4 blocks to show descriptions for all 4 user fields.
Also change the descriptions as per you need in above code. The text strings can also go in lang file if you intend to use more than one language.
HTH
Abbas
-
Hello Abbas,
much thanks for your instructions - the mod is working very well.
You're awesome!
Regards, Andreas
-
good job Abbas
Karma ++