Author Topic: require areas for picture upload form  (Read 15582 times)

0 Members and 1 Guest are viewing this topic.

Offline Murat

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
    • Lavinya
require areas for picture upload form
« 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."
« Last Edit: July 24, 2006, 12:00:37 PM by Bugfixed »
<?php echo 'Hello, World!'; ?>

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: require areas for picture upload form
« Reply #1 on: July 20, 2006, 02:38:04 PM »
Is there a question in your post? if so, what is it?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Murat

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
    • Lavinya
Re: require areas for picture upload form
« Reply #2 on: July 20, 2006, 09:50:19 PM »
sorry.

how can I make required image descripition, image name, keywords>" photo upload form area."
<?php echo 'Hello, World!'; ?>

Offline Murat

  • Jr. Member
  • **
  • Posts: 97
    • View Profile
    • Lavinya
Re: require areas for picture upload form
« Reply #3 on: August 04, 2006, 08:49:54 PM »
please help me.  :?
<?php echo 'Hello, World!'; ?>

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: require areas for picture upload form
« Reply #4 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;
  }
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline laurica

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: require areas for picture upload form
« Reply #5 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.

Offline laurica

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: require areas for picture upload form
« Reply #6 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!"

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: require areas for picture upload form
« Reply #7 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";
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline laurica

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: require areas for picture upload form
« Reply #8 on: August 13, 2006, 09:21:42 PM »
it's perfect now, thanks a lot !