People posting links in shoutboxes.
67888 cr points
Send Message: Send PM GB Post
26 / M / Norway
Offline
Posted 4/22/09 , edited 4/23/09
I've seen on some groups on CR that people posts URI's to other websites where they can watch certain shows. That's why I'm asking if you guys are working on a solution to prevent this? IT's a pain for the current mods I believe to go through and make sure people are spaming stupid links around.

What I suggest though is to add an regular expression to the PHP code that will search for an URI string and replace it. Something like this should work.


$Text = $_POST['comment']; // from shoutbox textbox
$URLString = " A-z0-9:\/\?&\.=_~#'";
$Text = preg_replace("/<a href=\"([$URLString]*?)\" target=\"_blank\">(.+?)<\/a>/si", "No links allowed", $Text);
echo $Text;


Of course, this regex would only search for a valid HTML link which you can actually click in your browser, but I think you can find a solution to this by mixing and tricksing a little with it.

1492 cr points
Send Message: Send PM GB Post
22 / F / Rangsit, Thailand
Offline
Posted 4/23/09
Suggestions **Read the First Post**
http://www.crunchyroll.com/forumtopic-4/suggestions-read-the-first-post/

And about what you said, article mods are doing their jobs I believe
killar 
69281 cr points
Send Message: Send PM GB Post
34 / M / Texas
Offline
Posted 4/23/09

Cyberpirate wrote:

I've seen on some groups on CR that people posts URI's to other websites where they can watch certain shows. That's why I'm asking if you guys are working on a solution to prevent this? IT's a pain for the current mods I believe to go through and make sure people are spaming stupid links around.

What I suggest though is to add an regular expression to the PHP code that will search for an URI string and replace it. Something like this should work.


$Text = $_POST['comment']; // from shoutbox textbox
$URLString = " A-z0-9:\/\?&\.=_~#'";
$Text = preg_replace("/<a href=\"([$URLString]*?)\" target=\"_blank\">(.+?)<\/a>/si", "No links allowed", $Text);
echo $Text;


Of course, this regex would only search for a valid HTML link which you can actually click in your browser, but I think you can find a solution to this by mixing and tricksing a little with it.



Thanks, we are working on it.

~Locked
You must be logged in to post.