The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How to change this php function
Well, in functions.php, there is this function for the censorship system:
PHP Code:
I want to change this function to return the $text WITH the censored words, BUT beside each censored word, I want to there is a " " (space). For example, if I write the censored word "example" I want to return " example". I know it is droll, but I need it Thanks in advance and sorry for my bad english. |
#2
|
||||
|
||||
This might not be what you were going for, but why not just disable the censor and use Replacement Variables instead? Unless you were needing to recode for some reason.
|
#3
|
||||
|
||||
Quote:
I had achieved it before one year ago but I forget the changes. It doen't need to recode all the function. Only the part of character replacement. I remember that it was a simple change to the function. Well, I have add the following code to functions_newpost.php PHP Code:
The censorship system can change the $post['message']. If the cens system doesn't change the $post['message'] the error doesn't appear. So, I want to do an as far as possible simple change to the text.. not the replacement of all characters. The code which I have add, works normally when the cens system change the text... Thanks and sorry for my bad english.. |
#4
|
|||
|
|||
You maybe could change:
PHP Code:
to PHP Code:
There is also another preg_replace() line above that where you could make a similar change although I'm not sure if that would do what you want. |
#5
|
||||
|
||||
Thanks kh99, it works fine!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|