Recent Topics

1 May 15, 2005 17:55    

How can I have B2Evo return an error if someone tries to put a url in the comments - looking to deny href and http:// and www. -

I see in conf/formatting.php theres this
URI schemes allowed for URLs in comments and user profiles:

So I tried removing href and http and https - but it dosent do anything to prevent links from being posted..

any suggestions?

2 May 15, 2005 19:04

In htsrv/comment_post.php find the bit that looks like this and add the red bit

if( empty($comment) )
{ // comment should not be empty!
errors_add( T_('Please do not send empty comment') );
}

if( !(strpos($comment,"href")===false && strpos($comment,"www")===false && strpos($comment,"http")===false )) errors_add( T_('Please do not post any links') );

¥

3 May 15, 2005 20:58

Holy cow that is AWESOME! thanks a million. And thanks for such a speedy reply!

Rob

5 May 02, 2006 04:30

Also wanted to thank you for this. Exactly what I was looking for!


Form is loading...