GenSec
10-14-2001, 10:00 PM
A small addition to prevent members to post long messages wich have no new information, but just long quotes and "Cool!" at the end.
Database Changes:
INSERT INTO setting (settingid,settinggroupid,title,varname,value,desc ription,optioncode,displayorder) VALUES (NULL,'8','Maximum Characters per quote','quotemaxchars','250','The maximum number of characters that you want to allow per quote. Set this to 0 to disable it','','8')
Open newreply.php
Find $pagetext=htmlspecialchars($postinfo[pagetext]);
Replace with
$pagetext=$postinfo[pagetext];
$getquote=$DB_site->query_first("SELECT value FROM setting WHERE varname='quotemaxchars'");
$quotemaxchars=$getquote[value];
if (strlen($pagetext) > $quotemaxchars and $quotemaxchars!=0) {
$pagetext = substr($pagetext,0,$quotemaxchars);
$pagetext .= "...";
}
$pagetext=bbcodeparse($pagetext,0,1);
Then use admin CP to set the maximum size of the quote
Database Changes:
INSERT INTO setting (settingid,settinggroupid,title,varname,value,desc ription,optioncode,displayorder) VALUES (NULL,'8','Maximum Characters per quote','quotemaxchars','250','The maximum number of characters that you want to allow per quote. Set this to 0 to disable it','','8')
Open newreply.php
Find $pagetext=htmlspecialchars($postinfo[pagetext]);
Replace with
$pagetext=$postinfo[pagetext];
$getquote=$DB_site->query_first("SELECT value FROM setting WHERE varname='quotemaxchars'");
$quotemaxchars=$getquote[value];
if (strlen($pagetext) > $quotemaxchars and $quotemaxchars!=0) {
$pagetext = substr($pagetext,0,$quotemaxchars);
$pagetext .= "...";
}
$pagetext=bbcodeparse($pagetext,0,1);
Then use admin CP to set the maximum size of the quote