MyBB Community Forums

Full Version: how can i replace whole characters of badword with something
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi
i have a lot of full liks in all of my forum topics such as :
http://simplelink.com/erw/e/..
http://simplelink.com/asd/zxzx/..
http://simplelink.com/xcv/xcxc/..
http://simplelink.com/pop/vbn/..
...
..
.
and i wana to change theme to a word such as : "link"

i if use bad words plugn such as :
http://simplelink.com/erw/e/..
i get : link/erw/e/...
but i wana full replace bad words.

so, i have to use a lot of bad words pulgn controls ....and it's so terrible !!
who can i replace whole (contiguous) characters of bad words whit one controls by bad words or another plugns..

tanks
Go to ACP > Configurations > Word Filters

Set word as "http://simplelink.com"
Set replacement as "link"

Save filter.
(2013-07-30, 09:03 AM)effone Wrote: [ -> ]Go to ACP > Configurations > Word Filters

Set word as "http://simplelink.com"
Set replacement as "link"

Save filter.

i khow !!
u dont attention my question.

my words is not "http://simplelink.com", it's simple "http://simplelink.com/sdsd/sdsd/sdsd/"

and there are a lot of diffrent link in all therads.

your filters result is :
"link/sdsd/sdsd/sdsd/"

bold text is surplus.

in act, i wana to define one filter for a lot of links (form one site)

http://simplelink.com/erw/e/..
http://simplelink.com/asd/zxzx/..
http://simplelink.com/xcv/xcxc/..
http://simplelink.com/pop/vbn/..

bad words replace only spacifc words, but i wana to replace all characters of word.

Huh
See if this discussion helps:
http://community.mybb.com/thread-128502.html
NO, i have this plugin that u leave link, it replcae any link some text..
more detail for my purpose :

define function such as this :

filter (ST,LN)
ST >> start characters >> sample : "http://simplelink.com/"
LN >> lenght of character >> sample "50"

above function remove all same link ,
how can define such as above funtion in inc/class_parser.php ??
??????????
i still dont get my answer...
i only want to filter a word with spacefic charachters and const lenght ..??
it's only enough that i change this line in class_parser.php.
$message = preg_replace("#(^|\W)".$badword['badword']."(\W|$)#i", "\\1".$badword['replacement'].'\\'.$index, $message);

but i dont khow about regular expersion in php..

help plz