alright, i've seen the code to vBulletin but i dunno where it is but here is my suggestion
whever it is that you have to enter your sig in the user control panel AFTER the $_POST you check the $_POST data for '\n" new lines. if it's more than 6 lines than it's not allowed and throw a header and redirect them to the last page or do a javascript back. this way you don't have to bother with checking the sigs anymore :thumbup:
BAM. done.
i left the other things empty but that's because i don't know the actual data structures so i wouldn't be able to do it for you. sorry.
now, if you do this there is no reason you would have to bother with bugging members about sigs anymore because it's automated. of course, this is no real error checking or security but i'm pretty sure you people would know better than i about that
whever it is that you have to enter your sig in the user control panel AFTER the $_POST you check the $_POST data for '\n" new lines. if it's more than 6 lines than it's not allowed and throw a header and redirect them to the last page or do a javascript back. this way you don't have to bother with checking the sigs anymore :thumbup:
Code:
$page = 'signature_edit_page.php';
$success = 'sig_edit_sucess.php';
$lines = 6;
$error = 'sorry bitch, you can\'t have more than' . $lines .'lines in your sig'
if (isset($_POST['signature_submit']))
{
$i = 0;
while( /* your array isn't empty */ )
{
if ($data_in_post == '\n')
$i++;
}
if ($i >= 6)
{
throwError($error);
header("Location: " . $page);
}
}
else
header("Location: " . $page);
i left the other things empty but that's because i don't know the actual data structures so i wouldn't be able to do it for you. sorry.
now, if you do this there is no reason you would have to bother with bugging members about sigs anymore because it's automated. of course, this is no real error checking or security but i'm pretty sure you people would know better than i about that