How to block comments containing *http*
i wrote this:
public function process_event($event, $userid, $handle, $cookieid, $params) { switch ($event) { case 'c_post': $content=$params['content']; if(strpos($content, "http")>0) { qa_post_delete($params['postid']); } break; }
public function process_event($event, $userid, $handle, $cookieid, $params)
{
switch ($event) {
case 'c_post':
$content=$params['content'];
if(strpos($content, "http")>0)
qa_post_delete($params['postid']);
}
break;
If the link shows up like that ( http://*****.com/adlffd ) , then you could write a Javascript method like this:
$('a:contains("***")').remove();
I'm sure no plausible link would have 3 asterisks in a row, or even one if that matter, so it's safe to remove them.
You can try it on this post using the Dev Tools console.
Welcome to the Q&A site for Question2Answer.
If you have a question about Q2A, please ask here, in English.
To report a bug, please create a new issue on Github or ask a question here with the bug tag.
If you just want to try Q2A, please use the demo site.