Sap1ent
Member
Hi all,
Wondering if anyone can advise about my problem.
I purchased a banner management system a while ago called MySimpleAds - it does the basics of what you'd expect from one.
Anyway, In the software I can create an Ad group and then it outputs the code for me to add to my site. If I just use uploaded banners, this works fine in XF as the code is something simple like:
Which naturally works fine in any of the pre-defined Ad positions, as it's regular HTML with Jscript. However, if I try to add google adsense code to the banner manager, which it does give me the option to do, when I look at the output code, it's a weird php string (i know little of this dark art).
When i add this to the page, nothing happens. I did a little digging and discovered that this won't work in an XF page anyway, but all I could really find on the matter was this https://xenforo.com/community/threads/xen-callback-tag.62124/ and whilst I'm more than happy to be proven wrong, I don't think this offers a solution.
Can anyone help a lowly php noob out?
Thanks!
Wondering if anyone can advise about my problem.
I purchased a banner management system a while ago called MySimpleAds - it does the basics of what you'd expect from one.
Anyway, In the software I can create an Ad group and then it outputs the code for me to add to my site. If I just use uploaded banners, this works fine in XF as the code is something simple like:
HTML:
<!--240x400_rightbanner-->
<span data-id="1" class="mgv1_1">
<script>(window.jQuery || document.write("<script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\"><\/script>"))</script>
<script type="text/javascript">(function(){if (mysa_mgv1_1) return; var ma = document.createElement("script");
ma.type = "text/javascript"; ma.async = true; ma.src = "http" + ("https:"==document.location.protocol?"s":"") + "://www.mydomain.com/mysa2/api/index.php?js&g&1&v=2";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(ma, s) })();
var mysa_mgv1_1=true;</script>
</span>
Which naturally works fine in any of the pre-defined Ad positions, as it's regular HTML with Jscript. However, if I try to add google adsense code to the banner manager, which it does give me the option to do, when I look at the output code, it's a weird php string (i know little of this dark art).
PHP:
<?php /* Group_Ad_member_view_above_messages */ @readfile('http://www.mydomain.com/mysa2/api/index.php?in&g&i=2&c=1&at=p&r='.$_SERVER['REMOTE_ADDR'].'&h='.urlencode($_SERVER['HTTP_HOST']).'&rf='.urlencode($_SERVER['HTTP_REFERER']).'&ua='.urlencode($_SERVER['HTTP_USER_AGENT'])); ?>
When i add this to the page, nothing happens. I did a little digging and discovered that this won't work in an XF page anyway, but all I could really find on the matter was this https://xenforo.com/community/threads/xen-callback-tag.62124/ and whilst I'm more than happy to be proven wrong, I don't think this offers a solution.
Can anyone help a lowly php noob out?
Thanks!