vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Prevent users posting loads of line breaks (https://vborg.vbsupport.ru/showthread.php?t=38885)

Meirion 05-21-2002 08:05 PM

Prevent users posting loads of line breaks
 
I've got an annoying problem with some users entering massive amounts of line breaks in the posts in order to hide something a lot further down the page. This makes the pages hard to read and is frustrating to scroll through.

Can someone tell me how to hack VB so that after say 5 or 10 consecutive line breaks it won't allow anymore?

Also is there a hack that will chop the lines at xx chars in a post? Another thing is when someone ends a line with loads and loads of !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!! and it breaks the width of the forum. I think that VB already does this feature on the post titles doesn't it? But not in the posts themselves.

Not very exciting I know, but would be very useful to me, and I'm sure some others.

Thanks
Meirion

Logician 05-22-2002 03:39 PM

In newreply.php and newthread.php, find

$message=trim($message);

after that add:

$message=ereg_replace('[\n]+',"\n",$message);

This will convert all consecutive new lines to a single new line.

However I dont think this will stop your users as easily as you thought. They can just use:

.
.
.
.
.
.
.
.

Or if you stop this, there can be always imaginative members using this method which is impossible to be stopped by a hack:
s
c
r
o
l
l

m
e

n
o
w

See? Maybe you should regard warning the users instead of trying to stop them via a hack. My 2 cents..

Regards,
Logician


All times are GMT. The time now is 01:48 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00902 seconds
  • Memory Usage 1,705KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete