Is it possible to insert JavaScript in posts using mybb custom codes.e.g.
// Post message
[java] // javascript codes [/java]
// Post message
If you were asking how to allow simple HTML tags such as strong or em, I'd understand. But JavaScript? You should not allow JavaScript code to be inserted in your forum, or any HTML at all. There are too many risks.
Actually I want Google ads in posts
You don't need to allow HTML to add advertisements in posts. Just use one of the many plugins for ads.
search in yaldaram.com
they have mybb ads mods, working like a charm
they have 3 mods for ads, choose the one according to your need...
but all 3 is essential