The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Replacing words

View previous topic View next topic Go down

Solved Replacing words

Post by Hert on January 24th 2015, 9:59 pm

Hello,

There has been something I would like to try, but sadly I'm not that familiar with Javascript - but I know I have to use that.
What I would like to try is to replace words: for example, I don't want people to place the word dog on my forum so I want it to be replaced with cat. They can however still type it in the quick reply option, but I want it to somehow swap the word dog for the word cat in the post that will eventually show up on the forum.

I do know I have to do something like this:
Code:

function myFunction() {
    var str = document.getElementById("demo").innerHTML;
    var res = str.replace("dog", "cat");
    document.getElementById("demo").innerHTML = res;
}
I however need to give the post the right id and I do not know if that works if I try to do it in the template, so I was wondering if there is an option without giving anything an id?

Love & Rockets,
Hert.

Hert
Forumember

Posts : 81
Reputation : 3
Language : Dutch and English

http://afterthefall.actieforum.com/

Back to top Go down

Solved Re: Replacing words

Post by Ange Tuteur on January 24th 2015, 10:18 pm

Hi @Hert,

Like a censor, correct ? You can censor words here :
Administration Panel > General > Word Censoring

Here you'll be able to manage words that you want to censor. You can check this topic for more information : http://help.forumotion.com/t1245-word-username-censorship

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Replacing words

Post by Hert on January 24th 2015, 11:01 pm

O that works just as good, hihi ~

Well that solved my problem, thank you!

Hert
Forumember

Posts : 81
Reputation : 3
Language : Dutch and English

http://afterthefall.actieforum.com/

Back to top Go down

Solved Re: Replacing words

Post by Ange Tuteur on January 25th 2015, 1:11 am

You're welcome ! Mr. Green

Archived

Have a nice day. Smile

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum