4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Bugfixed on July 20, 2006, 12:10:40 PM

Title: require areas for picture upload form
Post by: Bugfixed on July 20, 2006, 12:10:40 PM
hello.

I'm using 1.7.3. require areas for picture upload form eg: image descripition> this area require
----
edit:

how can I make required image descripition, image name, keywords>" photo upload form area."
Title: Re: require areas for picture upload form
Post by: V@no on July 20, 2006, 02:38:04 PM
Is there a question in your post? if so, what is it?
Title: Re: require areas for picture upload form
Post by: Bugfixed on July 20, 2006, 09:50:19 PM
sorry.

how can I make required image descripition, image name, keywords>" photo upload form area."
Title: Re: require areas for picture upload form
Post by: Bugfixed on August 04, 2006, 08:49:54 PM
please help me.  :?
Title: Re: require areas for picture upload form
Post by: V@no on August 04, 2006, 08:52:10 PM
In member.php find:
Code: [Select]
  if ($cat_id == 0)  {
Insert above:
Code: [Select]
  if ($image_description == "")  {
    $error = 1;
    $field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['image_description']), $lang['field_required']);
    $msg .= (($msg != "") ? "<br />" : "").$field_error;
  }
  if ($image_keywords == "")  {
    $error = 1;
    $field_error = preg_replace("/".$site_template->start."field_name".$site_template->end."/siU", str_replace(":", "", $lang['image_keywords']), $lang['field_required']);
    $msg .= (($msg != "") ? "<br />" : "").$field_error;
  }
Title: Re: require areas for picture upload form
Post by: laurica on August 13, 2006, 08:48:25 PM
hmm this doesn't work for me... it writes the error message  but the images is posted..

Please fill out the field!
Please fill out the field!Image added: test (betta-spawning_2.jpg)
Your image will be validated once it has been reviewed.
Title: Re: require areas for picture upload form
Post by: laurica on August 13, 2006, 08:54:48 PM
nah sorry, my mistake.. i added the code in the wrong place.. it works now thanks :)

though it would be nice if the error message would be more strict, i mean something like "Fill in the Description field" not only "Please fill out the field!"
Title: Re: require areas for picture upload form
Post by: V@no on August 13, 2006, 09:10:36 PM
hmmm...add in lang/<your language>/main.php:
Code: [Select]
$lang['image_description'] = "description";
$lang['image_keywords'] = "keywords";
Title: Re: require areas for picture upload form
Post by: laurica on August 13, 2006, 09:21:42 PM
it's perfect now, thanks a lot !