Author Topic: Always getting Title and Description lenght error  (Read 1627 times)

Offline kiranrs

  • Newbie
  • *****
  • Posts: 2
  • Karma: +0/-0
Always getting Title and Description lenght error
« on: August 15, 2017, 09:31:59 AM »
phpEnter Web Hosting
hi,

I'm always getting " Title must be between 10-160 characters" error while posting new stories.How to fix it?

Offline goli

  • Full Member
  • *****
  • Posts: 39
  • Karma: +2/-0
Re: Always getting Title and Description lenght error
« Reply #1 on: August 16, 2017, 07:55:47 AM »
In post.php replace this code:

 
Code: [Select]
if(strlen($title) < 10 or strlen($title) > 160) {
   echo "<div class='errors'>$lang[239] <a href='javascript:history.go(-1)'>$lang[135]</a></div></div></div></div>";
   $smarty->display('footer.php');
   die();
  }

With this code:

Code: [Select]
if(strlen($title) > 200) {
   echo "<div class='errors'>$lang[239] <a href='javascript:history.go(-1)'>$lang[135]</a></div></div></div></div>";
   $smarty->display('footer.php');
   die();
  }
 if(strlen($title) < 5) {
   echo "<div class='errors'>$lang[239] <a href='javascript:history.go(-1)'>$lang[135]</a></div></div></div></div>";
   $smarty->display('footer.php');
   die();
  }







« Last Edit: August 16, 2017, 07:57:33 AM by goli »