Author Topic: Field "Description" obligatory for filling  (Read 3456 times)

0 Members and 1 Guest are viewing this topic.

Offline Lunat

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • В объективе - МИР!
Field "Description" obligatory for filling
« on: December 17, 2008, 03:22:26 PM »
How to make a field "Description" obligatory for filling?

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: Field "Description" obligatory for filling
« Reply #1 on: December 17, 2008, 03:51:07 PM »
In member.php find:
  if ($image_name == "")  {
    
$error 1;
    
$field_error preg_replace("/".$site_template->start."field_name".$site_template->end."/siU"str_replace(":"""$lang['image_name']), $lang['field_required']);
    
$msg .= (($msg != "") ? "<br />" "").$field_error;
  }


Insert below:  if ($image_description == "")  {
    
$error 1;
    
$field_error preg_replace("/".$site_template->start."field_name".$site_template->end."/siU"str_replace(":"""$lang['description']), $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 Lunat

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • В объективе - МИР!
Re: Field "Description" obligatory for filling
« Reply #2 on: January 13, 2009, 03:58:46 PM »
Ok, thanks. That's work!