The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
protect a link from str_ireplace
Code:
$this->post['message'] = str_ireplace('hello', '<a href="www . hello . com">hello </a> ', $this->post['message']); any way to put a "protection" on links ? |
#2
|
||||
|
||||
Hi cosy.
The way I work with this is it only does a string replace for words my Mods write and the phrases they use would not be something they would use in the normal course of posting. For example, we have a Band Restriction Policy on our site in the faq. When a Mod refers a user to that page in the faq, all they have to write is the title and my rewrite will make it a link to the faq - Band Restriction Policy. However! Something else you can do.... I use "str_ireplace" which replaces the string no matter if the characters are capitalized or not. You could change it to "str_replace" and it is more specific. You could make it so people have to post "HELLO" and it gets replaced and most likely that is going to not replace the url (unless it is written as www. HELLO.com). |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|