Support Forum
Hi Friends,
I am trying to add a javascript ad code per the link below however I'm unable to save the theme php file. Is there something I'm missing? I would be very grateful for any help someone could provide.
https://simple-press.com/docum.....the-forum/
Eg.
sp_SectionEnd('', 'post');
if($spTopicView->currentPost==1) {
echo '<script id="mNCC" language="javascript"> medianet_width='336'; medianet_height= '280'; medianet_crid='XXXXXXX '; </script> <script id="mNSC" src="http://contextual.media.net/nmedianet.js?cid=XXXXXXX " language="javascript"></script>';
}
Note: I've replaced the numeric value to XXXXXXX within the code here for policy concerns.
I wish to insert an ad under the topic and if possible would like to add it under the reply post as well. Is there any suggestion on how I can have it appear under the topic?
Many thanks!
looks like a php syntax error there... you are enclosing the echo string in single quotes... but then you use single quotes around the width, height and medianet attributes... so invalid syntax...
need something like:
if ($spTopicView->currentPost == 1) { echo ' <script id="mNCC" language="javascript"> medianet_width="336"; medianet_height= "280"; medianet_crid="XXXXXXX"; </script> <script id="mNSC" src="http://contextual.media.net/nmedianet.js?cid=XXXXXXX" language="javascript"></script> '; }
should work... make sure you use the raw code copy so as not to mangle the single and double quotes...
Visit Cruise Talk Central and Mr Papa's World
Thank you for replying back. I had tried to update per the raw code you've provided, however I am noticing the page won't save. Somehow it seems the there's still an issue. Is there another work around or suggestion that you could provide?
Thank you for all the support and time.
what do you mean by page wont save??? where are you putting it? you should be editing a theme template file... easiest to do via ftp and upload it...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)