The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
2 posters

    Replacing words

    Hert
    Hert
    Forumember


    Posts : 81
    Reputation : 3
    Language : Dutch and English

    Solved Replacing words

    Post by Hert Sat 24 Jan - 21:59

    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.
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Replacing words

    Post by Ange Tuteur Sat 24 Jan - 22:18

    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 : https://help.forumotion.com/t1245-word-username-censorship
    Hert
    Hert
    Forumember


    Posts : 81
    Reputation : 3
    Language : Dutch and English

    Solved Re: Replacing words

    Post by Hert Sat 24 Jan - 23:01

    O that works just as good, hihi ~

    Well that solved my problem, thank you!
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Replacing words

    Post by Ange Tuteur Sun 25 Jan - 1:11

    You're welcome ! Mr. Green

    Archived

    Have a nice day. Smile

      Current date/time is Sun 22 Sep - 17:23