PDA

View Full Version : Stop to post long quotes


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

cyrus
10-23-2001, 01:31 PM
nice one

thatl come in handy

thanks GenSec

Admin
10-23-2001, 01:39 PM
This will just stop from posting long messages, not quotes.

GenSec
10-23-2001, 01:53 PM
Originally posted by FireFly
This will just stop from posting long messages, not quotes. Messages which are long because include long quotes
It limits not message but size of quotes in it

Admin
10-23-2001, 02:08 PM
Limiting posts length is already standard with vBulletin.
Your hack does the exact same thing.

GenSec
10-23-2001, 02:30 PM
Sorry, it doesn't
Limiting posts length is already standard with vBulletin. Right.
If it's limit is 1000 for example and someone post long message with 1000 simbols. Then next replies can look like
" bla bla = 990 simbols + Cool!"

It's only repeat previous one! I hate it and limited in addition the size of quote to 10% of the max post size.

Admin
10-23-2001, 02:48 PM
You are right.

DarkReaper
10-23-2001, 03:35 PM
Ok...now I'm confused :confused:

Admin
10-23-2001, 03:43 PM
He's right, I didn't understand it. :)
Sorry GenSec.