View Full Version : Changing Character Length
John Batalla
10-05-2006, 05:15 PM
I'm using the free version and I was wondering how can I change the character length accepted when suggesting a link?
Michael Hill
10-06-2006, 03:50 AM
Hi, John!
In file suggest-link.php find
/** check description **/
if (!$link['description'])
{
$error = true;
$msg .= "<li>{$gDirLang['error_description_incorrect']}</li>";
}
And replace it with follows
/** check description **/
if (!$link['description'])
{
$valid = false;
$msg .= "<li>{$gDirLang['error_description']}</li>";
}
else
{
/** check for minimum chars **/
if ($gDirConfig['description_min_chars'] > 0)
{
if (strlen($link['description']) < $gDirConfig['description_min_chars'])
{
$error = true;
$msg .= "<li>{$gDirLang['error_min_description']}</li>";
}
}
/** check for minimum chars **/
if ($gDirConfig['description_max_chars'] > 0)
{
if (strlen($link['description']) > $gDirConfig['description_max_chars'])
{
$error = true;
$msg .= "<li>{$gDirLang['error_max_description']}</li>";
}
}
}
In your Includes->config.inc.php file add
$gDirConfig['description_min_chars'] = '50'; // or another min char
$gDirConfig['description_max_chars'] = '300'; //or another max char
In your Language->english.php file add strings
'error_max_description' => 'Your description length should be less than '.$gDirConfig['description_max_chars'].' symbols.',
'error_min_description' => 'Your description length should be more than '.$gDirConfig['description_min_chars'].' symbols.',
Hope it will help you.
Ask in case you have any questions.
Dave Baker
10-06-2006, 11:22 PM
Hello John,
Please concretize what do you want to increase and sizes?
For some fields there are restrictions in a database.
Maybe this post will help you too
http://www.esyndicat.com/forum/showthread.php?t=6051&highlight=description+length
annunaki
10-30-2006, 11:15 PM
Will this work for the PRO version as well? And will it be integrated in the next official release?
Dave Baker
10-30-2006, 11:39 PM
Hello annunaki,
These methods will work in Pro 1.2 . And it integrated in our new version too. You can operate it through Admin Panel.
annunaki
11-03-2006, 12:36 AM
great! thanks! I really love version 2.0
Michael Hill
11-03-2006, 02:42 AM
You are allways wellcome! I am glad, that it really helped to you.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.