The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
plugin for removing a string of text from a post...
I saw this posted before but can't find it after extensive searching...
Say I need to remove 1 word 1 time from every post if it's in there when the post is submitted... can someone give me the php code to put in a plugin to do this- mainly I need what piece of data I need to edit, like is it $post[text] ? I know I can use a string function to search for a string and replace it with an empty string effectively removing the word if exists... Also what hook location would you recommend I use? I want to remove the text before it gets into the database if possible. Thanks... |
#2
|
|||
|
|||
You could use newpost_process and change $post['message']. That changes the message text even if the user is just previewing (although if that's not what you want you could check for that). Also, it doesn't do anything to posts being edited, only new posts.
Is this any different than the built-in censoring? I've never tried to use that. |
#3
|
||||
|
||||
Thanks...
It's different because the censor replaces each letter with a character like * or + whereas this will remove it altogether. Also my intent is to use it on a fairly large string that I don't think would work well with the censor. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|