Some of my users don't put the Title when they upload there pics. I want they MUST put the title, otherwise they can't go ahed and upload the picture.
I know it must be something to change to upload.php.
How can I do it?
Thanks.
Finally I didi it.
In upload.php
after
if (!$album){
cpg_die(ERROR, $lang_db_input_php['album_not_selected'], __FILE__, __LINE__);
}
add
if ($title == '') {
cpg_die(ERROR, $lang_db_input_php['title_not_entered'], __FILE__, __LINE__);
}
In lang/english.php, after
'album_not_selected'
add
'title_not_entered=> 'You have not entered the Title.', //cpg1.4
I forgot a line.
In upload.php
after
$album = (int)$_POST['album'];
add
$title = addslashes($_POST['title']);
Thanks for returning and sharing your solution. However, this will be very annoying for your users to end with a die-statement: they have to start the upload from scratch. Don't you think that this is not very user-friendly?
Hi,
No, it doesn't die the upload, it just needs a page back without loosing any infomation already added.
It works in the same way as if you have not selected the album and you have to go back and select it.
There is an error in the code I wrote up
Wrong code:
'title_not_entered=> 'You have not entered the Title.', //cpg1.4
Correct Code:
'title_not_entered' => 'You have not entered the Title.', //cpg1.4