Support Forum
Yellow Swordfish said
The easiest is to place your code directly into the SP theme templates. That way you can put it wherever you want it and in as many places as you want.
Thanks. I don't know what I am doing. Can you tell me EXACTLY where to put my ad code so that it appears between the first post in the thread and the second post in the thread?
Thanks
The article on our codex 'how to' FAQs describes exactly that actually:
YELLOW
SWORDFISH
|
Follow the instructions but got this error...
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /problem-with-post-edit-buttonome/cringech/public_html/wp-content/sp-resources/forum-themes/mytheme/templates/spTopicView.php on line 199
This is what i integrated into my spTopicView.php
if($spTopicView->currentPost==1)
{echo '<div id='div-gpt-ad-1385134515547-2' style='width:728px; height:90px;'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1385134515547-2'); });
</script>
</div>';
}
That got rid of the error but still not working correctly. See this thread as an example
http://www.cringechannel.com/f.....t-loading/
you'll notice that there is a space in the proper place now, but the ad isn't showing up. How can I fix this?
Thanks
I wouldn't really know. The script is there as it should be but it seems to be acting upon this CSS:
div[id^="div-gpt-ad-"] {
-moz-binding: url("about:abp-elemhidehit?727251689742#dummy") !important;
}
which appears to cause it to not display. I think you need to talk to the ad supplier for more help as I can assure you the script is in place as you want it.
Or --- the script has also changed from being 'Javascript' to 'Rocketscript' which I believe is spmething to do with Cloudflare so perhaps that is having some impact?
YELLOW
SWORDFISH
|
As I already said - I have no real idea. TRhe script IS in place. Look - this is the source being generated fpr that area of the page:
... <p>???????????????????</p> </div> </div> <div class='spPluginSection spCenter' style='width: 100%; min-height: 40px;' style='width: 100%; min-height: 40px;'> </div> <div style='clear: both; height:1px;'></div> <div id='spThanksList24033' class='spThanksList spInlineSection'></div><div style='clear: both; height:1px;'></div> </div> </div> <div id='div-gpt-ad-1385134515547-2' style='width:728px; height:90px;'> <script type='text/rocketscript'> googletag.cmd.push(function() { googletag.display('div-gpt-ad-1385134515547-2'); }); </script> </div><div class='spTopicPostSection spEven spType-Admin spRank-admin spSpecialRank-admin spUserPost' id='post24050'> ...
You can see your script is in there plain and simple.
And this is the CSS beinbg generated for that section - I assume from somethign to do with this ad featire that you haver installed:
div[id^="div-gpt-ad-"] { -moz-binding: url("about:abp-elemhidehit?727251689742#dummy") !important; }
Something is causing it to be invalid. I have no idea what though. I do not see anything that SP is doing that can in any way effect this. As you can see - it is in the generated code.
YELLOW
SWORDFISH
|
1 Guest(s)