Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
embedding adbrite code in discussion's helper_functions.php
Aolee
✭✭
hi guys,
i just have a question in application/vanilla/views/discussion/help_functions.php
what is so special at the line 55
when i embed my adbrite code after this line and try to load the page...
the page redirects to a blank page, only displaying the ads.
but if i put the adbrite code anywhere it doesn't redirects and displays the page correctly together with the ad?
problem occurs when i put the code inside the block
thanks.
i just have a question in application/vanilla/views/discussion/help_functions.php
what is so special at the line 55
<div class="Message">
-- when i embed my adbrite code after this line and try to load the page...
the page redirects to a blank page, only displaying the ads.
but if i put the adbrite code anywhere it doesn't redirects and displays the page correctly together with the ad?
problem occurs when i put the code inside the block
<div class="Message"> .. .. </div>is there a special trapping for Javascript codes here?
thanks.
0
Comments
<div class="Message"> <script> document.write("see what i mean?"); </script> <?php $Sender->FireEvent('BeforeCommentBody'); ?> <?php $Object->FormatBody = Gdn_Format::To($Object->Body, $Object->Format); $Sender->FireEvent('AfterCommentFormat'); $Object = $Sender->EventArguments['Object']; echo $Object->FormatBody; ?> </div>
so when i plug javascript code inside the
<div class="message">
block it doesn't work.You can also read more about theme hooks at http://vanillaforums.org/docs/theme-hooks.
emotify plugin queries the message body of the discussion (
<div class="message"> </div>
) to replace the chars with icons. but since the adbrite uses document.write in their code, it conflicts with it. emotify plugin re-fires the document.write code.