View Full Version : Censor replacing words with other words, not ***
demoniavbh
11-05-2008, 11:38 AM
I'd like a mod for 3.7 that could replace some words with others. Like the censor, but instead of giving ****, writing another word.
There's already one but for 3.6
https://vborg.vbsupport.ru/showthread.php?t=149118
Thank you
Lynne
11-05-2008, 02:11 PM
Very often the mods for 3.5 and 3.6 will work for 3.7. So, I suggest you try the mod on your test board. Or, read the thread and see if others have posted if it works in 3.7.
demoniavbh
11-06-2008, 02:51 PM
I've already done it, and that's why I posted here this message, because there are many users who have uninstalled it because it doesn't work anymore with 3.7 :)
But thanks for the suggestion
Lynne
11-06-2008, 03:08 PM
I wrote a real simple plugin for my site for word replacement. I just put the words into an array, the replacements into an array (they are all links for the moderators to use) and then do a simple str_ireplace. It works on 3.6 and 3.7. I would think that is the way most of the modifications for word replacement would work. I have heard that they don't work if doing a word replacement and then putting the word in the replacement also - like replace google with a link to google (www.google.com)
speakeasy media
11-07-2008, 12:31 AM
How about something for those of us with a bit less computer skill? :)
Lynne
11-07-2008, 02:23 AM
All I was really saying was that if all the plugin is doing is a string replace, then there is no reason for it not to work on 3.7. If the problem you are having has to do with replacing words like google with a link to google (www.google.com (http://www.google.com/)), then that isn't just a 3.7 thing, but a problem with any version that uses string replace.
Which modification did you install? And what isn't working anymore? And did you post in the thread about it already?
demoniavbh
11-10-2008, 11:30 AM
I found out that in page 7 of that mod there's a code modification that makes it work perfectly :)
https://vborg.vbsupport.ru/showpost.php?p=1425218&postcount=98
Now my question is: A way to make it also work for titles, not only posts?
What should I change or add there?
Lynne
11-10-2008, 02:24 PM
You may want to just ask that in the thread and see if anyone knows what the code is for doing this to titles.
If you want both posts and titles, have you considered just using the Replacement Variables?
demoniavbh
11-10-2008, 09:19 PM
I don't really know how to use replacement variables in this case...
I shouldn't replace anything but add...shouldn't I?
I don't really know...I'm not much into PHP and codes, I only touch them and change some thigns I think that might work, but I don't really know how it goes...
For example in this case I know that what I want to change has to do with this
$ah_text = $this->post['message']; but I don't know what to do with the code, repeat it again but changing that "message" for "title", adding only some code somewhere...tsk...
I think it's time to start learning PHP so I can know what I'm doing :S
Lynne
11-10-2008, 09:37 PM
I'm talking about the Replacement Variables that come with vB. In Styles & Templates > Replacement Variable Manager you may add a new Replacement Variable for your style and you just put in the Text to Find and the Replacement Text and it will do that for the whole site (as compared to just the post text).
demoniavbh
11-10-2008, 09:45 PM
Ah oh, now I know what you mean...not using this mod but the replacement variables...
I thought you were saying I could use replacement variables to change the mod :P
Hummmm...I'll it...It might work...I though it was only to change some things in the styles, not in the whole board, but now I've read all the infos about it and it may work. Tsk, I'm too lazy and have many styles, but yeah, it will be faster than waiting till I learn PHP :P
Ok, thanks for your patience :) I'll try it tomorrow
Joey Link
11-12-2008, 08:34 AM
Please let me know how this goes :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.