PDA

View Full Version : Does anyone know how to censor entire sentences ?


hotslot
10-28-2010, 04:07 PM
I understand the censor tool in vbulletin admin sucks and only lets you do like 1 word at a time and eliminates it from all threads.. I'm looking to edit a predefined sentence that occurs on all my threads.

mmfgamer5
10-28-2010, 04:39 PM
Try wrapping it in {}.

{SENTANCE}.

I'm doubt it will work, but it's worth a shot.

Lynne
10-28-2010, 05:40 PM
You can try something like this:

hook location - postbit_display_complete

$word = array(
'word 1',
'word 2',
);
$link = array(
'new words 1',
'new words 2',
);
$this->post['message'] = str_replace($word, $link, $this->post['message']);

hotslot
10-28-2010, 06:43 PM
Try wrapping it in {}.

{SENTANCE}.

I'm doubt it will work, but it's worth a shot.


Tried that :D

Nope doesn't work.

It's the $100 question right now.

--------------- Added 1288295059 at 1288295059 ---------------

You can try something like this:

hook location - postbit_display_complete

$word = array(
'word 1',
'word 2',
);
$link = array(
'new words 1',
'new words 2',
);
$this->post['message'] = str_replace($word, $link, $this->post['message']);

I will try that now thanks!

--------------- Added 1288297327 at 1288297327 ---------------

You can try something like this:

hook location - postbit_display_complete

$word = array(
'word 1',
'word 2',
);
$link = array(
'new words 1',
'new words 2',
);
$this->post['message'] = str_replace($word, $link, $this->post['message']);

I think that would work however would the "word 1" have to be in BBCODE or HTML ?

Regards

alan

Lynne
10-28-2010, 11:27 PM
You may enter html in there, but not bbcode. It has to be what is in the parsed template.

hotslot
10-29-2010, 12:22 AM
You may enter html in there, but not bbcode. It has to be what is in the parsed template.


Thanks Lynne, I'm using the hook and html code but its still not working.. When I think its close I get an error wont load the thread. Can I pm you with extra details ?

warm regards

Paul M
10-29-2010, 01:06 AM
I understand the censor tool in vbulletin admin sucks and only lets you do like 1 word at a time and eliminates it from all threads.. I'm looking to edit a predefined sentence that occurs on all my threads.Because it wont block an entire sentance is hardly a valid reason to say it sucks. Word censors are just that, designed to censor words. Ive never come across anyone that needs to do such a thing (or indeed, a forum software designed to do it).

hotslot
10-29-2010, 01:37 AM
Because it wont block an entire sentance is hardly a valid reason to say it sucks. Word censors are just that, designed to censor words. Ive never come across anyone that needs to do such a thing (or indeed, a forum software designed to do it).

I have to disagree. There is many times when "spam" words like Click Me or Try for Free should be censored. You don't want to censor the basic word all over the forum but if added together You would.

Lynne
10-29-2010, 02:22 AM
Post the code you are using so we can see what is going on.

hotslot
10-29-2010, 03:41 AM
Post the code you are using so we can see what is going on.

PM sent :up:

--------------- Added 1288331351 at 1288331351 ---------------

It could always be done in the Replacement Variable Manager. Problem with that is You can only do about 5 words tops at once. Is that a safe and affective way of doing so though ?

Lynne
10-29-2010, 01:29 PM
Replacement Variable Manager will change the lines on the whole site, not just in the post, but I don't see why that couldn't be used.

hotslot
10-30-2010, 03:24 AM
Replacement Variable Manager will change the lines on the whole site, not just in the post, but I don't see why that couldn't be used.

Ok so noted for the record when someone else ask. :cool: