Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 6 Years, 4 Months, 1 Week ago Enable Javascript in a MyCode?
#1
Solved: 6 Years, 4 Months, 1 Week ago Heart 
How do I enable javascript in a MyCode?
I am trying to add Chitika ads in a post through MyCode

<script type="text/javascript">
  ( function() {
    if (window.CHITIKA === undefined) { window.CHITIKA = { 'units' : [] }; };
    var unit = {"calltype":"async[2]","publisher":"ygrkqce","width":468,"height":60,"sid":"Chitika Default"};
    var placement_id = window.CHITIKA.units.length;
    window.CHITIKA.units.push(unit);
    document.write('<div id="chitikaAdBlock-' + placement_id + '"></div>');
}());
</script>
<script type="text/javascript" src="//cdn.chitika.net/getads.js" async></script>

Best Regards,
#2
Solved: 6 Years, 4 Months, 1 Week ago
My guess it would be the same way you would do html.
Hey Everyone I am back! I will slowly be in progression of helping you all with your questions!


#3
Solved: 6 Years, 4 Months, 1 Week ago
(2014-07-20, 12:45 PM)Ace700 Wrote: My guess it would be the same way you would do html.

thanks for your response but when i enter above code in MyCode replacement it shows nothing in the forum.
#4
Solved: 6 Years, 4 Months, 1 Week ago
You will likely need to do core modifications where MyBB filters script tags. One such file would be /inc/class_parser.php and search for <s(cript, however doing so can open security issues for your board. An alternative (and I think there are plugins that do this, if not in MyBB, then other software) is to implement them through the templates.

Ultimately, the question is more or less, what is the goal you wish to achieve for adding the ads? (besides generating revenue for your site/forum). How often do you want the ads to appear, or are you attempting to add it to your (or a bot's, maybe?) signature on your board? Those type of questions.
#5
Solved: 6 Years, 4 Months, 1 Week ago
Thanks All for response, I think <script> tag is not working in MyCode thats why I am unable to add chitika and jw player 6 through a mycode, anyways; i am no longer interested to implement both of them in my forum.
Best Regards,
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)