vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Does anyone know how to censor entire sentences ? (https://vborg.vbsupport.ru/showthread.php?t=252784)

hotslot 10-28-2010 04:07 PM

Does anyone know how to censor entire sentences ?
 
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

PHP Code:

$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

Quote:

Originally Posted by mmfgamer5 (Post 2115302)
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 [DATE]1288295059[/DATE] at [TIME]1288295059[/TIME] ---------------

Quote:

Originally Posted by Lynne (Post 2115325)
You can try something like this:

hook location - postbit_display_complete

PHP Code:

$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 [DATE]1288297327[/DATE] at [TIME]1288297327[/TIME] ---------------

Quote:

Originally Posted by Lynne (Post 2115325)
You can try something like this:

hook location - postbit_display_complete

PHP Code:

$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

Quote:

Originally Posted by Lynne (Post 2115445)
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

Quote:

Originally Posted by hotslot (Post 2115290)
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

Quote:

Originally Posted by Paul M (Post 2115471)
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

Quote:

Originally Posted by Lynne (Post 2115499)
Post the code you are using so we can see what is going on.

PM sent :up:

--------------- Added [DATE]1288331351[/DATE] at [TIME]1288331351[/TIME] ---------------

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 ?


All times are GMT. The time now is 01:46 AM.

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.01359 seconds
  • Memory Usage 1,747KB
  • 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
  • (3)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete